/* ============================================================================
   MAJORS.IM — CS2 Major Pick'em · TACTICAL INTELLIGENCE TERMINAL
   Near-black, broadcast-grade ops-room aesthetic. Ember accent + status grammar.
   Type: Chakra Petch (display) · Outfit (UI) · JetBrains Mono (data)
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: dark;

  --bg:        #0a0908;
  --surface-1: #14110d;            /* panel  */
  --surface-2: #19150f;            /* card   */
  --surface-3: #221b12;            /* hover  */
  --glass:     rgba(20, 16, 12, 0.55);
  --glass-solid: rgba(20, 16, 12, 0.92);

  --ink:    #f4efe7;
  --muted:  #9d958a;
  --faint:  #8a8174;

  --line:        rgba(255, 240, 224, 0.08);
  --line-strong: rgba(255, 240, 224, 0.14);
  --line-faint:  rgba(255, 240, 224, 0.045);

  /* brand / interactive — ember only */
  --ember:      #ff8a2e;
  --ember-deep: #ff5a1f;
  --ember-soft: #ffb267;
  --ember-glow: rgba(255, 122, 36, 0.45);

  /* status grammar — meaning only, never decoration */
  --mint:    #4ee6a8;   /* secured / advanced / locked */
  --cyan:    #46d2ff;   /* in-play / alive / live      */
  --crimson: #ff5468;   /* eliminated / broken         */
  --gold:    #f5c451;   /* on-the-bubble / champion    */

  --mint-fill:    rgba(78, 230, 168, 0.10);
  --cyan-fill:    rgba(70, 210, 255, 0.10);
  --crimson-fill: rgba(255, 84, 104, 0.10);
  --gold-fill:    rgba(245, 196, 81, 0.10);

  /* CS2-native side coloring */
  --ct: #5b9bd5;
  --t:  #e0b243;

  --font-display: 'Chakra Petch', 'Outfit', system-ui, sans-serif;
  --font-ui: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --shell: min(1340px, 100%);

  --shadow-panel:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.015),
    0 18px 44px -16px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* film grain — top fixed layer, above panels (never behind blur) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(255, 122, 36, 0.28); color: #fff; }

a { color: inherit; }

.muted { color: var(--muted); }
.mono  { font-family: var(--font-mono); font-variant-numeric: tabular-nums slashed-zero; }

/* ---------- 2. Atmosphere stack ---------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.atmosphere__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }

.atmosphere__grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(255, 245, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 245, 235, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(circle at 50% 28%, #000 38%, transparent 92%);
          mask-image: radial-gradient(circle at 50% 28%, #000 38%, transparent 92%);
}

.atmosphere__glow { position: absolute; border-radius: 50%; filter: blur(40px); }
.atmosphere__glow--ember {
  top: -22vh; left: 6vw; width: 64vw; height: 60vh;
  background: radial-gradient(circle, rgba(255, 90, 31, 0.16), transparent 62%);
}
.atmosphere__glow--cyan {
  bottom: -26vh; right: -8vw; width: 56vw; height: 56vh;
  background: radial-gradient(circle, rgba(70, 210, 255, 0.08), transparent 64%);
}

.atmosphere__scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 4px);
  opacity: 0.5;
}

.atmosphere__vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 260px 90px rgba(0, 0, 0, 0.72);
  background: radial-gradient(circle at 50% 16%, transparent 48%, rgba(0, 0, 0, 0.42) 100%);
}

/* ---------- 3. Skip link ---------- */
.skip-link {
  position: fixed;
  left: 14px; top: -60px;
  z-index: 9999;
  background: var(--ember);
  color: #160a02;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 14px; }

/* ---------- 4. Top command bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 66px;
  padding: 0 clamp(14px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 10, 8, 0.86), rgba(12, 10, 8, 0.66));
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember-glow) 30%, var(--ember-glow) 70%, transparent);
  opacity: 0.5;
}

.topbar__left  { display: flex; align-items: center; gap: 16px; }
.topbar__right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.game-tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}
.game-tab {
  min-width: 42px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.game-tab.active { background: var(--ember); color: #160a02; }
.game-tab:disabled { color: var(--faint); cursor: not-allowed; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  color: var(--ember);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 138, 46, 0.22), transparent 60%),
    rgba(255, 122, 36, 0.06);
  border: 1px solid rgba(255, 138, 46, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.brand__mark.sm { width: 30px; height: 30px; }
.brand__type { display: grid; line-height: 1; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand__dot { color: var(--ember); }
.brand__kicker {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--faint);
}

.event-select {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 16px;
  margin: 0 auto;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.event-select:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.045); }
.event-badge {
  display: grid; place-items: center;
  width: 30px; height: 24px;
  border-radius: 3px;
  background: rgba(70, 210, 255, 0.12);
  overflow: hidden;
}
.event-badge img { max-width: 26px; max-height: 20px; display: block; }
.event-meta { display: grid; line-height: 1.15; text-align: left; }
.event-title-full { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.01em; }
.event-sub { font-size: 10.5px; color: var(--muted); }
.event-title-short { display: none; font-family: var(--font-display); font-weight: 600; }
.event-chevron { color: var(--faint); font-size: 11px; }

.signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}
.signal__pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(78, 230, 168, 0.55);
  animation: pulse 1.8s infinite;
}
.signal.is-warn .signal__pulse { background: var(--gold); box-shadow: 0 0 0 0 rgba(245, 196, 81, .55); animation-name: pulse-gold; }
.signal.is-bad  .signal__pulse { background: var(--crimson); box-shadow: 0 0 0 0 rgba(255, 84, 104, .55); animation-name: pulse-red; }
.signal.is-warn { color: var(--gold); }
.signal.is-bad  { color: var(--crimson); }

.appbar-actions { display: flex; gap: 6px; }
.icon-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.icon-btn:hover { color: var(--ember); border-color: rgba(255, 138, 46, 0.4); background: rgba(255, 138, 46, 0.06); }
.icon-btn:active { transform: translateY(1px); }

.mobile-menu-button {
  display: none;
  width: 40px; height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  cursor: pointer;
}

/* ---------- 5. App shell ---------- */
#app {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 32px) 80px;
}
.simulator-page { width: var(--shell); margin: 0 auto; }

