/* Step-Up Fortune: night sky, purple stage, gold and teal neon. No web fonts needed, except Anton for the board and logo. */
@font-face { font-family: "SFAnton"; src: url(/fonts/Anton.woff2) format("woff2"); font-display: swap; }
:root {
  --night: #07031c;
  --navy: #120a44;
  --royal: #2a1b8a;
  --gold: #f6b40e;
  --gold-hi: #ffd95a;
  --gold-lo: #a86a00;
  --teal: #19e3ff;
  --red: #e8263a;
  --s0: #ff4255;
  --s1: #ffd21a;
  --s2: #3b8bff;
  --paper: #fff7dc;
  --ink: #0d0733;
  --ok: #49e39a;
  --mute: #b2a8e8;
  --show: "SFAnton", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", Impact, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--text); color: #fff; background: var(--night); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
/* the moving background, like playstepup.com: rays one way, a swirl of color the other */
body::before { content: ""; position: fixed; left: 50%; top: 42%; width: 240vmax; height: 240vmax; margin: -120vmax 0 0 -120vmax; border-radius: 50%; z-index: -2;
  background: radial-gradient(circle at 50% 50%, rgba(138, 61, 255, .5), transparent 30%), repeating-conic-gradient(from 0deg at 50% 50%, #1c0f5c 0deg 6deg, #130a45 6deg 12deg);
  animation: bgspin 90s linear infinite; }
body::after { content: ""; position: fixed; left: 50%; top: 42%; width: 120vmax; height: 120vmax; margin: -60vmax 0 0 -60vmax; border-radius: 50%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, rgba(255, 200, 61, .32), rgba(27, 59, 214, 0) 22%, rgba(25, 227, 255, .28) 45%, rgba(27, 59, 214, 0) 63%, rgba(232, 52, 160, .26) 80%, rgba(255, 200, 61, .32));
  filter: blur(70px); mix-blend-mode: screen; animation: bgspin 26s linear infinite reverse, bgbreathe 11s ease-in-out infinite alternate; }
@keyframes bgspin { to { transform: rotate(360deg); } }
@keyframes bgbreathe { from { scale: .85; } to { scale: 1.15; } }
body.display::after { display: none; }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } }
@keyframes pulse { to { filter: brightness(1.35); } }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; }
a { color: var(--gold-hi); }
.show { font-family: var(--show); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; letter-spacing: .02em; }
.hide { display: none !important; }

