/* ============================================================
   WORLD CUP 2026 — VINTAGE WALLCHART DESIGN SYSTEM
   Flat screen-print: hairline rules, aged paper, fold creases.
   ============================================================ */
:root {
  /* paper tones: page is mid, cards are lighter, wells are darker */
  --paper:   oklch(0.950 0.024 82);   /* card / panel face */
  --paper-2: oklch(0.910 0.030 80);   /* page ground */
  --paper-3: oklch(0.866 0.034 77);   /* inset wells / tracks */
  --ink:     oklch(0.235 0.020 256);
  --ink-soft: oklch(0.40 0.02 256);

  --red:   oklch(0.545 0.170 28);
  --blue:  oklch(0.470 0.130 256);
  --green: oklch(0.500 0.110 152);
  --gold:  oklch(0.745 0.140 80);

  --red-ink:   oklch(0.45 0.16 28);
  --gold-ink:  oklch(0.52 0.12 78);

  --pot1: var(--ink);
  --pot2: var(--red);
  --pot3: var(--green);
  --pot4: var(--gold);

  --rule: 2.5px;
  --hair: 1.5px;
  --frame: var(--ink);
  /* "shadows" are now flat print artifacts, not offset drops */
  --shadow: none;
  --shadow-sm: none;

  --font-display: "Anton", "Archivo", sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "Space Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--paper-2); }
body {
  background-color: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}
/* halftone paper grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(var(--ink) 0.5px, transparent 0.6px);
  background-size: 6px 6px; opacity: 0.10;
}
/* fold creases + aged vignette (sits below masthead/nav, over the content page) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    /* vertical folds at thirds */
    linear-gradient(90deg, transparent calc(33.33% - 3px), rgba(0,0,0,.04) calc(33.33% - 1px), rgba(255,255,255,.14) 33.33%, rgba(0,0,0,.035) calc(33.33% + 1px), transparent calc(33.33% + 3px)),
    linear-gradient(90deg, transparent calc(66.66% - 3px), rgba(0,0,0,.04) calc(66.66% - 1px), rgba(255,255,255,.14) 66.66%, rgba(0,0,0,.035) calc(66.66% + 1px), transparent calc(66.66% + 3px)),
    /* horizontal fold at middle */
    linear-gradient(180deg, transparent calc(50% - 3px), rgba(0,0,0,.035) calc(50% - 1px), rgba(255,255,255,.12) 50%, rgba(0,0,0,.035) calc(50% + 1px), transparent calc(50% + 3px)),
    /* corner aging */
    radial-gradient(125% 95% at 50% 40%, transparent 66%, rgba(60,40,10,.08) 100%);
  mix-blend-mode: multiply;
}

::selection { background: var(--gold); color: var(--ink); }

/* ---- type helpers ---- */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; line-height: 0.92; text-transform: uppercase; }
.mono { font-family: var(--font-mono); }
.eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-soft); }

/* ---- shell ---- */
#app { min-height: 100vh; }
main { padding-bottom: 64px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 26px; }
.wrap-wide { max-width: 1320px; margin: 0 auto; padding: 0 22px; }

/* registration crosshairs */
.regmark { position: fixed; width: 22px; height: 22px; z-index: 50; opacity: 0.45; pointer-events: none; }
.regmark::before, .regmark::after { content:""; position:absolute; background: var(--ink); }
.regmark::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
.regmark::after  { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-50%); }
.regmark.tl { top: 10px; left: 10px; } .regmark.tr { top: 10px; right: 10px; }
.regmark.bl { bottom: 10px; left: 10px; } .regmark.br { bottom: 10px; right: 10px; }

/* ============ MASTHEAD — inked banner ============ */
.masthead { background: var(--ink); color: var(--paper); position: relative; z-index: 5; border-bottom: 5px double var(--paper-2); overflow: hidden; }
.masthead-band {
  display: flex; align-items: center; justify-content: center; gap: clamp(14px, 4vw, 56px);
  max-width: 1320px; margin: 0 auto; padding: 14px 26px 12px;
}
.masthead-title { display: flex; flex-direction: column; align-items: center; flex: 0 1 auto; min-width: 0; }
.masthead-title h1 { margin: 4px 0; font-size: clamp(30px, 6vw, 66px); color: var(--paper); letter-spacing: 0.02em; white-space: nowrap; text-shadow: 2px 2px 0 rgba(0,0,0,.35); }
.rule-double { width: 100%; display: flex; flex-direction: column; gap: 2px; }
.rule-double span { display: block; height: 2px; background: var(--paper); opacity: 0.92; }
.rule-double span:last-child { height: 1px; opacity: 0.6; }
.rule-double.bot { flex-direction: column-reverse; }
.ball-roundel { display: block; width: clamp(52px, 8vw, 76px); height: clamp(52px, 8vw, 76px); flex: 0 0 auto; object-fit: contain; }

/* ============ GAME SWITCH ============ */
.gameswitch { display: flex; background: var(--ink); }
.gtab {
  appearance: none; cursor: pointer; flex: 1; background: transparent; border: none;
  padding: 11px 20px 12px; display: flex; flex-direction: column; align-items: center;
  text-decoration: none;
  border-right: var(--hair) solid color-mix(in oklch, var(--paper) 35%, transparent);
  border-top: var(--hair) solid color-mix(in oklch, var(--paper) 28%, transparent);
  transition: background 0.12s;
}
.gtab:last-child { border-right: none; }
.gtab-label { font-family: var(--font-display); text-transform: uppercase; font-size: 22px; line-height: 0.95; color: color-mix(in oklch, var(--paper) 62%, transparent); white-space: nowrap; }
.gtab:hover { background: rgba(255,255,255,0.06); }
.gtab:hover .gtab-label { color: var(--paper); }
.gtab.active { background: var(--gold); }
.gtab.active .gtab-label { color: var(--ink); }

.soon { padding: 80px 0; text-align: center; letter-spacing: 0.2em; color: var(--ink-soft); }

/* ============ NAV TABS ============ */
.nav { display: flex; border-bottom: var(--rule) solid var(--ink); background: var(--paper-3); position: sticky; top: 0; z-index: 40; }
.nav .wrap, .nav .wrap-wide { display: flex; }
.tab {
  appearance: none; background: transparent; border: none; cursor: pointer;
  font-family: var(--font-display); text-transform: uppercase; font-size: 16px;
  padding: 12px 22px; color: var(--ink-soft); position: relative;
  text-decoration: none;
  border-right: var(--hair) solid var(--ink); letter-spacing: 0.03em; transition: background 0.12s, color 0.12s;
}
.tab:first-child { border-left: var(--hair) solid var(--ink); }
.tab .tnum { font-family: var(--font-mono); font-size: 9px; vertical-align: super; margin-right: 5px; opacity: 0.55; }
.tab:hover { background: var(--paper); color: var(--ink); }
.tab.active { background: var(--ink); color: var(--paper); }

/* ============ PANEL / FRAME ============ */
.panel { border: var(--rule) solid var(--ink); background: var(--paper); }

/* ---- pot pill ---- */
.pot-pill { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; padding: 2px 6px; border: 1.5px solid; text-transform: uppercase; white-space: nowrap; }
.pot-1 { color: var(--paper); background: var(--pot1); border-color: var(--pot1); }
.pot-2 { color: var(--paper); background: var(--pot2); border-color: var(--pot2); }
.pot-3 { color: var(--paper); background: var(--pot3); border-color: var(--pot3); }
.pot-4 { color: var(--ink);   background: var(--pot4); border-color: var(--pot4); }

/* ---- flat vintage flag ---- */
.vflag { display: inline-block; vertical-align: middle; border: 1px solid rgba(20,24,32,0.5); box-shadow: inset 0 0 0 100px transparent; background-size: cover !important; background-position: center !important; flex: 0 0 auto; }

.perf { border: none; border-top: 2px dashed var(--ink); opacity: 0.45; margin: 0; }

@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: 0.3; transform: scale(0.66);} }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; animation: pulse 1.2s ease-in-out infinite; box-shadow: 0 0 0 2px var(--paper); }

.row { display: flex; align-items: center; }
.spread { justify-content: space-between; }
.fade-up { animation: fadeUp 0.4s cubic-bezier(.2,.7,.3,1); }
@keyframes fadeUp { from { transform: translateY(10px); } to { transform: none; } }

/* ============== STANDINGS styles ============== */
.view { padding-top: 26px; }

