:root {
  --bg: #4a1fb8; --bg2: #2c0f7a; --ink: #1d0b4f;
  --red: #ff3355; --blue: #2d7dff; --yellow: #ffc21a; --green: #22c55e;
  --shadow: 0 6px 0 rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body { position: fixed; inset: 0; -webkit-touch-callout: none; }
body {
  font-family: 'Fredoka', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif; font-weight: 600;
  color: #fff; background: radial-gradient(circle at 50% 20%, #6a35e0, var(--bg) 45%, var(--bg2));
  -webkit-user-select: none; user-select: none;
}
.hidden { display: none !important; }

/* floating background shapes */
.shapes i { position: fixed; opacity: .13; background: #fff; animation: float 14s ease-in-out infinite alternate; }
.s1 { width: 34vmin; height: 34vmin; border-radius: 50%; left: -8vmin; top: -8vmin; }
.s2 { width: 30vmin; height: 30vmin; right: -6vmin; top: 12vh; transform: rotate(45deg); animation-delay: -4s !important; }
.s3 { width: 26vmin; height: 26vmin; left: 6vw; bottom: -8vmin; transform: rotate(12deg); animation-delay: -8s !important; }
.s4 { width: 0; height: 0; background: none !important; border-left: 18vmin solid transparent; border-right: 18vmin solid transparent; border-bottom: 30vmin solid #fff; right: 8vw; bottom: -6vmin; animation-delay: -2s !important; }
@keyframes float { to { translate: 0 -4vh; rotate: 8deg; } }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: max(20px, env(safe-area-inset-top)) 16px 20px; overflow-y: auto; }
#home { justify-content: safe center; }
.notes { width: min(360px, 100%); flex: none; background: rgba(0, 0, 0, .28); border-radius: 14px; padding: 10px 16px; font-weight: 500; }
.notes summary { cursor: pointer; font-weight: 600; font-size: 16px; }
.notes h4 { margin: 12px 0 4px; font-size: 15px; color: var(--yellow); }
.notes h4 small { color: #fff; opacity: .65; font-weight: 500; margin-left: 6px; }
.notes ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.4; }
.notes li + li { margin-top: 3px; }
.notes .nb { max-height: 40vh; overflow-y: auto; }
.notes.fold { width: 100%; }

.title { margin: 0 0 clamp(12px, 4vh, 40px); text-align: center; font-size: clamp(34px, 9vw, 76px); line-height: .95; font-weight: 700; text-shadow: 0 5px 0 rgba(0, 0, 0, .25); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.title span { display: block; color: var(--yellow); font-size: 1.25em; }
@keyframes pop { from { scale: .5; opacity: 0; } }

.panel { width: min(360px, 100%); background: #fff; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 0 rgba(0, 0, 0, .22); }
input { font: inherit; font-size: 20px; text-align: center; padding: 12px; border: 3px solid #d9d2ee; border-radius: 10px; color: var(--ink); width: 100%; min-width: 0; outline: none; -webkit-user-select: text; user-select: text; }
input:focus { border-color: var(--bg); }
#code { text-transform: uppercase; letter-spacing: .25em; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 0 0 auto; }
.or { color: #8a7fb0; text-align: center; font-size: 14px; }
#status { color: var(--red); text-align: center; min-height: 1.2em; font-size: 15px; }

.btn { font: inherit; font-size: 20px; color: #fff; border: 0; border-radius: 10px; padding: 12px 20px; cursor: pointer; box-shadow: var(--shadow); transition: transform .06s, box-shadow .06s, filter .1s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .28); }
.btn.green { background: var(--green); } .btn.blue { background: var(--blue); } .btn.red { background: var(--red); }
.btn.yellow { background: var(--yellow); color: var(--ink); }
.btn.small { font-size: 15px; padding: 9px 14px; }
.btn.big { font-size: 26px; padding: 14px 44px; }
.link { background: none; border: 0; color: #fff; opacity: .7; font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; }
.wait { font-size: 18px; opacity: .85; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

/* lobby: a title bar, then the hero you play on the left and the room (party, difficulty, start) on the right */
#lobby { padding-bottom: 28px; }
.lob { width: min(1000px, 100%); flex: none; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.lob > *, .lob .card { width: 100%; }
.lhead { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.ltitle { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 320px; }
.ltitle h2 { margin: 0; max-width: 34em; font-size: clamp(17px, 2.5vw, 24px); line-height: 1.15; text-wrap: balance; color: var(--yellow); text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.ltitle p { margin: 5px 0 0; font-size: 15px; font-weight: 500; opacity: .85; }
.soonpill { flex: none; border: 2px dashed rgba(255, 255, 255, .45); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; opacity: .8; }
.gicon { font-size: 46px; line-height: 1; animation: wobble 1.2s ease-in-out infinite alternate; }
@keyframes wobble { from { rotate: -10deg; } to { rotate: 10deg; } }
.codebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; color: var(--ink); border-radius: 14px; padding: 8px 12px 8px 18px; box-shadow: var(--shadow); }
.codebar small { display: block; font-size: 12px; opacity: .6; }
.codebar b { font-size: 32px; letter-spacing: .12em; line-height: 1; }
.lgrid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(250px, 30%, 320px); gap: 16px; align-items: start; }
.lside { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { background: rgba(0, 0, 0, .26); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lab { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; opacity: .75; }
.lab small { font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; text-align: right; }
.classes { display: flex; gap: 10px; }
.cls { flex: 1 1 0; min-width: 0; font: inherit; color: #fff; background: rgba(255, 255, 255, .08); border: 3px solid transparent; border-radius: 14px; padding: 12px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .1s, background .1s; }
.cls:hover { background: rgba(255, 255, 255, .14); }
.cls .ic { font-size: 36px; line-height: 1.1; } .cls b { font-size: 19px; } .cls small { font-size: 12.5px; font-weight: 500; line-height: 1.3; opacity: .9; }
.cls.on { background: #fff; color: var(--ink); border-color: var(--yellow); transform: translateY(-3px); box-shadow: var(--shadow); }
.plist { display: flex; flex-direction: column; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 10px; font-size: 17px; box-shadow: 0 4px 0 rgba(0, 0, 0, .28); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.chip.off { opacity: .4; }
.link.left { align-self: flex-start; font-size: 14px; padding: 0; }
.rename { display: flex; gap: 8px; }
.rename input { font-size: 16px; padding: 8px; }
.rename .btn { flex: none; }
.diffs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dif { min-width: 0; font: inherit; font-size: 17px; color: #fff; background: rgba(255, 255, 255, .08); border: 3px solid transparent; border-radius: 12px; padding: 8px 6px; cursor: pointer; }
.dif.on { background: #fff; color: var(--ink); border-color: var(--yellow); box-shadow: 0 4px 0 rgba(0, 0, 0, .28); }
.diffs.ro .dif { cursor: default; } .diffs.ro .dif:not(.on) { opacity: .4; }
.hint { font-size: 13.5px; font-weight: 500; line-height: 1.35; opacity: .9; }
#start { width: 100%; padding-left: 12px; padding-right: 12px; }
.lside .wait { text-align: center; }
.keys { margin: 4px 0 0; text-align: center; font-size: 13.5px; font-weight: 500; opacity: .75; }
.keys b { font-weight: 600; } .keys .tc, body.touch .keys .kb { display: none; } body.touch .keys .tc { display: inline; }
.fold { background: rgba(0, 0, 0, .26); border-radius: 14px; padding: 10px 16px; font-weight: 500; }
.fold summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
.fold ul { margin: 8px 0 4px; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.fold li + li { margin-top: 3px; }
.fold h4 { margin: 14px 0 4px; font-size: 15px; color: var(--yellow); }
.fold > p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 6px; }
.pc { background: rgba(255, 255, 255, .07); border-radius: 12px; padding: 10px 12px; }
.pc b { font-size: 16px; font-weight: 600; }
.pc p { margin: 7px 0 0; font-size: 13.5px; line-height: 1.35; } .pc i { font-style: normal; font-weight: 600; color: var(--yellow); }
.pc small { display: block; font-size: 12.5px; opacity: .7; }
.lob > .link { width: auto; }
/* narrow windows and phones: one column, with the start button riding along the bottom of the screen */
@media (max-width: 700px) {
  .lhead { justify-content: center; order: -2; } .codebar { order: -1; }
  .paths { grid-template-columns: minmax(0, 1fr); }
  .lgrid, .lside { display: contents; }
  #start { position: sticky; bottom: 10px; z-index: 2; width: calc(100% - 58px); align-self: flex-start; }
}
@media (max-width: 480px) {
  .classes { gap: 6px; } .cls { padding: 10px 4px; } .cls small { font-size: 11.5px; }
  .diffs { grid-template-columns: 1fr 1fr; }
}
body.playing .shapes { display: none; }

/* game */
#game { padding: 0; gap: 0; background: #14082e; touch-action: none; }
#stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
#cv { display: block; }
#touch, #rotate { display: none; }
/* Touch controls float over the map. #touch also carries the safe-area insets so the script can read them for the HUD. */
#touch { position: absolute; inset: 0; pointer-events: none; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
body.touch #touch { display: block; }
#dpad, .abtn { position: absolute; touch-action: none; pointer-events: auto; }
#dpad { left: max(22px, calc(env(safe-area-inset-left) + 10px)); bottom: max(18px, calc(env(safe-area-inset-bottom) + 8px)); width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 3px solid rgba(255, 255, 255, .28); }
#dpad span { position: absolute; font-size: 16px; opacity: .4; translate: -50% -50%; }
#dpad .u { left: 50%; top: 13%; } #dpad .d { left: 50%; top: 87%; } #dpad .l { left: 13%; top: 50%; } #dpad .r { left: 87%; top: 50%; }
#dpad span.on { opacity: 1; color: var(--yellow); }
#dpad .knob { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; background: rgba(255, 255, 255, .38); border: 3px solid rgba(255, 255, 255, .6); box-shadow: 0 4px 0 rgba(0, 0, 0, .25); pointer-events: none; }
#dpad.on .knob { background: rgba(255, 255, 255, .6); }
.abtn { width: 84px; height: 84px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 30px; line-height: 1; border: 3px solid rgba(255, 255, 255, .55); box-shadow: 0 5px 0 rgba(0, 0, 0, .3); opacity: .6; }
.abtn small { font-size: 11px; margin-top: 3px; }
.abtn.on { transform: translateY(4px) scale(.95); opacity: .95; box-shadow: none; }
.abtn.a { background: var(--red); right: max(18px, calc(env(safe-area-inset-right) + 8px)); bottom: max(74px, calc(env(safe-area-inset-bottom) + 64px)); }
.abtn.b { background: var(--blue); right: max(110px, calc(env(safe-area-inset-right) + 100px)); bottom: max(18px, calc(env(safe-area-inset-bottom) + 8px)); }
/* phones play in landscape: in portrait the game is covered until the phone is turned */
@media (orientation: portrait) {
  body.touch #rotate { display: flex; position: absolute; inset: 0; z-index: 30; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; font-size: 24px; background: rgba(20, 8, 46, .97); touch-action: none; }
  #rotate i { font-style: normal; font-size: 84px; line-height: 1; animation: turn 1.8s ease-in-out infinite; }
  #rotate small { font-size: 15px; font-weight: 500; opacity: .7; }
}
@keyframes turn { 0%, 25% { rotate: 0deg; } 60%, 100% { rotate: 90deg; } }

.overlay { position: absolute; inset: 0; background: rgba(28, 10, 80, .9); display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 14px; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; z-index: 5; }
.overlay h2 { margin: 0; font-size: clamp(26px, 6vw, 44px); text-shadow: 0 4px 0 rgba(0, 0, 0, .3); text-align: center; }
.overlay p { margin: 0; font-size: 18px; opacity: .85; }
.timer { width: min(520px, 90%); height: 10px; background: rgba(255, 255, 255, .2); border-radius: 5px; overflow: hidden; flex: none; }
.timer i { display: block; height: 100%; width: 100%; background: var(--yellow); transition: width 1s linear; }
/* skill tree: the class at the root, three branches growing out of it, each skill unlocking the next one along its branch */
.tree { --ln: rgba(255, 255, 255, .26); --lw: 4px; --st: 20px; display: flex; flex-direction: column; align-items: center; width: min(820px, 100%); max-width: 100%; flex: none; background: rgba(0, 0, 0, .25); border-radius: 16px; padding: 12px 8px 14px; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.troot { position: relative; flex: none; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; line-height: 1; background: var(--yellow); border: 4px solid #fff; box-shadow: var(--shadow); margin-bottom: var(--st); }
.troot::after { content: ''; position: absolute; left: 50%; top: calc(100% + 4px); width: var(--lw); height: var(--st); translate: -50% 0; background: #fff; opacity: .7; }
.tbr { display: flex; width: 100%; min-width: 420px; }
.branch { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: var(--st) 4px 4px; border-radius: 12px; }
.branch::before, .branch::after, .node::before { content: ''; position: absolute; background: var(--ln); }
.branch::before { top: 0; left: 0; right: 0; height: var(--lw); background: rgba(255, 255, 255, .7); }
.branch:first-child::before { left: 50%; border-radius: 4px 0 0 4px; } .branch:last-child::before { right: 50%; border-radius: 0 4px 4px 0; }
.branch::after { top: 0; left: 50%; width: var(--lw); height: var(--st); translate: -50% 0; background: rgba(255, 255, 255, .7); }
.branch h3 { position: relative; z-index: 1; margin: 0; padding: 3px 14px; border-radius: 20px; background: #2a1466; border: 3px solid rgba(255, 255, 255, .7); text-align: center; font-size: clamp(13px, 2.6vw, 17px); color: var(--yellow); white-space: nowrap; }
.branch.sel { background: rgba(255, 255, 255, .12); } .branch.sel h3 { border-color: var(--yellow); }
.node { position: relative; font: inherit; color: #fff; background: none; border: 0; width: 100%; padding: var(--st) 2px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: default; }
.node::before { top: 0; left: 50%; width: var(--lw); height: var(--st); translate: -50% 0; }
.node .ic { position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; line-height: 1; background: #3a2a6e; border: 4px solid rgba(255, 255, 255, .25); box-shadow: var(--shadow); }
.node .ic::after { position: absolute; right: -7px; top: -7px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.node .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.node b { font-size: clamp(12.5px, 2.4vw, 16px); line-height: 1.1; }
.node small { font-size: clamp(11px, 2vw, 13px); font-weight: 500; line-height: 1.2; opacity: .95; }
.node.owned::before { background: var(--green); }
.node.owned .ic { background: var(--green); border-color: #fff; }
.node.owned .ic::after { content: '✓'; background: #fff; color: #128a3c; font-weight: 700; }
.node.avail { cursor: pointer; }
.node.avail::before { background: repeating-linear-gradient(var(--yellow) 0 5px, transparent 5px 9px); }
.node.avail .ic { background: var(--blue); border-color: var(--yellow); animation: glow .9s ease-in-out infinite alternate; }
.node.avail b { color: var(--yellow); }
.node.avail:active .ic { transform: translateY(3px) scale(.95); }
.node.locked .ic { filter: grayscale(.8); box-shadow: none; }
.node.locked .ic::after { content: '🔒'; background: #1d0b4f; font-size: 11px; }
.node.locked .tx { opacity: .75; }
.tree.spent .node.avail { cursor: default; }
.tree.spent .node.avail::before { background: var(--ln); }
.tree.spent .node.avail .ic { background: #5b3fb0; border-color: rgba(255, 255, 255, .45); animation: none; }
.tree.spent .node.avail b { color: #fff; }
@keyframes glow { to { border-color: #fff; box-shadow: 0 0 0 5px rgba(255, 194, 26, .45), var(--shadow); } }
/* short, wide screens (phones on their side) */
@media (orientation: landscape) and (max-height: 560px) {
  .overlay { gap: 8px; }
  .overlay h2 { font-size: 22px; }
}
/* any screen wide enough, and every phone on its side: the tree grows left to right instead, five skills along each branch */
@media (min-width: 860px), (orientation: landscape) and (max-height: 560px) {
  .tree { --st: 16px; flex-direction: row; justify-content: safe center; width: min(1120px, 100%); padding: 8px 10px; }
  .troot { width: 50px; height: 50px; font-size: 25px; margin: 0 var(--st) 0 0; }
  .troot::after { left: calc(100% + 4px); top: 50%; width: var(--st); height: var(--lw); translate: 0 -50%; }
  .tbr { flex-direction: column; width: auto; flex: 1 1 0; min-width: 760px; }
  .branch { flex: none; flex-direction: row; padding: 5px 4px 5px var(--st); }
  .branch::before, .branch:first-child::before, .branch:last-child::before { left: 0; right: auto; top: 0; bottom: 0; width: var(--lw); height: auto; border-radius: 0; }
  .branch:first-child::before { top: 50%; } .branch:last-child::before { bottom: 50%; }
  .branch::after { left: 0; top: 50%; width: var(--st); height: var(--lw); translate: 0 -50%; }
  .branch h3 { flex: none; width: 92px; padding: 3px 4px; font-size: 13px; }
  .node { flex: 1 1 0; min-width: 0; flex-direction: row; text-align: left; gap: 7px; padding: 0 0 0 var(--st); }
  .node::before { left: 0; top: 50%; width: var(--st); height: var(--lw); translate: 0 -50%; }
  .node.avail::before { background: repeating-linear-gradient(90deg, var(--yellow) 0 5px, transparent 5px 9px); }
  .node .ic { width: 44px; height: 44px; font-size: 22px; border-width: 3px; }
  .node .ic::after { width: 18px; height: 18px; right: -6px; top: -6px; font-size: 10px; }
  .node b { font-size: 13px; } .node small { font-size: 11px; }
}
/* phones on their side: five skills have to fit across a narrow row, so each one stacks its icon above its text */
@media (orientation: landscape) and (max-height: 560px) {
  .tree { --st: 12px; padding: 6px 8px; }
  .tbr { min-width: 0; }
  .branch { align-items: flex-start; padding: 5px 2px 5px var(--st); }
  .branch:first-child::before { top: 24px; } .branch:last-child::before { bottom: calc(100% - 26px); }
  .branch::after { top: 22px; translate: 0 0; }
  .branch h3 { width: 64px; margin-top: 7px; padding: 2px; font-size: 11.5px; }
  .node { flex-direction: column; text-align: center; gap: 2px; }
  .node::before { top: 17px; translate: 0 0; width: calc(50% + var(--st) / 2); }
  .node .ic { width: 38px; height: 38px; font-size: 19px; }
  .node b { font-size: 11.5px; } .node small { font-size: 10px; line-height: 1.15; }
}
/* computers: the same left-to-right tree, as big as the window allows, with each skill's text under its icon */
@media (min-width: 860px) and (min-height: 561px) {
  .tree { --st: 22px; width: min(1400px, 100%); padding: 12px 16px; }
  .troot { width: 66px; height: 66px; font-size: 33px; }
  .tbr { min-width: 0; }
  .branch { align-items: flex-start; padding: 8px 4px 8px var(--st); }
  .branch:first-child::before { top: 36px; } .branch:last-child::before { bottom: calc(100% - 38px); }
  .branch::after { top: 34px; translate: 0 0; }
  .branch h3 { width: 112px; margin-top: 11px; padding: 4px; font-size: 16px; }
  .node { flex-direction: column; text-align: center; gap: 5px; }
  .node::before { top: 26px; translate: 0 0; width: calc(50% + var(--st) / 2); }
  .node .ic { width: 56px; height: 56px; font-size: 28px; border-width: 4px; }
  .node .ic::after { width: 22px; height: 22px; right: -7px; top: -7px; font-size: 12px; }
  .node b { font-size: clamp(14px, 1.3vw, 18px); } .node small { font-size: clamp(12px, 1.05vw, 14.5px); line-height: 1.25; }
}
.board { display: flex; flex-direction: column; gap: 6px; width: min(460px, 100%); flex: none; }
.brow { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 8px; font-size: 16px; }
.brow .nm { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .cs { flex: 1; font-size: 13px; overflow: hidden; white-space: nowrap; text-align: right; }
.brow .sc { flex: none; min-width: 48px; text-align: right; font-weight: 700; }
.brow .dt { flex: none; text-align: right; font-size: 12px; opacity: .85; white-space: nowrap; }
.board .legend { font-size: 12px; opacity: .75; text-align: center; padding-top: 4px; }
.board.tall .brow .dt { font-size: 13px; }
.board.tall .brow { font-size: 20px; padding: 10px 14px; flex-wrap: wrap; row-gap: 6px; }
.board.tall { width: min(560px, 100%); }
.brow .aw { flex: 0 0 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.brow .aw i { font-style: normal; font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: rgba(0, 0, 0, .28); color: #fff; white-space: nowrap; }
.brow .aw small { font-weight: 500; opacity: .8; }
.board.tall .brow:first-child { scale: 1.06; outline: 3px solid var(--yellow); margin-bottom: 4px; }

.mus { position: fixed; right: 10px; bottom: 10px; z-index: 15; width: 42px; height: 42px; border: 0; border-radius: 50%; font-size: 20px; line-height: 1; background: rgba(0, 0, 0, .35); color: #fff; cursor: pointer; }
.mus.off { opacity: .6; }
.mus { padding: 0; touch-action: manipulation; }
/* in a run the sound button shrinks and sits next to the pause button, out of the way of the touch controls */
body.playing .mus { top: calc(6px + env(safe-area-inset-top)); right: calc(48px + env(safe-area-inset-right)); bottom: auto; width: 34px; height: 34px; font-size: 16px; background: rgba(0, 0, 0, .45); }
.snd { position: fixed; right: 10px; bottom: 60px; z-index: 16; width: min(270px, calc(100vw - 20px)); display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 16px; background: rgba(20, 8, 46, .95); box-shadow: var(--shadow); font-size: 15px; }
body.playing .snd { top: calc(46px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); bottom: auto; }
.snd label { display: flex; align-items: center; gap: 8px; }
.snd span { flex: none; width: 84px; white-space: nowrap; }
.snd input { flex: 1; min-width: 0; height: 28px; margin: 0; accent-color: var(--yellow); cursor: pointer; touch-action: pan-y; }
.snd b { flex: none; width: 40px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.snd small { opacity: .65; font-size: 12px; font-weight: 500; }
body.touch .snd small { display: none; }
.pbtn { position: absolute; top: calc(6px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); z-index: 6; width: 34px; height: 34px; border: 0; border-radius: 50%; font-size: 16px; line-height: 1; padding: 0; background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer; touch-action: manipulation; }
.overlay.see { background: rgba(20, 8, 46, .72); z-index: 7; }
#toast { position: fixed; left: 50%; top: 14px; translate: -50% 0; background: #fff; color: var(--ink); padding: 8px 18px; border-radius: 30px; box-shadow: var(--shadow); z-index: 20; font-size: 15px; }
