/* Kwis phone controller: dark game-show look, huge touch targets, safe-area aware, no zoom or text selection.
   Panel colours/shapes match the TV and the remote's colour keys (src/shared/protocol.js PANELS). */
@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap; src: url('/tv/fonts/manrope-500.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url('/tv/fonts/manrope-700.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url('/tv/fonts/manrope-800.woff2') format('woff2'); }

:root {
  --bg: #0b0a1f; --bg2: #15133a; --card: rgba(255,255,255,.06); --card2: rgba(255,255,255,.1); --line: rgba(255,255,255,.1);
  --text: #fff; --muted: #b3b0d6; --dim: #726f9c; --gold: #ffc83d; --gold2: #ff9f1c;
  --red: #ff4d5e; --green: #2fd27a; --yellow: #ffc83d; --blue: #3d8bff;
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  --l: env(safe-area-inset-left, 0px); --r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  background: radial-gradient(130% 55% at 50% -12%, #3a2690 0%, rgba(58,38,144,0) 62%),
              radial-gradient(90% 45% at 110% 105%, rgba(61,139,255,.28), rgba(61,139,255,0) 60%),
              radial-gradient(70% 40% at -15% 90%, rgba(255,77,94,.16), rgba(255,77,94,0) 60%), var(--bg);
  color: var(--text); font: 500 16px/1.35 Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation; -webkit-text-size-adjust: 100%;
}
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .35; }
[hidden] { display: none !important; }
h1, h2 { margin: 0; letter-spacing: -.02em; }

#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding-left: var(--l); padding-right: var(--r); }
header { flex: none; display: flex; align-items: center; padding: calc(var(--top) + 10px) 16px 8px; min-height: calc(var(--top) + 58px); }
main { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 16px 16px; display: flex; flex-direction: column; }
main > section { flex: 1; display: flex; flex-direction: column; min-height: min-content; }
footer { flex: none; padding: 6px 12px calc(var(--bot) + 10px); }
body:not(.has-foot) main { padding-bottom: calc(var(--bot) + 16px); }

