/* ==========================================================================
   CheekyStats — coach site design system
   ========================================================================== */

:root {
  --bg: #090b0f;
  --bg-elev: #10141b;
  --bg-elev-2: #161b24;
  --bg-elev-3: #1c222d;
  --line: rgba(255,255,255,0.07);
  --line-strong: rgba(255,255,255,0.14);
  --text: #eef2f6;
  --muted: rgba(238,242,246,0.62);
  --faint: rgba(238,242,246,0.38);
  --accent: #5e9bfc;
  --accent-soft: rgba(94,155,252,0.14);
  --green: #3dd68c;
  --green-soft: rgba(61,214,140,0.14);
  --red: #f07178;
  --red-soft: rgba(240,113,120,0.14);
  --amber: #f5c451;
  --amber-soft: rgba(245,196,81,0.14);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", "Segoe UI", "SF Pro Display", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", "Fira Code", monospace;
  --rail: 212px;
  --dock: 400px;
  --control-h: 34px;
  --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 10px 30px -18px rgba(0,0,0,0.8);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--sticky-h, 64px) + 12px); }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(94,155,252,0.07), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(61,214,140,0.05), transparent 55%),
    var(--bg);
  min-height: 100vh;
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01", "tnum";
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.26); background-clip: padding-box; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.92em; }

/* --------------------------------------------------------------------------
   Layout + rail
   -------------------------------------------------------------------------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 22px 64px; }
.wrap:has(.topbar) {
  margin-left: var(--rail);
  margin-right: 0;
  max-width: none;
  width: auto;
  padding: 20px 28px 72px;
}
body.review-open .wrap:has(.topbar) { padding-bottom: calc(var(--dock) + 28px); }

.topbar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail);
  display: flex; flex-direction: column; align-items: stretch;
  gap: 14px; margin: 0; padding: 20px 12px 16px;
  background: linear-gradient(180deg, #0b0e13, #090b0f);
  border-right: 1px solid var(--line);
  z-index: 20;
}
.brand {
  font-weight: 800; letter-spacing: 0.14em; font-size: 0.86rem;
  color: var(--text); text-decoration: none; padding: 4px 10px 12px;
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--green); }
.game-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  margin: 0 4px 2px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
.game-switch-btn {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 4px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}
.game-switch-btn:hover { color: var(--text); text-decoration: none; background: rgba(255,255,255,0.04); }
.game-switch-btn.on { color: var(--text); background: var(--green-soft); }
.game-hint {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 10px 8px;
}
.topbar nav { display: flex; flex-direction: column; gap: 2px; align-items: stretch; flex: 1; }
.nav-group {
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); padding: 12px 10px 4px;
}
nav a.navlink {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); padding: 8px 10px; border-radius: 9px;
  text-decoration: none; font-size: 0.9rem; font-weight: 500;
}
nav a.navlink .nv { font-style: normal; width: 16px; text-align: center; color: var(--faint); font-size: 0.8rem; }
nav a.navlink:hover { color: var(--text); background: rgba(255,255,255,0.04); text-decoration: none; }
nav a.navlink.active { color: var(--text); background: var(--green-soft); font-weight: 600; }
nav a.navlink.active .nv { color: var(--green); }
.topbar form { margin-top: 8px; }
.topbar .btn.ghost { width: 100%; font-size: 0.82rem; padding: 8px 12px; }

/* --------------------------------------------------------------------------
   Cards, text
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card.tight { padding: 12px 14px; }
.card.hero { padding: 18px 18px 14px; }

h1 { font-size: 1.6rem; margin: 0 0 6px; letter-spacing: -0.025em; font-weight: 750; }
h2 {
  font-size: 0.74rem; margin: 0 0 12px; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 750; text-transform: uppercase;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.good { color: var(--green); }
.bad { color: var(--red); }
.mid { color: var(--amber); }
.kicker {
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 750; margin: 0 0 8px;
}
.kicker.good { color: var(--green); }
.kicker.bad { color: var(--red); }
.lede, .hint { color: var(--muted); margin: 6px 0 0; font-size: 0.9rem; }
.band {
  margin: 20px 0 10px; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faint); font-weight: 750; display: flex; align-items: center; gap: 10px;
}
.band::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.grid { display: grid; gap: 12px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* KPI tiles */
.stat {
  background: var(--bg-elev-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0;
}
.stat .label {
  display: block; color: var(--muted); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat strong {
  display: block; margin-top: 3px; font-size: 1.28rem; letter-spacing: -0.03em; font-weight: 750;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.stat strong small { display: block; font-size: 0.68rem; color: var(--faint); font-weight: 600; letter-spacing: 0.02em; margin-top: 1px; }
.stat strong.good { color: var(--green); }
.stat strong.bad { color: var(--red); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin-bottom: 12px; }
.kpi-row .stat { margin: 0; }

/* --------------------------------------------------------------------------
   Analytics hero + segmented control + toolbar
   -------------------------------------------------------------------------- */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin: 0 0 14px;
}
.hero-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hero-id .kicker { margin-bottom: 2px; }
.hero-name { margin: 0; font-size: 1.75rem; line-height: 1.05; letter-spacing: -0.03em; }
.hero-sub { color: var(--muted); font-size: 0.86rem; margin-top: 4px; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo { width: 22px; height: 22px; object-fit: contain; flex: 0 0 auto; }
.logo.md { width: 40px; height: 40px; }
.logo.lg { width: 56px; height: 56px; }
.logo.xl { width: 64px; height: 64px; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.5)); }

.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px;
  background: var(--bg-elev-2); border: 1px solid var(--line);
}
.seg-item {
  padding: 7px 14px; border-radius: 8px; font-size: 0.84rem; font-weight: 600;
  color: var(--muted); text-decoration: none; line-height: 1;
}
.seg-item:hover { color: var(--text); text-decoration: none; }
.seg-item.is-on { background: var(--bg-elev-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 2px 8px rgba(0,0,0,0.35); }
.seg-item.is-on::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 99px; background: var(--team, var(--green)); margin-right: 8px; vertical-align: 1px; }

.cdl-toggle {
  height: var(--control-h); padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: transparent;
  color: var(--muted); font-weight: 800; letter-spacing: 0.1em;
  font-size: 0.7rem; text-decoration: none;
  display: inline-flex; align-items: center;
}
.cdl-toggle.on { background: var(--green-soft); color: var(--green); border-color: rgba(61,214,140,0.45); }
.cdl-toggle:hover { text-decoration: none; color: var(--text); }

/* Follow = bookmark a map for VOD review */
.head-toggles { display: flex; gap: 8px; align-items: center; }
.follow-toggle {
  height: var(--control-h); padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: transparent;
  color: var(--muted); font-weight: 800; letter-spacing: 0.1em;
  font-size: 0.7rem; text-decoration: none; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
}
.follow-toggle svg { fill: currentColor; }
.follow-toggle .count { font-family: var(--mono); letter-spacing: 0; opacity: 0.8; }
.follow-toggle.on { background: var(--amber-soft); color: var(--amber); border-color: rgba(245,196,81,0.45); }
.follow-toggle:hover { text-decoration: none; color: var(--text); }
.follow-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font: inherit; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--muted);
}
.follow-btn svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.follow-btn:hover { color: var(--text); border-color: var(--amber); }
.follow-btn.is-on { background: var(--amber-soft); color: var(--amber); border-color: rgba(245,196,81,0.45); }
.follow-btn.is-on svg { fill: currentColor; }
.follow-btn:disabled { opacity: 0.6; cursor: progress; }
a.scorecard { position: relative; overflow: hidden; }
.sc-bookmark {
  position: absolute; top: -1px; right: 14px; width: 14px; height: 20px;
  background: var(--amber);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters a.btn { width: auto; text-decoration: none; }
.filters select { width: auto; min-width: 140px; padding: 8px 10px; }

.filters.toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px;
  padding: 12px 14px; margin: 0 0 14px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tb-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding-right: 14px; border-right: 1px solid var(--line); }