/* status banner */
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; margin-bottom: 14px; }
.statusbar-left { display: flex; align-items: center; gap: 18px; }
.statusbar-round { font-size: 24px; flex: 0 0 auto; }
.statusbar-remain { font-size: 11px; letter-spacing: 0.18em; border-left: 2px solid var(--ink); padding-left: 18px; flex: 0 0 auto; white-space: nowrap; }
.statusbar-right { display: flex; gap: 0; border: 2px solid var(--ink); align-items: stretch; }
.modebtn {
  appearance: none; cursor: pointer; background: var(--paper); border: none;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  padding: 7px 13px; color: var(--ink-soft); border-right: 2px solid var(--ink);
}
.modebtn:last-child { border-right: none; }
.modebtn.on { background: var(--ink); color: var(--paper); }

.data-freshness {
  display: flex; align-items: center; gap: 7px; padding: 7px 10px;
  border-right: 2px solid var(--ink); background: var(--paper);
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); white-space: nowrap;
}
.data-freshness .live-dot { width: 7px; height: 7px; box-shadow: none; }
.data-freshness.is-live { color: var(--red-ink); }
.data-time { color: var(--ink-soft); opacity: 0.75; }
.data-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); display: inline-block; opacity: 0.55; }

.lead-note { font-size: 9.5px; letter-spacing: 0.14em; color: var(--ink-soft); margin-bottom: 16px; padding-left: 2px; }

.standings { display: flex; flex-direction: column; gap: 10px; }

/* a standing row */
.standrow {
  border: var(--rule) solid var(--ink); background: var(--paper);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  animation: fadeUp 0.4s cubic-bezier(.2,.7,.3,1);
}
.standrow.champ { box-shadow: var(--shadow); border-color: var(--ink);
  background: linear-gradient(0deg, color-mix(in oklch, var(--gold) 16%, var(--paper)) 0%, var(--paper) 60%); }
.standrow.champ::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--gold);
}

.standrow-top { display: flex; align-items: center; gap: 16px; padding: 13px 18px 13px 20px; }

.rank-block { display: flex; flex-direction: column; align-items: center; width: 46px; flex: 0 0 46px; }
.rank-num { font-size: 38px; line-height: 0.8; }
.champ .rank-num { color: var(--gold-ink); }
.rank-move { font-size: 9px; margin-top: 2px; font-weight: 700; }
.rank-move.up { color: var(--green); } .rank-move.down { color: var(--red); } .rank-move.flat { color: var(--ink-soft); opacity: 0.5; }

.monogram {
  width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 18px; border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-sm); letter-spacing: 0.02em;
}

.who { width: 150px; flex: 0 0 150px; }
.who-name { font-size: 26px; line-height: 0.9; }
.who-meta { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.alive-flag { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--red-ink); }
.out-flag { font-size: 9.5px; letter-spacing: 0.12em; color: var(--ink-soft); opacity: 0.7; }
.ceil-note { font-size: 9px; letter-spacing: 0.1em; color: var(--ink-soft); }

/* team chips strip */
.chips { display: flex; gap: 7px; flex: 1; justify-content: center; flex-wrap: wrap; }
.chip {
  position: relative; display: flex; align-items: center; gap: 7px;
  border: 2px solid var(--ink); background: var(--paper); padding: 5px 9px 5px 7px;
  border-left-width: 6px; min-width: 0;
}
.pot-edge-1 { border-left-color: var(--pot1); }
.pot-edge-2 { border-left-color: var(--pot2); }
.pot-edge-3 { border-left-color: var(--pot3); }
.pot-edge-4 { border-left-color: var(--pot4); }
.chip-dead { opacity: 0.5; }
.chip-alive { box-shadow: 0 0 0 2px color-mix(in oklch, var(--gold) 55%, transparent); }
.chip-flag { font-size: 17px; line-height: 1; }
.chip-abbr { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.chip-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.chip-stage { font-size: 8px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-soft); }
.chip-stage.is-live { color: var(--red-ink); }
.chip-pts { font-size: 12px; font-weight: 700; }
.chip-dot { position: absolute; top: -4px; right: -4px; }

/* score block */
.score-block { width: 96px; flex: 0 0 96px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.score-num { font-size: 36px; line-height: 0.85; font-weight: 700; }
.champ .score-num { color: var(--gold-ink); }
.score-lbl { font-size: 10px; letter-spacing: 0.2em; color: var(--ink-soft); }

.champ-stamp {
  position: absolute; top: 9px; right: -34px; transform: rotate(38deg);
  background: var(--gold); color: var(--ink); font-size: 11px; letter-spacing: 0.14em;
  padding: 3px 40px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}

/* race bar */
.racebar { padding: 0 18px 12px 84px; }
.racebar-track {
  position: relative; height: 11px; background: var(--paper-3);
  border: 2px solid var(--ink); overflow: visible;
}
.racebar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); transition: width 0.7s cubic-bezier(.2,.8,.3,1); }
.champ .racebar-fill { background: var(--gold-ink); }
.racebar-ceil {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, var(--ink) 0 3px, transparent 3px 7px);
  opacity: 0.4; transition: width 0.7s cubic-bezier(.2,.8,.3,1);
}
.racebar-lead { position: absolute; top: -3px; bottom: -3px; width: 2.5px; background: var(--red); }
.racebar-lead::after { content: ""; position: absolute; top: -4px; left: -3px; border: 4px solid transparent; border-top-color: var(--red); }

/* legend */
.legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; border: var(--rule) solid var(--ink); padding: 16px; background: var(--paper); box-shadow: var(--shadow-sm); }
.legend-item { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.legend-mult { font-size: 12px; font-weight: 700; }
.legend-note { font-size: 12px; color: var(--ink-soft); }

.standings-pending {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 1.15fr);
  gap: 28px; align-items: center; min-height: 360px; padding: clamp(24px, 5vw, 58px);
  background:
    linear-gradient(90deg, color-mix(in oklch, var(--gold) 10%, transparent), transparent 42%),
    var(--paper);
}
.standings-pending-copy h2 { margin: 8px 0 14px; font-size: clamp(48px, 7vw, 82px); }
.standings-pending-copy p { max-width: 500px; margin: 0; color: var(--ink-soft); line-height: 1.55; text-wrap: pretty; }
.standings-pending-status {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  border: var(--hair) solid var(--ink); padding: 7px 10px; background: var(--paper-2);
  font-size: 9px; font-weight: 700; letter-spacing: .12em;
}
.standings-pending-pots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.standings-pending-pot {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  min-width: 0; padding: 18px 8px 14px; border: var(--hair) dashed var(--ink);
  border-top: 6px solid var(--ink); background: var(--paper-2);
}
.standings-pending-pot img { display: block; width: min(90px, 100%); aspect-ratio: 1; object-fit: contain; opacity: .72; filter: grayscale(.28); }
.standings-pending-pot .mono { font-size: 7px; letter-spacing: .12em; color: var(--ink-soft); }

@media (max-width: 920px) {
  .who { display: none; }
  .chips { flex: 1; }
  .legend { grid-template-columns: repeat(2, 1fr); }
  .racebar { padding-left: 18px; }
  .standings-pending { grid-template-columns: 1fr; min-height: 0; }
}
@media (max-width: 560px) {
  .standings-pending-pots { grid-template-columns: repeat(2, 1fr); }
}

/* ============== DRAFT styles ============== */
.draft-head { display: flex; gap: 30px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-top: 6px; }
.draft-head-text { max-width: 560px; }
.draft-title { font-size: clamp(44px, 7vw, 78px); margin: 4px 0 8px; }
.draft-desc { font-size: 15px; line-height: 1.5; max-width: 480px; color: var(--ink-soft); margin: 0; text-wrap: pretty; }

