:root {
  --bg: #07080c;
  --bg-2: #10131a;
  --panel: #161a22;
  --panel-2: #1d222c;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #f4f1e8;
  --muted: #9aa3b2;
  --gold: #f0c84a;
  --gold-2: #a57c12;
  --cyan: #3ee0ff;
  --cyan-dim: rgba(62, 224, 255, 0.16);
  --hot: #ff4d6d;
  --hot-dim: rgba(255, 77, 109, 0.16);
  --safe-top: env(safe-area-inset-top);
  --safe-bot: env(safe-area-inset-bottom);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Barlow, "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 600;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 50% -20%, rgba(240, 200, 74, 0.08), transparent 50%),
    radial-gradient(800px 500px at 100% 100%, rgba(255, 77, 109, 0.08), transparent 45%),
    radial-gradient(700px 480px at 0% 80%, rgba(62, 224, 255, 0.07), transparent 42%),
    var(--bg);
  color-scheme: dark;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, .num, .score, .hero-num, .splash-num, .big-code, .code-input, .mini .pts, .val, .pts-input, .round .got, .splash-split b, .hero-detail, .hero-wait, .splash-detail {
  font-family: Teko, "Arial Narrow", Impact, sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.score, .hero-num, .splash-num, .big-code, .mini .pts, .val { font-variant-numeric: tabular-nums; }
.eyebrow, .block-title, .kicker, .splash-kicker, .btn, .tab, .tool, .team-name, .variant em {
  font-family: "Barlow Condensed", Barlow, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.mode-screen { overflow: hidden; }
body.tv-idle, body.tv-idle * { cursor: none; }

#app { min-height: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.sym { color: #f4f1e8; }
.sym.red { color: #ff5d73; }

.page {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: calc(22px + var(--safe-top)) 18px calc(28px + var(--safe-bot));
}
.eyebrow {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
}
.lede { font-size: 1.05rem; line-height: 1.35; color: var(--muted); margin: 0 0 22px; }
h1 {
  font-size: clamp(3rem, 10vw, 4rem);
  line-height: 0.82;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.home h1 { font-size: clamp(5.4rem, 24vw, 8rem); }
.home {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home > .mark {
  position: absolute;
  z-index: 0;
  right: -12px;
  bottom: 4vh;
  font-size: 11rem;
  line-height: 1;
  color: rgba(240, 200, 74, 0.12);
  pointer-events: none;
}
.home > * { position: relative; z-index: 1; }
.stack { display: grid; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 16px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 3px 0 #05060a;
}
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.btn.primary {
  background: linear-gradient(#ffe07a, var(--gold));
  color: #1a1406;
  border-color: #ffe7a3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 4px 0 var(--gold-2);
}
.btn.lagoon { background: #12343a; color: var(--cyan); border-color: rgba(62, 224, 255, 0.35); }
.btn.coral { background: #3a1520; color: #ffd0d8; border-color: rgba(255, 77, 109, 0.45); }
.btn.gold { background: #3a3014; color: var(--gold); border-color: rgba(240, 200, 74, 0.4); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.wide { width: 100%; }
.picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.picks .btn { min-height: 68px; flex-direction: column; gap: 0; font-size: 1.15rem; }
.picks small { font-family: Barlow, sans-serif; letter-spacing: 0.04em; text-transform: none; font-weight: 600; color: var(--muted); font-size: 0.78rem; }
.foot { margin-top: 28px; color: var(--muted); font-size: 0.85rem; }
.ranks, .archive-list { display: grid; gap: 8px; }
.rank, .match-line {
  display: grid;
  gap: 10px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.rank { grid-template-columns: 2.2rem 1fr auto; }
.rank .place, .rank .wins, .match-line .scoreline {
  font-family: Teko, Impact, sans-serif;
  line-height: 0.85;
}
.rank .place { font-size: 2rem; color: var(--gold); }
.rank b, .match-line b { display: block; }
.rank small, .match-line small { color: var(--muted); font-weight: 600; }
.rank .wins { font-size: 2.4rem; color: var(--gold); text-align: right; }
.rank .wins i {
  display: block;
  font-style: normal;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.match-line { grid-template-columns: 1fr auto; }
.match-line .scoreline { font-size: 1.8rem; }
.match-line .win { color: var(--gold); }

.variant-grid { display: grid; gap: 10px; margin: 8px 0 16px; }
.variant {
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.variant-hit {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
  color: inherit;
}
.variant.on { border-color: var(--gold); background: #221c10; box-shadow: 0 0 0 1px rgba(240, 200, 74, 0.35); }
.variant b { display: block; font-family: Teko, Impact, sans-serif; font-size: 2rem; font-weight: 600; line-height: 0.9; letter-spacing: 0.02em; text-transform: uppercase; }
.variant span { display: block; color: var(--muted); margin-top: 4px; font-family: Barlow, sans-serif; letter-spacing: 0; text-transform: none; }
.variant em { display: block; margin-top: 2px; font-style: normal; font-size: 0.85rem; color: var(--gold); }
.catalogue { margin: 8px 0 0; padding-left: 18px; color: var(--ink); }
.catalogue li { margin: 4px 0; }
details summary { cursor: pointer; color: var(--muted); margin-top: 8px; }

.teams { display: grid; gap: 12px; }
.team-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.team-card.t0 { box-shadow: inset 3px 0 0 var(--cyan); }
.team-card.t1 { box-shadow: inset 3px 0 0 var(--hot); }
.team-card h2 { margin: 0 0 8px; font-size: 1.7rem; line-height: 0.9; }
label { display: grid; gap: 4px; font-size: 0.78rem; color: var(--muted); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
input[type="text"], input[type="number"], .code-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0c0e14;
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  font-family: Barlow, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}
.code-input {
  font-family: Teko, Impact, sans-serif;
  font-size: clamp(3rem, 14vw, 4.6rem);
  text-align: center;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 8px 8px 4px 18px;
  line-height: 0.9;
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.vs { text-align: center; font-family: Teko, Impact, sans-serif; font-size: 1.8rem; letter-spacing: 0.18em; color: var(--hot); margin: 0; }
.field { margin: 12px 0; }
.hint { color: var(--muted); font-size: 0.92rem; margin: 0 0 12px; }

.remote {
  width: min(520px, 100%);
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.remote-top { padding: calc(8px + var(--safe-top)) 14px 8px; }
.top-row, .score-row, .dock-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.top-row { color: var(--muted); font-size: 0.85rem; }
.code-pill { font-family: Teko, Impact, sans-serif; font-size: 1.4rem; letter-spacing: 0.14em; color: var(--gold); }
.score-row { align-items: stretch; margin-top: 4px; }
.mini {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px 6px;
  min-width: 0;
}
.mini.t0 { box-shadow: inset 0 -3px 0 var(--cyan); }
.mini.t1 { box-shadow: inset 0 -3px 0 var(--hot); }
.mini b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.92rem; }
.mini .pts { font-size: 2.3rem; line-height: 0.8; }
.mini.t0 .pts { color: var(--cyan); }
.mini.t1 .pts { color: #ff8fa3; }
.status-line { margin: 8px 2px 0; font-size: 0.95rem; color: var(--gold); }
.remote-scroll { overflow: auto; padding: 4px 14px 12px; }
.block-title { margin: 14px 0 6px; font-size: 0.85rem; color: var(--muted); }
.who-grid, .val-grid, .meld-grid { display: grid; gap: 8px; }
.who-grid { grid-template-columns: 1fr 1fr; }
.who, .suit, .val, .meld, .tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  min-height: 54px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 3px 0 #05060a;
}
.who { text-align: left; padding: 8px 10px; }
.who small { display: block; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.who.t0.is-on { background: #10262c; border-color: var(--cyan); color: var(--cyan); }
.who.t1.is-on { background: #2c1218; border-color: var(--hot); color: #ffd0d8; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tab { font-size: 1.15rem; }
.tab.is-on { background: var(--ink); color: #12140a; border-color: white; }
.suit-row { display: grid; gap: 8px; margin: 8px 0; }
.suit-row.c4 { grid-template-columns: repeat(4, 1fr); }
.suit-row.c5 { grid-template-columns: repeat(5, 1fr); }
.suit { padding: 6px 2px; }
.suit b { display: block; font-size: 1.45rem; line-height: 1; }
.suit.word b { font-family: "Barlow Condensed", sans-serif; font-size: 1rem; letter-spacing: 0.06em; }
.suit i { font-style: normal; font-size: 0.68rem; color: var(--muted); }
.suit.is-on { background: #241c0c; border-color: var(--gold); }
.suit.is-on i { color: #e7d7a4; }
.val-grid { grid-template-columns: repeat(3, 1fr); }
.val { font-size: 2rem; line-height: 0.8; padding-top: 8px; }
.val.is-on, .meld.is-on { background: var(--gold); color: #1a1406; border-color: #ffe7a3; }
.val.is-standing, .suit.is-standing { box-shadow: inset 0 0 0 2px var(--cyan), 0 3px 0 #05060a; }
.val.special { grid-column: 1 / -1; background: #241c0c; color: var(--gold); font-size: 1.8rem; letter-spacing: 0.14em; }
.val.special.is-on { background: var(--gold); color: #1a1406; }
.meld-grid { grid-template-columns: 1fr 1fr; }
.meld { padding: 8px; font-family: "Barlow Condensed", sans-serif; letter-spacing: 0.06em; text-transform: uppercase; }
.meld small { display: block; color: var(--muted); font-family: Barlow, sans-serif; letter-spacing: 0; text-transform: none; }
.meld.is-on small { color: #3d320c; }
.meld.off { opacity: 0.35; }
.log { display: grid; gap: 6px; margin: 8px 0 16px; }
.log-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 8px 8px 12px;
}
.x {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: #0c0e14;
  color: var(--ink);
  font-weight: 800;
}
.dock {
  display: grid;
  gap: 6px;
  padding: 6px 12px calc(6px + var(--safe-bot));
  background: rgba(7, 8, 12, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.dock .btn {
  min-height: 40px;
  padding: 6px 10px 4px;
  font-size: 1.15rem;
  box-shadow: none;
}
.dock-main { display: grid; grid-template-columns: 1fr 76px; gap: 6px; }
.preview { margin: 0; min-height: 0; color: var(--gold); font-size: 0.92rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview.is-empty { display: none; }
.go.is-off { opacity: 0.4; }
.pair-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; }
.dock .btn.manche {
  margin: 0;
  min-height: 40px;
  padding: 6px 8px 4px;
  background: var(--gold);
  color: #1a1406;
  border-color: #ffe7a3;
  box-shadow: none;
  font-size: 1.2rem;
}
.dock-links { margin: 0; flex-wrap: nowrap; justify-content: space-between; }
.dock-links button {
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 700;
  min-height: 28px;
  min-width: 0;
  padding: 0;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 30;
  padding: 12px;
}
.sheet-card {
  width: min(520px, 100%);
  background: #12151c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 16px calc(16px + var(--safe-bot));
  max-height: min(88dvh, 760px);
  overflow: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.sheet-card h2 { margin: 0 0 8px; font-size: 3rem; line-height: 0.85; text-transform: uppercase; }
.sheet.is-score { align-items: stretch; padding: 0; }
.sheet.is-score .sheet-card {
  width: min(520px, 100%);
  margin: 0 auto;
  border-radius: 0;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(14px + var(--safe-top)) 16px calc(12px + var(--safe-bot));
}
.sheet.is-score .sheet-card h2 { font-size: 2.4rem; margin-bottom: 2px; }
.sheet.is-score .hint { margin: 0 0 10px; }
.score-pad {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 12px;
}
.score-team {
  background: #0c0e14;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px 10px;
  text-align: left;
  min-width: 0;
}
.score-team.t0 { box-shadow: inset 4px 0 0 var(--cyan); }
.score-team.t1 { box-shadow: inset 4px 0 0 var(--hot); }
.score-team header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.score-team b {
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.25rem;
}
.score-team header span { color: var(--muted); font-size: 0.85rem; }
.score-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "field field"
    "minus plus";
  gap: 8px;
  margin-top: 10px;
}
.score-step button:first-child { grid-area: minus; }
.score-step button:last-child { grid-area: plus; }
.score-step button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  font-family: Teko, Impact, sans-serif;
  font-size: 2.8rem;
  line-height: 0.7;
  min-height: 64px;
  padding-top: 6px;
}
.score-team .pts-input {
  grid-area: field;
  width: 100%;
  height: 96px;
  padding: 12px 8px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #07080c;
  color: var(--ink);
  font-size: 4.6rem;
  text-align: center;
}
.score-next {
  margin: 8px 0 0;
  font-family: Teko, Impact, sans-serif;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--gold);
  text-align: center;
}
.sheet.is-score .btn.primary { margin-top: auto; min-height: 56px; }
.link-box {
  background: #0c0e14;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.link-box span { font-weight: 700; word-break: break-all; }
.link-box small { color: var(--muted); }
.big-code { font-size: clamp(4.2rem, 18vw, 6rem); letter-spacing: 0.12em; text-align: center; margin: 0; line-height: 0.8; color: var(--gold); }
.toast {
  position: fixed;
  left: 50%;
  top: calc(12px + var(--safe-top));
  transform: translateX(-50%) translateY(-12px);
  background: var(--gold);
  color: #1a1406;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 40;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 2.1vh 2.4vw 1.4vh;
  gap: 0.6rem;
}
body.is-fs .stage-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  padding: 1.4vh 2vw 2.4vh;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent);
  transition: opacity 0.35s ease;
}
body.is-fs.tv-idle .stage-head {
  opacity: 0 !important;
  pointer-events: none;
}
body.is-fs .stage { padding: 1.6vh 1.8vw 1.2vh; }
.stage-head, .head-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.round-label { margin: 0; font-family: Teko, Impact, sans-serif; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 0.9; letter-spacing: 0.04em; }
.head-actions { flex-wrap: wrap; justify-content: flex-end; }
.tool {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 6px;
  min-height: 36px;
  padding: 4px 12px 2px;
  font-size: 0.95rem;
}
.link-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3ddc97;
  box-shadow: 0 0 0 5px rgba(61, 220, 151, 0.15);
  vertical-align: middle;
}
.link-dot.off { background: var(--hot); box-shadow: none; }
.board {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.35fr) minmax(180px, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.team {
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 0.6rem;
}
.team.t0 { box-shadow: inset 0 0 0 1px rgba(62, 224, 255, 0.18); }
.team.t1 { box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.2); }
.team-name { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2.2rem); }
.players { margin: 0.15rem 0 0.35rem; font-size: clamp(0.95rem, 1.6vw, 1.25rem); color: var(--muted); }
.score { margin: 0; line-height: 0.78; font-size: clamp(4.4rem, 10vw, 8.5rem); }
.stage.tv .score { font-size: clamp(5rem, 12vw, 10.5rem); }
.team.t0 .score { color: var(--cyan); text-shadow: 0 0 24px rgba(62, 224, 255, 0.28); }
.team.t1 .score { color: #ff8fa3; text-shadow: 0 0 24px rgba(255, 77, 109, 0.28); }
.delta { margin: 0.35rem 0 0; font-weight: 700; color: var(--muted); }
.bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.8rem auto 0;
  width: min(220px, 80%);
  overflow: hidden;
}
.bar span { display: block; height: 100%; border-radius: inherit; }
.team.t0 .bar span { background: var(--cyan); }
.team.t1 .bar span { background: var(--hot); }
.crown {
  display: inline-block;
  margin: 0.45rem 0 0;
  padding: 0.1rem 0.55rem;
  border-radius: 4px;
  background: var(--gold);
  color: #1a1406;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(240, 200, 74, 0.28);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, rgba(240, 200, 74, 0.08), transparent 62%), #0d1016;
}
.kicker { margin: 0 0 0.8rem; font-size: 0.95rem; color: var(--gold); }
.hero-num { position: relative; margin: 0; font-size: clamp(5rem, 13vw, 10rem); line-height: 0.85; padding-top: 0.28em; }
.stage.tv .hero-num { font-size: clamp(6rem, 16vw, 12rem); }
.hero-num.word { font-size: clamp(3.4rem, 8vw, 7rem); letter-spacing: 0.02em; }
.hero-detail, .hero-who, .hero-wait { margin: 0.15rem 0 0; }
.hero-detail { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 0.85; color: #fff; }
.hero-who { font-size: clamp(1.05rem, 2vw, 1.5rem); color: var(--muted); }
.hero-wait {
  font-family: Barlow, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.25;
  padding-top: 0.2rem;
  color: #d5d8e0;
}
.flag {
  display: inline-block;
  margin: 0.7rem auto 0;
  padding: 0.15rem 0.7rem 0.05rem;
  border-radius: 4px;
  background: var(--gold);
  color: #1a1406;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}
.ribbon { display: flex; gap: 0.45rem; overflow-x: auto; padding-bottom: 0.15rem; }
.chip {
  flex: 0 0 auto;
  border-radius: 4px;
  padding: 0.35rem 0.7rem 0.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  font-weight: 700;
}
.chip.latest { background: var(--gold); color: #1a1406; border-color: #ffe7a3; }
.chip.latest .sym, .chip.latest .sym.red { color: #1a1406; }
.recap-panel { overflow: auto; min-height: 0; display: none; }
.stage.table .recap-panel, .stage.pc .recap-panel, .stage.is-recap .recap-panel { display: block; }
.stage.table .recap-panel, .stage.pc .recap-panel { max-height: 30vh; }
.stage.is-recap .live-only { display: none; }
.stage.is-recap .board { flex: 0 0 auto; grid-template-columns: 1fr 1fr; }
.stage.is-recap .recap-panel { flex: 1; max-height: none; }
.rounds { display: grid; gap: 0.5rem; }
.round {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.round b { font-family: "Barlow Condensed", sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
.round .got { font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 0.85; color: var(--gold); }
.empty { color: var(--muted); font-size: 1.15rem; padding: 1rem 0; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6vh 6vw;
  overflow: hidden;
}
.splash[hidden] { display: none !important; }
.splash.t0 { background: radial-gradient(circle at 50% 42%, #123f46 0%, #07080c 68%); }
.splash.t1 { background: radial-gradient(circle at 50% 42%, #4a1824 0%, #07080c 68%); }
.splash.tx { background: radial-gradient(circle at 50% 42%, #3d3112 0%, #07080c 68%); }
.splash-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.splash-kicker {
  margin: 0 0 0.35rem;
  line-height: 1.15;
  font-size: clamp(1.15rem, 2.4vw, 1.8rem);
  color: var(--gold);
  position: relative;
  z-index: 2;
}
.splash-num {
  position: relative;
  margin: 0;
  font-size: clamp(7rem, 26vw, 16rem);
  line-height: 0.82;
  padding-top: 0.36em;
  color: white;
}
.splash-num.word { font-size: clamp(4.5rem, 13vw, 10rem); line-height: 0.9; padding-top: 0.28em; }
.splash-suit {
  position: absolute;
  left: calc(100% + 0.08em);
  top: 56%;
  transform: translateY(-50%);
  font-family: Barlow, sans-serif;
  font-size: 0.42em;
  font-weight: 600;
  line-height: 1;
}
.hero-num .splash-suit {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  display: inline-block;
  margin-left: 0.12em;
  vertical-align: 0.28em;
}
.splash-detail { margin: 0.55rem 0 0; font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 1; padding-top: 0.16em; }
.splash-who { margin: 0.35rem 0 0; font-size: clamp(1.3rem, 3vw, 2.1rem); font-weight: 700; }
.splash-hint { margin: 0.7rem 0 0; color: var(--gold); font-size: clamp(1rem, 2vw, 1.35rem); }
.splash-split { display: flex; justify-content: center; gap: 8vw; margin-top: 0.4rem; }
.splash-split b { display: block; font-size: clamp(5rem, 14vw, 9rem); line-height: 0.78; }
.splash.on .splash-num, .splash.on .splash-split { animation: slam 0.5s cubic-bezier(0.16, 1.25, 0.3, 1) both; }
.splash.motion .splash-num, .splash.motion .splash-split { animation: none; }
.splash.on::after {
  content: "";
  position: absolute;
  width: 42vmin;
  height: 42vmin;
  border: 2px solid rgba(240, 200, 74, 0.35);
  border-radius: 50%;
  animation: ring 1.15s ease-out both;
}
.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold);
  animation: spark 0.9s ease-out both;
}
.spark:nth-child(1) { left: 18%; top: 22%; }
.spark:nth-child(2) { right: 16%; top: 28%; animation-delay: 0.05s; background: var(--hot); }
.spark:nth-child(3) { left: 28%; bottom: 18%; animation-delay: 0.1s; background: var(--cyan); }

.load, .missing { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 24px; }
.missing h1 { font-size: 4.5rem; }

.shake { animation: shake 0.4s linear; }

@keyframes slam {
  from { transform: scale(1.22); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes ring {
  from { transform: scale(0.4); opacity: 0.8; }
  to { transform: scale(2.2); opacity: 0; }
}
@keyframes spark {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: translateY(-16px) scale(1); opacity: 1; }
}
@keyframes shake {
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .board { grid-template-columns: 1fr 1fr; }
  .hero { grid-column: 1 / -1; order: -1; }
  .stage.tv .hero-num { font-size: clamp(4.5rem, 24vw, 7.5rem); }
  .stage.tv .score { font-size: clamp(3.6rem, 18vw, 5.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
