:root {
  --bg-0: #060911;
  --bg-1: #0c1220;
  --bg-2: #121a2d;
  --bg-3: #19243d;
  --border: rgba(148, 163, 184, 0.16);
  --border-bright: rgba(56, 189, 248, 0.42);
  --text-0: #f8fafc;
  --text-1: #cbd5e1;
  --text-2: #8899b5;
  --accent: #22d3ee;
  --accent-2: #38bdf8;
  --blue: #3b82f6;
  --red: #ef4444;
  --green: #22c55e;
  --gold: #f59e0b;
  --purple: #a855f7;
  --radius: 10px;
  --radius-sm: 6px;
  --font-ui: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "Cascadia Code", "Consolas", monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 18% 0%, #0f1b35 0%, var(--bg-0) 55%);
  color: var(--text-0);
  font-family: var(--font-ui);
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  color: var(--text-0);
}

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: #263452; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #384d78; }

/* Loading */
.loading-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}
.brand-pulse {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  background: linear-gradient(90deg, var(--accent), #818cf8, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* App Shell — Broadcast Esports Cockpit Theme */
.shell {
  display: grid;
  grid-template-columns: 224px 1fr;
  grid-template-rows: 66px 1fr;
  min-height: 100vh;
}

.topbar {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, rgba(11, 18, 34, 0.98), rgba(7, 12, 24, 0.96));
  backdrop-filter: blur(12px);
  border-bottom: 1.5px solid rgba(34, 211, 238, 0.42);
  box-shadow: 0 2px 24px rgba(34, 211, 238, 0.12);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.club-title-top {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.club-sub-top {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Center Trapezoid Neon Emblem Notch */
.topbar-notch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 28px 8px;
  margin-bottom: -14px;
  background: linear-gradient(180deg, #0b1529, #07101f);
  border-left: 1.5px solid rgba(34, 211, 238, 0.55);
  border-right: 1.5px solid rgba(34, 211, 238, 0.55);
  border-bottom: 2px solid var(--accent);
  clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%);
  box-shadow: 0 8px 26px rgba(34, 211, 238, 0.25);
  min-width: 112px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.brand-badge {
  font-weight: 900;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid var(--border-bright);
  color: var(--accent);
}
.club-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.86rem;
  font-weight: 700;
}
.club-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ==================== 3-COLUMN COCKPIT (AFFINITY MATRIX + RADAR + WEEKLY PLANNER) ==================== */
.cockpit-3 {
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.92fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}
.cockpit-panel {
  background: linear-gradient(180deg, rgba(16, 26, 46, 0.94), rgba(9, 15, 29, 0.97));
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

/* Affinity Matrix (5 LoL starters connected by SVG duo lines) */
.affinity-stage {
  position: relative;
  flex: 1;
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 2px;
}
.affinity-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.affinity-row {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.affinity-row.center-row {
  justify-content: center;
}
.affinity-card {
  width: 46%;
  max-width: 215px;
  background: linear-gradient(180deg, rgba(18, 30, 52, 0.96), rgba(10, 17, 32, 0.98));
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
}
.affinity-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.affinity-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.35);
  background: linear-gradient(180deg, rgba(22, 42, 72, 0.98), rgba(10, 19, 36, 0.98));
}
.affinity-card.compared {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.3);
}
.aff-mini-bar {
  height: 5px;
  border-radius: 99px;
  background: var(--bg-0);
  overflow: hidden;
  margin-top: 2px;
}
.aff-mini-bar > div { height: 100%; border-radius: 99px; }

/* Radar Bars */
.radar-stat-row {
  display: grid;
  grid-template-columns: 112px 1fr 34px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.8rem;
}
.radar-bar-track {
  height: 11px;
  border-radius: 4px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  overflow: hidden;
}
.radar-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.28s ease;
}

/* Weekly Visual Planner (Colored Day Blocks like Reference UI!) */
.planner-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.planner-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: stretch;
}
.planner-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-2);
  text-transform: uppercase;
  background: rgba(10, 16, 30, 0.8);
  border: 1px solid var(--border);
  border-radius: 7px;
}
.planner-block {
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: filter 0.14s ease, transform 0.14s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.planner-block:hover { filter: brightness(1.14); transform: translateX(2px); }
.planner-block.scrim { background: linear-gradient(135deg, #7e22ce, #581c87); }
.planner-block.vod { background: linear-gradient(135deg, #0284c7, #0369a1); }
.planner-block.soloq { background: linear-gradient(135deg, #c2410c, #9a3412); }
.planner-block.kayak { background: linear-gradient(135deg, #059669, #047857); }
.planner-block.media { background: linear-gradient(135deg, #be185d, #9d174d); }
.planner-block.rest { background: linear-gradient(135deg, #334155, #1e293b); }
.planner-block-title { font-weight: 800; font-size: 0.85rem; color: #fff; }
.planner-block-sub { font-size: 0.72rem; color: rgba(255, 255, 255, 0.82); margin-top: 2px; }

.btn-neon-cta {
  width: 100%;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid #67e8f9;
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
  color: #04101c;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
  transition: all 0.15s ease;
  margin-top: 12px;
}
.btn-neon-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.65);
}

/* Visual Dashboard Hero Strip & Objective Tiles */
.dash-hero-bar {
  background: linear-gradient(120deg, rgba(16, 28, 52, 0.96), rgba(9, 15, 28, 0.96));
  border: 1px solid var(--border);
  border-left: 4px solid var(--team-col, var(--accent));
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.dash-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dash-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dash-pills-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.dash-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  color: var(--text-1);
}
.dash-pill.accent {
  border-color: var(--border-bright);
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
}
.dash-pill.info {
  cursor: help;
  color: var(--accent-2);
  border-style: dashed;
}
.obj-tile {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.obj-tile.done {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.06);
}
.obj-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

@media (max-width: 1260px) {
  .cockpit-3 { grid-template-columns: 1fr; }
}
.meta-chip {
  font-size: 0.82rem;
  color: var(--text-1);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.meta-chip strong { color: var(--text-0); }
.meta-chip.fearless { border-color: rgba(245, 158, 11, 0.5); color: #fcd34d; }

.sidebar {
  background: rgba(11, 17, 31, 0.88);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-2);
  padding: 12px 10px 4px;
  font-weight: 700;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-1);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.nav-btn:hover { background: var(--bg-2); color: var(--text-0); }
.nav-btn.active {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), rgba(56, 189, 248, 0.04));
  border-color: var(--border-bright);
  color: var(--accent);
}
.nav-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
}
.nav-badge.cyan { background: rgba(34, 211, 238, 0.2); color: var(--accent); border: 1px solid var(--border-bright); }

.main {
  padding: 22px 26px 40px;
  max-width: 1460px;
  width: 100%;
  margin: 0 auto;
}

/* Broadcast Cards & Grids */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.page-sub {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 0.9rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-main-side { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; }

.card {
  background: linear-gradient(180deg, rgba(18, 26, 45, 0.92), rgba(12, 18, 32, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
}

.kpi-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.kpi-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-2); }
.kpi-val { font-size: 1.5rem; font-weight: 800; margin-top: 4px; font-family: var(--font-mono); }
.kpi-sub { font-size: 0.78rem; color: var(--text-2); margin-top: 3px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text-0);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}
.btn:hover:not(:disabled) { border-color: var(--border-bright); transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border-color: rgba(34, 211, 238, 0.6);
  color: #fff;
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.25);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-success {
  background: linear-gradient(135deg, #16a34a, #059669);
  border-color: rgba(34, 197, 94, 0.5);
}
.btn-danger {
  background: linear-gradient(135deg, #dc2626, #be123c);
  border-color: rgba(239, 68, 68, 0.5);
}
.btn-gold {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: rgba(245, 158, 11, 0.6);
}
.btn-sm { padding: 6px 11px; font-size: 0.8rem; }

/* Inputs & Selects */
.input, .select {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-0);
  font-size: 0.88rem;
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 0.78rem; color: var(--text-2); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: middle;
}
tr:hover td { background: rgba(56, 189, 248, 0.05); }
tr.highlight-row td { background: rgba(34, 211, 238, 0.11); }

/* Tags, Badges, Perks */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.73rem;
  font-weight: 700;
  background: var(--bg-3);
  border: 1px solid var(--border);
}
.tag.pos { background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.4); color: #86efac; }
.tag.neg { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.tag.mix { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.4); color: #fcd34d; }
.tag.legend {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.15));
  border-color: rgba(245, 158, 11, 0.7);
  color: #fde68a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}
.tag.mythic {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.32), rgba(236, 72, 153, 0.24), rgba(34, 211, 238, 0.28));
  border-color: #facc15;
  color: #fffbeb;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.45);
}
.tag.role { background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.35); color: #7dd3fc; font-family: var(--font-mono); }

/* Instant Rich Hover Tooltip Portal for Perks (viewport-clamped, never clipped!) */
.perk-badge {
  cursor: help;
}
.perk-tip-portal {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: calc(100vw - 24px);
  background: #090e1a;
  border: 1px solid var(--border-bright);
  border-radius: 9px;
  padding: 11px 13px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.78);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease;
  text-align: left;
  white-space: normal;
  line-height: 1.4;
}
.perk-tip-portal.visible {
  opacity: 1;
  visibility: visible;
}
.perk-tip-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-0);
  margin-bottom: 4px;
}
.perk-tip-impact {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 5px;
}
.perk-tip-desc {
  font-size: 0.74rem;
  color: var(--text-2);
  font-weight: 400;
}

.ovr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 3px 7px;
  border-radius: 6px;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.ovr-s { background: rgba(245, 158, 11, 0.22); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.55); }
.ovr-a { background: rgba(34, 211, 238, 0.18); color: #67e8f9; border: 1px solid rgba(34, 211, 238, 0.5); }
.ovr-b { background: rgba(34, 197, 94, 0.16); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.4); }
.ovr-c { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; border: 1px solid var(--border); }

/* Progress bars */
.bar { height: 7px; border-radius: 99px; background: var(--bg-0); overflow: hidden; border: 1px solid var(--border); }
.bar > div { height: 100%; border-radius: 99px; transition: width 0.25s ease; }

/* Match Banner */
.match-hero {
  background: linear-gradient(125deg, rgba(59, 130, 246, 0.18), rgba(12, 18, 32, 0.95) 50%, rgba(239, 68, 68, 0.18));
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.vs-team { display: flex; align-items: center; gap: 12px; }
.team-crest {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.95rem;
  color: #060911;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Broadcast Draft Stage */
.draft-stage {
  display: grid;
  grid-template-columns: 270px 1fr 270px;
  gap: 14px;
  align-items: start;
}
.draft-column {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.draft-column.blue { border-top: 3px solid var(--blue); }
.draft-column.red { border-top: 3px solid var(--red); }

.draft-bans {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.ban-slot {
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--text-2);
}
.ban-slot img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(70%) brightness(0.65); }
.ban-slot.active-slot { border-color: var(--gold); box-shadow: 0 0 12px rgba(245, 158, 11, 0.5); }

.pick-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 58px;
}
.pick-slot.active-slot { border-color: var(--accent); box-shadow: 0 0 14px rgba(34, 211, 238, 0.35); }
.pick-slot img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); }

.champ-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  max-height: 440px;
  overflow-y: auto;
  padding: 4px;
}
.champ-tile {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
}
.champ-tile:hover:not(.disabled) { border-color: var(--accent); transform: translateY(-2px); }
.champ-tile.selected { border-color: var(--gold); background: rgba(245, 158, 11, 0.16); }
.champ-tile.disabled { opacity: 0.22; cursor: not-allowed; filter: grayscale(100%); }
.champ-tile img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; display: block; margin: 0 auto 4px; }
.champ-tile .cname { font-size: 0.72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.champ-tile .cmeta { font-size: 0.65rem; color: var(--text-2); font-family: var(--font-mono); }

/* Analyst Media Cards (OTP / Skyyart / Trayton / Zaboutine / Public) */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.analyst-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  border-top: 3px solid var(--accent);
}
.analyst-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.analyst-note {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--bg-0);
}
.analyst-quote {
  font-size: 0.87rem;
  line-height: 1.48;
  color: var(--text-1);
  margin: 0;
}