.tb-group:last-of-type { border-right: 0; }
.tb-hill .field > span { color: var(--green); }
.field { display: flex; flex-direction: column; gap: 3px; }
.field > span { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 800; }
.filters.toolbar select, .filters.toolbar input[type=date] {
  height: var(--control-h); min-width: 0; width: auto; padding: 0 28px 0 10px; font-size: 0.84rem;
  background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px; background-repeat: no-repeat;
}
.filters.toolbar input[type=date] { background-image: none; padding-right: 10px; color-scheme: dark; font-family: var(--mono); font-size: 0.78rem; }
.filters.toolbar select:hover, .filters.toolbar input:hover { border-color: var(--line-strong); }
.filters.toolbar select:focus, .filters.toolbar input:focus { outline: 2px solid rgba(94,155,252,0.5); outline-offset: 1px; border-color: transparent; }
.filters.toolbar select[name=team] { font-weight: 650; min-width: 150px; }
.is-derived input[type=date] { opacity: 0.55; }
.is-derived input[type=date]:hover, .is-derived input[type=date]:focus { opacity: 1; }
.toggle {
  display: inline-flex; align-items: center; gap: 8px; height: var(--control-h); padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--bg-elev-2); cursor: pointer;
  font-size: 0.82rem; color: var(--muted); user-select: none;
}
.toggle:hover { color: var(--text); border-color: var(--line-strong); }
.toggle input { appearance: none; -webkit-appearance: none; width: 26px; height: 14px; border-radius: 99px; background: #2a313c; position: relative; margin: 0; cursor: pointer; transition: background 0.15s; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 99px; background: #fff; transition: transform 0.15s; }
.toggle input:checked { background: var(--green); }
.toggle input:checked::after { transform: translateX(12px); }
.toggle:has(input:checked) { color: var(--text); border-color: rgba(61,214,140,0.45); }
.tb-reset { margin-left: auto; height: var(--control-h); padding: 0 14px; font-size: 0.8rem; align-self: flex-end; }

/* Sticky tools: toolbar + section chips travel with the page */
.sticky-sentinel { height: 1px; margin-top: -1px; }
.sticky-tools {
  position: sticky; top: 0; z-index: 6;
  margin: 0 -28px 14px; padding: 8px 28px 0;
  background: var(--bg);
  transition: box-shadow 0.15s;
}
.sticky-tools.is-stuck {
  box-shadow: 0 1px 0 var(--line), 0 14px 28px -16px rgba(0,0,0,0.85);
}
.sticky-tools .filters.toolbar { margin-bottom: 0; }
.sticky-tools.is-stuck .filters.toolbar { padding-top: 8px; padding-bottom: 8px; border-radius: 10px; }
.sticky-tools.is-stuck .field > span { display: none; }
.sticky-tools.is-stuck .tb-group, .sticky-tools.is-stuck .filters.toolbar { align-items: center; }
.sticky-tools.is-stuck .tb-reset { align-self: center; }
.sticky-tools .rail-chips { position: static; margin: 0; padding: 6px 0 8px; background: none; }

/* Section rail (sticky jump chips) */
.rail-chips, .jump-chips {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; position: sticky; top: 0; z-index: 5;
  padding: 10px 0 8px;
  background: linear-gradient(to bottom, var(--bg) 78%, transparent);
}
.rail-chips a, .jump-chips a {
  font-size: 0.74rem; font-weight: 650; color: var(--muted); text-decoration: none;
  padding: 6px 11px; border-radius: 99px; border: 1px solid transparent;
}
.rail-chips a:hover, .jump-chips a:hover, .rail-chips a.is-on { color: var(--text); background: var(--bg-elev-2); border-color: var(--line); text-decoration: none; }

.block { margin: 0 0 28px; scroll-margin-top: calc(var(--sticky-h, 64px) + 12px); }
#players-by-hill { scroll-margin-top: calc(var(--sticky-h, 64px) + 12px); }
.block-title {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-size: 1.05rem; font-weight: 750; letter-spacing: -0.02em; color: var(--text);
  text-transform: none; margin: 0 0 10px;
}
.block-title small { font-size: 0.78rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.empty-state { text-align: left; padding: 24px 22px; }
.empty-state p { margin: 4px 0 0; }

/* --------------------------------------------------------------------------
   Scoreline, badges, tables, buttons, inputs
   -------------------------------------------------------------------------- */
.scoreline { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0 8px; flex-wrap: wrap; }
.scoreline .team { font-size: 1.15rem; font-weight: 650; min-width: 100px; }
.scoreline .team.right { text-align: right; }
.scoreline .nums { font-family: var(--mono); font-size: 2.4rem; font-weight: 700; letter-spacing: -0.04em; }
.scoreline .nums .sep { color: var(--faint); margin: 0 8px; }
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase;
}
.badge.mode { background: var(--accent-soft); color: var(--accent); }
.badge.win { background: var(--green-soft); color: var(--green); }
.badge.loss { background: var(--red-soft); color: var(--red); }
.badge.draw { background: var(--amber-soft); color: var(--amber); }
.pill-p {
  display: inline-block; font-family: var(--mono); font-size: 0.68rem; font-weight: 700; padding: 1px 6px;
  border-radius: 5px; background: rgba(255,255,255,0.07); color: var(--muted); margin-left: 4px; vertical-align: 1px;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: rgba(94,155,252,0.06); }
table.dense { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.dense th { text-align: left; color: var(--faint); font-weight: 750; font-size: 0.66rem; letter-spacing: 0.1em; padding: 6px 8px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
table.dense td { padding: 7px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.dense tbody tr:hover td { background: rgba(255,255,255,0.025); }
table.dense tbody tr:last-child td { border-bottom: 0; }
table.dense .num, table.dense th.num { text-align: right; }
table.dense td a { color: inherit; }
table.dense td a:hover { color: var(--accent); text-decoration: none; }
table.sortable th { cursor: pointer; user-select: none; }
table.sortable th:hover { color: var(--text); }
table.sortable th.sort-asc::after { content: " ↑"; color: var(--green); }
table.sortable th.sort-desc::after { content: " ↓"; color: var(--green); }
td.heat-pos { background: color-mix(in srgb, var(--green) calc(var(--h) * 100%), transparent); }
td.heat-neg { background: color-mix(in srgb, var(--red) calc(var(--h) * 100%), transparent); }
.heat-table td.heat { font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--heat-c, var(--green)) calc(var(--h, 0) * 100%), transparent); }
.heat-table tr.is-you td { box-shadow: inset 2px 0 0 var(--green); background: rgba(61,214,140,0.05); }
.table-scroll { overflow-x: auto; }
td .hbar.bare { margin: 0 0 2px; }
td .rec { font-size: 0.75rem; color: var(--muted); }
.cell-win { color: var(--green); font-weight: 700; }
.cell-loss { color: #fca5a5; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border: 0;
  border-radius: 9px; padding: 9px 14px; font-weight: 650;
  cursor: pointer; font-size: 0.88rem; font-family: inherit;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--text); }
.btn.ghost:hover { background: rgba(255,255,255,0.04); }
.btn.block { width: 100%; }

input[type=password], input[type=text], select {
  width: 100%; padding: 11px 13px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--bg-elev-2);
  color: var(--text); font-size: 0.95rem; font-family: inherit;
}
input:focus, select:focus { outline: 2px solid rgba(94,155,252,0.45); border-color: transparent; }
.error { color: #ff8b8b; margin: 10px 0 0; font-size: 0.9rem; }
.login-box { max-width: 400px; margin: 10vh auto; }

/* --------------------------------------------------------------------------
   Auth (login / invite)
   -------------------------------------------------------------------------- */
body.auth-body {
  background:
    radial-gradient(900px 520px at 50% -20%, rgba(61,214,140,0.10), transparent 58%),
    radial-gradient(700px 400px at 100% 110%, rgba(94,155,252,0.06), transparent 50%),
    var(--bg);
}
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 36px 32px 28px;
  background: rgba(16,20,27,0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 80px -36px rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.04) inset;
}
.auth-brand {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--text);
  margin: 0 0 28px;
}
.auth-brand span { color: var(--green); }
.auth-card h1 {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.auth-lede {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 0.95rem;
  line-height: 1.4;
}
.auth-hint {
  margin: -12px 0 22px;
  font-size: 0.82rem;
  color: var(--faint);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.auth-field > span {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
}
.auth-field input {
  height: 42px;
  padding: 0 13px;
}
.auth-submit {
  width: 100%;
  height: 42px;
  margin-top: 4px;
  background: var(--green);
  color: #07140d;
  font-weight: 750;
  border-radius: 10px;
}
.auth-submit:hover { filter: brightness(1.05); }
.auth-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--red-soft);
  color: #ffb4b8;
  font-size: 0.86rem;
}
.auth-foot {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--faint);
}
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px 22px; }
}