/* brand + connection + score */
.brand { display: flex; align-items: center; font-weight: 800; font-size: 24px; letter-spacing: -.04em; }
.mark { display: inline-grid; grid-template-columns: 9px 9px; gap: 3px; margin-right: 9px; transform: rotate(45deg); }
.mark i { width: 9px; height: 9px; border-radius: 2.5px; }
.mark .r { background: var(--red); } .mark .g { background: var(--green); } .mark .y { background: var(--yellow); } .mark .b { background: var(--blue); }
#hud { flex: 1; display: flex; justify-content: center; }
.hud { display: flex; align-items: baseline; gap: 6px; padding: 5px 14px; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.hud b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hud small { color: var(--gold); font-weight: 800; font-size: 13px; }
.fh { align-self: center; width: 44px; height: 8px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; margin-right: 4px; }
.fh i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--gold), var(--green)); transition: width .4s; }
.fh.out i { background: var(--dim); }
.conn { display: flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--card); font-weight: 800; font-size: 14px; letter-spacing: .12em; color: var(--muted); }
.conn i { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.conn span:not(:empty) { margin-left: 8px; }
.conn.ok i { background: #4fe08f; box-shadow: 0 0 10px #4fe08f; }
.conn.wait i { background: var(--gold); animation: blink 1s infinite; }
.conn.bad i { background: var(--red); animation: blink .6s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* common bits */
.center { justify-content: center; align-items: center; text-align: center; }
.center-t { text-align: center; }
.sub { color: var(--muted); margin: 8px 0 0; font-size: 15px; }
.lbl { margin: 22px 2px 10px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 20px; border-radius: 16px; font-weight: 800; font-size: 16px; transition: transform .1s; }
.btn:active { transform: scale(.96); }
.btn.primary { color: #251700; background: linear-gradient(180deg, #ffd96b, var(--gold) 45%, var(--gold2)); box-shadow: inset 0 2px 0 rgba(255,255,255,.55), inset 0 -4px 0 rgba(140,70,0,.35), 0 12px 28px -10px rgba(255,170,30,.8); }
.btn.big { width: 100%; height: 62px; font-size: 20px; border-radius: 20px; }
.btn.ghost { background: var(--card2); color: var(--text); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; font-weight: 800; font-size: 14px; background: var(--card2); }
.chip.gold { background: rgba(255,200,61,.16); color: var(--gold); }
.chip.hot { background: rgba(255,120,40,.18); color: #ffad6b; margin-top: 12px; }
.seg { flex: 1; height: 42px; padding: 0 12px; border-radius: 12px; font-weight: 800; font-size: 15px; color: var(--muted); }
.seg.on { background: var(--text); color: #14112e; box-shadow: 0 6px 18px -6px rgba(255,255,255,.5); }
.segs, .langs { display: flex; padding: 4px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.pulse-dots { display: inline-flex; gap: 8px; margin-bottom: 22px; }
.pulse-dots i { width: 16px; height: 16px; border-radius: 4px; animation: hop 1.1s infinite ease-in-out; }
.pulse-dots i:nth-child(1) { background: var(--red); } .pulse-dots i:nth-child(2) { background: var(--green); animation-delay: .12s; }
.pulse-dots i:nth-child(3) { background: var(--yellow); animation-delay: .24s; border-radius: 50%; } .pulse-dots i:nth-child(4) { background: var(--blue); animation-delay: .36s; }
.pulse-dots.sm { margin: 0 10px 0 0; gap: 4px; vertical-align: middle; } .pulse-dots.sm i { width: 8px; height: 8px; border-radius: 2px; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } }

.enter > section { animation: enter .38s cubic-bezier(.2,.9,.3,1.15); }
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

/* avatars */
.av { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #3a3670, #1d1a44); box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av b { display: none; font-weight: 800; font-size: .5em; }
.av.noimg b, .av.emoji b { display: block; }
.av.emoji b { font-size: .62em; line-height: 1; }
.av { font-size: 40px; }
.av.sm { width: 34px; height: 34px; font-size: 34px; } .av.md { width: 54px; height: 54px; font-size: 54px; }
.av.lg { width: 60px; height: 60px; font-size: 60px; } .av.xl { width: 72px; height: 72px; font-size: 72px; }

/* no code */
.intro h1 { font-size: 26px; max-width: 300px; } .intro h2 { font-size: 22px; }
.qr-ill { display: grid; grid-template-columns: 44px 44px; gap: 10px; margin-bottom: 28px; transform: rotate(-8deg); }
.qr-ill i { width: 44px; height: 44px; border-radius: 10px; }
.qr-ill i:nth-child(1) { background: var(--red); } .qr-ill i:nth-child(2) { background: var(--green); } .qr-ill i:nth-child(3) { background: var(--yellow); } .qr-ill i:nth-child(4) { background: var(--blue); }
.codeform { display: flex; gap: 8px; margin-top: 28px; width: 100%; max-width: 320px; }
.codeform input { flex: 1; min-width: 0; height: 62px; border: 0; outline: 0; border-radius: 18px; background: var(--card2); color: var(--text); text-align: center;
  font: 800 30px Manrope, sans-serif; letter-spacing: .3em; text-indent: .3em; text-transform: uppercase; box-shadow: inset 0 0 0 2px var(--line); }
.codeform input:focus { box-shadow: inset 0 0 0 2px var(--gold); }
.codeform .btn { height: 62px; border-radius: 18px; }

/* join */
.join { display: flex; flex-direction: column; padding-bottom: 8px; }
.join .langs { align-self: flex-end; width: 230px; margin-top: 2px; }
.join .title { font-size: 34px; font-weight: 800; margin: 18px 2px 0; background: linear-gradient(90deg, #fff, #d9d2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.join .name { width: 100%; height: 62px; padding: 0 18px; border: 0; outline: 0; border-radius: 18px; background: var(--card2); color: var(--text);
  font: 800 24px Manrope, sans-serif; box-shadow: inset 0 0 0 2px var(--line); -webkit-appearance: none; appearance: none; }
.join .name:focus { box-shadow: inset 0 0 0 2px var(--gold); }
.join .name::placeholder { color: var(--dim); font-weight: 700; }
.avgrid { display: grid; grid-auto-flow: column; grid-template-rows: 72px 72px; grid-auto-columns: 72px; gap: 10px; margin: 0 -16px; padding: 2px 16px 6px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent); }
.avgrid::-webkit-scrollbar { display: none; }
.avpick { scroll-snap-align: start; }
.avpick { display: flex; align-items: center; justify-content: center; height: 72px; border-radius: 18px; background: var(--card); transition: transform .12s, background .2s; }
.avpick.on { background: rgba(255,200,61,.18); box-shadow: inset 0 0 0 3px var(--gold); }
.avpick.on .av { animation: pop .3s; }
.avpick:active { transform: scale(.92); }
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 14px; min-height: 92px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: transform .12s; }
.tier .ti { font-size: 24px; line-height: 1; margin-bottom: 8px; }
.tier b { font-size: 16px; font-weight: 800; }
.tier small { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tier.on { background: rgba(255,200,61,.14); box-shadow: inset 0 0 0 3px var(--gold); }
.tier:active { transform: scale(.96); }
.join .go { position: sticky; bottom: 0; margin-top: 26px; }

/* lobby */
.youre-in { font-size: 40px; font-weight: 800; text-align: center; margin: 10px 0 16px; background: linear-gradient(90deg, var(--red), var(--gold) 35%, var(--green) 65%, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop .5s; }
.mecard { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 22px; background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.04)); box-shadow: inset 0 0 0 1px var(--line); }
.mecard > div { flex: 1; min-width: 0; }
.mecard b { display: block; font-size: 22px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mecard small { color: var(--muted); font-size: 14px; } .mecard em { color: var(--gold); font-style: normal; font-weight: 800; }
.waithost { display: flex; align-items: center; justify-content: center; margin: 20px 0 0; padding: 16px; border-radius: 18px; background: var(--card); color: var(--muted); font-weight: 700; }
.hostbox { margin-top: 16px; padding: 16px; border-radius: 22px; background: rgba(255,200,61,.07); box-shadow: inset 0 0 0 1px rgba(255,200,61,.3); }
.hostbox .lbl { margin-top: 14px; }
.hb-title { color: var(--gold); font-weight: 800; font-size: 15px; }
.hostbox .start { margin-top: 18px; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 12px 8px; }
.plist li { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: pop .35s; }
.plist li span { max-width: 100%; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist li.me .av { box-shadow: 0 0 0 3px var(--gold); } .plist li.me span { color: var(--text); }
.plist li.off { opacity: .35; }

/* round intro */
.rtag { align-self: center; margin: 2px 0 10px; padding: 6px 14px; border-radius: 99px; background: var(--card2); color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.rintro .rtitle { font-size: 42px; font-weight: 800; line-height: 1.05; margin: 12px 0 14px; animation: pop .5s; }
.rintro .rrule { color: var(--muted); font-size: 19px; max-width: 340px; margin: 0; }

/* question screens */
.qscreen { gap: 12px; }
.qhead { text-align: center; }
.qhead h2 { font-size: 26px; font-weight: 800; }
.topic { color: var(--gold); font-weight: 800; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.qsmall { margin: 0 0 10px; font-size: 17px; font-weight: 700; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-align: center; }
.readq .qtext { font-size: 28px; font-weight: 800; line-height: 1.2; margin: 18px 0 26px; animation: enter .5s; }
.readq .chip { margin-bottom: 4px; }
.getready { display: flex; align-items: center; color: var(--muted); font-weight: 700; margin: 0; }
.timer { height: 10px; border-radius: 10px; background: rgba(255,255,255,.1); overflow: hidden; }
.timer i { display: block; height: 100%; border-radius: 10px; transform-origin: left center; background: linear-gradient(90deg, var(--red), var(--gold) 50%, var(--green)); animation: drain linear forwards; }
@keyframes drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.locked .timer i, .over .timer i { animation-play-state: paused; opacity: .35; }

.grid4 { flex: 1; min-height: 300px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; }
.panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 10px; border-radius: 24px; text-align: center;
  font-weight: 800; font-size: 19px; line-height: 1.15; color: #fff; overflow: hidden; overflow-wrap: anywhere;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.4), inset 0 -7px 0 rgba(0,0,0,.2), 0 14px 26px -12px var(--c);
  transition: transform .12s ease, opacity .3s, filter .3s; }
.panel::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 45%; background: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,0)); pointer-events: none; }
.panel .shape { font-size: 46px; line-height: 1; margin-bottom: 10px; text-shadow: 0 3px 0 rgba(0,0,0,.2); }
.panel .txt { text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.p0 { --c: #ff4d5e; background: linear-gradient(165deg, #ff6d7c, #ff4d5e 45%, #e23447); }
.p1 { --c: #2fd27a; background: linear-gradient(165deg, #4fe596, #2fd27a 45%, #1fb562); color: #04301a; }
.p2 { --c: #ffc83d; background: linear-gradient(165deg, #ffd96b, #ffc83d 45%, #f5ad12); color: #3a2600; }
.p3 { --c: #3d8bff; background: linear-gradient(165deg, #64a3ff, #3d8bff 45%, #2370e6); }
.p1 .txt, .p2 .txt, .p1 .shape, .p2 .shape { text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.answer.open .panel:active, .wager:not(.done) .panel:active { transform: scale(.95); }
.answer.wait .panel { filter: saturate(.35) brightness(.55); }
.answer.over .panel:not(.picked) { filter: grayscale(.8) brightness(.45); }
.panel.dim { opacity: .2; filter: grayscale(.6); transform: scale(.96); }
.panel.picked { transform: scale(1.03); z-index: 1; box-shadow: 0 0 0 4px #fff, 0 0 40px -4px var(--c), inset 0 -7px 0 rgba(0,0,0,.2); animation: pop .3s; }
.panel.hid { background: rgba(255,255,255,.04) !important; color: transparent !important; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); pointer-events: none; }
.panel.hid .shape { color: rgba(255,255,255,.12); text-shadow: none; }
.panel.hid .txt { visibility: hidden; }
.panel.hid::before { display: none; }
.panel.seqd { filter: brightness(.72) saturate(.8); }
.panel .seq { position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #14112e; font-style: normal; font-size: 24px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(0,0,0,.35); animation: pop .25s; }
.wager .amt { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.status { text-align: center; padding: 14px; border-radius: 18px; font-weight: 800; font-size: 18px; background: var(--card); }
.status.ok { color: #6ff0a6; background: rgba(47,210,122,.12); animation: pop .3s; }
.status.bad { color: #ff8a95; background: rgba(255,77,94,.12); }
.status.help { color: var(--gold); font-size: 14px; background: rgba(255,200,61,.1); }
.orderbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 18px; background: var(--card); font-weight: 700; color: var(--muted); font-size: 14px; }

/* reveal */
.result { text-align: center; padding: 20px 16px 18px; border-radius: 26px; animation: pop .45s; }
.result .r-ico { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; }
.result h1 { font-size: 36px; font-weight: 800; }
.result .gain { font-size: 44px; font-weight: 800; margin-top: 2px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.result .gain.neg { color: #ff8a95; }
.result.right { background: radial-gradient(120% 120% at 50% 0%, rgba(47,210,122,.35), rgba(47,210,122,.08)); box-shadow: inset 0 0 0 2px rgba(47,210,122,.5); }
.result.right .r-ico { background: var(--green); color: #04301a; box-shadow: 0 0 30px rgba(47,210,122,.7); }
.result.right .gain { color: #7dffb4; }
.result.wrong { background: radial-gradient(120% 120% at 50% 0%, rgba(255,77,94,.32), rgba(255,77,94,.07)); box-shadow: inset 0 0 0 2px rgba(255,77,94,.45); }
.result.wrong .r-ico { background: var(--red); }
.result.late, .result.partly { background: rgba(255,200,61,.12); box-shadow: inset 0 0 0 2px rgba(255,200,61,.4); }
.result.late .r-ico, .result.partly .r-ico { background: var(--gold); color: #3a2600; }
.result.none { background: var(--card); } .result.none .r-ico { background: var(--card2); }
.reveal .qsmall { margin: 6px 0 0; }
.grid4.mini { flex: none; min-height: 0; grid-template-rows: auto auto; }
.grid4.mini .panel { min-height: 92px; font-size: 15px; padding: 12px 8px; border-radius: 18px; }
.grid4.mini .shape { font-size: 26px; margin-bottom: 6px; }
.panel.right { opacity: 1; filter: none; transform: scale(1.03); box-shadow: 0 0 0 4px #fff, 0 0 34px -2px var(--c); animation: pop .5s .2s both; }
.panel.mine:not(.right) { opacity: .55; box-shadow: 0 0 0 3px rgba(255,255,255,.6); }
.panel .you { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.45); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.olist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.olist li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; font-weight: 800; animation: enter .4s both; }
.olist li:nth-child(2) { animation-delay: .1s; } .olist li:nth-child(3) { animation-delay: .2s; } .olist li:nth-child(4) { animation-delay: .3s; }
.olist .n { width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.olist .txt { flex: 1; } .olist .tick { font-size: 20px; }

/* scores / final / ceremony */
.scores, .ceremony { align-items: stretch; }
.bigrank { text-align: center; margin: 6px 0 0; animation: pop .5s; }
.bigrank b { display: block; font-size: 84px; line-height: 1; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(180deg, #fff, #c9c2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bigrank.gold b { background: linear-gradient(180deg, #ffe9a3, var(--gold) 50%, var(--gold2)); -webkit-background-clip: text; background-clip: text; }
.bigrank small { color: var(--muted); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .12em; }
.myscore { text-align: center; font-size: 30px; font-weight: 800; margin: 8px 0 14px; font-variant-numeric: tabular-nums; }
.myscore small { color: var(--muted); font-size: 15px; }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; background: var(--card); animation: enter .4s both; }
.rank li:nth-child(2) { animation-delay: .05s; } .rank li:nth-child(3) { animation-delay: .1s; } .rank li:nth-child(n+4) { animation-delay: .15s; }
.rank li.me { background: rgba(255,200,61,.14); box-shadow: inset 0 0 0 2px rgba(255,200,61,.6); }
.rank .pos { width: 22px; text-align: center; font-weight: 800; color: var(--dim); }
.rank li:nth-child(1) .pos { color: var(--gold); }
.rank .nm { flex: 1; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank .dl { color: #6ff0a6; font-weight: 800; font-size: 13px; }
.rank b { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.ceremony h1 { text-align: center; font-size: 38px; font-weight: 800; }
.medal { font-size: 96px; line-height: 1.1; text-align: center; animation: pop .6s; }
.medal.win { filter: drop-shadow(0 0 30px rgba(255,200,61,.7)); animation: pop .6s, bob 2.4s 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }
.awards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.awards li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--card); }
.awards li.me { background: rgba(255,200,61,.14); box-shadow: inset 0 0 0 2px rgba(255,200,61,.6); }
.awards strong { display: block; font-weight: 800; } .awards small { color: var(--muted); font-weight: 700; }
.ceremony .rank { margin-top: 18px; }
.ceremony > .btn { margin-top: 20px; }

/* footer: reactions + host controls */
.reacts { display: flex; justify-content: space-between; gap: 6px; padding: 6px; border-radius: 22px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); }
.reacts button { flex: 1; height: 52px; border-radius: 16px; font-size: 28px; transition: transform .1s; }
.reacts button:active { transform: scale(1.3); background: var(--card2); }
.hostbar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.hostbar span { flex: 1; color: var(--gold); font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding-left: 6px; }
.hostbar button { height: 40px; padding: 0 16px; border-radius: 12px; background: var(--card2); font-weight: 800; font-size: 14px; }
.hostbar button.hot { background: var(--gold); color: #251700; }
.hostbar button:active { transform: scale(.95); }

/* paused overlay, reactions floating up, toast */
#overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(8,7,24,.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.ov-box { width: 100%; max-width: 340px; text-align: center; }
.ov-ico { font-size: 64px; margin-bottom: 10px; animation: blink 1.6s infinite; }
.ov-box h2 { font-size: 30px; font-weight: 800; }
.ov-box .btn { margin-top: 26px; }
#floaters { position: fixed; left: 0; right: 0; bottom: 0; height: 70%; pointer-events: none; z-index: 15; overflow: hidden; }
.floater { position: absolute; bottom: -40px; font-size: 38px; animation: floatup 2.6s ease-out forwards; }
.floater.mine { font-size: 50px; }
@keyframes floatup { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translateY(-40px) scale(1.1); } 100% { transform: translateY(-460px) translateX(20px) scale(1); opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: calc(var(--bot) + 110px); z-index: 30; transform: translateX(-50%); max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 16px;
  background: #fff; color: #14112e; font-weight: 800; font-size: 14px; text-align: center; box-shadow: 0 14px 34px rgba(0,0,0,.45); }
#toast.show { animation: pop .3s; }

@media (max-height: 640px) {
  .panel { font-size: 16px; } .panel .shape { font-size: 34px; margin-bottom: 6px; }
  .grid4 { min-height: 240px; gap: 10px; }
  .bigrank b { font-size: 64px; }
}
@media (min-width: 600px) { main { width: 100%; max-width: 560px; margin: 0 auto; } }

/* Questions on the TV only: the panels are just big colours and shapes */
.grid4.notext .panel .shape { font-size: 92px; margin-bottom: 0; }
.grid4.mini.notext .panel .shape { font-size: 48px; }
.readq .qtext.lookup { font-size: 34px; }