/* Setup Wizard */
.setup-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}
.team-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px;
}
.team-card-pick {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.14s ease;
}
.team-card-pick:hover { border-color: var(--border-bright); }
.team-card-pick.selected { border-color: var(--accent); background: rgba(34, 211, 238, 0.12); box-shadow: 0 0 14px rgba(34, 211, 238, 0.2); }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab-btn {
  padding: 7px 13px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.tab-btn.active { background: rgba(34, 211, 238, 0.16); border-color: var(--accent); color: var(--accent); }

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-box {
  background: var(--bg-1);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  max-width: 740px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
}

#toast-root {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-2);
  border: 1px solid var(--border-bright);
  color: var(--text-0);
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  max-width: 420px;
}
.toast.err { border-color: var(--red); }
.toast.ok { border-color: var(--green); }

/* Gold graph container */
.gold-graph-box {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

/* ==================== TOURNAMENT BRACKET VIEW ==================== */
.tournament-hero {
  border-radius: 12px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border: 1px solid var(--border-bright);
}
.tournament-hero.playoffs {
  background: linear-gradient(125deg, rgba(56, 189, 248, 0.18), rgba(12, 18, 32, 0.96) 55%, rgba(168, 85, 247, 0.2));
}
.tournament-hero.intl {
  background: linear-gradient(125deg, rgba(245, 158, 11, 0.22), rgba(12, 18, 32, 0.96) 55%, rgba(34, 211, 238, 0.22));
  border-color: rgba(245, 158, 11, 0.55);
}

.bracket-tree {
  display: flex;
  gap: 24px;
  align-items: stretch;
  min-width: 780px;
  padding: 12px 4px;
}
.bracket-col {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
}
.bracket-col-title {
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  padding: 6px 10px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 14px;
  text-align: center;
}
.bracket-col.active-col .bracket-col-title {
  color: var(--accent);
  border-color: var(--border-bright);
  background: rgba(34, 211, 238, 0.1);
}
.bracket-col-matches {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 14px;
}
.bracket-match {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.bracket-match.user-match {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.22);
}
.bracket-match.tbd { opacity: 0.6; border-style: dashed; }
.bracket-match-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  background: rgba(25, 36, 61, 0.7);
  color: var(--text-2);
}
.bracket-match.user-match .bracket-match-meta { color: var(--accent); }
.bracket-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.85rem;
}
.bracket-team.winner { background: rgba(34, 197, 94, 0.12); font-weight: 800; color: #fff; }
.bracket-team.loser { opacity: 0.55; }
.bt-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bt-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-score {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 0.92rem;
  min-width: 18px;
  text-align: right;
}
.trophy-col { max-width: 210px; }
.trophy-box {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(12, 18, 32, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 22px 14px;
  text-align: center;
}
.trophy-box.crowned {
  border-color: #f59e0b;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.3);
}

/* ==================== BROADCAST CELEBRATION & ENTRY OVERLAY ==================== */
.bcast-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  animation: bcastFadeIn 0.35s ease forwards;
}
.bcast-overlay.bcast-leaving {
  animation: bcastFadeOut 0.24s ease forwards;
}
.bcast-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 28, 56, 0.92) 0%, rgba(4, 7, 15, 0.97) 75%);
  backdrop-filter: blur(8px);
}
.bcast-sweep {
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(115deg, transparent 42%, rgba(34, 211, 238, 0.16) 50%, transparent 58%);
  animation: bcastSweep 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}