.split { display: grid; grid-template-columns: minmax(280px, 1.35fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
.split-2, .split-bottom { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; }
.split-bottom { grid-template-columns: 0.7fr 1.3fr; }
.duo-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.player-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .scoreline .nums { font-size: 1.9rem; } }
@media (max-width: 640px) { .player-cols { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .duo-tables { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Charts
   -------------------------------------------------------------------------- */
.chart-box { height: 220px; position: relative; }
.chart-box.tall { height: 220px; margin-bottom: 8px; }
.chart-box.scatter { height: 440px; }
.chart-box.line { height: 280px; }
@media (max-width: 980px) { .chart-box.scatter { height: 360px; } }
.chart-pan { display: flex; align-items: center; gap: 12px; margin-top: 8px; user-select: none; }
.chart-pan-range {
  position: relative; flex: 1; height: 28px;
  touch-action: none; cursor: pointer;
}
.chart-pan-track {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 4px; margin-top: -2px;
  background: var(--bg-elev-3); border-radius: 99px;
}
.chart-pan-fill {
  position: absolute; top: 0; height: 100%;
  background: var(--accent); border-radius: 99px;
}
.chart-pan-thumb {
  position: absolute; top: 50%;
  width: 16px; height: 16px;
  margin: 0; padding: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #eef2f6;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(94,155,252,0.18);
  cursor: grab;
  z-index: 2;
}
.chart-pan-thumb.is-drag { cursor: grabbing; z-index: 4; box-shadow: 0 0 0 5px rgba(94,155,252,0.28); }
.chart-pan-label { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 9.5em; text-align: right; }

/* --------------------------------------------------------------------------
   Analytics extras: compare mode, flow table, hill notes, CSV, shortcuts
   -------------------------------------------------------------------------- */
.kbd-hint { color: var(--faint); font-size: 0.72rem; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.kbd-hint kbd {
  font-family: var(--mono); font-size: 0.66rem; padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--line-strong); background: var(--bg-elev-2); color: var(--muted);
}
.copy-link { height: var(--control-h); padding: 0 12px; font-size: 0.8rem; }
.copy-link.is-done { color: var(--green); border-color: rgba(61,214,140,0.45); }

.cmp-note { color: var(--muted); font-size: 0.86rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmp-tag {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 750; font-size: 0.8rem; letter-spacing: 0.01em;
  padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--text);
}
.cmp-tag::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--team, var(--green)); }
.cmp-tag.them::before { background: var(--them, var(--red)); }
.kicker .cmp-tag { text-transform: none; letter-spacing: 0; vertical-align: middle; }
.kpi-row.cmp { grid-template-columns: 150px repeat(auto-fit, minmax(110px, 1fr)); }
.kpi-row.cmp .stat.who { border-left: 3px solid var(--team, var(--green)); }
.kpi-row.cmp .stat.who strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-row.cmp.them .stat.who { border-left-color: var(--them, var(--red)); }
.cmp-band::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--team, var(--green)); }
.cmp-band.them::before { background: var(--them, var(--red)); }
.cmp-band small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--faint); }
.cmp-side { margin-top: 20px; padding-top: 6px; border-top: 1px dashed var(--line-strong); }
.cmp-pair .card > .cmp-tag { margin-bottom: 8px; }
@media (max-width: 980px) { .kpi-row.cmp { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); } }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.card-head .kicker { margin: 0; }
.seg.sm { padding: 2px; border-radius: 8px; }
.seg.sm .seg-item { padding: 5px 10px; font-size: 0.74rem; border-radius: 6px; }
.seg.sm .seg-item.is-on::before { width: 5px; height: 5px; margin-right: 6px; }

.flow-table td small { font-weight: 500; }
.flow-table .pill-p { margin: 0; }

.holds-table .row-actions { white-space: nowrap; display: flex; gap: 6px; justify-content: flex-end; }
.holds-table .note-toggle { background: transparent; cursor: pointer; font-family: inherit; color: var(--muted); border-color: var(--line-strong); }
.holds-table .note-toggle:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.note-row.is-empty { display: none; }
.note-row td { padding-top: 0 !important; border-top: 0 !important; }
.hill-notes { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.hill-notes li {
  display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text);
  padding: 4px 8px; border-left: 2px solid var(--amber); background: rgba(245,196,81,0.07); border-radius: 0 6px 6px 0;
}
.hill-notes .note-body { flex: 1; min-width: 0; }
.hill-notes .note-del { background: transparent; border: 0; color: var(--faint); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 4px; }
.hill-notes .note-del:hover { color: var(--red); }
.note-form { display: flex; gap: 6px; margin: 4px 0 6px; }
.note-form input[type=text] { padding: 6px 10px; font-size: 0.84rem; }
.note-form .btn { width: auto; padding: 6px 12px; font-size: 0.8rem; }

.csv-btn {
  margin-left: auto; cursor: pointer; font-family: var(--mono); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--muted); background: transparent; border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 7px;
  text-transform: uppercase;
}
.csv-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.kicker.has-csv, .block-title.has-csv { display: flex; align-items: center; gap: 10px; }
.card-head.has-csv .csv-btn { margin-left: 0; }
.csv-btn.csv-float { float: right; margin: 0 0 6px 8px; }

.load-more { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 8px; }
.load-more .btn { width: auto; text-decoration: none; }

