/* Trivia Blitz: AndrewNet dark chrome with a bright game-show personality. */
:root {
  --bg: #0d1020;
  --bg2: #151a33;
  --surface: rgba(255,255,255,.06);
  --surface-hi: rgba(255,255,255,.11);
  --text: #f2f3fa;
  --muted: #9aa0bf;
  --accent: #8fb0ff;
  --border: rgba(255,255,255,.12);
  --glow: rgba(110,120,255,.45);
  --hot: #ff2d95;
  --sun: #ffb21f;
  --ok: #3ddc84;
  --bad: #ff4d6d;
  --c0: #ff4d6d; --c1: #2f80ff; --c2: #ffb21f; --c3: #1fc46b;
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
html.tv { font-size: 22px; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--text); overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.45;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(47,111,228,.35), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(123,63,228,.30), transparent 60%),
    radial-gradient(700px 500px at 50% 120%, rgba(255,45,149,.18), transparent 60%),
    var(--bg);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible, html.tv :focus { outline: 3px solid var(--accent); outline-offset: 3px; }

/* floating background shapes */
.bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg i { position: absolute; display: block; border-radius: 30%; opacity: .14; filter: blur(1px); animation: float 22s ease-in-out infinite; }
.bg i:nth-child(1) { width: 140px; height: 140px; left: 6%; top: 18%; background: #ff2d95; }
.bg i:nth-child(2) { width: 90px; height: 90px; left: 80%; top: 12%; background: #ffb21f; border-radius: 50%; animation-delay: -4s; }
.bg i:nth-child(3) { width: 120px; height: 120px; left: 70%; top: 70%; background: #22d3ee; transform: rotate(45deg); animation-delay: -9s; }
.bg i:nth-child(4) { width: 70px; height: 70px; left: 20%; top: 78%; background: #3ddc84; border-radius: 50%; animation-delay: -13s; }
.bg i:nth-child(5) { width: 60px; height: 60px; left: 45%; top: 6%; background: #a66bff; animation-delay: -7s; }
.bg i:nth-child(6) { width: 100px; height: 100px; left: 90%; top: 45%; background: #ff8a3d; border-radius: 50%; animation-delay: -17s; }
@keyframes float { 0%,100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(30px,-40px) rotate(40deg); } }

#fx { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* top bar */
.topbar { position: relative; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 16px; flex-wrap: wrap; }
html.party .topbar { padding-right: 150px; }
html.tv .topbar { padding: 2.5vh 3vw 0; }
.back { color: var(--accent); text-decoration: none; font-weight: 600; font-size: .9rem; padding: 10px 8px; border-radius: 999px; }
.pill { border-radius: 999px; border: 1px solid var(--border); background: var(--surface); padding: 8px 14px; min-height: 44px; font-weight: 600; font-size: .9rem; }
.pill:hover { background: var(--surface-hi); }
.pill.icon span { display: none; }
@media (min-width: 700px) { .pill.icon span { display: inline; } }
.status { color: var(--sun); font-weight: 600; font-size: .9rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--bg2); border: 1px solid var(--border); padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }

/* layout */
.view { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 8px 16px 40px; }
html.tv .view { max-width: none; padding: 1vh 5vw 4vh; }
.loading { text-align: center; color: var(--muted); padding: 30vh 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.tag { color: var(--muted); font-size: 1.05rem; margin: .4rem 0 1rem; text-align: center; }
.hint { color: var(--muted); text-align: center; font-size: .92rem; max-width: 34rem; margin: 1.2rem auto 0; }
.hint.big { font-size: 1.2rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 22px; }

/* buttons */
.btn { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 12px 22px; min-height: 48px; font-weight: 700; font-size: 1rem; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.btn:hover, .btn:focus-visible, html.tv .btn:focus { background: var(--surface-hi); transform: translateY(-2px); }
.btn.primary { background: linear-gradient(135deg, #8fd8ff, #a98bff); color: #0d1020; border: 0; box-shadow: 0 10px 30px -10px var(--glow); }
.btn.primary:hover, .btn.primary:focus-visible, html.tv .btn.primary:focus { background: linear-gradient(135deg, #a9e2ff, #bba3ff); }
.btn.big { font-size: 1.15rem; padding: 16px 28px; min-height: 58px; }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }

/* logo */
.logo { margin: 1rem 0 0; text-align: center; font-weight: 900; letter-spacing: -.02em; line-height: .95; font-size: clamp(3rem, 13vw, 6.5rem); }
.logo span { display: inline-block; }
.logo .l1 { background: linear-gradient(135deg, #ffe14d, #ff8a1f); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); animation: bob 3s ease-in-out infinite; }
.logo .l2 { margin-left: .2em; background: linear-gradient(135deg, #ff5fd2, #a66bff); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); animation: bob 3s ease-in-out -1.5s infinite; }
.logo.small { font-size: clamp(2.2rem, 8vw, 3.6rem); }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }

/* home */
.home { text-align: center; }
.marquee { overflow: hidden; margin: 0 -16px; padding: 6px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-in { display: flex; gap: 10px; width: max-content; animation: scroll 60s linear infinite; }
.mq { white-space: nowrap; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
@keyframes scroll { to { transform: translateX(-50%); } }
.home-buttons { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: 1rem; }
.home-buttons .btn { width: min(100%, 22rem); }

/* join */
.join-card { max-width: 26rem; margin: 2vh auto; display: flex; flex-direction: column; gap: 12px; }
.join-card h2 { margin: 0; }
.join-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--muted); font-size: .9rem; }
.join-card input { background: rgba(0,0,0,.25); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; font-size: 1.2rem; color: var(--text); min-height: 48px; }
#codeIn { text-transform: uppercase; letter-spacing: .3em; font-weight: 800; font-size: 1.6rem; text-align: center; }
.picker-label { font-weight: 600; color: var(--muted); font-size: .9rem; }
.emojis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.emo { font-size: 1.5rem; min-height: 46px; border-radius: 12px; border: 2px solid transparent; background: var(--surface); }
.emo.on { border-color: var(--sun); background: var(--surface-hi); }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.sw { height: 40px; border-radius: 12px; border: 3px solid transparent; background: var(--c); }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.preview { display: flex; justify-content: center; padding: 6px; }
.err { color: var(--bad); min-height: 1.2em; margin: 0; font-weight: 600; }

/* avatars and chips */
.av { display: inline-grid; place-items: center; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; font-size: 1.25rem; background: var(--c); box-shadow: 0 0 0 3px rgba(255,255,255,.15), 0 6px 14px -6px var(--c); line-height: 1; }
.av.big { width: 3.4rem; height: 3.4rem; font-size: 2rem; }
.av.huge { width: 5.5rem; height: 5.5rem; font-size: 3.2rem; }
.av.tiny { width: 1.5rem; height: 1.5rem; font-size: .85rem; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.av.bounce { animation: hop 1s ease-in-out infinite; }
@keyframes hop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.chip { display: inline-flex; align-items: center; gap: .4em; vertical-align: middle; }
.chip b { font-weight: 800; }

/* lobby */
.lobby { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.lobby-players { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: .5rem 0; }
.lp { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; min-width: 5.5rem; animation: popin .4s cubic-bezier(.2,1.6,.4,1) both; }
.lp small { font-size: .7rem; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 0 4px; }
@keyframes popin { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 10px; width: min(100%, 52rem); }
.cyc { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); text-align: left; min-height: 64px; }
.cyc:hover, .cyc:focus-visible, html.tv .cyc:focus { background: var(--surface-hi); border-color: rgba(143,176,255,.45); }
.cl { color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.cv { font-weight: 800; font-size: 1.1rem; }
.joinbox { display: flex; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 18px 26px; text-align: left; }
.joinbox p { margin: 0; }
.qr { width: 9.5rem; height: 9.5rem; border-radius: 14px; background: #fff; padding: 6px; }
.url { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.code { font-size: 3.4rem; font-weight: 900; letter-spacing: .15em; background: linear-gradient(135deg, #ffe14d, #ff5fd2); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.you { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 2vh; }
.you h2 { margin: .3rem 0 0; font-size: 1.8rem; }
.you p { margin: 0; }

/* header row in game */
.hdr { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 10px; }
.hdr > :last-child { justify-self: end; }
.catchip { justify-self: start; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .9rem; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qcount { color: var(--muted); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.timer { position: relative; width: 3.4rem; height: 3.4rem; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 5; }
.tr-bg { stroke: rgba(255,255,255,.1); }
.tr { stroke: var(--ok); stroke-dasharray: 119.4; stroke-linecap: round; transition: stroke .3s; }
.timer b { font-size: 1.3rem; font-weight: 900; }
.timer.hurry { animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }

/* category pick */
.pick { text-align: center; }
.pick-title { font-size: clamp(1.3rem, 4vw, 2rem); margin: .6rem 0 1.2rem; display: flex; flex-wrap: wrap; gap: .4em; justify-content: center; align-items: center; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 13rem; padding: 18px 14px; border-radius: 26px; border: 0; color: #fff;
  background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: 0 14px 30px -12px var(--c2), inset 0 -6px 0 rgba(0,0,0,.18);
  animation: dealin .5s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--i) * .12s); transition: transform .2s, opacity .3s, filter .3s; }
.cat::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(160deg, rgba(255,255,255,.28), transparent 45%); pointer-events: none; }
.cat:hover:not([aria-disabled]), .cat:focus-visible, html.tv .cat:focus { transform: translateY(-6px) scale(1.03); outline: 4px solid #fff; outline-offset: 4px; }
.cat[aria-disabled] { cursor: default; }
.cat-emoji { font-size: 3.6rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
.cat-name { font-size: 1.35rem; font-weight: 900; text-shadow: 0 2px 4px rgba(0,0,0,.35); line-height: 1.15; }
.cat-blurb { font-size: .9rem; opacity: .92; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.cat.chosen { transform: scale(1.08); animation: chosen .6s ease both; z-index: 2; }
.cat.gone { opacity: .2; filter: grayscale(.7); transform: scale(.92); }
@keyframes dealin { from { transform: translateY(40px) rotate(-6deg) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes chosen { 0% { transform: scale(1); } 40% { transform: scale(1.18) rotate(-2deg); } 100% { transform: scale(1.08); } }
.cat-mini { display: flex; flex-direction: column; gap: 8px; }
.cm { padding: 12px; border-radius: 16px; font-weight: 800; background: linear-gradient(135deg, var(--c1), var(--c2)); text-shadow: 0 1px 2px rgba(0,0,0,.35); transition: opacity .3s, transform .3s; }
.cm.chosen { transform: scale(1.04); } .cm.gone { opacity: .25; }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 18px auto 0; max-width: 40rem; }
.bar.thin { height: 4px; margin-top: 14px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffe14d, #ff5fd2); width: 100%; }

/* round intro */
.intro { position: relative; text-align: center; padding: 6vh 0; overflow: hidden; }
.burst { position: absolute; left: 50%; top: 38%; width: 160vmax; height: 160vmax; transform: translate(-50%,-50%); background: repeating-conic-gradient(from 0deg, var(--c1) 0 10deg, transparent 10deg 20deg); opacity: .16; animation: spin 18s linear infinite; z-index: -1; border-radius: 50%; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
.intro-emoji { font-size: 7rem; animation: slam .7s cubic-bezier(.2,1.6,.4,1) both; filter: drop-shadow(0 10px 20px rgba(0,0,0,.4)); }
@keyframes slam { from { transform: scale(3) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.intro-name { font-size: clamp(2.2rem, 8vw, 4.4rem); margin: .2rem 0; font-weight: 900; background: linear-gradient(135deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: brightness(1.25) drop-shadow(0 4px 0 rgba(0,0,0,.3)); animation: rise .6s .2s ease both; }
.intro-blurb { color: var(--text); font-size: 1.2rem; margin: 0; animation: rise .6s .35s ease both; }
.intro-round { color: var(--muted); font-weight: 700; animation: rise .6s .5s ease both; }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* questions */
.question { text-align: center; }
.tbadge { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: #0d1020; animation: rise .4s ease both; }
.t-mc { background: #8fd8ff; } .t-tf { background: #ffe14d; } .t-num { background: #3ddc84; } .t-odd { background: #ff9de2; } .t-first { background: #ffb86b; }
.qtext { font-size: clamp(1.4rem, 4.4vw, 2.5rem); line-height: 1.2; margin: .6rem auto 1.2rem; max-width: 52rem; font-weight: 800; animation: rise .4s .05s ease both; }
.tiles { display: grid; gap: 12px; max-width: 60rem; margin: 0 auto; }
.tiles.four { grid-template-columns: 1fr 1fr; }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tile { position: relative; display: flex; align-items: center; gap: 12px; text-align: left; min-height: 5rem; padding: 14px 18px; border-radius: 20px; border: 0; color: #fff; font-weight: 800; font-size: 1.2rem;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.22), 0 10px 20px -12px rgba(0,0,0,.6); animation: dealin .4s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--i) * .07s + .1s); transition: transform .15s, opacity .3s, filter .3s; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.tile.c0 { background: linear-gradient(135deg, #ff5a7a, #e6194b); }
.tile.c1 { background: linear-gradient(135deg, #4d9bff, #2456e8); }
.tile.c2 { background: linear-gradient(135deg, #ffc23d, #f08c00); }
.tile.c3 { background: linear-gradient(135deg, #3ee08f, #12a150); }
.tile.cT { background: linear-gradient(135deg, #3ee08f, #12a150); justify-content: center; font-size: 1.6rem; min-height: 7rem; }
.tile.cF { background: linear-gradient(135deg, #ff5a7a, #e6194b); justify-content: center; font-size: 1.6rem; min-height: 7rem; }
.tiles.first .tile { min-height: 7rem; font-size: 1.35rem; }
.tile .shape { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: rgba(0,0,0,.2); font-size: 1.2rem; }
.tile .opt { flex: 1; }
.tile:hover:not([aria-disabled]), .tile:focus-visible, html.tv .tile:focus { transform: translateY(-3px) scale(1.02); outline: 4px solid #fff; outline-offset: 3px; }
.tile[aria-disabled] { cursor: default; }
.tile.dim { opacity: .28; filter: grayscale(.5); }
.tile.picked { outline: 4px solid #fff; outline-offset: 3px; }
.tile.correct { animation: correct .6s ease both; box-shadow: 0 0 0 4px #fff, 0 0 40px 6px rgba(255,255,255,.35); }
.tile.correct::after { content: "✓"; position: absolute; right: -10px; top: -12px; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #fff; color: #12a150; display: grid; place-items: center; font-size: 1.3rem; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.tile.dim.picked { opacity: .55; filter: none; outline-color: var(--bad); }
@keyframes correct { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1.03); } }
.who { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; max-width: 40%; }
.lockedmsg { color: var(--sun); font-weight: 800; margin-top: 12px; }

/* closest number */
.numctl { max-width: 34rem; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.numval { font-size: clamp(2.8rem, 12vw, 4.5rem); font-weight: 900; line-height: 1; background: linear-gradient(135deg, #3ddc84, #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.numval small { font-size: .4em; margin-left: .15em; }
.numctl input[type=range] { width: 100%; height: 44px; accent-color: #3ddc84; }
.numctl input[type=range]:focus-visible, html.tv .numctl input[type=range]:focus { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.numends { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; font-weight: 700; margin-top: -6px; }
.nudges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nb { min-height: 48px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-weight: 800; }
.nb:hover, .nb:focus-visible, html.tv .nb:focus { background: var(--surface-hi); }
.numline { position: relative; max-width: 56rem; margin: 2rem auto 1rem; height: 6rem; }
.numline.rev { margin-top: 4rem; height: 13.5rem; }
.nl-track { position: absolute; left: 0; right: 0; top: 2rem; height: 10px; transform: translateY(-50%); border-radius: 99px; background: linear-gradient(90deg, #22d3ee, #3ddc84, #ffe14d, #ff8a3d, #ff4d6d); opacity: .8; }
.nl-ends { position: absolute; left: 0; right: 0; top: 3rem; pointer-events: none; display: flex; justify-content: space-between; color: var(--muted); font-weight: 700; }
.nl-ans { position: absolute; top: 2rem; transform: translate(-50%, -100%); padding-bottom: 14px; animation: drop .5s cubic-bezier(.2,1.6,.4,1) both; }
.nl-ans b { display: block; background: #fff; color: #0d1020; font-weight: 900; padding: 6px 12px; border-radius: 12px; white-space: nowrap; font-size: 1.2rem; }
.nl-ans::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 18px; background: #fff; transform: translateX(-50%); }
.nl-mark { position: absolute; top: calc(2rem + 12px + var(--row) * 2.6rem); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; animation: drop .5s .3s ease both; }
.nl-mark small { font-weight: 700; color: var(--muted); font-size: .75rem; }
.nl-mark i { font-style: normal; position: absolute; left: -1.3rem; top: .1rem; }
.nl-mark.best .av { box-shadow: 0 0 0 3px #ffe14d, 0 0 16px #ffe14d; }
@keyframes drop { from { transform: translate(-50%, -140%); opacity: 0; } }

/* player strip */
.strip { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.si { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 4.6rem; padding: 8px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.si.mine { border-color: rgba(255,225,77,.6); }
.si.off { opacity: .45; }
.si .nm { font-size: .8rem; font-weight: 700; max-width: 6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si .sc { font-size: .8rem; color: var(--muted); font-weight: 700; }
.si i { position: absolute; top: -8px; right: -6px; font-style: normal; font-weight: 900; font-size: .8rem; border-radius: 99px; padding: 2px 7px; }
.si .lock { background: var(--ok); color: #0d1020; animation: popin .3s cubic-bezier(.2,1.6,.4,1) both; }
.si .think { background: rgba(255,255,255,.12); color: var(--muted); }
.si .pts.up { background: #ffe14d; color: #0d1020; animation: popin .4s cubic-bezier(.2,1.6,.4,1) both; }
.si .pts.zero { background: rgba(255,255,255,.12); color: var(--muted); }

/* reveal */
.fact { max-width: 46rem; margin: 18px auto 0; padding: 14px 18px; border-radius: 18px; background: rgba(255,225,77,.08); border: 1px solid rgba(255,225,77,.3); font-size: 1.05rem; animation: rise .5s .4s ease both; }
.revfoot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.verdict { font-size: 2rem; font-weight: 900; margin: 1rem 0; animation: slam .5s cubic-bezier(.2,1.6,.4,1) both; }
.verdict.small { font-size: 1.4rem; margin: .9rem 0 0; }
.verdict.ok { color: var(--ok); } .verdict.no { color: var(--bad); } .verdict.miss { color: var(--sun); }
.verdict b { color: #ffe14d; }
.answer { font-size: 1.15rem; }
.phone-r, .phone-re, .phone-f, .phone-q { text-align: center; }
.myscore { font-weight: 800; font-size: 1.1rem; color: var(--accent); }

/* round end */
.roundend, .final { text-align: center; }
.winner { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 1rem 0 1.4rem; text-align: left; }
.crown-line { font-size: clamp(1.5rem, 5vw, 2.4rem); font-weight: 900; }
.winner .tag { text-align: left; margin: .2rem 0 0; }
.bars { max-width: 44rem; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.brow { display: grid; grid-template-columns: auto 7rem 1fr 4rem 4rem; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; background: var(--surface); animation: rise .4s ease both; animation-delay: calc(var(--i) * .08s); text-align: left; }
.brow.win { background: rgba(255,225,77,.12); border: 1px solid rgba(255,225,77,.4); }
.bn { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt { height: 14px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; }
.bt i { display: block; height: 100%; border-radius: 99px; animation: grow 1s .3s ease both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.brow b { color: #ffe14d; text-align: right; }
.tot { color: var(--muted); font-weight: 700; text-align: right; }
.crown { font-size: 5rem; animation: slam .6s cubic-bezier(.2,1.6,.4,1) both; }

/* final */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; height: 22rem; margin: 1rem auto 0; max-width: 40rem; }
.pod { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.pod b { font-size: 1.1rem; } .pod span { color: var(--muted); font-weight: 700; }
.pod .block { width: 100%; height: var(--h); border-radius: 18px 18px 6px 6px; display: grid; place-items: start center; padding-top: 10px; font-size: 2.4rem; font-weight: 900; color: #0d1020; animation: grow-up .8s cubic-bezier(.2,1.2,.4,1) both; transform-origin: bottom; }
.p1 .block { background: linear-gradient(180deg, #ffe14d, #ffb21f); animation-delay: .6s; }
.p2 .block { background: linear-gradient(180deg, #e2e8f0, #94a3b8); animation-delay: .3s; }
.p3 .block { background: linear-gradient(180deg, #ffb86b, #c2611b); }
@keyframes grow-up { from { transform: scaleY(0); } }
.rest { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 16px; color: var(--muted); font-weight: 700; }
.rest span { display: inline-flex; align-items: center; gap: 6px; }
.final-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }

/* phone tweaks */
@media (max-width: 640px) {
  .cats { grid-template-columns: 1fr; gap: 10px; }
  .cat { min-height: 0; flex-direction: row; justify-content: flex-start; text-align: left; padding: 14px 16px; }
  .cat-emoji { font-size: 2.4rem; }
  .cat-name { font-size: 1.15rem; }
  .cat-blurb { display: none; }
  .tiles.four { grid-template-columns: 1fr; }
  .tile { min-height: 3.8rem; font-size: 1.05rem; padding: 10px 14px; }
  .tile.cT, .tile.cF, .tiles.first .tile { min-height: 5rem; }
  .brow { grid-template-columns: auto 1fr 3.5rem 3.5rem; }
  .brow .bt { display: none; }
  .joinbox { flex-direction: column; text-align: center; }
  .podium { height: 16rem; }
  .av.huge { width: 4.2rem; height: 4.2rem; font-size: 2.4rem; }
  .intro-emoji { font-size: 5rem; }
  .settings { grid-template-columns: 1fr 1fr; }
}

/* TV: big, bold, safe margins */
html.tv .qtext { font-size: 2.6rem; }
html.tv .tile { font-size: 1.5rem; min-height: 6rem; }
html.tv .cat { min-height: 16rem; }
html.tv .strip { margin-top: 2.5vh; }
html.tv .podium { height: 26rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.numline.rev .nl-ends { top: auto; bottom: 0; }