.draft-rules { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.draft-stat { display: flex; flex-direction: column; align-items: center; }
.draft-stat-num { font-size: 40px; line-height: 0.8; }
.draft-stat-lbl { font-size: 8.5px; letter-spacing: 0.14em; color: var(--ink-soft); margin-top: 3px; }

.deal-btn {
  appearance: none; cursor: pointer; font-family: var(--font-display); text-transform: uppercase;
  font-size: 18px; letter-spacing: 0.04em; padding: 13px 22px; color: var(--paper);
  background: var(--red); border: var(--rule) solid var(--ink); box-shadow: var(--shadow-sm);
  transition: transform 0.08s, box-shadow 0.08s;
}
.deal-btn:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.deal-btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.deal-btn:disabled { opacity: 0.6; cursor: progress; }

/* draft grid of player cards */
.dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dcard { overflow: hidden; }
.dcard-head { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: var(--rule) solid var(--ink); }
.dcard-head .monogram { width: 36px; height: 36px; flex: 0 0 36px; font-size: 15px; box-shadow: none; background: var(--paper) !important; color: var(--ink) !important; }
.dcard-name { font-size: 23px; flex: 1; }
.dcard-no { font-size: 12px; opacity: 0.8; }

.dcard-slots { display: grid; grid-template-columns: repeat(4, 1fr); }
.dslot {
  border-right: 1.5px solid var(--ink); padding: 11px 6px 9px; text-align: center;
  border-top: 5px solid var(--ink); position: relative; background: var(--paper);
}
.dslot:last-child { border-right: none; }
.pot-edge-1 { border-top-color: var(--pot1); }
.pot-edge-2 { border-top-color: var(--pot2); }
.pot-edge-3 { border-top-color: var(--pot3); }
.pot-edge-4 { border-top-color: var(--pot4); }
.dslot-head { display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 7px; }
.dslot-head .pot-pill { font-size: 7.5px; padding: 1px 4px; }
.dslot-mult { font-size: 10px; font-weight: 700; }
.dslot-flag { font-size: 30px; line-height: 1; min-height: 34px; }
.dslot-name { font-family: var(--font-body); font-weight: 700; font-size: 12px; line-height: 1.05; margin-top: 5px; min-height: 26px; display: flex; align-items: center; justify-content: center; text-wrap: balance; }
.dslot-foot { font-size: 8px; letter-spacing: 0.1em; color: var(--ink-soft); margin-top: 2px; }

@keyframes flipIn { from { transform: translateY(10px) scale(0.9); } to { transform: none; } }
.dslot-in { animation: flipIn 0.34s cubic-bezier(.2,.8,.3,1); }

/* cut box */
.cutbox { margin-top: 26px; border: var(--rule) solid var(--ink); background: var(--paper-2); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.cutbox-label { font-size: 16px; margin-bottom: 10px; color: var(--ink-soft); }
.cut-strip { display: flex; flex-wrap: wrap; gap: 7px; }
.cut-chip {
  display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 6px;
  border: 2px solid var(--ink); border-left-width: 5px; background: var(--paper);
  opacity: 0.55; text-decoration: line-through; text-decoration-thickness: 1.5px;
}
.cut-flag { font-size: 14px; filter: grayscale(0.7); }
.cut-name { font-size: 11px; font-weight: 700; }

@media (max-width: 920px) {
  .dgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .dgrid { grid-template-columns: 1fr; }
}

/* ============== SCORING / REFERENCE styles ============== */
.ref-head { margin: 6px 0 22px; }
.ref-title { font-size: clamp(44px, 7vw, 78px); margin: 2px 0 0; }

.ref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ref-col { border: var(--rule) solid var(--ink); background: var(--paper); box-shadow: var(--shadow-sm); padding: 16px 18px 14px; display: flex; flex-direction: column; }
.ref-col-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 12px; }
.ref-col-head .display { font-size: 24px; }
.ref-col-sub { font-size: 9px; letter-spacing: 0.14em; color: var(--ink-soft); }
.ref-fine { font-size: 9px; letter-spacing: 0.1em; color: var(--ink-soft); margin: 12px 0 0; line-height: 1.5; }

/* base points ladder */
.ladder { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rung { position: relative; display: flex; align-items: center; height: 32px; }
.rung-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--paper-3); border: 2px solid var(--ink); z-index: 0; }
.rung-top .rung-bar { background: var(--gold); }
.rung-label { position: relative; z-index: 1; font-family: var(--font-body); font-weight: 700; font-size: 12.5px; padding-left: 11px; white-space: nowrap; }
.rung-pts { position: relative; z-index: 1; margin-left: auto; padding-right: 11px; font-size: 17px; font-weight: 700; }