/* Boot / loading */
.boot {
  min-height: 60vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
}
.boot__reticle {
  position: relative;
  width: 64px; height: 64px;
  border: 1.5px solid rgba(255, 138, 46, 0.4);
  border-radius: 50%;
  display: grid; place-items: center;
}
.boot__reticle::before,
.boot__reticle::after {
  content: ""; position: absolute;
  background: var(--ember);
}
.boot__reticle::before { width: 1.5px; height: 22px; }
.boot__reticle::after  { width: 22px; height: 1.5px; }
.boot__reticle span {
  position: absolute; inset: 6px;
  border: 1.5px solid transparent;
  border-top-color: var(--ember);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}
.boot__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }
.boot__status { color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }
.boot__dots i { animation: blink 1.4s infinite; }
.boot__dots i:nth-child(2) { animation-delay: .2s; }
.boot__dots i:nth-child(3) { animation-delay: .4s; }

/* ---------- 6. Shared primitives ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember-soft);
}
.kicker::before { content: ""; width: 14px; height: 1px; background: currentColor; opacity: .7; }

.hud { position: relative; }
.hud::before, .hud::after,
.hud > .hud-c1, .hud > .hud-c2 {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 1.4px solid rgba(255, 122, 36, 0.55);
  pointer-events: none;
  transition: all .25s var(--ease);
}
.hud::before { top: 9px; left: 9px;  border-right: 0; border-bottom: 0; }
.hud::after  { bottom: 9px; right: 9px; border-left: 0; border-top: 0; }
.hud > .hud-c1 { top: 9px; right: 9px; border-left: 0; border-bottom: 0; }
.hud > .hud-c2 { bottom: 9px; left: 9px; border-right: 0; border-top: 0; }
.hud:hover::before, .hud:hover::after,
.hud:hover > .hud-c1, .hud:hover > .hud-c2 { border-color: var(--ember); width: 19px; height: 19px; }

.panel {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-panel);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel, .pickem-dock, .command-hero, .topbar { background: var(--glass-solid); }
}

.rule {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong) 18%, var(--line-strong) 82%, transparent);
}

.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .15s;
}
.ghost-btn:hover:not(:disabled) { border-color: rgba(255, 138, 46, 0.5); color: var(--ember); background: rgba(255, 138, 46, 0.06); }
.ghost-btn:active:not(:disabled) { transform: translateY(1px); }
.ghost-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.status-good { color: var(--mint); }
.status-warn { color: var(--gold); }
.status-bad  { color: var(--crimson); }

/* ---------- 7. Command hero ---------- */
.command-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  margin-bottom: 26px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255, 90, 31, 0.08), transparent 55%),
    var(--glass);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.command-hero::after {
  content: "";
  position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--ember), transparent 60%);
  opacity: 0.8;
}
.command-hero__title {
  margin: 12px 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.6vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 30%, #ffd9bd 130%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.command-hero__sub {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.update-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 18px;
  font-size: 11px;
}
.signal-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}
.signal-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.signal-chip.status-warn .dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.signal-chip.status-bad  .dot { background: var(--crimson); box-shadow: 0 0 8px var(--crimson); }
.update-strip .mono { color: var(--faint); letter-spacing: 0.1em; }

