:root {
  --bg: #140a26;
  --bg2: #22103f;
  --ink: #f7f2ff;
  --muted: #b9aadb;
  --line: rgba(255, 255, 255, 0.14);
  --card: rgba(255, 255, 255, 0.06);
  --teal: #00e5d4;
  --pink: #ff3cac;
  --yellow: #ffe14d;
  --lime: #7cff4f;
  --red: #ff5c5c;
  --good: #52ffa8;
  --bad: #ff6b8b;
  --radius: 14px;
  --display: 'Bungee', 'Arial Black', system-ui, sans-serif;
  --body: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'VT323', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 110% -10%, rgba(255, 60, 172, 0.22), transparent 60%),
    radial-gradient(900px 500px at -20% 110%, rgba(0, 229, 212, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
/* CRT scanlines */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  z-index: 50;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.5px;
  color: #140a26;
  background: var(--yellow);
  box-shadow: 0 5px 0 #b39500, 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #b39500; }
.btn:disabled { filter: grayscale(1) brightness(0.6); cursor: default; }
.btn.pink { background: var(--pink); color: #fff; box-shadow: 0 5px 0 #a3196b, 0 10px 24px rgba(0,0,0,.35); }
.btn.pink:active { box-shadow: 0 1px 0 #a3196b; }
.btn.teal { background: var(--teal); box-shadow: 0 5px 0 #00897f, 0 10px 24px rgba(0,0,0,.35); }
.btn.teal:active { box-shadow: 0 1px 0 #00897f; }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 2px solid var(--line); box-shadow: none;
  font-family: var(--body); font-weight: 700; font-size: 16px;
}
.btn.ghost:active { transform: translateY(1px); }
.btn.small { padding: 10px 14px; font-size: 15px; width: auto; display: inline-block; }
.linkbtn { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 8px; font-size: 15px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.input, select.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  font-size: 18px;
  outline: none;
}
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 229, 212, 0.25); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
select.input option { background: var(--bg2); }
.input.code-input { font-family: var(--display); font-size: 30px; text-align: center; letter-spacing: 12px; text-transform: uppercase; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}
.err { color: var(--bad); min-height: 1.4em; text-align: center; font-weight: 500; margin: 10px 0 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.spacer { flex: 1; }

/* ---------- home ---------- */
.home { display: flex; flex-direction: column; gap: 18px; padding-top: 12px; }
.vhs-hud { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 24px; color: #fff; opacity: 0.9; text-shadow: 0 0 6px rgba(255,255,255,.5); }
.logo {
  font-family: var(--display);
  font-size: clamp(46px, 14vw, 78px);
  line-height: 0.95;
  text-align: center;
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 var(--teal);
  transform: rotate(-3deg);
  margin: 18px 0 6px;
}
.tagline { text-align: center; color: var(--muted); margin: 0; }
.tagline b { color: var(--ink); }
.or { text-align: center; font-family: var(--mono); font-size: 22px; color: var(--muted); }
.rules-mini { font-size: 14px; color: var(--muted); }
.rules-mini ol { padding-left: 20px; margin: 6px 0 0; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line);
  font-weight: 700; white-space: nowrap;
}
.chip.code { font-family: var(--display); letter-spacing: 2px; font-weight: 400; }
.rec { color: var(--red); font-family: var(--mono); font-size: 20px; line-height: 1; }
.rec::before { content: '●'; margin-right: 4px; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.topbar .score { margin-left: auto; font-family: var(--display); font-weight: 400; color: var(--yellow); }
.iconbtn { flex: none; background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 999px; width: 36px; height: 36px; display: grid; place-items: center; font-size: 16px; padding: 0; }
.quitbtn {
  flex: none; height: 36px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 92, 92, 0.14); border: 1px solid rgba(255, 92, 92, 0.55);
  color: #ffb3b3; font-weight: 800; font-size: 14px; white-space: nowrap;
}
.quitbtn:active { background: rgba(255, 92, 92, 0.3); }
@media (max-width: 380px) { .topbar .rec { display: none; } }

/* ---------- confirm dialog ---------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 16px;
  background: rgba(8, 3, 18, 0.75);
  backdrop-filter: blur(3px);
  animation: fade .15s ease-out;
}
.modal {
  width: 100%; max-width: 380px;
  background: var(--bg2); border: 2px solid var(--pink); border-radius: 20px;
  padding: 22px 20px 20px;
  box-shadow: 6px 6px 0 var(--teal), 0 20px 50px rgba(0,0,0,.5);
  animation: pop .25s cubic-bezier(.2,1.4,.4,1);
}
.modal h2 { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--yellow); margin-bottom: 8px; }
.modal p { margin: 0 0 18px; color: var(--muted); }
.modal p b { color: var(--ink); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-actions .btn { font-size: 16px; padding: 13px 10px; }
@keyframes fade { from { opacity: 0; } }
.plist li .btn.small { padding: 8px 12px; font-size: 14px; }

/* ---------- lobby ---------- */
.big-code {
  font-family: var(--display);
  font-size: clamp(64px, 22vw, 110px);
  letter-spacing: 10px;
  text-align: center;
  color: var(--teal);
  text-shadow: 4px 4px 0 var(--pink);
  line-height: 1;
  margin: 6px 0;
}
.label { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); text-align: center; margin: 0; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.settings .field { margin: 0; }
@media (max-width: 420px) { .settings { grid-template-columns: 1fr; } }

.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plist li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line);
}
.dot { width: 14px; height: 14px; border-radius: 4px; flex: none; transform: rotate(45deg); }
.plist .name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist .off { opacity: 0.45; }
.plist .pts { font-family: var(--display); color: var(--yellow); }
.plist .kick { background: none; border: 0; color: var(--muted); font-size: 18px; padding: 2px 6px; }
.rank { font-family: var(--display); width: 28px; color: var(--muted); }
.plist li.me { border-color: var(--teal); }
.plist li.lead .rank { color: var(--yellow); }

/* ---------- round intro ---------- */
.intro { text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 16px; flex: 1; }
.intro .kicker { font-family: var(--mono); font-size: 26px; color: var(--teal); letter-spacing: 2px; }
.intro h1 {
  font-family: var(--display); font-size: clamp(40px, 12vw, 68px); line-height: 1;
  color: var(--pink); text-shadow: 3px 3px 0 var(--yellow);
  animation: pop 0.5s cubic-bezier(.2,1.6,.4,1);
}
.intro p { font-size: 19px; margin: 0 auto; max-width: 30ch; }
@keyframes pop { from { transform: scale(0.4) rotate(-6deg); opacity: 0; } }

/* ---------- question ---------- */
.meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.tag { flex: none; white-space: nowrap; padding: 4px 9px; border-radius: 6px; font-size: 12px; letter-spacing: 0.5px; font-weight: 800; text-transform: uppercase; border: 1px solid rgba(255,255,255,.2); max-width: 55%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- category button + picker ---------- */
.catbtn {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'label edit' 'sum sum';
  gap: 2px 10px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: var(--radius);
  background: rgba(0,0,0,.35); border: 2px solid var(--line);
}
.catbtn:active { border-color: var(--teal); }
.catbtn-label { grid-area: label; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.catbtn-edit { grid-area: edit; color: var(--teal); font-weight: 800; font-size: 14px; }
.catbtn-sum { grid-area: sum; font-weight: 700; font-size: 16px; }
.label.left { text-align: left; margin-bottom: 8px; }

.picker-wrap { position: fixed; inset: 0; z-index: 75; background: rgba(8,3,18,.8); display: flex; justify-content: center; animation: fade .15s ease-out; }
.picker {
  width: 100%; max-width: 640px; height: 100%;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.picker-head { display: flex; align-items: center; gap: 10px; padding: max(14px, env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--line); }
.picker-head h2 { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--yellow); }
.picker-head .muted { font-size: 14px; margin-left: auto; }
.picker-body { flex: 1; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.picker-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.preset, .preset.user button {
  border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px;
  background: rgba(0,0,0,.35); border: 2px solid var(--line);
}
.preset:active, .preset.user button:active { border-color: var(--yellow); }
.preset.user { display: inline-flex; border: 0; padding: 0; background: none; }
.preset.user button:first-child { border-radius: 999px 0 0 999px; border-right: 0; border-color: var(--teal); }
.preset.user .x { border-radius: 0 999px 999px 0; padding: 8px 10px; color: var(--muted); border-color: var(--teal); }
.preset small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.save-row { display: flex; gap: 8px; margin-bottom: 16px; }
.save-row .input { font-size: 16px; padding: 10px 12px; }
.save-row .btn.small { flex: none; }
.bulk { display: flex; gap: 8px; margin-bottom: 8px; }
.bulk button, .group-head button { background: none; border: 0; color: var(--teal); font-weight: 700; font-size: 14px; padding: 6px 0; margin-right: 12px; }
.cat-group { margin-top: 14px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.group-head h3 { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.group-head button { margin: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cat {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'e n' 'e c';
  align-items: center; gap: 0 10px; text-align: left;
  padding: 10px 12px; border-radius: 12px; min-height: 58px;
  background: rgba(0,0,0,.3); border: 2px solid var(--line);
  transition: border-color .12s, background .12s;
}
.cat-emoji { grid-area: e; font-size: 22px; }
.cat-name { grid-area: n; font-weight: 700; font-size: 15px; line-height: 1.2; }
.cat-count { grid-area: c; font-size: 12px; color: var(--muted); }
.cat.on { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 22%, transparent); }
.cat.on .cat-name::after { content: ' ✓'; color: var(--good); }
@media (max-width: 360px) { .cat-grid { grid-template-columns: 1fr 1fr; } }

.timer-wrap { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.timer { position: relative; flex: 1; height: 12px; border-radius: 99px; background: rgba(0,0,0,.4); overflow: hidden; border: 1px solid var(--line); }
.timer-fill { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, var(--teal), var(--lime)); }
.timer.low .timer-fill { background: linear-gradient(90deg, var(--red), var(--pink)); }
.timer-num { font-family: var(--mono); font-size: 26px; min-width: 2ch; text-align: right; line-height: 1; }

.qtext { font-size: clamp(21px, 5.6vw, 27px); font-weight: 800; line-height: 1.25; margin: 4px 0 20px; }
.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 14px 14px; min-height: 64px;
  border-radius: var(--radius);
  background: rgba(0,0,0,.3);
  border: 3px solid var(--c);
  font-size: 18px; font-weight: 700;
  box-shadow: 0 4px 0 var(--c);
  transition: transform .08s, box-shadow .08s, opacity .2s;
}
.choice:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--c); }
.choice .letter {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--c); color: #140a26; font-family: var(--display); font-size: 18px;
}
.choice .who { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.c0 { --c: var(--teal); } .c1 { --c: var(--pink); } .c2 { --c: var(--yellow); } .c3 { --c: var(--lime); }
.choice:disabled { cursor: default; }
.choice.picked { background: var(--c); color: #140a26; }
.choice.picked .letter { background: #140a26; color: var(--c); }
.choice.dim { opacity: 0.35; }
.choice.struck { opacity: 0.3; text-decoration: line-through; }
.choice.right { background: var(--good); border-color: var(--good); box-shadow: 0 4px 0 #1f9e60; color: #0d2a1b; }
.choice.right .letter { background: #0d2a1b; color: var(--good); }
.choice.wrong { border-color: var(--bad); box-shadow: 0 4px 0 var(--bad); }
.mini { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #140a26; }

.status { text-align: center; color: var(--muted); margin: 16px 0 0; font-weight: 500; }
.lockedin { text-align: center; font-family: var(--display); font-size: 22px; color: var(--teal); margin-top: 16px; }

/* buzzer */
.buzz {
  display: grid; place-items: center;
  width: min(62vw, 240px); aspect-ratio: 1; margin: 8px auto 20px;
  border-radius: 50%; border: 0;
  background: radial-gradient(circle at 35% 30%, #ff8fcb, var(--pink) 45%, #a3196b 100%);
  box-shadow: 0 12px 0 #6e0f47, 0 20px 40px rgba(255, 60, 172, 0.45), inset 0 -8px 20px rgba(0,0,0,.25);
  font-family: var(--display); font-size: clamp(34px, 11vw, 52px); color: #fff; text-shadow: 2px 2px 0 #6e0f47;
  transition: transform .06s, box-shadow .06s;
  touch-action: manipulation;
}
.buzz:active:not(:disabled) { transform: translateY(10px); box-shadow: 0 2px 0 #6e0f47, 0 8px 20px rgba(255,60,172,.4); }
.buzz:disabled { filter: grayscale(1) brightness(.5); cursor: default; }
.buzz-banner { text-align: center; font-family: var(--display); font-size: 22px; padding: 12px; border-radius: var(--radius); margin: 0 0 14px; }
.buzz-banner.you { background: var(--pink); color: #fff; animation: pulse 0.8s ease-in-out infinite alternate; }
.buzz-banner.other { background: rgba(0,0,0,.35); border: 2px solid var(--line); }
@keyframes pulse { to { transform: scale(1.03); } }

/* year */
.year-box { display: flex; align-items: stretch; gap: 8px; }
.year-box .input { font-family: var(--display); font-size: 40px; text-align: center; padding: 10px; letter-spacing: 4px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 16px; }
.stepper button { padding: 12px 0; border-radius: 12px; border: 2px solid var(--line); background: rgba(0,0,0,.3); font-weight: 800; font-size: 17px; }
.stepper button:active { background: rgba(255,255,255,.1); }

/* reveal */
.answer-big { font-family: var(--display); font-size: clamp(56px, 20vw, 96px); text-align: center; color: var(--good); text-shadow: 4px 4px 0 #0d2a1b; line-height: 1; margin: 6px 0 14px; }
.results { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.results li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(0,0,0,.25); }
.results .name { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .detail { color: var(--muted); font-size: 15px; }
.delta { font-family: var(--display); min-width: 64px; text-align: right; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); } .delta.zero { color: var(--muted); }
.badge { font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 2px 6px; border-radius: 5px; background: var(--yellow); color: #140a26; }
.you-result { text-align: center; font-family: var(--display); font-size: 26px; margin: 4px 0 12px; }
.you-result.good { color: var(--good); } .you-result.bad { color: var(--bad); } .you-result.meh { color: var(--muted); }

/* final */
.final-title { font-family: var(--display); text-align: center; font-size: clamp(34px, 10vw, 54px); color: var(--yellow); text-shadow: 3px 3px 0 var(--pink); line-height: 1; }
.category {
  margin: 16px 0; padding: 22px 18px; text-align: center;
  background: #0b1a8c; border: 4px solid #000; border-radius: 10px;
  box-shadow: inset 0 0 0 3px #2a3bd6, 0 10px 30px rgba(0,0,0,.4);
}
.category .cat-label { font-size: 12px; letter-spacing: 3px; color: #cfd6ff; font-weight: 700; }
.category .cat { font-family: var(--display); font-size: clamp(26px, 8vw, 38px); color: #fff; text-shadow: 2px 2px 0 #000; margin-top: 4px; }
.clue { background: #0b1a8c; border: 4px solid #000; border-radius: 10px; box-shadow: inset 0 0 0 3px #2a3bd6; padding: 22px 18px; color: #fff; font-size: clamp(20px, 5.5vw, 26px); font-weight: 700; text-align: center; text-transform: uppercase; line-height: 1.3; text-shadow: 2px 2px 0 #000; margin-bottom: 16px; }
.wager-row { display: flex; gap: 10px; align-items: center; }
.wager-row input[type=range] { flex: 1; accent-color: var(--yellow); height: 32px; }
.wager-row .input { width: 120px; font-family: var(--display); text-align: center; }
.quick-wagers { display: flex; gap: 8px; margin: 10px 0 14px; }
.quick-wagers button { flex: 1; padding: 10px 0; border-radius: 10px; border: 2px solid var(--line); background: rgba(0,0,0,.3); font-weight: 800; }
.toggle { border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 800; font-size: 14px; }
.toggle.ok { background: var(--good); color: #0d2a1b; }
.toggle.no { background: var(--bad); color: #2a0d15; }
.final-ans { font-style: italic; color: var(--ink); }

/* game over */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin: 26px 0 18px; text-align: center; }
.podium .step { border-radius: 12px 12px 0 0; padding: 10px 4px; font-family: var(--display); font-size: 30px; color: #140a26; }
.podium .p1 .step { background: var(--yellow); height: 130px; }
.podium .p2 .step { background: var(--teal); height: 95px; }
.podium .p3 .step { background: var(--pink); height: 70px; }
.podium .pname { font-weight: 800; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .ppts { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.crown { font-size: 34px; animation: pop .6s cubic-bezier(.2,1.6,.4,1); }

.host-bar { margin-top: 20px; display: grid; gap: 10px; }
.host-note { text-align: center; font-size: 13px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.waiting { text-align: center; color: var(--muted); font-family: var(--mono); font-size: 24px; margin-top: 20px; }
.waiting::after { content: '▌'; animation: blink 1s steps(2) infinite; margin-left: 4px; }

.banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: var(--red); color: #fff; text-align: center;
  padding: 8px; font-weight: 700; font-size: 15px;
}
.toast { z-index: 90;
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #000; color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 700;
  border: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- round builder ---------- */
.round-list { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 10px; }
.round-row { background: rgba(0,0,0,.3); border: 2px solid var(--line); border-radius: 14px; padding: 12px; }
.round-top { display: flex; align-items: center; gap: 8px; }
.round-num { font-family: var(--display); color: var(--yellow); width: 22px; text-align: center; flex: none; }
.round-type { flex: 1; min-width: 0; font-size: 16px; padding: 10px 36px 10px 12px; }
.round-move { display: flex; gap: 4px; flex: none; }
.round-move button, .count-step button {
  width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--line);
  background: rgba(255,255,255,.04); font-weight: 800; padding: 0;
}
.round-move button:disabled, .count-step button:disabled { opacity: .3; cursor: default; }
.round-move .round-remove { color: var(--bad); }
.round-blurb { font-size: 13px; color: var(--muted); margin: 8px 0; }
.count-step { display: flex; align-items: center; gap: 10px; }
.count-step span { font-weight: 800; min-width: 72px; text-align: center; }
.round-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.final-toggle { display: flex; gap: 12px; align-items: center; margin: 16px 0 4px; padding: 12px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.final-toggle input { width: 22px; height: 22px; accent-color: var(--pink); flex: none; }

/* ---------- lightning ---------- */
.statement {
  font-family: var(--display); font-size: clamp(22px, 7vw, 32px); text-align: center;
  padding: 18px 14px; margin: 0 0 16px; border-radius: 16px;
  background: rgba(0,0,0,.35); border: 2px dashed var(--yellow); color: var(--yellow);
}
.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice.tf { justify-content: center; font-size: 22px; min-height: 84px; }

/* ---------- the big board ---------- */
.board { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.board-col { display: grid; gap: 6px; align-content: start; }
.board-head {
  background: #0b1a8c; border: 2px solid #000; border-radius: 8px; min-height: 64px;
  display: grid; place-items: center; text-align: center; padding: 6px 4px;
  font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #fff;
  line-height: 1.2; overflow-wrap: anywhere;
}
.board-tile {
  background: #1a2fd6; border: 2px solid #000; border-radius: 8px; min-height: 54px;
  font-family: var(--display); font-size: clamp(15px, 4.5vw, 22px); color: var(--yellow);
  text-shadow: 2px 2px 0 #000; padding: 0;
}
.board-tile:disabled { cursor: default; filter: saturate(.8); }
.board-tile.used { background: rgba(11, 26, 140, .25); border-style: dashed; border-color: rgba(255,255,255,.12); }
.badge.out { background: var(--bad); color: #2a0d15; }
