/*
 * Offradar — radar-scope interface.
 * One typeface (monospace), one glow colour for the player, amber for money
 * and pool-mates. Everything is drawn as an instrument panel.
 */
:root {
  --bg: #040706;
  --panel: #08100C;
  --panel-2: #0D1812;
  --line: #1B2E23;
  --line-2: #2C4A38;
  --text: #D6F3DC;
  --dim: #6F8F7B;
  --sig: #6CFF8F;        /* you, and anything rare */
  --sig-ink: #021006;
  --amber: #FFB627;      /* money and pool-mates */
  --red: #FF5A4F;
  /* rarity ramp: lost in the noise -> off the radar */
  --t0: #131C17; --t0-ink: #6F8F7B;
  --t1: #2A3A31; --t1-ink: #B9D6C1;
  --t2: #7C8F3A; --t2-ink: #0A0F06;
  --t3: #E3D24A; --t3-ink: #171400;
  --t4: #FFB627; --t4-ink: #1C1200;
  --t5: #6CFF8F; --t5-ink: #021006;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --anchor-h: 62px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  margin: 0;
  background: radial-gradient(120% 80% at 50% 0%, #0A1610 0%, var(--bg) 60%) fixed var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* faint scanlines over the whole instrument */
body::before { content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px); opacity: .5; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 1px solid var(--sig); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 800; }
.num { font-variant-numeric: tabular-nums; }
.glow { text-shadow: 0 0 14px rgba(108, 255, 143, .55); }
.amber { color: var(--amber); }
.label { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.fine { font-size: 12px; color: var(--dim); }
.center { text-align: center; }

.t0 { background: var(--t0); color: var(--t0-ink); }
.t1 { background: var(--t1); color: var(--t1-ink); }
.t2 { background: var(--t2); color: var(--t2-ink); }
.t3 { background: var(--t3); color: var(--t3-ink); }
.t4 { background: var(--t4); color: var(--t4-ink); }
.t5 { background: var(--t5); color: var(--t5-ink); box-shadow: 0 0 18px rgba(108, 255, 143, .35); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(4, 7, 6, .94); border-bottom: 1px solid var(--line); }
.top-inner { max-width: var(--page-max); margin: 0 auto; padding: 0 16px; height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.logo { font-weight: 800; font-size: 17px; letter-spacing: .32em; display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.logo i { width: 9px; height: 9px; border-radius: 50%; background: var(--sig); box-shadow: 0 0 12px var(--sig); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.top-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border: 1px solid var(--line-2); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; max-width: 124px; overflow: hidden; white-space: nowrap; }
.chip b { color: var(--dim); font-size: 9.5px; letter-spacing: .14em; }
.chip span { overflow: hidden; text-overflow: ellipsis; }
#btn-streak { flex: none; }
#btn-streak span { overflow: visible; color: var(--sig); }
#btn-help { flex: none; }
.chip:hover { border-color: var(--sig); color: var(--sig); }

/* ---------- layout ---------- */
/* The game column grows with the screen. --main-max is the widest it gets at
   each size; the side rails only exist from 1000px up (see "ad sizes"). */
:root { --page-max: 1100px; --main-max: 600px; }
@media (min-width: 760px) { :root { --main-max: 700px; } }
@media (min-width: 1000px) { :root { --page-max: 1180px; --main-max: 760px; } }
@media (min-width: 1340px) { :root { --page-max: 1440px; } }
@media (min-width: 1600px) { :root { --page-max: 1680px; --main-max: 860px; } }
@media (min-width: 1800px) { :root { --page-max: 1780px; --main-max: 960px; } }
.layout { max-width: var(--page-max); margin: 0 auto; display: flex; justify-content: center; align-items: flex-start; gap: 40px; padding: 0 16px; }
main { flex: 0 1 var(--main-max); width: 100%; max-width: var(--main-max); min-width: 0; padding: 12px 0 28px; container: main / inline-size; }
.rail { display: none; flex: none; padding-top: 20px; }
.loading { color: var(--dim); text-align: center; padding: 80px 0; letter-spacing: .2em; font-size: 12px; }

/* panel with instrument corner brackets */
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); padding: 16px; margin-bottom: 12px; }
.panel::before, .panel::after { content: ''; position: absolute; width: 10px; height: 10px; border: solid var(--line-2); pointer-events: none; }
.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.panel.hot { border-color: var(--line-2); }
.panel.hot::before, .panel.hot::after { border-color: var(--sig); }
.panel.gold::before, .panel.gold::after { border-color: var(--amber); }
.panel > .label:first-child { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel > .label:first-child span:first-child { flex: none; }
.panel > .label:first-child span:last-child { text-align: right; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- the scope ---------- */
.scope-wrap { position: relative; width: min(100%, 420px); margin: 0 auto 6px; }
.scope { display: block; width: 100%; height: auto; }
.scope .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.scope .ring.outer { stroke: var(--line-2); }
.scope .axis { stroke: var(--line); stroke-width: 1; }
.scope .tick { fill: var(--dim); font: 500 7.5px var(--mono); letter-spacing: .08em; }
.scope .sweep { transform-origin: 160px 160px; animation: sweep 7s linear infinite; }
.scope .beam { stroke: var(--sig); stroke-width: 1.2; opacity: .75; }
.scope .crowd { fill: var(--dim); animation: twinkle 3.2s ease-in-out infinite; }
.scope .friend { fill: var(--amber); }
.scope .friend-t { fill: var(--amber); font: 700 8px var(--mono); letter-spacing: .06em; }
.scope .you { fill: var(--sig); filter: drop-shadow(0 0 6px var(--sig)); transition: cx .7s cubic-bezier(.2, .8, .2, 1), cy .7s cubic-bezier(.2, .8, .2, 1); }
.scope .you-ring { fill: none; stroke: var(--sig); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; animation: ping 2.2s ease-out infinite; }
.scope .you-t { fill: var(--sig); font: 800 8.5px var(--mono); letter-spacing: .14em; }
.scope .hub { fill: var(--line-2); }
.scope .empty { fill: var(--dim); font: 500 8px var(--mono); letter-spacing: .2em; }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes twinkle { 50% { opacity: .35; } }
@keyframes ping { from { transform: scale(1); opacity: .8; } to { transform: scale(3.4); opacity: 0; } }

/* ---------- home ---------- */
.readout { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.readout b { color: var(--text); font-weight: 700; }
.hero h1 { font-size: 30px; line-height: 1.08; letter-spacing: -.01em; text-transform: uppercase; margin: 0 0 10px; }
.hero h1 em { font-style: normal; color: var(--sig); text-shadow: 0 0 18px rgba(108, 255, 143, .5); }
.hero p { color: var(--dim); margin: 0 0 16px; font-size: 13.5px; }
.hero p b { color: var(--text); font-weight: 500; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 12px; }
.stat3 div { background: var(--panel); padding: 10px 8px; min-width: 0; }
.stat3 b { display: block; font-size: 20px; font-weight: 800; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat3 span { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* ---------- buttons ---------- */
.btn { height: 50px; padding: 0 16px; border: 1px solid var(--line-2); font-weight: 700; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: var(--text); transition: transform .08s ease, border-color .15s, color .15s; }
.btn:hover { border-color: var(--sig); color: var(--sig); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--sig); border-color: var(--sig); color: var(--sig-ink); box-shadow: 0 0 22px rgba(108, 255, 143, .28); }
.btn-primary:hover { color: var(--sig-ink); box-shadow: 0 0 30px rgba(108, 255, 143, .5); }
.btn-amber { border-color: var(--amber); color: var(--amber); }
.btn-amber:hover { border-color: var(--amber); color: var(--amber); box-shadow: 0 0 18px rgba(255, 182, 39, .25); }
.btn-block { width: 100%; }
.btn-big { height: 60px; font-size: 14px; }
.btn-small { height: 38px; font-size: 11px; padding: 0 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gap { height: 12px; }

/* ---------- progress ---------- */
.pips { display: grid; gap: 3px; margin-bottom: 12px; }
.pips i { height: 5px; background: var(--panel-2); border: 1px solid var(--line); }
.pips i.now { background: var(--text); border-color: var(--text); }
.pips i.t0 { background: var(--t0); } .pips i.t1 { background: var(--t1); } .pips i.t2 { background: var(--t2); border-color: var(--t2); }
.pips i.t3 { background: var(--t3); border-color: var(--t3); } .pips i.t4 { background: var(--t4); border-color: var(--t4); } .pips i.t5 { background: var(--t5); border-color: var(--t5); }

/* ---------- ask ---------- */
.ask .q { font-size: 23px; line-height: 1.2; text-transform: uppercase; margin: 4px 0 16px; min-height: 2.4em; }
.timer { display: grid; grid-template-columns: 1fr 42px; align-items: center; gap: 12px; margin-bottom: 14px; }
.timer .segs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; height: 14px; }
.timer .segs i { background: var(--panel-2); border: 1px solid var(--line); }
.timer .segs i.on { background: var(--sig); border-color: var(--sig); box-shadow: 0 0 8px rgba(108, 255, 143, .45); }
.timer.low .segs i.on { background: var(--red); border-color: var(--red); box-shadow: 0 0 8px rgba(255, 90, 79, .5); }
.timer b { font-size: 26px; font-weight: 800; text-align: right; line-height: 1; }
.timer.low b { color: var(--red); }
#answer-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.field-in { position: relative; min-width: 0; }
.field-in::before { content: '>'; position: absolute; z-index: 1; left: 12px; top: 50%; transform: translateY(-50%); color: var(--sig); font-weight: 800; pointer-events: none; }
.field-in input { width: 100%; height: 54px; border: 1px solid var(--line-2); border-radius: 0; background: var(--bg); padding: 0 12px 0 30px; font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; outline: none; caret-color: var(--sig); }
.field-in input:focus { border-color: var(--sig); box-shadow: 0 0 16px rgba(108, 255, 143, .18); }
.field-in input::placeholder { color: var(--dim); font-weight: 400; letter-spacing: .1em; font-size: 13px; }
.field-in input.shake { animation: shake .3s ease; border-color: var(--red); }
#answer-form .btn { height: 54px; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.msg { margin: 10px 0 0; font-size: 12px; color: var(--dim); min-height: 1.5em; }
.msg.bad { color: var(--red); }

/* ---------- reveal ---------- */
.scoreline { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.pts { font-weight: 800; font-size: 46px; line-height: 1; padding: 6px 12px 7px; animation: pop .4s ease both; }
.tier { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; padding: 5px 9px; }
.said { margin: 0; color: var(--dim); font-size: 13px; }
.said b { color: var(--text); text-transform: uppercase; }
.crowd-h { display: flex; justify-content: space-between; margin: 16px 0 8px; }
.crowd { display: grid; gap: 4px; margin-bottom: 16px; }
.crowd .row { display: grid; grid-template-columns: minmax(0, 44%) 1fr 30px; gap: 8px; align-items: center; font-size: 12px; }
.crowd .name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--dim); text-transform: uppercase; letter-spacing: .03em; }
.crowd .bar { height: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.crowd .bar i { display: block; height: 100%; background: var(--dim); min-width: 2px; }
.crowd .p { text-align: right; font-weight: 700; color: var(--dim); }
.crowd .mine .name, .crowd .mine .p { color: var(--sig); font-weight: 800; }
.crowd .mine .bar { border-color: var(--sig); }
.crowd .mine .bar i { background: var(--sig); box-shadow: 0 0 8px var(--sig); }
.running { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.running b { font-size: 20px; font-weight: 800; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }

/* ---------- results ---------- */
.total { font-size: 64px; font-weight: 800; line-height: 1; color: var(--sig); }
.total small { font-size: 13px; color: var(--dim); font-weight: 700; letter-spacing: .16em; margin-left: 8px; text-shadow: none; }
.rankline { margin: 8px 0 12px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.rankline b { color: var(--text); font-size: 16px; font-weight: 800; }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 14px; }
.tiles div { padding: 9px 2px 7px; text-align: center; min-width: 0; }
.tiles b { display: block; font-size: 20px; font-weight: 800; line-height: 1.05; }
.tiles span { display: block; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 2px; }
.tiles .t5 span { letter-spacing: 0; }   /* "Off radar" is the longest label: keep it whole on a phone */
.note { font-size: 12px; color: var(--dim); margin: 12px 0 0; }
.next { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.next b { font-size: 18px; font-weight: 800; }

/* ---------- pool ---------- */
.pot { font-size: 40px; font-weight: 800; line-height: 1; color: var(--amber); text-shadow: 0 0 18px rgba(255, 182, 39, .4); }
.pot.off { font-size: 18px; text-shadow: none; color: var(--dim); letter-spacing: .08em; }
.poolhead { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: end; }
.poolhead h2 { font-size: 20px; text-transform: uppercase; line-height: 1.15; overflow-wrap: anywhere; }
.poolhead .right { text-align: right; }
.code { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.code b { font-size: 22px; font-weight: 800; letter-spacing: .3em; color: var(--text); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); text-align: right; padding: 0 0 6px 8px; }
.tbl th:nth-child(2) { text-align: left; }
.tbl td { padding: 8px 0 8px 8px; border-top: 1px solid var(--line); text-align: right; }
.tbl td:first-child { padding-left: 0; width: 26px; text-align: left; color: var(--dim); font-weight: 800; }
.tbl td:nth-child(2) { text-align: left; text-transform: uppercase; max-width: 0; width: 46%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tbl tr.lead td:first-child { color: var(--amber); }
.tbl tr.me td:nth-child(2) { color: var(--sig); font-weight: 800; }
.tbl td.big { font-weight: 800; font-size: 14px; }
.tbl td.dimc { color: var(--dim); }
.byprompt { border-top: 1px solid var(--line); padding: 8px 0; }
.byprompt:first-of-type { border-top: 0; padding-top: 0; }
.byprompt summary { cursor: pointer; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 700; list-style: none; padding: 2px 0 2px 16px; position: relative; }
.byprompt summary::-webkit-details-marker { display: none; }
.byprompt summary::before { content: '+'; position: absolute; left: 0; color: var(--sig); font-weight: 800; }
.byprompt[open] summary { color: var(--text); margin-bottom: 6px; }
.byprompt[open] summary::before { content: '–'; }

/* ---------- rounds, credits ---------- */
.round { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.round:first-of-type { border-top: 0; padding-top: 0; }
.round:last-of-type { padding-bottom: 0; }
.round b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.round span { font-size: 11.5px; color: var(--dim); }
.round.done b { color: var(--sig); }
.round .lock { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 0 6px; }
.credit { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; border: 1px solid var(--amber); padding: 10px 12px; margin-bottom: 12px; }
.credit b { font-size: 22px; font-weight: 800; color: var(--amber); text-shadow: 0 0 14px rgba(255, 182, 39, .4); }
.credit span { font-size: 12px; color: var(--dim); }
.credit i { font-style: normal; color: var(--text); }
.preview { font-size: 9px; font-weight: 800; letter-spacing: .14em; color: var(--dim); margin-top: 4px; }
.potsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 12px; }
.potsplit span { background: var(--panel); padding: 8px 10px; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.potsplit b { display: block; font-size: 16px; color: var(--amber); letter-spacing: 0; }
.byprompt .a { display: grid; grid-template-columns: minmax(0, 32%) 1fr auto auto; gap: 8px; align-items: center; font-size: 12px; padding: 3px 0; }
.byprompt .who { color: var(--dim); text-transform: uppercase; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.byprompt .what { text-transform: uppercase; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.byprompt .secs { color: var(--dim); font-size: 10.5px; }
.byprompt .pt { font-weight: 800; font-size: 11px; padding: 1px 6px; min-width: 30px; text-align: center; }
.byprompt .a.me .who { color: var(--sig); }
.hist { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12px; text-transform: uppercase; }
.hist:first-of-type { border-top: 0; }
.rules { margin: 0; padding: 0; list-style: none; }
.rules li { position: relative; padding: 5px 0 5px 18px; font-size: 12.5px; color: var(--dim); }
.rules li::before { content: '›'; position: absolute; left: 2px; color: var(--amber); font-weight: 800; }
.rules b { color: var(--text); font-weight: 500; }

/* ---------- ads ---------- */
/* An ad box only shows when it holds a real ad, or on localhost as a labelled placeholder. */
.ad { display: grid; place-items: center; border: 1px dashed var(--line-2); color: var(--dim); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(111, 143, 123, .05) 10px 20px); }
.ad::before { content: 'Ad · ' var(--sz, attr(data-size)); }
/* Ad sizes. Every box is one of Google's standard sizes, chosen by how much
   room there is. --sz is only the label on the localhost placeholders. */
.ad-box { --sz: '300 × 250'; width: 300px; max-width: 100%; height: 250px; margin: 20px auto 0; }
.ad-strip { --sz: '320 × 100'; width: 320px; max-width: 100%; height: 100px; margin: 18px auto 0; }
main > .ad-strip { margin: 40px auto 12px; }
.ad-top { --sz: '320 × 50'; width: calc(100% - 32px); max-width: 320px; height: 50px; margin: 8px auto 0; }
@media (min-width: 520px) { .ad-top { --sz: '468 × 60'; max-width: 468px; height: 60px; } }
@media (min-width: 760px) { .ad-top { --sz: '728 × 90'; max-width: 728px; height: 90px; } }
@media (min-width: 1100px) { .ad-top { --sz: '970 × 90'; max-width: 970px; } }
.rail .ad { --sz: '300 × 600'; width: 300px; height: 600px; }
.rail-left .ad { --sz: '160 × 600'; width: 160px; }
@media (min-width: 1600px) { .rail-left .ad { --sz: '300 × 600'; width: 300px; } }
@container (min-width: 400px) { .ad-box { --sz: '336 × 280'; width: 336px; height: 280px; } }
@container (min-width: 540px) { .ad-strip { --sz: '468 × 60'; width: 468px; height: 60px; } }
@container (min-width: 760px) { .ad-strip { --sz: '728 × 90'; width: 728px; height: 90px; } }
/* ads inside the long crowd page: a full row of their own, never wider than the panel */
.ad-strip.ad-mid { grid-column: 1 / -1; margin: 6px auto 18px; }
@container (min-width: 760px) { .ad-strip.ad-mid { --sz: '468 × 60'; width: 468px; height: 60px; } }
@container (min-width: 860px) { .ad-strip.ad-mid { --sz: '728 × 90'; width: 728px; height: 90px; } }
/* on localhost, number each placeholder so cycling can be seen */
html.ads-placeholders .ad { align-content: center; gap: 4px; }
html.ads-placeholders .ad[data-views]:not(.ad-live)::after { content: 'ad no. ' attr(data-views); opacity: .65; }
.ad-video { width: 100%; aspect-ratio: 16 / 9; margin: 0 0 12px; }
.ad-video.playing { margin: 12px 0; border-style: solid; border-color: var(--line-2); position: relative; }
.ad-video.playing::before { position: absolute; top: 8px; left: 10px; }
.ad-video.playing b { font-size: 54px; font-weight: 800; color: var(--sig); text-shadow: 0 0 18px rgba(108, 255, 143, .5); }
body.no-ads .ad { display: none; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 40; background: rgba(2, 4, 3, .82); display: grid; place-items: end center; animation: fade .18s ease both; }
@media (min-width: 560px) { .modal-back { place-items: center; } }
.modal { width: 100%; max-width: 440px; max-height: 92vh; max-height: 92dvh; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-top: 2px solid var(--sig); padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px)); animation: sheet .25s cubic-bezier(.2, .8, .2, 1) both; position: relative; }
@media (min-width: 760px) { .modal { max-width: 520px; padding: 26px 26px 28px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(30px); opacity: 0; } }
.modal h2 { font-size: 20px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; padding-right: 40px; }
.modal h3 { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 18px 0 8px; }
.modal p { margin: 8px 0; font-size: 13px; }
.modal .lead { color: var(--dim); margin-top: 0; }
.modal .close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 16px; line-height: 1; }
.modal .close:hover { border-color: var(--sig); color: var(--sig); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 6px 0 6px 34px; font-size: 13px; color: var(--dim); }
.steps li b { color: var(--text); font-weight: 700; }
.steps li::before { content: '0' counter(s); position: absolute; left: 0; top: 6px; color: var(--sig); font-weight: 800; font-size: 12px; }
.legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.legend span { padding: 7px 2px 6px; text-align: center; font-size: 9.5px; line-height: 1.3; box-shadow: none; }
.legend b { display: block; font-weight: 800; letter-spacing: .06em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 2px; }
.field { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.field .field-in input { height: 50px; font-size: 15px; }
.field .btn { height: 50px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 12px; text-align: center; }
.kpis div { background: var(--panel); padding: 10px 4px; }
.kpis b { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; }
.kpis span { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

/* ---------- toast + burst ---------- */
#toast { position: fixed; left: 50%; top: 62px; transform: translate(-50%, -20px); z-index: 95; background: var(--sig); color: var(--sig-ink); padding: 9px 14px; font-weight: 700; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; top: 0; left: 0; width: 6px; height: 6px; z-index: 50; pointer-events: none; animation: fall var(--d) cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes fall { from { transform: translate(var(--x0), var(--y0)); opacity: 1; } to { transform: translate(var(--x1), var(--y1)); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .scope .sweep { display: none; }
}
@media (max-width: 359px) {
  .hero h1 { font-size: 25px; }
  .ask .q { font-size: 20px; }
  #btn-name { display: none; }
  .logo { letter-spacing: .22em; }
}

/* ---------- quality-of-life additions ---------- */
.risk { border: 1px solid var(--amber); color: var(--amber); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; margin: 0 0 12px; text-align: center; }
.review { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 12px; padding: 8px 0; }
.review summary { cursor: pointer; list-style: none; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding-left: 16px; position: relative; }
.review summary::-webkit-details-marker { display: none; }
.review summary::before { content: '+'; position: absolute; left: 0; color: var(--sig); font-weight: 800; }
.review[open] summary { color: var(--text); margin-bottom: 8px; }
.review[open] summary::before { content: '–'; }
.rv { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12px; }
.rv .rq { color: var(--dim); text-transform: uppercase; font-size: 10.5px; letter-spacing: .04em; }
.rv .pt { grid-row: span 2; align-self: center; font-weight: 800; padding: 2px 7px; min-width: 34px; text-align: center; box-shadow: none; }
.rv .rs { text-transform: uppercase; font-weight: 700; }
.rv .rb { grid-column: 1 / -1; color: var(--dim); font-size: 11px; }
.tbl .x { color: var(--dim); font-size: 11px; padding: 2px 5px; margin-left: 4px; border: 1px solid var(--line); }
.tbl .x:hover { color: var(--red); border-color: var(--red); }
.brands { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.brands .btn.on { background: var(--amber); border-color: var(--amber); color: #1C1200; }
.foot { max-width: var(--page-max); margin: 0 auto; padding: 4px 16px 20px; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.foot a { color: var(--dim); }
.foot a:hover { color: var(--sig); }
body.asking .foot { display: none; }
/* a slot that has a real ad in it drops the placeholder look */
.ad.ad-live { border: 0; background: none; }
.ad.ad-live::before { content: none; }

/* ---------- pick-from-list game ---------- */
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts.wide { grid-template-columns: 1fr; }
.opt { min-height: 56px; padding: 10px 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; text-align: center; line-height: 1.25; overflow-wrap: anywhere; transition: border-color .12s, color .12s, box-shadow .12s, transform .08s; }
.opt:hover, .opt:focus-visible { border-color: var(--sig); color: var(--sig); box-shadow: 0 0 16px rgba(108, 255, 143, .18); }
.opt:active { transform: scale(.97); background: var(--sig); color: var(--sig-ink); }
.ask .msg { margin-top: 12px; }
.ask .q.small, .reveal .q.small { font-size: 18px; line-height: 1.25; text-transform: uppercase; margin: 2px 0 10px; min-height: 0; }
.pips i.done { background: var(--dim); border-color: var(--dim); }
.pts.sealed { font-size: 34px; padding: 10px 14px; }
.sealed-big { font-size: 34px; letter-spacing: .12em; color: var(--text); }
.podium { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 12px; }
.podium span { background: var(--panel); padding: 8px 4px; text-align: center; font-size: 15px; font-weight: 800; color: var(--amber); }
.podium b { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.rv .pt.t0 { letter-spacing: 0; }
.tbl td.amber { color: var(--amber); font-weight: 800; }

/* ---------- the daily run: strikes, verdicts, the herd ---------- */
.strikes { display: inline-flex; gap: 4px; vertical-align: middle; }
.strikes i { width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid var(--line-2); font-style: normal; font-size: 10px; font-weight: 800; line-height: 1; color: var(--bg); }
.strikes i.on { background: var(--red); border-color: var(--red); box-shadow: 0 0 8px rgba(255, 90, 79, .5); }
.verdict { font-size: 26px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.verdict.ok { color: var(--sig); text-shadow: 0 0 18px rgba(108, 255, 143, .5); }
.verdict.bad { color: var(--red); text-shadow: 0 0 18px rgba(255, 90, 79, .45); }
.rq-line { margin: 0 0 10px; color: var(--dim); font-size: 12.5px; }
.crowd .herd .name { color: var(--red); }
.crowd .herd .bar { border-color: rgba(255, 90, 79, .55); }
.crowd .herd .bar i { background: var(--red); }
.crowd .herd.mine .name, .crowd .herd.mine .p { color: var(--red); }
.crowd .herd.mine .bar i { box-shadow: 0 0 8px var(--red); }
.pips i.x { background: var(--red); border-color: var(--red); }
.tiles div.x { background: #2A0F0D; color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.knock { border-top: 1px solid var(--line); padding-top: 14px; }
.knock h2 { font-size: 17px; text-transform: uppercase; letter-spacing: .02em; color: var(--red); margin: 0; }
.total.dead { color: var(--red); text-shadow: 0 0 22px rgba(255, 90, 79, .35); }

/* ---------- ad visibility ---------- */
.ad { display: none; }
html.ads-placeholders body:not(.no-ads) .ad, body:not(.no-ads) .ad.ad-live, .modal .ad { display: grid; }
.ad.ad-live { overflow: hidden; }
/* Side rails: the right one from 1000px wide, the left one from 1340px, and
   only when there is an ad (or a placeholder) to put in them. They scroll with
   the page, and the wide gap keeps them clear of the game's buttons. */
@media (min-width: 1000px) { .layout { gap: 72px; } html.ad-rail body:not(.no-ads) .rail:not(.rail-left) { display: block; } }
@media (min-width: 1340px) { html.ad-rail-left body:not(.no-ads) .rail-left { display: block; } }
/* Sticky ads, kept to Google's AdSense rules for them: one sticky ad in view, 300px wide at
   most, desktop only, never over the content. So the right rail follows the page down when the
   window is tall enough to show all of it below the header, and the left rail scrolls away. */
@media (min-width: 1000px) and (min-height: 700px) {
  html.ad-sticky body:not(.no-ads) .rail:not(.rail-left) { position: sticky; top: 51px; }
}
/* Phones and tablets: the sticky ad there is Google's own anchor ad, switched on in AdSense.
   This box only marks its place on localhost so the layout can be checked. */
.ad-anchor { --sz: '320 × 50 · Google anchor'; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(50px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background-color: var(--bg); border-width: 1px 0 0; }
html.ad-anchor-demo body:not(.no-ads) { padding-bottom: 58px; }
@media (min-width: 1000px) { .ad.ad-anchor { display: none !important; } html.ad-anchor-demo body:not(.no-ads) { padding-bottom: 0; } }

/* ---------- launch build: picks, checkpoints, practice, yesterday's crowd ---------- */
.opt[disabled] { opacity: .35; cursor: default; pointer-events: none; }
.opt.picked, .opt.picked[disabled] { opacity: 1; background: var(--sig); border-color: var(--sig); color: var(--sig-ink); box-shadow: 0 0 18px rgba(108, 255, 143, .35); }
.lockline { display: flex; gap: 8px; align-items: baseline; min-height: 1.6em; margin: 12px 0 0; font-size: 12px; color: var(--dim); }
.lockline b { color: var(--sig); font-weight: 700; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-n { font-size: 44px; font-weight: 800; line-height: 1; color: var(--sig); text-shadow: 0 0 18px rgba(108, 255, 143, .4); }
.check-n small { font-size: 13px; color: var(--dim); font-weight: 700; letter-spacing: .16em; margin-left: 8px; text-shadow: none; }
.picked-list { margin: 12px 0; border-top: 1px solid var(--line); }
.picked-list div { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.picked-list span { color: var(--dim); text-transform: uppercase; font-size: 10.5px; letter-spacing: .04em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked-list b { text-transform: uppercase; font-weight: 700; text-align: right; }
.tag { display: inline-block; border: 1px solid var(--amber); color: var(--amber); font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 2px 6px; }
.linkbtn { display: block; width: 100%; text-align: center; padding: 12px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.linkbtn:hover, .linkbtn:focus-visible { color: var(--sig); }
.dayq { padding: 14px 0; border-top: 1px solid var(--line); }
.dayq:first-of-type { border-top: 0; padding-top: 0; }
.dayq h3 { font-size: 13px; text-transform: uppercase; line-height: 1.3; margin-bottom: 8px; }
.dayq h3 span { color: var(--dim); margin-right: 6px; }
.histrow { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12px; align-items: baseline; }
.histrow span { color: var(--dim); }
.histrow b { font-weight: 800; }
.offline { border: 1px solid var(--red); color: var(--red); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px; margin: 0 0 12px; text-align: center; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; font-size: 12px; color: var(--dim); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--sig); flex: none; }
.check a { color: var(--sig); }
.foot { gap: 8px 16px; padding-top: 12px; }
.foot .sep { flex-basis: 100%; height: 0; }
.foot button { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.foot button:hover { color: var(--sig); }
.foot [hidden] { display: none; }

/* ---------- wider screens ----------
   Everything below reacts to the width of the game column (or of the column a
   piece sits in), not the window, so it is right with or without side rails.
   Browsers too old for container queries keep the phone layout above. */
.cols { display: block; }
.cols > div { min-width: 0; container-type: inline-size; }
.hero h1 { font-size: clamp(30px, 8cqi, 44px); }
.hero p { font-size: clamp(13.5px, 2.7cqi, 15.5px); }
.ask .q { font-size: clamp(23px, 4.2cqi, 33px); }
.opt { font-size: clamp(14px, 2.2cqi, 16.5px); min-height: clamp(56px, 8.6cqi, 70px); }
.panel { padding: clamp(16px, 3cqi, 24px); }
.btn-big { height: clamp(60px, 9cqi, 68px); }
.total { font-size: clamp(64px, 11cqi, 88px); }
.total.sealed-big { font-size: clamp(34px, 6cqi, 48px); }
.ask .q.small, .reveal .q.small { font-size: clamp(18px, 3.1cqi, 24px); }
@container main (min-width: 560px) {
  .label, .readout { font-size: 11.5px; }
  .note, .said, .msg, .lockline, .rules li, .picked-list div { font-size: 13.5px; }
  .fine { font-size: 12.5px; }
  .btn { font-size: 13.5px; height: 54px; }
  .btn-big { font-size: 15px; height: clamp(60px, 9cqi, 68px); }
  .btn-small { font-size: 12px; height: 42px; padding: 0 16px; }
  .linkbtn { font-size: 12px; }
  .pips { gap: 4px; margin-bottom: 14px; }
  .pips i { height: 7px; }
  .timer { grid-template-columns: 1fr 52px; }
  .timer .segs { height: 18px; gap: 3px; }
  .timer b { font-size: 32px; }
  .opts { gap: 10px; }
  .opts.wide { grid-template-columns: 1fr 1fr; }
  .crowd { gap: 6px; }
  .crowd .row { font-size: 13.5px; grid-template-columns: minmax(0, 38%) 1fr 36px; gap: 12px; }
  .crowd .bar { height: 14px; }
  .pts { font-size: 56px; }
  .tier { font-size: 12.5px; }
  .tiles { gap: 6px; }
  .tiles b { font-size: 26px; }
  .tiles span { font-size: 9.5px; }
  .tiles div { padding: 12px 2px 10px; }
  .stat3 b { font-size: 24px; }
  .stat3 span { font-size: 10.5px; }
  .stat3 div { padding: 12px 12px; }
  .round b { font-size: 14px; }
  .round span { font-size: 12.5px; }
  .tbl { font-size: 14px; }
  .tbl th { font-size: 10.5px; }
  .tbl td { padding: 10px 0 10px 12px; }
  .tbl td.big { font-size: 16px; }
  .rv, .hist, .histrow { font-size: 13.5px; }
  .rv .rq { font-size: 11.5px; }
  .dayq h3 { font-size: 14.5px; }
  .podium span { font-size: 18px; padding: 10px 4px; }
  .podium b { font-size: 10.5px; }
  .check-n { font-size: 56px; }
}
@container main (min-width: 680px) {
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; align-items: stretch; }
  .cols > div { display: flex; flex-direction: column; }
  .cols > div > .panel:last-child { flex: 1; }
  .cols.lead { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0 28px; align-items: center; margin-bottom: 4px; }
  .cols.lead > div { display: block; }
  .cols .stat3 div { padding: 10px 8px; }
  .cols .stat3 span { font-size: 9.5px; letter-spacing: .1em; }
  .cols .readout { font-size: 10.5px; }
  /* three across (two for long answers); a short last row stretches to fill it */
  .opts { display: flex; flex-wrap: wrap; }
  .opts .opt { flex: 1 1 30%; }
  .opts.wide .opt { flex: 1 1 45%; }
  .dayqs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 28px; }
  .dayqs .dayq:nth-child(2) { border-top: 0; padding-top: 0; }
}
@media (max-width: 359px) {
  .hero h1 { font-size: 25px; }
  .ask .q { font-size: 20px; }
}
.podium i { display: block; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); margin-top: 3px; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium i.me { color: var(--sig); }
.podium span { font-size: 22px; padding: 10px 4px 9px; }
.winners { border-top: 1px solid var(--line); padding-top: 10px; margin: 0 0 12px; }
.winners .label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.poolhead .tag { vertical-align: middle; }
.vid-bar { height: 6px; background: var(--panel-2); border: 1px solid var(--line); margin: 0 0 4px; }
.vid-bar i { display: block; height: 100%; width: 0; background: var(--sig); box-shadow: 0 0 8px rgba(108, 255, 143, .45); }
.claim label { display: block; margin-top: 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.claim label.check { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; display: flex; }
.claim .field-in { margin-top: 6px; }
.claim .field-in input { height: 48px; font-size: 15px; letter-spacing: 0; }
.claim .field-in::before { content: none; }
.claim .field-in input { padding-left: 12px; }
.poolline { margin: 10px 0 0; font-size: 12px; color: var(--dim); }
.poolline a { color: var(--sig); white-space: nowrap; }

/* The name is one letter longer than the space the header was drawn for: tighten it on phones. */
@media (max-width: 430px) { .logo { letter-spacing: .2em; } }