/* pot multiplier cards */
.mult-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; }
.mult-card { border: 2px solid var(--ink); border-top-width: 6px; padding: 11px 12px; background: var(--paper); }
.mult-top { display: flex; align-items: center; justify-content: space-between; }
.mult-x { font-size: 32px; line-height: 0.8; }
.mult-eg { font-size: 11px; margin-top: 8px; letter-spacing: 0.06em; }
.mult-eg b { font-size: 13px; }
.mult-note { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* worked example scorecard */
.scorecard { margin-top: 20px; border: var(--rule) solid var(--ink); background: var(--paper); box-shadow: var(--shadow); }
.scorecard-head { display: flex; align-items: baseline; gap: 14px; padding: 13px 18px; border-bottom: var(--rule) solid var(--ink); background: var(--ink); color: var(--paper); }
.scorecard-head .display { font-size: 24px; }
.scorecard-sub { font-size: 9.5px; letter-spacing: 0.18em; opacity: 0.75; }

.sc-table { padding: 4px 0; }
.sc-row { display: grid; grid-template-columns: 2.2fr 1fr 1.8fr 0.8fr 0.8fr 1fr; align-items: center; gap: 10px; padding: 11px 20px; border-bottom: 1.5px dashed color-mix(in oklch, var(--ink) 35%, transparent); }
.sc-row:last-child { border-bottom: none; }
.sc-colhead { font-size: 9.5px; letter-spacing: 0.14em; color: var(--ink-soft); padding-top: 12px; padding-bottom: 8px; }
.sc-team { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; }
.sc-flag { font-size: 20px; }
.sc-stage { font-size: 13px; color: var(--ink-soft); }
.sc-final { font-size: 17px; font-weight: 700; }
.ta-r { text-align: right; }
.sc-total { background: color-mix(in oklch, var(--gold) 18%, var(--paper)); border-top: var(--rule) solid var(--ink); }
.sc-total-lbl { font-size: 22px; }
.sc-total-num { font-size: 30px; font-weight: 700; color: var(--gold-ink); }

/* notes */
.notes { margin-top: 22px; border: var(--rule) solid var(--ink); background: var(--paper-2); padding: 16px 20px; box-shadow: var(--shadow-sm); }
.notes-label { font-size: 16px; color: var(--ink-soft); margin-bottom: 8px; }
.notes-list { margin: 0; padding-left: 18px; columns: 2; column-gap: 30px; }
.notes-list li { font-size: 13px; line-height: 1.5; margin-bottom: 7px; break-inside: avoid; text-wrap: pretty; }

@media (max-width: 860px) {
  .ref-grid { grid-template-columns: 1fr; }
  .notes-list { columns: 1; }
  .sc-row { grid-template-columns: 1.6fr 0.8fr 1.4fr 0.6fr 0.6fr 0.8fr; gap: 6px; padding: 10px 12px; font-size: 13px; }
  .sc-team { font-size: 13px; }
}

/* ============== BRACKET wallchart styles ============== */
.wrap-wide { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.bracket-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 6px 0 16px; flex-wrap: wrap; }
.bracket-title { font-size: clamp(40px, 6vw, 68px); margin: 2px 0 0; white-space: nowrap; }
.bracket-status { display: flex; align-items: center; gap: 12px; border: 2px solid var(--ink); padding: 8px 14px; background: var(--paper); }
.bstatus-round { font-size: 20px; }
.bstatus-note { font-size: 10px; letter-spacing: 0.12em; color: var(--ink-soft); border-left: 2px solid var(--ink); padding-left: 12px; }

/* the board */
.board { padding: 22px 20px; overflow-x: auto; position: relative; background:
  var(--paper) repeating-linear-gradient(0deg, transparent 0 38px, color-mix(in oklch, var(--ink) 4%, transparent) 38px 39px); }
.board-sizer { margin: 0 auto; overflow: hidden; }
.board-inner {
  --colw: 112px; --cgap: 26px; --mh: 46px;
  display: flex; align-items: stretch; gap: var(--cgap);
  height: 600px; transform-origin: top left; min-width: max-content;
}

.bcol { width: var(--colw); flex: 0 0 var(--colw); display: flex; flex-direction: column; }
.bcol-center { width: 150px; flex: 0 0 150px; }
.bcol-label { text-align: center; font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 6px; }
.bcol-games { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }

/* a game wrapper (holds connectors) */
.bgame { flex: 1 1 0; display: flex; align-items: center; justify-content: center; position: relative; }

/* the match box */
.match { width: 100%; border: 2.5px solid var(--ink); background: var(--paper); box-shadow: 2px 2px 0 var(--ink); position: relative; z-index: 2; }
.match-tbd { opacity: 0.8; border-style: dashed; box-shadow: none; background: var(--paper-2); }
.match-div { height: 2px; background: var(--ink); opacity: 0.5; }

.bteam { display: flex; align-items: center; gap: 6px; padding: 5px 8px; position: relative; min-height: 20px; }
.bteam-btn {
  appearance: none; width: 100%; border: 0; color: inherit; font: inherit; text-align: left;
  background: var(--paper); cursor: pointer; transition: background .1s, box-shadow .1s;
}
.bteam-btn:hover { background: color-mix(in oklch, var(--gold) 18%, var(--paper)); box-shadow: inset 0 0 0 2px var(--ink); }
.bteam-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.bteam-flag { font-size: 14px; line-height: 1; }
.bteam-abbr { font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.bteam-win { background: color-mix(in oklch, var(--gold) 26%, var(--paper)); }
.bteam-win .bteam-abbr { color: var(--ink); }
.bteam-out { opacity: 0.42; text-decoration: line-through; text-decoration-thickness: 1px; }
.bteam-tbd { opacity: 0.5; }
.bteam-tbd .bteam-abbr { color: var(--ink-soft); }
.bteam-check { margin-left: auto; font-size: 11px; color: var(--gold-ink); font-weight: 700; }

/* ---- connectors ---- */
/* horizontal stub, pointing inward (toward center) */
.bgame:not(.no-hline)::after {
  content: ""; position: absolute; top: 50%; height: 2.5px; width: var(--cgap); background: var(--ink); z-index: 1;
}
.side-l .bgame:not(.no-hline)::after { left: 100%; }
.side-r .bgame:not(.no-hline)::after { right: 100%; }

/* vertical connector joining a pair, sitting at the inner column edge */
.bgame.top:not(.no-vline)::before,
.bgame.bottom:not(.no-vline)::before {
  content: ""; position: absolute; width: 2.5px; background: var(--ink); z-index: 1;
}
.side-l .bgame.top:not(.no-vline)::before    { left: calc(100% + var(--cgap)); top: 50%; bottom: 0; }
.side-l .bgame.bottom:not(.no-vline)::before  { left: calc(100% + var(--cgap)); top: 0; bottom: 50%; }
.side-r .bgame.top:not(.no-vline)::before     { right: calc(100% + var(--cgap)); top: 50%; bottom: 0; }
.side-r .bgame.bottom:not(.no-vline)::before  { right: calc(100% + var(--cgap)); top: 0; bottom: 50%; }

/* ---- champion center ---- */
.center-game { align-items: center; }
.champ-plate {
  width: 100%; border: 3px solid var(--ink); background:
    linear-gradient(0deg, color-mix(in oklch, var(--gold) 30%, var(--paper)), var(--paper));
  box-shadow: var(--shadow); padding: 16px 10px 14px; text-align: center; position: relative; z-index: 3;
}
.champ-trophy { font-size: 34px; line-height: 1; }
.champ-q { font-size: 56px; color: var(--gold-ink); line-height: 0.8; margin: 2px 0; }
.champ-lbl { font-size: 10px; letter-spacing: 0.22em; font-weight: 700; }
.champ-final { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; border-top: 2px dashed var(--ink); padding-top: 10px; }
.champ-final .bteam { padding: 3px 6px; border: 2px solid var(--ink); }
.champ-actions { display: flex; justify-content: center; gap: 5px; margin-top: 8px; }
.champ-pick-btn {
  appearance: none; cursor: pointer; border: 2px solid var(--ink); background: var(--paper);
  padding: 4px 7px; font-size: 10px; font-weight: 700; color: var(--ink);
}
.champ-pick-btn:hover, .champ-pick-btn.on { background: var(--gold); }
.champ-v { font-size: 11px; color: var(--ink-soft); }

/* ---- player pick selector ---- */
.picksel { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 12px; border: 2px solid var(--ink); background: var(--paper-2); }
.picksel-label { font-size: 9px; letter-spacing: 0.2em; color: var(--ink-soft); margin-right: 2px; }
.picksel-btn {
  appearance: none; cursor: pointer; background: var(--paper); border: 2px solid var(--ink);
  font-family: var(--font-body); font-weight: 700; font-size: 12px; padding: 4px 11px; color: var(--ink);
  white-space: nowrap;
  transition: background 0.1s;
}
.picksel-btn:hover { background: var(--paper-3); }
.picksel-btn.on { background: var(--ink); color: var(--paper); }
.picksel-div { width: 2px; height: 22px; background: var(--ink); opacity: 0.3; margin: 0 3px; }
.picksel-score { margin-left: auto; font-size: 22px; font-weight: 700; color: var(--gold-ink); }
.picksel-score-lbl { font-size: 9px; letter-spacing: 0.12em; color: var(--ink-soft); }

/* ---- overlay marks ---- */
.hitbadge { position: absolute; top: -9px; right: -9px; z-index: 4; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; border: 2px solid var(--ink); box-shadow: 1px 1px 0 var(--ink); }
.lockbadge { position: absolute; top: -9px; right: -10px; z-index: 4; border: 2px solid var(--ink); background: var(--paper-2); color: var(--ink-soft); padding: 1px 4px; font-size: 7px; letter-spacing: .08em; box-shadow: 1px 1px 0 var(--ink); }
.hitbadge.hit { background: var(--green); color: var(--paper); }
.hitbadge.miss { background: var(--red); color: var(--paper); }
.match-hit { box-shadow: 2px 2px 0 var(--green); }
.match-miss { box-shadow: 2px 2px 0 var(--red); opacity: 0.92; }
.match-locked { background: color-mix(in oklch, var(--ink) 5%, var(--paper)); }
.bteam-pick { background: color-mix(in oklch, var(--blue) 16%, var(--paper)); }
.bteam-pickmark { margin-left: auto; font-size: 7px; letter-spacing: 0.1em; font-weight: 700; color: var(--blue); border: 1.5px solid var(--blue); padding: 0 3px; }
.bracket-picksel { margin-top: -4px; }
.bracket-editor-bar { margin-bottom: 16px; }

.champ-pred { background: linear-gradient(0deg, color-mix(in oklch, var(--blue) 22%, var(--paper)), var(--paper)); }
.champ-pickflag { font-size: 30px; line-height: 1; margin-top: 2px; }
.champ-pickname { font-size: 30px; line-height: 0.9; color: var(--ink); }

@media (max-width: 720px) {
  .board { overflow-x: auto; }
}

/* ============== BRACKET STANDINGS styles ============== */
.bst-legend { border: none !important; gap: 16px; }
.bst-key { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--ink-soft); }
.bst-key-sw { width: 14px; height: 10px; border: 1.5px solid var(--ink); }
.seg1-bg { background: var(--ink); }
.seg2-bg { background: var(--gold); }

.bstrow { border: var(--rule) solid var(--ink); background: var(--paper); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.bstrow.champ { box-shadow: var(--shadow); background: linear-gradient(0deg, color-mix(in oklch, var(--gold) 15%, var(--paper)) 0%, var(--paper) 60%); }
.bstrow.champ::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--gold); }

