/* css/knockout.css — Knockout-Stage Contest board. Self-contained (header +
   board) so the page needs no shared page CSS. Header styles mirror
   leaderboard.css for visual consistency. */

[hidden] { display: none !important; }

:root {
  --gold:        #D8B45A;
  --gold-bright: #f0cc6e;
  --crim:        #E11D48;   /* The Gauntlet signature — elimination crimson */
  --crim-bright: #FB4A6E;
  --crim-dim:    rgba(225,29,72,0.12);
  --bg:          #07080c;
  --card:        rgba(255,255,255,0.032);
  --card2:       rgba(255,255,255,0.055);
  --border:      rgba(255,255,255,0.07);
  --border-gold: rgba(216,180,90,0.28);
  --text:        #fff;
  --muted:       rgba(255,255,255,0.38);
  --usa:         #2A398D;
  --canada:      #E61D25;
  --mexico:      #3CAC3B;
  --win:         #3CAC3B;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Barlow', -apple-system, sans-serif;
  min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 55% at 50% -5%,  rgba(216,180,90,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 50%  40% at 8%   90%, rgba(42,57,141,0.05)  0%, transparent 60%),
    radial-gradient(ellipse 40%  35% at 92%  70%, rgba(230,29,37,0.04)  0%, transparent 55%);
}