/* stat readout */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-faint);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.stat {
  position: relative;
  padding: 15px 16px;
  background: rgba(14, 11, 8, 0.6);
  display: grid;
  gap: 4px;
}
.stat::before {
  content: "";
  position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px;
  background: var(--accent, var(--ember));
  opacity: 0.85;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat__value {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent, var(--ink));
}
.stat__sub { font-size: 10px; color: var(--faint); font-family: var(--font-mono); letter-spacing: 0.06em; }
.stat--teams   { --accent: var(--ink); }
.stat--secured { --accent: var(--mint); }
.stat--live    { --accent: var(--cyan); }
.stat--out     { --accent: var(--crimson); }
.stat--pickem  { --accent: var(--ember); grid-column: 1 / -1; padding: 18px 18px 16px; }
.stat--pickem .stat__value { font-size: clamp(26px, 3vw, 34px); }
.count-flash { text-shadow: 0 0 16px var(--ember-glow); }

/* ---------- 8. Stage controls ---------- */
.stage-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 24px;
  flex-wrap: wrap;
}
.stage-tabs, .view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
}
.stage-tab, .advance-button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 16px;
  border: 0; border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.stage-tab:hover, .advance-button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.stage-tab.active { background: var(--ember); color: #160a02; box-shadow: 0 0 18px -6px var(--ember-glow); }
.advance-button { color: var(--ember); }
.advance-button.active { background: rgba(255, 138, 46, 0.16); color: var(--ember-soft); }
.stage-label-short { display: none; }

.view-switcher button {
  width: 36px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.view-switcher button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.view-switcher .active { background: rgba(70, 210, 255, 0.14); color: var(--cyan); }

/* ---------- 9. Matchup shell ---------- */
.matchup-shell { display: block; }

.matchup-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.matchup-header__title h2 {
  margin: 8px 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.01em;
}
.matchup-header__title p { margin: 0; color: var(--muted); font-size: 13px; }
.matchup-controls { display: flex; align-items: center; gap: 9px; }
.pick-count {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ember-soft);
  background: rgba(255, 138, 46, 0.06);
}

/* ---------- 10. Swiss round board ---------- */
.swiss-round-board {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 4px 2px 22px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(255, 138, 46, 0.5) rgba(255, 255, 255, 0.04);
}
.round-column {
  flex: 1 0 188px;
  min-width: 178px;
  scroll-snap-align: start;
  display: grid;
  align-content: start;
  gap: 10px;
}
.round-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1px 6px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--line-faint);
  text-align: left;
}
.round-heading h3 {
  grid-column: 1;
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.pool-label {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.round-heading .pool-count {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-size: 10px;
  color: var(--faint);
}
.round-stack { display: grid; gap: 9px; }

.round-flow-arrow {
  flex: 0 0 16px;
  align-self: center;
  display: grid;
  place-items: center;
  color: rgba(255, 138, 46, 0.55);
  font-size: 16px;
}
.round-flow-arrow span { text-shadow: 0 0 10px var(--ember-glow); }

.empty-round {
  min-height: 78px;
  display: grid; place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 8px;
}

/* match card */
.swiss-match-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, rgba(28, 22, 16, 0.7), rgba(16, 13, 10, 0.7));
  overflow: hidden;
  transition: transform .18s var(--ease), border-color .2s, box-shadow .2s;
}
.swiss-match-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--line-strong);
}
.swiss-match-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 14px 30px -16px rgba(0,0,0,.8); }