.bstrow-main { display: flex; align-items: center; gap: 16px; padding: 13px 18px 13px 20px; }
.bst-rank { font-size: 36px; line-height: 0.8; width: 44px; flex: 0 0 44px; }
.champ .bst-rank { color: var(--gold-ink); }
.bst-who { width: 150px; flex: 0 0 150px; }
.bst-name { font-size: 25px; line-height: 0.9; }
.bst-champ { font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.bst-champ-lbl { font-size: 8px; letter-spacing: 0.12em; color: var(--ink-soft); }
.bst-champ-flag { font-size: 14px; }

.bst-phases { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: center; }
.bst-phase { display: flex; flex-direction: column; align-items: center; }
.bst-phase-num { font-size: 22px; font-weight: 700; line-height: 1; }
.bst-phase-num.seg2-c { color: var(--gold-ink); }
.bst-phase-lbl { font-size: 8px; letter-spacing: 0.12em; color: var(--ink-soft); margin-top: 3px; }
.bst-plus { font-size: 16px; color: var(--ink-soft); }

.bst-total { width: 110px; flex: 0 0 110px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.bst-total-num { font-size: 34px; line-height: 0.85; font-weight: 700; }
.champ .bst-total-num { color: var(--gold-ink); }
.bst-total-lbl { font-size: 10px; letter-spacing: 0.1em; color: var(--ink-soft); }

.bst-bar { position: relative; height: 11px; margin: 0 18px 12px 82px; background: var(--paper-3); border: 2px solid var(--ink); display: flex; overflow: visible; }
.bst-bar-seg { height: 100%; transition: width 0.7s cubic-bezier(.2,.8,.3,1); }
.bst-bar-seg.seg1 { background: var(--ink); }
.bst-bar-seg.seg2 { background: var(--gold); }
.bst-bar-lead { position: absolute; top: -3px; bottom: -3px; width: 2.5px; background: var(--red); }
.bst-bar-lead::after { content: ""; position: absolute; top: -4px; left: -3px; border: 4px solid transparent; border-top-color: var(--red); }

@media (max-width: 920px) {
  .bst-who { display: none; }
  .bst-bar { margin-left: 18px; }
}

/* ============== PHASE 1 group picks styles ============== */
.ggrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.gcard { border: var(--rule) solid var(--ink); background: var(--paper); }
.gcard-head { display: flex; align-items: baseline; justify-content: space-between; background: var(--ink); color: var(--paper); padding: 6px 11px; white-space: nowrap; }
.gcard-letter { font-size: 17px; white-space: nowrap; }
.gcard-pts { font-size: 11px; color: var(--gold); font-weight: 700; }

.gcard-rows { display: flex; flex-direction: column; }
.grow { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: var(--hair) dashed color-mix(in oklch, var(--ink) 28%, transparent); }
.grow:last-child { border-bottom: none; }
.grow-pos { font-size: 13px; font-weight: 700; width: 14px; color: var(--ink-soft); }
.grow-abbr { font-size: 12px; font-weight: 700; }
.grow-name { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.grow-adv { background: color-mix(in oklch, var(--green) 9%, transparent); }
.grow-adv .grow-pos { color: var(--green); }
.grow-out { opacity: 0.62; }
.grow-tick { font-size: 11px; font-weight: 700; color: var(--green); width: 12px; text-align: center; }
.grow-pred { font-size: 11px; font-weight: 700; width: 26px; text-align: right; margin-left: auto; }
.grow-pred.hit { color: var(--green); }
.grow-pred.miss { color: var(--red); }

.glegend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; padding: 12px 14px; border: var(--hair) solid var(--ink); background: var(--paper-3); font-size: 10px; letter-spacing: 0.04em; color: var(--ink-soft); }
.glegend b { color: var(--ink); }
.glegend-hit { color: var(--green); font-weight: 700; }
.glegend-miss { color: var(--red); font-weight: 700; }

.pick-editor-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding: 12px 14px; flex-wrap: wrap; }
.pick-editor-bar > div:first-child { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 220px; }
.pick-editor-bar > div:first-child span { color: var(--ink-soft); font-size: 9px; letter-spacing: .08em; }
.pick-editor-actions { display: flex; gap: 8px; }
.pick-save-message { width: 100%; color: var(--red-ink); font-size: 10px; }
.pick-gcard.is-editing { border-color: var(--blue); box-shadow: 4px 4px 0 color-mix(in oklch, var(--blue) 25%, transparent); }
.pick-grow.is-drop-target { background: var(--paper); }
.pick-grow.is-drop-target:hover { background: var(--paper-3); }
.pick-grow.is-dragging { background: color-mix(in oklch, var(--gold) 24%, var(--paper)); opacity: .72; }
.pick-drag-handle {
  width: 38px; height: 34px; margin: -4px -5px -4px auto; border: 1.5px solid var(--ink); background: var(--paper-2);
  display: grid; grid-template-columns: repeat(2, 3px); grid-auto-rows: 3px; place-content: center; gap: 3px 4px;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.pick-drag-handle:active { cursor: grabbing; background: var(--gold); }
.pick-drag-handle i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink); pointer-events: none; }

/* ============== Live group tables ============== */
.live-view .bracket-head { margin-bottom: 10px; }
.live-view .bracket-title { font-size: clamp(38px, 4.6vw, 58px); }
.wrap-wide.live-view { max-width: 1380px; padding-left: 18px; padding-right: 18px; }
.live-ggrid { align-items: start; gap: 10px; }
.live-gcard { min-width: 0; overflow: hidden; }
.live-gcard .gcard-head { align-items: center; padding: 5px 10px; }
.live-gcard .gcard-letter { font-size: 16px; }
.live-headrow,
.live-grow {
  display: grid;
  grid-template-columns: 18px 22px minmax(34px, 1fr) 22px 44px 28px 34px 14px;
  align-items: center;
  gap: 4px;
}
.live-headrow {
  padding: 5px 8px;
  border-bottom: var(--hair) solid color-mix(in oklch, var(--ink) 30%, transparent);
  background: var(--paper-3);
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.1em;
}
.live-headrow span { text-align: right; }
.live-headrow span:nth-child(4) { grid-column: 4; }
.live-grow { padding: 5px 8px; }
.live-team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-stat,
.live-record,
.live-pts { text-align: right; font-size: 11px; font-weight: 700; }
.live-record { font-size: 10px; letter-spacing: 0.02em; color: var(--ink-soft); }
.live-pts { color: var(--ink); font-size: 13px; }
.live-grow .grow-tick { width: 14px; }
.live-empty {
  border: var(--rule) solid var(--ink);
  background: var(--paper);
  padding: 18px 20px;
  max-width: 520px;
}
.live-empty p { margin: 6px 0 0; color: var(--ink-soft); }

@media (max-width: 980px) { .ggrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .wrap-wide.live-view { padding-left: 14px; padding-right: 14px; }
  .live-headrow,
  .live-grow {
    grid-template-columns: 18px 22px minmax(38px, 1fr) 22px 44px 28px 34px 14px;
  }
  .live-headrow span:nth-child(4) { grid-column: 4; }
}
@media (max-width: 520px) { .ggrid { grid-template-columns: 1fr; } }

/* ============== PHASE 2 scoring explainer styles ============== */
.phase-split { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px; margin-bottom: 20px; }
.phase-box { border: var(--rule) solid var(--ink); background: var(--paper); padding: 14px 16px; display: flex; flex-direction: column; }
.phase-box-hero { background: color-mix(in oklch, var(--gold) 14%, var(--paper)); }
.phase-box-total { background: var(--ink); color: var(--paper); }
.phase-tag { font-size: 9px; letter-spacing: 0.2em; color: var(--ink-soft); }
.phase-box-total .phase-tag { color: var(--gold); }
.phase-name { font-size: 24px; margin: 3px 0 8px; }
.phase-max { font-size: 34px; font-weight: 700; line-height: 0.9; }
.phase-box-hero .phase-max { color: var(--gold-ink); }
.phase-max span { font-size: 13px; letter-spacing: 0.1em; color: var(--ink-soft); }
.phase-box-total .phase-max span { color: color-mix(in oklch, var(--paper) 70%, transparent); }
.phase-desc { font-size: 12px; line-height: 1.45; color: var(--ink-soft); margin-top: 8px; text-wrap: pretty; }
.phase-box-total .phase-desc { color: color-mix(in oklch, var(--paper) 78%, transparent); }
.phase-plus, .phase-eq { display: flex; align-items: center; font-size: 30px; color: var(--ink-soft); }

.ladder2 { padding: 14px 18px; display: flex; flex-direction: column; gap: 9px; }
.rung2 { display: grid; grid-template-columns: 130px 1fr 86px; align-items: center; gap: 14px; }
.rung2-label { display: flex; flex-direction: column; }
.rung2-name { font-family: var(--font-body); font-weight: 700; font-size: 14px; }
.rung2-games { font-size: 9px; letter-spacing: 0.1em; color: var(--ink-soft); }
.rung2-track { height: 30px; display: flex; align-items: center; }
.rung2-bar { height: 100%; background: var(--paper-3); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; transition: width 0.6s cubic-bezier(.2,.8,.3,1); }
.rung2-top .rung2-bar { background: var(--gold); }
.rung2-pts { font-size: 16px; font-weight: 700; }
.rung2-pool { font-size: 15px; font-weight: 700; text-align: right; color: var(--ink-soft); }
.rung2-pool-lbl { font-size: 8px; letter-spacing: 0.1em; }
.ladder2-foot { border-top: var(--rule) solid var(--ink); padding: 11px 18px; font-size: 9.5px; letter-spacing: 0.1em; color: var(--ink-soft); }

@media (max-width: 860px) {
  .phase-split { grid-template-columns: 1fr; }
  .phase-plus, .phase-eq { justify-content: center; padding: 2px 0; }
  .rung2 { grid-template-columns: 100px 1fr 64px; gap: 8px; }
}

/* ============================================================
   MOBILE RESPONSIVE — World Cup 2026 Pool
   Layered on top of existing styles. Breakpoints:
     • 720px  — tablet / small laptop
     • 520px  — large phone
     • 400px  — small phone
   ============================================================ */

/* ---- hide decorative cruft on small screens ---- */
@media (max-width: 720px) {
  /* fold creases + vignette are pure ornament — save GPU */
  body::after { display: none; }
  /* registration crosshairs clip into content */
  .regmark { display: none; }
  main { padding-bottom: 40px; }
}

/* ================================================================
   MASTHEAD
   ================================================================ */
@media (max-width: 720px) {
  .masthead-band { gap: 10px; padding: 10px 14px 8px; }
  .masthead-title h1 { white-space: normal; text-align: center; font-size: clamp(24px, 8vw, 42px); }
  .ball-roundel { width: 32px; height: 32px; }
}
@media (max-width: 400px) {
  .ball-roundel { display: none; }
  .masthead-band { justify-content: center; }
  .masthead-title h1 { font-size: 28px; }
}

/* ================================================================
   GAME SWITCH
   ================================================================ */
@media (max-width: 520px) {
  .gtab { padding: 8px 10px 9px; }
  .gtab-label { font-size: 17px; }
}

/* ================================================================
   NAV TABS — horizontal scroll on mobile
   ================================================================ */
