@charset "UTF-8";
/* MySlates Quiz. Game master and player screens are light, like the MySlates apps.
   The audience screen is a fixed dark stage built for a projector. */
:root {
  --bg: #f5f8fb; --card: #ffffff; --line: #e2e8f0; --line-2: #eef2f7; --side: #e6f3fa;
  --fg: #151b28; --muted: #677187; --primary: #2394d1; --primary-dk: #16729f; --primary-soft: #e2f2fb;
  --good: #12925d; --good-soft: #e0f5ea; --warn: #a86500; --warn-soft: #fcf0d8; --bad: #c93c22; --bad-soft: #fde8e3;
  --ms-navy: #16097f; --ms-orange: #f38b36; --ms-teal: #0c9a8b; --ms-gold: #e4a20c; --ms-blue: #0a96d1; --ms-deep: #0b5e82;
  --on-orange: #2b1300; --on-gold: #2a1d00;
  --stage-bg: #0c0b3d; --stage-2: #17165e; --stage-3: #242186; --stage-fg: #f5f5ff; --stage-muted: #b3b5e2; --stage-line: #34318f;
  --c0: #0a96d1; --c1: #f38b36; --c2: #0c9a8b; --c3: #e4a20c;
  --f-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --f-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 15px; line-height: 1.45; }