/* ---------- phone pages (home, host, buzzer, settings) ---------- */
.page { max-width: 560px; margin: 0 auto; padding: 16px 16px 96px; }
.page.wide { max-width: 980px; }
.brand { font-family: var(--show); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; color: var(--gold); font-size: 30px; line-height: 1; margin: 8px 0 2px; text-shadow: 0 2px 0 #7a3d00; }
.sub { color: var(--mute); font-size: 14px; margin: 0 0 16px; }
.card { background: rgba(18, 10, 64, .9); border: 1px solid #4a3aa8; border-radius: 14px; padding: 16px; margin: 0 0 14px; }
.card h2 { font-family: var(--show); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; font-size: 22px; margin: 0 0 8px; color: #fff; }
.card h3 { font-size: 13px; font-weight: 600; color: var(--mute); margin: 16px 0 6px; }
.card p { margin: 0 0 10px; line-height: 1.45; color: #dbe3ff; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 17px; text-decoration: none; text-align: center; background: #2a1f78; color: #fff; border: 1px solid #5b48c8; }
.btn.gold { background: linear-gradient(#ffd24a, #f2a900); color: var(--ink); border-color: #ffe48a; box-shadow: 0 4px 0 #8a5400; }
.btn.red { background: var(--red); border-color: #ff7a80; box-shadow: 0 4px 0 #7d0e13; }
.btn.t1 { border-color: var(--t1); color: var(--t1); background: rgba(86, 211, 255, .1); }
.btn.t2 { border-color: var(--t2); color: var(--t2); background: rgba(255, 147, 180, .1); }
.btn.on { box-shadow: 0 0 0 3px var(--gold-hi); background: rgba(255, 217, 90, .22); }
.btn.small { min-height: 40px; font-size: 14px; padding: 6px 10px; width: auto; }
.btn.ghost { background: transparent; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.field { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid #5b48c8; background: #0b0630; color: #fff; font-size: 16px; }
textarea.field { min-height: 92px; resize: vertical; line-height: 1.4; }
.note { font-size: 13px; color: var(--mute); line-height: 1.4; }
.err { color: #ffb3b6; font-weight: 600; min-height: 1.3em; font-size: 14px; }

/* home */
.choices { display: grid; gap: 14px; }
@media (min-width: 760px) { .choices { grid-template-columns: 1fr 1fr; } }
.qr { background: #fff; padding: 10px; border-radius: 10px; width: 164px; height: 164px; flex: none; }
.qr svg, .qr img { width: 100%; height: 100%; display: block; }
.addr { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; color: var(--gold-hi); word-break: break-all; }

/* host: top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(10, 6, 38, .96); border-bottom: 1px solid #3a2c96; }
.topbar .where { font-family: var(--show); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; color: var(--gold); font-size: 17px; line-height: 1.05; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .where small { display: block; font-family: var(--text); font-weight: 500; text-transform: none; font-size: 11px; color: var(--ok); letter-spacing: 0; }
.topbar .where small.off { color: #ffb3b6; }
.bigcode { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--gold-hi); font-size: 1.3em; letter-spacing: 2px; }
.lobby .join .code { font-family: var(--show); font-weight: 400; letter-spacing: .03em; color: #fff; font-size: calc(var(--u) * 4.6); letter-spacing: calc(var(--u) * .3); line-height: 1.05; text-shadow: 0 0 calc(var(--u) * 1.4) rgba(255, 200, 60, .55); }
body.has-set .lobby .join .code { font-size: calc(var(--u) * 3.4); }
.chip { min-height: 40px; padding: 6px 9px; border-radius: 10px; border: 1px solid #5b48c8; background: #21166a; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.chip.on { background: var(--gold); color: var(--ink); border-color: var(--gold-hi); }
.dots { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.dot { font-size: 12px; padding: 4px 8px; border-radius: 99px; background: #21166a; border: 1px solid #4a3aa8; color: var(--mute); }
.dot.on { color: #06241a; background: var(--ok); border-color: var(--ok); font-weight: 700; }
.dot.warn { color: #3b1d00; background: var(--gold-hi); border-color: var(--gold-hi); font-weight: 700; }

/* host: script card */
.say { background: var(--paper); color: #231a02; border-radius: 16px; padding: 14px 16px 16px; margin: 0 0 14px; border-bottom: 6px solid var(--gold-lo); }
.say .tag { font-size: 12px; font-weight: 800; color: #9a5b00; margin: 0 0 6px; }
.say .line { font-size: 21px; line-height: 1.3; font-weight: 600; margin: 0; }
.say .then { font-size: 14px; line-height: 1.4; color: #5b4a1c; margin: 10px 0 0; font-style: italic; }
.say .teach { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #ffe9a6; font-size: 15px; line-height: 1.4; }
.say .teach b { display: block; font-size: 12px; color: #9a5b00; margin-bottom: 2px; }

.wherecard { margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: rgba(30, 20, 100, .9); border: 1px solid #5b48c8; }
.wherecard b { font-family: var(--show); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; font-size: 18px; color: var(--gold-hi); }
.wherecard p { margin: 4px 0 0; font-size: 15px; line-height: 1.4; color: #e3e9ff; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs span { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #170e52; color: #9d90d8; border: 1px solid #4a3aa8; }
.crumbs span.past { color: #bcd0ff; }
.crumbs span.cur { background: var(--gold); color: var(--ink); border-color: var(--gold-hi); }
.say { margin-bottom: 10px; }
.todo { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: #0d0733; border: 2px solid var(--ok); }
.todo .tag { font-size: 12px; font-weight: 800; color: var(--ok); margin: 0 0 6px; }
.todo ol { margin: 0; padding-left: 22px; }
.todo li, .todo .one { font-size: 17px; line-height: 1.35; font-weight: 600; margin: 0 0 4px; color: #fff; }
.ctl.ask { border-color: var(--gold); }
.ctl.ask > .lbl { font-size: 18px; color: #fff; margin-bottom: 6px; }
.checklist .stepline { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid #33267f; }
.checklist .stepline:first-of-type { border-top: 0; }
.checklist .stepline b { font-size: 17px; }
.checklist .stepline p { margin: 4px 0 0; font-size: 14px; }
.tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #5b48c8; display: grid; place-items: center; font-weight: 900; color: #06241a; margin-top: 1px; }
.tick.ok { background: var(--ok); border-color: var(--ok); }
.howto ol { margin: 0 0 10px; padding-left: 20px; }
.howto li { margin-bottom: 8px; line-height: 1.4; color: #e3e9ff; }

/* host: clock strip */
.clock { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: #0b0630; border: 2px solid var(--gold); margin: 0 0 14px; }
.clock .secs { font-family: var(--show); font-weight: 400; letter-spacing: .03em; font-size: 44px; line-height: 1; color: var(--gold-hi); min-width: 1.6em; text-align: center; font-variant-numeric: tabular-nums; }
.clock .what { flex: 1; font-weight: 700; }
.clock .what small { display: block; font-weight: 500; color: var(--mute); font-size: 12px; }
.clock.low { border-color: var(--red); }
.clock.low .secs { color: #ff8a8f; }
.clock.up { background: var(--red); border-color: #fff; animation: pulse .5s 4 alternate; }
.clock.up .secs { color: #fff; font-size: 30px; min-width: 0; }
@keyframes pulse { to { filter: brightness(1.35); } }

.ctl { border: 1px solid #4a3aa8; border-radius: 14px; padding: 12px; margin: 0 0 14px; background: rgba(14, 8, 52, .92); }
.ctl > .lbl { font-size: 12px; font-weight: 700; color: var(--gold); margin: 0 0 8px; }
.btn.big { min-height: 64px; font-size: 20px; }
a.btn.big { flex-direction: column; gap: 2px; padding: 12px 14px; }
a.btn.big small { font-size: 13px; font-weight: 500; opacity: .85; }
details.fold { border: 1px solid #4a3aa8; border-radius: 14px; background: rgba(14, 8, 52, .92); margin: 0 0 14px; }
details.fold > summary { padding: 12px 14px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "+"; font-size: 22px; color: var(--gold); line-height: 1; }
details.fold[open] > summary::after { content: "\2212"; }
details.fold > .in { padding: 0 14px 14px; }
.preview { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #000; }
.preview iframe { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; border: 0; transform-origin: 0 0; pointer-events: none; }
.played { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.played label { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 15px; }
.played input { width: 22px; height: 22px; accent-color: var(--gold); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #33267f; }
.switch:first-of-type { border-top: 0; }
.switch input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--gold); flex: none; }
.switch input[type=number] { width: 64px; min-height: 40px; text-align: center; }
.toast { position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 50; padding: 12px 14px; border-radius: 12px; background: var(--red); color: #fff; font-weight: 700; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.homelogo { display: block; width: min(100%, 420px); height: auto; margin: 0 auto 6px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); }

/* ---------- launch intro ---------- */
.sfintro { position: fixed; inset: 0; z-index: 200; background: #000; display: grid; place-items: center; overflow: hidden; transition: opacity .45s; cursor: pointer; }
.sfintro.out { opacity: 0; }
.sfintro video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; transition: opacity .5s; }
.sfintro.logo video { opacity: 0; }
.sfintro-logo { position: relative; display: none; flex-direction: column; align-items: center; gap: 2vh; text-align: center; padding: 4vw; }
.sfintro.logo .sfintro-logo { display: flex; }
.sfintro-logo img, .sfintro-logo canvas { width: min(72vw, 110vh); height: auto; animation: logoin 1.5s cubic-bezier(.2, 1.3, .3, 1) both; filter: drop-shadow(0 0 4vh rgba(255, 190, 60, .55)); }
.sfintro-pre, .sfintro-post { margin: 0; font-family: var(--show); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; letter-spacing: .28em; color: var(--gold-hi); font-size: max(14px, 2.2vh); animation: fadeup 1s .2s both; }
.sfintro-post { color: #dbe3ff; animation-delay: 1.3s; }
.sfintro-skip { position: absolute; right: 3vw; bottom: 4vh; padding: 10px 18px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .5); color: #fff; background: rgba(0, 0, 0, .5); font-weight: 700; font-size: 14px; }
@keyframes logoin { from { transform: scale(.55) rotate(-3deg); opacity: 0; filter: blur(12px) brightness(2.2); } 60% { filter: blur(0) brightness(1.5) drop-shadow(0 0 6vh rgba(255, 220, 120, .9)); } }
@keyframes fadeup { from { opacity: 0; transform: translateY(1.5vh); } }
@media (prefers-reduced-motion: reduce) { .sfintro-logo img, .sfintro-pre, .sfintro-post { animation: none; } }

/* ---------- main menu, scores, credits ---------- */
.menuhead { font-family: var(--show); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; font-size: 22px; margin: 18px 0 10px; color: var(--gold-hi); text-align: center; }
.modes { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 860px) { .modes { grid-template-columns: repeat(3, 1fr); } }
.card.mode { margin: 0; display: flex; flex-direction: column; }
.card.mode .who { font-size: 13px; font-weight: 700; color: var(--gold-hi); margin: -4px 0 8px; }
.card.mode .stack { margin-top: auto; }
.card.mode .note { margin: 10px 0 0; }
.tablewrap { overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.cmp th, .cmp td { text-align: left; padding: 8px 10px; border-top: 1px solid #33267f; vertical-align: top; }
.cmp thead th { border-top: 0; color: var(--gold-hi); font-size: 13px; }
.cmp tbody th { color: var(--mute); font-weight: 600; white-space: nowrap; }
.boards { display: grid; gap: 14px; }
@media (min-width: 760px) { .boards { grid-template-columns: repeat(3, 1fr); } }
.board3 h3 { margin: 0 0 6px; font-size: 14px; color: var(--gold-hi); }
.board3 ol { margin: 0; padding: 0; list-style: none; counter-reset: place; }
.board3 li { counter-increment: place; display: grid; grid-template-columns: 26px auto 1fr; column-gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid #33267f; }
.board3 li::before { content: counter(place); font-family: var(--show); font-weight: 400; letter-spacing: .03em; color: var(--gold); font-size: 18px; }
.board3 li b { font-family: var(--show); font-size: 20px; }
.board3 li small { grid-column: 2 / -1; color: var(--mute); font-size: 12px; }
.credits .credit { text-align: center; }
.credit .role { font-size: 13px; font-weight: 700; color: var(--gold-hi); margin: 0 0 6px; }
.credit .name { font-family: var(--show); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; font-size: 30px; line-height: 1.05; margin: 6px 0 0; color: #fff; }
.credit .what { margin: 2px 0 0; color: #dbe3ff; }
.creditvideo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 10px; }

/* ---------- solo ---------- */
.solomsg { min-height: 2.8em; margin: 0 0 10px; font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--gold-hi); }
.soloclock { height: 10px; border-radius: 99px; background: #170e52; overflow: hidden; }
.soloclock > div { height: 100%; width: 100%; background: var(--gold); border-radius: 99px; }
.soloclock.low > div { background: var(--red); }
.howsolo { margin: 0; padding-left: 20px; color: #e3e9ff; line-height: 1.45; }
.howsolo li { margin-bottom: 4px; }
.newhigh { font-family: var(--show); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; font-size: 22px; color: var(--gold-hi); margin: 0; }
div.ans { cursor: default; }
div.ans.late { background: linear-gradient(#dfe6ff, #b4c2f4); }
div.ans small { font-family: var(--text); text-transform: none; font-size: 11px; font-weight: 600; opacity: .7; }
.modepick { display: grid; gap: 8px; }
.modepick button { text-align: left; padding: 10px 12px; border-radius: 12px; border: 2px solid #5b48c8; background: #21166a; color: #fff; }
.modepick button b { display: block; font-size: 16px; }
.modepick button span { font-size: 13px; color: #c9d4ff; }
.modepick button.on { border-color: var(--gold-hi); background: rgba(255, 217, 90, .16); }
.cpucard { margin: 0 0 14px; padding: 14px; border-radius: 14px; background: #0d0733; border: 2px dashed var(--t2); text-align: center; font-weight: 700; font-size: 17px; }
.cpucard small { display: block; font-weight: 500; color: var(--mute); font-size: 13px; margin-top: 4px; }

/* difficulty picker: Rookie to GOAT */
.levels{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-top:6px}
.levels .lvl{font:inherit;color:inherit;background:rgba(255,255,255,.06);border:2px solid rgba(255,255,255,.14);border-radius:12px;padding:10px 4px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:2px;min-height:58px}
.levels .lvl b{font-size:15px;letter-spacing:.02em}
.levels .lvl small{font-size:11px;opacity:.7;text-align:center;line-height:1.2}
.levels .lvl.on{background:var(--gold,#f5c518);border-color:var(--gold,#f5c518);color:#0a1a3f}
.levels .lvl.on small{opacity:.85}
.levels .lvl:focus-visible{outline:3px solid #fff;outline-offset:2px}
@media (max-width:420px){.levels{grid-template-columns:repeat(3,1fr)}}

/* ---------- credits page ---------- */
.creditroll { text-align: center; padding: 28px 18px 30px; }
.crtitle { font-family: var(--show); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: clamp(30px, 7vw, 46px); line-height: 1; margin: 0 0 8px; color: var(--gold-hi); text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.crsec { margin-top: 26px; }
.crrule { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); }
.crrule::before, .crrule::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, rgba(246,180,14,.75)); }
.crrule::after { background: linear-gradient(90deg, rgba(246,180,14,.75), transparent); }
.crrule span { white-space: normal; max-width: 75%; }
.page.credits > .crrule { margin: 26px 0 10px; font-size: 15px; }
.crname { font-family: var(--show); font-weight: 400; letter-spacing: .03em; text-transform: uppercase; font-size: clamp(24px, 6vw, 34px); line-height: 1.05; margin: 0; color: #fff; letter-spacing: .02em; }
.crsub { margin: 6px 0 0; color: #dbe3ff; font-size: 16px; }
.crsub.dim { margin-top: 2px; color: #aebbe6; font-size: 14px; }
.crsite { margin: 4px 0 0; color: var(--gold-hi); font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.crgap { height: 16px; }
.crsec:last-child .crsub { max-width: 30em; margin-left: auto; margin-right: auto; font-style: italic; line-height: 1.45; }
.fold.legal .in { font-size: 15px; line-height: 1.6; color: #dbe3ff; }
.fold.legal .in h3 { color: var(--gold-hi); font-size: 15px; margin: 20px 0 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.14); }
.fold.legal .in p { margin: 0 0 10px; }
.fold.legal .in ul { margin: 0 0 12px; padding-left: 20px; }
.fold.legal .in li { margin: 0 0 6px; }
.fold.legal .in li b { color: #fff; }
.fold.legal .updated { font-size: 13px; color: #aebbe6; font-style: italic; }

/* tutorial coach */
.coach { display: flex; gap: 10px; align-items: flex-start; background: rgba(246,180,14,.12); border: 2px solid rgba(246,180,14,.55); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; }
.coach p { margin: 0; line-height: 1.45; }
.coachtag { flex: none; background: var(--gold); color: #0a1a3f; font-weight: 900; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 4px 10px; margin-top: 1px; }

/* main menu: tutorial bar and score tabs */
.learnbar { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; background: rgba(246,180,14,.12); border: 2px solid rgba(246,180,14,.55); border-radius: 14px; padding: 12px 16px; margin: 0 0 14px; }
.learnbar:hover { background: rgba(246,180,14,.2); }
.learnbar .go { margin-left: auto; font-size: 22px; color: var(--gold-hi); }
.scoretabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.boards.one { grid-template-columns: 1fr !important; }
@media (min-width: 760px) { .boards.one ol { columns: 2; column-gap: 28px; } .boards.one li { break-inside: avoid; } }

/* settings: add questions */
.steps3 { margin: 0 0 12px; padding-left: 20px; line-height: 1.5; }
.steps3 a { color: var(--gold-hi); font-weight: 700; }
.qpreview { margin-top: 14px; display: grid; gap: 10px; }
.qpreview h3 { margin: 0; }
.qproblems { background: rgba(220,60,60,.14); border: 1px solid rgba(220,60,60,.5); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.qproblems ul { margin: 4px 0 0; padding-left: 18px; }
.qitem { border: 1px solid #4a3aa8; border-radius: 10px; padding: 10px 12px; }
.qitem .qq { margin: 0 0 6px; font-weight: 700; }
.qitem .qq small { display: block; font-weight: 400; color: var(--mute); font-size: 12px; }
.qitem ol { margin: 0; padding-left: 20px; font-size: 14px; }
.qitem li span { display: inline; }
.qitem li b { float: right; color: var(--gold-hi); }
.qitem li small { color: var(--mute); }
.qrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid #33267f; }
.qrow p { margin: 0; }
.qrow small { color: var(--mute); font-size: 12px; }
.page.credits { max-width: 760px; }
.page.credits .homelogo { max-width: 360px; display: block; margin: 0 auto; }
.creditroll { padding: 34px 28px 36px; }
@media (min-width: 600px) { .crrule span { white-space: nowrap; max-width: none; } .crrule { font-size: 14px; } }

/* the way back to every game, and the developer credit at the foot of the menu pages */
.allgames { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .18); color: #e6ecff; font-size: 14px; font-weight: 700; text-decoration: none; }
.allgames:hover { border-color: var(--gold-hi); color: #fff; }
.devfoot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 34px 0 6px; }
.devfoot a { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; color: rgba(230, 236, 255, .6); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; opacity: .75; transition: opacity .2s; }
.devfoot a:hover, .devfoot a:focus-visible { opacity: 1; }
.devfoot img { width: 74px; height: auto; }
.devfoot .sitelink { letter-spacing: .04em; text-transform: none; font-size: 13px; }
.menumusic { position: fixed; right: 14px; bottom: 14px; z-index: 30; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(2, 8, 40, .82); border: 1px solid rgba(255, 217, 90, .55); color: #fff; font-size: 13px; font-weight: 700; }
.menumusic span { color: var(--gold-hi); font-size: 16px; line-height: 1; }
.menumusic.off { border-color: rgba(255, 255, 255, .25); color: #c9d2f5; }
.menumusic.off span { color: #9aa6d6; }

.howrun h2 { margin-top: 0; }
.runsteps { margin: 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.45; }


/* ======================= Step-Up Fortune ======================= */
.homelogo { display: block; width: min(100%, 520px); height: auto; margin: 0 auto 6px; aspect-ratio: 1100 / 500; }
canvas.sflogo { display: block; width: min(100%, 560px); margin: 0 auto 4px; aspect-ratio: 1100 / 500; }
.btn.s0 { border-color: var(--s0); color: #fff; background: linear-gradient(#ff5468, #b3122a); }
.btn.s1 { border-color: var(--s1); color: #2a1d00; background: linear-gradient(#ffe25a, #e0a800); }
.btn.s2 { border-color: var(--s2); color: #fff; background: linear-gradient(#4f9bff, #1748b8); }
.btn.teal { background: linear-gradient(#5ff0ff, #0ab3cc); color: #022c33; border-color: #b8fbff; box-shadow: 0 4px 0 #04606e; }
.dot.s0 { border-color: var(--s0); } .dot.s1 { border-color: var(--s1); } .dot.s2 { border-color: var(--s2); }

/* ---------- the three contestant plates (big screen, solo, phones) ---------- */
.plates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plate { position: relative; border-radius: 12px; padding: 8px 10px 9px; text-align: center; color: #fff; border: 2px solid rgba(255,255,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 18px rgba(0,0,0,.45); transition: transform .3s, box-shadow .3s, opacity .3s; overflow: hidden; }
.plate::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 45%); pointer-events: none; }
.plate.s0 { background: linear-gradient(#ff4d61, #a5102a); }
.plate.s1 { background: linear-gradient(#ffd93d, #d29a00); color: #2a1d00; }
.plate.s2 { background: linear-gradient(#4a96ff, #133fa8); }
.plate .nm { font-family: var(--show); font-size: 17px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate .bk { font-family: var(--show); font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.plate .tt { font-size: 12px; font-weight: 700; opacity: .9; }
.plate.empty { opacity: .35; }
.plate.live { transform: translateY(-4px) scale(1.04); box-shadow: 0 0 0 3px #fff, 0 0 26px rgba(255,255,255,.8); }
.plate.live::before { content: "\25BC"; position: absolute; top: -2px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #fff; text-shadow: 0 0 6px #000; }
.plate.locked { opacity: .45; filter: grayscale(.5); }
.plate.off .nm::after { content: " (offline)"; font-family: var(--text); font-size: 10px; text-transform: none; }

/* ---------- the board, drawn with tiles when there is no 3D (and on phones) ---------- */
.fboard { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; padding: 8px; border-radius: 12px; background: #050a1c; border: 3px solid var(--teal); box-shadow: 0 0 0 3px var(--gold-lo), 0 0 22px rgba(25,227,255,.45); }
.fboard i { display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: 3px; font-style: normal; font-weight: 900; font-family: "Helvetica Neue", Arial, sans-serif; color: #0b0b12; font-size: clamp(10px, 3.6vw, 26px); }
.fboard i.x { visibility: hidden; }
.fboard i.g { background: radial-gradient(#1fb35a, #0a6b30); }
.fboard i.w { background: linear-gradient(#fff, #dfe3ea); }
.fboard i.l { background: linear-gradient(#fff, #e4e7ee); animation: tileturn .6s both; }
.fboard i.b { background: linear-gradient(#9fe6ff, #1c7cff); box-shadow: 0 0 10px #4fc8ff; }
@keyframes tileturn { from { transform: rotateY(90deg); background: linear-gradient(#9fe6ff, #1c7cff); } }
.catplate { display: inline-block; padding: 6px 22px; border-radius: 10px; background: linear-gradient(#2a1d8f, #12094f); border: 2px solid var(--gold); font-family: var(--show); letter-spacing: .12em; text-transform: uppercase; color: #fff; box-shadow: 0 0 16px rgba(246,180,14,.35); }

/* ---------- big screen ---------- */
body.display { overflow: hidden; --u: min(1vw, 1.7778vh); cursor: default; }
#setwrap { position: fixed; inset: 0; z-index: 0; display: none; background: #06031a; }
#setwrap canvas { width: 100%; height: 100%; display: block; }
body.has-set #setwrap { display: block; }
body.has-set::before { display: none; }
.dstage { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.dstage > * { pointer-events: auto; }
.d-top { position: absolute; left: calc(var(--u) * 2); right: calc(var(--u) * 2); top: calc(var(--u) * 1.4); display: flex; justify-content: space-between; align-items: flex-start; gap: calc(var(--u) * 2); }
.d-brand { display: flex; align-items: center; gap: calc(var(--u) * 1); }
.d-brand canvas { width: calc(var(--u) * 15); aspect-ratio: 1100 / 500; }
.d-brand small { display: block; font-size: calc(var(--u) * 1.1); letter-spacing: .2em; text-transform: uppercase; color: #d9d2ff; text-shadow: 0 2px 6px #000; }
.d-seg { text-align: right; font-family: var(--show); text-transform: uppercase; letter-spacing: .05em; font-size: calc(var(--u) * 2.3); color: var(--gold-hi); text-shadow: 0 2px 0 #5a2d00, 0 0 18px rgba(0,0,0,.8); line-height: 1; }
.d-seg small { display: block; font-family: var(--text); font-weight: 700; font-size: calc(var(--u) * 1.15); letter-spacing: .14em; color: #fff; margin-top: calc(var(--u) * .5); text-shadow: 0 2px 6px #000; }
.d-used { position: absolute; left: 50%; top: calc(var(--u) * 1.4); transform: translateX(-50%); display: flex; gap: calc(var(--u) * .25); padding: calc(var(--u) * .4) calc(var(--u) * .7); border-radius: calc(var(--u) * .8); background: rgba(6, 3, 26, .78); border: 1px solid rgba(25,227,255,.5); }
.d-used b { width: calc(var(--u) * 1.75); text-align: center; font-family: var(--show); font-weight: 400; font-size: calc(var(--u) * 1.45); line-height: 1.3; color: #fff; border-radius: 4px; }
.d-used b.v { color: #7ff2ff; }
.d-used b.used { color: rgba(255,255,255,.18); text-decoration: line-through; }
.d-used b.hit { color: var(--gold-hi); text-decoration: none; }
.d-board { position: absolute; left: 50%; top: calc(var(--u) * 7); transform: translateX(-50%); width: min(92vw, calc(var(--u) * 92)); display: none; }
body:not(.has-set) .d-board { display: block; }
.d-cat { position: absolute; left: 50%; top: 69vh; transform: translateX(-50%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * .6); }
.d-cat .catplate { font-size: calc(var(--u) * 2.3); padding: calc(var(--u) * .5) calc(var(--u) * 3); }
.d-call { font-family: var(--show); text-transform: uppercase; letter-spacing: .05em; font-size: calc(var(--u) * 2.1); padding: calc(var(--u) * .3) calc(var(--u) * 2); border-radius: 99px; background: rgba(6,3,26,.82); color: #fff; min-height: 1em; }
.d-call:empty { display: none; }
.d-call.hit { color: var(--gold-hi); } .d-call.miss { color: #ff9aa6; }
body:not(.has-set) .d-cat { top: auto; bottom: calc(var(--u) * 15); }
.d-plates { position: absolute; left: 50%; bottom: calc(var(--u) * 1.6); transform: translateX(-50%); width: min(94vw, calc(var(--u) * 80)); gap: calc(var(--u) * 1.6); }
.d-plates .plate { border-radius: calc(var(--u) * 1.1); padding: calc(var(--u) * .6) calc(var(--u) * 1) calc(var(--u) * .7); border-width: calc(var(--u) * .2); }
.d-plates .plate .nm { font-size: calc(var(--u) * 1.8); }
.d-plates .plate .bk { font-size: calc(var(--u) * 4.2); }
.d-plates .plate .tt { font-size: calc(var(--u) * 1.15); }
.d-plates .plate.live::before { font-size: calc(var(--u) * 1.4); }
.d-timer { position: absolute; right: calc(var(--u) * 2); top: calc(var(--u) * 6.5); width: calc(var(--u) * 7.5); height: calc(var(--u) * 7.5); display: none; place-items: center; }
.d-timer.on { display: grid; }
.d-timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.d-timer circle { fill: rgba(6,3,26,.85); stroke: rgba(255,255,255,.15); stroke-width: 8; }
.d-timer circle.arc { fill: none; stroke: var(--gold-hi); stroke-linecap: round; }
.d-timer b { position: relative; font-family: var(--show); font-weight: 400; font-size: calc(var(--u) * 3.6); color: #fff; font-variant-numeric: tabular-nums; }
.d-timer.low circle.arc { stroke: var(--red); }
.d-banner { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.2); opacity: 0; pointer-events: none; text-align: center; font-family: var(--show); font-weight: 400; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; font-size: calc(var(--u) * 9); line-height: 1; padding: calc(var(--u) * 1) calc(var(--u) * 4); border-radius: calc(var(--u) * 1.6); transition: transform .35s cubic-bezier(.2, 1.6, .4, 1), opacity .25s; z-index: 5; }
.d-banner.on { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.d-banner small { display: block; font-size: .32em; letter-spacing: .2em; margin-top: .3em; font-family: var(--text); font-weight: 800; }
.d-banner.value { color: #fff; background: linear-gradient(#2a1d8f, #12094f); border: calc(var(--u) * .3) solid var(--gold); box-shadow: 0 0 calc(var(--u) * 5) rgba(246,180,14,.6); }
.d-banner.bankrupt { color: #fff; background: #0b0b0f; border: calc(var(--u) * .3) solid #fff; box-shadow: 0 0 calc(var(--u) * 6) rgba(255,40,40,.8); animation: shake .5s 2; }
.d-banner.lose { color: #111; background: #f4f4f6; border: calc(var(--u) * .3) solid #111; }
.d-banner.solved, .d-banner.bonuswin { color: #2a1d00; background: linear-gradient(#ffe48a, #f2a900); border: calc(var(--u) * .3) solid #fff; box-shadow: 0 0 calc(var(--u) * 7) rgba(255,217,90,.9); }
.d-banner.wrong, .d-banner.timeup, .d-banner.nobody, .d-banner.bonuslose { color: #fff; background: rgba(150, 20, 40, .92); border: calc(var(--u) * .3) solid #ffb3b6; }
.d-banner.big { font-size: calc(var(--u) * 7); }
@keyframes shake { 25% { margin-left: -1.2vw; } 75% { margin-left: 1.2vw; } }
.d-answer { position: absolute; left: 50%; top: 61vh; transform: translateX(-50%); font-family: var(--show); font-size: calc(var(--u) * 2); letter-spacing: .08em; color: #fff; padding: calc(var(--u) * .3) calc(var(--u) * 1.6); border-radius: 99px; background: rgba(6,3,26,.82); display: none; }
.d-lobby { position: absolute; inset: 0; display: none; }
.d-lobby.on { display: block; }
.d-join { position: absolute; left: calc(var(--u) * 2); bottom: calc(var(--u) * 2); display: flex; gap: calc(var(--u) * 1.6); align-items: center; padding: calc(var(--u) * 1) calc(var(--u) * 1.6); border-radius: calc(var(--u) * 1.4); background: rgba(6,3,26,.86); border: calc(var(--u) * .2) solid var(--gold); }
.d-join .qr { width: calc(var(--u) * 10); height: calc(var(--u) * 10); padding: calc(var(--u) * .5); }
.d-join h3 { margin: 0 0 calc(var(--u) * .4); font-family: var(--show); font-weight: 400; text-transform: uppercase; letter-spacing: .05em; font-size: calc(var(--u) * 2.1); }
.d-join p { margin: 0 0 calc(var(--u) * .4); font-size: calc(var(--u) * 1.25); color: #e3dcff; }
.d-join .addr { font-size: calc(var(--u) * 1.5); }
.d-join .code { font-family: var(--show); font-size: calc(var(--u) * 4.4); letter-spacing: .12em; line-height: 1; color: #fff; text-shadow: 0 0 calc(var(--u) * 1.4) rgba(255,200,60,.6); }
.d-lobby .d-plates { left: auto; right: calc(var(--u) * 2); transform: none; width: calc(var(--u) * 56); bottom: calc(var(--u) * 2); }
.d-lobby .lobbynote { position: absolute; right: calc(var(--u) * 2); bottom: calc(var(--u) * 12.5); width: calc(var(--u) * 56); text-align: center; font-size: calc(var(--u) * 1.3); color: #e3dcff; text-shadow: 0 2px 6px #000; }
.d-rules { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90vw, calc(var(--u) * 80)); padding: calc(var(--u) * 2) calc(var(--u) * 3); border-radius: calc(var(--u) * 1.6); background: rgba(6,3,26,.9); border: calc(var(--u) * .25) solid var(--gold); display: none; }
.d-rules.on { display: block; }
.d-rules h2 { margin: 0 0 calc(var(--u) * 1); font-family: var(--show); font-weight: 400; letter-spacing: .05em; text-transform: uppercase; color: var(--gold-hi); font-size: calc(var(--u) * 3.2); text-align: center; }
.d-rules ol { margin: 0; padding-left: 1.2em; font-size: calc(var(--u) * 1.75); line-height: 1.35; }
.d-rules li { margin-bottom: calc(var(--u) * .5); }
.d-bonus { position: absolute; left: 50%; top: 61vh; transform: translateX(-50%); display: none; gap: calc(var(--u) * .8); }
.d-bonus.on { display: flex; }
.d-bonus b { width: calc(var(--u) * 4.4); height: calc(var(--u) * 5); display: grid; place-items: center; border-radius: calc(var(--u) * .6); background: linear-gradient(#fff, #dfe3ea); color: #0b0b12; font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 900; font-size: calc(var(--u) * 3.4); box-shadow: 0 0 calc(var(--u) * 1.4) rgba(25,227,255,.7); }
.d-bonus b.v { background: linear-gradient(#c9fdff, #36d6e8); }
.d-bonus b.q { background: rgba(6,3,26,.8); color: rgba(255,255,255,.4); border: 2px dashed rgba(255,255,255,.4); box-shadow: none; }
.d-envelope { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%) rotate(-3deg); padding: calc(var(--u) * 1.6) calc(var(--u) * 4); border-radius: calc(var(--u) * 1); background: linear-gradient(#fff6d8, #e8cf8a); color: #4a2a00; font-family: var(--show); font-size: calc(var(--u) * 7); letter-spacing: .03em; box-shadow: 0 calc(var(--u) * 1) calc(var(--u) * 4) rgba(0,0,0,.6), 0 0 0 calc(var(--u) * .4) var(--gold); display: none; text-align: center; line-height: 1; }
.d-envelope small { display: block; font-family: var(--text); font-weight: 800; font-size: .2em; letter-spacing: .2em; margin-bottom: .4em; }
.d-envelope.on { display: block; animation: env .8s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes env { from { transform: translate(-50%, -50%) rotate(-12deg) scale(.2); opacity: 0; } }
.soundgate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: start center; padding-top: 12vh; background: rgba(6, 3, 26, .25); }
.soundgate div { padding: 1.2vw 2.4vw; border-radius: 99px; background: var(--gold); color: var(--ink); font-weight: 800; font-size: max(18px, 1.8vw); box-shadow: 0 .4vw 0 #7a3d00; animation: pulse .8s infinite alternate; }
.offline { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 45; padding: 6px 14px; border-radius: 99px; background: var(--red); font-weight: 700; font-size: 14px; }
.d-menu { position: fixed; left: 12px; bottom: 12px; z-index: 30; padding: 8px 14px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; opacity: 0; transition: opacity .3s; }
body.pointer .d-menu { opacity: 1; }

/* ---------- phones: playing ---------- */
.playwrap { max-width: 560px; margin: 0 auto; padding: 12px 14px 90px; }
.myplate { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; margin: 0 0 12px; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.myplate.s0 { background: linear-gradient(#ff4d61, #a5102a); }
.myplate.s1 { background: linear-gradient(#ffd93d, #d29a00); color: #2a1d00; }
.myplate.s2 { background: linear-gradient(#4a96ff, #133fa8); }
.myplate b { font-family: var(--show); font-weight: 400; letter-spacing: .04em; text-transform: uppercase; font-size: 22px; }
.myplate .money { text-align: right; font-family: var(--show); font-size: 30px; line-height: 1; }
.myplate .money small { display: block; font-family: var(--text); font-size: 11px; font-weight: 700; opacity: .85; }
.status { text-align: center; font-weight: 700; font-size: 17px; margin: 4px 0 12px; min-height: 1.4em; color: var(--gold-hi); }
.miniboard { margin: 0 0 10px; }
.miniboard .fboard { padding: 5px; gap: 2px; border-width: 2px; }
.miniboard .fboard i { font-size: clamp(9px, 3.4vw, 20px); border-radius: 2px; }
.minicat { text-align: center; margin: 0 0 12px; }
.minicat .catplate { font-size: 15px; padding: 4px 14px; }
.acts { display: grid; gap: 10px; }
.acts .btn { min-height: 60px; font-size: 19px; }
.wheelpad { position: relative; display: grid; place-items: center; margin: 4px auto 10px; width: min(78vw, 320px); aspect-ratio: 1; touch-action: none; user-select: none; -webkit-user-select: none; }
.wheelpad .wh { width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(#e3202e 0 15deg, #f6c200 0 30deg, #1e6ee6 0 45deg, #15a84a 0 60deg, #8a2fd8 0 75deg, #ff7a00 0 90deg, #f0459c 0 105deg, #13b4cb 0 120deg, #e3202e 0 135deg, #f6c200 0 150deg, #0b0b0f 0 165deg, #1e6ee6 0 180deg, #15a84a 0 195deg, #8a2fd8 0 210deg, #f4f4f6 0 225deg, #ff7a00 0 240deg, #f0459c 0 255deg, #13b4cb 0 270deg, #e3202e 0 285deg, #0b0b0f 0 300deg, #f6c200 0 315deg, #1e6ee6 0 330deg, #15a84a 0 345deg, #c9ccd6 0 360deg); border: 8px solid #ffc23a; box-shadow: 0 0 0 4px #5a3a00, 0 0 40px rgba(255,194,58,.5), inset 0 0 30px rgba(0,0,0,.4); }
.wheelpad .hubdot { position: absolute; width: 26%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(#3a2a8a, #0b0630); border: 5px solid #ffc23a; display: grid; place-items: center; font-family: var(--show); color: var(--gold-hi); font-size: 15px; text-align: center; line-height: 1; }
.wheelpad .hint { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 6px 14px; border-radius: 99px; background: rgba(6,3,26,.88); border: 1px solid var(--gold); font-weight: 800; font-size: 14px; }
.wheelpad.go .wh { transition: transform 1.2s cubic-bezier(.1, .7, .3, 1); }
.kbd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.kbd button { min-height: 50px; border-radius: 10px; font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 900; font-size: 22px; color: #0b0b12; background: linear-gradient(#fff, #d9dde6); border: 2px solid #fff; }
.kbd button.v { background: linear-gradient(#c9fdff, #49d9ea); }
.kbd button:disabled { opacity: .18; }
.solvebox { margin: 0 0 12px; padding: 10px; border-radius: 12px; background: #050a1c; border: 2px solid var(--teal); }
.solvebox .ln { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin: 0 0 6px; }
.solvebox .wd { display: flex; gap: 2px; }
.solvebox .wd i { width: 22px; height: 30px; display: grid; place-items: center; font-style: normal; font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 900; font-size: 18px; border-radius: 3px; background: #fff; color: #0b0b12; }
.solvebox .wd i.blank { background: #2a2f52; color: var(--gold-hi); }
.solvebox .wd i.cur { outline: 3px solid var(--gold-hi); }
.solvebox .wd i.p { background: transparent; color: #fff; width: 10px; }
.bigbuzz { display: block; width: 100%; min-height: 42vh; margin: 8px 0; border-radius: 28px; font-family: var(--show); text-transform: uppercase; letter-spacing: .04em; font-size: 60px; color: #fff; background: radial-gradient(circle at 50% 35%, #ff5a61, #c1121a); border: 6px solid #ffb3b6; box-shadow: 0 10px 0 #5e070b, 0 0 60px rgba(227, 38, 46, .6); }
.bigbuzz:active { transform: translateY(8px); box-shadow: 0 2px 0 #5e070b; }
.bigbuzz small { display: block; font-family: var(--text); text-transform: none; font-size: 16px; font-weight: 600; letter-spacing: 0; margin-top: 8px; }
.bigbuzz:disabled { background: #2a2f52; border-color: #4a5080; box-shadow: none; opacity: 1; color: #8a90c0; }
.picks { display: flex; justify-content: center; gap: 8px; margin: 0 0 12px; }
.picks b { width: 46px; height: 56px; display: grid; place-items: center; border-radius: 8px; background: #fff; color: #0b0b12; font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 900; font-size: 28px; }
.picks b.e { background: rgba(255,255,255,.12); color: rgba(255,255,255,.4); border: 2px dashed rgba(255,255,255,.4); }
.seatpick { display: grid; gap: 10px; }

/* ---------- host phone ---------- */
.answercard { border: 2px solid var(--gold); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; background: rgba(18, 10, 64, .95); }
.answercard .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; color: var(--gold); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }
.answercard .ans { font-family: var(--show); font-weight: 400; letter-spacing: .06em; font-size: 26px; line-height: 1.15; }
.answercard .ans span.h { color: #8b84b8; }
.answercard .tip { margin: 8px 0 0; font-size: 14px; color: #dcd6ff; }
.seatgrid { display: grid; gap: 10px; }
.seatrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; border: 2px solid; background: rgba(6,3,26,.5); }
.seatrow.s0 { border-color: var(--s0); } .seatrow.s1 { border-color: var(--s1); } .seatrow.s2 { border-color: var(--s2); }
.seatrow b { font-size: 17px; }
.seatrow small { display: block; color: var(--mute); font-size: 12px; }
.seatrow .row { flex-wrap: wrap; gap: 6px; }
.hostkbd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.hostkbd button { min-height: 42px; border-radius: 8px; font-weight: 900; font-size: 17px; color: #0b0b12; background: #fff; }
.hostkbd button.v { background: #8beefa; }
.hostkbd button:disabled { opacity: .15; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.judge { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.right { background: linear-gradient(#5cf0a4, #12a865); color: #032414; border-color: #b6ffd9; }
.btn.wrong { background: linear-gradient(#ff6b78, #c0172b); border-color: #ffb3b6; }
.minicats { font-size: 13px; color: var(--mute); }

/* ---------- solo ---------- */
body.solo { overflow-x: hidden; }
.solo-top { position: relative; height: 56vh; min-height: 300px; }
body.solo #setwrap { position: absolute; inset: 0; height: 56vh; min-height: 300px; }
body.solo .solo-top .d-used { top: 6px; }
body.solo .solo-top .d-cat { top: auto; bottom: 8px; }
body.solo .solo-top .d-banner { font-size: min(9vw, 64px); top: 44%; }
body.solo .solo-top .d-timer { top: 40px; right: 8px; width: 56px; height: 56px; }
body.solo .solo-top .d-timer b { font-size: 24px; }
body.solo:not(.has-set) .solo-top { height: auto; min-height: 0; padding: 50px 8px 70px; }
body.solo .solo-top .d-board { top: 40px; width: 96%; }
body.solo .d-used b { width: 15px; font-size: 13px; }
body.solo .solo-top { --u: min(1vw, 1.7778vh); }
@media (max-width: 700px) { body.solo .d-used { display: none; } }
.solo-bottom { max-width: 620px; margin: 0 auto; padding: 10px 14px 80px; }
.solo-bottom .plates .bk { font-size: 26px; }
.solo-bottom .plates .nm { font-size: 14px; }
.coachbar { display: flex; gap: 10px; align-items: flex-start; background: rgba(246,180,14,.12); border: 2px solid rgba(246,180,14,.55); border-radius: 14px; padding: 10px 12px; margin: 10px 0; font-size: 15px; line-height: 1.4; }
.intro-logo { width: min(72vw, 110vh); aspect-ratio: 1100 / 500; }
body.solo .solo-top .d-plates { display: none; }
body.solo .dstage { position: absolute; }
/* game length presets */
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0; }
@media (max-width: 420px) { .presets { grid-template-columns: 1fr; } }
.preset { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid #5b48c8; background: #21166a; color: #fff; cursor: pointer; font: inherit; }
.preset b { font-size: 16px; }
.preset span { font-size: 12.5px; color: #cfc8ff; line-height: 1.3; }
.preset.on { background: var(--gold); border-color: var(--gold-hi); color: var(--ink); }
.preset.on span { color: #3a2a00; }

/* the answer pad: says what to do, with its own clock */
.answer { margin: 0 0 12px; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,194,58,.16), rgba(255,194,58,.04)); border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(255,194,58,.15), 0 0 26px rgba(255,194,58,.25); animation: answerin .5s ease-out both; }
@keyframes answerin { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.answerhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.answerhead b { font-family: var(--show); font-weight: 400; font-size: 26px; letter-spacing: .04em; color: var(--gold-hi); text-transform: uppercase; }
.anstime { min-width: 56px; padding: 4px 10px; border-radius: 999px; background: #050a1c; border: 2px solid var(--teal); text-align: center; font-weight: 900; font-size: 18px; }
.anstime i { font-style: normal; }
.anstime.low { border-color: #ff4d5a; color: #ff8a92; animation: pulse 0.6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }
.answerhow { margin: 4px 0 10px; color: #e6e1ff; font-size: 15px; }
.answer .solvebox { margin-bottom: 10px; }
.answer .solvebox .wd i { width: 26px; height: 34px; font-size: 20px; }
@media (max-width: 420px) { .answer .solvebox .wd i { width: 21px; height: 29px; font-size: 17px; } }
/* solo: the stage gets smaller while you answer, so the pad fits on screen */
body.solo .solo-top { transition: height .4s ease; }
body.solo.answering .solo-top { height: 34vh; min-height: 220px; }
/* solo: the 3D set fills its own area, and nothing from the stage can spill onto the controls */
body.solo #setwrap { height: auto; min-height: 0; }
body.solo .solo-top { overflow: hidden; }
/* the bonus letters and the envelope stay inside the stage, out of the board's way */
body.solo .solo-top .d-bonus { top: 44px; left: 12px; transform: none; --u: min(0.8vw, 1.4vh); }
body.solo .solo-top .d-envelope { top: auto; bottom: calc(var(--u) * 12); font-size: calc(var(--u) * 4.6); }
/* wide screens: the stage on the left, your controls in their own column on the right */
@media (min-width: 1000px) and (min-aspect-ratio: 5/4) {
  body.solo #game:not(.hide) { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 30vw, 480px); height: 100vh; overflow: hidden; }
  body.solo .solo-top, body.solo.answering .solo-top { height: 100vh; min-height: 0; transition: none; }
  body.solo .solo-top { --u: min(0.75vw, 1.6vh); }
  body.solo .solo-bottom { height: 100vh; overflow-y: auto; max-width: none; margin: 0; padding: 18px 18px 40px; background: linear-gradient(180deg, rgba(14,8,46,.96), rgba(6,3,26,.96)); border-left: 1px solid rgba(255, 194, 58, .25); box-shadow: -10px 0 40px rgba(0,0,0,.4); }
  body.solo .solo-bottom .kbd button { min-height: 46px; font-size: 20px; }
  body.solo .solo-bottom .wheelpad { max-width: 300px; margin-left: auto; margin-right: auto; }
}