.locked-match::before { background: var(--mint); }
.fixture-match::before { background: var(--gold); }
.fixture-match { border-color: rgba(245, 196, 81, 0.28); }
.fixture-match:hover { border-color: rgba(245, 196, 81, 0.55); box-shadow: 0 0 22px -10px rgba(245,196,81,.5); }
.advance-card::before { background: var(--mint); }
.advance-card { border-color: rgba(78, 230, 168, 0.4); }
.elimination-card::before { background: var(--crimson); }
.elimination-card { border-color: rgba(255, 84, 104, 0.4); }

.match-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px 4px 11px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(245, 196, 81, 0.07);
  border-bottom: 1px solid var(--line-faint);
}
.advance-card .match-ribbon { color: var(--mint); background: rgba(78, 230, 168, 0.08); }
.elimination-card .match-ribbon { color: var(--crimson); background: rgba(255, 84, 104, 0.08); }
.match-ribbon strong { font-size: 12px; letter-spacing: 0; }

.match-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: stretch;
  min-height: 56px;
}
.team-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 6px;
  min-width: 0;
  border: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--team, #2a2118) 16%, transparent), transparent);
  color: var(--ink);
  text-align: center;
  font: inherit;
  cursor: default;
}
.pick-slot { cursor: pointer; transition: background .18s; }
.pick-slot:hover, .pick-slot:focus-visible {
  background: linear-gradient(180deg, color-mix(in srgb, var(--team, var(--ember)) 30%, transparent), transparent);
}
.team-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.10), transparent 55%),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.team-logo { width: 30px; height: 30px; object-fit: contain; display: block; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.team-logo + .team-fallback { display: none; }
.team-fallback {
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 11px;
  color: var(--ink);
}
.team-name {
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #d8d2c8;
}
.winner-slot .team-name { color: var(--ink); }
.winner-slot { background: linear-gradient(180deg, color-mix(in srgb, var(--team, var(--mint)) 34%, transparent), transparent); }
.winner-slot::after {
  content: "";
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  width: 16px; height: 2px; border-radius: 2px;
  background: var(--team, var(--mint));
}
.loser-slot { opacity: 0.6; }
.loser-slot .team-name { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.3); }

.match-score {
  display: grid;
  place-items: center;
  background: rgba(6, 5, 4, 0.55);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.02em;
  border-left: 1px solid var(--line-faint);
  border-right: 1px solid var(--line-faint);
}
.has-winner .match-score { color: var(--mint); }
.fixture-match .match-score { color: var(--faint); font-size: 11px; }

.match-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 9px;
  border-top: 1px solid var(--line-faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---- view-mode variants ---- */
.view-minimal .match-card-meta,
.view-minimal .pool-label { display: none; }
.view-minimal .round-stack { gap: 6px; }
.view-minimal .team-name { display: none; }
.view-minimal .match-card-body { min-height: 46px; }

.view-bracket .round-flow-arrow { font-size: 22px; color: var(--ember); }
.view-bracket .swiss-match-card.has-winner { box-shadow: 0 0 26px -10px var(--ember-glow); border-color: rgba(255,138,46,.4); }
.view-bracket .round-column { flex-basis: 196px; }

.view-classic .round-column { flex-basis: 232px; min-width: 210px; }
.view-classic .match-card-body { grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); }
.view-classic .team-slot { flex-direction: row; gap: 8px; padding: 9px 10px; justify-content: flex-start; }
.view-classic .team-name { font-size: 11.5px; }
.view-classic .match-card-meta { font-size: 9.5px; }

/* ---------- 11. Pick'em objectives ---------- */
.pickem-dock {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(255, 90, 31, 0.06), transparent 50%),
    var(--glass);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.section-label h2,
.section-label h3 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.objectives__summary { display: flex; gap: 8px; flex-wrap: wrap; }
.tally {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: 0.1em;
}
.tally--locked { color: var(--mint); background: var(--mint-fill); border-color: rgba(78,230,168,.3); }
.tally--alive  { color: var(--cyan); background: var(--cyan-fill); border-color: rgba(70,210,255,.3); }
.tally--broken { color: var(--crimson); background: var(--crimson-fill); border-color: rgba(255,84,104,.3); }