body[data-view="screen"] { background: #000; }
body[data-view="play"] { background: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ms-blue); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .upper { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: 11px; }
.mono { font-family: var(--f-mono); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; } .row.end { justify-content: flex-end; }
.center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.center-t { text-align: center; }
.grow { flex: 1; justify-content: center; }
.fatal { padding: 32px; max-width: 640px; margin: 0 auto; }

/* Buttons, inputs, chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dk); }
.btn.big { width: 100%; padding: 14px 18px; font-size: 17px; border-radius: 12px; }
.btn.sm { padding: 6px 10px; font-size: 13px; } .btn.xs { padding: 3px 8px; font-size: 12px; margin-left: auto; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.inp { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; min-height: 44px; }
.inp:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.inp { min-height: 120px; font-size: 13px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > span, .fld > label { font-size: 13px; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.chip.green { background: var(--good-soft); color: var(--good); } .chip.amber { background: var(--warn-soft); color: var(--warn); }
.chip.red { background: var(--bad-soft); color: var(--bad); } .chip.red::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.err { color: var(--bad); font-weight: 600; font-size: 14px; margin: 0; }
.warn { color: var(--warn); font-size: 14px; margin: 0; }
.ok { color: var(--good); font-size: 14px; margin: 0; }
.note { background: var(--primary-soft); border-radius: 10px; padding: 10px 12px; margin: 0; font-size: 14px; }
.note.warn { background: var(--warn-soft); color: var(--warn); } .note.good { background: var(--good-soft); color: var(--good); }
.empty { text-align: center; padding: 32px 12px; color: var(--muted); } .empty b { display: block; color: var(--fg); font-size: 16px; margin-bottom: 4px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; z-index: 50; max-width: min(92vw, 520px); }
.logo { display: inline-flex; align-items: center; gap: 6px; } .logo b { font-weight: 800; font-size: 21px; letter-spacing: -.02em; } .logo b span { color: var(--primary); }

/* ---------- Game master ---------- */
.hbar { display: flex; align-items: center; gap: 12px; background: var(--card); border-bottom: 1px solid var(--line); padding: 12px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px)); position: sticky; top: 0; z-index: 5; }
.hbar-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--side); color: var(--primary-dk); padding: 3px 8px; border-radius: 99px; }
.hbar .sp { flex: 1; } .hbar-user { font-size: 13px; color: var(--muted); }
.hmain { max-width: 980px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 16px; }
.hmain.wide { max-width: 1240px; }
.hmain h1 { font-size: 24px; } .hmain h2 { font-size: 18px; } .hmain h3 { font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.auth { max-width: 420px; margin: 40px auto; width: 100%; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 680px) { .form { grid-template-columns: minmax(0, 1fr); } }
.preview { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.counts { display: flex; gap: 10px; flex-wrap: wrap; }
.counts div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; text-align: center; min-width: 90px; }
.counts b { display: block; font-size: 22px; font-family: var(--f-mono); } .counts span { font-size: 12px; color: var(--muted); }
.tblwrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }
.tbl th { background: var(--primary-soft); text-align: left; font-size: 12px; padding: 9px 12px; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl td small { display: block; color: var(--muted); font-size: 12px; }
.hgrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hgrid .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 900px) { .hgrid { grid-template-columns: minmax(0, 1fr); } }
.vs { font-size: 20px; margin-top: 2px; } .vs em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 15px; margin: 0 4px; }
.tbig { display: flex; align-items: baseline; gap: 8px; } .tbig strong { font-family: var(--f-mono); font-size: 34px; min-width: 2ch; }
.qcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.qcard .qt { font-weight: 700; font-size: 17px; line-height: 1.35; }
.qopts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qopts li { display: flex; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--card); font-size: 14px; }
.qopts li i { font-style: normal; font-weight: 800; width: 18px; }
.qopts li.k { background: var(--good-soft); color: var(--good); font-weight: 700; }
.qopts em { margin-left: auto; font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--good); }
.qopts.pick li { padding: 0; background: none; }
.hopt { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; border: 3px solid transparent; border-radius: 10px; padding: 10px 12px; font-weight: 700; font-size: 15px; }
.hopt i { font-style: normal; font-weight: 800; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: rgba(255,255,255,.25); flex: none; }
.hopt em { color: inherit; opacity: .85; }
.hopt.sel { border-color: var(--fg); box-shadow: 0 0 0 3px #fff inset; }
.ans { display: flex; flex-direction: column; gap: 6px; }
.ans-team { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.dots { display: flex; gap: 5px; flex-wrap: wrap; }
.dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; background: var(--bg); color: var(--muted); border: 1px dashed var(--line); }
.dot.in { background: var(--primary); color: #fff; border: 0; } .dot.right { background: var(--good); color: #fff; border: 0; } .dot.wrong { background: var(--bad); color: #fff; border: 0; }
.turnbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.turnbox p { margin: 0; } .turnbox.bad { border-color: var(--bad); background: var(--bad-soft); }
.score { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.score th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: left; padding: 4px 0; border-bottom: 1px solid var(--line); }
.score td { padding: 8px 0; border-bottom: 1px solid var(--line-2); } .score .n { text-align: right; } .score b { font-family: var(--f-mono); font-size: 16px; }
.score tr.win td { color: var(--good); font-weight: 700; }
.join { flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; }
.join .qr { width: 148px; height: 148px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0; overflow: hidden; flex: none; }
.join .qr img, .join .qr canvas { display: block; width: 100%; height: 100%; }
.join-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.join .code { font-family: var(--f-mono); font-size: 32px; letter-spacing: .12em; }
.link { color: var(--primary-dk); font-size: 12px; word-break: break-all; }
.teams2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .teams2 { grid-template-columns: 1fr; } }
.plist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plist li { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.plist small { display: block; color: var(--muted); font-size: 11px; }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dk); display: grid; place-items: center; font-weight: 800; font-size: 11px; flex: none; }

