/* game-detail.css — Standalone game detail page styles
   Companion to src/detail_page.js + public/game-detail.js
   Uses same design tokens as index.html but scoped with ca- prefix for new components. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Shared design tokens (match index.html exactly) ────────────────────────── */
:root {
  /* Existing tokens — same values as index.html */
  --bg:        #0f1117;
  --surface:   #171b24;
  --surface2:  #1e2330;
  --border:    #252c3b;
  --text:      #e2e8f0;
  --muted:     #8892a4;
  --accent:    #3b82f6;
  --gold:      #FFD700;
  --green:     #22c55e;
  --red:       #ef4444;

  /* New tokens for detail page */
  --bg-primary:      #0b0d12;
  --bg-secondary:    #0d1117;
  --bg-tertiary:     #11151e;
  --border-secondary: #252c3b;
  --border-tertiary:  #1a1f2c;
  --text-primary:    #e2e8f0;
  --text-secondary:  #c0c8d6;
  --text-tertiary:   #8892a4;
  --text-disabled:   #5a6478;
  --accent-brand:    #3b82f6;
  --accent-mvp:      #FFD700;
  --accent-live:     #ef4444;
  --accent-win:      #22c55e;
  --accent-warning:  #f59e0b;
  --accent-live-score: #38bdf8;
  --bg-deep: #0a0d13;
}

html, body {
  /* Lock the page horizontally so only the inner carousels/tables scroll
     sideways — the page itself stays centered, no drifting edges.
     `clip` (not `hidden`) so it doesn't create a scroll container that breaks
     position:sticky on iOS Safari (the sticky nav + section tabs depend on it). */
  max-width: 100%;
  overflow-x: clip;
}
body {
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

/* ── Typography utility ─────────────────────────────────────────────────────── */
.ca-num {
  font-family: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

/* ── Nav (must match index.html exactly) ────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  height: 56px;
  /* Same blue-velvet photo top bar as index.html (was a flat grey surface here,
     which made the detail-page nav read as a different site). */
  background-color: #0b1d49;
  background-image:
    linear-gradient(180deg, rgba(7,14,36,0.34), rgba(7,14,36,0.50)),
    url("/velvet-bar.png?v=4");
  background-size: cover, cover;
  /* Middle-strip crop, even texture — keep in sync with index.html + faq.html */
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  border-bottom: 1px solid rgba(120,150,220,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-left  { display: flex; align-items: stretch; gap: 24px; }
.nav-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
#nav-user-info { font-size: 13px; color: var(--muted); display: none; }

.logo {
  font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.3px;
  cursor: pointer; user-select: none; display: flex; align-items: center;
  border-bottom: 2px solid transparent; transition: border-color 0.15s;
  padding: 0; white-space: nowrap;
}
.logo span { color: var(--accent); }
.logo:hover span { opacity: 0.85; }

.nav-tabs { display: flex; align-items: stretch; gap: 24px; }
.tab-btn {
  background: none; border: none; color: #c8d4ee; /* readable on the velvet bar (matches index.html, not the greyer --muted) */
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 0; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap; display: flex; align-items: center;
  text-shadow: 0 1px 2px rgba(4,10,26,0.6); /* legibility over the textured velvet */
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
/* CA logo chip in the nav tab — kept identical to index.html so the top bar is
   pixel-for-pixel the same between the SPA and this standalone detail page. */
.ca-pick-logo { height: 1.25em; width: auto; aspect-ratio: 440 / 305; border-radius: 3px; vertical-align: middle; display: inline-block; margin-right: 6px; flex-shrink: 0; }
.tab-btn .ca-pick-logo { height: 1.5em; margin-right: 3px; opacity: 0.78; transition: opacity 0.15s; }
.tab-btn:hover .ca-pick-logo,
.tab-btn.active .ca-pick-logo { opacity: 1; }

/* ── About nav dropdown (About + FAQ under the About tab, matches index.html) ── */
.nav-about-wrap { position: relative; display: flex; align-items: stretch; }
.tab-caret { font-size: 9px; margin-left: 5px; opacity: .8; }
.about-dropdown {
  position: absolute; top: calc(100% + 14px); left: 0; min-width: 150px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45); padding: 6px; z-index: 200;
  transform-origin: top left; animation: ddIn .12s ease;
}
.about-dropdown.hidden { display: none; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.about-dropdown-item {
  display: flex; align-items: center; padding: 9px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer;
  text-decoration: none; transition: background .12s;
}
.about-dropdown-item:hover { background: var(--surface2); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  padding: 7px 16px; border-radius: 6px; font-family: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-ghost   { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-gold    { background: var(--gold); color: #111; }
.btn-danger  { background: var(--red); color: #fff; font-size: 13px; padding: 5px 12px; }
.btn-block   { display: block; width: 100%; margin-top: 14px; }

/* Back button in nav */
.ca-back-btn {
  display: flex; align-items: center; gap: 3px;
  background: none; border: 1px solid var(--border);
  color: var(--muted); font-family: inherit;
  font-size: 13px; font-weight: 600; padding: 5px 12px;
  border-radius: 6px; cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.ca-back-btn:hover { color: var(--text); border-color: var(--muted); }

/* ── Auth modals ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 24px;
}
.modal-overlay.hidden { display: none; }
.modal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 36px 32px; max-width: 380px; width: 100%; position: relative;
}
.modal-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.modal-close:hover { color: var(--text); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.form-group input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 9px 13px; border-radius: 7px;
  font-size: 15px; font-family: inherit; outline: none; transition: border-color 0.15s;
}
.form-group input:focus { border-color: var(--accent); }
.form-group small { display: block; margin-top: 4px; }
.form-error { color: var(--red); font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.form-success { color: var(--green); font-size: 13px; margin-bottom: 10px; }
.form-footer { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ── Sticky header wrapper (back bar + game header stick below nav) ─────────── */
.ca-sticky-top {
  position: sticky;
  top: 56px; /* nav height */
  z-index: 95;
  background: var(--bg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}

/* ── Back button (inline in meta row) ───────────────────────────────────────── */
.ca-page-back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--text-tertiary); padding: 0;
  transition: color 0.15s; white-space: nowrap; flex-shrink: 0;
}
.ca-page-back-btn:hover { color: var(--text); }
.ca-page-back-btn svg { flex-shrink: 0; }

/* ── Game header (compact) ──────────────────────────────────────────────────── */
.ca-game-header {
  max-width: 1500px; margin: 0 auto;
  padding: 14px 24px 18px;
  border-bottom: 1px solid var(--border-tertiary);
  background: linear-gradient(180deg, rgba(30,35,50,0.5) 0%, transparent 100%);
}

.ca-gh-meta-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}

.ca-sport-badge {
  display: inline-block; padding: 3px 10px; border-radius: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.12);
}

.ca-gh-meta-text { font-size: 13px; color: var(--text-tertiary); }
.ca-gh-sep { color: var(--border); font-size: 13px; }
.ca-gh-venue { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ca-gh-status-pill {
  font-size: 12px; font-weight: 700; letter-spacing: 0.3px;
  border-radius: 20px; padding: 4px 12px;
}
.ca-status-pre    { background: rgba(59,130,246,0.12); color: var(--accent); border: 1px solid rgba(59,130,246,0.25); }
.ca-status-live   { background: rgba(239,68,68,0.12); color: var(--accent-live-score); border: 1px solid rgba(239,68,68,0.3); display: flex; align-items: center; gap: 6px; }
.ca-status-live::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--accent-live); animation: ca-live-dot 1.4s ease-in-out infinite; flex-shrink:0; }
.ca-status-final  { background: rgba(34,197,94,0.1);   color: var(--accent-win); border: 1px solid rgba(34,197,94,0.25); }
@keyframes ca-live-dot { 0%,100% { opacity:1 } 50% { opacity:0.3 } }

/* Team matchup row */
.ca-gh-matchup {
  display: flex; align-items: center; gap: 24px;
  justify-content: center;
}
.ca-gh-team {
  display: flex; align-items: center; gap: 12px;
  flex: 0 1 420px;
}
.ca-gh-away { flex-direction: row; justify-content: flex-end; }
.ca-gh-home { flex-direction: row; justify-content: flex-start; }

.ca-team-logo-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface2); border: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.ca-team-logo-circle span {
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.9);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
/* Tennis player country flag fills the avatar circle */
.ca-team-logo-circle .ca-flag-img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; display: block;
}

.ca-team-info { display: flex; flex-direction: column; gap: 2px; }
.ca-text-right { text-align: right; align-items: flex-end; }

.ca-team-name { font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.ca-team-record { font-size: 12px; color: var(--text-tertiary); }
.ca-team-meta { font-size: 12px; color: var(--text-tertiary); }

.ca-gh-at {
  font-size: 20px; color: var(--text-disabled); font-weight: 300;
  flex-shrink: 0; text-align: center;
}

/* ── Sticky section nav (always visible, horizontal) ─────────────────────────── */
.ca-section-nav {
  position: sticky; top: 56px; z-index: 90;
  background: var(--bg); border-bottom: 1px solid var(--border);
  display: flex; align-items: stretch; gap: 0;
  overflow-x: auto; scrollbar-width: none;
  padding: 0 24px;
  max-width: 100%;
}
.ca-section-nav::-webkit-scrollbar { display: none; }
/* Override any media-query that hides it */

.ca-snav-tab {
  display: flex; align-items: center;
  padding: 0 16px; height: 42px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.6px;
  color: var(--text-tertiary); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  cursor: pointer; flex-shrink: 0;
}
.ca-snav-tab:hover { color: var(--text); }
.ca-snav-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.ca-snav-disabled {
  color: var(--text-disabled); cursor: default; pointer-events: none;
}
.ca-snav-disabled:hover { color: var(--text-disabled); }

/* ── Sections ───────────────────────────────────────────────────────────────── */
.ca-section {
  max-width: 1100px; margin: 0 auto;
  padding: 32px 24px;
  border-bottom: 1px solid var(--border-tertiary);
}
.ca-section:last-of-type { border-bottom: none; }

.ca-section-disabled { opacity: 0.65; pointer-events: none; }

.ca-section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; gap: 16px; flex-wrap: wrap;
}
.ca-section-header--picks {
  align-items: center;
  margin-bottom: 7px; /* nudge the pick chips up ~3px */
}

.ca-section-h2 {
  font-size: 15px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-secondary);
}
.ca-section-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 3px; }
.ca-section-meta { font-size: 11px; color: var(--text-disabled); }

/* ── Slot picker chips ──────────────────────────────────────────────────────── */
/* Compact horizontal pill row — mirrors the game popup ticker. Scrolls
   sideways instead of wrapping, so it stays one tidy row on phones too. */
.ca-slot-grid {
  display: flex; gap: 8px; flex-wrap: nowrap;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 10px; /* tighter gap below the pick chips, before the detail card */
}
.ca-slot-grid::-webkit-scrollbar { display: none; }

/* Tiny custom scroll hint under the chips (shown by JS only when they overflow) */
.ca-slot-scrollbar {
  display: none; height: 3px; border-radius: 3px;
  background: var(--surface2); position: relative; margin: 0 0 4px;
}
.ca-slot-scrollthumb {
  position: absolute; top: 0; bottom: 0; left: 0; min-width: 14%;
  border-radius: 3px; background: var(--text-tertiary); opacity: 0.55;
}

.ca-slot-chip {
  position: relative;
  display: flex; flex-direction: row; align-items: center;
  gap: 7px;
  padding: 3px 13px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap; user-select: none; flex-shrink: 0;
  /* Register taps reliably even inside the horizontal scroller (no 300ms delay,
     don't let a tiny finger movement get swallowed as a scroll). */
  touch-action: manipulation;
}
.ca-slot-chip:hover { border-color: var(--accent); }
.ca-slot-chip.active { border-color: var(--accent); background: rgba(59,130,246,0.12); }
.ca-slot-chip.mvp    { border-color: rgba(255,215,0,0.55); background: rgba(255,215,0,0.06); }
.ca-slot-chip.mvp.active { background: rgba(255,215,0,0.1); }
.ca-slot-chip.no-pick { opacity: 0.5; }
.ca-slot-chip.locked  { opacity: 0.72; cursor: default; }
.ca-slot-chip.no-pick:hover  { border-color: var(--accent); opacity: 0.75; }
.ca-slot-chip.locked:hover   { border-color: var(--border); background: var(--surface2); }
.ca-slot-chip.no-pick.active { opacity: 1; border-color: var(--accent); background: rgba(59,130,246,0.12); }

.ca-slot-pill-label {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.2;
}
.ca-slot-chip.mvp .ca-slot-pill-label { color: var(--gold); }
.ca-slot-pill-score { font-size: 14px; font-weight: 800; line-height: 1; }
.ca-slot-pill-score.ca-slot-pts--none { color: var(--text-disabled); opacity: 0.7; font-weight: 700; }
.ca-slot-pill-locked { color: var(--text-disabled); }
/* Fire glyph faded behind the number — adds heat without taking width. */
.ca-slot-fire { position: relative; }
.ca-slot-fire::before {
  content: '🔥'; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%); font-size: 17px; opacity: 0.3;
  z-index: 0; pointer-events: none;
}
.ca-slot-pts-num { position: relative; z-index: 1; }