.objectives__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 1px;
  background: var(--line-faint);
}
.objective {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  background: rgba(14, 11, 8, 0.6);
  transition: background .2s;
}
.objective:hover { background: rgba(22, 17, 12, 0.7); }
.objective::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--st, var(--faint));
}
.objective[data-st="locked"] { --st: var(--mint); }
.objective[data-st="alive"]  { --st: var(--cyan); }
.objective[data-st="broken"] { --st: var(--crimson); }
.objective[data-st="missing"] { --st: var(--faint); }

.objective__head { display: flex; align-items: center; gap: 10px; }
.objective__logo {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  flex: none;
}
.objective__logo img { width: 32px; height: 32px; object-fit: contain; }
.objective__id { display: grid; gap: 2px; min-width: 0; }
.objective__team {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.objective__tags { display: flex; align-items: center; gap: 6px; }
.cat-badge {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}
.tier-badge { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--faint); }

.objective__st {
  margin-left: auto;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--st);
  color: var(--st);
  background: color-mix(in srgb, var(--st) 12%, transparent);
}

.objective__body { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }

.gauge { position: relative; width: 64px; height: 64px; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: rgba(255, 255, 255, 0.06); stroke-width: 3; }
.gauge__fill  { fill: none; stroke: var(--st, var(--ember)); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray .9s var(--ease); }
.gauge__val {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-weight: 800; font-size: 14px;
  color: var(--ink);
}
.gauge__cap { font-size: 9px; color: var(--muted); letter-spacing: 0.04em; }

.dist { display: grid; gap: 7px; min-width: 0; padding-right: 2px; }
.dist__cap { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 1px; }
.dist__row { display: grid; grid-template-columns: 42px 1fr 40px; gap: 10px; align-items: center; font-family: var(--font-mono); font-size: 10px; }
.dist__key { color: var(--muted); letter-spacing: 0.04em; }
.dist__val { text-align: right; color: var(--ink); }
.bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--cyan); width: 0; transition: width .9s var(--ease); }
.dist__row[data-k="advance"] .bar > span { background: var(--mint); }
.dist__row[data-k="3-0"] .bar > span { background: var(--gold); }
.dist__row[data-k="0-3"] .bar > span { background: var(--crimson); }

.objective__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.votes-wrap { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); }
.votes { display: inline-flex; gap: 2px; align-items: center; }
.votes i { width: 6px; height: 12px; border-radius: 1px; background: rgba(255,255,255,.12); display: inline-block; }
.votes i.on { background: var(--st, var(--ember)); }
.objective__next { color: var(--muted); text-align: right; }
.objective__next b { color: var(--st, var(--ember)); }

.pickem-empty { padding: 22px 20px; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

/* ---------- 12. Standings board ---------- */
.standings-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 6px;
}
.record-group {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}
.record-group .section-label { padding: 13px 15px; }
.record-group .section-label h3 { margin: 0; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-family: var(--font-mono); }
.group-count {
  font-family: var(--font-mono); font-weight: 800; font-size: 15px;
  width: 30px; height: 26px; display: grid; place-items: center;
  border-radius: var(--r-sm); border: 1px solid var(--line);
}
.record-group[data-grp="advanced"] .group-count { color: var(--mint); border-color: rgba(78,230,168,.3); }
.record-group[data-grp="live"] .group-count { color: var(--cyan); border-color: rgba(70,210,255,.3); }
.record-group[data-grp="eliminated"] .group-count { color: var(--crimson); border-color: rgba(255,84,104,.3); }

.team-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px 15px;
  border-top: 1px solid var(--line-faint);
}
.team-row:first-of-type { border-top: 0; }
.team-row__logo { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 5px; background: rgba(255,255,255,.03); overflow: hidden; }
.team-row__logo img { width: 22px; height: 22px; object-fit: contain; }
.team-row__id { display: grid; gap: 3px; min-width: 0; }
.team-row__name { font-family: var(--font-display); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 14px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); }
.pips i.w { background: var(--mint); }
.pips i.l { background: var(--crimson); }
.status-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.team-row[data-status="advanced"] .status-pill { color: var(--mint); border-color: rgba(78,230,168,.3); background: var(--mint-fill); }
.team-row[data-status="alive"] .status-pill { color: var(--cyan); border-color: rgba(70,210,255,.3); background: var(--cyan-fill); }
.team-row[data-status="eliminated"] .status-pill { color: var(--crimson); border-color: rgba(255,84,104,.3); background: var(--crimson-fill); }
.team-row[data-status="eliminated"] .team-row__name { opacity: .6; }
.record-empty { padding: 14px 15px; color: var(--faint); font-family: var(--font-mono); font-size: 11px; }