/* ── Header (mirrors leaderboard.css) ── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 62px;
  background: rgba(7,8,12,0.88);
  backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 0.5px solid var(--border);
}
header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--usa) 0%, var(--usa) 33%, var(--mexico) 33%, var(--mexico) 66%, var(--canada) 66%, var(--canada) 100%);
}
.hdrInner { max-width: 1200px; height: 62px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.hdrLeft { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.hdrLogo { height: 32px; width: auto; opacity: 0.92; }
.hdrDiv  { width: 1px; height: 24px; background: var(--border); }
.hdrSiteName { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 800; letter-spacing: .08em; color: rgba(255,255,255,0.88); }
.hdrSiteSub  { font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.hdrRight { display: flex; align-items: center; gap: 10px; }
.hdrMenu { position: relative; }
.hdrMenuBtn {
  all: unset; display: flex; align-items: center; gap: 8px;
  padding: 0 14px 0 10px; height: 36px; border-radius: 999px; cursor: pointer;
  background: rgba(216,180,90,0.10); border: 0.5px solid rgba(216,180,90,0.30);
  color: rgba(255,255,255,0.85); font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease; white-space: nowrap;
}
.hdrMenuBtn:hover { background: rgba(216,180,90,0.18); border-color: rgba(216,180,90,0.55); }
.hdrMenuIcon { display: flex; flex-direction: column; gap: 3.5px; flex-shrink: 0; }
.hdrMenuIcon span { display: block; height: 1.5px; border-radius: 2px; background: var(--gold); transition: width 160ms ease; }
.hdrMenuIcon span:nth-child(1) { width: 14px; }
.hdrMenuIcon span:nth-child(2) { width: 10px; }
.hdrMenuIcon span:nth-child(3) { width: 14px; }
.hdrMenuBtn:hover .hdrMenuIcon span { width: 14px; }
.hdrDropdown {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  background: rgba(10,12,18,0.98); border: 0.5px solid rgba(255,255,255,0.10);
  border-radius: 16px; padding: 8px; min-width: 200px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.70); backdrop-filter: blur(24px); z-index: 200;
}
.hdrDropdown.open { display: block; }
.hdrDropItem {
  all: unset; display: block; width: 100%; box-sizing: border-box;
  padding: 10px 14px; text-align: left; font-family: 'Barlow', sans-serif;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.65); cursor: pointer;
  border-radius: 10px; transition: background 120ms ease, color 120ms ease;
}
.hdrDropItem:hover { background: rgba(255,255,255,0.06); color: #fff; }
.hdrDropItem.gold { color: var(--gold); font-weight: 700; }
.hdrDropSep { height: 0.5px; background: rgba(255,255,255,0.07); margin: 6px 8px; }
@media (max-width: 640px) { .hdrMenuLabel { display: none; } .hdrMenuBtn { padding: 0 10px; gap: 0; } }

/* ── Layout ── */
main { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 86px 18px 90px; }
.koEyebrow {
  display: inline-block; font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--crim-bright);
  margin-bottom: 6px;
}
.koIntro h1 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 46px; font-weight: 900; letter-spacing: -0.01em;
  background: linear-gradient(92deg, #fff 0%, var(--crim-bright) 60%, var(--crim) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.koSub { color: rgba(255,255,255,0.55); font-size: 14px; line-height: 1.55; max-width: 760px; margin-top: 8px; }
.koSub b { color: var(--gold-bright); font-weight: 700; }
.hdrSiteSub { color: var(--crim-bright) !important; }

/* Prize strip */
.koPrizes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.koPrizesLbl { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.koPrize {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .02em;
  padding: 5px 12px; border-radius: 999px; border: 0.5px solid var(--border-gold); background: rgba(216,180,90,0.08); color: var(--gold-bright);
}
.koPrize--1 { border-color: rgba(216,180,90,0.55); background: rgba(216,180,90,0.14); }

/* ── Submit modal (name + lock in) ── */
.koModalOverlay {
  position: fixed; inset: 0; z-index: 680; display: flex; align-items: center; justify-content: center;
  background: rgba(7,8,12,0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .25s ease; padding: 20px;
}
.koModalOverlay.show { opacity: 1; }
.koModal {
  position: relative; width: 100%; max-width: 460px; text-align: center;
  background: linear-gradient(180deg, rgba(20,12,16,0.98), rgba(10,12,18,0.98));
  border: 0.5px solid rgba(225,29,72,0.35); border-radius: 20px; padding: 32px 26px 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(225,29,72,0.12) inset;
  transform: scale(.95) translateY(10px); transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.koModalOverlay.show .koModal { transform: none; }
.koModalClose {
  position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 0.5px solid var(--border); color: rgba(255,255,255,0.6);
  font-size: 20px; cursor: pointer;
}
.koModalClose:hover { background: rgba(255,255,255,0.12); }
.koModalKicker { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--crim-bright); }
.koModalTitle { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 28px; margin: 4px 0 14px; }
.koModalChamp { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 18px; padding: 12px; border-radius: 12px; background: rgba(216,180,90,0.07); border: 0.5px solid rgba(216,180,90,0.25); }
.koModalChampLbl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.koModalChampTeam { display: flex; align-items: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 22px; color: var(--gold-bright); }
.koModalChampTeam .flag { font-size: 1.2em; margin-right: 8px; }
.koModalLabel { display: block; text-align: left; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.6); margin-bottom: 6px; }
.koModalInput {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 11px; font-family: inherit; font-size: 15px;
  background: #0f1219; border: 1px solid rgba(255,255,255,0.12); color: #fff; outline: none;
}
.koModalInput:focus { border-color: var(--crim); }
.koModalEarly { margin-top: 12px; font-size: 12px; color: var(--gold); font-weight: 600; }
.koModalBtn {
  all: unset; display: block; width: 100%; box-sizing: border-box; margin-top: 16px; text-align: center;
  padding: 14px; border-radius: 999px; cursor: pointer; background: var(--gold); color: #1a1407;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 17px; letter-spacing: .04em; text-transform: uppercase;
  transition: transform .12s ease, filter .12s ease;
}
.koModalBtn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.koModalNote { margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.koModalSub { font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,0.72); margin: 2px 0 4px; }
/* Account step (anon): white Google button + a quiet email fallback link */
.koGoogleBtn { background: #fff; color: #1f1f1f; display: flex; align-items: center; justify-content: center; gap: 10px; }
.koGoogleBtn .koGIcon {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border-radius: 50%; background: #1a73e8; color: #fff; font-weight: 900; font-size: 13px;
  font-family: 'Barlow Condensed', sans-serif;
}
.koModalLinkBtn {
  all: unset; display: block; width: 100%; box-sizing: border-box; margin-top: 10px; text-align: center;
  padding: 8px; cursor: pointer; color: rgba(255,255,255,0.65); font-size: 13px; font-weight: 600;
}
.koModalLinkBtn:hover { color: #fff; text-decoration: underline; }
/* Entry notice — expectation-setting banner for guests / free users */
.koEntryNotice {
  margin: 16px 0 0; padding: 12px 16px; border-radius: 12px;
  background: rgba(216,180,90,0.08); border: 0.5px solid var(--border-gold);
  color: rgba(255,255,255,0.82); font-size: 13.5px; line-height: 1.5;
}
.koEntryNotice b { color: #fff; }
.koEntryEarly { color: var(--gold); font-weight: 700; white-space: nowrap; }

/* Multi-bracket switcher — chips for each of the user's KO brackets + New */
.koSwitcher {
  margin: 14px 0 0; display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap;
}
.koSwLbl { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.koSwChips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.koSwChip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.78); font-size: 13px; font-weight: 600;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.koSwChip:hover { background: rgba(255,255,255,0.09); color: #fff; }
.koSwChip.active {
  background: var(--accentBg, rgba(216,180,90,0.16)); border-color: var(--border-gold, rgba(216,180,90,0.6));
  color: #fff;
}
.koSwTick { color: rgb(60,210,80); font-weight: 800; }
.koSwDraft { color: rgba(255,255,255,0.42); font-weight: 600; font-size: 11.5px; }
.koSwNew {
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: rgba(216,180,90,0.10); border: 1px dashed var(--border-gold, rgba(216,180,90,0.6));
  color: var(--gold, rgb(216,180,90)); font-size: 13px; font-weight: 700;
  transition: background .15s ease;
}
.koSwNew:hover { background: rgba(216,180,90,0.20); }
/* Plan selector (Free / Amateur / Pro) — accent themed (gold=amateur, purple=pro) */
.koModal--plan {
  max-width: 480px; max-height: 88vh; overflow-y: auto;
  --plan-accent: rgb(216,180,90); --plan-glow: rgba(216,180,90,0.16);
  border: 1px solid var(--plan-accent);
  box-shadow: 0 0 0 1px var(--plan-accent), 0 24px 80px rgba(0,0,0,.6), 0 0 70px var(--plan-glow);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.koPlanGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 12px; }
.koPlan {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  padding: 13px 8px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03); transition: border-color .12s ease, background .12s ease;
}
.koPlan:hover { border-color: rgba(255,255,255,0.30); }
.koPlanName { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 16px; letter-spacing: .02em; }
.koPlanPrice { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 21px; line-height: 1; }
.koPlanTag { font-size: 10px; color: rgba(255,255,255,0.5); }
.koPlan.tier-amateur .koPlanPrice { color: rgb(216,180,90); }
.koPlan.tier-pro .koPlanPrice { color: rgb(178,120,255); }
.koPlan.tier-free .koPlanPrice { color: rgba(255,255,255,0.6); }
.koPlan.sel { border-color: var(--plan-accent); background: var(--plan-glow); box-shadow: inset 0 0 0 1px var(--plan-accent); }
.koPlanBadge {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 2px 7px; border-radius: 999px; background: rgb(216,180,90); color: #1a1407;
  font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
/* "What you get" panel — adopts the selected tier's accent */
.koPerks { text-align: left; border: 1px solid var(--plan-accent); background: var(--plan-glow); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.koPerksHead { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--plan-accent); margin-bottom: 8px; }
.koPerksList { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.koPerksList li { font-size: 13px; line-height: 1.35; color: rgba(255,255,255,0.85); }
.koModal--plan #koPlanGo { background: var(--plan-accent); }

/* Processing overlay — payment capture → migrate → submit */
.koLoadingOverlay {
  position: fixed; inset: 0; z-index: 9600; display: grid; place-items: center;
  background: rgba(5,7,12,0.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .2s ease;
}
.koLoadingOverlay.show { opacity: 1; }
.koLoadingCard { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding: 24px; }
.koSpinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid rgba(216,180,90,0.25); border-top-color: var(--gold);
  animation: koSpin .8s linear infinite;
}
@keyframes koSpin { to { transform: rotate(360deg); } }
.koLoadingMsg { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: .02em; color: #f0f2ff; }

/* ── Status / submit bar ── */
.koStatusBar {
  position: sticky; top: 70px; z-index: 50;
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  margin: 22px 0 18px; padding: 12px 16px;
  background: rgba(10,12,18,0.92); border: 0.5px solid var(--border-gold); border-radius: 14px;
  backdrop-filter: blur(12px);
}
.koProg { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 16px; letter-spacing: .04em; }
.koEarly { color: var(--gold); font-size: 12px; font-weight: 600; margin-left: auto; }
.koStandingsLink { color: var(--gold); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.koStandingsLink:hover { color: var(--gold-bright); text-decoration: underline; }
.koEarly + .koStandingsLink { margin-left: 14px; }
.koStatusBar > .koStandingsLink:not(.koEarly + *) { margin-left: auto; }
.koBadge { color: var(--win); font-weight: 800; font-size: 14px; }
.koSubmit {
  all: unset; cursor: pointer; padding: 9px 20px; border-radius: 999px;
  background: var(--gold); color: #1a1407; font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 14px; letter-spacing: .05em; text-transform: uppercase;
  transition: transform .12s ease, filter .12s ease;
}
.koSubmit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.koSubmit:disabled { opacity: 0.4; cursor: not-allowed; }

/* Phone tab bar — hidden on desktop, shown in the mobile media query below. */
.koTabs { display: none; }

/* Hint line — how to fill the bracket. */
.koHint {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin: 0 0 14px; padding: 9px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 0.5px solid var(--border);
  color: rgba(255,255,255,0.6); font-size: 12.5px;
}
.koHintStep {
  display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px;
  border-radius: 999px; background: var(--gold); color: #1a1407; font-weight: 800; font-size: 11px;
}
.koHintSep { color: var(--muted); margin: 0 2px; }

/* ── Board (mirrors Model A's bracket look + connector lines) ── */
.koBoardWrap { position: relative; display: flex; gap: 30px; overflow-x: auto; padding: 4px 2px 24px; align-items: stretch; }
.koLoading { color: var(--muted); padding: 40px; }
.koCol { flex: 0 0 auto; width: 224px; display: flex; flex-direction: column; }
.koColHead {
  font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  padding: 2px 4px 8px; margin-bottom: 8px; border-bottom: 0.5px solid var(--border-gold);
}
/* Matches distribute over the full (equal) column height so each round's card
   centers between its feeder pair — the alignment the connectors expect. */
.koColMatches { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-around; gap: 6px; position: relative; z-index: 1; }
/* Final column: keep the Final + 3rd-place together as one centered "finals"
   pair instead of spreading them across the tall column like the bracket rounds. */
.koCol[data-round="final"] .koColMatches { justify-content: center; gap: 14px; }

/* Match card — two stacked team pills, like Model A's knockout cards. */
.koM {
  position: relative; z-index: 1;
  background: var(--card); border: 0.5px solid var(--border); border-radius: 11px;
  padding: 5px; display: flex; flex-direction: column; gap: 2px;
  transition: border-color .15s ease, background .15s ease;
}
.koM:hover { border-color: rgba(255,255,255,0.12); }
.koMid { height: 0.5px; background: rgba(255,255,255,0.05); margin: 1px 8px; }
.koMNum {
  font-family: 'Barlow Condensed', sans-serif; font-size: 9.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,0.32);
  text-align: center; padding: 1px 0 3px;
}

.koSlot { display: flex; align-items: center; gap: 4px; }
.koSlot--seeded .koTeam, .koSlot--pick .koSelect { flex: 1; min-width: 0; }

/* Team pill — Model A .pickBtn styling: dim by default, gold when winner. */
.koTeam {
  all: unset; box-sizing: border-box; flex: 1; min-width: 0; display: flex; align-items: center;
  cursor: pointer; padding: 6px 8px; border-radius: 7px; min-height: 32px;
  border: 1px solid transparent; background: transparent;
  color: rgba(255,255,255,0.46); font-size: 12.5px; font-weight: 500;
  transition: all 120ms ease; white-space: nowrap; overflow: hidden;
}
.koTeam:not(:disabled):hover { background: rgba(255,255,255,0.055); color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.09); }
.koTeam.winner {
  background: rgba(216,180,90,0.10); border-color: rgba(216,180,90,0.30);
  color: rgba(255,255,255,0.95); font-weight: 650;
  animation: koPop 360ms cubic-bezier(.16,.92,.2,1) both;
}
@keyframes koPop { 0%{transform:scale(.96);opacity:.6;} 65%{transform:scale(1.02);} 100%{transform:scale(1);opacity:1;} }
.koTeam:disabled { cursor: default; }
.koTeam--tbd { color: rgba(255,255,255,0.28); font-style: italic; cursor: default; }
/* Eliminated — knocked out of a played KO match. */
.koTeam.koElim { opacity: 0.5; }
.koTeam.koElim .teamLabel { text-decoration: line-through; text-decoration-color: var(--crim); text-decoration-thickness: 2px; color: rgba(255,255,255,0.45); }
.koTeam.koElim .flag { filter: grayscale(1); opacity: 0.6; }
.koTeam.koElim.winner { background: rgba(225,29,72,0.10); border-color: rgba(225,29,72,0.35); }
.koElimNote { font-size: 12px; font-weight: 700; color: var(--crim-bright); }
.flag { display: inline-flex; align-items: center; justify-content: center; width: 1.55em; margin-right: 7px; font-size: 1.12em; line-height: 1; flex-shrink: 0; }
.teamLabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teamLabel.muted { color: rgba(255,255,255,0.3); }
.koCheck { margin-left: auto; color: var(--gold); font-weight: 900; font-size: 12px; padding-left: 6px; }
.koPct { margin-left: auto; font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.32); padding-left: 6px; letter-spacing: .02em; }
.koTeam.winner .koPct { color: rgba(216,180,90,0.7); }
.koLockTag { margin-left: auto; font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--win); font-weight: 700; padding-left: 6px; flex-shrink: 0; }

/* Final card — gold "champion" glow, like Model A's finalHero. */
.koFinal { background: rgba(216,180,90,0.06); border-color: rgba(216,180,90,0.30); box-shadow: inset 0 1px 0 rgba(216,180,90,0.14); }
.koChampTag { text-align: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: .04em; color: var(--gold-bright); padding: 4px 0 2px; }

/* 3rd-place playoff card — bronze accent, sits under the Final. */
.koThird { background: rgba(205,127,50,0.07); border-color: rgba(205,127,50,0.34); box-shadow: inset 0 1px 0 rgba(205,127,50,0.16); }
.koMNum--third { color: #d8954a !important; opacity: 1 !important; font-weight: 800; letter-spacing: .08em; }
.koChampTag.koBronze { color: #e0a567; font-size: 10.5px; }
/* Render the 3rd-place match a bit smaller — narrower, with shorter pills —
   so it reads as the secondary match under the Final. */
.koThird { align-self: center; width: 88%; padding: 4px; }
.koThird .koMNum--third { font-size: 9px; }
.koThird .koTeam { min-height: 27px; font-size: 11.5px; padding: 5px 8px; }
.koThird .flag { font-size: 1.02em; }

/* Dropdown for an undecided R32 slot. */
.koSelect {
  box-sizing: border-box; width: 100%; padding: 7px 8px; border-radius: 7px; min-height: 32px;
  background: #0f1219; border: 1px solid rgba(255,255,255,0.10); color: rgba(255,255,255,0.85);
  font-family: inherit; font-size: 12.5px; cursor: pointer;
  transition: border-color .12s ease;
}
.koSelect:hover:not(:disabled) { border-color: var(--border-gold); }
.koSelect:focus { outline: none; border-color: var(--border-gold); }
.koChange {
  all: unset; cursor: pointer; width: 22px; height: 28px; text-align: center; line-height: 28px;
  border-radius: 6px; color: rgba(255,255,255,0.35); font-weight: 800; flex-shrink: 0;
  transition: color .12s ease, background .12s ease;
}
.koChange:hover:not(:disabled) { color: var(--gold); background: rgba(216,180,90,0.10); }

/* Deeper rounds read a touch larger, like Model A. */
.koM.r-sf .koTeam, .koM.r-final .koTeam { font-size: 13.5px; min-height: 36px; }

/* ── Phones: round-by-round tabs, one round at a time, no horizontal scroll ── */
@media (max-width: 760px) {
  .koTabs {
    display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    position: sticky; top: 62px; z-index: 49; margin: 10px -2px 14px; padding: 8px 2px;
    background: rgba(7,8,12,0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .koTab {
    all: unset; cursor: pointer; flex: 1 0 auto; min-width: 58px; box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 8px; border-radius: 11px; border: 0.5px solid var(--border); background: rgba(255,255,255,0.025);
  }
  .koTab.active { border-color: var(--gold); background: rgba(216,180,90,0.10); }
  .koTabName { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: .06em; color: rgba(255,255,255,0.82); }
  .koTab.active .koTabName { color: var(--gold-bright); }
  .koTabProg { font-size: 10px; font-weight: 700; color: var(--muted); }
  .koTab.done .koTabProg { color: var(--win); font-size: 12px; }

  .koBoardWrap { display: block; overflow-x: visible; gap: 0; padding: 0 0 28px; }
  #koConnectors { display: none !important; }
  .koCol { width: 100%; display: none; }
  .koCol.active { display: flex; }
  .koColHead { display: none; }
  .koColMatches { justify-content: flex-start; gap: 11px; }
  .koM { padding: 7px; }
  .koTeam, .koSelect { min-height: 42px; font-size: 14.5px; }
  .koM.r-sf .koTeam, .koM.r-final .koTeam { min-height: 46px; font-size: 15px; }
  .koMNum { font-size: 10px; padding-top: 2px; color: var(--accent); opacity: .8; }

  /* 3rd-place playoff stays compact on mobile too — clearly smaller than the
     Final, but pills kept tappable (the desktop 27px is below a touch target). */
  .koThird { width: 84%; }
  .koThird .koTeam { min-height: 34px; font-size: 13px; padding: 6px 10px; }
  .koThird .flag { font-size: 1em; }
  .koThird .koMNum--third { font-size: 9px; }
  .koThird .koChampTag.koBronze { font-size: 10.5px; }

  /* Per-round colour accents (active column only, since that's all that shows). */
  .koCol.active .koM { border-top: 2px solid var(--accentBorder); }
  .koCol.active .koTeam.winner {
    background: var(--accentBg); border-color: var(--accentBorder); color: #fff;
    animation: koPop 360ms cubic-bezier(.16,.92,.2,1) both;
  }
  .koCol.active .koCheck { color: var(--accent); }
  .koTabProg { color: var(--muted); }

  /* Tighter intro so the board is reachable sooner. */
  main { padding: 74px 14px 80px; }
  .koIntro h1 { font-size: 30px; }
  .koSub { font-size: 13px; line-height: 1.5; }

  /* Status bar: NOT sticky on phones (the tabs are the sticky element) — avoids
     the two overlapping. Stack cleanly; full-width submit. */
  .koStatusBar { position: static; top: auto; flex-wrap: wrap; gap: 8px 12px; padding: 11px 14px; }
  .koStatusBar .koSubmit { flex: 1 1 auto; text-align: center; }
  .koProg { flex: 0 0 auto; }
  .koEarly { order: 3; flex-basis: 100%; margin-left: 0; text-align: center; }
  .koStandingsLink { margin-left: auto; }
  .koBadge { margin-left: auto; }
}

@media (max-width: 480px) {
  .hdrInner { padding: 0 12px; }
  .hdrSiteSub { display: none; }
  .koChampName { font-size: 38px; }
  .koChampFlag { font-size: 64px; }
  .koChampLabel { letter-spacing: .22em; font-size: 13px; }
}

/* ── Gate (login / upgrade wall) ── */
.koGate {
  max-width: 520px; margin: 30px auto; text-align: center; padding: 36px 28px;
  background: var(--card); border: 0.5px solid var(--border-gold); border-radius: 18px;
}
.koGate h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 900; margin-bottom: 12px; }
.koGate p { color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.koGate b { color: var(--gold-bright); }
.koGateBtn {
  display: inline-block; margin-top: 18px; padding: 13px 30px; border-radius: 999px;
  background: var(--gold); color: #1a1407; font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
  transition: transform .12s ease, filter .12s ease;
}
.koGateBtn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.koGateLink { display: block; margin-top: 14px; color: var(--muted); font-size: 13px; text-decoration: none; }
.koGateLink:hover { color: rgba(255,255,255,0.7); }

/* Polished upgrade wall */
.koGate--upgrade { max-width: 600px; }
.koGateBadge {
  display: inline-block; margin-bottom: 14px; padding: 5px 14px; border-radius: 999px;
  background: var(--crim-dim); border: 0.5px solid rgba(225,29,72,0.4);
  color: var(--crim-bright); font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
}
.koTierGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 4px; }
.koTier {
  position: relative; padding: 16px 10px 14px; border-radius: 14px;
  background: rgba(255,255,255,0.025); border: 1px solid var(--border);
}
.koTier.unlock { border-color: rgba(216,180,90,0.22); }
.koTier.current { border-color: var(--gold); background: rgba(216,180,90,0.08); box-shadow: 0 0 0 1px rgba(216,180,90,0.25) inset; }
.koTierName { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,0.8); }
.koTierN { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 38px; line-height: 1; margin: 6px 0 2px; color: var(--gold-bright); }
.koTier:not(.unlock) .koTierN { color: rgba(255,255,255,0.3); }
.koTierSub { font-size: 10.5px; color: var(--muted); letter-spacing: .03em; }
.koTierTag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--gold); color: #1a1407; font-size: 9px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
}
.koGateNote { font-size: 13px; color: rgba(255,255,255,0.55); margin-top: 12px; }
.koGateNote b { color: var(--gold-bright); }

/* ── Celebration (ported from Model A) ── */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 730; overflow: hidden; }
.confetti i {
  position: absolute; width: 10px; height: 14px; opacity: .98;
  transform: translate3d(0,-10px,0) rotate(0deg);
  animation: koFall 1400ms cubic-bezier(.2,.6,.2,1) forwards;
}
@keyframes koFall { to { transform: translate3d(var(--dx), calc(100vh + 60px), 0) rotate(var(--rot)); opacity: .98; } }
#koConfettiCanvas { position: fixed; inset: 0; pointer-events: none; z-index: 720; }

/* ── Champion reveal (big full-screen moment) ── */
.koChampOverlay {
  position: fixed; inset: 0; z-index: 700; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(216,180,90,0.12), transparent 70%), rgba(7,8,12,0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity .35s ease;
}
.koChampOverlay.show { opacity: 1; }
.koChampClose {
  position: absolute; top: 18px; right: 22px; width: 40px; height: 40px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 0.5px solid var(--border); color: rgba(255,255,255,0.7);
  font-size: 22px; cursor: pointer; opacity: 0; transition: opacity .3s ease 1.2s, background .15s ease;
}
.koChampOverlay.show .koChampClose { opacity: 1; }
.koChampClose:hover { background: rgba(255,255,255,0.12); }
.koChampCenter {
  text-align: center; padding: 0 24px; max-width: 640px;
  transform: scale(.94) translateY(14px); opacity: 0;
  transition: opacity .3s cubic-bezier(.32,.72,0,1), transform .4s cubic-bezier(.32,.72,0,1);
  transition-delay: .15s;
}
.koChampOverlay.show .koChampCenter { transform: none; opacity: 1; }
.koChampBrand { display: inline-flex; align-items: center; gap: 10px; opacity: 0; transition: opacity .3s ease .5s; }
.koChampOverlay.show .koChampBrand { opacity: 1; }
.koChampLogo { height: 34px; width: auto; opacity: .92; }
.koChampBrandName { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 800; letter-spacing: .08em; text-align: left; }
.koChampBrandSub { font-size: 10px; color: var(--muted); letter-spacing: .04em; text-align: left; }
.koChampLabel {
  margin-top: 22px; font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 700;
  letter-spacing: .34em; text-transform: uppercase; color: var(--gold);
  opacity: 0; transition: opacity .3s ease .38s;
}
.koChampOverlay.show .koChampLabel { opacity: 1; }
.koChampFlag {
  font-size: 92px; line-height: 1.1; margin: 8px 0 4px;
  opacity: 0; filter: blur(14px); transform: scale(.82);
  transition: opacity .5s cubic-bezier(.32,.72,0,1) .55s, filter .5s cubic-bezier(.32,.72,0,1) .55s, transform .5s cubic-bezier(.32,.72,0,1) .55s;
}
.koChampOverlay.show .koChampFlag { opacity: 1; filter: blur(0); transform: none; }
.koChampName {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: 60px; line-height: 1.02;
  letter-spacing: -0.01em; color: #fff; text-shadow: 0 0 60px rgba(216,180,90,0.3);
  opacity: 0; filter: blur(16px);
  transition: opacity .48s cubic-bezier(.32,.72,0,1) .7s, filter .56s cubic-bezier(.32,.72,0,1) .7s;
}
.koChampOverlay.show .koChampName { opacity: 1; filter: blur(0); }
.koChampCtas { margin-top: 28px; opacity: 0; transition: opacity .35s ease 1.35s; }
.koChampOverlay.show .koChampCtas { opacity: 1; }
.koChampBtn {
  all: unset; cursor: pointer; padding: 12px 30px; border-radius: 999px; background: var(--gold); color: #1a1407;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 16px; letter-spacing: .04em; text-transform: uppercase;
  transition: transform .12s ease, filter .12s ease;
}
.koChampBtn:hover { transform: translateY(-1px); filter: brightness(1.08); }
@media (max-width: 520px) { .koChampName { font-size: 44px; } .koChampFlag { font-size: 72px; } }

/* ── Toast ── */
.koToast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: rgba(10,12,18,0.98); border: 0.5px solid var(--border-gold); border-radius: 12px;
  padding: 12px 20px; font-size: 14px; font-weight: 600; color: #fff;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 500; max-width: 90vw;
}
.koToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Team chant — bigger, gold, with a pop. */
.koToast.chant {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 20px;
  letter-spacing: .04em; color: var(--gold-bright); border-color: rgba(216,180,90,0.55);
  background: rgba(20,16,6,0.97); box-shadow: 0 8px 32px rgba(216,180,90,0.22);
}
.koToast.chant.show { animation: koChantPop 1900ms cubic-bezier(.16,.92,.2,1); }
@keyframes koChantPop { 0%{transform:translateX(-50%) translateY(14px) scale(.85);} 12%{transform:translateX(-50%) translateY(0) scale(1.06);} 22%{transform:translateX(-50%) scale(1);} 100%{transform:translateX(-50%) scale(1);} }