.ca-slot-type {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.7px;
  text-transform: uppercase; color: var(--text-tertiary);
}
.ca-slot-chip.active .ca-slot-type { color: var(--accent); }
.ca-slot-chip.mvp .ca-slot-type    { color: var(--gold); }

.ca-slot-label {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 120px; line-height: 1.2;
}

/* Score area — centered */
.ca-slot-score-area {
  display: flex; flex-direction: column; align-items: center;
  margin-top: 5px; gap: 2px;
}
.ca-slot-pts {
  font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 20px; font-weight: 700; color: var(--text-tertiary);
  line-height: 1;
}
.ca-slot-pts--none { color: var(--text-disabled); opacity: 0.7; }

/* Blur + lock overlay */
.ca-slot-locked-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%;
}
.ca-slot-pts.ca-blurred {
  filter: blur(5px);
  color: var(--text-secondary);
  user-select: none; pointer-events: none;
}
.ca-slot-lock-overlay {
  position: absolute;
  font-size: 13px; color: var(--text-secondary);
  pointer-events: none;
}
/* Lock icon for no-pick locked chips (no score to blur) */
.ca-slot-lock-solo {
  font-size: 12px; color: var(--text-disabled);
  display: flex; align-items: center; justify-content: center;
  padding: 2px 0;
}

.ca-slot-not-rated {
  font-size: 9px; color: var(--text-disabled); letter-spacing: 0.4px;
  font-weight: 600; text-transform: uppercase;
}

/* MVP pip badge (top-right corner) */
.ca-slot-mvp-pip {
  position: absolute; top: 6px; right: 7px;
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.4px;
  color: var(--gold); background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.3); border-radius: 3px;
  padding: 1px 4px;
}

/* Legacy — detail panel only */
.ca-slot-score { font-family: 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ca-slot-score.ca-blurred { color: transparent; text-shadow: 0 0 6px rgba(226,232,240,0.5); user-select: none; }
.ca-slot-lock { font-size: 10px; color: var(--text-disabled); margin-top: 1px; }

.ca-slot-empty {
  text-align: center; color: var(--text-tertiary);
  font-size: 13px; padding: 24px;
}

/* ── Detail panel (3-column) ─────────────────────────────────────────────────── */
.ca-detail-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden;
}

.ca-dp-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 40px; color: var(--text-tertiary); font-size: 14px; gap: 10px;
}

.ca-dp-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
}
.ca-dp-lines-row {
  border-top: 1px solid var(--border);
}

.ca-dp-divider { background: var(--border); align-self: stretch; }

.ca-dp-col {
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
}

.ca-dp-col-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.7px;
  text-transform: uppercase; color: var(--text-tertiary);
  margin-bottom: 2px;
}

/* Left col: pick info */
.ca-dp-team {
  font-size: 20px; font-weight: 700; color: var(--text-primary);
  line-height: 1.2;
}
.ca-dp-line {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 22px; font-weight: 700; color: var(--text-primary);
}
.ca-dp-pick-type {
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-tertiary);
}
.ca-dp-capper { font-size: 13px; color: var(--text-secondary); }
.ca-dp-capper strong { color: var(--text-primary); }
.ca-dp-channel {
  font-size: 11px; color: var(--text-tertiary);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px; display: inline-block; margin-top: 2px;
}

/* Score number */
.ca-dp-score-big {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 40px; font-weight: 700; line-height: 1;
  color: var(--text-primary);
}
.ca-dp-score-big.mvp-gold   { color: var(--gold); }
.ca-dp-score-big.mvp-silver { color: #b0bcd4; }
.ca-dp-score-big.mvp        { color: var(--gold); } /* legacy */
.ca-dp-score-locked-wrap {
  position: relative; display: inline-block; cursor: pointer;
  line-height: 1;
}
.ca-dp-score-locked-wrap .ca-dp-score-big.ca-blurred {
  color: transparent;
  text-shadow: 0 0 16px rgba(226,232,240,0.55);
  filter: blur(2px);
  user-select: none; pointer-events: none;
}
.ca-dp-score-lock-mini {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold, #facc15);
  font-size: 18px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  pointer-events: none;
}
.ca-dp-score-locked-wrap:hover .ca-dp-score-lock-mini { transform: scale(1.05); }
.ca-dp-score-big.ca-blurred {
  color: transparent;
  text-shadow: 0 0 14px rgba(226,232,240,0.4);
  user-select: none;
}

.ca-dp-rank-badge {
  font-size: 11px; font-weight: 700;
  border-radius: 4px; padding: 2px 8px; display: inline-block;
}
.ca-dp-rank-1 { background: rgba(255,215,0,0.12); color: var(--gold); border: 1px solid rgba(255,215,0,0.3); }
.ca-dp-rank-n { background: var(--surface2); color: var(--text-tertiary); border: 1px solid var(--border); }

/* MVP badge — base + tier variants */
.ca-dp-mvp-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
}
.ca-dp-mvp-badge--gold {
  background: rgba(255,215,0,0.15); color: var(--gold);
  border: 1px solid rgba(255,215,0,0.45);
}
.ca-dp-mvp-badge--silver {
  background: rgba(176,188,212,0.12); color: #b0bcd4;
  border: 1px solid rgba(176,188,212,0.3);
}

.ca-dp-mentions { font-size: 12px; color: var(--text-tertiary); }
.ca-dp-mentions strong { color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; }

/* Right col: vote */
.ca-dp-vote-heading { font-size: 12px; color: var(--text-tertiary); }
.ca-vote-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface2); cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); transition: all 0.15s;
  width: 100%;
}
.ca-vote-btn:hover { border-color: var(--accent); color: var(--text); }
.ca-vote-btn.voted { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,0.08); }
.ca-vote-btn.voted:hover { border-color: var(--accent-live); color: var(--accent-live); background: rgba(239,68,68,0.06); }
.ca-vote-count {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--text-tertiary);
}
.ca-vote-locked {
  font-size: 12px; color: var(--text-tertiary); line-height: 1.5;
  padding: 10px 0;
}
.ca-vote-login { font-size: 12px; color: var(--text-tertiary); }
.ca-vote-login a { color: var(--accent); cursor: pointer; }

.ca-dp-result-badge {
  display: inline-block; padding: 3px 10px; border-radius: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase;
}
.ca-dp-result-win  { background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.ca-dp-result-loss { background: rgba(239,68,68,0.1);  color: var(--red);   border: 1px solid rgba(239,68,68,0.25); }
.ca-dp-result-push { background: var(--surface2); color: var(--text-tertiary); border: 1px solid var(--border); }

/* Detail panel header */
.ca-dp-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border);
  gap: 16px;
  transition: background 0.2s, border-color 0.2s;
}

/* Gold MVP tier (60+) */
.ca-dp-header--mvp-gold {
  background: linear-gradient(135deg, rgba(255,215,0,0.08) 0%, transparent 55%);
  border-bottom: 1px solid rgba(255,215,0,0.4);
  box-shadow: 0 2px 24px rgba(255,215,0,0.06) inset;
}
/* Silver MVP tier (50–59) */
.ca-dp-header--mvp-silver {
  background: linear-gradient(135deg, rgba(180,190,210,0.07) 0%, transparent 55%);
  border-bottom: 1px solid rgba(180,190,210,0.22);
  box-shadow: 0 2px 24px rgba(180,190,210,0.04) inset;
}

.ca-dp-hdr-left { display: flex; flex-direction: column; gap: 5px; flex: 1 1 0; min-width: 0; }

/* Eyebrow row: optional star + type label */
.ca-dp-hdr-eyebrow-row { display: flex; align-items: center; gap: 5px; }
.ca-dp-hdr-star { font-size: 13px; color: var(--gold); line-height: 1; }
.ca-dp-hdr-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.7px;
  text-transform: uppercase; color: var(--text-tertiary);
}

/* Pick row: team name + line value + juice inline */
.ca-dp-hdr-pick-row { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.ca-dp-hdr-side {
  font-size: 22px; font-weight: 700; color: var(--text-primary); line-height: 1.1;
}
.ca-dp-hdr-line-val {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: 22px; font-weight: 700; color: var(--text-primary);
}
.ca-dp-hdr-juice {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: 14px; font-weight: 500; color: var(--text-tertiary);
}
/* Legacy — no longer generated but kept for safety */
.ca-dp-hdr-line {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: 18px; font-weight: 700; color: var(--text-secondary);
}

/* Right column */
.ca-dp-hdr-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  flex: 0 0 auto;
}
.ca-dp-hdr-score-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.9px;
  text-transform: uppercase; color: var(--text-disabled);
}
.ca-dp-hdr-score-row { display: flex; align-items: center; gap: 8px; }

/* Mini lines table inside detail panel col */
.ca-dp-mini-table { display: flex; flex-direction: column; gap: 6px; }
.ca-dp-mini-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; font-size: 13px;
}
.ca-dp-mini-book { color: var(--text-tertiary); font-weight: 600; font-size: 12px; }
.ca-dp-mini-val  { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 700; }