/* ---------- 13. Future stage + bracket ---------- */
.future-stage-page { display: grid; place-items: center; padding: 18px 0; }
.future-stage-card {
  position: relative;
  width: min(760px, 100%);
  display: grid;
  gap: 14px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(70, 210, 255, 0.28);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(70, 210, 255, 0.08), transparent 55%),
    var(--glass);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--shadow-panel);
  text-align: left;
}
.future-stage-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); }
.future-stage-card h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 3.4vw, 32px); }
.future-stage-card p { margin: 0; color: var(--muted); line-height: 1.65; max-width: 60ch; }
.future-stage-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--faint); font-family: var(--font-mono); }

.bracket-round { border-top: 1px solid var(--line); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.panel-head h1, .panel-head h2, .panel-head h3, .panel-head p { margin: 0; }
.panel-head h2 { font-family: var(--font-display); font-size: 18px; }
.match-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 12px 16px; border-top: 1px solid var(--line-faint);
}
.match-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.winner-button {
  height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03); color: var(--ink);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.winner-button:hover { border-color: rgba(255, 138, 46, 0.5); background: rgba(255, 138, 46, 0.06); }

/* ---------- 14. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(8, 7, 6, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-footer__inner {
  width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 28px;
  align-items: center;
  padding: 26px clamp(14px, 3vw, 32px) 32px;
}
.site-footer__brand { display: flex; align-items: center; gap: 11px; color: var(--ember); }
.site-footer__brand strong { display: block; font-family: var(--font-display); color: var(--ink); font-size: 14px; letter-spacing: 0.02em; }
.site-footer__brand .muted { font-size: 11px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-self: end; }
.site-footer__links a {
  color: var(--muted); text-decoration: none; font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.08em; transition: color .2s;
}
.site-footer__links a:hover { color: var(--ember); }
.site-footer__note { grid-column: 1 / -1; margin: 6px 0 0; font-size: 11px; line-height: 1.6; font-family: var(--font-mono); letter-spacing: 0.02em; color: var(--faint); }

/* ---------- 15. Tooltip ---------- */
.tip {
  position: fixed;
  z-index: 9500;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: rgba(16, 13, 10, 0.96);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.8);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.tip.is-on { opacity: 1; transform: translateY(0); }
.tip .mono { color: var(--ember-soft); }