.bcast-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.bcast-spark {
  position: absolute;
  bottom: -14px;
  width: 6px;
  height: 14px;
  border-radius: 99px;
  opacity: 0;
  animation: bcastSparkRise 2.6s ease-out infinite;
}
.bcast-card {
  position: relative;
  z-index: 2;
  max-width: 580px;
  width: 100%;
  text-align: center;
  padding: 34px 30px 28px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 28, 52, 0.96), rgba(8, 13, 25, 0.98));
  border: 2px solid var(--bcast-accent, #22d3ee);
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.26), 0 24px 60px rgba(0, 0, 0, 0.7);
  animation: bcastPopIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.bcast-eyebrow {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bcast-accent, #22d3ee);
  margin-bottom: 16px;
}
.bcast-crest-ring {
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  border-radius: 22px;
  padding: 5px;
  background: linear-gradient(135deg, var(--bcast-accent), var(--team-accent));
  box-shadow: 0 0 36px rgba(34, 211, 238, 0.45);
  animation: bcastPulse 1.8s ease-in-out infinite;
}
.bcast-crest {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.55rem;
  color: #060911;
}
.bcast-title {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #fff, var(--bcast-accent, #22d3ee), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bcast-loc {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fcd34d;
  margin-bottom: 10px;
}
.bcast-sub {
  margin: 0 0 18px;
  color: var(--text-1);
  font-size: 0.94rem;
  line-height: 1.5;
}
.bcast-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.bcast-cta {
  padding: 12px 30px;
  font-size: 0.98rem;
}

@keyframes bcastFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bcastFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes bcastPopIn {
  0% { opacity: 0; transform: scale(0.84) translateY(24px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes bcastSweep {
  0% { transform: translateX(-70%); opacity: 0.9; }
  100% { transform: translateX(70%); opacity: 0; }
}
@keyframes bcastPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes bcastSparkRise {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  15% { opacity: 0.95; }
  100% { transform: translateY(-92vh) rotate(260deg); opacity: 0; }
}

.help-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--text-2);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.35);
  cursor: help;
  vertical-align: middle;
  transition: all 0.14s ease;
  flex-shrink: 0;
  user-select: none;
}
.help-dot:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.16);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.32);
}

@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .draft-stage { grid-template-columns: 1fr; }
  .grid-main-side, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
