/* ================= TV DISPLAY ================= */
:root {
  --t0:#02040d; --t1:#0a1233; --t2:#0d1b5a; --t3:#142a7a; --edge:#7c8cc4; --edgehi:#c7d2fe; --edgelo:#3b4a8a; --ink:#e2e8f0; --ink2:#94a3b8; --ray:rgba(120,150,255,.06);
  --gold: #fbbf24; --gold-2: #fde68a; --gold-3: #b45309;
  --navy: var(--t0); --navy-2: var(--t1); --navy-3: var(--t2);
  --ok: #22c55e; --bad: #ef4444; --amber: #f59e0b;
}
html, body.tv { height: 100%; overflow: hidden; background: var(--t0); color: #e2e8f0; font-family: "Segoe UI", "Nirmala UI", Latha, system-ui, sans-serif; }
body.tv.hide-cursor, body.tv.hide-cursor * { cursor: none !important; }

/* background */
.tv-bg { position: fixed; inset: 0; z-index: 0; background: radial-gradient(ellipse at 50% 35%, var(--t3) 0%, var(--t1) 35%, var(--t0) 70%, var(--t0) 100%); overflow: hidden; }
.tv-bg .rays { position: absolute; left: 50%; top: 40%; width: 220vmax; height: 220vmax; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(120,150,255,.06) 0deg 6deg, transparent 6deg 18deg); animation: spin 180s linear infinite; mask-image: radial-gradient(circle, #000 0%, transparent 55%); -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%); }
.tv-bg .stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 70% 20%, #fff6, transparent), radial-gradient(1.5px 1.5px at 40% 80%, #fff5, transparent), radial-gradient(1px 1px at 85% 65%, #fff7, transparent), radial-gradient(1px 1px at 10% 75%, #fff5, transparent), radial-gradient(1.5px 1.5px at 55% 45%, #fff4, transparent); background-size: 600px 400px; animation: twinkle 6s ease-in-out infinite alternate; }
.tv-bg .vignette { position: absolute; inset: 0; box-shadow: inset 0 0 20vw #000c; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes twinkle { from { opacity: .5 } to { opacity: 1 } }

.tv-frame { position: relative; z-index: 1; height: 100vh; display: flex; flex-direction: column; padding: 1.6vh 2vw 0; }

/* top bar */
.tv-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2vw; height: 7.5vh; }
.logo-orb { width: 4.6vh; height: 4.6vh; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 2.6vh; color: #1a1200;
  background: radial-gradient(circle at 35% 30%, #fff5d6, #fbbf24 45%, #b45309); box-shadow: 0 0 2vh #fbbf2466, inset 0 -.4vh .8vh #0004; flex-shrink: 0; }
.logo-orb.big { width: 12vh; height: 12vh; font-size: 7vh; margin: 0 auto; }
.tv-title { font-size: 2.4vh; font-weight: 800; color: #fff; letter-spacing: .02em; }
.tv-subtitle { font-size: 1.5vh; color: #94a3b8; letter-spacing: .15em; text-transform: uppercase; }
.turn-pill { display: flex; align-items: center; gap: .7vw; padding: .8vh 1.6vw; border-radius: 99px; font-size: 2vh; color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 30%, transparent), color-mix(in srgb, var(--c) 10%, transparent)); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 2vh color-mix(in srgb, var(--c) 30%, transparent); }
.turn-pill .dot { width: 1vh; height: 1vh; border-radius: 50%; background: var(--c); box-shadow: 0 0 1vh var(--c); animation: pulse 1.2s infinite; }
.lvl-legend { display: flex; align-items: center; gap: .4vw; font-size: 1.5vh; color: #cbd5e1; }
.lvl-legend span { width: 1vh; height: 1vh; border-radius: 3px; }
.lvl-legend em { font-style: normal; color: #64748b; margin-left: .2vw; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

/* stage */
.tv-stage { flex: 1; min-height: 0; position: relative; }
.tv-stage > section { position: absolute; inset: 0; }
.stage-center { display: grid; place-items: center; }
.stage-col { display: flex; flex-direction: column; padding: 1vh 0 2vh; }

/* intro */
.intro { text-align: center; }
.intro-ring { width: 26vh; height: 26vh; margin: 0 auto 4vh; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle, #0b1a5a 55%, transparent 56%), conic-gradient(from 0deg, #fbbf24, #b45309, #fde68a, #fbbf24); box-shadow: 0 0 8vh #fbbf2444; animation: glow 3s ease-in-out infinite; }
.intro-ring::after { content: ''; position: absolute; inset: -2vh; border-radius: 50%; border: 2px solid #fbbf2433; animation: ring 3s ease-out infinite; }
.intro-q { font-size: 15vh; font-weight: 900; background: linear-gradient(180deg, #fff5d6, #fbbf24 60%, #b45309); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-kicker { font-size: 2.2vh; letter-spacing: .5em; text-transform: uppercase; color: #fcd34d; }
.intro-title { font-size: 9vh; font-weight: 900; line-height: 1.05; margin-top: 1vh; background: linear-gradient(180deg, #fff 30%, #fde68a 70%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 6vh #fbbf2433; }
.intro-sub { margin-top: 3vh; font-size: 2.4vh; color: #94a3b8; letter-spacing: .1em; }
@keyframes glow { 50% { box-shadow: 0 0 12vh #fbbf2477; } }
@keyframes ring { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }

.section-title { font-size: 5vh; font-weight: 900; color: #fff; text-align: center; letter-spacing: .04em; }
.section-title.gold { background: linear-gradient(180deg, #fff5d6, #fbbf24 60%, #d97706); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* grouping */
.group-head { height: 20vh; display: grid; place-items: center; flex-shrink: 0; }
.spotlight { text-align: center; padding: 2vh 5vw; border-radius: 3vh; min-width: 40vw; background: radial-gradient(ellipse at center, #1e3a8a55, transparent 70%); }
.spot-level { font-size: 2.2vh; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.spot-name { font-size: 7vh; font-weight: 900; color: #fff; line-height: 1.2; transition: transform .2s, color .2s; }
.spotlight.settled .spot-name { color: var(--c); transform: scale(1.08); text-shadow: 0 0 4vh color-mix(in srgb, var(--c) 60%, transparent); }
.spot-team { font-size: 3vh; color: #cbd5e1; } .spot-team b { color: var(--c); }
.teams-grid { flex: 1; min-height: 0; display: grid; gap: 1.2vw; }
.team-col { display: flex; flex-direction: column; min-height: 0; border-radius: 1.6vh; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 18%, var(--t1)), #070d26 60%); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 1vh 4vh #0008, inset 0 1px 0 #ffffff14; }
.team-col-head { display: flex; justify-content: space-between; align-items: center; padding: 1.4vh 1.2vw; font-size: 2.8vh; font-weight: 800; color: #fff; border-bottom: 2px solid var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
.team-col-head em { font-style: normal; font-size: 2vh; color: var(--c); }
.team-col-body { padding: 1vh .8vw; display: flex; flex-direction: column; gap: .8vh; overflow: hidden; }
.member-chip { display: flex; align-items: center; gap: .7vw; padding: .6vh .6vw; border-radius: 1vh; background: #ffffff0a; font-size: 2vh; color: #f1f5f9; }
.member-chip i { width: .9vh; height: .9vh; border-radius: 50%; margin-left: auto; flex-shrink: 0; }
.drop-in { animation: dropIn .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-4vh) scale(.6); } to { opacity: 1; transform: none; } }

/* avatars */
.avatar { border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; font-weight: 800; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #000), #0b1233); border: 2px solid var(--c); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 3.6vh; height: 3.6vh; font-size: 1.4vh; border-width: 1px; }
.avatar.md { width: 8vh; height: 8vh; font-size: 3vh; box-shadow: 0 0 2.5vh color-mix(in srgb, var(--c) 50%, transparent); }
.avatar.lg { width: 13vh; height: 13vh; font-size: 5vh; box-shadow: 0 0 4vh color-mix(in srgb, var(--c) 60%, transparent); border-width: 3px; }

/* board */
.turn-banner { position: relative; display: flex; align-items: center; gap: 2vw; margin: 0 auto 2vh; padding: 1.6vh 3vw 1.6vh 1.6vh; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 25%, var(--t1)), color-mix(in srgb, var(--t1) 80%, transparent)); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 5vh color-mix(in srgb, var(--c) 25%, transparent); animation: banner .6s cubic-bezier(.2, 1.3, .4, 1); }
.tb-team { font-size: 2vh; letter-spacing: .3em; text-transform: uppercase; color: var(--c); font-weight: 700; }
.tb-name { font-size: 5.4vh; font-weight: 900; color: #fff; line-height: 1.1; }
.tb-hint { font-size: 2.2vh; color: #cbd5e1; }
.typed { position: absolute; right: -12vh; top: 50%; transform: translateY(-50%); width: 10vh; height: 10vh; border-radius: 2vh; display: grid; place-items: center; font-size: 5vh; font-weight: 900; color: #1a1200; background: linear-gradient(#fde68a, #f59e0b); box-shadow: 0 0 4vh #fbbf2488; }
@keyframes banner { from { opacity: 0; transform: scale(.85); } }
.boards { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5vw; }
.board { display: flex; flex-direction: column; min-height: 0; border-radius: 2vh; padding: 1.4vh 1vw; background: linear-gradient(180deg, #0c1640ee, #060c28ee); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); transition: opacity .5s, transform .5s, box-shadow .5s; }
.board.active { border-color: var(--c); box-shadow: 0 0 5vh color-mix(in srgb, var(--c) 35%, transparent), inset 0 0 4vh color-mix(in srgb, var(--c) 12%, transparent); transform: scale(1.02); }
.board.dim { opacity: .32; filter: saturate(.5); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 .4vw 1.2vh; margin-bottom: 1.2vh; border-bottom: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.board-head b { font-size: 3vh; color: var(--c); font-weight: 900; letter-spacing: .04em; }
.board-head span { font-size: 1.8vh; color: #94a3b8; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1vh .6vw; align-content: start; overflow: hidden; }
.tiles.many { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7vh .5vw; }
.tile { position: relative; aspect-ratio: 1.15; border-radius: 1.4vh; display: grid; place-items: center; cursor: pointer; transition: transform .15s, box-shadow .2s;
  background: linear-gradient(180deg, #1b2c78, #0d1848); border: 2px solid color-mix(in srgb, var(--c) 55%, #fbbf24); box-shadow: inset 0 1px 0 #ffffff26, 0 .6vh 1.5vh #0007; }
.tile .n { font-size: 3.6vh; font-weight: 900; color: #fff; text-shadow: 0 .2vh .6vh #000a; }
.tiles.many .tile .n { font-size: 2.8vh; }
.board.active .tile:not(.done):hover { transform: translateY(-.4vh) scale(1.06); box-shadow: 0 0 3vh color-mix(in srgb, var(--c) 60%, transparent); }
.board.active .tile:not(.done) { animation: tileGlow 2.4s ease-in-out infinite; }
@keyframes tileGlow { 50% { box-shadow: inset 0 1px 0 #ffffff26, 0 0 2vh color-mix(in srgb, var(--c) 45%, transparent); } }
.tile.done { background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 55%, #000), color-mix(in srgb, var(--tc) 25%, #000)); border-color: var(--tc); cursor: default; opacity: .75; animation: none; }
.tile.done .n { font-size: 2.2vh; opacity: .75; align-self: end; }
.tile .p { font-size: 1.5vh; font-weight: 800; color: #fff; align-self: start; }
.tile.miss { background: #0b1022; border-color: #334155; opacity: .35; }
.tile.miss .n { text-decoration: line-through; align-self: center; }

/* question — millionaire lozenges */
.q-stage { justify-content: center; }
.q-wrap { display: flex; flex-direction: column; gap: 2.2vh; height: 100%; justify-content: center; padding: 0 1vw; }
.q-meta { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2vw; }
.q-badge { display: inline-flex; align-items: center; gap: 1vw; justify-self: start; padding: .8vh 1.6vw .8vh .8vh; border-radius: 99px; background: var(--t1); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); }
.q-badge .num { width: 7vh; height: 7vh; border-radius: 50%; display: grid; place-items: center; font-size: 3.6vh; font-weight: 900; color: var(--t1); background: radial-gradient(circle at 35% 30%, #fff, var(--c)); }
.q-badge .lv { font-size: 2.4vh; font-weight: 800; color: var(--c); }
.q-badge .cat { font-size: 2vh; color: #94a3b8; }
.answerer { justify-self: end; display: flex; align-items: center; gap: 1vw; padding: .8vh 1.6vw .8vh .8vh; border-radius: 99px; background: linear-gradient(90deg, var(--t1), color-mix(in srgb, var(--c) 22%, var(--t1))); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); max-width: 36vw; }
.an-team { font-size: 1.6vh; text-transform: uppercase; letter-spacing: .25em; color: var(--c); font-weight: 700; }
.an-name { font-size: 3.2vh; font-weight: 800; color: #fff; line-height: 1.1; }
.attempts { display: flex; gap: .4vw; margin-top: .4vh; }
.attempts span { font-size: 1.4vh; font-weight: 800; padding: .2vh .6vw; border-radius: 99px; background: #ffffff10; color: #64748b; }
.attempts span.cur { background: var(--gold); color: #1a1200; box-shadow: 0 0 1.2vh #fbbf2488; }
.attempts span.fail { background: #7f1d1d; color: #fecaca; }
.attempts span.win { background: var(--ok); color: #03220f; }

.timer { position: relative; width: 15vh; height: 15vh; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .trk { fill: #07102e; stroke: #ffffff14; stroke-width: 9; }
.timer .bar { fill: none; stroke: #22c55e; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 326.7; transition: stroke-dashoffset .12s linear, stroke .3s; filter: drop-shadow(0 0 .8vh #22c55e); }
.timer.warn .bar { stroke: #f59e0b; filter: drop-shadow(0 0 .8vh #f59e0b); }
.timer.danger .bar { stroke: #ef4444; filter: drop-shadow(0 0 1.2vh #ef4444); }
.timer.danger.run { animation: shake .5s infinite; }
.timer .tval { position: absolute; inset: 0; display: grid; place-items: center; font-size: 6vh; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.timer .tpaused { position: absolute; left: 0; right: 0; bottom: -2.4vh; text-align: center; font-size: 1.5vh; letter-spacing: .3em; text-transform: uppercase; color: #fcd34d; }
@keyframes shake { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }

.lz { --bd: var(--edge); --bg1: var(--t2); --bg2: var(--t0); position: relative; display: block; width: 100%; padding: 2px; border: 0; background: linear-gradient(180deg, var(--edgehi), var(--bd) 50%, var(--edgelo));
  clip-path: polygon(3.5vh 0, calc(100% - 3.5vh) 0, 100% 50%, calc(100% - 3.5vh) 100%, 3.5vh 100%, 0 50%); transition: transform .2s, filter .3s; }
.lz-in { display: flex; align-items: center; gap: 1vw; height: 100%; background: linear-gradient(180deg, var(--bg1), var(--bg2)); clip-path: inherit; padding: 1.6vh 4.5vh; color: #fff; text-align: left; }
.q-box-wrap { position: relative; }
.q-box-wrap::before, .opts::before { content: ''; position: absolute; left: -2vw; right: -2vw; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, var(--edge) 20%, var(--edge) 80%, transparent); z-index: -1; }
.q-box { --bd: #fbbf24; background: linear-gradient(180deg, #fff5d6, #fbbf24 50%, #b45309); }
.q-box .lz-in { justify-content: center; text-align: center; min-height: 17vh; padding: 2.4vh 7vh; font-size: 4.4vh; font-weight: 700; line-height: 1.3; background: radial-gradient(ellipse at 50% 0%, var(--t3), var(--t1) 60%, var(--t0)); }
.q-box.ta .lz-in { font-size: 3.9vh; line-height: 1.45; }
.q-img { display: flex; justify-content: center; } .q-img img { max-height: 20vh; border-radius: 1.5vh; border: 2px solid #fbbf2466; box-shadow: 0 1vh 3vh #000a; }
.opts { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2vh 3vw; }
.opt { cursor: pointer; }
.opt .lz-in { min-height: 9.5vh; font-size: 3.4vh; font-weight: 600; }
.opt .lz-in b { color: var(--gold); font-weight: 900; font-size: 3.4vh; }
.opt:hover { filter: brightness(1.2); }
.opt.selected { --bd: #f59e0b; --bg1: #d97706; --bg2: #92400e; background: linear-gradient(180deg, #fff5d6, #f59e0b 50%, #92400e); animation: selPulse 1s ease-in-out infinite; }
.opt.selected .lz-in b, .opt.locked .lz-in b { color: #fff; }
.opt.locked { --bg1: #f59e0b; --bg2: #b45309; background: linear-gradient(180deg, #fff, #fbbf24 50%, #b45309); animation: lockFlash .35s ease-in-out infinite alternate; }
.opt.correct { --bg1: #16a34a; --bg2: #065f2e; background: linear-gradient(180deg, #dcfce7, #22c55e 50%, #065f2e); animation: correctFlash .45s ease-in-out 5 alternate; }
.opt.correct .lz-in b { color: #fff; }
.opt.wrong { --bg1: #dc2626; --bg2: #7f1d1d; background: linear-gradient(180deg, #fee2e2, #ef4444 50%, #7f1d1d); animation: wrongShake .45s ease-in-out 2; }
.opt.wrong .lz-in b { color: #fff; }
.opt.gone { opacity: .22; filter: grayscale(1); cursor: default; }
.opt.gone .lz-in span { text-decoration: line-through; }
.opt.fade { opacity: .45; }
@keyframes selPulse { 50% { filter: brightness(1.25); } }
@keyframes lockFlash { from { filter: brightness(1); } to { filter: brightness(1.35); } }
@keyframes correctFlash { from { filter: brightness(1); transform: scale(1); } to { filter: brightness(1.45); transform: scale(1.02); } }
@keyframes wrongShake { 25% { transform: translateX(-1vw); } 75% { transform: translateX(1vw); } }

.q-foot { min-height: 9vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1vh; }
.banner { display: flex; align-items: center; gap: 2vw; padding: 1.2vh 3vw; border-radius: 99px; font-size: 3vh; color: #fff; animation: banner .5s cubic-bezier(.2, 1.4, .4, 1); }
.banner b { font-size: 4.4vh; font-weight: 900; letter-spacing: .06em; }
.banner.ok { background: linear-gradient(90deg, #065f46, #16a34a); box-shadow: 0 0 5vh #22c55e66; }
.banner.bad { background: linear-gradient(90deg, #7f1d1d, #b91c1c); box-shadow: 0 0 5vh #ef444466; }
.banner.bad i { font-style: normal; font-weight: 800; }
.banner.reveal { background: linear-gradient(90deg, #1e3a8a, #0e7490); box-shadow: 0 0 5vh #0ea5e966; }
.explain { font-size: 2.2vh; color: #cbd5e1; max-width: 70vw; text-align: center; }
.lock-hint { font-size: 3vh; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: #fcd34d; animation: pulse 1.4s infinite; }

/* finish */
.finish { align-items: center; justify-content: center; gap: 2.2vh; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 2vw; }
.pod { width: 20vw; text-align: center; animation: rise 1.2s cubic-bezier(.2, 1.2, .4, 1) both; }
.pod.p1 { animation-delay: 1.2s; } .pod.p2 { animation-delay: .6s; } .pod.p3 { animation-delay: .2s; }
.pod-crown { font-size: 5.5vh; animation: bob 1.6s ease-in-out infinite; }
.pod-name { font-size: 3.6vh; font-weight: 900; color: #fff; }
.pod-score { font-size: 6vh; font-weight: 900; color: var(--c); text-shadow: 0 0 3vh color-mix(in srgb, var(--c) 60%, transparent); }
.pod-block { margin-top: 1vh; border-radius: 1.5vh 1.5vh 0 0; display: grid; place-items: start center; padding-top: 1.5vh; font-size: 6.5vh; font-weight: 900; color: #0008;
  background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 40%, #000)); box-shadow: 0 0 6vh color-mix(in srgb, var(--c) 40%, transparent); }
.pod.p1 .pod-block { height: 22vh; } .pod.p2 .pod-block { height: 16vh; } .pod.p3 .pod-block { height: 12vh; }
.others { display: flex; gap: 1.5vw; } .others div { display: flex; gap: 1vw; padding: 1vh 1.5vw; border-radius: 99px; background: #ffffff0d; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); font-size: 2.2vh; }
.stars-row { display: flex; align-items: center; gap: 1.5vw; font-size: 2.2vh; }
.stars-row .lbl { color: #fcd34d; letter-spacing: .3em; text-transform: uppercase; font-size: 1.7vh; }
.stars-row .star { padding: .6vh 1.2vw; border-radius: 99px; background: #fbbf2418; border: 1px solid #fbbf2455; } .stars-row em { font-style: normal; color: #fcd34d; }
@keyframes rise { from { opacity: 0; transform: translateY(20vh); } }
@keyframes bob { 50% { transform: translateY(-1vh) rotate(-6deg); } }

/* fixed scoreboard */
.tv-scores { display: grid; gap: 1vw; height: 14.5vh; padding: 1.2vh 0 1.8vh; flex-shrink: 0; }
.score-card { position: relative; border-radius: 1.8vh; padding: 1vh 1.2vw; display: flex; flex-direction: column; justify-content: center; overflow: visible; transition: transform .4s, box-shadow .4s;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, var(--t1)), var(--t0)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-top: 4px solid var(--c); box-shadow: 0 1vh 3vh #0009; }
.score-card.turn { transform: translateY(-.8vh); box-shadow: 0 0 4vh color-mix(in srgb, var(--c) 55%, transparent); }
.score-card.turn::after { content: ''; position: absolute; left: 50%; bottom: -1.1vh; width: 30%; height: .5vh; transform: translateX(-50%); border-radius: 99px; background: var(--c); box-shadow: 0 0 1.5vh var(--c); }
.sc-name { font-size: 2.1vh; font-weight: 800; color: #fff; display: flex; gap: .4vw; align-items: center; white-space: nowrap; overflow: hidden; }
.sc-score { font-size: 5.4vh; font-weight: 900; line-height: 1; color: var(--c); font-variant-numeric: tabular-nums; text-shadow: 0 0 2vh color-mix(in srgb, var(--c) 45%, transparent); }
.sc-meta { font-size: 1.4vh; color: #94a3b8; }
.crown { font-size: 2.2vh; }
.float-pts { position: absolute; right: 1vw; top: 1.5vh; font-size: 4.5vh; font-weight: 900; color: #fde68a; text-shadow: 0 0 2vh #fbbf24; animation: floatUp 1.8s ease-out forwards; pointer-events: none; }
@keyframes floatUp { from { opacity: 0; transform: translateY(2vh) scale(.6); } 20% { opacity: 1; transform: translateY(-2vh) scale(1.2); } to { opacity: 0; transform: translateY(-4vh) scale(1); } }
.sc-summary { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 1.5vw; border-radius: 1.8vh; background: #ffffff08; border: 1px solid #ffffff14; min-width: 9vw; }
.sc-summary div { font-size: 4vh; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; } .sc-summary div span { font-size: 2.4vh; color: #64748b; }
.sc-summary em { font-style: normal; font-size: 1.4vh; letter-spacing: .25em; text-transform: uppercase; color: #94a3b8; }

/* overlays */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.blank { position: fixed; inset: 0; background: #000; z-index: 60; }
.toast { position: fixed; left: 50%; top: 10vh; transform: translateX(-50%); z-index: 70; padding: 1.2vh 2vw; border-radius: 99px; font-size: 2.2vh; color: #1a1200; background: #fde68a; box-shadow: 0 1vh 3vh #000a; }
.offline { position: fixed; right: 1vw; top: 1vh; z-index: 70; padding: .6vh 1vw; border-radius: 99px; background: #7f1d1d; color: #fff; font-size: 1.5vh; }
.unlock { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: radial-gradient(circle, #0b1a5aee, color-mix(in srgb, var(--t0) 96%, transparent)); cursor: pointer; }
.unlock-card { text-align: center; }
.next-fab { position: fixed; right: 2vw; bottom: 17vh; z-index: 50; padding: 1.2vh 2vw; border-radius: 99px; font-size: 2vh; font-weight: 800; color: #1a1200; background: linear-gradient(#fde68a, #f59e0b); box-shadow: 0 1vh 3vh #000a; }

/* ================= v2 additions ================= */
.round-chip { display: flex; align-items: baseline; gap: .4vw; padding: .6vh 1.2vw; border-radius: 99px; font-size: 1.7vh; color: #cbd5e1; background: #ffffff0d; border: 1px solid #ffffff1f; }
.round-chip b { font-size: 2.4vh; color: #fff; } .round-chip em { font-style: normal; color: #64748b; }
.round-chip i { font-style: normal; font-weight: 900; color: #1a1200; background: #fbbf24; border-radius: 99px; padding: 0 .6vw; margin-left: .3vw; }
.round-chip.dbl { border-color: #fbbf2488; box-shadow: 0 0 2vh #fbbf2444; }

/* selection on TV */
.sel { gap: 1.6vh; }
.sel-head { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.sel-title { font-size: 4.6vh; font-weight: 900; color: #fff; line-height: 1.1; }
.sel-sub { font-size: 1.9vh; color: #94a3b8; } .sel-sub b { color: #fcd34d; }
.sel-levels { display: flex; gap: .6vw; }
.sel-lv { --c: #fbbf24; padding: .8vh 1.2vw; border-radius: 99px; font-size: 1.9vh; color: #cbd5e1; background: #ffffff0a; border: 1px solid #ffffff1a; }
.sel-lv b { color: var(--c); } .sel-lv em { font-style: normal; color: #fff; margin-left: .3vw; }
.sel-lv.on { background: color-mix(in srgb, var(--c) 20%, transparent); border-color: var(--c); }
.sel-groups { display: flex; align-items: center; gap: .8vw; font-size: 2vh; color: #cbd5e1; padding: .6vh .8vw; border-radius: 99px; background: #ffffff0a; border: 1px solid #ffffff1a; }
.sel-groups b { font-size: 3vh; color: #fcd34d; min-width: 2vw; text-align: center; }
.sel-groups button { width: 4vh; height: 4vh; border-radius: 50%; font-size: 2.6vh; font-weight: 900; color: #fff; background: #ffffff14; }
.sel-groups button:hover { background: #ffffff2a; }
.sel-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5vw, 1fr)); gap: 1.2vh .8vw; align-content: start; overflow: hidden; }
.sel-grid.dense1 { grid-template-columns: repeat(auto-fill, minmax(11vw, 1fr)); gap: 1vh .6vw; }
.sel-grid.dense2 { grid-template-columns: repeat(auto-fill, minmax(9vw, 1fr)); gap: .8vh .5vw; }
.sel-grid.dense3 { grid-template-columns: repeat(auto-fill, minmax(7.5vw, 1fr)); gap: .6vh .4vw; }
.sel-card { --c: #fbbf24; position: relative; display: flex; align-items: center; gap: .7vw; padding: 1vh .8vw; border-radius: 1.4vh; text-align: left; background: color-mix(in srgb, var(--t1) 80%, transparent); border: 2px solid #ffffff14; opacity: .55; filter: saturate(.4); transition: all .25s cubic-bezier(.2, 1.3, .4, 1); cursor: pointer; }
.sel-card:hover { opacity: .85; }
.sel-card.on { opacity: 1; filter: none; border-color: var(--c); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, var(--t1)), var(--t1)); box-shadow: 0 0 2.5vh color-mix(in srgb, var(--c) 35%, transparent); transform: translateY(-.3vh); }
.sel-av { width: 5vh; height: 5vh; font-size: 1.8vh; }
.dense2 .sel-av, .dense3 .sel-av { width: 3.6vh; height: 3.6vh; font-size: 1.3vh; }
.sel-name { font-size: 2vh; font-weight: 700; color: #fff; line-height: 1.15; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dense2 .sel-name, .dense3 .sel-name { font-size: 1.6vh; }
.sel-lvl { position: absolute; right: .6vw; bottom: .3vh; font-size: 1.1vh; color: var(--c); text-transform: uppercase; letter-spacing: .1em; }
.sel-tick { position: absolute; right: -.8vh; top: -.8vh; width: 2.6vh; height: 2.6vh; border-radius: 50%; display: grid; place-items: center; font-size: 1.5vh; font-weight: 900; color: #1a1200; background: var(--c); transform: scale(0); transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.sel-card.on .sel-tick { transform: scale(1); }
.sel-foot { display: flex; justify-content: flex-end; gap: 1vw; }
.sel-btn { padding: 1.2vh 2vw; border-radius: 99px; font-size: 2.1vh; font-weight: 800; transition: filter .2s; }
.sel-btn.gold { color: #1a1200; background: linear-gradient(#fde68a, #f59e0b); box-shadow: 0 0 3vh #fbbf2444; }
.sel-btn.ghost { color: #e2e8f0; background: #ffffff10; border: 1px solid #ffffff22; }
.sel-btn:hover { filter: brightness(1.15); } .sel-btn:disabled { opacity: .4; }

/* grouping pool */
.group-head { height: auto; min-height: 20vh; padding-bottom: 1.5vh; }
.pool { display: flex; flex-wrap: wrap; justify-content: center; gap: .5vw; max-width: 80vw; margin-top: 1vh; min-height: 4vh; }
.pool-av { width: 3.6vh; height: 3.6vh; font-size: 1.2vh; opacity: .45; animation: jiggle .9s ease-in-out infinite alternate; }
.pool-av.hot { opacity: 1; box-shadow: 0 0 1.4vh var(--c); }
@keyframes jiggle { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-.6vh) rotate(4deg); } }
.team-col-body.tight { gap: .4vh; } .team-col-body.tight .member-chip { padding: .3vh .5vw; font-size: 1.7vh; }

/* end of round */
.round-end { align-items: center; justify-content: center; gap: 2vh; }
.re-kicker { font-size: 2.2vh; letter-spacing: .5em; text-transform: uppercase; color: #fcd34d; }
.re-title { font-size: 8vh; font-weight: 900; line-height: 1; background: linear-gradient(180deg, #fff, #fde68a 60%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.re-list { width: 70vw; display: flex; flex-direction: column; gap: 1.2vh; margin-top: 1vh; }
.re-row { display: grid; grid-template-columns: 5vh 14vw 1fr 7vw 8vw; align-items: center; gap: 1.2vw; padding: 1.2vh 1.5vw; border-radius: 1.6vh; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, var(--t1)), color-mix(in srgb, var(--t1) 67%, transparent)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); animation: slideIn .6s cubic-bezier(.2, 1.2, .4, 1) both; }
.re-rank { width: 5vh; height: 5vh; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 2.6vh; color: var(--t1); background: var(--c); }
.re-name { font-size: 3vh; font-weight: 800; color: #fff; }
.re-bar { height: 1.6vh; border-radius: 99px; background: #ffffff10; overflow: hidden; } .re-bar div { height: 100%; border-radius: 99px; background: var(--c); box-shadow: 0 0 1.5vh var(--c); transition: width 1.2s ease; }
.re-round { font-size: 2.4vh; font-weight: 800; color: #86efac; text-align: right; }
.re-total { font-size: 4.4vh; font-weight: 900; color: var(--c); text-align: right; font-variant-numeric: tabular-nums; }
.re-next { margin-top: 1.5vh; font-size: 2.4vh; color: #cbd5e1; letter-spacing: .1em; animation: pulse 1.6s infinite; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-6vw); } }

/* summary slides */
.slides { position: relative; width: 100%; height: 100%; }
.slide { position: absolute; inset: 0 0 4vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh; }
.dots { position: absolute; left: 0; right: 0; bottom: .5vh; display: flex; justify-content: center; gap: .8vw; }
.dots i { width: 1.2vh; height: 1.2vh; border-radius: 50%; background: #ffffff26; transition: all .3s; } .dots i.on { width: 3.6vh; border-radius: 99px; background: #fbbf24; }
.st-table { width: 80vw; display: flex; flex-direction: column; gap: 1vh; }
.st-row { display: grid; grid-template-columns: 6vh 1fr repeat(var(--r, 3), 10vw) 12vw; align-items: center; gap: 1vw; padding: 1.2vh 1.5vw; border-radius: 1.4vh; background: linear-gradient(90deg, color-mix(in srgb, var(--c, #334155) 20%, var(--t1)), color-mix(in srgb, var(--t1) 67%, transparent)); border: 1px solid color-mix(in srgb, var(--c, #334155) 45%, transparent); animation: slideIn .6s both; }
.st-row.head { background: none; border-color: transparent; padding-top: 0; padding-bottom: 0; font-size: 1.5vh; letter-spacing: .2em; text-transform: uppercase; color: #94a3b8; animation: none; }
.st-row.head span { text-align: center; }
.st-rank { width: 5vh; height: 5vh; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 2.6vh; color: var(--t1); background: var(--c); }
.st-name { font-size: 3.2vh; font-weight: 800; color: #fff; }
.st-cell { font-size: 2.8vh; text-align: center; color: #cbd5e1; font-variant-numeric: tabular-nums; }
.st-total { font-size: 5vh; font-weight: 900; text-align: center; color: var(--c); font-variant-numeric: tabular-nums; }
.stars3 { display: flex; align-items: flex-end; gap: 2.5vw; }
.star-card { width: 20vw; display: flex; flex-direction: column; align-items: center; gap: .6vh; padding: 2.5vh 1vw; border-radius: 2.4vh; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, var(--t1)), var(--t0)); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 5vh color-mix(in srgb, var(--c) 25%, transparent); animation: rise 1s cubic-bezier(.2, 1.2, .4, 1) both; }
.star-card.s1 { order: 2; transform: scale(1.12); } .star-card.s2 { order: 1; } .star-card.s3 { order: 3; }
.medal { font-size: 6vh; line-height: 1; }
.avatar.xl { width: 14vh; height: 14vh; font-size: 5vh; border-width: 3px; box-shadow: 0 0 4vh color-mix(in srgb, var(--c) 55%, transparent); }
.sc-n { font-size: 3.2vh; font-weight: 900; color: #fff; text-align: center; } .sc-t { font-size: 1.8vh; color: var(--c); letter-spacing: .2em; text-transform: uppercase; }
.sc-p { font-size: 2.2vh; color: #cbd5e1; } .sc-p b { font-size: 3.4vh; color: #fcd34d; }
.best-level { display: flex; gap: 1.5vw; }
.bl { display: flex; align-items: baseline; gap: .7vw; padding: 1vh 1.6vw; border-radius: 99px; background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); font-size: 2.2vh; }
.bl em { font-style: normal; color: var(--c); font-size: 1.6vh; letter-spacing: .15em; text-transform: uppercase; } .bl b { color: #fff; } .bl span { color: #94a3b8; }
.awards { display: grid; grid-template-columns: repeat(2, 36vw); gap: 2.4vh 2vw; }
.award { display: grid; grid-template-columns: 10vh 1fr; grid-template-rows: auto auto auto auto; column-gap: 1.5vw; align-items: center; padding: 2vh 2vw; border-radius: 2vh; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 20%, var(--t1)), var(--t0)); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); animation: popIn .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.aw-icon { grid-row: 1 / span 4; font-size: 8vh; text-align: center; }
.aw-title { font-size: 1.8vh; letter-spacing: .2em; text-transform: uppercase; color: #fcd34d; } .aw-ta { font-size: 1.7vh; color: #fde68a99; }
.aw-name { font-size: 3.6vh; font-weight: 900; color: #fff; } .aw-val { font-size: 2vh; color: #cbd5e1; }
@keyframes popIn { from { opacity: 0; transform: scale(.7); } }
.stats { display: grid; grid-template-columns: repeat(3, 24vw); gap: 2vh 1.5vw; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 2.4vh 1vw; border-radius: 2vh; background: #ffffff08; border: 1px solid #ffffff14; animation: popIn .6s both; }
.stat b { font-size: 7vh; font-weight: 900; line-height: 1.1; background: linear-gradient(180deg, #fff, #fcd34d); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat span { font-size: 2vh; color: #94a3b8; }
.hard { width: 75vw; padding: 1.6vh 2vw; border-radius: 1.6vh; background: #7f1d1d33; border: 1px solid #ef444455; }
.hard-t { font-size: 1.7vh; letter-spacing: .2em; text-transform: uppercase; color: #fca5a5; margin-bottom: .6vh; }
.hard-q { font-size: 2.1vh; color: #e2e8f0; } .hard-q b { color: #86efac; }
.thanks .th-title { font-size: 11vh; font-weight: 900; line-height: 1; background: linear-gradient(180deg, #fff 30%, #fde68a 70%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.th-ta { font-size: 6vh; font-weight: 800; color: #fde68a; } .th-sub { font-size: 2.6vh; color: #94a3b8; letter-spacing: .2em; text-transform: uppercase; }
.th-win { font-size: 3vh; color: #cbd5e1; } .th-win b { font-weight: 900; }
.intro-ring.small { width: 16vh; height: 16vh; margin: 0; } .intro-ring.small .intro-q { font-size: 9vh; }
.finish .podium { margin-top: 1vh; }

/* player ticker */
.ticker { position: relative; display: flex; align-items: center; height: 4.6vh; margin-top: .8vh; border-radius: 99px; background: linear-gradient(90deg, var(--t1), var(--t0)); border: 1px solid #ffffff1a; overflow: hidden; flex-shrink: 0; }
.tk-label { flex-shrink: 0; height: 100%; display: grid; place-items: center; padding: 0 1.4vw; font-size: 1.6vh; font-weight: 900; letter-spacing: .25em; color: #1a1200; background: linear-gradient(#fde68a, #f59e0b); z-index: 2; }
.tk-window { flex: 1; overflow: hidden; height: 100%; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.tk-track { display: flex; width: max-content; height: 100%; animation: tickerMove linear infinite; }
.tk-set { display: flex; align-items: center; height: 100%; }
@keyframes tickerMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk-item { display: inline-flex; align-items: baseline; gap: .5vw; padding: 0 1.6vw; font-size: 2vh; color: #e2e8f0; white-space: nowrap; border-right: 1px solid #ffffff14; }
.tk-item em { font-style: normal; color: #94a3b8; font-size: 1.8vh; } .tk-item b { color: var(--c); font-weight: 800; }
.tk-item strong { color: #fff; font-weight: 900; font-variant-numeric: tabular-nums; } .tk-item small { color: #64748b; font-size: 1.5vh; }
.tk-top { flex: 1; display: flex; justify-content: center; align-items: center; height: 100%; }
.tk-flash { position: absolute; left: 0; z-index: 3; height: 100%; display: flex; align-items: center; gap: .6vw; padding: 0 2vw; font-size: 2.2vh; color: #fff; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000), color-mix(in srgb, var(--c) 30%, #000)); border-radius: 99px; box-shadow: 0 0 3vh var(--c); }
.tk-flash b { font-size: 2.6vh; color: #fde68a; }

/* round splash */
.splash { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; background: radial-gradient(circle, #0b1a5acc, color-mix(in srgb, var(--t0) 93%, transparent)); pointer-events: none; }
.splash-in { text-align: center; animation: splashIn 2.6s cubic-bezier(.2, 1.2, .4, 1) both; }
.sp-k { font-size: 3vh; letter-spacing: .6em; text-transform: uppercase; color: #fcd34d; }
.sp-t { font-size: 26vh; font-weight: 900; line-height: 1; background: linear-gradient(180deg, #fff 20%, #fde68a 60%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 5vh #fbbf2466); }
.sp-s { font-size: 3vh; color: #cbd5e1; letter-spacing: .3em; text-transform: uppercase; }
.splash-in.dbl .sp-s { color: #fde68a; font-weight: 900; }
@keyframes splashIn { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.08); } 25% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); } }
.prev-fab { position: fixed; right: 11vw; bottom: 17vh; z-index: 50; padding: 1.2vh 1.4vw; border-radius: 99px; font-size: 2vh; font-weight: 800; color: #e2e8f0; background: #ffffff1a; border: 1px solid #ffffff33; }

.ta-sub { display: block; font-size: .5em; font-weight: 700; color: #fde68acc; letter-spacing: 0; margin-top: .3vh; }
.sel-title .ta-sub { font-size: .55em; }
.section-title .ta-sub { text-align: center; }
.sel-grid { padding-top: 1.2vh; padding-right: 1vh; }
.hidden-soft { display: none !important; }

.re-ta { font-size: 3vh; margin-top: -1vh; }

/* v3: empty groups + draw, rename */
.draw-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: .8vh .6vw; max-width: 90vw; }
.dp-chip { display: flex; align-items: center; gap: .5vw; padding: .5vh .9vw .5vh .5vh; border-radius: 99px; font-size: 1.9vh; font-weight: 700; color: #fff;
  background: color-mix(in srgb, var(--c) 16%, var(--t1)); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); animation: jiggle 1.1s ease-in-out infinite alternate; }
.dp-av { width: 3.4vh; height: 3.4vh; font-size: 1.2vh; border-width: 1px; }
.draw-pool.dense .dp-chip { font-size: 1.5vh; padding: .3vh .6vw .3vh .3vh; } .draw-pool.dense .dp-av { width: 2.6vh; height: 2.6vh; }
.sel-btn.big { font-size: 2.6vh; padding: 1.4vh 2.6vw; animation: glow 2.2s ease-in-out infinite; }
.tc-name { display: inline-flex; align-items: center; gap: .6vw; color: inherit; font: inherit; }
.tc-name i { font-style: normal; font-size: 1.6vh; opacity: 0; transition: opacity .2s; }
.team-col-head:hover .tc-name i { opacity: .7; }
.tc-empty { flex: 1; display: grid; place-items: center; min-height: 20vh; font-size: 12vh; font-weight: 900; color: color-mix(in srgb, var(--c) 35%, transparent); animation: pulse 2s infinite; }
.rn-wrap { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; background: color-mix(in srgb, var(--t0) 80%, transparent); backdrop-filter: blur(4px); }
.rn-card { width: 44vw; padding: 3vh 2.4vw; border-radius: 2.4vh; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 18%, var(--t1)), var(--t0)); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 6vh color-mix(in srgb, var(--c) 30%, transparent); }
.rn-title { font-size: 2.8vh; font-weight: 900; color: #fff; margin-bottom: 1.4vh; }
.rn-input { width: 100%; padding: 1.4vh 1.2vw; border-radius: 1.2vh; font-size: 3.2vh; font-weight: 800; color: #fff; background: var(--t0); border: 2px solid var(--c); outline: none; }
.rn-label { margin: 2vh 0 .8vh; font-size: 1.5vh; letter-spacing: .25em; text-transform: uppercase; color: #94a3b8; }
.rn-picks { display: flex; flex-wrap: wrap; gap: .8vh .5vw; }
.rn-picks button { padding: .6vh 1vw; border-radius: 99px; font-size: 1.8vh; color: #e2e8f0; background: #ffffff0f; border: 1px solid #ffffff22; }
.rn-picks button.on, .rn-picks button:hover { background: color-mix(in srgb, var(--c) 30%, transparent); border-color: var(--c); }
.rn-colors { display: flex; gap: .6vw; } .rn-colors button { width: 4.4vh; height: 4.4vh; border-radius: 50%; border: 3px solid transparent; }
.rn-colors button.on { border-color: #fff; box-shadow: 0 0 1.5vh #fff8; }
.rn-actions { display: flex; justify-content: flex-end; gap: 1vw; margin-top: 2.6vh; }

/* v4: single age board, reading state */
.boards.single { grid-template-columns: minmax(0, 1fr); width: min(92vw, 150vh); margin: 0 auto; }
.boards.single .board { transform: none; }
.boards.single .tiles { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 1.6vh 1vw; }
.boards.single .tiles.many { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 1.2vh .8vw; }
.boards.single .tile { aspect-ratio: 1.5; }
.boards.single .tile .n { font-size: 5vh; }
.boards.single .tiles.many .tile .n { font-size: 4vh; }
.boards.single .board-head b { font-size: 4vh; } .boards.single .board-head span { font-size: 2.4vh; }
.board-enter { animation: boardIn .6s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes boardIn { from { opacity: 0; transform: translateY(4vh) scale(.96); } }
.board-note { margin: -1vh auto 1.4vh; padding: .8vh 2vw; border-radius: 99px; font-size: 2.2vh; color: #1a1200; background: #fde68a; }
.tile.skip { background: #1e1b0f; border-color: #f59e0b88; opacity: .45; }
.tile.skip .n { text-decoration: line-through; align-self: center; }
.tile.skip::after { content: '⚠'; position: absolute; top: .3vh; right: .5vw; font-size: 1.6vh; }
.timer .tpaused { bottom: -2.8vh; white-space: nowrap; }
.speak-fab { position: fixed; right: 2vw; bottom: 24vh; z-index: 50; width: 7vh; height: 7vh; border-radius: 50%; font-size: 3.2vh; background: #ffffff1a; border: 1px solid #ffffff33; }
.speak-fab:hover { background: #ffffff33; }

/* v4.1: skip from TV */
.skip-fab { position: fixed; right: 2vw; bottom: 32vh; z-index: 50; padding: 1.2vh 1.6vw; border-radius: 99px; font-size: 2vh; font-weight: 800; color: #fde68a; background: #78350fcc; border: 1px solid #f59e0b88; }
.skip-fab:hover { background: #92400e; }
.sk-card { --c: #f59e0b; text-align: left; }
.sk-icon { font-size: 6vh; line-height: 1; color: #fbbf24; margin-bottom: 1vh; }
.sk-text { font-size: 2.2vh; color: #e2e8f0; }
.sk-note { margin-top: 1.8vh; font-size: 1.7vh; color: #fcd34d; }
.sel-btn.danger { color: #fff; background: linear-gradient(#f59e0b, #b45309); box-shadow: 0 0 3vh #f59e0b55; }

/* v5: watch-only viewers */
body.tv.viewer .next-fab, body.tv.viewer .prev-fab, body.tv.viewer .skip-fab, body.tv.viewer .speak-fab,
body.tv.viewer .sel-btn, body.tv.viewer .sel-groups button, body.tv.viewer .tc-name i, body.tv.viewer .sel-foot { display: none !important; }
body.tv.viewer .tile, body.tv.viewer .opt, body.tv.viewer .sel-card, body.tv.viewer .tc-name, body.tv.viewer .sel-lv { pointer-events: none; }
body.tv.viewer .viewer-join .sel-btn { display: inline-flex !important; }
.viewer-join { padding: 0 6vw; }
.vj-title { margin-top: 3vh; font-size: clamp(22px, 4vh, 44px); font-weight: 900; color: #fff; }
.vj-sub { font-size: clamp(13px, 2vh, 20px); color: #94a3b8; letter-spacing: .2em; text-transform: uppercase; }
.vj-btns { margin-top: 4vh; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.vj-btns .sel-btn { font-size: clamp(15px, 2.2vh, 22px); padding: 12px 22px; }
.vj-hint { margin-top: 2.5vh; font-size: clamp(12px, 1.6vh, 16px); color: #64748b; }

/* ================= PHONE / PORTRAIT LAYOUT ================= */
@media (max-aspect-ratio: 4/5) {
  html, body.tv { overflow: hidden; }
  .tv-frame { padding: 2vw 3vw 0; }
  .tv-top { grid-template-columns: 1fr auto; height: auto; gap: 2vw; padding-bottom: 1vh; }
  .tv-top > div:nth-child(2) { display: none; }
  .tv-top .lvl-legend { display: none; }
  .logo-orb { width: 8vw; height: 8vw; font-size: 4.5vw; }
  .tv-title { font-size: 4.2vw; } .tv-subtitle { font-size: 2.6vw; }
  .round-chip { font-size: 3vw; padding: .6vh 2.5vw; } .round-chip b { font-size: 4vw; }
  .tv-stage > section { overflow-y: auto; overflow-x: hidden; }
  .stage-col { padding: 1vh 0; }
  .section-title { font-size: 7vw; }
  .ta-sub { font-size: .55em; }

  /* intro */
  .intro-ring { width: 40vw; height: 40vw; } .intro-q { font-size: 22vw; }
  .intro-title { font-size: 11vw; } .intro-kicker { font-size: 3vw; letter-spacing: .3em; } .intro-sub { font-size: 3.4vw; }

  /* players & groups */
  .sel-head { flex-wrap: wrap; } .sel-title { font-size: 6vw; } .sel-sub { font-size: 3vw; }
  .sel-lv { font-size: 3vw; padding: .6vh 2.5vw; }
  .sel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; overflow: visible; }
  .sel-name { font-size: 3.4vw; } .sel-av { width: 8vw; height: 8vw; font-size: 3vw; }
  .group-head { min-height: 0; }
  .spot-name { font-size: 9vw; } .spot-level { font-size: 3vw; } .spot-team { font-size: 4.5vw; }
  .teams-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 2.5vw; flex: none; }
  .team-col-head { font-size: 4.2vw; padding: 1vh 3vw; } .team-col-head em { font-size: 3.4vw; }
  .member-chip { font-size: 3.3vw; padding: .6vh 1.5vw; gap: 1.5vw; } .avatar.sm { width: 6vw; height: 6vw; font-size: 2.2vw; }
  .dp-chip { font-size: 3vw; } .draw-pool { max-width: 94vw; }
  .tc-empty { min-height: 10vh; font-size: 14vw; }

  /* board */
  .turn-banner { padding: 1.2vh 4vw 1.2vh 1.2vh; gap: 3vw; margin-bottom: 1.5vh; max-width: 94vw; }
  .avatar.lg { width: 16vw; height: 16vw; font-size: 6vw; }
  .tb-team { font-size: 2.8vw; } .tb-name { font-size: 6.5vw; } .tb-hint { font-size: 3.2vw; }
  .typed { right: 0; top: -2vh; width: 12vw; height: 12vw; font-size: 6vw; }
  .boards.single { width: 94vw; }
  .boards.single .board-head b { font-size: 6vw; } .boards.single .board-head span { font-size: 3.4vw; }
  .board-note { font-size: 3.2vw; }

  /* question */
  .q-wrap { gap: 1.6vh; justify-content: flex-start; padding: 0; }
  .q-meta { grid-template-columns: auto 1fr; grid-template-areas: "badge timer" "who who"; gap: 1.2vh 2vw; }
  .q-badge { grid-area: badge; padding: .6vh 3vw .6vh .6vh; } .q-badge .num { width: 11vw; height: 11vw; font-size: 5.5vw; }
  .q-badge .lv { font-size: 3.6vw; } .q-badge .cat { display: none; }
  .timer { grid-area: timer; justify-self: end; width: 20vw; height: 20vw; } .timer .tval { font-size: 8vw; } .timer .tpaused { font-size: 2.4vw; bottom: -2.2vh; }
  .answerer { grid-area: who; justify-self: stretch; max-width: none; padding: .6vh 3vw .6vh .6vh; }
  .avatar.md { width: 11vw; height: 11vw; font-size: 4vw; } .an-team { font-size: 2.6vw; } .an-name { font-size: 4.6vw; }
  .attempts span { font-size: 2.6vw; padding: .2vh 2vw; }
  .lz { clip-path: polygon(3vw 0, calc(100% - 3vw) 0, 100% 50%, calc(100% - 3vw) 100%, 3vw 100%, 0 50%); }
  .q-box .lz-in { min-height: 0; padding: 2.4vh 7vw; font-size: 5.4vw; } .q-box.ta .lz-in { font-size: 4.8vw; }
  .q-box-wrap::before, .opts::before { display: none; }
  .opts { grid-template-columns: minmax(0, 1fr); gap: 1.2vh; }
  .opt .lz-in { min-height: 6.5vh; padding: 1.2vh 6vw; font-size: 4.6vw; } .opt .lz-in b { font-size: 4.6vw; }
  .q-img img { max-height: 22vh; max-width: 90vw; }
  .banner { font-size: 3.6vw; padding: 1.2vh 5vw; flex-wrap: wrap; justify-content: center; text-align: center; gap: 1vw 3vw; border-radius: 3vh; }
  .banner b { font-size: 6vw; } .explain { font-size: 3.4vw; } .lock-hint { font-size: 4.4vw; }

  /* round end & summary */
  .re-title { font-size: 12vw; } .re-kicker { font-size: 3vw; } .re-list { width: 94vw; }
  .re-row { grid-template-columns: 8vw 1fr 12vw 14vw; padding: 1vh 3vw; } .re-bar { display: none; }
  .re-rank { width: 8vw; height: 8vw; font-size: 4vw; } .re-name { font-size: 4.4vw; } .re-round { font-size: 3.4vw; } .re-total { font-size: 6vw; } .re-next { font-size: 3.4vw; }
  .slide { justify-content: flex-start; padding-top: 2vh; gap: 2vh; overflow-y: auto; }
  .podium { gap: 2vw; } .pod { width: 29vw; } .pod-name { font-size: 4.4vw; } .pod-score { font-size: 8vw; } .pod-crown { font-size: 9vw; }
  .pod-block { font-size: 9vw; } .pod.p1 .pod-block { height: 20vh; } .pod.p2 .pod-block { height: 14vh; } .pod.p3 .pod-block { height: 10vh; }
  .st-table { width: 94vw; } .st-row { padding: 1vh 2vw; gap: 2vw; } .st-name { font-size: 4vw; } .st-cell { font-size: 3.4vw; } .st-total { font-size: 5.4vw; } .st-rank { width: 7vw; height: 7vw; font-size: 3.4vw; }
  .st-row.head { font-size: 2.2vw; letter-spacing: .05em; }
  .stars3 { flex-wrap: wrap; justify-content: center; gap: 3vw; } .star-card { width: 44vw; padding: 2vh 2vw; } .star-card.s1 { transform: none; order: 0; width: 60vw; }
  .avatar.xl { width: 20vw; height: 20vw; font-size: 7vw; } .medal { font-size: 9vw; } .sc-n { font-size: 4.6vw; } .sc-t { font-size: 2.6vw; } .sc-p { font-size: 3.2vw; } .sc-p b { font-size: 5vw; }
  .best-level { flex-direction: column; align-items: center; gap: 1vh; } .bl { font-size: 3.2vw; }
  .awards { grid-template-columns: minmax(0, 1fr); width: 94vw; gap: 1.5vh; } .award { grid-template-columns: 14vw 1fr; padding: 1.5vh 3vw; }
  .aw-icon { font-size: 10vw; } .aw-title { font-size: 2.6vw; } .aw-ta { font-size: 2.6vw; } .aw-name { font-size: 5vw; } .aw-val { font-size: 3vw; }
  .stats { grid-template-columns: repeat(2, 45vw); gap: 1.5vh 2vw; } .stat b { font-size: 9vw; } .stat span { font-size: 3vw; }
  .hard { width: 94vw; } .hard-q { font-size: 3.2vw; } .hard-t { font-size: 2.4vw; }
  .thanks .th-title { font-size: 16vw; } .th-ta { font-size: 9vw; } .th-sub { font-size: 3vw; } .th-win { font-size: 4.4vw; }
  .intro-ring.small { width: 28vw; height: 28vw; } .intro-ring.small .intro-q { font-size: 15vw; }

  /* ticker & scoreboard */
  .ticker { height: 5vh; } .tk-label { font-size: 2.4vw; padding: 0 3vw; } .tk-item { font-size: 3.4vw; padding: 0 4vw; } .tk-item em { font-size: 3vw; } .tk-item small { font-size: 2.6vw; }
  .tk-flash { font-size: 3.4vw; } .tk-flash b { font-size: 4vw; }
  .tv-scores { grid-template-columns: repeat(var(--nt, 3), minmax(0, 1fr)) !important; height: auto; gap: 2vw; padding: 1vh 0 2vh; }
  .sc-summary { display: none; }
  .score-card { padding: .8vh 3vw; border-radius: 2vw; } .sc-name { font-size: 3.4vw; } .sc-score { font-size: 7vw; } .sc-meta { font-size: 2.6vw; } .crown { font-size: 3.4vw; }
  .score-card.turn { transform: none; } .score-card.turn::after { display: none; }
  .float-pts { font-size: 6vw; }

  .splash .sp-t { font-size: 40vw; } .splash .sp-k { font-size: 4.4vw; } .splash .sp-s { font-size: 4vw; }
  .toast { font-size: 3.6vw; padding: 1.2vh 5vw; }
  .unlock-card { padding: 0 6vw; }
}

/* v5.1 logo */
.brand-box { display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.brand-box img { width: 100%; height: 100%; object-fit: contain; display: block; max-width: none; }
.brand-frame-light { background: #fdf8ec; border-radius: 22%; box-shadow: 0 4px 18px #0006; }
.brand-frame-light img { width: 88%; height: 88%; }
.brand-frame-round { background: #fdf8ec; border-radius: 50%; box-shadow: 0 4px 18px #0006; }
.brand-frame-round img { width: 72%; height: 72%; }
.brand-frame-none { background: transparent; }
.tv-logo-sm { width: 5.6vh; height: 5.6vh; flex-shrink: 0; }
.intro-logo { width: 34vh; height: 34vh; margin: 0 auto 3vh; position: relative; animation: logoIn 1.2s cubic-bezier(.2, 1.2, .4, 1) both; }
.intro-logo > .brand-box { width: 100%; height: 100%; }
.intro-logo::before { content: ''; position: absolute; inset: -3vh; border-radius: 50%; z-index: -1; animation: glow 3s ease-in-out infinite; }
.intro-logo.glow-gold::before { background: radial-gradient(circle, #fbbf2455, transparent 70%); }
.intro-logo.glow-white::before { background: radial-gradient(circle, #ffffff40, transparent 70%); }
.intro-logo.small { width: 20vh; height: 20vh; margin: 0; }
.unlock-logo { width: 22vh; height: 22vh; margin: 0 auto; }
@keyframes logoIn { from { opacity: 0; transform: scale(.7); } }
@media (max-aspect-ratio: 4/5) {
  .tv-logo-sm { width: 9vw; height: 9vw; }
  .intro-logo { width: 60vw; height: 60vw; } .intro-logo.small { width: 34vw; height: 34vw; }
  .unlock-logo { width: 40vw; height: 40vw; }
}

/* choose next player + draw */
.chs { position: fixed; inset: 0; z-index: 70; background: rgba(2, 5, 20, .88); backdrop-filter: blur(10px); display: grid; }
.chs-in { display: flex; flex-direction: column; padding: 1.6vh 2vw; min-height: 0; }
.chs-q { text-align: center; font-size: 2vh; color: #94a3b8; max-width: 80vw; margin: 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chs-head { text-align: center; margin: .6vh 0 1.4vh; display: flex; align-items: baseline; justify-content: center; gap: 2vw; flex-wrap: wrap; }
.chs-title { font-size: 4.6vh; font-weight: 900; color: #fde68a; letter-spacing: .05em; text-shadow: 0 0 3vh #f59e0b88; }
.chs-sub { font-size: 2.2vh; color: #e2e8f0; } .chs-sub b { color: #fbbf24; }
.chs-groups { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 1.4vh 1vw; align-content: start; overflow-y: auto; }
.chs-group { padding: 1vh .8vw; border-radius: 1.6vh; background: color-mix(in srgb, var(--t1) 50%, transparent); border: 2px solid color-mix(in srgb, var(--c) 55%, transparent); min-width: 0; }
.chs-team { display: flex; justify-content: space-between; align-items: baseline; gap: 1vw; font-size: 2.6vh; font-weight: 900; color: var(--c); margin-bottom: .8vh; }
.chs-team small { font-size: 1.8vh; color: #cbd5e1; font-weight: 600; }
.chs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5vw, 1fr)); gap: .8vh .5vw; }
.chs-card { position: relative; display: flex; align-items: center; gap: .6vw; border-radius: 99px 1.4vh 1.4vh 99px; padding: .6vh .8vw .6vh .5vw; background: linear-gradient(#13204f, var(--t1)); border: 2px solid #ffffff22; transition: transform .12s, border-color .12s, box-shadow .12s; min-width: 0; }
.chs-card.clk { cursor: pointer; } .chs-card.clk:hover { border-color: #ffffff66; transform: translateY(-.3vh); }
.chs-card.tick { border-color: #fbbf24; background: linear-gradient(#3a2d0a, #1c1505); box-shadow: 0 0 2.4vh #fbbf2466; }
.chs-av { width: 7vh; height: 7vh; font-size: 2.8vh; border-width: 2px; }
.chs-txt { min-width: 0; flex: 1; }
.chs-name { font-size: 2.4vh; font-weight: 800; color: #fff; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chs-lvl { font-size: 1.5vh; font-weight: 700; color: var(--lc); }
.chs-tick { font-size: 2.6vh; font-weight: 900; color: #fbbf24; }
.n-lg .chs-cards { grid-template-columns: 1fr; } .n-lg .chs-av { width: 9vh; height: 9vh; font-size: 3.6vh; } .n-lg .chs-name { font-size: 3vh; } .n-lg .chs-lvl { font-size: 1.8vh; } .n-lg .chs-card { padding: .9vh 1vw .9vh .6vw; }
.n-sm .chs-av { width: 5.4vh; height: 5.4vh; font-size: 2.2vh; } .n-sm .chs-name { font-size: 2vh; } .n-sm .chs-lvl { display: none; }
.n-xs .chs-av { width: 4.4vh; height: 4.4vh; font-size: 1.8vh; } .n-xs .chs-name { font-size: 1.8vh; } .n-xs .chs-lvl { display: none; } .n-xs .chs-cards { grid-template-columns: repeat(auto-fill, minmax(9.5vw, 1fr)); }
.chs-bar { display: flex; align-items: center; justify-content: center; gap: 1.4vw; margin-top: 1.2vh; min-height: 6vh; }
.ch-hint2 { font-size: 2vh; color: #94a3b8; }
.ch-btn { font-size: 2.8vh; font-weight: 800; padding: 1.1vh 2.2vw; border-radius: 99px; border: 0; cursor: pointer; background: linear-gradient(#fcd34d, #f59e0b); color: #1a1205; }
.ch-btn.ghost { background: #ffffff22; color: #e2e8f0; } .ch-btn.go { background: linear-gradient(#4ade80, #16a34a); } .ch-btn:disabled { opacity: .35; cursor: default; }
.ch-sel { font-size: 2.8vh; color: #86efac; }
.draw-ov { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: radial-gradient(circle, #0b1a4acc, #020617ee); }
.draw-in { text-align: center; }
.dr-k { font-size: 4vh; letter-spacing: .3em; text-transform: uppercase; color: #fde68a; }
.dr-n { font-size: 11vh; font-weight: 900; color: #fff; margin-top: 2vh; text-shadow: 0 0 4vh #38bdf8; }
.dr-n.fin { color: #fbbf24; text-shadow: 0 0 6vh #f59e0b; animation: banner .5s cubic-bezier(.2, 1.4, .4, 1); }
.dr-t { font-size: 4vh; color: #cbd5e1; margin-top: 1vh; }

/* live highlights strip */
.statbar { position: relative; display: flex; align-items: center; height: 5.2vh; margin-top: .8vh; border-radius: 99px; background: linear-gradient(90deg, #0b1a4a, var(--t0)); border: 1px solid #ffffff1f; overflow: hidden; }
.sb-label { flex-shrink: 0; height: 100%; display: flex; align-items: center; gap: .6vw; padding: 0 1.6vw; font-size: 1.9vh; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--t1); background: linear-gradient(90deg, var(--c, #fbbf24), color-mix(in srgb, var(--c, #fbbf24) 70%, #fff)); }
.sb-window { flex: 1; min-width: 0; height: 100%; overflow: hidden; position: relative; }
.sb-item { position: absolute; left: 0; top: 0; height: 100%; display: flex; align-items: center; gap: .8vw; padding: 0 1.4vw; white-space: nowrap; color: #e2e8f0; font-size: 2.3vh; }
.sb-item.in { animation: sbIn .55s cubic-bezier(.2, .9, .3, 1); }
.sb-item.out { animation: sbOut .45s ease-in forwards; }
.sb-item.scroll { animation-name: sbScroll; animation-timing-function: linear; animation-fill-mode: both; }
.sb-av { width: 3.8vh; height: 3.8vh; font-size: 1.5vh; border-width: 2px; }
.sb-name { font-weight: 900; font-size: 2.5vh; } .sb-val { color: #fff; font-weight: 900; font-size: 2.6vh; font-variant-numeric: tabular-nums; }
.sb-sub { color: #94a3b8; font-size: 1.8vh; }
.sb-dots { display: flex; gap: .35vw; padding: 0 1.2vw; flex-shrink: 0; } .sb-dots i { width: .8vh; height: .8vh; border-radius: 50%; background: #ffffff33; } .sb-dots i.on { background: #fbbf24; }
@keyframes sbIn { from { transform: translateX(60%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sbOut { to { transform: translateX(-60%); opacity: 0; } }
@keyframes sbScroll { from { transform: translateX(var(--w)); } to { transform: translateX(-100%); } }

.sb-item { gap: 0; padding: 0; }
.sb-row { display: inline-flex; align-items: center; gap: .6vw; padding: 0 1.4vw; height: 100%; border-right: 1px solid #ffffff14; }
.sb-row:last-child { border-right: 0; }
.sb-rank { font-style: normal; color: #94a3b8; font-size: 2vh; min-width: 1.6vw; text-align: center; }
.sb-name { color: var(--c); }
.statbar .tk-flash { z-index: 5; left: 0; }

/* v6.9 portrait / phone: roomier stats bar and score cards */
@media (max-aspect-ratio: 4/5) {
  .statbar { height: 7vw; min-height: 34px; margin-top: 1vw; }
  .sb-label { font-size: 2.6vw; padding: 0 2.4vw; letter-spacing: .04em; gap: 1vw; }
  .sb-item, .sb-row { font-size: 3.2vw; gap: 1.4vw; }
  .sb-name { font-size: 3.4vw; } .sb-val { font-size: 3.4vw; } .sb-sub { font-size: 2.6vw; }
  .sb-av { width: 5.4vw; height: 5.4vw; font-size: 2.2vw; }
  .sb-row { padding: 0 2.6vw; } .sb-rank { font-size: 3vw; min-width: 4vw; }
  .sb-dots { display: none; }
}

/* grace window before an answer is auto-locked */
.timer .grace { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: .8vh; white-space: nowrap; padding: .5vh 1.2vh; border-radius: 99px; font-size: 2vh; font-weight: 900; color: var(--t1); background: #fbbf24; box-shadow: 0 0 2vh #f59e0b88; animation: gracePulse 1s ease-in-out infinite; z-index: 3; }
@keyframes gracePulse { 50% { transform: translateX(-50%) scale(1.08); } }

/* clean big-screen mode: controls fade away when the mouse is idle (or with H / ?clean=1) */
.tv-ctl { transition: opacity .4s; }
body.tv.ctl-off .tv-ctl { opacity: 0; pointer-events: none; }

/* fixed bottom control bar (all devices) */
.tv-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 1.2vw; flex-wrap: wrap; padding: 1vh 2vw calc(1vh + env(safe-area-inset-bottom, 0px)); min-height: max(8vh, 60px); background: linear-gradient(180deg, transparent, #020514f2 45%); }
.tvb-side { display: flex; align-items: center; gap: 1vw; flex-wrap: wrap; }
.tvb-side:last-child { margin-left: auto; justify-content: flex-end; }
.tvb { min-height: 44px; padding: 1.1vh 2vw; border-radius: 99px; font-size: max(2vh, 15px); font-weight: 800; white-space: nowrap; transition: filter .2s; }
.tvb:hover { filter: brightness(1.15); } .tvb:disabled { opacity: .4; }
.tvb.gold { color: #1a1200; background: linear-gradient(#fde68a, #f59e0b); box-shadow: 0 0 3vh #fbbf2444; }
.tvb.ghost { color: #e2e8f0; background: #ffffff14; border: 1px solid #ffffff2a; }
.tvb.on { background: #14532d99; border-color: #22c55e88; color: #bbf7d0; }
a.tvb { display: inline-flex; align-items: center; text-decoration: none; }
.tvb.warn { color: #fde68a; background: #78350fcc; border: 1px solid #f59e0b88; }
.tvb-hint { color: #94a3b8; font-size: max(2vh, 14px); letter-spacing: .08em; text-transform: uppercase; }
body.tv.has-bar .tv-frame { padding-bottom: max(8vh, 60px); }
@media (max-width: 700px) { .tvb { padding: 1.2vh 4vw; } .tv-bar { gap: 2vw; } }

/* auto-fit number tiles (sizes set by JS) */
.boards.single .tiles, .boards.single .tiles.many { flex: 1; min-height: 0; gap: var(--tg, 1vh) var(--tg, 1vh); justify-content: center; align-content: start; align-content: safe center; overflow-y: auto; scrollbar-width: none; }
.boards.single .tile { aspect-ratio: auto; width: 100%; height: 100%; min-width: 0; }
.boards.single .tile .n, .boards.single .tiles.many .tile .n { font-size: var(--tf, 5vh); line-height: 1; }
.boards.single .tile.done .n { font-size: calc(var(--tf, 5vh) * .7); }
.boards.single .tile .p { font-size: calc(var(--tf, 5vh) * .35); }

@media (max-aspect-ratio: 4/5) { .sc-meta { display: none; } .score-card { padding: .6vh 2vw; } }

/* read-only screens (/watch and /tv): nothing reacts to clicks */
body.tv.viewer .sel-card, body.tv.viewer .tile, body.tv.viewer .opt, body.tv.viewer .tc-name, body.tv.viewer .sel-lv, body.tv.viewer .chs-card, body.tv.viewer .chs-team, body.tv.viewer .sel-groups button, body.tv.viewer .skip-fab { pointer-events: none !important; }

/* ===== v8.2 round-end layout + player stats ===== */
.round-end { gap: 1.4vh; }
.re-head { display: flex; flex-direction: column; align-items: center; gap: .6vh; }
.round-end .re-title { font-size: 6.5vh; }
.re-body { display: flex; gap: 2vw; align-items: flex-start; justify-content: center; width: 96vw; }
.re-body .re-list { width: 30vw; flex: 0 0 30vw; margin-top: 0; }
.re-body .re-row { grid-template-columns: 4.6vh minmax(0, 1fr) 5vw 6vw; padding: 1vh 1vw; }
.re-body .re-bar { display: none; }
.re-body .re-name { font-size: 2.6vh; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.re-body .re-total { font-size: 3.6vh; } .re-body .re-round { font-size: 2.2vh; }
.re-players { flex: 1 1 0; min-width: 0; }
.re-body:not(:has(.re-players:not([style*="none"]))) .re-list { width: 70vw; flex-basis: 70vw; }
.ps { --rh: 4vh; width: 100%; display: flex; flex-direction: column; gap: 1vh; }
.ps.big { width: 92vw; }
.ps-hl { display: flex; flex-wrap: wrap; gap: .8vh .8vw; justify-content: center; }
.ps-chip { display: flex; align-items: center; gap: .7vw; padding: .6vh 1vw; border-radius: 99px; background: color-mix(in srgb, var(--c) 18%, var(--t1)); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); font-size: 1.9vh; color: #e2e8f0; }
.ps-chip .ic { font-size: 2.6vh; } .ps-chip .tt { display: flex; flex-direction: column; line-height: 1.1; } .ps-chip small { font-size: 1.2vh; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; } .ps-chip b { color: #fff; font-weight: 800; } .ps-chip em { font-style: normal; font-weight: 900; color: var(--c); }
.ps-cols { display: grid; grid-template-columns: repeat(var(--pc, 1), minmax(0, 1fr)); gap: 0 1.6vw; align-items: start; }
.ps-col { display: flex; flex-direction: column; gap: .35vh; min-width: 0; }
.ps-row { font-size: calc(var(--rh) * .46); display: grid; align-items: center; gap: .3em; min-height: var(--rh); padding: 0 .6em; border-radius: .8em; text-align: center; font-variant-numeric: tabular-nums; color: #cbd5e1; background: linear-gradient(90deg, color-mix(in srgb, var(--c, #334155) 20%, var(--t1)), color-mix(in srgb, var(--t1) 67%, transparent)); border: 1px solid color-mix(in srgb, var(--c, #334155) 40%, transparent); grid-template-columns: calc(var(--rh) * .8) minmax(0, 1fr) repeat(4, 2.6em) repeat(2, 2.2em) repeat(4, 3em); }
.ps-col.lite .ps-row { grid-template-columns: calc(var(--rh) * .8) minmax(0, 1fr) repeat(4, 2.4em) repeat(2, 2em); }
.ps-col.lite .x { display: none; }
.ps-row.head { background: none; border-color: transparent; min-height: 0; padding-top: 0; padding-bottom: 0; font-size: max(1.2vh, calc(var(--rh) * .3)); letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; }
.ps-row.head .g { border-bottom: 1px solid #94a3b855; letter-spacing: .2em; color: #fcd34d; }
.ps-row.head .g4 { grid-column: span 4; } .ps-row.head .g6 { grid-column: span 6; } .ps-col.lite .ps-row.head .g6 { grid-column: span 2; }
.ps-row.head.grp .g.x { display: none; }
.ps-rank { width: calc(var(--rh) * .62); height: calc(var(--rh) * .62); border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: var(--t1); background: var(--c); font-size: .9em; }
.ps-name { text-align: left; min-width: 0; display: flex; align-items: baseline; gap: .6em; overflow: hidden; white-space: nowrap; }
.ps-name b { color: #fff; font-weight: 800; font-size: 1.15em; overflow: hidden; text-overflow: ellipsis; } .ps-name small { color: #94a3b8; font-size: .75em; overflow: hidden; text-overflow: ellipsis; }
.ps-row .ok { color: #86efac; font-weight: 800; } .ps-row .no { color: #fca5a5; font-weight: 800; } .ps-row .ms { color: #fcd34d; } .ps-row .pt { color: var(--c, #fff); font-weight: 900; }
.ps-idle { text-align: center; font-size: 1.6vh; color: #94a3b8; }
.slide.pstats { gap: 1.6vh; }
@media (orientation: portrait) {
  .re-body { flex-direction: column; align-items: stretch; width: 96vw; gap: 2vh; }
  .re-body .re-list, .re-body:not(:has(.re-players:not([style*="none"]))) .re-list { width: 100%; flex-basis: auto; }
  .re-body .re-row { grid-template-columns: 8vw minmax(0, 1fr) 14vw 14vw; }
  .re-body .re-rank { width: 8vw; height: 8vw; font-size: 4vw; } .re-body .re-name { font-size: 4vw; } .re-body .re-round { font-size: 3.4vw; } .re-body .re-total { font-size: 5.4vw; }
  .round-end .re-title { font-size: 9vw; }
  .ps .x { display: none; } .ps-row { grid-template-columns: calc(var(--rh) * .8) minmax(0, 1fr) repeat(4, 2.4em) repeat(2, 2em); } .ps-row.head .g6 { grid-column: span 2; }
  .ps-row { font-size: calc(var(--rh) * .4); } .ps-cols { grid-template-columns: 1fr; }
  .round-end, .slide.pstats { overflow-y: auto; justify-content: flex-start; }
}
@media (orientation: portrait) { .ps-name small { display: none; } .ps-row { gap: .2em; } .round-end, .slide.pstats { overflow: hidden; } }
@media (orientation: portrait) {
  .round-end { gap: .6vh; } .re-head { gap: 0; } .round-end .re-title { font-size: 6.5vw; } .round-end .re-kicker { font-size: 2vw; }
  .re-body { gap: 1vh; } .re-body .re-list { gap: .6vh; } .re-body .re-row { padding: .4vh 3vw; } .re-body .re-rank { width: 6vw; height: 6vw; font-size: 3vw; }
  .re-body .re-name { font-size: 3.6vw; } .re-body .re-total { font-size: 4.6vw; } .re-body .re-round { font-size: 3vw; }
  .ps-hl { gap: .5vh 1.5vw; } .ps-chip { padding: .3vh 2vw; font-size: 1.5vh; gap: 1.2vw; } .ps-chip .ic { font-size: 2vh; } .ps-chip small { display: none; }
  .re-next { margin-top: 0; font-size: 2vw; }
}

/* v8.3 sound popup */
.snd-card { --c: #38bdf8; width: min(560px, 94vw); text-align: left; max-height: 92vh; overflow-y: auto; }
.snd-note { font-size: 1.6vh; font-size: max(13px, 1.6vh); color: #94a3b8; margin: .6vh 0 1.4vh; }
.snd-row { margin: 1.2vh 0; } .snd-row label { display: flex; justify-content: space-between; align-items: baseline; font-size: max(14px, 1.9vh); color: #e2e8f0; margin-bottom: .4vh; } .snd-row label b { color: #7dd3fc; } .snd-row small { color: #fcd34d; }
.snd-row input[type=range] { width: 100%; height: 34px; accent-color: #38bdf8; }
.snd-tests { display: flex; gap: 1vw; margin: 1vh 0; }
.snd-sw { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 1.2vh; }
.snd-sw button { padding: 10px 12px; border-radius: 12px; border: 1px solid #ffffff22; background: #ffffff0d; color: #94a3b8; font-weight: 700; font-size: max(13px, 1.7vh); text-align: left; }
.snd-sw button.on { background: #0ea5e933; border-color: #38bdf8; color: #e0f2fe; }
.snd-sw button.mute.on { background: #ef444433; border-color: #f87171; color: #fee2e2; grid-column: 1 / -1; }

/* v8.4 round-end slideshow */
.re-stage { position: relative; width: 94vw; min-height: 52vh; display: grid; place-items: center; }
.re-slide { grid-area: 1 / 1; width: 100%; display: flex; justify-content: center; align-items: center; }
.re-stage .re-list { width: 72vw; gap: 1.8vh; }
.re-stage .re-row { padding: 2vh 2vw; grid-template-columns: 7vh 18vw 1fr 8vw 10vw; animation: none; }
.re-stage .re-rank { width: 6vh; height: 6vh; font-size: 3.4vh; } .re-stage .re-name { font-size: 4.2vh; } .re-stage .re-round { font-size: 3vh; } .re-stage .re-total { font-size: 6vh; } .re-stage .re-bar { height: 2vh; }
.hl-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(22vw, 1fr)); gap: 2vw; width: 90vw; }
.hl-card { display: flex; flex-direction: column; align-items: center; gap: .8vh; padding: 4vh 2vw; border-radius: 3vh; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, var(--t1)), var(--t0)); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 5vh color-mix(in srgb, var(--c) 25%, transparent); }
.hl-card .ic { font-size: 8vh; line-height: 1; } .hl-card small { font-size: 2vh; letter-spacing: .25em; text-transform: uppercase; color: #94a3b8; } .hl-card b { font-size: 5vh; color: #fff; font-weight: 900; line-height: 1.1; } .hl-card em { font-style: normal; font-size: 4vh; font-weight: 900; color: var(--c); }
.ps.page { --rh: 5.6vh; width: 90vw; gap: .6vh; }
.ps.page .ps-row { font-size: calc(var(--rh) * .5); }
.ps.page.m-r .ps-row { grid-template-columns: calc(var(--rh) * .8) minmax(0, 1fr) repeat(3, 3em) 4em; }
.ps.page.m-o .ps-row { grid-template-columns: calc(var(--rh) * .8) minmax(0, 1fr) repeat(3, 2.6em) 3.4em 3.4em 3em 3.6em; }
.ps.page .ps-row.head { font-size: calc(var(--rh) * .3); }
.ps.page .ps-row.head.sub span:nth-child(2) { text-align: left; }
.ps.page .ps-row .pt { font-size: 1.2em; }
.re-foot { display: flex; flex-direction: column; align-items: center; gap: .8vh; width: 60vw; }
.re-label { font-size: 2vh; letter-spacing: .2em; text-transform: uppercase; color: #fcd34d; }
.re-dots { display: flex; gap: .8vw; } .re-dots i { width: 1.2vh; height: 1.2vh; border-radius: 50%; background: #ffffff33; } .re-dots i.on { background: #fcd34d; transform: scale(1.3); }
.re-prog { width: 100%; height: .6vh; border-radius: 99px; background: #ffffff14; overflow: hidden; } .re-prog div { height: 100%; background: linear-gradient(90deg, #f59e0b, #fcd34d); }
@media (orientation: portrait) {
  .re-stage { min-height: 60vh; } .re-stage .re-list { width: 94vw; }
  .re-stage .re-row { grid-template-columns: 9vw minmax(0, 1fr) 16vw 18vw; padding: 1.6vh 3vw; } .re-stage .re-bar { display: none; }
  .re-stage .re-rank { width: 8vw; height: 8vw; font-size: 4vw; } .re-stage .re-name { font-size: 5vw; } .re-stage .re-round { font-size: 4vw; } .re-stage .re-total { font-size: 8vw; }
  .hl-big { grid-template-columns: 1fr; } .hl-card { padding: 2vh 3vw; flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .hl-card .ic { font-size: 5vh; } .hl-card b { font-size: 4vh; } .hl-card em { font-size: 3.4vh; }
  .ps.page { --rh: 4.2vh; width: 96vw; } .ps.page .ps-name small { display: none; }
  .re-foot { width: 90vw; }
}
/* v8.4: column widths in --rh units so header and rows line up (header uses a smaller font) */
.ps-row { gap: calc(var(--rh) * .14); padding-left: calc(var(--rh) * .28); padding-right: calc(var(--rh) * .28); grid-template-columns: calc(var(--rh) * .8) minmax(0, 1fr) repeat(4, calc(var(--rh) * 1.2)) repeat(2, calc(var(--rh) * 1)) repeat(4, calc(var(--rh) * 1.4)); }
.ps-col.lite .ps-row { grid-template-columns: calc(var(--rh) * .8) minmax(0, 1fr) repeat(4, calc(var(--rh) * 1.1)) repeat(2, calc(var(--rh) * .92)); }
.ps.page.m-r .ps-row { grid-template-columns: calc(var(--rh) * .8) minmax(0, 1fr) repeat(3, calc(var(--rh) * 1.5)) calc(var(--rh) * 2); }
.ps.page.m-o .ps-row { grid-template-columns: calc(var(--rh) * .8) minmax(0, 1fr) repeat(3, calc(var(--rh) * 1.3)) calc(var(--rh) * 1.7) calc(var(--rh) * 1.7) calc(var(--rh) * 1.5) calc(var(--rh) * 1.9); }
@media (orientation: portrait) { .ps:not(.page) .ps-row { grid-template-columns: calc(var(--rh) * .8) minmax(0, 1fr) repeat(4, calc(var(--rh) * 1.1)) repeat(2, calc(var(--rh) * .92)); } }

/* v8.5 award podium slides */
.award-slide { gap: 2vh; justify-content: center; }
.aw-head { display: flex; align-items: center; justify-content: center; gap: 1.6vw; }
.aw-ic { font-size: 9vh; line-height: 1; } .aw-head .section-title { font-size: 6vh; margin: 0; }
.aw-pod { display: flex; align-items: flex-end; justify-content: center; gap: 2vw; width: 94vw; }
.aw-card { flex: 1 1 0; max-width: 27vw; display: flex; flex-direction: column; align-items: center; gap: .7vh; padding: 2.4vh 1.4vw; border-radius: 3vh; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, var(--t1)), var(--t0)); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); animation: slideIn .7s both; }
.aw-card.p1 { max-width: 32vw; padding: 3.4vh 1.6vw 4vh; box-shadow: 0 0 7vh color-mix(in srgb, var(--c) 45%, transparent); order: 0; animation-delay: .7s; }
.aw-card.p2 { animation-delay: .35s; } .aw-card.p3 { animation-delay: 0s; }
.aw-medal { font-size: 6vh; line-height: 1; } .aw-card.p1 .aw-medal { font-size: 8vh; }
.aw-avs { display: flex; gap: .6vw; justify-content: center; }
.avatar.xxl { width: 22vh; height: 22vh; font-size: 8vh; border-width: 4px; box-shadow: 0 0 5vh color-mix(in srgb, var(--c) 55%, transparent); }
.avatar.lg { width: 9vh; height: 9vh; font-size: 3.2vh; border-width: 3px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.aw-pn { font-size: 3.6vh; font-weight: 900; color: #fff; line-height: 1.1; } .aw-card.p1 .aw-pn { font-size: 4.8vh; }
.aw-pt { font-size: 2vh; color: #94a3b8; } .aw-pv { font-size: 3.2vh; font-weight: 900; color: var(--c); } .aw-card.p1 .aw-pv { font-size: 4.2vh; }
.aw-pm { font-size: 1.8vh; color: #fcd34d; }
@media (orientation: portrait) {
  .aw-pod { flex-direction: column; align-items: stretch; gap: 1.4vh; width: 94vw; }
  .aw-card, .aw-card.p1 { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 1.4vw; padding: 1.4vh 3vw; order: 0; }
  .aw-card.p1 { order: -1; } .aw-card.p2 { order: 0; } .aw-card.p3 { order: 1; }
  .aw-medal, .aw-card.p1 .aw-medal { font-size: 5vh; } .avatar.xxl, .avatar.xl { width: 11vh; height: 11vh; font-size: 4vh; } .avatar.lg { width: 7vh; height: 7vh; }
  .aw-pn, .aw-card.p1 .aw-pn { font-size: 3.4vh; } .aw-pv, .aw-card.p1 .aw-pv { font-size: 2.8vh; } .aw-head .section-title { font-size: 4vh; } .aw-ic { font-size: 6vh; }
}

/* v8.7 top scorer on each team score card */
.sc-top { position: absolute; right: 1.1vw; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: .6vw; max-width: 52%; animation: scTop .5s ease both; }
.sc-top .avatar { width: 5.2vh; height: 5.2vh; font-size: 1.8vh; border-width: 2px; }
.sc-top .st-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sc-top .st-t b { font-size: 1.9vh; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-top .st-t span { font-size: 1.5vh; color: #94a3b8; white-space: nowrap; } .sc-top .st-t em { font-style: normal; font-weight: 800; color: var(--c); } .sc-top .st-t small { font-size: 1.5vh; }
.sc-top .st-dots { display: flex; gap: .3vw; margin-top: .3vh; } .sc-top .st-dots i { width: .8vh; height: .8vh; border-radius: 50%; background: #ffffff33; } .sc-top .st-dots i.on { background: var(--c); }
.sc-top.idle { font-size: 1.5vh; color: #64748b; font-style: italic; animation: none; }
@keyframes scTop { from { opacity: 0; transform: translate(2vw, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
@media (orientation: portrait), (max-aspect-ratio: 4/5) {
  .sc-top { right: 2vw; gap: 1vw; max-width: 56%; } .sc-top .avatar { width: 5vw; height: 5vw; font-size: 1.8vw; } .sc-top .st-t b { font-size: 2.6vw; } .sc-top .st-t span { font-size: 2.2vw; } .sc-top .st-t small { display: none; } .sc-top.idle { display: none; }
}
@media (orientation: portrait), (max-aspect-ratio: 4/5) {
  .sc-top { position: static; transform: none; max-width: 100%; margin-top: .3vh; animation: scTopP .5s ease both; }
  .sc-top .avatar { display: none; } .sc-top .st-t { flex-direction: row; align-items: baseline; gap: 1.2vw; flex-wrap: nowrap; overflow: hidden; }
  .sc-top .st-t b { font-size: 2.8vw; } .sc-top .st-t span { font-size: 2.6vw; } .sc-top .st-dots { margin: 0 0 0 .6vw; align-self: center; }
}
@keyframes scTopP { from { opacity: 0; transform: translateX(3vw); } to { opacity: 1; transform: none; } }

/* tie-break */
.tb-banner{display:flex;gap:1.2vw;align-items:center;justify-content:center;margin:0 auto 1vh;padding:.6vh 2vw;border-radius:999px;background:linear-gradient(90deg,#b45309,#f59e0b);color:#111;font-weight:800;font-size:2.2vh;letter-spacing:.15em;width:max-content;box-shadow:0 0 3vh rgba(245,158,11,.5)}
.tb-banner b{letter-spacing:.02em}
.tb-prompt{margin:0 auto 2vh;padding:1.6vh 2.4vw;border:2px solid #f59e0b;border-radius:2vh;background:rgba(245,158,11,.12);text-align:center;font-size:3vh;color:#fde68a}
.tb-prompt b{color:#fff}.tb-sub{font-size:1.9vh;opacity:.75;margin-top:.6vh}
.pod-tb{font-size:1.8vh;color:#fbbf24;margin-top:.4vh}
.st-tb{font-size:1.7vh;color:#fbbf24;margin-left:.6vw}

/* ===== themes (body.theme-*) ===== */
body.theme-emerald { --t0:#02100a; --t1:#06231a; --t2:#0b5a3d; --t3:#0f7a54; --edge:#6cc4a0; --edgehi:#c7fee6; --edgelo:#2f8a66; --ray:rgba(110,255,190,.06); }
body.theme-royal   { --t0:#0b0518; --t1:#1a0d3a; --t2:#4a1f8f; --t3:#6b32c4; --edge:#a98cc4; --edgehi:#e4d2fe; --edgelo:#6b3a8a; --ray:rgba(190,140,255,.07); }
body.theme-sunrise { --t0:#1a0606; --t1:#3a1010; --t2:#8a2a14; --t3:#c2481f; --edge:#c4968c; --edgehi:#fee2d2; --edgelo:#8a4a3a; --ray:rgba(255,170,110,.08); }
body.theme-light   { --t0:#0b1a4a; --t1:#1e3fa8; --t2:#1d4ed8; --t3:#e8f1ff; --edge:#7c8cc4; --edgehi:#c7d2fe; --edgelo:#3b4a8a; --ink:#0f1e4a; --ink2:#334a85; --ray:rgba(255,255,255,.35); }
body.theme-light .tv-bg { background: radial-gradient(ellipse at 50% 30%, #f4f8ff 0%, #cfe0fb 40%, #9fc2f0 80%); }
body.theme-light .tv-bg .stars { opacity: 0; }
body.theme-light .tv-bg .vignette { box-shadow: inset 0 0 15vw #1e3fa855; }
body.theme-light .tv-title, body.theme-light .section-title { color: #0f1e4a; }
body.theme-light .tv-subtitle, body.theme-light .lvl-legend, body.theme-light .lvl-legend em { color: #334a85; }

/* ===== background picture ===== */
.tv-bg .bg-img { position: absolute; inset: -2vh; background-repeat: no-repeat; background-position: center; z-index: 0; }
.tv-bg .bg-ov { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.tv-bg.has-img .stars { display: none; }
.tv-bg.has-img .rays, .tv-bg.has-img .vignette { z-index: 1; }
body.theme-light .pod-name, body.theme-light .pod-crown { color: #0f1e4a; }
body.theme-light .tb-prompt { background: #0f1e4a; color: #fde68a; }
body.theme-light .tv-top .tv-title { color: #0f1e4a; }
body.theme-light .tv-frame .sc-top, body.theme-light .ps { color: #fff; }
body.theme-light .sc-summary { background: #0b1a4a; border-radius: 1.8vh; }
body.theme-light .round-chip { background: #0b1a4a; color: #fff; }

/* auto-fit selection grid: cards keep normal size when there is room, shrink to fit when there are many, block is centred */
.sel-grid.fit { align-content: center; justify-content: center; padding: 0; }
.sel-grid.fit .sel-card { width: var(--selw); height: var(--selh); zoom: var(--selz); box-sizing: border-box; }
body.theme-light .sel-sub { color: #334a85; } body.theme-light .sel-sub b { color: #b45309; }
body.theme-light .sel-groups, body.theme-light .sel-lv { background: #0b1a4a; border-color: #ffffff22; }
body.theme-light .sel-card:not(.on) { background: #23408f; }

/* groups screen: chips scale with --gz so every member shows */
.team-col-body { flex: 1; min-height: 0; }
.team-col-body .member-chip { font-size: calc(2vh * var(--gz, 1)); padding: 0 .6vw; height: 100%; min-height: 0; gap: calc(.7vw * var(--gz, 1)); }
.team-col-body .avatar.sm { width: calc(3.6vh * var(--gz, 1)); height: calc(3.6vh * var(--gz, 1)); font-size: calc(1.4vh * var(--gz, 1)); }

/* full-screen button on /tv and /watch: shows while the mouse moves, then fades */
.fs-btn { position: fixed; top: 1vh; right: 1vw; z-index: 60; width: 4.6vh; height: 4.6vh; min-width: 34px; min-height: 34px; border-radius: 50%; font-size: 2.4vh; line-height: 1; color: #fff; background: #0008; border: 1px solid #ffffff33; opacity: 0; pointer-events: none; transition: opacity .35s; backdrop-filter: blur(4px); }
.fs-btn.on { opacity: .9; pointer-events: auto; } .fs-btn:hover { background: #000b; opacity: 1; }

/* lobby QR (Players screen) */
.lobby-qr { display: flex; align-items: center; gap: .8vw; margin: 0 1vw; }
.lobby-qr .lq-img { width: 11vh; height: 11vh; padding: .6vh; background: #fff; border-radius: 1vh; flex-shrink: 0; }
.lobby-qr .lq-img svg { width: 100%; height: 100%; display: block; }
.lobby-qr .lq-txt { font-size: 1.7vh; color: var(--ink2); line-height: 1.25; }
/* home button on /watch when installed as an app */
.home-btn { display: none; }
@media (display-mode: standalone) { .home-btn { display: grid; place-items: center; position: fixed; left: 10px; bottom: 10px; z-index: 60; width: 40px; height: 40px; border-radius: 50%; background: #000a; border: 1px solid #ffffff33; color: #fff; font-size: 20px; text-decoration: none; opacity: .8; } }

/* ===== remote bar on phones / portrait tablets: one row (Menu · hint · main button); the rest opens above ===== */
.tvb-more { display: none; }
@media (max-width: 820px) {
  .tv-bar { flex-wrap: nowrap; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); min-height: 0; background: #020514; border-top: 1px solid #ffffff1f; }
  .tvb-side, .tvb-side:last-child { display: contents; }
  .tvb { padding: 0 18px; min-height: 46px; font-size: 16px; }
  .tvb-more { display: inline-flex; align-items: center; flex-shrink: 0; order: 0; }
  .tv-bar .tvb-hint { order: 1; flex: 1; text-align: center; font-size: 13px; }
  .tv-bar .tvb.gold { order: 2; margin-left: auto; }
  .tv-bar .tvb:not(.gold):not(.tvb-more) { display: none; }
  .tv-bar.open { flex-wrap: wrap; }
  .tv-bar.open::before { content: ''; order: 1; flex-basis: 100%; height: 0; }
  .tv-bar.open .tvb-more, .tv-bar.open .tvb-hint, .tv-bar.open .tvb.gold { order: 2; }
  .tv-bar.open .tvb:not(.gold):not(.tvb-more):not([style*="display: none"]) { display: inline-flex; order: 0; flex: 1 1 42%; justify-content: center; }
  body.tv.has-bar .tv-frame { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
}

/* undo + points sheets (remote) */
.pt-wrap { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: #000b; padding: 12px; }
.pt-card { width: min(94vw, 520px); max-height: 92vh; overflow-y: auto; padding: 20px 18px; border-radius: 20px; background: linear-gradient(180deg, var(--t1), var(--t0)); border: 1px solid #ffffff2a; color: #e2e8f0; font-size: 15px; box-shadow: 0 20px 60px #000c; }
.pt-title { font-size: 21px; font-weight: 900; color: #fff; margin-bottom: 10px; } .pt-ico { font-size: 34px; text-align: center; }
.pt-big { font-size: 18px; font-weight: 800; color: #fde68a; background: #fbbf2414; border: 1px solid #fbbf2455; border-radius: 12px; padding: 12px 14px; margin: 6px 0 10px; }
.pt-note { font-size: 13px; color: #94a3b8; line-height: 1.45; } .pt-lbl { margin: 14px 0 6px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #94a3b8; }
.pt-tabs { display: flex; gap: 8px; margin-bottom: 10px; } .pt-tabs button { flex: 1; padding: 10px; border-radius: 99px; font-weight: 800; background: #ffffff12; border: 1px solid #ffffff26; color: #e2e8f0; }
.pt-tabs button.on { background: #fbbf24; color: #1a1200; border-color: #fbbf24; }
.pt-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.pt-teams button { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 14px; background: #ffffff0d; border: 2px solid #ffffff22; color: #fff; }
.pt-teams button span { color: var(--c); font-weight: 800; } .pt-teams button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
.pt-in { width: 100%; padding: 12px; border-radius: 12px; font-size: 16px; color: #fff; background: var(--t0); border: 1px solid #ffffff3a; outline: none; margin-top: 8px; } .pt-in:focus { border-color: #fbbf24; }
.pt-amts, .pt-chips { display: flex; flex-wrap: wrap; gap: 8px; } .pt-amts button { flex: 1 1 30%; padding: 12px 0; border-radius: 12px; font-size: 18px; font-weight: 900; border: 1px solid #ffffff2a; }
.pt-amts .pos { background: #14532d88; color: #bbf7d0; } .pt-amts .neg { background: #7f1d1d88; color: #fecaca; }
.pt-chips button { padding: 7px 12px; border-radius: 99px; font-size: 13px; background: #ffffff0f; border: 1px solid #ffffff22; color: #e2e8f0; } .pt-chips button.on { background: #fbbf2433; border-color: #fbbf24; }
.pt-prev { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #ffffff0d; line-height: 1.6; } .pt-prev b { color: #fde68a; }
.pt-warn { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #78350f88; border: 1px solid #f59e0b88; color: #fde68a; font-size: 13px; line-height: 1.45; }
.pt-log { font-size: 13px; color: #cbd5e1; } .pt-log div { padding: 4px 0; border-top: 1px solid #ffffff12; } .pt-log small { color: #94a3b8; margin-right: 6px; }
.pt-act { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.fs-btn.rl-btn { right: calc(1vw + 5.6vh); }