/* Option colours shared by all views */
.o0 { background: var(--ms-blue); color: #fff; } .o1 { background: var(--ms-orange); color: var(--on-orange); }
.o2 { background: var(--ms-teal); color: #fff; } .o3 { background: var(--ms-gold); color: var(--on-gold); }

/* ---------- Player ---------- */
.pshell { min-height: 100%; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; background: #fff; }
.pbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line-2); }
.pbar b { color: var(--ms-blue); font-size: 15px; } .pbar span { font-size: 13px; font-weight: 700; color: var(--muted); }
.pmain { flex: 1; display: flex; flex-direction: column; padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); gap: 14px; }
.pmain h1 { font-size: 24px; } .pmain h2 { font-size: 22px; }
.pcard { display: flex; flex-direction: column; gap: 14px; }
.pwz { width: 64px; height: 64px; }
.code-in { font-family: var(--f-mono); font-size: 26px; text-align: center; letter-spacing: .14em; text-transform: uppercase; }
.teampick { display: grid; gap: 8px; }
.tpick { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 13px; font-weight: 700; text-align: left; }
.tpick.on { border-color: var(--primary); background: var(--primary-soft); }
.pq { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pq-text { font-size: 19px; font-weight: 800; line-height: 1.3; margin: 0; }
.tbar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.tbar div { height: 100%; background: var(--ms-gold); transform-origin: left; transition: transform .2s linear; }
.popts { display: grid; gap: 10px; margin-top: auto; }
.popt { border: 0; border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; text-align: left; font-weight: 700; font-size: 16px; line-height: 1.25; min-height: 60px; }
.popt i, .ro-opts i, .bigl { font-style: normal; }
.popt i { font-weight: 800; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.25); flex: none; }
.popt:active { transform: scale(.98); }
.ro-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ro-opts li { border-radius: 12px; padding: 11px 12px; display: flex; gap: 10px; font-weight: 700; }
.ro-opts i { font-weight: 800; }
.badge { align-self: center; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: #e1f3fb; color: var(--ms-deep); }
.badge.me { background: #fff1ea; color: #a33a0c; }
.pq .badge { align-self: flex-start; }
.bigl { width: 90px; height: 90px; border-radius: 22px; display: grid; place-items: center; font-size: 44px; font-weight: 800; }
.res { width: 100px; height: 100px; border-radius: 50%; display: grid; place-items: center; font-size: 48px; font-weight: 800; color: #fff; }
.res.ok { background: var(--good); } .res.no { background: var(--bad); } .res.na { background: #8a90a0; }
.pts { font-family: var(--f-mono); font-size: 30px; font-weight: 700; }
.rk { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.rk div { display: flex; justify-content: space-between; padding: 13px 14px; border-radius: 12px; background: var(--bg); font-weight: 700; }
.rk div.me { background: #e1f3fb; color: var(--ms-deep); } .rk b { font-family: var(--f-mono); }

/* ---------- Audience screen (projector) ---------- */
.st-frame { container-type: inline-size; position: relative; width: min(100vw, 177.78vh); aspect-ratio: 16 / 9; margin: 0 auto; background: var(--stage-bg); color: var(--stage-fg); overflow: hidden;
  background-image: radial-gradient(120% 90% at 85% -10%, var(--stage-3) 0%, transparent 55%), radial-gradient(90% 70% at -10% 110%, #082a52 0%, transparent 60%); }
body[data-view="screen"] #app { min-height: 100%; display: grid; place-items: center; }
.st-frame:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; }
.fs-btn { position: absolute; right: 1cqw; bottom: 1cqw; border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 99px; padding: .5cqw 1.2cqw; font-size: 1cqw; opacity: .5; }
.fs-btn:hover { opacity: 1; } .st-frame:fullscreen .fs-btn { display: none; }
.stage { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 2.6cqw 3.2cqw; gap: 1.6cqw; }
.st-head { display: flex; justify-content: space-between; align-items: center; gap: 2cqw; font-size: 1.3cqw; color: var(--stage-muted); font-weight: 600; }
.st-brand { display: flex; align-items: center; gap: .8cqw; color: var(--stage-fg); } .st-brand b { font-family: var(--f-display); font-weight: 800; font-size: 1.7cqw; }
.st-logo { width: 2.6cqw; height: 2.6cqw; }
.st-score { display: flex; gap: 2cqw; font-variant-numeric: tabular-nums; } .st-score b { font-family: var(--f-mono); color: var(--stage-fg); margin-left: .6cqw; font-size: 1.7cqw; }
.st-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.4cqw; }
.st-center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2cqw; }
.st-title { font-family: var(--f-display); font-weight: 800; font-size: 5cqw; }
.st-codeform { display: flex; gap: 1cqw; } .st-codeform .inp { font-size: 2cqw; width: 24cqw; } .st-codeform .btn { font-size: 2cqw; }
.st-lobby { flex: 1; display: grid; grid-template-columns: 30cqw 1fr; gap: 2.4cqw; align-items: stretch; min-height: 0; }
.st-joinbox { background: #fff; color: var(--stage-bg); border-radius: 1.6cqw; padding: 2cqw; display: flex; flex-direction: column; gap: 1.4cqw; align-items: center; justify-content: center; text-align: center; }
.st-joinbox .qr { width: 20cqw; height: 20cqw; } .st-joinbox .qr img, .st-joinbox .qr canvas { width: 100% !important; height: 100% !important; }
.st-joinbox .k { display: block; font-size: 1.5cqw; font-weight: 700; color: #4b4f7a; }
.st-joinbox .code { display: block; font-family: var(--f-mono); font-size: 4.4cqw; letter-spacing: .14em; }
.st-joinbox .url { display: block; font-size: 1cqw; color: #4b4f7a; word-break: break-all; }
.st-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.6cqw; align-items: stretch; min-height: 0; }
.lteam { background: var(--stage-2); border: 1px solid var(--stage-line); border-radius: 1.6cqw; padding: 2cqw; display: flex; flex-direction: column; gap: 1.2cqw; min-height: 0; overflow: hidden; }
.lteam h3 { font-family: var(--f-display); font-size: 2.5cqw; line-height: 1.05; }
.lteam ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8cqw; }
.lteam li { display: flex; align-items: center; gap: 1cqw; font-size: 1.8cqw; font-weight: 600; }
.lteam li i { width: 1.3cqw; height: 1.3cqw; border-radius: 50%; background: #55e0a8; flex: none; }
.lteam li.off { color: var(--stage-muted); font-weight: 500; }
.vsbig { align-self: center; font-family: var(--f-display); font-weight: 800; font-size: 3.6cqw; color: var(--ms-gold); }
.st-intro { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.6cqw; }
.rnum { font-family: var(--f-mono); font-size: 1.7cqw; color: var(--ms-gold); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.rname { font-family: var(--f-display); font-weight: 800; font-size: 7cqw; line-height: .95; letter-spacing: -.02em; }
.st-intro p { font-size: 2.1cqw; max-width: 70cqw; margin: 0; color: var(--stage-muted); }
.wz { display: flex; align-items: center; gap: 1.2cqw; } .swz { width: 5.4cqw; height: 5.4cqw; flex: none; }
.bubble { background: var(--stage-fg); color: var(--stage-bg); font-weight: 600; font-size: 1.6cqw; padding: .9cqw 1.4cqw; border-radius: 1.4cqw 1.4cqw 1.4cqw .3cqw; }
.qtop { display: flex; justify-content: space-between; align-items: flex-start; gap: 2cqw; }
.qtag { display: flex; flex-direction: column; gap: .4cqw; }
.qtag .k { font-family: var(--f-mono); font-size: 1.35cqw; font-weight: 700; color: var(--ms-gold); letter-spacing: .08em; text-transform: uppercase; }
.qtag .t { font-size: 1.4cqw; color: var(--stage-muted); }
.ring { width: 8cqw; height: 8cqw; position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; } .ring .bg { stroke: var(--stage-line); }
.ring .fg { stroke: var(--ms-gold); stroke-linecap: round; stroke-dasharray: 276.46; transition: stroke-dashoffset .2s linear; }
.ring strong { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-mono); font-size: 3cqw; }
.locked-tag { font-family: var(--f-display); font-weight: 800; font-size: 1.8cqw; background: var(--stage-fg); color: var(--stage-bg); padding: .6cqw 1.4cqw; border-radius: 99px; white-space: nowrap; }
.st-q { font-family: var(--f-display); font-weight: 600; font-size: 3.4cqw; line-height: 1.12; letter-spacing: -.01em; }
.st-q.small { font-size: 2.3cqw; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2cqw; flex: 1; min-height: 0; }
.tiles.compact { grid-template-columns: 1fr 1fr; flex: none; gap: .9cqw; }
.tile { border-radius: 1.3cqw; padding: 1.2cqw 1.6cqw; display: flex; align-items: center; gap: 1.4cqw; font-weight: 700; font-size: 2.2cqw; line-height: 1.15; position: relative; transition: opacity .3s, transform .3s; }
.tiles.compact .tile { font-size: 1.6cqw; padding: .8cqw 1.2cqw; gap: 1cqw; }
.tile i { font-style: normal; font-family: var(--f-display); font-weight: 800; font-size: 1.3em; width: 1.6em; height: 1.6em; border-radius: .45em; display: grid; place-items: center; background: rgba(255,255,255,.22); flex: none; }
.tile small { margin-left: auto; font-family: var(--f-mono); font-size: .9em; opacity: .9; }
.tiles.dim .tile { opacity: .55; }
.tile.fade { opacity: .22; }
.tile.correct { box-shadow: 0 0 0 .35cqw #fff; transform: scale(1.02); }
.tile.correct::after { content: "\2713"; margin-left: .6cqw; font-size: 1.3em; font-weight: 800; }
.tile.chosen { box-shadow: 0 0 0 .4cqw #fff, 0 0 2.4cqw .4cqw rgba(255,255,255,.45); transform: scale(1.03); animation: pulse 1.2s ease-in-out infinite; }
.tile.wrongpick { background: #b3261e; color: #fff; box-shadow: 0 0 0 .35cqw #fff; }
.tile.wrongpick::after { content: "\2717"; margin-left: auto; font-size: 1.3em; }
@keyframes pulse { 50% { box-shadow: 0 0 0 .4cqw #fff, 0 0 3.6cqw .8cqw rgba(255,255,255,.6); } }
.st-foot { display: flex; justify-content: space-between; align-items: center; gap: 2cqw; font-size: 1.55cqw; color: var(--stage-muted); font-weight: 600; }
.st-foot b { color: var(--stage-fg); }
.turn-banner { display: inline-flex; background: var(--stage-fg); color: var(--stage-bg); font-weight: 800; font-size: 1.8cqw; padding: .6cqw 1.4cqw; border-radius: 99px; }
.turn-banner.bonus { background: var(--ms-gold); color: var(--on-gold); }
.miss { font-family: var(--f-display); font-weight: 800; font-size: 2.2cqw; color: #ffb38f; }
.rev { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1.6cqw; align-items: start; min-height: 0; }
.gain { display: flex; gap: 1cqw; flex-wrap: wrap; align-content: flex-start; }
.gain div { background: var(--stage-2); border: 1px solid var(--stage-line); border-radius: 1cqw; padding: .9cqw 1.3cqw; font-size: 1.5cqw; font-weight: 600; }
.gain b { display: block; font-family: var(--f-mono); font-size: 2.6cqw; color: #7ef0c4; } .gain b.z { color: var(--stage-muted); }
.lesson { background: #fff; color: #1b1d24; border-radius: 1.4cqw; padding: 1.4cqw 1.6cqw; display: flex; flex-direction: column; gap: .7cqw; border: .25cqw solid var(--ms-blue); overflow: hidden; }
.lesson .nt { font-size: 1.35cqw; font-weight: 800; color: var(--ms-blue); }
.lesson p { margin: 0; font-size: 1.6cqw; line-height: 1.45; }
.sb { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2.2cqw; }
.sb h2 { font-family: var(--f-display); font-weight: 800; font-size: 3.6cqw; }
.bar { display: grid; grid-template-columns: 24cqw 1fr 10cqw; gap: 1.6cqw; align-items: center; }
.bar .nm { font-size: 2.1cqw; font-weight: 700; } .bar .nm small { display: block; font-size: 1.25cqw; color: var(--stage-muted); font-weight: 500; }
.bar .tr { height: 4.4cqw; background: var(--stage-2); border-radius: 1cqw; overflow: hidden; }
.bar .fl { height: 100%; border-radius: 1cqw; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bar .fl.tA { background: var(--ms-blue); } .bar .fl.tB { background: var(--ms-orange); }
.bar .sc { font-family: var(--f-mono); font-size: 3.2cqw; font-weight: 700; text-align: right; }
.st-end { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.8cqw; position: relative; }
.st-end .k { font-family: var(--f-mono); font-size: 1.6cqw; color: var(--ms-gold); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.st-end h2 { font-family: var(--f-display); font-weight: 800; font-size: 5.6cqw; line-height: 1; letter-spacing: -.015em; max-width: 80cqw; }
.st-end p { font-size: 2.2cqw; color: var(--stage-muted); margin: 0; }
.confetti { position: absolute; inset: -3cqw; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -4cqw; width: 1cqw; height: 1.6cqw; border-radius: .2cqw; animation: fall 3.2s linear infinite; }
@keyframes fall { to { transform: translateY(60cqw) rotate(540deg); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Photos and school logos ---------- */
.row.nowrap { flex-wrap: nowrap; }
.bad { color: var(--bad); }
.avt { position: relative; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; color: #fff; width: 32px; height: 32px; }
.avt b { font-weight: 800; font-size: .38em; line-height: 1; font-size: 12px; }
.avt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avt.xs { width: 22px; height: 22px; } .avt.xs b { font-size: 9px; }
.avt.sm { width: 30px; height: 30px; } .avt.sm b { font-size: 11px; }
.avt.md { width: 40px; height: 40px; } .avt.md b { font-size: 14px; }
.avt.lg { width: 64px; height: 64px; } .avt.lg b { font-size: 22px; }
.avt.xl { width: 96px; height: 96px; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--ms-blue); } .avt.xl b { font-size: 34px; }
.tlogo { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: #fff; overflow: hidden; width: 32px; height: 32px; border: 1px solid var(--line); }
.tlogo img { width: 100%; height: 100%; object-fit: contain; }
.tlogo.none { background: var(--primary-soft); color: var(--primary-dk); font-weight: 800; font-size: 12px; }
.tlogo.xs { width: 22px; height: 22px; font-size: 9px; } .tlogo.sm { width: 30px; height: 30px; } .tlogo.md { width: 44px; height: 44px; }
.tlogo.lg { width: 64px; height: 64px; } .tlogo.xl { width: 96px; height: 96px; font-size: 30px; } .tlogo.xxl { width: 140px; height: 140px; font-size: 44px; }
.plist li { gap: 10px; }
.teams2 h3.row { gap: 8px; }

/* Player additions */
.pbar { gap: 10px; }
.pme { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.profile { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: var(--bg); }
.profile b { display: block; font-size: 18px; }
.vsline { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); }
.vsline em { font-style: normal; font-weight: 500; margin: 0 4px; }
.tpick { display: flex; align-items: center; gap: 10px; }

/* Audience screen additions (sizes follow the projector frame) */
.stage .avt { color: #fff; }
.stage .avt.md { width: 3.4cqw; height: 3.4cqw; } .stage .avt.md b { font-size: 1.2cqw; }
.stage .avt.lg { width: 6cqw; height: 6cqw; box-shadow: 0 0 0 .3cqw var(--stage-fg); } .stage .avt.lg b { font-size: 2cqw; }
.stage .tlogo { border: 0; }
.stage .tlogo.xs { width: 1.9cqw; height: 1.9cqw; font-size: .7cqw; margin-right: .5cqw; }
.stage .tlogo.md { width: 3.6cqw; height: 3.6cqw; font-size: 1.2cqw; }
.stage .tlogo.lg { width: 5cqw; height: 5cqw; font-size: 1.6cqw; }
.stage .tlogo.xxl { width: 14cqw; height: 14cqw; font-size: 4cqw; box-shadow: 0 0 0 .5cqw var(--ms-gold); }
.st-score span { display: inline-flex; align-items: center; }
.lteam .lhead { display: flex; align-items: center; gap: 1.2cqw; }
.lteam li { gap: 1.1cqw; }
.turn-banner { align-items: center; }
.rev-l { display: flex; flex-direction: column; gap: 1.2cqw; min-width: 0; }
.gain span.row { gap: .4cqw; }
.fastest { background: var(--stage-2); border: 1px solid var(--stage-line); border-radius: 1.2cqw; padding: 1cqw 1.3cqw; display: flex; flex-direction: column; gap: .8cqw; }
.fastest .k { font-family: var(--f-mono); font-size: 1.1cqw; font-weight: 700; color: var(--ms-gold); letter-spacing: .1em; text-transform: uppercase; }
.fx { display: flex; align-items: center; gap: 1cqw; }
.fx b { display: block; font-size: 1.5cqw; } .fx small { display: block; font-size: 1.15cqw; color: var(--stage-muted); }
.bar .nm { gap: 1.2cqw; }
.endrow { display: flex; align-items: center; gap: 3cqw; position: relative; }
.endrow > div { display: flex; flex-direction: column; gap: 1.2cqw; }
.winners { display: flex; gap: 2.4cqw; flex-wrap: wrap; position: relative; }
.winners div { display: flex; flex-direction: column; align-items: center; gap: .8cqw; font-size: 1.6cqw; font-weight: 700; }
/* Reveal layout: team gains side by side, fastest fingers below, lesson note on the right */
.rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.gain { flex-wrap: nowrap; }
.gain div { flex: 1; min-width: 0; padding: .7cqw 1cqw; font-size: 1.3cqw; }
.gain b { font-size: 2.2cqw; }
.fastest { padding: .8cqw 1.1cqw; gap: .6cqw; }
.fx { gap: .8cqw; }
.pbar .avt b { color: #fff; font-size: 9px; }
.stage .fastest .avt.md { width: 2.8cqw; height: 2.8cqw; } .stage .fastest .avt.md b { font-size: 1cqw; }
.fx b { font-size: 1.35cqw; } .fx small { font-size: 1.05cqw; }

/* Competition type picker, leaderboard checkbox, MVP */
.seg { display: inline-flex; background: var(--line-2); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font-weight: 700; text-align: left; color: var(--muted); }
.seg button small { display: block; font-weight: 500; font-size: 12px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 3px rgba(20,30,60,.12); }
.cbx { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; grid-column: 1 / -1; }
.cbx input { width: 18px; height: 18px; accent-color: var(--primary); }
.trophy { width: 32px; height: 32px; flex: none; }
.mvpcard { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: #fff7e0; border: 1px solid #f2d27a; }
.mvpcard b { display: block; font-size: 17px; }
.mvpcard.sm { padding: 8px 10px; font-size: 14px; } .mvpcard.sm .trophy { width: 22px; height: 22px; }
.mvp-pic { position: relative; display: inline-block; }
.mvp-trophy { position: absolute; right: -8%; bottom: -6%; }
.mvp-pic.sm .trophy { width: 44px; height: 44px; }
.mvp-line { display: flex; align-items: center; gap: 6px; justify-content: center; } .mvp-line .trophy { width: 22px; height: 22px; }
.st-mvp { flex: 1; display: flex; align-items: center; gap: 5cqw; position: relative; padding-left: 2cqw; }
.st-mvp .avt.mvp { width: 26cqw; height: 26cqw; box-shadow: 0 0 0 .8cqw var(--ms-gold), 0 0 6cqw 1cqw rgba(228,162,12,.45); }
.st-mvp .avt.mvp b { font-size: 9cqw; }
.st-mvp .mvp-trophy .trophy { width: 10cqw; height: 10cqw; filter: drop-shadow(0 .4cqw .8cqw rgba(0,0,0,.4)); }
.mvp-txt { display: flex; flex-direction: column; gap: 1.4cqw; position: relative; }
.mvp-txt .k { font-family: var(--f-mono); font-size: 1.8cqw; color: var(--ms-gold); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.mvp-txt h2 { font-family: var(--f-display); font-weight: 800; font-size: 6.4cqw; line-height: 1; letter-spacing: -.02em; }
.mvp-txt p { font-size: 2.2cqw; color: var(--stage-muted); margin: 0; gap: 1cqw; }
.mvp-stats { display: flex; gap: 1.4cqw; margin-top: .6cqw; }
.mvp-stats div { background: var(--stage-2); border: 1px solid var(--stage-line); border-radius: 1.2cqw; padding: 1cqw 1.8cqw; }
.mvp-stats b { display: block; font-family: var(--f-mono); font-size: 3.4cqw; color: var(--ms-gold); }
.mvp-stats span { font-size: 1.3cqw; color: var(--stage-muted); font-weight: 600; }
.winners .mvp-mini span { display: flex; align-items: center; gap: .5cqw; color: var(--ms-gold); }
.winners .mvp-mini .trophy { width: 2cqw; height: 2cqw; }
.winners .mvp-mini .avt { box-shadow: 0 0 0 .3cqw var(--ms-gold); }

/* ---------- Round 2 captain mode ---------- */
.capt { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: #fff3c4; color: #7a5200; white-space: nowrap; flex: none; }
.plist .capt { margin-left: auto; }
.seg.sm { padding: 3px; border-radius: 10px; margin-top: 6px; }
.seg.sm button { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.hud-tally { display: flex; gap: 6px; flex-wrap: wrap; }
.hud-tally span { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; border-radius: 9px; padding: 4px 10px 4px 4px; font-size: 15px; }
.hud-tally i { font-style: normal; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: rgba(255,255,255,.28); font-size: 12px; }
.hud-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.hud-list li { display: flex; align-items: center; gap: 8px; }
.hud-list .nm { flex: 1; min-width: 0; } .hud-list li > b { width: 22px; text-align: center; } .hud-list em { font-style: normal; color: var(--muted); font-size: 12px; width: 70px; }
.hud-list li > b:last-child { margin-right: 78px; }
.hud-role { margin: 0; font-size: 14px; color: var(--muted); }
.hud-role.cap { color: var(--fg); font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.popts.hud { margin-top: 0; }
.popts.hud .popt { position: relative; opacity: .82; }
.popts.hud .popt.on { opacity: 1; outline: 4px solid var(--fg); outline-offset: 2px; }
.popts.hud .popt > span { flex: 1; min-width: 0; }
.popt .who { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.popt .mini { font-size: 11px; font-weight: 700; background: rgba(255,255,255,.28); border-radius: 99px; padding: 1px 7px; }
.popt .hc { flex: none; min-width: 28px; height: 28px; border-radius: 99px; background: #fff; color: var(--fg); display: grid; place-items: center; font-size: 14px; }
.reacts { display: flex; gap: 6px; flex-wrap: wrap; }
.reacts button { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 12px; font-weight: 700; font-size: 13px; color: var(--fg); }
.reacts button.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dk); }
.hud-said { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.center-t { text-align: center; margin: 0; }
.lteam li .capt { font-size: 1.05cqw; padding: .2cqw .7cqw; }
.split { margin: 0; font-size: 1.45cqw; color: var(--stage-muted); font-weight: 600; } .split b { color: var(--stage-fg); }
.st-foot .split { font-size: 1.35cqw; }
