/* Layout concept: an arena scoreboard. Heavy condensed numerals, a line score for the day, team color per sport. */
:root {
  --bg: #EEF1F5;
  --surface: #FFFFFF;
  --surface-2: #E2E7EE;
  --fg: #111A2B;
  --dim: #5A667A;
  --line: #D3DAE4;
  --strip: #111A2B;
  --strip-fg: #F2A900;
  --accent: #F2A900;
  --on-accent: #111A2B;
  --accent-ink: color-mix(in srgb, var(--accent) 62%, #000);
  --hit: #1A9C68;
  --near: #D99F00;
  --miss: #8C96A6;
  --bad: #D93A42;
  --on-state: #FFFFFF;
  --cold: #3B82C4;
  --warm: #E2B100;
  --hot: #EC7A1C;
  --scorch: #DB2B39;
  --map-water: #CFE1EE;
  --map-land: #F6F3EC;
  --map-border: #C4BCAD;
  --map-pin: #111A2B;
  --shadow: 0 1px 2px rgba(17, 26, 43, .08), 0 8px 24px rgba(17, 26, 43, .06);
  --display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1120; --surface: #151D30; --surface-2: #202A40; --fg: #EDF1F7; --dim: #9AA6BA; --line: #2A3550;
    --strip: #050913; --miss: #49546A; --accent-ink: color-mix(in srgb, var(--accent) 72%, #FFF);
    --map-water: #0E1A2B; --map-land: #26324A; --map-border: #3F4C66; --map-pin: #EDF1F7;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1120; --surface: #151D30; --surface-2: #202A40; --fg: #EDF1F7; --dim: #9AA6BA; --line: #2A3550;
  --strip: #050913; --miss: #49546A; --accent-ink: color-mix(in srgb, var(--accent) 72%, #FFF);
  --map-water: #0E1A2B; --map-land: #26324A; --map-border: #3F4C66; --map-pin: #EDF1F7;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .3); color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 500 16px/1.45 var(--body); min-height: 100%;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1; margin: 0; letter-spacing: .005em; text-wrap: balance; text-transform: uppercase; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; border-radius: 4px; }
.ico { width: 20px; height: 20px; flex: none; }
.sub { color: var(--dim); font-size: 14px; }
.eyebrow { font: 700 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

/* ---- Top ---- */
.strip { background: var(--strip); color: var(--strip-fg); font: 800 14px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.strip-inner {
  max-width: 1040px; margin: auto; display: flex; justify-content: space-between; gap: 12px;
  padding-block: 7px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
.top-inner {
  max-width: 1040px; margin: auto; display: flex; align-items: center; gap: 14px;
  padding-block: 10px 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg); flex: none; }
.logo-seal {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent); color: #111; font: 900 20px/1 var(--body);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); transform: rotate(-8deg);
}
.logo-words { display: grid; gap: 1px; font-family: var(--display); font-style: italic; text-transform: uppercase; line-height: .9; }
.logo-top { font-weight: 800; font-size: 12px; letter-spacing: .32em; color: var(--accent-ink); }
.logo-main { font-weight: 900; font-size: 25px; letter-spacing: .01em; white-space: nowrap; }
@media (max-width: 420px) {
  .logo { gap: 6px; } .logo-seal { width: 28px; height: 28px; font-size: 16px; }
  .logo-top { font-size: 10px; letter-spacing: .26em; } .logo-main { font-size: 20px; }
}
.rank {
  background: none; border: 0; color: var(--dim); cursor: pointer; display: grid; gap: 3px; min-width: 76px;
  font: 700 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; text-align: left; padding: 4px;
}
.meter { display: block; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); transition: width .5s; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn, .streak {
  height: 38px; min-width: 38px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--fg);
  cursor: pointer; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.icon-btn:hover, .streak:hover { background: var(--surface-2); }
.icon-btn.muted { color: var(--dim); text-decoration: line-through; }
.streak { padding: 0 10px; color: var(--dim); }
.streak b { font: 900 21px/1 var(--display); }
.streak.lit { color: #EC7A1C; border-color: #EC7A1C; }
.flame { width: 18px; height: 18px; }
.tabs {
  max-width: 1040px; margin: auto; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px));
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px 11px; text-decoration: none; white-space: nowrap;
  color: var(--dim); font: 800 18px/1 var(--display); letter-spacing: .03em; text-transform: uppercase;
  border-bottom: 4px solid transparent;
}
.tab:hover { color: var(--fg); }
.tab[aria-current] { color: var(--fg); border-color: var(--accent); }
.tab[aria-current] .ico { color: var(--accent-ink); }

/* ---- Main ---- */
main {
  max-width: 1040px; margin: auto; display: grid; gap: 24px;
  padding-block: 24px 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main > * { min-width: 0; }
.lede { color: var(--dim); font-size: 17px; max-width: 60ch; }
.foot {
  max-width: 1040px; margin: auto; color: var(--dim); font-size: 13px; display: grid; gap: 2px;
  padding-block: 24px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 46px; padding: 8px 20px;
  border: 2px solid var(--accent); border-radius: 10px; background: var(--accent); color: var(--on-accent);
  font: 800 20px/1.05 var(--display); letter-spacing: .03em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.alt { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.small { min-height: 36px; font-size: 16px; padding: 4px 14px; }
.btn.big { min-height: 54px; font-size: 24px; flex: 1; }

/* ---- Today ---- */
.hero { display: grid; gap: 18px; }
.hero-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.hero h1 { font-size: clamp(54px, 11vw, 96px); font-style: italic; }
.hero .lede { margin-top: 8px; }
.hero-score { display: flex; align-items: baseline; font-family: var(--display); font-weight: 900; flex: none; background: var(--strip); color: var(--strip-fg); padding: 6px 14px 8px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.big-num { font-size: 56px; line-height: 1; }
.of { font-size: 26px; opacity: .7; }
.card-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.card-line li { min-width: 0; border-right: 1px solid var(--line); }
.card-line li:last-child { border-right: 0; }
.card-cell { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 14px; text-decoration: none; position: relative; transition: background .15s; }
.card-cell::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--accent); }
.card-cell:hover { background: var(--surface-2); }
.cc-sport { display: flex; align-items: center; gap: 6px; color: var(--dim); font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.cc-sport .ico { width: 16px; height: 16px; color: var(--accent-ink); }
.cc-game { font: 800 25px/1 var(--display); text-transform: uppercase; flex: 1; }
.cc-result { font: 800 17px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--accent-ink); }
.card-cell.won .cc-result { color: var(--hit); }
.card-cell.lost .cc-result { color: var(--bad); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.next-in { color: var(--dim); font-size: 14px; }
.next-in b { font-variant-numeric: tabular-nums; color: var(--fg); }
.board-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th { font: 800 15px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--dim); padding: 12px 6px; }
.board thead th:first-child { text-align: left; padding-left: 16px; color: var(--fg); }
.board tbody tr { border-top: 1px solid var(--line); }
.board tbody th { text-align: left; padding: 0; }
.board tbody th a { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; text-decoration: none; color: var(--fg); font-size: 18px; }
.board td { text-align: center; padding: 6px 2px; }
.pip { display: inline-block; width: 28px; height: 28px; border-radius: 7px; background: var(--surface-2); border: 2px solid transparent; transition: transform .1s, border-color .1s; vertical-align: middle; }
.pip:hover { border-color: var(--accent); transform: scale(1.1); }
.pip.won { background: var(--hit); }
.pip.lost { background: var(--miss); }

/* ---- Sport page ---- */
.sport-head { display: flex; align-items: center; gap: 16px; }
.sport-mark { width: 76px; height: 76px; flex: none; border-radius: 18px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.ico-xl { width: 48px; height: 48px; }
.sport-head h1 { font-size: clamp(48px, 9vw, 76px); font-style: italic; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.game-card {
  display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; transition: transform .12s, border-color .12s; box-shadow: var(--shadow);
}
.game-card, .gp { min-width: 0; }
.gp { overflow: hidden; }
.game-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.gc-title { font: 900 28px/1 var(--display); text-transform: uppercase; }
.gc-blurb { color: var(--dim); font-size: 15px; flex: 1; }
.gc-cta { align-self: start; font: 800 16px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; padding: 9px 16px; border-radius: 99px; background: var(--accent); color: var(--on-accent); }
.game-card.played .gc-cta { background: transparent; color: var(--hit); padding-inline: 0; }

/* Card previews: a tiny picture of each puzzle */
.gp { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 92px; padding: 12px; border-radius: 10px; background: var(--strip); color: #FFF; font: 800 20px/1 var(--display); text-transform: uppercase; }
.gp-tile { display: grid; justify-items: center; gap: 3px; }
.gp-tile b { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; }
.gp-tile i { font: 700 11px/1 var(--body); font-style: normal; letter-spacing: .08em; color: #C3CCDA; }
.gp-q { color: var(--strip-fg); font-size: 34px; font-weight: 900; }
.gp-sub { font: 600 13px/1.2 var(--body); text-transform: none; color: #C3CCDA; text-align: center; }
.gp-vs { font-size: 14px; color: #C3CCDA; }
.gp-grid { display: grid; grid-template-columns: repeat(5, 30px); gap: 4px; justify-items: center; }
.gp-label { font: 700 9px/1 var(--body); letter-spacing: .04em; color: #C3CCDA; }
.gp-cell { width: 30px; height: 18px; border-radius: 4px; background: var(--miss); }
.gp-cell.hit { background: var(--hit); } .gp-cell.near { background: var(--near); }
.gp-stop { padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.12); }
.gp-stop.dim { color: #C3CCDA; }
.gp-stop { min-width: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-blind, .gp-arcade { flex-direction: column; gap: 8px; }
.gp-slots { display: flex; gap: 6px; }
.gp-slots span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; border: 2px dashed rgba(255,255,255,.35); font-size: 16px; }
.gp-dot { width: 18px; height: 18px; border-radius: 50%; }
.gp-dot.cold { background: var(--cold); } .gp-dot.warm { background: var(--warm); } .gp-dot.hot { background: var(--hot); } .gp-dot.scorch { background: var(--scorch); width: 24px; height: 24px; }
.gp-meter { width: 70%; height: 14px; border-radius: 99px; background: rgba(255,255,255,.15); position: relative; overflow: hidden; }
.gp-meter i { position: absolute; inset: 0 38% 0 46%; background: var(--hit); }

/* ---- Game page ---- */
main:has(.game-box) { max-width: 680px; }
.game-head { display: grid; gap: 8px; justify-items: start; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); text-decoration: none; font: 700 13px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.back::before { content: "←"; }
.back .ico { width: 16px; height: 16px; color: var(--accent-ink); }
.game-head h1 { font-size: clamp(44px, 9vw, 64px); font-style: italic; }
.mode-pill { font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px; background: var(--surface-2); }
.challenge { background: var(--strip); color: #FFF; padding: 12px 16px; border-radius: 10px; }
.challenge strong { color: var(--strip-fg); }
.game-box { display: grid; gap: 14px; }
.game-box > * { min-width: 0; }
.hint-line { color: var(--dim); font-size: 14px; }
.legend { color: var(--dim); font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.swatch:first-child { margin-left: 0; }
.swatch.hit { background: var(--hit); } .swatch.near { background: var(--near); } .swatch.miss { background: var(--miss); }
.swatch.cold { background: var(--cold); } .swatch.warm { background: var(--warm); } .swatch.hot { background: var(--hot); } .swatch.scorch { background: var(--scorch); }
.legend-note { margin-left: 8px; }

/* Picker */
.picker { position: relative; }
.pick-input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); color: var(--fg);
  font: 600 18px var(--body);
}
.pick-input:focus { outline: none; border-color: var(--accent); }
.pick-list {
  position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
}
.pick-list li { padding: 10px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; }
.pick-list li.active, .pick-list li:hover { background: var(--surface-2); }
.pick-list li.none { color: var(--dim); cursor: default; background: none; font-weight: 500; }

/* Mystery grid */
.mg-wrap { display: grid; gap: 8px; }
.mg-rows { display: flex; flex-direction: column-reverse; gap: 8px; }
.mg-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.mg-head { font: 700 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); text-align: center; }
.mg-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.mg-cell {
  min-height: 52px; border-radius: 8px; color: var(--on-state); display: flex; align-items: center; justify-content: center; gap: 2px; padding: 2px;
  font: 800 19px/1 var(--display); letter-spacing: .01em; text-align: center; font-variant-numeric: tabular-nums; min-width: 0;
}
.mg-cell span { min-width: 0; overflow-wrap: anywhere; }
.mg-cell b { font: 700 16px/1 var(--body); }
.mg-cell.hit { background: var(--hit); } .mg-cell.near { background: var(--near); color: #1A1400; } .mg-cell.miss { background: var(--miss); }
.flip { animation: flip .45s both; }
@keyframes flip { 0% { transform: rotateX(90deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* Career path */
.row-controls { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ladder li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 12px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.ladder li.closed { background: transparent; border-style: dashed; color: var(--dim); }
.ladder-label { font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); flex: none; }
.ladder-text { font: 800 23px/1.05 var(--display); text-transform: uppercase; text-align: right; }
.closed .ladder-text { letter-spacing: .2em; font-size: 16px; }
.pop { animation: pop .3s; }
@keyframes pop { 0% { transform: scale(.97); background: var(--accent); } 100% { transform: none; } }
.wrongs { display: flex; flex-wrap: wrap; gap: 6px; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 99px; background: var(--surface-2); font-size: 13px; font-weight: 700; }
.chip .flame { width: 14px; height: 14px; color: #EC7A1C; }
.chip.miss { background: var(--miss); color: var(--on-state); }
.chip.hit { background: var(--hit); color: var(--on-state); }
.chip.near { background: var(--near); color: #1A1400; }
.chip.xp { background: var(--accent); color: var(--on-accent); }

/* Blind rank */
.blind-card { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 22px 16px; border-radius: 14px; background: var(--strip); color: #FFF; }
.blind-card .eyebrow { color: var(--strip-fg); }
.blind-card strong { font: 900 40px/1 var(--display); text-transform: uppercase; }
.blind-card .sub { color: #C3CCDA; }
.blind-card.compact strong { font-size: 34px; }
.blind-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.slot {
  width: 100%; display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 8px 14px; text-align: left;
  border-radius: 10px; border: 2px dashed var(--line); background: transparent; color: var(--dim); font: 600 16px var(--body); cursor: pointer;
}
.slot:not(:disabled):hover { border-color: var(--accent); color: var(--fg); background: var(--surface); }
.slot:disabled { cursor: default; }
.slot.filled { border-style: solid; background: var(--surface); color: var(--fg); font-weight: 700; }
.slot-n { font: 900 28px/1 var(--display); width: 22px; flex: none; }
.slot-name { flex: 1; min-width: 0; }
.slot-stat { font: 800 18px/1 var(--display); flex: none; font-variant-numeric: tabular-nums; }
.slot.revealed { border-style: solid; font-weight: 700; color: var(--on-state); cursor: default; animation: flip .4s both; }
.slot.revealed.hit { background: var(--hit); border-color: var(--hit); }
.slot.revealed.near { background: var(--near); border-color: var(--near); color: #1A1400; }
.slot.revealed.miss { background: var(--miss); border-color: var(--miss); }

/* Hot and cold */
.hc-mapbox { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.hc-map { display: block; width: 100%; height: auto; }
.hc-water { fill: var(--map-water); }
.hc-shape { fill: var(--map-land); stroke: var(--map-border); stroke-width: .8; stroke-linejoin: round; fill-rule: evenodd; transition: fill .2s; }
.hc-shape.pick { cursor: pointer; }
.hc-shape.pick:hover { fill: color-mix(in srgb, var(--accent) 30%, var(--map-land)); }
.hc-shape.on.cold { fill: var(--cold); } .hc-shape.on.warm { fill: var(--warm); } .hc-shape.on.hot { fill: var(--hot); }
.hc-shape.on.scorch { fill: var(--scorch); } .hc-shape.on.found { fill: var(--hit); }
.hc-map { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hc-leader { stroke: var(--map-pin); stroke-width: 1.2; opacity: .55; }
.hc-spot { fill: var(--map-pin); }
.hc-dot { fill: var(--surface); stroke: var(--map-pin); stroke-width: 2; cursor: pointer; transition: fill .2s, stroke-width .15s; }
.hc-dot:focus { outline: none; }
.hc-dot:hover, .hc-dot:focus-visible { fill: var(--accent); }
.hc-shape:focus { outline: none; }
.hc-dot.sel { fill: var(--accent); stroke-width: 3.5; }
.hc-dot.on { stroke-width: 2.5; }
.hc-dot.cold { fill: var(--cold); } .hc-dot.warm { fill: var(--warm); } .hc-dot.hot { fill: var(--hot); } .hc-dot.scorch { fill: var(--scorch); } .hc-dot.found { fill: var(--hit); }
.hc-chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; background: var(--surface); border-radius: 10px; border: 2px solid var(--accent); font-weight: 700; }
.hc-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.hc-row { display: grid; grid-template-columns: 1fr auto 28px; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: #FFF; font-weight: 700; }
.hc-row.cold { background: var(--cold); } .hc-row.warm { background: var(--warm); color: #1A1400; } .hc-row.hot { background: var(--hot); } .hc-row.scorch { background: var(--scorch); } .hc-row.found { background: var(--hit); }
.hc-name { min-width: 0; }
.hc-dist { font: 800 19px/1 var(--display); font-variant-numeric: tabular-nums; }
.hc-dir { text-align: center; font-size: 19px; display: inline-block; }

/* Higher or lower */
.hilo-score { display: flex; align-items: baseline; justify-content: center; gap: 10px; font: 800 18px/1 var(--display); text-transform: uppercase; color: var(--dim); }
.hilo-score strong { font-size: 52px; color: var(--fg); font-variant-numeric: tabular-nums; }
.hilo-stage { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hilo-card { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; text-align: center; padding: 22px 12px 16px; min-height: 290px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; transition: background .2s, border-color .2s; min-width: 0; }
.hilo-name { font: 900 30px/1 var(--display); text-transform: uppercase; min-height: 60px; display: flex; align-items: center; }
.hilo-val { font: 900 60px/1 var(--display); color: var(--accent-ink); font-variant-numeric: tabular-nums; margin-top: 6px; }
.hilo-card .sub { font-size: 13px; }
.hilo-card.right { border-color: var(--hit); }
.hilo-card.right .hilo-val { color: var(--hit); }
.hilo-card.wrong { border-color: var(--bad); }
.hilo-card.wrong .hilo-val { color: var(--bad); }
.hilo-actions { display: grid; gap: 6px; width: 100%; margin-top: auto; padding-top: 8px; }
.hilo-vs { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--strip); color: var(--strip-fg); font: 900 16px/1 var(--display); }

/* Arcade */
.arc-hud { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 800 13px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.arc-hud > div:not(.arc-lives) { display: grid; gap: 2px; min-width: 70px; }
.arc-hud > div:last-child { text-align: right; }
.arc-hud strong { font-size: 34px; color: var(--fg); font-variant-numeric: tabular-nums; }
.arc-lives { display: flex; gap: 6px; }
.arc-lives i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--dim); }
.arc-lives i.on { background: var(--accent); border-color: var(--accent); }
/* Sized so the whole field fits under the sticky header and the HUD on any screen */
.arc-stage { position: relative; width: min(100%, 440px, calc((100dvh - 190px) * 400 / 480)); margin: auto; aspect-ratio: 400 / 480; scroll-margin-bottom: 12px; }
.g-arcade { scroll-margin-top: 110px; }
.arc-canvas { display: block; width: 100%; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; touch-action: none; user-select: none; -webkit-user-select: none; }
.arc-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; background: linear-gradient(180deg, rgba(6,9,16,.35), rgba(6,9,16,.82)); color: #FFF; border-radius: 14px; border: 1px solid var(--line); backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px); }
.arc-overlay strong { font: italic 900 52px/1 var(--display); text-transform: uppercase; text-shadow: 0 3px 0 rgba(0,0,0,.45); }
.arc-overlay p { color: rgba(255,255,255,.88); max-width: 32ch; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.arc-overlay .btn { flex: none; width: min(220px, 100%); }

/* Result */
.result { display: grid; gap: 14px; padding: 20px; background: var(--surface); border: 2px solid var(--accent); border-radius: 14px; box-shadow: var(--shadow); animation: rise .35s both; }
.result.lost { border-color: var(--miss); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.res-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.result h2 { font-size: 38px; font-style: italic; }
.res-detail { color: var(--dim); margin-top: 4px; }
.res-score { font: 900 30px/1 var(--display); text-transform: uppercase; color: var(--accent-ink); text-align: right; flex: none; max-width: 45%; }
.res-grid { margin: 0; font: 18px/1.25 ui-monospace, "Apple Color Emoji", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.res-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.res-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.res-actions .btn { flex: 1 1 180px; }

/* Locker */
.locker { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 20px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.locker::backdrop { background: rgba(5, 9, 19, .6); }
.locker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.locker-head h2 { font-size: 36px; font-style: italic; }
#locker-body { display: grid; gap: 14px; }
.rank-card { display: grid; gap: 7px; }
.rank-big { font: italic 900 42px/1 var(--display); text-transform: uppercase; }
.rank-card .meter { height: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat { display: grid; gap: 3px; text-align: center; padding: 10px 2px; background: var(--surface-2); border-radius: 10px; }
.stat strong { font: 900 30px/1 var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--dim); }
.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.week li { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--dim); font-weight: 700; font-size: 13px; }
.week li.on { background: var(--accent); color: var(--on-accent); }
.locker h3 { font-size: 24px; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.badges li { display: grid; padding: 9px 12px; border-radius: 9px; border: 1px dashed var(--line); color: var(--dim); font-size: 14px; }
.badges strong { font-size: 15px; }
.badges li.got { border: 1px solid var(--accent); color: var(--fg); background: var(--surface-2); }

/* Misc */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; background: var(--fg); color: var(--bg); padding: 11px 18px; border-radius: 10px; font-weight: 700; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
.toast.show { animation: rise .25s; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.copy-fallback { position: fixed; opacity: 0; }

@media (max-width: 800px) {
  .card-line { grid-template-columns: repeat(2, 1fr); }
  .card-line li { border-bottom: 1px solid var(--line); }
  .card-line li:nth-child(2n) { border-right: 0; }
  .card-line li:nth-last-child(-n+2) { border-bottom: 0; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  main { padding-block-start: 16px; }
  .rank { display: none; }
  .game-grid { gap: 10px; }
  .game-card { padding: 12px; gap: 8px; }
  .gc-title { font-size: 21px; }
  .gc-blurb { font-size: 13px; }
  .gc-cta { font-size: 14px; padding: 8px 12px; }
  .gp { min-height: 74px; padding: 8px; gap: 6px; font-size: 16px; }
  .gp-tile b, .gp-q { font-size: 24px; }
  .gp-grid { grid-template-columns: repeat(5, 22px); }
  .gp-cell { width: 22px; height: 14px; }
  .gp-label { font-size: 7px; }
  .gp-stop { padding: 6px 7px; }
  .gp-slots { gap: 4px; }
  .gp-slots span { width: 22px; height: 22px; font-size: 13px; }
  .gp-hilo .gp-tile b { font-size: 19px; }
  .board tbody th a span { display: none; }
  .board tbody th a { padding-right: 2px; padding-left: 12px; }
  .board thead th:first-child { font-size: 0; padding-left: 0; }
  .board th { font-size: 13px; letter-spacing: 0; padding: 10px 1px; }
  .pip { width: 26px; height: 26px; }
  .row-controls { grid-template-columns: 1fr; }
  .big-num { font-size: 44px; }
  .hilo-name { font-size: 24px; min-height: 48px; }
  .hilo-val { font-size: 44px; }
  .mg-cell { font-size: 16px; }
  .ladder-text { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---- Pictures: team logos, flags and headshots (js/media.js) ---- */
.tlogo { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; vertical-align: middle; }
.tlogo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tlogo .lg-d { display: none; }
.tlogo.flag { width: 30px; height: 22px; }
.tlogo.flag img { object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); }
.tlogo.mono { border-radius: 50%; background: var(--surface-2); color: var(--dim); font: 800 9px/1 var(--body); letter-spacing: 0; }
.tlogo.xs { width: 22px; height: 22px; } .tlogo.flag.xs { width: 26px; height: 19px; }
.tlogo.md { width: 34px; height: 34px; } .tlogo.flag.md { width: 38px; height: 28px; }
/* Dark surfaces use each team's dark-background logo */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tlogo.has-dark .lg-l { display: none; }
  :root:not([data-theme="light"]) .tlogo.has-dark .lg-d { display: block; }
}
:root[data-theme="dark"] .tlogo.has-dark .lg-l, .gp .tlogo.has-dark .lg-l, .blind-card .tlogo.has-dark .lg-l { display: none; }
:root[data-theme="dark"] .tlogo.has-dark .lg-d, .gp .tlogo.has-dark .lg-d, .blind-card .tlogo.has-dark .lg-d { display: block; }

.face {
  --tc: #5A667A; --tc2: #C3CCDA;
  position: relative; display: inline-grid; place-items: end center; flex: none; overflow: hidden;
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--tc) 45%, #FFF) 0%, var(--tc) 72%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tc2) 70%, transparent);
}
.face-img { width: 132%; max-width: none; height: auto; display: block; margin-bottom: -4%; }
.face-logo { place-self: center; width: 66%; height: 66%; }
.face-logo.flag { width: 72%; height: 54%; }
.face-init { place-self: center; color: #FFF; font: 900 15px/1 var(--display); letter-spacing: .02em; }
.face.xs { width: 30px; height: 30px; } .face.xs .face-init { font-size: 12px; }
.face.sm { width: 40px; height: 40px; }
.face.lg { width: 104px; height: 104px; } .face.lg .face-init { font-size: 34px; }
.face.res-face { width: 84px; height: 84px; } .face.res-face .face-init { font-size: 28px; }
/* The Hi-Lo portrait is a wide card rather than a circle */
.face.xl { width: 100%; max-width: 220px; height: auto; aspect-ratio: 240 / 175; border-radius: 12px; }
.face.xl .face-img { width: 100%; margin: 0; }
.face.xl .face-init { font-size: 44px; }
/* Wikipedia photos are ordinary pictures, not cutouts, so they fill the frame */
.face-img.photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; margin: 0; place-self: stretch; }
.credits summary { cursor: pointer; width: fit-content; }
.foot a, .link-btn { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.ad-slot { min-height: 100px; margin-top: 8px; }
.ad-slot::before { content: "Advertisement"; display: block; font: 700 10px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.credits p { margin: 6px 0; }
.credit-list { margin: 0; padding-left: 18px; columns: 2 280px; font-size: 12px; }
.credit-list a { color: inherit; }

.pick-list li:not(.none) { display: flex; align-items: center; gap: 10px; }
.mg-name { display: flex; align-items: center; gap: 8px; }
.mg-cell:has(.tlogo) { flex-direction: column; gap: 3px; font-size: 14px; }
.ladder li { align-items: center; }
.ladder-text { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.slot { gap: 10px; }
.blind-card { grid-template-columns: auto; }
.blind-who { display: grid; gap: 6px; justify-items: center; }
.blind-card .sub { display: inline-flex; align-items: center; gap: 8px; }
.hc-name { display: inline-flex; align-items: center; gap: 8px; }
.hc-chosen > span:not(.tlogo) { flex: 1; min-width: 0; }
.hc-chosen { padding-left: 10px; }
.hilo-card { --tc: var(--surface); background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 22%, var(--surface)) 0%, var(--surface) 62%); padding-top: 14px; }
.hilo-vs { top: 72px; }
.res-top { align-items: center; }
.res-text { flex: 1; min-width: 0; }
.gp-side { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; flex: 1; }
.gp-side .face { width: 34px; height: 34px; }
.gp-hilo .gp-tile { max-width: 100%; }
.gp-hilo .gp-tile i { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-hilo .gp-tile b { font-size: 26px; }
.gp .tlogo.gp-logo { width: 46px; height: 46px; }
@media (max-width: 480px) {
  .gp-side .face { width: 28px; height: 28px; }
  .gp-hilo { gap: 4px; }
  .gp .tlogo.gp-logo { width: 36px; height: 36px; }
  .face.lg { width: 84px; height: 84px; }
  .face.res-face { width: 64px; height: 64px; }
  .hilo-vs { top: 56px; }
  .mg-cell:has(.tlogo) { font-size: 12px; }
  .mg-cell .tlogo.cell { width: 20px; height: 20px; }
}

/* Find the Team: clue ladder plus unlabeled pins; names appear only after a confirmed guess */
.hc-dot.miss, .hc-shape.on.miss { fill: var(--miss); }
.hc-dot.miss { stroke-width: 2; cursor: default; }
.hc-row { grid-template-columns: 1fr auto; }
.hc-row.miss { background: var(--miss); color: #FFF; }
.hc-row.found { background: var(--hit); color: #FFF; }
.hc-chosen .btn { flex: none; }
.hc-chosen .btn:disabled { opacity: .45; cursor: default; }
.color-chip { display: inline-block; width: 26px; height: 18px; border-radius: 4px; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); vertical-align: middle; }