@media (max-width: 720px) {
  .nav { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav .wrap-wide { display: flex; flex-wrap: nowrap; min-width: max-content; padding: 0 8px; }
  .tab { white-space: nowrap; padding: 12px 16px; min-height: 44px; font-size: 14px; }
}

/* ================================================================
   GENERAL VIEW / WRAP
   ================================================================ */
@media (max-width: 520px) {
  .wrap { padding: 0 14px; }
  .wrap-wide { padding: 0 12px; }
  .view { padding-top: 16px; }
}

/* ================================================================
   STATUS BAR
   ================================================================ */
@media (max-width: 720px) {
  .statusbar { flex-direction: column; gap: 10px; align-items: flex-start; padding: 10px 14px; }
  .statusbar-left { flex-wrap: wrap; gap: 10px; }
  .statusbar-round { font-size: 20px; }
  .statusbar-remain { font-size: 10px; border-left: none; padding-left: 0; }
  .statusbar-right { width: 100%; }
  .modebtn { flex: 1; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; }
}
@media (max-width: 520px) {
  .statusbar-round { font-size: 17px; }
}

/* ================================================================
   STANDINGS ROWS — stack on mobile
   ================================================================ */
@media (max-width: 720px) {
  .standrow-top {
    flex-wrap: wrap; gap: 10px; padding: 10px 14px;
  }
  .rank-block { width: 36px; flex: 0 0 36px; }
  .rank-num { font-size: 28px; }
  .monogram { width: 36px; height: 36px; flex: 0 0 36px; font-size: 15px; }

  /* name + score on one line */
  .who { display: flex !important; flex: 1 1 auto; width: auto; min-width: 0; }
  .who-name { font-size: 20px; }
  .who-meta { display: none; }

  .score-block { width: auto; flex: 0 0 auto; }
  .score-num { font-size: 26px; }

  /* chips go full width on their own row */
  .chips {
    flex-basis: 100%; order: 10;
    justify-content: flex-start;
    gap: 5px;
  }
  .chip { padding: 4px 7px 4px 5px; }
  .chip-abbr { font-size: 11px; }
  .chip-meta { display: none; }

  .racebar { padding: 0 14px 10px 14px; }
  .champ-stamp { font-size: 9px; padding: 2px 28px; right: -26px; top: 6px; }
}

@media (max-width: 520px) {
  .standrow-top { gap: 8px; padding: 8px 10px; }
  .rank-block { width: 28px; flex: 0 0 28px; }
  .rank-num { font-size: 22px; }
  .monogram { width: 30px; height: 30px; flex: 0 0 30px; font-size: 13px; }
  .who-name { font-size: 17px; }
  .score-num { font-size: 22px; }

  .chip { padding: 3px 5px 3px 4px; gap: 4px; border-left-width: 4px; }
  .chip-flag { font-size: 14px; }
  .chip-abbr { font-size: 10px; }
  .racebar { padding: 0 10px 8px 10px; }
}

/* legend */
@media (max-width: 520px) {
  .legend { grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
  .legend-mult { font-size: 11px; }
  .legend-note { font-size: 11px; }
}

/* lead-note */
@media (max-width: 720px) {
  .lead-note { font-size: 8.5px; letter-spacing: 0.08em; }
}

/* ================================================================
   DRAFT
   ================================================================ */
@media (max-width: 720px) {
  .draft-head { gap: 16px; }
  .draft-title { font-size: clamp(36px, 9vw, 56px); }
  .draft-desc { font-size: 13px; }
  .draft-rules { gap: 12px; }
  .draft-stat-num { font-size: 28px; }
  .draft-stat-lbl { font-size: 7.5px; }
  .deal-btn { padding: 11px 16px; font-size: 15px; min-height: 44px; }
}

/* draft card slots: 2×2 on mobile */
@media (max-width: 520px) {
  .dcard-slots { grid-template-columns: 1fr 1fr; }
  .dslot { border-bottom: 1.5px solid var(--ink); }
  .dslot:nth-child(2) { border-right: none; }
  .dslot:nth-child(4) { border-right: none; }
  .dslot:nth-child(3), .dslot:nth-child(4) { border-bottom: none; }
  .dcard-name { font-size: 19px; }
}

/* cut box */
@media (max-width: 520px) {
  .cutbox { padding: 10px 12px; }
  .cutbox-label { font-size: 14px; }
  .cut-strip { gap: 5px; }
  .cut-chip { padding: 3px 6px 3px 4px; gap: 4px; }
  .cut-name { font-size: 10px; }
}

/* ================================================================
   BRACKET — player pick selector
   ================================================================ */
@media (max-width: 720px) {
  .picksel {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap; gap: 5px; padding: 8px 10px;
    scrollbar-width: none;
  }
  .picksel::-webkit-scrollbar { display: none; }
  .picksel-btn { flex: 0 0 auto; min-height: 44px; padding: 6px 12px; font-size: 12px; }
  .picksel-label { flex: 0 0 auto; }
  .picksel-div { flex: 0 0 auto; margin: 0 1px; }
  .picksel-score { flex: 0 0 auto; white-space: nowrap; }
}

/* ================================================================
   BRACKET BOARD — more aggressive scaling on mobile
   ================================================================ */
@media (max-width: 720px) {
  .bracket-head { gap: 10px; margin: 4px 0 12px; }
  .bracket-title { font-size: clamp(32px, 8vw, 50px); }
  .bracket-status { padding: 6px 10px; flex-wrap: wrap; gap: 6px; }
  .bstatus-round { font-size: 16px; }
  .bstatus-note { font-size: 9px; padding-left: 8px; }

  .board { padding: 12px 8px; }
  .board-inner { --colw: 90px; --cgap: 16px; --mh: 38px; }
  .bcol-label { font-size: 8px; letter-spacing: 0.1em; }
  .bteam { padding: 4px 5px; gap: 4px; }
  .bteam-flag { font-size: 12px; }
  .bteam-abbr { font-size: 10px; }
  .match { border-width: 2px; box-shadow: 1px 1px 0 var(--ink); }

  .champ-plate { padding: 10px 6px 8px; }
  .champ-trophy { font-size: 24px; }
  .champ-q { font-size: 40px; }
  .champ-lbl { font-size: 8px; }
  .bcol-center { width: 110px; flex: 0 0 110px; }
}

@media (max-width: 520px) {
  .board-inner { --colw: 78px; --cgap: 12px; }
  .bcol-center { width: 96px; flex: 0 0 96px; }
  .bteam-abbr { font-size: 9px; }
  .bteam-flag { font-size: 10px; }
  .bteam-check { font-size: 9px; }
  .bteam-pickmark { font-size: 6px; padding: 0 2px; }
  .hitbadge { width: 14px; height: 14px; font-size: 9px; top: -7px; right: -7px; }
}

/* ================================================================
   GROUP PICKS
   ================================================================ */
@media (max-width: 520px) {
  .gcard-head { padding: 5px 9px; }
  .gcard-letter { font-size: 14px; }
  .grow { padding: 6px 8px; gap: 6px; }
  .grow-abbr { font-size: 11px; }
  .grow-name { font-size: 11px; }
  .glegend { gap: 10px; padding: 10px; font-size: 9px; }
}

/* ================================================================
   BRACKET STANDINGS
   ================================================================ */
@media (max-width: 720px) {
  .bstrow-main { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .bst-rank { font-size: 28px; width: 36px; flex: 0 0 36px; }
  .bst-who { display: flex !important; width: auto; flex: 1 1 auto; min-width: 0; }
  .bst-name { font-size: 20px; }
  .bst-champ { font-size: 10px; }

  .bst-phases { flex-basis: 100%; order: 10; justify-content: flex-start; gap: 8px; }
  .bst-phase-num { font-size: 18px; }
  .bst-phase-lbl { font-size: 7px; }
  .bst-plus { font-size: 13px; }

  .bst-total { width: auto; flex: 0 0 auto; }
  .bst-total-num { font-size: 26px; }

  .bst-bar { margin: 0 14px 10px 14px; }
  .champ-stamp { font-size: 9px; padding: 2px 28px; right: -26px; top: 6px; }
}
@media (max-width: 520px) {
  .bstrow-main { gap: 8px; padding: 8px 10px; }
  .bst-rank { font-size: 22px; width: 28px; flex: 0 0 28px; }
  .bst-name { font-size: 17px; }
  .bst-total-num { font-size: 22px; }
  .bst-bar { margin: 0 10px 8px 10px; }
}

/* ================================================================
   SCORING — phase split + scorecard
   ================================================================ */
@media (max-width: 520px) {
  .phase-name { font-size: 19px; }
  .phase-max { font-size: 26px; }
  .phase-desc { font-size: 11px; }
  .phase-plus, .phase-eq { font-size: 22px; }
}

/* scorecard table — reflow to stacked on mobile */
@media (max-width: 720px) {
  .sc-row {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px 8px; padding: 10px 14px;
  }
  .sc-row.sc-colhead { display: none; }
  .sc-team { grid-column: 1 / -1; font-size: 15px; }
  .sc-stage { grid-column: 1 / -1; font-size: 12px; margin-bottom: 2px; }
  .sc-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; }
  .sc-total-lbl { font-size: 18px; }
  .sc-total-num { font-size: 24px; }
}
@media (max-width: 520px) {
  .scorecard-head { flex-direction: column; gap: 4px; padding: 10px 12px; }
  .scorecard-head .display { font-size: 20px; }
}

/* reference grid */
@media (max-width: 520px) {
  .ref-title { font-size: clamp(36px, 9vw, 56px); }
  .ref-col { padding: 12px 14px 10px; }
  .ref-col-head .display { font-size: 20px; }
  .rung { height: 28px; }
  .rung-label { font-size: 11px; padding-left: 8px; }
  .rung-pts { font-size: 14px; padding-right: 8px; }
  .mult-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mult-x { font-size: 26px; }
  .mult-eg { font-size: 10px; }
}

/* ================================================================
   BRACKET SCORING — doubling ladder
   ================================================================ */
@media (max-width: 520px) {
  .rung2 { grid-template-columns: 90px 1fr 50px; gap: 6px; }
  .rung2-name { font-size: 12px; }
  .rung2-games { font-size: 8px; }
  .rung2-pts { font-size: 13px; }
  .rung2-pool { font-size: 12px; }
  .ladder2 { padding: 10px 12px; gap: 7px; }
  .ladder2-foot { padding: 8px 12px; font-size: 8.5px; }
}

/* notes */
@media (max-width: 520px) {
  .notes { padding: 12px 14px; }
  .notes-label { font-size: 14px; }
  .notes-list { columns: 1; padding-left: 14px; }
  .notes-list li { font-size: 12px; }
}

/* ================================================================
   TOUCH: ensure minimum 44px tap targets
   ================================================================ */
@media (pointer: coarse) {
  .modebtn { min-height: 44px; }
  .picksel-btn { min-height: 44px; }
  .deal-btn { min-height: 48px; }
  .gtab { min-height: 52px; }
  .tab { min-height: 44px; }
}

/* ================================================================
   LIVE DRAW HUB
   ================================================================ */
.draw-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.draw-form { padding: 18px; display: flex; flex-direction: column; gap: 13px; }
.draw-recover { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; }
.draw-recover .eyebrow, .draw-recover .draw-section-title { grid-column: 1 / -1; }
.draw-form label, .draw-publish-confirm label {
  display: flex; flex-direction: column; gap: 5px; font-family: var(--font-mono);
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.draw-form input, .draw-host-actions input, .draw-publish-confirm input {
  width: 100%; border: 2px solid var(--ink); background: var(--paper-2); color: var(--ink);
  padding: 11px 12px; font: 600 14px var(--font-body); border-radius: 0; outline: none;
}
.draw-form input:focus, .draw-host-actions input:focus, .draw-publish-confirm input:focus { background: var(--paper); box-shadow: inset 0 -4px var(--gold); }
.draw-code-input { letter-spacing: 0.25em !important; text-transform: uppercase; }
.draw-section-title { font-size: 30px; margin: 4px 0 0; }
.draw-secondary-btn, .draw-lobby-player button {
  appearance: none; cursor: pointer; border: 2px solid var(--ink); background: var(--paper);
  color: var(--ink); padding: 9px 12px; font: 700 9px var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
}
.draw-secondary-btn:hover, .draw-lobby-player button:hover { background: var(--ink); color: var(--paper); }
.draw-error { border: 2px solid var(--red); background: color-mix(in oklch, var(--red) 10%, var(--paper)); color: var(--red-ink); padding: 10px 12px; font-size: 11px; }
.draw-official-empty { padding: 24px; margin-top: 18px; }
.draw-official-empty p, .draw-publish p { color: var(--ink-soft); max-width: 620px; }
.draw-official { margin-top: 34px; padding-top: 24px; border-top: 2px dashed var(--ink); }
.draw-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.draw-published-at { font-size: 9px; color: var(--ink-soft); }
.draw-practice-note {
  display: flex; align-items: center; gap: 16px; padding: 13px 15px; margin-bottom: 16px;
  border-left: 8px solid var(--blue); background: color-mix(in oklch, var(--blue) 9%, var(--paper));
}
.draw-practice-note strong { flex: 0 0 auto; font-size: 20px; color: var(--blue); }
.draw-practice-note span { font-size: 11px; line-height: 1.45; color: var(--ink-soft); }
.draw-practice-note.is-compact { padding: 9px 12px; margin-bottom: 12px; }
.draw-practice-note.is-compact strong { font-size: 16px; }
.draw-room-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 15px 18px; margin-bottom: 12px; background: var(--gold);
}
.draw-room-code { font-size: clamp(42px, 8vw, 72px); letter-spacing: .18em; }
.draw-room-note { text-align: right; font-size: 10px; line-height: 1.7; }
.draw-recovery-note { padding: 11px 14px; margin-bottom: 14px; font-size: 12px; overflow-wrap: anywhere; }
.draw-lobby-list { display: flex; flex-direction: column; gap: 8px; }
.draw-lobby-player { display: flex; align-items: center; gap: 12px; padding: 9px 11px; }
.draw-lobby-player strong { flex: 1; }
.draw-lobby-player .monogram { width: 34px; height: 34px; flex-basis: 34px; font-size: 14px; }
.draw-lobby-tags { font-size: 8px; color: var(--ink-soft); }
.draw-host-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 16px; }
.draw-host-actions form { display: flex; flex: 1; }
.draw-host-actions input { flex: 1; }
.draw-waiting { padding: 16px; text-align: center; margin-top: 16px; font-size: 10px; letter-spacing: .12em; }
.draw-turn-banner { padding: 16px 18px; margin-bottom: 15px; text-align: center; border-top-width: 8px; }
.draw-turn-banner .display { font-size: clamp(30px, 6vw, 54px); margin: 5px 0; }
.pot-banner-1 { border-top-color: var(--pot1); }.pot-banner-2 { border-top-color: var(--pot2); }.pot-banner-3 { border-top-color: var(--pot3); }.pot-banner-4 { border-top-color: var(--pot4); }
.draw-review-banner { background: color-mix(in oklch, var(--green) 16%, var(--paper)); border-top-color: var(--green); }
.draw-now-btn { width: 100%; margin-bottom: 16px; }
.draw-auto-toggle { display: block; margin: -7px auto 16px; }
.draw-player-card { transition: transform .14s, box-shadow .14s; }
.draw-player-card.is-active { outline: 4px solid var(--gold); outline-offset: 2px; transform: translateY(-2px); }
.draw-player-card.has-conflict { outline: 4px solid var(--red); outline-offset: 2px; }
.draw-player-tags { display: flex; gap: 4px; font-size: 7px; }
.draw-player-tags span { border: 1px solid currentColor; padding: 1px 3px; }
.draw-empty { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 2px dashed var(--ink-soft); color: var(--ink-soft); font: 700 14px var(--font-mono); }
.draw-slot-pop { animation: drawPop .55s cubic-bezier(.2,.8,.3,1); background: color-mix(in oklch, var(--gold) 22%, var(--paper)); }
@keyframes drawPop { 0% { transform: scale(.75) rotate(-3deg); } 60% { transform: scale(1.06) rotate(1deg); } 100% { transform: none; } }
.draw-group-check {
  display: flex; justify-content: space-between; gap: 8px; padding: 6px 9px;
  border-top: 1.5px dashed var(--ink); font-size: 7.5px; letter-spacing: .08em;
}
.draw-group-check.is-valid { color: var(--green); background: color-mix(in oklch, var(--green) 9%, var(--paper)); }
.draw-group-check.is-invalid { color: var(--red-ink); background: color-mix(in oklch, var(--red) 13%, var(--paper)); }
.draw-remaining { padding: 0; margin-bottom: 18px; }
.draw-remaining summary {
  cursor: pointer; display: flex; align-items: end; justify-content: space-between; gap: 14px;
  padding: 12px 14px; list-style: none;
}
.draw-remaining summary::-webkit-details-marker { display: none; }
.draw-remaining summary::after { content: "+"; font: 26px var(--font-display); }
.draw-remaining[open] summary::after { content: "−"; }
.draw-remaining-count { font-size: 8px; color: var(--ink-soft); text-align: right; }
.draw-remaining-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 14px 14px; }
.draw-remaining-team {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px;
  border: 1.5px solid var(--ink); padding: 5px 6px; background: var(--paper);
}
.draw-remaining-team strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.draw-remaining-team span { font-size: 7px; }
.draw-remaining-team b { grid-column: 1 / -1; font: 700 6.5px var(--font-mono); letter-spacing: .08em; }
.draw-remaining-team.is-legal { border-left: 5px solid var(--green); }
.draw-remaining-team.is-legal b { color: var(--green); }
.draw-remaining-team.is-blocked { opacity: .48; border-style: dashed; }
.draw-remaining-team.is-blocked b { color: var(--red-ink); }
.draw-live-undrawn { margin-top: 28px; padding-top: 20px; border-top: 2px dashed var(--ink); }
.draw-undrawn-pots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.draw-undrawn-pot { padding: 0; overflow: hidden; border-top-width: 6px; }
.draw-undrawn-pot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px; border-bottom: 1.5px dashed var(--ink); }
.draw-undrawn-pot-head .mono { font-size: 7px; color: var(--ink-soft); }
.draw-undrawn-list { display: flex; flex-direction: column; gap: 5px; padding: 8px; }
.draw-undrawn-chip {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 5px;
  border: 1px solid color-mix(in oklch, var(--ink) 55%, transparent); background: var(--paper); padding: 5px;
}
.draw-undrawn-chip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.draw-undrawn-chip .mono { grid-column: 1 / -1; font-size: 6px; color: var(--ink-soft); letter-spacing: .08em; }
.draw-final-validation { padding: 11px 13px; margin-bottom: 16px; text-align: center; font-size: 9px; letter-spacing: .1em; border-width: 3px; }
.draw-final-validation.is-valid { color: var(--green); border-color: var(--green); background: color-mix(in oklch, var(--green) 10%, var(--paper)); }
.draw-final-validation.is-invalid { color: var(--red-ink); border-color: var(--red); background: color-mix(in oklch, var(--red) 10%, var(--paper)); }
.draw-publish { display: flex; flex-direction: column; gap: 13px; padding: 18px; margin-top: 20px; }
.draw-publish-confirm { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 8px; }
.draw-busy { position: fixed; right: 14px; bottom: 14px; z-index: 80; border: 2px solid var(--ink); background: var(--gold); padding: 8px 10px; font-size: 9px; }