/* --------------------------------------------------------------------------
   Legacy coach filters (Scrims / Scout / Vetoes / Film)
   -------------------------------------------------------------------------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.page-head h1 { margin: 0; font-size: 1.6rem; }
.identity { display: flex; align-items: center; gap: 10px; }
.coach-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: end; margin-bottom: 14px; }
.coach-filters label { display: flex; flex-direction: column; gap: 4px; color: var(--faint); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 800; }
.coach-filters select, .coach-filters input {
  width: auto; min-width: 140px; max-width: 220px; height: var(--control-h);
  background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: 0.84rem;
}
.coach-filters input[type=date] { color-scheme: dark; font-family: var(--mono); font-size: 0.78rem; }
.coach-filters .btn { align-self: end; margin-left: auto; height: var(--control-h); padding: 0 14px; font-size: 0.8rem; }
.coach-filters .check { flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 0.85rem; color: var(--text); height: var(--control-h); font-weight: 500; }
.coach-filters .cdl-toggle { align-self: end; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.85rem; }
.form-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.strip-hint { margin: 0 0 10px; }
.widget-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.widget-top .kicker { margin: 0; }
.mode-tabs, .section-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.mode-tabs a.navlink, .section-tabs a.navlink { display: inline-block; color: var(--muted); padding: 8px 12px; border-radius: 999px; text-decoration: none; }
.mode-tabs a.navlink.active, .section-tabs a.navlink.active, .mode-tabs a.navlink:hover, .section-tabs a.navlink:hover { color: var(--text); background: var(--bg-elev-2); text-decoration: none; }
.section-tabs { margin-bottom: 14px; }
.section-tabs .navlink { font-size: 0.82rem; padding: 6px 10px; }
.callouts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.callout { background: var(--accent-soft); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; }
.series-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.map-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border-radius: 999px; padding: 4px 10px; font-size: 0.78rem; background: var(--bg-elev-2); border: 1px solid var(--line); }
.pill.win { background: var(--green-soft); color: var(--green); }
.pill.loss { background: var(--red-soft); color: #fca5a5; }
select.veto-map { width: auto; min-width: 140px; padding: 6px 8px; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 12px; }

/* Team bar (Dashboard) */
.team-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.team-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.team-chip {
  width: 40px; height: 40px; border-radius: 11px; padding: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; transition: transform 0.12s;
}
.team-chip img { width: 26px; height: 26px; object-fit: contain; }
.team-chip.active { border-color: var(--team, var(--green)); box-shadow: inset 0 0 0 1px var(--team, var(--green)), 0 0 0 3px color-mix(in srgb, var(--team, var(--green)) 18%, transparent); }
.team-chip:hover { text-decoration: none; background: var(--bg-elev-2); transform: translateY(-1px); }
.amateur-pick { margin: 0; }
.amateur-pick select { width: 200px; height: 40px; padding: 0 12px; }
.sc-id { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sc-side.right .sc-id { flex-direction: row-reverse; }

/* Dashboard mode cards, sparks */
.spark { flex: 1; min-width: 180px; width: auto; height: 72px; display: block; }
.squares { display: flex; gap: 4px; margin-top: 0; }
.sq { width: 16px; height: 16px; border-radius: 4px; background: #2a313c; }
.sq.W { background: var(--green); }
.sq.L { background: var(--red); }
.sq.D { background: var(--amber); }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.mode-card .rec { font-size: 1.35rem; font-weight: 750; letter-spacing: -0.03em; }
.mode-card .pct { font-size: 1.35rem; font-weight: 750; }
.mode-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.best { margin: 8px 0 12px; color: var(--muted); font-size: 0.88rem; }
.map-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Horizontal bars */
.hbar { display: grid; grid-template-columns: minmax(96px, 148px) minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 9px 0; }
.hbar.bare { grid-template-columns: 1fr; margin: 8px 0; }
.hbar .name { font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .track { height: 10px; background: rgba(255,255,255,0.07); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; background: var(--green); }
.hbar .fill.bad { background: var(--red); }
.hbar .fill.neutral { background: var(--accent); }
.hbar .rec { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.78rem; min-width: 64px; text-align: right; }

/* Scorecards */
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
a.scorecard {
  display: block; text-decoration: none; color: inherit;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; border-left: 3px solid #2a313c;
}
a.scorecard:hover { text-decoration: none; border-color: var(--line-strong); background: var(--bg-elev-2); }
a.scorecard.is-win { border-left-color: var(--green); }
a.scorecard.is-loss { border-left-color: var(--red); }
.sc-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; }
.sc-mid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 10px; }
.sc-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-side.right { text-align: right; align-items: flex-end; }
.sc-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.sc-num { font-family: var(--mono); font-size: 1.45rem; font-weight: 720; letter-spacing: -0.03em; }
.sc-vs { color: var(--faint); font-size: 0.75rem; }
.sc-date { margin-top: 8px; color: var(--faint); font-size: 0.78rem; }

/* Scout duels */
.duel { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; align-items: end; }
.duel-head { display: flex; flex-direction: column; gap: 8px; text-align: left; margin: 0; }
.duel-head strong { display: block; font-size: 1.35rem; letter-spacing: -0.03em; line-height: 1; }
.duel-head span { color: var(--muted); font-size: 0.78rem; }
.duel-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; align-items: end; margin: 0; }
.duel-col { width: auto; text-align: center; }
.pair { display: flex; gap: 5px; align-items: flex-end; justify-content: center; height: 132px; width: 100%; }
.pair i { display: block; flex: none; width: 16px; border-radius: 4px 4px 2px 2px; min-height: 3px; }
.pair i.you { background: var(--you, var(--green)); }
.pair i.them { background: var(--them, #3a4250); }
.duel-col .lbl { margin-top: 4px; font-size: 0.75rem; color: var(--muted); }
.duel-col .sub { font-size: 0.72rem; line-height: 1.3; }
.legend { display: flex; gap: 14px; justify-content: flex-end; color: var(--muted); font-size: 0.78rem; margin: 0; }
.legend b { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.legend b.you { background: var(--you, var(--green)); }
.legend b.them { background: var(--them, #3a4250); }
.duo { display: flex; gap: 28px; }
.duo strong { display: block; font-size: 1.35rem; letter-spacing: -0.03em; line-height: 1; }
.duo span { color: var(--muted); font-size: 0.8rem; }
@media (max-width: 980px) {
  .mode-grid, .map-cols { grid-template-columns: 1fr; }
  .duel { grid-template-columns: 1fr; }
  .duel-head { flex-direction: row; gap: 20px; }
}

/* Folds */
.fold { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 0 18px; }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; font-weight: 650; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); flex: 0 0 auto; margin-left: 8px; }
.fold[open] > summary::after { transform: rotate(-135deg); margin-top: 6px; }
.fold-title { letter-spacing: -0.01em; }
.fold-hint { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 0.85rem; text-align: right; }
.fold-body { padding: 0 0 16px; }
.filters-fold { margin-bottom: 16px; }
.filters-fold .filters { margin-bottom: 14px; }

/* --------------------------------------------------------------------------
   Scrim strip, map strip, minis
   -------------------------------------------------------------------------- */
.scrim-row { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 10px; }
.scrim { position: relative; flex: 0 0 132px; width: 132px; border-radius: 10px; background: var(--bg-elev-2); border: 1px solid var(--line); }
.scrim.is-on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.scrim-hit { display: block; color: inherit; text-decoration: none; }
.scrim-hit:hover { text-decoration: none; color: inherit; }
.scrim-actions { display: flex; gap: 4px; margin: 0 8px 8px; }
.vod-btn {
  display: block; flex: 1; margin: 0; text-align: center; text-decoration: none;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
  color: var(--green); border: 1px solid rgba(61,214,140,0.4); border-radius: 6px; padding: 3px 0;
}
.vod-btn:hover { background: rgba(61,214,140,0.16); text-decoration: none; }
.vod-btn.is-review { background: rgba(61,214,140,0.22); color: var(--green); }
.vod-btn.inline { display: inline-block; margin: 0; padding: 1px 7px; }
.scrim-date, .scrim-opp { padding: 6px 8px 0; font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrim-opp { color: var(--text); font-weight: 650; padding-top: 2px; }
.scrim-score { margin: 6px 8px 0; border-radius: 6px; text-align: center; font-weight: 750; padding: 6px 0; background: #2a313c; }
.scrim.is-win .scrim-score { background: rgba(61,214,140,0.28); color: #d8ffe9; }
.scrim.is-loss .scrim-score { background: rgba(240,113,120,0.28); color: #ffd8db; }
.scrim.is-split .scrim-score { background: rgba(245,196,81,0.22); }
.scrim-kd { margin: 6px 8px 8px; background: #222833; border-radius: 6px; text-align: center; font-size: 0.78rem; color: var(--muted); padding: 4px 0; }
.scrim-tip {
  display: none; position: fixed; z-index: 40; width: 240px;
  background: #161b24; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45); font-size: 0.82rem;
}
.scrim:hover .scrim-tip, .scrim:focus-within .scrim-tip { display: block; }
.scrim-tip ul { margin: 6px 0 0; padding-left: 16px; }
.scrim-tip li { margin: 2px 0; }

.map-strip { display: flex; gap: 18px; align-items: stretch; padding: 14px 16px; }
.map-stat { min-width: 190px; position: sticky; left: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; background: transparent; z-index: 1; padding-right: 16px; border-right: 1px solid var(--line); }
.map-stat strong { font-size: 1.15rem; letter-spacing: -0.02em; }
.map-stat-line { color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; font-size: 0.86rem; }
.map-stat-hint { color: var(--faint); margin-top: 8px; font-size: 0.72rem; }
.score-strip { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; flex: 1; padding-bottom: 6px; }
.mini {
  display: flex; flex-direction: column; flex: 0 0 auto; min-width: 118px; text-decoration: none; color: inherit;
  background: var(--bg-elev-2); border-radius: 9px; padding: 8px; border: 1px solid var(--line); font-size: 0.75rem; gap: 1px;
  border-top: 2px solid #2a313c;
}
.mini.is-win { border-top-color: var(--green); }
.mini.is-loss { border-top-color: var(--red); }
.mini.is-on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.mini-hit { display: flex; flex-direction: column; gap: 1px; color: inherit; text-decoration: none; min-width: 0; }
.mini-hit span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-hit:hover { text-decoration: none; color: inherit; }
.mini .scrim-actions { margin: 6px 0 0; }
.mini .vod-btn { margin: 0; }
.mini-map { font-size: 0.84rem; letter-spacing: -0.01em; }
.mini-score { font-variant-numeric: tabular-nums; font-weight: 750; font-family: var(--mono); font-size: 0.82rem; }
.mini.is-win .mini-score { color: var(--green); }
.mini.is-loss .mini-score { color: var(--red); }
.mini:hover { text-decoration: none; border-color: var(--line-strong); }

/* Mode boards */
.hp-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp-card { margin-bottom: 0; }
.hp-card .hbar { grid-template-columns: 56px minmax(0, 1fr) 64px; gap: 8px; margin: 6px 0; }
.hp-card .hbar .name { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.hp-head { color: var(--text); font-size: 1.3rem; font-weight: 750; letter-spacing: -0.03em; margin: 0 0 2px; font-variant-numeric: tabular-nums; }
.hp-note { margin: 0 0 10px; color: var(--faint); font-size: 0.74rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dbar { display: grid; grid-template-columns: 56px minmax(0, 1fr) 64px; gap: 8px; align-items: center; margin: 6px 0; }
.dbar .name { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.dtrack { position: relative; height: 12px; background: rgba(255,255,255,0.07); border-radius: 99px; }
.dtrack::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.3); }
.dfill { position: absolute; top: 2px; bottom: 2px; border-radius: 99px; }
.dfill.pos { left: 50%; background: var(--green); }
.dfill.neg { right: 50%; background: var(--red); }
.dbar .rec, .hp-card .rec { text-align: right; }
@media (max-width: 1280px) { .hp-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 980px) {
  .split-2, .split-bottom, .hp-pair { grid-template-columns: 1fr; display: grid; }
  .hp-top { grid-template-columns: 1fr; }
  .map-strip { flex-direction: column; }
  .map-stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 10px; }
}

/* --------------------------------------------------------------------------
   Film page
   -------------------------------------------------------------------------- */
.moment-btn { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--text); padding: 11px 12px; cursor: pointer; font: inherit; }
.moment-btn:hover { background: rgba(94,155,252,0.08); }
.moment-list { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.film-card { padding: 16px 16px 14px; }
.film-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin-bottom: 12px; flex-wrap: wrap; }
.film-help { margin: 4px 0 0; color: var(--faint); font-size: 0.78rem; }
.film-help kbd { font-family: var(--mono); font-size: 0.72rem; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); }
.film-filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.film-filters button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 0.75rem; cursor: pointer; }
.film-filters button.is-on { color: var(--green); background: var(--green-soft); border-color: transparent; }
.film { display: grid; grid-template-columns: minmax(320px, 1.15fr) minmax(420px, 1fr); gap: 16px; align-items: start; }
.film-stage { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.film-race-wrap { display: flex; flex-direction: column; gap: 4px; }
.film-race { height: 92px; cursor: pointer; border-radius: 10px; background: #0c1016; border: 1px solid var(--line); }
.race-tick { stroke: rgba(255,255,255,0.16); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.race-marks { position: relative; height: 16px; }
.race-mark { position: absolute; top: 0; transform: translateX(-50%); border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 0.68rem; font-weight: 750; letter-spacing: 0.04em; line-height: 1; padding: 0; cursor: pointer; }
.race-mark.static { cursor: default; }
.race-mark.edge-start { transform: none; }
.race-mark.edge-end { transform: translateX(-100%); }
.race-mark:hover, .race-mark.is-live { color: var(--text); }
.race-hit { fill: transparent; cursor: pointer; }
.race-hit:hover { fill: rgba(255,255,255,0.04); }
#film-playhead { stroke: var(--accent); stroke-width: 2; pointer-events: none; }
.film-transport { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.film-now { grid-column: 1; grid-row: 1; font-family: var(--mono); font-weight: 720; min-width: 52px; font-variant-numeric: tabular-nums; }
.film-where { grid-column: 2 / 4; grid-row: 1; color: var(--muted); font-size: 0.75rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.film-transport input { grid-column: 1 / 3; grid-row: 2; width: 100%; padding: 8px 10px; }
.film-transport .btn { grid-column: 3; grid-row: 2; padding: 8px 12px; }
.film-notes { display: flex; flex-direction: column; gap: 6px; max-height: 168px; overflow: auto; }
.film-empty-notes { margin: 0; color: var(--faint); font-size: 0.78rem; }
.film-note { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.film-note-jump { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; align-items: start; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.film-note-jump:hover, .film-note.is-on .film-note-jump { border-color: var(--accent); }
.film-note-time { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }
.film-note-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 0.84rem; }
.film-note-tag { color: var(--faint); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 700; }
.film-note-author { color: var(--muted); font-size: 0.72rem; font-weight: 600; }
.film-note-del { border: 0; background: transparent; color: var(--faint); font: inherit; font-size: 0.72rem; cursor: pointer; padding: 4px; }
.film-note-del:hover { color: var(--red); }
.film-board { min-width: 0; max-height: min(78vh, 760px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: #0c1016; overflow: hidden; }
.film-legend, .film-row { display: grid; grid-template-columns: 118px 1fr 1fr 1fr; }
.film-legend { position: sticky; top: 0; z-index: 1; padding: 8px 8px 6px; font-size: 0.68rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: #0c1016; border-bottom: 1px solid var(--line); }
.film-legend span:not(:first-child), .film-phase, .film-phase.empty { padding-left: 8px; }
.film-scroll { overflow: auto; min-height: 0; flex: 1 1 auto; }
.film-row { border-top: 1px solid var(--line); }
.film-row:first-child { border-top: 0; }
.film-hill, .film-phase, .film-phase.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 92px; padding: 8px; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; border-left: 1px solid var(--line); }
.film-hill { border-left: 0; cursor: pointer; }
.film-phase { cursor: pointer; position: relative; }
.film-phase.empty { justify-content: center; color: var(--faint); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
.film-hill:hover, .film-phase:hover { background: rgba(255,255,255,0.03); }
.film-hill.is-on, .film-phase.is-on { background: rgba(61,214,140,0.10); box-shadow: inset 0 0 0 1px var(--green); }
.film-phase.is-live, .film-hill.is-live { box-shadow: inset 0 -2px 0 var(--accent); }
.film-row.won .film-hill { box-shadow: inset 3px 0 0 var(--green); }
.film-row.lost .film-hill { box-shadow: inset 3px 0 0 var(--red); }
.film-row.is-live { background: rgba(126,182,255,0.05); }
.film-row.is-linked { background: rgba(245,196,81,0.10); outline: 1px solid rgba(245,196,81,0.5); outline-offset: -1px; }
.film-hill-top, .film-phase-top, .film-score-row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 6px; }
.film-id { font-weight: 780; letter-spacing: -0.03em; }
.film-clock { font-family: var(--mono); font-size: 0.78rem; color: var(--text); font-variant-numeric: tabular-nums; }
.film-gain { font-size: 0.75rem; }
.film-gain.opp, .film-phase .opp { color: var(--muted); }
.film-score { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.film-phase .diff, .film-board .hill-diff {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 750; padding: 1px 7px; border-radius: 99px;
  background: rgba(255,255,255,0.10); color: #eef2f6;
}
.film-phase .diff.pos, .film-board .hill-diff.pos { background: rgba(61,214,140,0.28); color: #d8ffe9; }
.film-phase .diff.neg, .film-board .hill-diff.neg { background: rgba(240,113,120,0.28); color: #ffe0e2; }
.share { display: block; width: 100%; height: 4px; margin-top: 4px; border-radius: 99px; background: rgba(240,113,120,0.45); overflow: hidden; }
.share i { display: block; height: 100%; background: var(--green); }
.note-pip { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 0.68rem; font-weight: 750; display: inline-grid; place-items: center; }
.film-filter-empty { margin: 0; padding: 16px; color: var(--muted); }
/* Hill labels are the position in the map's rotation (P1..Pn); R2/R3 marks later passes. */
.film-rot-tag { margin-left: 3px; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.04em; color: var(--amber); vertical-align: top; }
.hill-kdiff { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 99px; font-family: var(--mono); font-size: 0.62rem; font-weight: 750; letter-spacing: 0.02em; color: #eef2f6; background: rgba(255,255,255,0.10); vertical-align: 1px; }
.hill-kdiff.pos { color: #d8ffe9; background: rgba(61,214,140,0.28); }
.hill-kdiff.neg { color: #ffe0e2; background: rgba(240,113,120,0.28); }
.kd-mini { display: inline-block; margin-left: 5px; padding-left: 5px; border-left: 1px solid rgba(255,255,255,0.28); font-size: 0.62rem; font-weight: 700; color: inherit; opacity: 0.95; }
.film-rot-sep { display: flex; align-items: center; gap: 8px; padding: 6px 8px 4px; font-size: 0.66rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,0.04); border-top: 1px solid var(--line); }
.film-rot-sep::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.film-rot-sep + .film-row { border-top: 1px solid var(--line); }
.film-rotations { display: grid; grid-template-columns: minmax(84px, 1.2fr) 1fr 0.7fr 1fr 0.7fr; padding: 6px 8px 8px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.015); }
.film-rot-head, .film-rot { display: contents; }
.film-rot-head span { padding: 2px 4px 4px; font-size: 0.62rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.film-rot > span { display: flex; align-items: center; justify-content: flex-start; min-height: 26px; padding: 2px 4px; font-size: 0.78rem; font-variant-numeric: tabular-nums; border-top: 1px solid rgba(255,255,255,0.05); cursor: pointer; color: var(--text); }
.film-rot:hover > span { background: rgba(255,255,255,0.04); }
.film-rot.is-on > span, .film-rot.is-live > span { background: rgba(94,155,252,0.14); }
.film-rot-name { font-weight: 780; letter-spacing: -0.02em; gap: 6px; color: var(--text); }
.film-rot-name small { font-weight: 600; font-size: 0.66rem; color: var(--muted); letter-spacing: 0; }
.film-rot .hill-diff { font-size: 0.72rem; }
.film-rotations .mono { font-family: var(--mono); }
.race-mark .film-rot-tag { font-size: 0.52rem; color: var(--amber); }

.rot-split-card { margin: 12px 0; }
.rot-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rot-pane {
  background: var(--bg-elev-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.rot-pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rot-pane-head strong { font-size: 0.92rem; letter-spacing: -0.02em; }
.rot-pane-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rot-pane-grid .stat { padding: 8px 10px; }
.rot-pane-grid .stat strong { font-size: 1.08rem; }
.rot-pane-grid .stat small { display: block; margin-top: 2px; color: var(--faint); font-size: 0.68rem; font-weight: 600; }
.cmp-rot { margin-top: 12px; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmp-rot > .kicker { grid-column: 1 / -1; color: var(--them, var(--red)); }
.rot-pane.them { border-left: 3px solid var(--them, var(--red)); }
@media (max-width: 900px) {
  .rot-split, .cmp-rot, .rot-pane-grid { grid-template-columns: 1fr 1fr; }
}
.film-board .moment-btn { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; }
@media (max-width: 980px) {
  .film { grid-template-columns: 1fr; }
  .film-legend, .film-row { grid-template-columns: 92px 1fr 1fr 1fr; }
  .film-board { max-height: 70vh; }
}
.video-frame { position: relative; padding-top: 56.25%; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.video-frame > div, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Clean player: crop YouTube's top/bottom chrome out of view, shield the pointer, own controls. */
.video-frame.clean { background: #000 center / cover no-repeat; }
/* Sized + scaled by charts.js layout(): laid out at 1920px wide so YouTube streams 1080p, cropped to hide its chrome. */
.video-frame.clean iframe { inset: auto; }
.video-frame.clean.is-cued iframe { opacity: 0; }
.video-frame.clean.is-cued .vf-shield::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: rgba(8, 10, 14, 0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M5 3v10l8-5z'/%3E%3C/svg%3E") center / 26px no-repeat;
  border: 1px solid rgba(255,255,255,0.14); transition: transform 0.15s ease, background-color 0.15s ease;
}
.video-frame.clean.is-cued .vf-shield:hover::before { transform: scale(1.06); background-color: rgba(61, 214, 140, 0.85); }
.video-frame.clean .vf-shield {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
  background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer; outline: none;
}
.video-frame.clean .vf-shield:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
/* Windowed: `.vf-wrap` is the 16:9 frame plus an always-visible control row *below* it.
   Fullscreen/theater: wrap fills the viewport and the bar overlays the picture (auto-hide). */
.vf-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow: visible; container-type: inline-size; }
.vf-wrap[hidden] { display: none !important; }
.review-dock .vf-wrap { flex: 1 1 auto; min-height: 0; }
.review-dock .vf-wrap > .video-frame { flex: 1 1 auto; min-height: 0; }
.vf-wrap > .vf-bar {
  position: relative; inset: auto; z-index: 3; flex: 0 0 auto;
  display: flex; align-items: center; gap: 4px; padding: 4px 6px;
  width: auto; height: auto; opacity: 1; pointer-events: auto;
  background: #0c1016; border: 1px solid var(--line); border-radius: 10px;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.vf-wrap > .vf-bar .vf-seek { flex: 1 1 auto; width: auto; min-width: 60px; }
.vf-wrap > .vf-bar .vf-menu-wrap { flex: 0 0 auto; }
/* Overlay chrome — only when the bar is *inside* the 16:9 frame (legacy) or wrap is FS/theater. */
.video-frame.clean .vf-bar {
  position: absolute; inset: auto 10px 10px auto; width: auto; height: auto; z-index: 3;
  display: flex; align-items: center; gap: 4px; padding: 4px;
  background: rgba(8, 10, 14, 0.72); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.18s ease; pointer-events: none;
}
.video-frame.clean:hover .vf-bar, .video-frame.clean.is-awake .vf-bar, .video-frame.clean.is-paused .vf-bar,
.video-frame.clean .vf-bar:focus-within, .video-frame.clean.is-menu-open .vf-bar { opacity: 1; pointer-events: auto; }
.vf-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 6px;
  border: 0; border-radius: 7px; background: transparent; color: #e6e9ef; cursor: pointer;
  font: inherit; font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
}
.vf-btn:hover { background: rgba(255,255,255,0.10); }
.vf-btn svg { width: 14px; height: 14px; fill: currentColor; }
.vf-btn[data-vf=full] svg { width: 15px; height: 15px; }
.vf-btn.vf-skip { position: relative; min-width: 26px; padding: 0 4px; }
.vf-btn.vf-skip svg { width: 15px; height: 15px; }
.vf-btn.vf-skip b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -42%); font-size: 0.5rem; font-weight: 800; line-height: 1; pointer-events: none; }
.vf-btn.vf-skip:active svg { transform: scale(0.88); }
.vf-wrap.is-full .vf-btn.vf-skip svg, .video-frame.clean.is-full .vf-btn.vf-skip svg { width: 20px; height: 20px; }
.vf-wrap.is-full .vf-btn.vf-skip b, .video-frame.clean.is-full .vf-btn.vf-skip b { font-size: 0.62rem; }
.vf-btn.vf-rate { color: var(--amber); }
.vf-btn.vf-quality { color: var(--muted); }
.vf-btn.vf-quality.is-off-target { color: var(--amber); opacity: 0.8; }
.vf-menu-wrap { position: relative; display: inline-flex; }
.vf-menu {
  position: absolute; right: 0; bottom: calc(100% + 10px); min-width: 132px; padding: 6px; z-index: 5;
  background: rgba(8, 10, 14, 0.94); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.vf-menu[hidden] { display: none; }
.vf-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px 7px 8px; border: 0; border-radius: 7px;
  background: transparent; color: #e6e9ef; font: inherit; font-family: var(--mono); font-size: 0.78rem; font-weight: 700;
  text-align: left; cursor: pointer; white-space: nowrap;
}
.vf-menu-item:hover { background: rgba(255,255,255,0.08); }
.vf-menu-item small { color: var(--muted); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em; }
.vf-menu-check { width: 12px; color: var(--green); opacity: 0; font-size: 0.75rem; }
.vf-menu-item.is-on .vf-menu-check { opacity: 1; }
.vf-menu-item.is-on { color: #fff; }
.vf-menu-empty { padding: 8px 10px; color: var(--muted); font-size: 0.72rem; white-space: nowrap; }
.vf-wrap.is-full .vf-menu-item, .video-frame.clean.is-full .vf-menu-item { font-size: 0.9rem; padding: 9px 12px 9px 10px; }
.vf-time { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); padding: 0 4px; white-space: nowrap; }
.vf-seek { position: relative; width: 150px; height: 28px; display: flex; align-items: center; cursor: pointer; touch-action: none; padding: 0 6px; }
.vf-seek-track { position: relative; width: 100%; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.18); transition: height 0.12s ease; }
.vf-seek:hover .vf-seek-track, .vf-seek.is-dragging .vf-seek-track { height: 5px; }
.vf-seek-buf, .vf-seek-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; width: 0; }
.vf-seek-buf { background: rgba(255,255,255,0.22); }
.vf-seek-fill { background: var(--green); }
.vf-seek-knob {
  position: absolute; top: 50%; left: 0; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 2px rgba(8,10,14,0.8); transform: scale(0); transition: transform 0.12s ease;
}
.vf-seek:hover .vf-seek-knob, .vf-seek.is-dragging .vf-seek-knob { transform: scale(1); }
.vf-seek-tip {
  position: absolute; bottom: calc(100% - 2px); left: 0; transform: translateX(-50%);
  padding: 2px 6px; border-radius: 6px; background: rgba(8,10,14,0.92); border: 1px solid rgba(255,255,255,0.1);
  font-family: var(--mono); font-size: 0.66rem; color: #e6e9ef; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.12s ease;
}
.vf-seek:hover .vf-seek-tip, .vf-seek.is-dragging .vf-seek-tip { opacity: 1; }
.vf-wrap.is-full > .vf-bar .vf-seek, .vf-wrap.is-full .vf-seek, .video-frame.clean.is-full .vf-seek { flex: 0 0 auto; width: 320px; }
.vf-wrap.is-full .vf-time, .video-frame.clean.is-full .vf-time { font-size: 0.78rem; }
.vf-wrap.is-full .vf-btn.vf-rate, .vf-wrap.is-full .vf-btn.vf-quality,
.video-frame.clean.is-full .vf-btn.vf-rate, .video-frame.clean.is-full .vf-btn.vf-quality { font-size: 0.8rem; }
.video-frame.clean { container-type: inline-size; }
@container (max-width: 560px) { .vf-seek { width: 90px; } .vf-time { display: none; } }
.vf-wrap:fullscreen, .vf-wrap.is-theater,
.video-frame.clean:fullscreen, .video-frame.clean.is-theater {
  display: flex !important; flex-direction: column; padding: 0; gap: 0;
  width: 100vw; height: 100vh; border: 0; border-radius: 0; background-color: #000;
}
.vf-wrap.is-theater, .video-frame.clean.is-theater { position: fixed; inset: 0; z-index: 1000; }
.vf-wrap:fullscreen .video-frame.clean, .vf-wrap.is-theater .video-frame.clean {
  flex: 1 1 auto; padding-top: 0; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0;
}
html.vf-theater-open { overflow: hidden; }
/* Overlay-on-video bar while the wrap (or frame) is fullscreen/theater. */
.vf-wrap:fullscreen > .vf-bar, .vf-wrap.is-theater > .vf-bar,
.video-frame.clean:fullscreen .vf-bar, .video-frame.clean.is-theater .vf-bar {
  position: absolute; inset: auto 18px 18px auto; width: auto; z-index: 3;
  background: rgba(8, 10, 14, 0.72); border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
.vf-wrap:fullscreen:hover > .vf-bar, .vf-wrap.is-theater:hover > .vf-bar,
.vf-wrap:fullscreen.is-awake > .vf-bar, .vf-wrap.is-theater.is-awake > .vf-bar,
.vf-wrap:fullscreen.is-paused > .vf-bar, .vf-wrap.is-theater.is-paused > .vf-bar,
.vf-wrap:fullscreen.is-menu-open > .vf-bar, .vf-wrap.is-theater.is-menu-open > .vf-bar,
.vf-wrap:fullscreen > .vf-bar:focus-within, .vf-wrap.is-theater > .vf-bar:focus-within { opacity: 1; pointer-events: auto; }
.vf-wrap.is-full .vf-btn, .video-frame.clean.is-full .vf-btn { min-width: 34px; height: 34px; }
.vf-wrap.is-full .vf-btn svg, .video-frame.clean.is-full .vf-btn svg { width: 17px; height: 17px; }
.race-svg { width: 100%; height: 180px; display: block; }
.race-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 0.85rem; color: var(--muted); }
.race-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* Review dock */
.review-dock {
  display: none; position: fixed; left: var(--rail); right: 0; bottom: 0; height: var(--dock); z-index: 30;
  grid-template-columns: minmax(240px, 420px) minmax(0, 1fr); gap: 16px; padding: 12px 16px 14px;
  background: #0c1016; border-top: 1px solid var(--line); box-shadow: 0 -18px 40px rgba(0,0,0,0.4);
}
body.review-open .review-dock { display: grid; }
.review-stage, .review-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.review-dock .video-frame { flex: 1; padding-top: 0; height: auto; min-height: 0; }
.review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review-head .kicker { margin-bottom: 2px; }
.review-head strong { display: block; font-size: 1rem; line-height: 1.25; }
.review-score { font-family: var(--mono); font-size: 1.35rem; font-weight: 720; letter-spacing: -0.03em; margin-top: 2px; }
.review-maps { display: flex; gap: 6px; overflow-x: auto; flex: 0 0 auto; }
.review-map { flex: 0 0 auto; border: 1px solid var(--line); background: var(--bg-elev-2); color: var(--text); border-radius: 8px; padding: 6px 8px; cursor: pointer; font: inherit; text-align: left; }
.review-map.is-on { border-color: var(--green); color: var(--green); }
.review-map small { display: block; color: var(--muted); font-size: 0.72rem; }
.review-map.is-on small { color: inherit; }
.review-dock .moment-list { flex: 1; max-height: none; border: 0; background: transparent; overflow: auto; padding: 0 2px 4px 0; }
.review-dock .moment-btn { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.hill-table { width: 100%; border-collapse: separate; border-spacing: 6px 6px; table-layout: fixed; }
.hill-table th:first-child, .hill-table td:first-child { width: 132px; }
.hill-table thead th { font-size: 0.68rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); text-align: left; padding: 0 8px; }
.hill-name, .phase-cell, .phase-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 72px; text-align: left; font: inherit; color: inherit; background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.hill-name, .phase-cell { cursor: pointer; }
.hill-name { justify-content: center; }
.phase-empty { align-items: center; justify-content: center; color: var(--faint); }
.hill-name:hover, .phase-cell:hover, .hill-name.is-on, .phase-cell.is-on { border-color: var(--green); }
.hill-id { font-weight: 780; font-size: 1rem; letter-spacing: -0.03em; }
.hill-totals, .phase-cell .opp { color: var(--muted); font-size: 0.75rem; }
.hill-top, .phase-top { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; }
.phase-time { font-family: var(--mono); font-size: 0.78rem; color: var(--text); }
.hill-diff, .phase-cell .diff { font-family: var(--mono); font-size: 0.75rem; font-weight: 750; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,0.10); color: #eef2f6; }
.hill-diff.pos, .phase-cell .diff.pos { background: rgba(61,214,140,0.28); color: #d8ffe9; }
.hill-diff.neg, .phase-cell .diff.neg { background: rgba(240,113,120,0.28); color: #ffe0e2; }
.review-note-form { display: flex; gap: 6px; }
.review-note-form input { flex: 1; min-width: 0; padding: 8px 10px; }
.review-note-form .btn { padding: 8px 12px; }
.review-notes { display: flex; flex-direction: column; gap: 4px; max-height: 96px; overflow: auto; }
.review-dock .phase-score { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
.review-dock .is-live { box-shadow: inset 0 -2px 0 var(--accent); }
#review-note { margin: 0; font-size: 0.78rem; }
#review-note a { color: var(--accent); }
#review-close { padding: 6px 10px; font-size: 0.8rem; }

/* --------------------------------------------------------------------------
   Vetoes
   -------------------------------------------------------------------------- */
.veto-scroll { overflow-x: auto; padding-bottom: 8px; }
.veto-sheet { border-collapse: separate; border-spacing: 3px; min-width: 1280px; width: max-content; }
.veto-sheet th, .veto-sheet td { padding: 0; vertical-align: stretch; }
.vh { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; color: rgba(255,255,255,0.88); border-radius: 6px; padding: 6px 4px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); }
.vh-veto, .vh-veto-sub { background: rgba(234,179,8,0.28); border-color: rgba(234,179,8,0.45); }
.vh-veto-sub { background: rgba(234,179,8,0.14); }
.vh-pick, .vh-pick-sub { background: rgba(34,197,94,0.24); border-color: rgba(34,197,94,0.42); }
.vh-pick-sub { background: rgba(34,197,94,0.12); }
.vh-ab { background: rgba(99,102,241,0.18); border-color: rgba(129,140,248,0.42); }
.vb { min-width: 68px; min-height: 46px; padding: 4px 5px; border-radius: 6px; text-align: center; font-size: 0.72rem; font-weight: 650; line-height: 1.25; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10); display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; }
.vb-Ban { background: rgba(234,179,8,0.12); border-color: rgba(234,179,8,0.30); }
.vb-Pick { background: rgba(34,197,94,0.10); border-color: rgba(34,197,94,0.28); }
.vb-Win { background: rgba(34,197,94,0.22); border-color: rgba(34,197,94,0.45); }
.vb-Loss { background: rgba(239,68,68,0.20); border-color: rgba(239,68,68,0.42); }
.vb-DNP { background: rgba(255,255,255,0.03); border-style: dashed; border-color: rgba(255,255,255,0.10); color: var(--faint); }
.vb-AbChoice { background: rgba(99,102,241,0.14); border-color: rgba(129,140,248,0.45); }
.vb-pri { font-weight: 750; }
.vb-sec { color: rgba(255,255,255,0.52); font-weight: 500; font-size: 0.68rem; }
.vb-div { width: 80%; height: 1px; background: rgba(255,255,255,0.18); margin: 3px 0; }
.vb-stack { display: flex; flex-direction: column; gap: 3px; }
.vb-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.vb-link:hover { text-decoration: none; color: inherit; }
.vb-link:hover .vb { border-color: var(--accent); }
.veto-legend { display: flex; gap: 6px; margin: 0 0 8px; }
.veto-legend .vb { min-width: 42px; min-height: 28px; height: auto; }
tr.is-old td { opacity: 0.72; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .review-dock { left: 0; height: 46vh; grid-template-columns: 1fr; overflow: auto; }
  .topbar { position: static; width: auto; flex-direction: row; align-items: center; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .brand { padding: 4px 6px; }
  .game-switch { margin: 0; min-width: 112px; }
  .game-hint { display: none; }
  .nav-group { display: none; }
  .wrap:has(.topbar) { margin-left: 0; padding: 0 14px 48px; }
  body.review-open .wrap:has(.topbar) { padding-bottom: 48vh; }
  .topbar nav { flex-direction: row; flex-wrap: wrap; }
  .topbar form { margin-top: 0; }
  .topbar .btn.ghost { width: auto; }
  .hero-name { font-size: 1.4rem; }
  .sticky-tools { margin: 0 -14px 14px; padding: 6px 14px 0; }
  .tb-group { border-right: 0; padding-right: 0; }
  .tb-reset { margin-left: 0; }
}