/* ---------- 16. Reveal / focus ---------- */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 2px; }
.game-tab.active:focus-visible,
.stage-tab.active:focus-visible { outline-color: var(--ink); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 17. Keyframes ---------- */
@keyframes pulse      { to { box-shadow: 0 0 0 9px rgba(78, 230, 168, 0); } }
@keyframes pulse-gold { to { box-shadow: 0 0 0 9px rgba(245, 196, 81, 0); } }
@keyframes pulse-red  { to { box-shadow: 0 0 0 9px rgba(255, 84, 104, 0); } }
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ---------- 18. Scrollbars ---------- */
.swiss-round-board::-webkit-scrollbar { height: 8px; }
.swiss-round-board::-webkit-scrollbar-track { background: rgba(255,255,255,.03); }
.swiss-round-board::-webkit-scrollbar-thumb { background: rgba(255, 138, 46, 0.4); border-radius: 4px; }

/* ---------- 18b. PREDICT mode (majors.im-style simulator) ---------- */
.mode-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
}
.mode-tab {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.mode-tab:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.mode-tab.active { background: var(--ember); color: #160a02; box-shadow: 0 0 18px -6px var(--ember-glow); }
.mode-tab.active:focus-visible { outline-color: var(--ink); }

.tag-real { color: var(--mint); font-weight: 700; }
.tag-sim { color: var(--gold); font-weight: 700; }

.match-ribbon strong.ribbon-src { font-size: 10px; letter-spacing: 0.12em; }
.ribbon-src.src-real { color: var(--mint); }
.ribbon-src.src-sim { color: var(--gold); }
.predict-card.is-decider { border-color: rgba(245, 196, 81, 0.34); }
.predict-card .match-card-meta { display: flex; }

/* terminal columns */
.term-column { flex: 0 0 198px; min-width: 186px; }
.term-column .round-heading h3 { font-family: var(--font-display); letter-spacing: 0.06em; }
.term-advanced .round-heading h3 { color: var(--mint); }
.term-eliminated .round-heading h3 { color: var(--crimson); }

.term-chip {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, color-mix(in srgb, var(--team, #2a2118) 14%, transparent), transparent);
}
.term-chip[data-status="advanced"] { border-left-color: var(--mint); }
.term-chip[data-status="eliminated"] { border-left-color: var(--crimson); opacity: 0.82; }
.term-chip__logo { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; background: rgba(255, 255, 255, 0.03); overflow: hidden; }
.term-chip__logo img { width: 20px; height: 20px; object-fit: contain; }
.term-chip__name { font-family: var(--font-display); font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term-chip__rec { font-size: 11px; padding: 3px 7px; }
.term-chip[data-status="advanced"] .term-chip__rec { color: var(--mint); border-color: rgba(78, 230, 168, 0.3); background: var(--mint-fill); }
.term-chip[data-status="eliminated"] .term-chip__rec { color: var(--crimson); border-color: rgba(255, 84, 104, 0.3); background: var(--crimson-fill); }

/* predict cards: both teams always pickable -> show names a touch larger */
.predict-board .team-slot { padding: 7px 6px; }

/* the predict board always overflows (5 rounds + 2 terminal cols) — fade the
   right edge at all widths to signal horizontal scroll */
.predict-board {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 36px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 36px), transparent 100%);
}

.predict-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.predict-legend .lg-real { color: var(--mint); }
.predict-legend .lg-sim { color: var(--gold); }

/* ---------- 19. Responsive ---------- */
@media (max-width: 1080px) {
  .command-hero { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .standings-board { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { gap: 10px; min-height: 60px; }
  .brand__type, .event-meta, .event-chevron, .signal, .appbar-actions { display: none; }
  .event-title-short { display: inline; }
  .event-select { margin: 0; padding: 0 10px; gap: 8px; }
  .mobile-menu-button { display: grid; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .matchup-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__links { justify-self: start; }
  .swiss-round-board {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 30px), transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 30px), transparent 100%);
  }
}
@media (max-width: 460px) {
  .stat-grid { grid-template-columns: 1fr; }
  .objectives__grid { grid-template-columns: 1fr; }
  .round-column { flex-basis: 72vw; min-width: 72vw; }
}

/* ---------- 20b. Arctic theme (accent swap) ---------- */
body.theme-arctic {
  --ember:      #4f8cff;
  --ember-deep: #2f6fe0;
  --ember-soft: #9ec2ff;
  --ember-glow: rgba(79, 140, 255, 0.45);
}
body.theme-arctic .atmosphere__glow--ember {
  background: radial-gradient(circle, rgba(79, 140, 255, 0.15), transparent 62%);
}

/* ---------- 20. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .atmosphere__canvas { display: none; }
}

/* ===== PREDICT selector — majors.im interaction feel ===== */
.predict-board.has-trace .predict-card:not(.is-traced) {
  opacity: .3;
  filter: saturate(.35);
  transition: opacity .18s ease, filter .18s ease;
}
.predict-card.is-traced {
  outline: 1px solid var(--team, #ff8a2e);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--team, #ff8a2e), 0 6px 24px rgba(0, 0, 0, .4);
  transition: box-shadow .18s ease, outline-color .18s ease;
}
.predict-card.is-actionable { position: relative; }
.predict-card.is-actionable::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(110, 231, 168, .28);
  animation: predict-pulse 2.4s ease-in-out infinite;
}
@keyframes predict-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(110, 231, 168, .14); }
  50% { box-shadow: 0 0 0 1px rgba(110, 231, 168, .5); }
}
.predict-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  max-width: min(92vw, 540px);
  padding: 10px 16px;
  background: rgba(10, 12, 16, .92);
  border: 1px solid rgba(255, 138, 46, .4);
  border-radius: 10px;
  color: #f4f6f8;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  z-index: 60;
  transition: opacity .2s ease, transform .2s ease;
}
.predict-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .predict-card.is-actionable::after { animation: none; }
  .predict-board.has-trace .predict-card:not(.is-traced),
  .predict-card.is-traced,
  .predict-toast { transition: none; }
}