/* vintage synchronized draw machine */
.draw-machine { position: relative; overflow: hidden; margin-bottom: 15px; background: var(--paper); }
.draw-bowl-stage {
  position: relative; width: min(550px, 84%); aspect-ratio: 1; margin: 24px auto;
  overflow: hidden; border: var(--rule) solid var(--ink); border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 7.5%, rgba(35,40,55,.07) 7.5% calc(7.5% + 1px), transparent calc(7.5% + 1px) 15%),
    radial-gradient(circle at 38% 32%, rgba(255,255,255,.38) 0 18%, transparent 42%),
    radial-gradient(circle at 62% 74%, rgba(40,30,12,.10) 0 30%, transparent 60%),
    var(--paper-3);
  box-shadow: inset 0 0 0 8px var(--paper), inset 0 0 0 10px var(--ink);
}
.draw-bowl-stage::after {
  content: ""; position: absolute; inset: 5.5%; z-index: 5; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 200deg, rgba(255,255,255,.48) 0 28deg, transparent 30deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 0 70%, #000 72% 100%);
  mask: radial-gradient(circle, transparent 0 70%, #000 72% 100%);
}
.draw-bowl-balls { position: absolute; inset: 0; z-index: 3; }
.draw-capsule {
  position: absolute; left: var(--ball-x); top: var(--ball-y); width: clamp(64px, 11vw, 102px); aspect-ratio: 1;
  opacity: var(--ball-opacity); transform: translate(-50%, -50%) scale(var(--ball-scale)) rotate(var(--ball-spin));
  filter: drop-shadow(1px 2px 0 rgba(20,24,32,.28)); will-change: left, top, transform, opacity;
}
.draw-selected-ball {
  position: absolute; left: 50%; top: 50%; z-index: 7; width: clamp(90px, 17vw, 145px); aspect-ratio: 1;
  transform: translate(-50%,-50%); pointer-events: none;
}
.draw-ball-half {
  position: absolute; inset: 0; background: url("draw-assets/vintage-draw-ball.png") center / contain no-repeat;
  filter: drop-shadow(2px 3px 0 rgba(20,24,32,.3));
}
.draw-ball-half.is-left { clip-path: inset(0 0 50% 0); }
.draw-ball-half.is-right { clip-path: inset(50% 0 0 0); }
.phase-swirl .draw-selected-ball, .phase-float .draw-selected-ball { opacity: 0; }
.phase-reveal .draw-bowl-stage::before, .phase-settling .draw-bowl-stage::before {
  content: ""; position: absolute; inset: 0; z-index: 6; border-radius: 50%; background: var(--paper-2); opacity: .74;
}
.phase-reveal .draw-ball-half.is-left, .phase-settling .draw-ball-half.is-left { animation: openLeft .45s ease-out both; }
.phase-reveal .draw-ball-half.is-right, .phase-settling .draw-ball-half.is-right { animation: openRight .45s ease-out both; }
@keyframes openLeft { to { transform: translateY(-105%) rotate(-10deg); opacity: 0; } }
@keyframes openRight { to { transform: translateY(105%) rotate(10deg); opacity: 0; } }
.draw-reveal-card {
  position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(390px, 76%); border: var(--rule) solid var(--ink); background: var(--paper);
  padding: 18px 20px 20px; text-align: center; box-shadow: 7px 7px 0 var(--gold);
  animation: revealCard .48s cubic-bezier(.2,.85,.3,1) both;
}
.draw-reveal-card::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: 8px;
  border-top: 2px dashed var(--ink); opacity: .4;
}
@keyframes revealCard { from { opacity: 0; transform: translate(-50%,-38%) scale(.78); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.draw-reveal-kicker { margin: 2px 0 10px; font-size: 8px; font-weight: 700; letter-spacing: .2em; color: var(--ink-soft); }
.draw-reveal-flag {
  display: inline-grid; place-items: center; min-width: 96px; min-height: 66px; margin-bottom: 8px;
  border: 1.5px solid var(--ink); background: var(--paper-2); padding: 7px 10px;
  font-size: 48px; line-height: 1;
}
.draw-reveal-flag .vflag { margin: 0; }
.draw-reveal-team { font-size: clamp(32px, 6vw, 58px); line-height: .94; white-space: nowrap; }
.draw-reveal-meta { margin-top: 8px; font-size: 9px; letter-spacing: .12em; color: var(--ink-soft); }
.draw-reveal-stamp {
  display: inline-block; margin-top: 13px; padding: 3px 11px; border: 3px double var(--red);
  color: var(--red-ink); font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; transform: rotate(-3.5deg);
}
.draw-machine-status {
  padding: 8px 12px; border-top: var(--rule) solid var(--ink); text-align: center;
  font-size: 9px; letter-spacing: .18em; background: var(--gold);
}

@media (max-width: 720px) {
  .draw-entry-grid { grid-template-columns: 1fr; }
  .draw-recover { grid-column: auto; display: flex; }
  .draw-recover { align-items: stretch; }
  .draw-room-banner, .draw-host-actions, .draw-section-head { align-items: stretch; flex-direction: column; }
  .draw-practice-note { align-items: flex-start; flex-direction: column; gap: 5px; }
  .draw-room-note { text-align: left; }
  .draw-lobby-player { flex-wrap: wrap; }
  .draw-lobby-tags { flex: 1; }
  .draw-host-actions form { display: grid; grid-template-columns: 1fr auto; }
  .draw-publish-confirm { grid-template-columns: 1fr; }
  .draw-remaining-grid { grid-template-columns: repeat(2, 1fr); }
  .draw-undrawn-pots { grid-template-columns: repeat(2, 1fr); }
  .draw-remaining-count { text-align: left; }
  .draw-bowl-stage { width: min(86vw, 450px); margin: 16px auto; }
  .draw-capsule { width: 62px; }
  .draw-capsule:nth-child(n+9) { display: none; }
  .draw-capsule.is-selected { display: block; }
  .draw-reveal-card { width: 78%; padding: 14px 12px; box-shadow: 5px 5px 0 var(--gold); }
  .draw-reveal-team { font-size: clamp(26px, 9vw, 44px); white-space: normal; }
  .draw-reveal-meta { font-size: 7px; }
}
@media (max-width: 440px) {
  .draw-undrawn-pots { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .phase-reveal .draw-ball-half, .draw-reveal-card, .draw-slot-pop { animation: none !important; }
  .phase-swirl .draw-capsule { opacity: .65; }
}
@media (pointer: coarse) {
  .draw-secondary-btn, .draw-lobby-player button { min-height: 44px; }
}