/* Public betting bar widget (legacy, no longer used in detail panel) */
.ca-pub-num {
  font-size: 28px; font-weight: 700; line-height: 1;
  font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
.ca-pub-bar-track {
  width: 100%; height: 5px;
  background: var(--border); border-radius: 3px; overflow: hidden;
  margin-bottom: 6px;
}
.ca-pub-bar-fill { height: 100%; border-radius: 3px; }
.ca-pub-bar-label { font-size: 10px; color: var(--text-disabled); }

/* Score build-up chart (replaces public betting widget) */
.ca-dp-started-note {
  font-size: 11px; color: var(--text-tertiary); margin: -2px 0 10px;
  letter-spacing: .03em;
}
.ca-dp-timeline-wrap {
  position: relative; height: 160px; width: 100%;
}
.ca-dp-timeline-wrap canvas { width: 100% !important; height: 100% !important; }
.ca-dp-timeline-wrap.is-empty canvas { opacity: 0.4; }
/* Locked draws a synthetic teaser (no real data), so a light blur is enough to
   signal "preview" while the gold uptrend stays enticing behind the lock. */
.ca-dp-timeline-wrap.is-locked canvas { filter: blur(2px); opacity: 0.85; }
.ca-dp-timeline-empty-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-tertiary); font-style: italic;
  pointer-events: none; letter-spacing: .02em;
}
.ca-dp-timeline-lock-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer;
  color: var(--gold, #facc15);
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.ca-dp-timeline-lock-overlay i { font-size: 22px; }
.ca-dp-timeline-lock-overlay span {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ca-dp-timeline-lock-overlay:hover i { transform: scale(1.05); }

/* Bigger, more prominent community vote column */
.ca-dp-vote-col { gap: 10px; }
.ca-dp-vote-title {
  font-size: 18px; font-weight: 700; letter-spacing: 0.01em;
  color: var(--text);
}
.ca-dp-vote-sub {
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
}
.ca-dp-vote-sub a { color: var(--accent); cursor: pointer; font-weight: 600; }
.ca-dp-vote-sub a:hover { text-decoration: underline; }
.ca-vote-locked-sub { color: var(--text-tertiary); font-style: italic; }
.ca-dp-vote-col .ca-vc-pair { margin-top: 4px; }
.ca-dp-vote-col .ca-vote-choice { padding: 14px 10px 12px; }

/* Live game feed (replaces the vote area once the game starts) */
.ca-live-feed { display: flex; flex-direction: column; gap: 12px; }
.ca-live-head { display: flex; align-items: center; gap: 9px; }
.ca-live-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; padding: 2px 8px; border-radius: 5px; }
.ca-live-badge--live  { color: #fff; background: var(--accent-live); }
.ca-live-badge--final { color: var(--text-tertiary); background: var(--surface2); border: 1px solid var(--border); }
.ca-live-status { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.ca-live-score { display: flex; flex-direction: column; gap: 6px; }
.ca-live-team { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ca-live-tname { font-size: 16px; font-weight: 700; color: var(--text-secondary); }
.ca-live-tscore { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; }
.ca-live-team.ca-live-win .ca-live-tname,
.ca-live-team.ca-live-win .ca-live-tscore { color: var(--accent-win); }
.ca-live-tennis { font-size: 22px; font-weight: 800; color: var(--text); }
.ca-live-leaders { display: flex; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; }
.ca-live-lside { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 4px; }
.ca-live-lteam { font-size: 10px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-tertiary); }
.ca-live-leader { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.ca-live-lcat { font-size: 9.5px; font-weight: 700; text-transform: uppercase; color: var(--text-tertiary); min-width: 30px; }
.ca-live-lname { color: var(--text-secondary); font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-live-lval { color: var(--text); font-weight: 800; }
.ca-live-votes { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.ca-live-votes--none { color: var(--text-tertiary); font-size: 12px; font-style: italic; }
.ca-live-votes-lbl { font-size: 10px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-tertiary); }
.ca-live-vote-chip { font-size: 12px; font-weight: 700; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: 14px; padding: 4px 11px; }
.ca-dp-vote-col .ca-vc-label { font-size: 15px; font-weight: 700; }
.ca-dp-timeline-footer {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-top: 8px; flex-wrap: wrap;
}
.ca-dp-timeline-teaser {
  font-size: 11px; color: var(--text-tertiary); line-height: 1.5;
}
.ca-dp-timeline-teaser a { color: var(--accent); text-decoration: none; }
.ca-dp-timeline-teaser a:hover { text-decoration: underline; }
.ca-dp-timeline-start {
  font-size: 11px; color: var(--text-secondary); line-height: 1.5;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.ca-dp-timeline-sched { color: var(--text-tertiary); margin-left: 4px; }
.ca-dp-timeline-locked {
  font-size: 12px; color: var(--text-tertiary);
  padding: 18px 12px; text-align: center;
  border: 1px dashed var(--border); border-radius: 6px;
}

/* For/against vote choice buttons */
.ca-vc-pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.ca-vote-choice {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 10px 8px; text-align: center; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative; user-select: none;
  background: var(--surface2);
}
.ca-vote-choice:hover:not(.ca-vote-choice--disabled) {
  border-color: var(--accent); background: rgba(59,130,246,0.07);
}
.ca-vote-choice--active {
  border-color: var(--accent); background: rgba(59,130,246,0.12);
}
.ca-vote-choice--disabled { cursor: default; }
.ca-vc-label {
  font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.2;
}
.ca-vc-line {
  font-size: 11px; color: var(--text-tertiary); margin-top: 3px;
}
.ca-vc-votes {
  font-size: 10px; color: var(--text-disabled); margin-top: 5px;
}
.ca-vc-check {
  position: absolute; top: 5px; right: 7px;
  font-size: 9px; color: var(--accent);
}

/* Paywall row inside detail panel */
.ca-dp-unlock-row {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(59,130,246,0.04); gap: 12px; flex-wrap: wrap;
}
.ca-dp-unlock-text { font-size: 13px; color: var(--text-tertiary); }
.ca-dp-unlock-link { font-size: 13px; color: var(--accent); cursor: pointer; font-weight: 600; }
.ca-dp-unlock-link:hover { opacity: 0.8; }

/* ── Lines section ──────────────────────────────────────────────────────────── */
/* Drop the header into a column so the toggle gets its own row, full-width
   and centered, with chunky tap-target buttons. */
#lines .ca-section-header {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.ca-lines-toggle {
  display: flex;
  width: 100%;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.ca-lt-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-right: 1px solid var(--border);
}
.ca-lt-btn:last-child { border-right: none; }
.ca-lt-btn:hover { background: var(--surface2); color: var(--text); }
.ca-lt-btn.active {
  background: var(--surface2);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent-brand);
}

@media (max-width: 580px) {
  .ca-lt-btn { font-size: 13px; padding: 13px 10px; }
}

/* Lines table */
.ca-lines-table-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.ca-lt-header-row {
  display: grid; grid-template-columns: 120px 1fr 1fr 1fr;
  background: var(--surface2); border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-tertiary);
  gap: 8px;
}
.ca-lt-row {
  display: grid; grid-template-columns: 120px 1fr 1fr 1fr;
  padding: 12px 16px; gap: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px; align-items: center;
}
.ca-lt-row:last-child { border-bottom: none; }
.ca-lt-row:nth-child(even) { background: rgba(255,255,255,0.015); }
.ca-lt-book { font-weight: 700; color: var(--text-secondary); font-size: 13px; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.ca-lt-book--mkt { position: relative; justify-content: center; }
.ca-lt-book-vol  { font-size: 10px; font-weight: 400; color: var(--text-disabled); }
.ca-lt-book--mkt .ca-lt-book-vol { position: absolute; top: 100%; left: 0; }
.ca-lt-val  { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; color: var(--text); }
.ca-lt-val.ca-lt-move-up   { color: var(--green); }
.ca-lt-val.ca-lt-move-down { color: var(--red); }
.ca-lt-val.ca-lt-open      { color: var(--text-tertiary); font-size: 12px; }
.ca-lt-empty { padding: 24px; text-align: center; color: var(--text-disabled); font-size: 13px; }
.ca-lt-na   { color: var(--text-disabled); }
/* Offshore books show their line as information only, clearly tagged */
.ca-lt-offshore { display: inline-block; margin-left: 6px; padding: 1px 6px; border: 1px solid var(--text-disabled); border-radius: 4px; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-tertiary); vertical-align: middle; }
/* Soccer 3-way ML: Draw gets its own column between Home and the blurb */
.ca-lines-table-wrap.three-way .ca-lt-header-row,
.ca-lines-table-wrap.three-way .ca-lt-row { grid-template-columns: 120px 1fr 1fr 1fr 1fr; }
/* Source-group titles (My books / Books / Public markets / Offshore) — each
   carries its own color inline; with 7+ rows they collapse like dropdowns. */
.ca-lt-group {
  padding: 9px 16px 6px; background: rgba(255,255,255,0.015);
  font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 7px;
}
.ca-lt-group-toggle { cursor: pointer; user-select: none; }
.ca-lt-group-toggle:hover { background: rgba(255,255,255,0.04); }
.ca-lt-grp-n {
  font-size: 9.5px; font-weight: 700; color: var(--text-tertiary);
  background: rgba(255,255,255,0.06); border-radius: 999px; padding: 1px 7px;
}
.ca-lt-grp-chev { margin-left: auto; font-size: 10px; color: var(--text-tertiary); }

/* Movement arrows — replace ± text with ↑/↓ */
.ca-mv-arrow { font-size: 11px; margin-left: 3px; font-weight: 600; }
.ca-mv-up   { color: #4ade80; }  /* soft green */
.ca-mv-down { color: #f87171; }  /* soft red   */

/* Prediction market rows (Polymarket + Kalshi) */
.ca-lt-poly-row    { border-top: 2px solid rgba(99,102,241,0.3); padding-top: 16px; padding-bottom: 14px; }
.ca-lt-kalshi-row  { border-top: 1px solid rgba(45,212,191,0.2); padding-top: 16px; padding-bottom: 14px; }

.ca-lt-poly-row   .ca-lt-book > span:first-child { color: #818cf8; font-size: 13px; font-weight: 700; }
.ca-lt-kalshi-row .ca-lt-book > span:first-child { color: #2dd4bf; font-size: 13px; font-weight: 700; }

/* Inline book odds (spread −110, total −115 etc.) */
.ca-lt-odds-sm {
  font-size: 9px; font-weight: 500; color: var(--text-disabled);
  font-variant-numeric: tabular-nums;
}

/* Market cell: line value left, % right — true Y-axis center alignment */
/* implied odds float absolutely below % so they don't shift the group's center */
.ca-lt-mkt-cell { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 20px; align-self: center; }
.ca-lt-mkt-pct-group { position: relative; display: flex; align-items: center; justify-content: center; }
.ca-lt-mkt-implied { position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); white-space: nowrap; }
.ca-lt-mkt-pct {
  font-size: 18px; font-weight: 800; line-height: 1;
  font-family: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  letter-spacing: -0.5px;
}
.ca-lt-mkt-implied {
  font-size: 9px; font-weight: 500; color: var(--text-disabled);
  font-variant-numeric: tabular-nums; font-family: 'JetBrains Mono', monospace;
}
.ca-pct-high { color: #4ade80; }
.ca-pct-low  { color: #f87171; }
.ca-pct-even { color: var(--text-secondary); }

/* 4th column inline blurb */
.ca-lt-row-blurb-cell {
  font-size: 11px; color: var(--text-secondary);
  font-style: italic; line-height: 1.4;
  align-self: center;
}

/* ── Public Betting + Community sections ─────────────────────────────────── */
.ca-sentiment-cards { display: block; }

/* Three gauges per row on wide; wraps to 1 column on narrow viewports. */
.ca-senti-gauges {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 28px 24px;
  justify-content: center;
  justify-items: center;
}
/* On desktop the wrapper is transparent — the gauge itself is the grid item.
   On phones it becomes a carousel slide (see the mobile block below). */
.ca-gauge-slide { display: contents; }

.ca-cmty-sub-hdr {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: var(--text-tertiary); text-transform: uppercase;
  margin-bottom: 16px;
}
.ca-senti-vote-count {
  font-weight: 600; letter-spacing: 0; color: var(--text-secondary); margin-left: 6px;
  text-transform: none;
}

.ca-sentiment-footer { margin-top: 16px; font-size: 11px; color: var(--text-tertiary); }

@media (max-width: 720px) {
  /* Lazy-susan gallery: slides are stacked at the center; _layoutCarousel()
     spins each one out by its distance from the active bet type. One swipe
     advances one step and the transition locks it in. No native scroll. */
  .ca-senti-gauges {
    display: block;
    grid-template-columns: none;
    position: relative;
    height: 260px;
    overflow: hidden;
    perspective: 1000px;
    touch-action: pan-y;          /* let vertical scroll through; we handle swipes */
    padding: 0;
  }
  .ca-gauge-slide {
    position: absolute;
    top: 6px; left: 50%;
    width: 210px; margin-left: -105px;
    display: flex; justify-content: center;
    transform-origin: center center;
    backface-visibility: hidden;
    will-change: transform, opacity;
    transition: transform .42s cubic-bezier(.22,.7,.18,1.04), opacity .42s ease;
  }
  /* Off-center gauges can't be tapped/voted — swipe to bring one to center. */
  .ca-gauge-slide:not(.is-active) { pointer-events: none; }
  .ca-gauge-slide .cag-block { width: 210px; }
}

/* ── Community vote rows ────────────────────────────────────────────────────── */
.ca-cmty-vote-lead {
  margin-top: 20px; text-align: center;
  font-size: 13px; line-height: 1.5; color: var(--text-secondary);
}
.ca-cmty-vote-lead strong { color: var(--text-primary); }
.ca-cmty-vote-link { color: var(--accent-brand, #3b82f6); cursor: pointer; }
.ca-cmty-vote-link:hover { text-decoration: underline; }

/* ── Community chat ─────────────────────────────────────────────────────────── */
.ca-chat { margin-top: 28px; border-top: 1px solid var(--border-tertiary); padding-top: 20px; }
.ca-chat-hdr {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.ca-chat-count {
  font-size: 11px; font-weight: 700; letter-spacing: 0;
  background: var(--surface2); color: var(--text-secondary);
  border-radius: 10px; padding: 1px 8px;
}
.ca-chat-list {
  display: flex; flex-direction: column; gap: 14px;
  margin-top: 16px; max-height: 360px; overflow-y: auto; padding-right: 4px;
}
.ca-chat-empty { font-size: 13px; color: var(--text-tertiary); padding: 8px 0; }

/* Each message: a transparent name tag (username + vote chips + time) above the
   message body. No bubble — keeps the thread light and readable. */
.ca-chat-msg { display: flex; flex-direction: column; gap: 4px; }
.ca-chat-nametag {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
}
.ca-chat-user { font-size: 13px; font-weight: 800; color: var(--text-primary); }
.ca-chat-votechip {
  font-size: 10px; font-weight: 700; letter-spacing: 0.02em;
  padding: 2px 8px; border-radius: 5px; white-space: nowrap;
  color: var(--chip, #94a3b8);
  background: color-mix(in srgb, var(--chip) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--chip) 38%, transparent);
}
.ca-chat-time { font-size: 11px; color: var(--text-tertiary); margin-left: auto; }
.ca-chat-del {
  background: none; border: none; color: var(--text-tertiary);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.ca-chat-del:hover { color: var(--accent-loss, #ef4444); }
.ca-chat-body {
  font-size: 14px; line-height: 1.5; color: var(--text-secondary);
  word-break: break-word; white-space: pre-wrap;
}

.ca-chat-input-row { display: flex; gap: 8px; }
.ca-chat-input {
  flex: 1; background: var(--surface, #171b24);
  border: 1px solid var(--border, #252c3b); border-radius: 8px;
  color: var(--text, #e2e8f0); font-size: 14px; padding: 10px 12px;
  outline: none; transition: border-color .15s ease;
}
.ca-chat-input:focus { border-color: var(--accent-brand, #3b82f6); }
.ca-chat-send {
  background: var(--accent-brand, #3b82f6); border: none; border-radius: 8px;
  color: #fff; font-size: 13px; font-weight: 700; padding: 0 18px; cursor: pointer;
  transition: filter .15s ease;
}
.ca-chat-send:hover { filter: brightness(1.1); }
.ca-chat-signin { font-size: 13px; color: var(--text-tertiary); }

/* ── Coming-soon pill ───────────────────────────────────────────────────────── */
.ca-coming-soon-pill {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
  background: rgba(245,158,11,0.1); color: var(--accent-warning);
  border: 1px solid rgba(245,158,11,0.3);
}

/* ── Empty card (coming-soon chart placeholder) ─────────────────────────────── */
.ca-empty-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 48px 24px;
  color: var(--text-tertiary);
}

/* ── Injuries section ───────────────────────────────────────────────────────── */
.ca-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.ca-inj-team { display: flex; flex-direction: column; gap: 0; }
.ca-inj-hdr {
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
  color: var(--text-tertiary); padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border-tertiary);
}
.ca-inj-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--border-tertiary);
  font-size: 12px;
}
.ca-inj-row:last-child { border-bottom: none; }
.ca-inj-dot {
  flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%;
}
.ca-inj-dot--out      { background: #ef4444; }
.ca-inj-dot--doubt    { background: #f97316; }
.ca-inj-dot--gtd      { background: #eab308; }
.ca-inj-dot--ques     { background: #f97316; }
.ca-inj-dot--probable { background: #f97316; }
.ca-inj-dot--default  { background: var(--text-disabled); }
.ca-inj-name {
  font-weight: 600; color: var(--text); flex-shrink: 0;
}
.ca-inj-info {
  font-size: 10px; font-weight: 600; color: var(--text-tertiary);
  letter-spacing: 0.3px; margin-left: auto; text-align: right;
}
.ca-inj-empty { font-size: 13px; color: var(--text-tertiary); padding: 10px 0; grid-column: 1/-1; }
.ca-inj-empty-team { font-size: 12px; color: var(--text-tertiary); padding: 8px 0; }

/* ── Context section ────────────────────────────────────────────────────────── */
.ca-context-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.ca-ctx-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px;
}
.ca-ctx-card--span { grid-column: 1 / -1; }
.ca-ctx-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-tertiary); margin-bottom: 8px;
}
.ca-ctx-val {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.2;
  margin-bottom: 2px;
}
.ca-ctx-val.ca-coming-soon-val {
  font-family: inherit;
  font-size: 10px; font-style: italic;
  color: var(--text-disabled); font-weight: 400;
  letter-spacing: 0;
}
.ca-ctx-sub { font-size: 11px; color: var(--text-tertiary); }

/* ── Pitching matchup side-by-side ─────────────────────────────────────────── */
.ca-ctx-pitching {
  display: flex; align-items: center; gap: 12px; margin-top: 10px;
}
.ca-ctx-pitcher {
  flex: 1; display: flex; flex-direction: column; gap: 3px;
}
.ca-ctx-pitcher--right { text-align: right; align-items: flex-end; }
.ca-ctx-pitcher-team {
  font-size: 10px; color: var(--text-tertiary); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
}
.ca-ctx-pitcher-name {
  font-size: 14px; font-weight: 700; color: var(--text);
}
.ca-ctx-pitcher-stats {
  font-size: 12px; color: var(--text-secondary);
}
.ca-ctx-pitcher-sub {
  font-size: 11px; color: var(--text-tertiary);
}
.ca-ctx-pitcher-vs {
  font-size: 12px; color: var(--text-disabled); flex-shrink: 0;
}

/* ── Game info rows (stats: pitchers, weather, etc.) ────────────────────────── */
.ca-info-rows { display: flex; flex-direction: column; gap: 0; }
.ca-info-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border-tertiary);
  gap: 16px; font-size: 13px;
}
.ca-info-row:last-child { border-bottom: none; }
.ca-info-label { color: var(--text-tertiary); font-weight: 600; white-space: nowrap; min-width: 90px; }
.ca-info-val   { color: var(--text); text-align: right; }

/* ── Pitcher card ───────────────────────────────────────────────────────────── */
.ca-pitcher-pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px;
}
.ca-pitcher-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 7px; padding: 12px 14px;
}
.ca-pitcher-side { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-tertiary); margin-bottom: 5px; }
.ca-pitcher-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.ca-pitcher-stats { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-tertiary); }

/* ── Weather card ───────────────────────────────────────────────────────────── */
.ca-weather-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-secondary); padding: 6px 0;
}
.ca-weather-temp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 700; color: var(--text); margin-right: 4px;
}

/* ── Countdown timer ────────────────────────────────────────────────────────── */
.ca-countdown {
  font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums;
  font-size: 12px; color: var(--text-tertiary); margin-top: 4px;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.ca-footer {
  max-width: 1100px; margin: 0 auto;
  padding: 24px; margin-top: 8px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.ca-footer-disclaimer { font-size: 12px; color: var(--text-disabled); line-height: 1.5; max-width: 600px; }
.ca-footer-version {
  font-size: 11px; color: var(--text-disabled); opacity: 0.55;
  margin-left: auto; letter-spacing: .03em;
}
.ca-back-top {
  display: flex; align-items: center; gap: 5px;
  background: none; border: 1px solid var(--border);
  color: var(--text-tertiary); font-family: inherit;
  font-size: 12px; padding: 5px 12px; border-radius: 6px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s; white-space: nowrap;
}
.ca-back-top:hover { color: var(--text); border-color: var(--muted); }

/* ── Page layout (sidebar + content grid) ───────────────────────────────────── */
.ca-page-outer {
  max-width: 1500px; margin: 0 auto;
}

.ca-main-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.ca-sidebar {
  width: 200px;
  position: sticky;
  top: calc(56px + var(--sticky-body-h, 0px));
  height: calc(100vh - 56px);
  overflow-y: auto;
  scrollbar-width: none;
  border-right: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg);
}
.ca-sidebar::-webkit-scrollbar { display: none; }

.ca-sidebar-link {
  display: block;
  padding: 9px 20px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--text-tertiary); text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.ca-sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.ca-sidebar-link.active { color: var(--accent); border-left-color: var(--accent); background: rgba(59,130,246,0.06); }
.ca-sidebar-link.disabled { color: var(--text-disabled); cursor: default; pointer-events: none; }

/* ── Content column ──────────────────────────────────────────────────────────── */
.ca-content { min-width: 0; }

/* ── Mobile tabs (hidden on wide, shown at <900px) ───────────────────────────── */
.ca-mobile-tabs {
  display: none;
  position: sticky;
  top: calc(56px + var(--sticky-body-h, 0px)); z-index: 90;
  background: var(--bg); border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
  padding: 0 16px; scroll-behavior: smooth;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ca-mobile-tabs::-webkit-scrollbar { display: none; }
/* When pinned to the top (scrolled past the game header) the bar reads as a
   compact table of contents — a touch taller, brighter, with a shadow + accent
   underline so you can tell where you are. */
.ca-mobile-tabs.is-stuck {
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  border-bottom-color: rgba(59,130,246,0.5);
}
.ca-mtab {
  display: inline-flex; align-items: center;
  padding: 0 14px; height: 40px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--text-tertiary); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, height 0.2s ease, font-size 0.2s ease;
  cursor: pointer; flex-shrink: 0;
}
.ca-mtab:hover { color: var(--text); }
.ca-mtab.active { color: var(--accent); border-bottom-color: var(--accent); }
.ca-mtab.disabled { color: var(--text-disabled); cursor: default; pointer-events: none; }
/* Expand the tabs slightly once the bar is stuck. */
.ca-mobile-tabs.is-stuck .ca-mtab { height: 46px; font-size: 12px; }
.ca-mobile-tabs.is-stuck .ca-mtab.active { border-bottom-width: 3px; }

/* ── Section overrides inside content grid ────────────────────────────────────── */
.ca-content .ca-section {
  max-width: none;
  margin: 0;
}
.ca-content .ca-footer {
  max-width: none;
  margin: 0;
}

/* ── Loading spinner ────────────────────────────────────────────────────────── */
.ca-spinner-wrap { display: flex; justify-content: center; padding: 48px; }
.ca-spinner {
  width: 28px; height: 28px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: ca-spin 0.7s linear infinite;
}
@keyframes ca-spin { to { transform: rotate(360deg); } }

/* ── Score live badge ───────────────────────────────────────────────────────── */
.ca-live-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; font-weight: 700; color: var(--accent-live-score);
}
.ca-score-sep { font-size: 22px; color: var(--text-tertiary); margin: 0 8px; }

/* ── Pick heat color classes ────────────────────────────────────────────────── */
.ca-heat-1  { color: #FFD700; }
.ca-heat-2  { color: #FFA500; }
.ca-heat-3  { color: #FF6B35; }
.ca-heat-4  { color: var(--text); }
.ca-heat-5  { color: var(--text-tertiary); }

/* ── Mobile responsive ──────────────────────────────────────────────────────── */

/* 900px: switch from sidebar to mobile tabs */
@media (max-width: 900px) {
  .ca-main-grid { grid-template-columns: 1fr; }
  .ca-sidebar { display: none; }
  .ca-mobile-tabs { display: flex; }
  /* On phones the tall team header scrolls away and the compact tab bar takes
     over the top of the screen (pins right under the nav) as a TOC. */
  .ca-sticky-top { position: static; box-shadow: none; }
  .ca-mobile-tabs { top: 56px; }
}

@media (max-width: 768px) {
  nav { padding: 0 16px; }
  .nav-tabs { gap: 16px; }
  .tab-btn { font-size: 13px; }

  .ca-breadcrumb { padding: 10px 16px 0; }

  .ca-game-header { padding: 16px 16px 20px; }
  .ca-gh-matchup { gap: 12px; }
  .ca-gh-team { flex: 0 1 300px; }
  .ca-team-logo-circle { width: 48px; height: 48px; }
  .ca-team-logo-circle span { font-size: 12px; }
  .ca-team-name { font-size: 15px; }
  .ca-gh-at { font-size: 16px; }

  .ca-section-nav { padding: 0 12px; }
  .ca-snav-tab { padding: 0 12px; font-size: 11px; }

  .ca-section { padding: 24px 16px; }

  .ca-slot-grid { gap: 6px; }
  .ca-slot-chip { padding: 3px 11px; gap: 6px; }   /* bigger text on phone, half the vertical dead space */
  .ca-slot-pill-label { font-size: 14px; }
  .ca-slot-pill-score { font-size: 15px; }

  .ca-dp-grid {
    grid-template-columns: 1fr;
  }
  .ca-dp-divider { display: none; }
  .ca-dp-col { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .ca-dp-col:last-child { border-bottom: none; }
  .ca-dp-score-big { font-size: 32px; }

  .ca-lt-header-row,
  .ca-lt-row { grid-template-columns: 90px 1fr 1fr; }
  .ca-lt-header-row > *:nth-child(4),
  .ca-lt-row > *:nth-child(4) { display: none; }
  /* 3-way (soccer ML): keep the Draw column (4th), hide the blurb (5th) instead */
  .three-way .ca-lt-header-row,
  .three-way .ca-lt-row { grid-template-columns: 90px 1fr 1fr 1fr; }
  .three-way .ca-lt-header-row > *:nth-child(4),
  .three-way .ca-lt-row > *:nth-child(4) { display: block; }
  .three-way .ca-lt-header-row > *:nth-child(5),
  .three-way .ca-lt-row > *:nth-child(5) { display: none; }
  .ca-lt-mkt-pct { font-size: 16px; }

  .ca-two-col { grid-template-columns: 1fr; gap: 16px; }

  .ca-context-grid { grid-template-columns: 1fr 1fr; }

  .ca-pitcher-pair { grid-template-columns: 1fr; }

  .ca-sg-row { grid-template-columns: 85px 1fr 44px; }

  .ca-footer { padding: 20px 16px; }
  .ca-footer-disclaimer { font-size: 11px; }
}

@media (max-width: 600px) {
  /* Venue too cramped on mobile — hide it, push countdown to far right */
  .ca-gh-venue, .ca-gh-venue + * { display: none; }
  .ca-gh-status-pill { margin-left: auto; }
}

@media (max-width: 480px) {
  .ca-team-logo-circle { width: 40px; height: 40px; }
  .ca-team-name { font-size: 13px; }
  .nav-tabs .tab-btn:nth-child(n+3) { display: none; }
  .ca-context-grid { grid-template-columns: 1fr 1fr; }
  /* Compress meta row so date + countdown both fit on one line */
  .ca-gh-meta-text { font-size: 10px; }
  .ca-page-back-btn { font-size: 10px; }
  .ca-gh-sep { font-size: 10px; }
  .ca-sport-badge { font-size: 9px; padding: 2px 7px; }
  .ca-gh-status-pill { font-size: 10px; padding: 3px 8px; }
}

/* ── Mobile nav: hamburger + dropdown menu (matches the home top bar) ───────── */
.ca-hamburger {
  display: none; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text);
  cursor: pointer; padding: 6px; margin-right: 2px;
}
.ca-detail-menu {
  display: none; position: fixed; top: 58px; left: 12px; z-index: 1200;
  flex-direction: column; gap: 2px; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px;
  box-shadow: 0 14px 34px -10px rgba(0,0,0,0.65);
}
.ca-detail-menu.open { display: flex; }
.ca-detail-menu a {
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 10px 14px; border-radius: 8px;
}
.ca-detail-menu a:hover { background: var(--surface2); }

@media (max-width: 768px) {
  .ca-hamburger { display: flex; }
  nav .nav-tabs { display: none; }
}

/* ── History section ──────────────────────────────────────────────────────── */
.ca-hist-header { align-items: center; }
.ca-history-section .ca-section-h2 {
  font-size: 18px; color: var(--text); letter-spacing: 0.4px;
  display: inline-flex; align-items: center; gap: 9px;
}
.ca-history-section .ca-section-h2::before {
  content: ''; width: 4px; height: 18px; border-radius: 2px; background: var(--accent);
}

/* Segmented away/home toggle with a sliding pill that takes on team/player colors:
   each name is its own side's primary colour, the sliding pill is the active side's
   secondary colour (country-colour tint for tennis), recoloured + animated on switch. */
.ca-hist-toggle {
  position: relative; display: inline-flex; gap: 3px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px;
}
.ca-hist-tab {
  position: relative; z-index: 1; min-width: 88px;
  padding: 9px 22px; background: none; border: none; cursor: pointer;
  color: var(--text-tertiary); font-weight: 800; font-size: 14px;
  letter-spacing: 0.5px; opacity: 0.55; font-family: inherit;
  transition: color 0.25s ease, opacity 0.25s ease;
}
.ca-hist-tab[data-team="away"] { color: var(--hist-away-color, var(--text-tertiary)); }
.ca-hist-tab[data-team="home"] { color: var(--hist-home-color, var(--text-tertiary)); }
.ca-hist-tab.active { opacity: 1; color: var(--hist-active-text, var(--text)); }
.ca-hist-toggle-slider {
  position: absolute; top: 4px; left: 4px; bottom: 4px; z-index: 0;
  width: calc(50% - 4px); border-radius: 9px;
  background: var(--hist-slider-bg, var(--surface));
  box-shadow: 0 1px 7px rgba(0,0,0,0.30);
  transition: transform 0.32s cubic-bezier(.22,1,.36,1), background-color 0.32s ease;
}
.ca-hist-toggle--home .ca-hist-toggle-slider { transform: translateX(100%); }
.ca-hist-toggle-slider.ca-hist-pop { animation: caHistPop 0.36s ease; }
@keyframes caHistPop {
  0%   { filter: brightness(1); }
  42%  { filter: brightness(1.35); }
  100% { filter: brightness(1); }
}

.ca-hist-body { transition: opacity 0.14s ease; min-height: 260px; }
.ca-hist-fading { opacity: 0; }
.ca-hist-loading, .ca-hist-empty {
  padding: 28px 0; text-align: center; color: var(--text-tertiary); font-size: 13px;
}

/* Summary strip */
.ca-hist-summary {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  padding: 15px 18px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; border-left: 3px solid var(--hist-accent, var(--accent));
}
.ca-hist-stat { display: flex; flex-direction: column; gap: 3px; min-width: 72px; }
.ca-hist-stat-val { font-size: 19px; font-weight: 700; color: var(--text); line-height: 1; }
.ca-hist-stat-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-tertiary);
}
.ca-hist-formrow { display: flex; gap: 3px; }
.ca-hist-formdot {
  width: 17px; height: 17px; border-radius: 4px; color: #fff;
  font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.ca-hist-formdot--w { background: var(--accent-win); }
.ca-hist-formdot--l { background: var(--accent-live); }

/* Last-5 rows */
.ca-hist-rows-label, .ca-hist-last20-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-tertiary); margin-bottom: 9px;
}
.ca-hist-rows { display: flex; flex-direction: column; }
.ca-hist-row {
  display: grid; grid-template-columns: 26px 52px minmax(58px,1fr) 58px minmax(0,1.3fr) 168px;
  align-items: center; gap: 12px; padding: 11px 10px; cursor: pointer;
  border-bottom: 1px solid var(--border-tertiary); font-size: 13px; border-radius: 6px;
  transition: background 0.12s;
}
.ca-hist-row:hover { background: var(--surface2); }
.ca-hist-row:last-child { border-bottom: none; }
/* The whole row lights up by result, like the MVP-history rows: a colored edge
   bar plus a tinted result letter + score. No filled W/L chip. */
.ca-hist-row--w { box-shadow: inset 3px 0 0 var(--accent-win); }
.ca-hist-row--l { box-shadow: inset 3px 0 0 var(--accent-live); }
.ca-hist-row--w:hover { background: rgba(34,197,94,0.08); }
.ca-hist-row--l:hover { background: rgba(239,68,68,0.08); }
/* Tennis rows: no off/def meters; show set score, tournament/round, surface. */
.ca-hist-row--tennis {
  grid-template-columns: 26px 52px minmax(70px,0.8fr) minmax(90px,1fr) minmax(0,1.3fr) auto;
  cursor: default;
}
.ca-hist-tourn { color: var(--text-tertiary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-hist-surface {
  justify-self: end; font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
  color: var(--text-secondary); background: var(--surface2);
  border: 1px solid var(--border); border-radius: 20px; padding: 3px 9px; white-space: nowrap;
}
.ca-hist-res {
  font-weight: 800; font-size: 13px; color: var(--text-tertiary); text-align: center;
}
.ca-hist-row--w .ca-hist-res,
.ca-hist-row--w .ca-hist-score { color: var(--accent-win); }
.ca-hist-row--l .ca-hist-res,
.ca-hist-row--l .ca-hist-score { color: var(--accent-live); }
.ca-hist-date  { color: var(--text-tertiary); font-size: 12px; }
.ca-hist-opp   { color: var(--text-secondary); font-weight: 600; }
.ca-hist-score { color: var(--text); font-weight: 800; }
.ca-hist-lead  { color: var(--text-tertiary); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-hist-meters { display: flex; flex-direction: column; gap: 5px; }
.ca-hist-meter { display: flex; align-items: center; gap: 6px; }
.ca-hist-meter-tag { font-size: 9px; font-weight: 800; letter-spacing: 0.5px; color: var(--text-tertiary); width: 22px; }
.ca-hist-meter-track { flex: 1; height: 7px; border-radius: 4px; background: var(--surface2); overflow: hidden; }
.ca-hist-meter-fill  { height: 100%; border-radius: 4px; transition: width 0.3s; }
.ca-hist-meter-num   { font-size: 11px; width: 22px; text-align: right; font-weight: 700; }

/* Last-20 condensed */
.ca-hist-last20 { margin-top: 24px; }
.ca-hist-last20-label { color: var(--text-secondary); font-weight: 700; margin-bottom: 10px; }
.ca-hist-minirow { display: flex; flex-wrap: wrap; gap: 5px; position: relative; }
.ca-hist-mini {
  min-width: 36px; height: 34px; border-radius: 7px;
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums; cursor: default;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.16);
  transition: transform 0.12s ease;
}
.ca-hist-mini:hover { transform: translateY(-2px); }
.ca-hist-mini--active { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 5px 12px -3px rgba(0,0,0,0.55); }
.ca-hist-mini--w { background: linear-gradient(180deg, #4ade80, #22c55e); color: #08260f; }
.ca-hist-mini--l { background: linear-gradient(180deg, #f87171, #ef4444); color: #2b0707; }
.ca-hist-caption { font-size: 11px; color: var(--text-disabled); margin-top: 14px; font-style: italic; }

/* Hot/Cold badge */
.ca-hist-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 20px; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.3px; white-space: nowrap;
}
.ca-hist-badge--hot     { background: rgba(239,68,68,0.16);  color: #f87171; }
.ca-hist-badge--warm    { background: rgba(249,115,22,0.15); color: #fb923c; }
.ca-hist-badge--neutral { background: var(--surface2);       color: var(--text-tertiary); }
.ca-hist-badge--cool    { background: rgba(59,130,246,0.15); color: #60a5fa; }
.ca-hist-badge--cold    { background: rgba(56,189,248,0.16); color: #38bdf8; }

/* Player drill-down popup */
.ca-hist-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center; z-index: 320; padding: 20px;
}
.ca-hist-modal.hidden { display: none; }
.ca-hist-modal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  width: 100%; max-width: 940px; max-height: 86vh; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  box-shadow: 0 18px 44px -12px rgba(0,0,0,0.7);
}
.ca-hist-modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  color: var(--text-tertiary); font-size: 20px; cursor: pointer; z-index: 2;
}
.ca-hist-modal-close:hover { color: var(--text); }
.ca-hist-modal-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--border); }
.ca-hist-modal-title { font-size: 16px; font-weight: 700; color: var(--text); }
.ca-hist-modal-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 3px; }
.ca-hist-modal-body { padding: 8px 18px 18px; overflow-y: auto; }

.ca-hp-blockwrap { margin-top: 12px; }
.ca-hp-blocktitle {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text); font-weight: 800; padding: 6px 8px 6px 11px; margin-bottom: 2px;
  border-left: 3px solid var(--accent);
}
.ca-hp-scroll { overflow-x: auto; }
.ca-hp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ca-hp-table th {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text); font-weight: 700; padding: 7px 8px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.ca-hp-th-name { text-align: left !important; }
.ca-hp-table td { padding: 8px 8px; text-align: right; white-space: nowrap; border-top: 1px solid var(--border-tertiary); }
/* Our calculations (Form/Load) lead; a separator marks where ESPN's box stats begin. */
.ca-hp-th-ours { text-align: center !important; }
.ca-hp-th-statstart, .ca-hp-statstart { border-left: 1px solid var(--border); padding-left: 14px !important; }
.ca-hp-table th:last-child, .ca-hp-table td:last-child { padding-right: 16px; }
.ca-hp-row:hover { background: var(--surface2); }
.ca-hp-dnp { opacity: 0.45; }
.ca-hp-name { text-align: left !important; min-width: 190px; }
.ca-hp-namerow { display: flex; align-items: center; gap: 5px; }
/* History popup: name on top, his key average underneath; Form + explanation +
   Load are columns to the right (the explanation reads a touch bigger here). */
.ca-hp-avgline { display: flex; align-items: baseline; gap: 5px; margin-top: 3px; }
.ca-hp-avg-lbl { font-size: 9px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-tertiary); }
.ca-hp-avg-val { font-size: 11px; font-weight: 700; color: var(--text-secondary); }
.ca-hp-avg-sub { font-size: 9px; color: var(--text-disabled); }
.ca-hp-blockwrap .ca-tf-why-text { font-size: 11px; }
.ca-hp-starter { color: var(--accent-mvp); font-size: 9px; }
.ca-hp-pname { font-weight: 600; color: var(--text); }
.ca-hp-pos { font-size: 10px; color: var(--text-disabled); }
.ca-hp-scale { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ca-hp-scale-lbl { font-size: 9px; font-weight: 800; color: var(--text-tertiary); width: 26px; }
.ca-hp-scale-track { width: 70px; height: 5px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.ca-hp-scale-fill { height: 100%; border-radius: 3px; background: var(--accent); }
.ca-hp-scale-val { font-size: 11px; color: var(--text-secondary); font-weight: 700; }
.ca-hp-delta { font-size: 10px; color: var(--text-tertiary); }
.ca-hp-delta--below { color: var(--accent-live); }
.ca-hp-delta--above { color: var(--accent-win); }
.ca-hp-muted { color: var(--text-disabled); font-size: 11px; }
.ca-hp-formcell, .ca-hp-loadcell { text-align: center !important; min-width: 86px; vertical-align: middle; }

/* Mini heat-dial for Form (cold→hot) and Load (fresh→tired) */
.ca-mg { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.ca-mg-svg { width: 58px; height: 32px; display: block; }
.ca-mg--empty .ca-mg-svg { opacity: 0.5; }
.ca-mg-lbl {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase;
  font-variant-numeric: tabular-nums; line-height: 1; margin-top: -1px;
}

/* Instant hover banner for the Last-20 chips */
.ca-hist-tip {
  position: absolute; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 11px; box-shadow: 0 10px 26px -8px rgba(0,0,0,0.7);
  display: flex; align-items: center; gap: 9px; white-space: nowrap; pointer-events: none;
  font-size: 12px; color: var(--text); max-width: calc(100% - 4px);
}
.ca-hist-tip.hidden { display: none; }
/* Speech-bubble arrow — left set inline (JS), points down (tip above the chip)
   or up (.ca-hist-tip--below, when the chip is in the top row). */
.ca-hist-tip-arrow {
  position: absolute; bottom: -6px; width: 10px; height: 10px;
  background: var(--surface);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);
}
.ca-hist-tip--below .ca-hist-tip-arrow {
  bottom: auto; top: -6px;
  border-right: none; border-bottom: none;
  border-left: 1px solid var(--border); border-top: 1px solid var(--border);
}
.ca-hist-tip-res { font-weight: 800; font-size: 11px; letter-spacing: 0.3px; }
.ca-hist-tip-res--w { color: var(--accent-win); }
.ca-hist-tip-res--l { color: var(--accent-live); }
.ca-hist-tip-main { color: var(--text-secondary); }
.ca-hist-tip-main b { color: var(--text); font-variant-numeric: tabular-nums; }
.ca-hist-tip-date { color: var(--text-tertiary); font-size: 11px; }

@media (max-width: 640px) {
  .ca-hist-row {
    grid-template-columns: 22px 1fr auto; grid-row-gap: 8px;
    grid-template-areas: "res opp score" "meters meters meters";
  }
  .ca-hist-row .ca-hist-res { grid-area: res; text-align: left; }
  .ca-hist-row .ca-hist-opp { grid-area: opp; }
  .ca-hist-row .ca-hist-score { grid-area: score; }
  .ca-hist-row .ca-hist-date, .ca-hist-row .ca-hist-lead { display: none; }
  .ca-hist-row .ca-hist-meters { grid-area: meters; flex-direction: row; gap: 14px; }
  .ca-hist-summary { gap: 10px 16px; }
  .ca-hist-stat { min-width: 60px; }
  .ca-hist-stat-val { font-size: 16px; }
}

/* ── Team Form tab (forward-looking player form/load) ──────────────────────── */
.ca-tf-sub {
  font-size: 12px; color: var(--text-tertiary); line-height: 1.5;
  margin: 4px 0 16px; max-width: 720px;
}
.ca-tf-sub b { color: var(--text-secondary); font-weight: 700; }
.ca-tf-body { transition: opacity 0.14s ease; }

/* Team-level ATS / O-U trend chips */
.ca-tf-trends { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ca-tf-trendchip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 11px;
}
.ca-tf-trendlbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-tertiary); font-weight: 700; }
.ca-tf-trendval { font-size: 13px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

/* Offense / defense (stat-group) sub-toggle */
/* Controls row: Batting/Pitching toggle on the left, team chips (ATS/O-U + travel)
   on the right so they don't take their own stacked row. */
.ca-tf-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ca-tf-controls .ca-tf-blocktoggle { margin-bottom: 0; }
.ca-tf-teamchips { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

.ca-tf-blocktoggle { display: inline-flex; gap: 4px; margin-bottom: 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.ca-tf-blocktab {
  background: none; border: none; cursor: pointer;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase;
  color: var(--text-tertiary); padding: 6px 13px; border-radius: 7px; transition: all 0.15s ease;
}
.ca-tf-blocktab:hover { color: var(--text-secondary); }
.ca-tf-blocktab.active { background: var(--accent); color: #fff; }

/* Forward grid reuses .ca-hp-table; these style the extra columns */
.ca-tf-table { min-width: 760px; }
/* "Why" column — left-aligned plain-English explanation of the Form reading. */
.ca-tf-why-th { text-align: left !important; }
.ca-tf-cell.ca-tf-why { text-align: left !important; vertical-align: middle; min-width: 180px; max-width: 230px; }
.ca-tf-why-text { display: block; font-size: 10px; line-height: 1.35; color: var(--text-secondary); white-space: normal; }
/* Tint the explanation to the form level (matches the dial), dimmed so it reads
   as a note, not a headline. */
.ca-tf-why--hot     { color: #c46a2a; }
.ca-tf-why--warm    { color: #b8842a; }
.ca-tf-why--neutral { color: var(--text-tertiary); }
.ca-tf-why--cool    { color: #5479a8; }
.ca-tf-why--cold    { color: #3f7e96; }
/* "Starting pitcher" / "Bullpen" group separators inside the pitching block */
.ca-tf-grouprow td {
  text-align: left !important; padding: 8px 10px !important; vertical-align: middle;
  font-size: 10px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase;
  color: var(--accent); border-top: 1px solid var(--border) !important;
}
/* First group ("Starting pitcher") sits under the column header — no double rule,
   but keep the padding symmetric so it's centered the same as "Bullpen". */
.ca-tf-grouprow:first-child td { border-top: none !important; }

/* Lineup status, shown in the batting block's name-column header (level with the
   Form/Load/Recent headers). Green when tonight's lineup is posted. */
.ca-tf-lineuptag { font-size: 10px; font-weight: 700; letter-spacing: 0.2px; text-transform: none; color: var(--text-tertiary); }
.ca-tf-lineuptag.is-confirmed { color: var(--accent-win); }

/* Small sub-labels: "(last 5)" in the Recent header, "(N GP)" beside ERA */
.ca-tf-hdrsub { font-size: 9px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-disabled); }
.ca-tf-recentsub { font-size: 9px; font-weight: 600; color: var(--text-disabled); }

/* Recent-bat note (HR/hit streak) in the hitters' column */
.ca-tf-recentnote { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ca-tf-recentnote--hot     { color: #fb923c; }
.ca-tf-recentnote--cold    { color: #38bdf8; }
.ca-tf-recentnote--good    { color: var(--accent-win); }
.ca-tf-recentnote--bad     { color: var(--accent-live); }
.ca-tf-recentnote--neutral { color: var(--text-secondary); }

/* Batting-order number badge (replaces the star for hitters) */
.ca-tf-spot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 3px; border-radius: 4px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 10px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ca-tf-th  { text-align: center !important; }
.ca-tf-cell { text-align: center !important; vertical-align: middle; }
.ca-tf-dash { color: var(--text-disabled); }

.ca-tf-recent { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; }
.ca-tf-reclbl { font-weight: 800; color: var(--text-secondary); letter-spacing: 0.3px; }
.ca-tf-recent .ca-num { color: var(--text); font-weight: 700; }
.ca-tf-recbase { color: var(--text-disabled); }
/* Season key-averages line (e.g. "2.6 bases/gm · .285 AVG") */
.ca-tf-kavg-val { color: var(--text-secondary); font-weight: 700; }
.ca-tf-kavg-lbl { color: var(--text-tertiary); }
.ca-tf-kavg-sep { color: var(--text-disabled); margin: 0 5px; }

/* Usage / role trend */
.ca-tf-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ca-tf-arrow { font-size: 10px; }
.ca-tf-unit { font-size: 9.5px; color: var(--text-tertiary); font-weight: 700; }
.ca-tf-trend--up   { color: var(--accent-win); }
.ca-tf-trend--down { color: var(--accent-live); }
.ca-tf-trend--flat { color: var(--text-tertiary); }

/* Home/road + vs-opponent splits */
.ca-tf-splits { display: inline-flex; flex-direction: column; gap: 1px; font-size: 11px; line-height: 1.35; }
.ca-tf-split-stat { font-size: 9px; font-weight: 800; letter-spacing: 0.4px; color: var(--text-tertiary); text-transform: uppercase; }
.ca-tf-split-ha  { color: var(--text-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }
.ca-tf-split-opp { color: var(--accent-warning); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Status chip (injury / return / active) + one-line note beneath */
.ca-tf-statuswrap { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.ca-tf-statusnote { font-size: 9.5px; color: var(--text-tertiary); line-height: 1.25; max-width: 132px; white-space: normal; }
.ca-tf-status {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.3px; white-space: nowrap;
}
.ca-tf-status--out   { background: rgba(239,68,68,0.16);  color: #f87171; }
.ca-tf-status--quest { background: rgba(245,158,11,0.16); color: #fbbf24; }
.ca-tf-status--prob  { background: rgba(34,197,94,0.14);  color: #4ade80; }
.ca-tf-status--back  { background: rgba(56,189,248,0.16); color: #38bdf8; }
.ca-tf-status--ok    { background: var(--surface2);       color: var(--text-tertiary); }

/* Tennis: single-player card */
.ca-tf-tennis {
  display: flex; align-items: center; flex-wrap: wrap; gap: 22px 30px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px;
}
.ca-tf-tennis-name { font-size: 18px; font-weight: 800; color: var(--text); }
.ca-tf-tennis-dials { display: flex; gap: 20px; }
.ca-tf-tennis-dial { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ca-tf-tennis-diallbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-tertiary); font-weight: 700; }
.ca-tf-tennis-stats { display: flex; gap: 22px; margin-left: auto; }

@media (max-width: 640px) {
  .ca-tf-tennis-stats { margin-left: 0; }
}

/* ── Live command bar (MLB v1) ─────────────────────────────────────────────── */
.ca-live-command { margin: 0; }
.ca-lc-loading { color: var(--text-tertiary); font-size: 13px; padding: 14px; text-align: center; }
/* Live portion: a flat dark-gray band that fills the panel (no bordered "bubble"),
   butting cleanly under the header. Everything lives inside its padding. */
.ca-lc {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-secondary, #0d1117); padding: 14px 22px 16px;
}
.ca-lc-grid {
  display: grid; grid-template-columns: minmax(210px, 1.1fr) minmax(165px, 1fr); gap: 18px;
}
.ca-lc-cell { min-width: 0; }
.ca-lc-cell-hd { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; white-space: nowrap; }
.ca-lc-hd-live { color: var(--accent-live-score, #38bdf8); }
.ca-lc-hd-final { color: var(--text-secondary); }
.ca-lc-livedot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-live-score, #38bdf8); animation: ca-live-dot 1.4s ease-in-out infinite; flex-shrink: 0; }

/* Line score: team name + per-inning runs (builds out) + R / H / E */
.ca-ls { display: flex; flex-direction: column; gap: 1px; font-variant-numeric: tabular-nums; }
.ca-ls-row { display: flex; align-items: center; padding: 3px 6px; margin: 0 -6px; border-radius: 6px; }
.ca-ls-team { flex: 1 1 auto; min-width: 46px; font-size: 13px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-ls-inns { display: flex; flex: none; }
.ca-ls-i { width: 13px; text-align: center; font-size: 10.5px; color: var(--text-secondary); }
.ca-ls-r, .ca-ls-c { flex: none; text-align: center; }
.ca-ls-r { width: 19px; font-size: 15px; font-weight: 800; color: var(--text); border-left: 1px solid var(--border); margin-left: 5px; }
.ca-ls-c { width: 17px; font-size: 11px; color: var(--text-tertiary); }
.ca-ls-hd .ca-ls-i, .ca-ls-hd .ca-ls-r, .ca-ls-hd .ca-ls-c { font-size: 9px; font-weight: 800; color: var(--text-tertiary); }
.ca-ls-hd .ca-ls-r { color: var(--text-tertiary); }
.ca-ls-row--lead { background: rgba(255, 215, 0, 0.07); }
.ca-ls-row--lead .ca-ls-r { color: var(--accent-live, #FFD700); }
/* Live/Final badge sits in the line score's (otherwise empty) header cell. */
.ca-ls-status { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ca-ls-status--live { color: var(--accent-live-score, #38bdf8); }
.ca-ls-status--final { color: var(--text-secondary); }

.ca-lc-stateline { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ca-lc-stateline:last-child { margin-bottom: 0; }   /* situation-only cells (clock sports) */
.ca-lc-diamond { flex-shrink: 0; }
.ca-lc-base { fill: none; stroke: #475569; stroke-width: 1.5; }
.ca-lc-base--on { fill: #FFD700; stroke: #FFD700; }
.ca-lc-home { fill: #475569; }
.ca-lc-state-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ca-lc-half { font-weight: 800; font-size: 18px; color: var(--text); white-space: nowrap; }
.ca-lc-count { display: flex; align-items: center; gap: 6px; }
.ca-lc-count-lbl { font-size: 10px; font-weight: 800; color: var(--text-tertiary); text-transform: uppercase; margin-right: 1px; }
.ca-lc-pip { width: 9px; height: 9px; border-radius: 50%; border: 1px solid #475569; display: inline-block; box-sizing: border-box; }
.ca-lc-pip--on.ca-lc-pip--ball   { background: #22c55e; border-color: #22c55e; }
.ca-lc-pip--on.ca-lc-pip--strike { background: #f59e0b; border-color: #f59e0b; }
.ca-lc-pip--on.ca-lc-pip--out    { background: #ef4444; border-color: #ef4444; }

.ca-lc-matchwrap { min-width: 0; }
.ca-lc-matchup { display: flex; flex-direction: column; gap: 6px; }
.ca-lc-mrow { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; min-width: 0; }
.ca-lc-mlbl { font-size: 9px; font-weight: 800; color: var(--text-tertiary); text-transform: uppercase; flex-shrink: 0; min-width: 18px; }
.ca-lc-mname { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-lc-mline { color: var(--text-tertiary); font-size: 11px; white-space: nowrap; }
.ca-lc-mrow--empty, .ca-lc-mrow--ondeck { color: var(--text-tertiary); }

/* Value pulse: signed windowed line chart (-100..+100), lives in its tab panel. */
.ca-lc-pulse-panel { display: flex; flex-direction: column; }
.ca-lc-pulse-panel .ca-vp-wrap { max-width: 640px; }
/* Column alignment: score = scoreboard top; matchup = centered. */
.ca-lc-cell--score { display: flex; flex-direction: column; }
.ca-lc-cell--matchup { display: flex; flex-direction: column; justify-content: center; }
.ca-vp-wrap { width: 100%; line-height: 0; }
.ca-vp { width: 100%; height: auto; display: block; }
.ca-vp-grid { stroke: #2a3344; stroke-width: 1; }
.ca-vp-zero { stroke: #4a5568; stroke-width: 1; stroke-dasharray: 3 3; }
.ca-vp-xgrid { stroke: #232a38; stroke-width: 1; }
.ca-vp-line { stroke-dasharray: 1; animation: ca-vp-draw 0.9s ease-out; }
@keyframes ca-vp-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.ca-vp-ping { transform-box: fill-box; transform-origin: center; animation: ca-vp-ping 1.8s ease-out infinite; }
@keyframes ca-vp-ping { 0% { transform: scale(1); opacity: 0.5; } 70%, 100% { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ca-vp-line { animation: none; stroke-dasharray: none; }
  .ca-vp-ping { animation: none; opacity: 0; }
}
.ca-vp-axis { fill: var(--text-tertiary); font-size: 9px; font-weight: 600; font-family: 'Inter', system-ui, sans-serif; }
.ca-vp-axis--zero { fill: var(--text-secondary); font-weight: 700; }
.ca-vp-xaxis { fill: var(--text-tertiary); font-size: 9px; font-weight: 700; font-family: 'Inter', system-ui, sans-serif; }
/* The current pulse value is the headline number — big enough to read at a glance. */
.ca-vp-val { font-weight: 800; font-variant-numeric: tabular-nums; margin-left: 2px; font-size: 18px; line-height: 1; }
.ca-blurred { filter: blur(3px); opacity: 0.65; pointer-events: none; }
.ca-lc-pulse-label { font-size: 12.5px; font-weight: 700; color: var(--text); margin-top: 7px; display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 5px; }
/* The pick the pulse is reading ("Reds Win", "Over 8.5") leads the label line. */
.ca-lc-pulse-pick { font-weight: 800; color: var(--text); white-space: nowrap; }
.ca-lc-pulse-pick::after { content: '·'; color: var(--text-tertiary); margin-left: 5px; }
.ca-lc-pulse-caret { font-size: 11px; }
.ca-lc-pulse-final { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.ca-lc-pulse-approx { font-size: 9px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.ca-lc-pulse-note { font-size: 10px; color: var(--text-tertiary); text-decoration: underline dotted; cursor: help; align-self: flex-start; margin-top: 4px; }
.ca-lc-pulse-empty { font-size: 12px; color: var(--text-tertiary); }
.ca-lc-pulse-locked { cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.ca-lc-pulse-lock { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.ca-lc-pulse-lock i { color: var(--accent-live, #FFD700); margin-right: 4px; }
.ca-lc-pulse-sub { font-size: 11px; color: var(--text-tertiary); }
.ca-lc-pulse-sub a { color: var(--accent); cursor: pointer; }

/* Tracked bets: full-width row between the command grid and the tab strip. */
.ca-lc-betsrow { margin-top: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ca-lc-foot-lbl { flex: none; white-space: nowrap; font-size: 10px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-tertiary); }
.ca-lc-foot-bets { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
/* Start / scheduled time under the value pulse panel. */
.ca-lc-time { margin-top: 10px; font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }
.ca-lc-time .ca-dp-timeline-sched { color: var(--text-disabled, #6b7280); }
.ca-live-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.ca-live-tag { font-size: 12px; font-weight: 700; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: 14px; padding: 4px 11px; }
.ca-live-tag--none { color: var(--text-tertiary); font-weight: 600; }

/* ── Per-sport situation cells (football / basketball / hockey / soccer / tennis) ── */
.ca-lc-stateline--col { flex-direction: column; align-items: flex-start; gap: 6px; }
.ca-lc-lastplay { font-size: 11.5px; color: var(--text-secondary); line-height: 1.35; }
.ca-lc-pip--on.ca-lc-pip--to { background: #38bdf8; border-color: #38bdf8; }
.ca-lc-dd { font-size: 13px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ca-lc-dd--rz { color: #f87171; }
.ca-lc-poss { color: var(--accent); font-weight: 800; }
.ca-lc-poss i { font-size: 10px; }
.ca-lc-rz { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #f87171; border: 1px solid rgba(248,113,113,0.4); border-radius: 4px; padding: 1px 5px; }
.ca-lc-run { font-size: 10.5px; font-weight: 800; color: #FFD700; border: 1px solid rgba(255,215,0,0.35); border-radius: 10px; padding: 2px 8px; }
.ca-lc-pp { font-size: 10.5px; font-weight: 800; color: #38bdf8; border: 1px solid rgba(56,189,248,0.4); border-radius: 10px; padding: 2px 8px; }
.ca-lc-pp--en { color: #f87171; border-color: rgba(248,113,113,0.4); }
.ca-lc-sog { font-size: 11.5px; color: var(--text-secondary); }
.ca-lc-sog b { color: var(--text); }
.ca-lc-serve { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #a3e635; vertical-align: middle; }
.ca-lc-kevents { display: flex; flex-direction: column; gap: 3px; }
.ca-lc-kev { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); }
.ca-lc-kev i { font-size: 10px; color: var(--text); width: 12px; text-align: center; }
.ca-lc-kev-min { font-weight: 700; color: var(--text-tertiary); min-width: 26px; }
.ca-card { display: inline-block; width: 8px; height: 11px; border-radius: 2px; }
.ca-card--y { background: #facc15; }
.ca-card--r { background: #ef4444; }
.ca-lc-sbar { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-secondary); width: 100%; }
.ca-lc-sbar-t { flex: 1 1 auto; height: 5px; background: rgba(56,189,248,0.7); border-radius: 3px; overflow: hidden; min-width: 50px; }
.ca-lc-sbar-h { height: 100%; background: rgba(255,215,0,0.75); float: right; }
.ca-lc-sbar-lbl { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); }
.ca-ls-i--won { color: var(--text); font-weight: 800; }
.ca-ls-i sup { font-size: 7.5px; margin-left: 1px; color: var(--text-tertiary); }
.ca-lc-pulse-wp { font-size: 10.5px; font-weight: 800; color: var(--text-secondary); margin-left: 6px; }

/* ── Tab strip + panels under the command grid ─────────────────────────────── */
.ca-lc-tabs { display: flex; gap: 4px; margin-top: 14px; border-bottom: 1px solid var(--border); }
.ca-lc-tab { appearance: none; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-tertiary); font: inherit; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.ca-lc-tab .ca-lc-livedot { display: inline-block; vertical-align: middle; margin: -1px 0 0 3px; }
.ca-lc-tab:hover { color: var(--text-secondary); }
.ca-lc-tab--on { color: var(--text); border-bottom-color: var(--accent); }
.ca-lc-panel { padding: 12px 2px 4px; }
.ca-lc-panel-empty { font-size: 12px; color: var(--text-tertiary); padding: 10px 4px; }

/* Play-by-play feed */
.ca-lc-scoring-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--text-secondary); cursor: pointer; margin-bottom: 8px; }
.ca-lc-drive { font-size: 11.5px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.ca-lc-plays { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow-y: auto; }
.ca-lc-play { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--text-secondary); padding: 4px 6px; border-radius: 6px; }
.ca-lc-play--score { background: var(--surface2); color: var(--text); font-weight: 600; }
.ca-lc-play-when { flex: none; min-width: 52px; font-size: 10.5px; font-weight: 700; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.ca-lc-play-team { flex: none; min-width: 34px; font-size: 10.5px; font-weight: 800; color: var(--text-tertiary); }
.ca-lc-play-text { flex: 1 1 auto; line-height: 1.35; }
.ca-lc-play-score { flex: none; font-weight: 800; color: var(--text); }

/* Leaders */
.ca-lc-ldr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ca-lc-ldr-team { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); margin-bottom: 7px; }
.ca-lc-ldr { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
.ca-lc-ldr-hs { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface2); flex: none; }
.ca-lc-ldr-body { min-width: 0; }
.ca-lc-ldr-name { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-lc-ldr-pos { font-size: 10px; font-weight: 700; color: var(--text-tertiary); }
.ca-lc-ldr-line { font-size: 11px; color: var(--text-secondary); }
.ca-lc-ldr-cat { font-weight: 800; text-transform: uppercase; font-size: 9px; letter-spacing: 0.04em; color: var(--text-tertiary); margin-right: 3px; }

/* Team stats bars */
.ca-lc-stat-head { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); margin-bottom: 6px; }
.ca-lc-stats { display: flex; flex-direction: column; gap: 7px; max-width: 620px; }
.ca-lc-stat-row { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 10px; }
.ca-lc-stat-v { font-size: 12px; font-weight: 700; color: var(--text); text-align: center; }
.ca-lc-stat-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ca-lc-sbar-t--stats { width: 100%; }
.ca-lc-stat-lbl { font-size: 10px; font-weight: 700; color: var(--text-tertiary); }

@media (max-width: 720px) {
  .ca-lc-ldr-grid { grid-template-columns: 1fr; }
  .ca-lc-stat-row { grid-template-columns: 44px 1fr 44px; }
}

/* Header unlock badge (live games, non-paid): clickable pay prompt that centers in the
   gap between the conviction graph and the score, vertically centered in the header. */
.ca-dp-hdr-unlock {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  align-self: center; cursor: pointer; padding: 8px 14px; border-radius: 9px;
  background: rgba(59,130,246,0.10); border: 1px solid rgba(59,130,246,0.30);
  transition: background 0.15s;
}
.ca-dp-hdr-unlock:hover { background: rgba(59,130,246,0.18); }
.ca-dp-hdr-unlock-1 { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold, #facc15); white-space: nowrap; }
.ca-dp-hdr-unlock-1 i { margin-right: 3px; }
.ca-dp-hdr-unlock-2 { font-size: 11.5px; font-weight: 700; color: var(--text); white-space: nowrap; }
.ca-dp-hdr-unlock-3 { font-size: 11px; font-weight: 800; color: var(--accent); white-space: nowrap; }

/* CA logo on the conviction-curve label */
.ca-dp-col-label--conv { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ca-dp-conv-logo { height: 14px; width: auto; aspect-ratio: 440 / 305; object-fit: contain; border-radius: 3px; flex: none; }

/* Live header: fixed height so the bar never resizes as the pick is flipped. The
   pick name takes its natural width; the score is pushed to the far right. */
.ca-dp-header--live { align-items: flex-start; min-height: 122px; box-sizing: border-box; }
.ca-dp-header--live .ca-dp-hdr-left { flex: 0 1 auto; }
/* Lead group = pick name + conviction together; the score sits at the far right and
   (when present) the unlock badge centers in the gap between them. */
.ca-dp-hdr-lead { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }

/* In-header conviction widget (per-pick): a self-contained bubble with the CA-branded
   annotated curve, placed in the empty header space right of the pick name. Fixed
   footprint keeps the header bar solid across picks. */
.ca-dp-hdr-conv {
  flex: 0 0 auto; width: 244px;
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg-tertiary, #11151e); border: 1px solid var(--border);
  border-radius: 12px; padding: 7px 10px 5px;
}
.ca-dp-hdr-conv-top { display: flex; align-items: center; gap: 8px; height: 14px; }
.ca-dp-hdr-conv-lbl { display: flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-tertiary); white-space: nowrap; }
.ca-dp-hdr-conv-logo { height: 13px; width: auto; aspect-ratio: 440 / 305; object-fit: contain; border-radius: 3px; flex: none; }
.ca-dp-hdr-conv-graph { height: 58px; width: 100%; }
.ca-cc { display: block; width: 100%; height: 100%; }
.ca-cc-mvp { stroke: #3a4456; stroke-width: 1; stroke-dasharray: 3 3; }
.ca-cc-delta { fill: #d4af37; font-size: 7px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.ca-cc-time { fill: var(--text-disabled, #6b7280); font-size: 7px; font-weight: 700; }
.ca-dp-hdr-conv-graph--msg { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-tertiary); font-style: italic; }
/* Non-paid: real curve replaced by a blurred synthetic teaser + lock, same treatment
   as the pre-game conviction chart (.ca-dp-timeline-wrap.is-locked). */
.ca-dp-hdr-conv-graph--locked { position: relative; cursor: pointer; }
.ca-dp-hdr-conv-blur { height: 100%; filter: blur(2px); opacity: 0.85; }
.ca-dp-hdr-conv-blur .ca-cc { height: 100%; }
.ca-dp-hdr-conv-lockover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px;
  color: var(--gold, #facc15); text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.ca-dp-hdr-conv-lockover i { font-size: 13px; }
.ca-dp-hdr-conv-lockover span { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

/* Conviction curve minimized once the game is live (non-MLB live games only). */
.ca-dp-timeline-wrap.is-live { height: 56px; opacity: 0.85; }
.ca-dp-grid--live .ca-dp-timeline-footer { font-size: 10px; opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  .ca-lc-livedot { animation: none; }
}
/* Live header on condensed screens: pick name left + score top right on the SAME
   row; the conviction bubble drops to its own full-width row below. (display:
   contents promotes the lead group's children to header flex items so they can be
   reordered.) Breakpoint is 1080 rather than 720 because the one-row live header
   (name + 244px conviction + unlock badge + score) needs a wide panel — below
   this it crushed the pick name to zero width. */
@media (max-width: 1080px) {
  .ca-dp-header--live { flex-wrap: wrap; min-height: 0; row-gap: 10px; }
  .ca-dp-header--live .ca-dp-hdr-lead { display: contents; }
  .ca-dp-header--live .ca-dp-hdr-left { order: 1; flex: 1 1 0; min-width: 0; }
  .ca-dp-header--live .ca-dp-hdr-right { order: 2; gap: 3px; }
  .ca-dp-header--live .ca-dp-hdr-conv { order: 3; width: 100%; }
  .ca-dp-header--live .ca-dp-hdr-unlock { order: 4; align-self: flex-start; margin-top: 0; }
}

@media (max-width: 720px) {
  .ca-dp-header--live .ca-dp-score-big { font-size: 26px; }

  .ca-lc { padding: 12px 16px 14px; }
  .ca-lc-grid { grid-template-columns: 1fr; gap: 14px; }

  /* Baseball: diamond + count on the left, "At the plate" beside it — one compact
     band instead of two stacked blocks. */
  .ca-lc-cell--matchup.ca-lc-fam-baseball { flex-direction: row; align-items: center; gap: 14px; }
  .ca-lc-fam-baseball .ca-lc-stateline { margin-bottom: 0; flex: 0 0 auto; gap: 10px; }
  .ca-lc-fam-baseball .ca-lc-matchwrap { flex: 1 1 auto; min-width: 0; }
  .ca-lc-fam-baseball .ca-lc-diamond { width: 46px; height: 46px; }
  .ca-lc-fam-baseball .ca-lc-half { font-size: 15px; }
}
