/* MLB Game Detail â /mlb/game/<slug>
   Scoped under #mlb-game-detail so nothing leaks into the schedule / workbench.
   Sections: shared layout, matchup header, injuries, lineups, props, weather (wx-*). */

/* Isolated container â sits inside .main-content (horizontal flex)
   but we force it to be a full-width vertical stack with tight gaps. */
#mlb-game-detail {
  flex: 1 1 auto;
  min-width: 0;
  padding: 16px 20px 32px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#mlb-game-detail * { box-sizing: border-box; }
#mlb-game-detail h3, #mlb-game-detail p { margin: 0; }

/* âââ Live-tracker design tokens (from mlb-demo.html) âââ
   Declared on both the page container AND .pbr-modal â the detail modal lives
   on document.body, outside #mlb-game-detail, so it needs its own copy. */
#mlb-game-detail, .pbr-modal {
  --gd-surface: #0B0C10;
  --gd-surface-2: #12141A;
  --gd-surface-3: #191C24;
  --gd-line: rgba(255, 255, 255, .07);
  --gd-line-strong: rgba(255, 255, 255, .12);
  --gd-text: #F4F5F7;
  --gd-text-2: #9298A6;
  --gd-text-3: #565D6B;
  --gd-ball: #3DDC84;
  --gd-strike: #FF5C5C;
  --gd-inplay: #5AA9FF;
  --gd-live: #FF3B47;
  --gd-radius: 14px;
  --gd-font-body: 'Inter', system-ui, sans-serif;
  --gd-font-display: 'Barlow Condensed', 'Avenir', sans-serif;
  --gd-font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
}
/* The tracker surfaces read in Inter 400 like the demo â the site body stack
   ("Avenir", weight 200) would otherwise leak in on macOS/iOS. Scoped to the
   new surfaces so the Overview/Props/Weather tabs keep their existing look. */
.mlb-gd-topbar, .mlb-gd-sb, #mlb-pbp-root, .pbr-modal {
  font-family: var(--gd-font-body);
  font-weight: 400;
}

/* âââ Tabs (underline row, demo style) âââ */
#mlb-game-detail .mlb-gd-tabs {
  display: flex;
  gap: 4px;
  margin: 2px 0 0;
  padding: 0;
  border-bottom: 1px solid var(--gd-line);
}
#mlb-game-detail .mlb-gd-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 16px 12px;
  font-family: var(--gd-font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--gd-text-2);
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color .15s ease;
}
#mlb-game-detail .mlb-gd-tab:hover { color: var(--gd-text); }
#mlb-game-detail .mlb-gd-tab.is-active {
  color: var(--gd-text);
  border-bottom-color: var(--gd-text);
}
.mlb-gd-tdot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gd-live);
  animation: mlbGdPulse 1.6s ease-in-out infinite;
}
#mlb-game-detail .mlb-gd-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
#mlb-game-detail .mlb-gd-tab-panel[hidden] { display: none; }

/* âââ Section cards âââ */
#mlb-game-detail .mlb-gd-card {
  padding: 14px 16px;
  margin: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
}

/* âââ Topbar (back link + venue meta) âââ */
.mlb-gd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 0;
}
.mlb-gd-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 0;
  background: transparent;
  border: none;
  color: var(--gd-text-2);
  font-family: var(--gd-font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s ease;
}
.mlb-gd-back:hover { color: var(--gd-text); background: transparent; }
.mlb-gd-back svg { flex: none; }
.mlb-gd-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--gd-font-mono);
  font-size: 11px;
  color: var(--gd-text-3);
  letter-spacing: .04em;
  min-width: 0;
  text-align: right;
}
.mlb-gd-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gd-text-3); flex: none; }

/* âââ Scoreboard card âââ */
.mlb-gd-sb {
  background: linear-gradient(180deg, var(--gd-surface-2), var(--gd-surface));
  border: 1px solid var(--gd-line);
  border-radius: var(--gd-radius);
  overflow: hidden;
}
.mlb-gd-sb-main {
  display: grid;
  grid-template-columns: 1fr minmax(220px, auto) 1fr;
  align-items: center;
  padding: 28px 36px 24px;
  gap: 24px;
}
.mlb-gd-team { display: flex; align-items: center; gap: 18px; min-width: 0; }
.mlb-gd-team-away { justify-content: flex-start; }
.mlb-gd-team-home { justify-content: flex-end; flex-direction: row-reverse; }
.mlb-gd-team-logo { width: 54px; height: 54px; object-fit: contain; flex: none; }
.mlb-gd-team-nick { display: none; }
.mlb-gd-team-info { min-width: 0; }
.mlb-gd-team-home .mlb-gd-team-info { text-align: right; }
.mlb-gd-team-code {
  font-family: var(--gd-font-display);
  font-size: 26px; font-weight: 700;
  letter-spacing: .04em; line-height: 1;
  color: var(--gd-text);
}
.mlb-gd-team-name { font-size: 12px; color: var(--gd-text-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mlb-gd-team-score {
  font-family: var(--gd-font-display);
  font-weight: 700;
  font-size: 64px; line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-left: auto; padding-left: 20px;
  color: var(--gd-text);
}
.mlb-gd-team-home .mlb-gd-team-score { margin-left: 0; margin-right: auto; padding-left: 0; padding-right: 20px; }
.mlb-gd-team-score.trailing { color: var(--gd-text-3); }
.mlb-gd-team-score[hidden] { display: none; }

/* center game-state module (pregame: start time Â· live: chip/inning/bases/count) */
.mlb-gd-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 0 12px;
}
.mlb-gd-when-time {
  font-family: var(--gd-font-display);
  font-size: 22px; font-weight: 600; letter-spacing: .08em;
  color: var(--gd-text); line-height: 1;
}
.mlb-gd-when-date {
  font-family: var(--gd-font-mono);
  font-size: 11px; color: var(--gd-text-2); letter-spacing: .04em;
}
.mlb-gd-live-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--gd-font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: .14em;
  color: var(--gd-live);
  border: 1px solid rgba(255, 59, 71, .35);
  background: rgba(255, 59, 71, .08);
  padding: 4px 10px; border-radius: 99px;
}
.mlb-gd-final-chip {
  display: inline-flex; align-items: center;
  font-family: var(--gd-font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: .14em;
  color: var(--gd-text-2);
  border: 1px solid var(--gd-line-strong);
  background: rgba(255, 255, 255, .04);
  padding: 4px 10px; border-radius: 99px;
}
.mlb-gd-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gd-live);
  animation: mlbGdPulse 1.6s ease-in-out infinite;
}
@keyframes mlbGdPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 59, 71, .5); }
  50% { opacity: .55; box-shadow: 0 0 0 5px rgba(255, 59, 71, 0); }
}
.mlb-gd-inning {
  font-family: var(--gd-font-display);
  font-weight: 600; font-size: 17px; letter-spacing: .16em;
  color: var(--gd-text);
  display: flex; align-items: center; gap: 7px;
}
.mlb-gd-inning svg { flex: none; }
.mlb-gd-basecount { display: flex; align-items: center; gap: 18px; }
.mlb-gd-bases { flex: none; }
.mlb-gd-count-col { display: flex; flex-direction: column; gap: 6px; }
.mlb-gd-count-row { display: flex; align-items: center; gap: 6px; }
.mlb-gd-count-label {
  font-family: var(--gd-font-mono);
  font-size: 10px; font-weight: 600;
  color: var(--gd-text-3); width: 12px; letter-spacing: .05em;
}
.mlb-gd-pip { width: 9px; height: 9px; border-radius: 50%; background: var(--gd-surface-3); border: 1px solid var(--gd-line-strong); }
.mlb-gd-pip.ball { background: var(--gd-ball); border-color: var(--gd-ball); }
.mlb-gd-pip.strike { background: var(--gd-strike); border-color: var(--gd-strike); }
.mlb-gd-pip.out { background: var(--gd-text-2); border-color: var(--gd-text-2); }

/* line score (built from the PA feed by the PBP module) */
.mlb-gd-linescore {
  border-top: 1px solid var(--gd-line);
  background: rgba(255, 255, 255, .012);
  padding: 12px 36px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.mlb-gd-linescore::-webkit-scrollbar { display: none; }
.mlb-gd-linescore[hidden] { display: none; }
.mlb-gd-linescore table {
  width: 100%; border-collapse: collapse;
  font-family: var(--gd-font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.mlb-gd-linescore th {
  font-weight: 500; color: var(--gd-text-3); font-size: 10px; letter-spacing: .08em;
  padding: 4px 0; text-align: center; min-width: 28px;
}
.mlb-gd-linescore th:first-child { text-align: left; min-width: 60px; }
.mlb-gd-linescore td { padding: 5px 0; text-align: center; color: var(--gd-text-2); }
.mlb-gd-linescore td:first-child {
  text-align: left; font-family: var(--gd-font-body); font-weight: 600;
  font-size: 12px; color: var(--gd-text); white-space: nowrap;
}
.mlb-gd-linescore td.current { color: var(--gd-text); background: rgba(255, 255, 255, .045); border-radius: 4px; }
.mlb-gd-linescore .rhe { color: var(--gd-text); font-weight: 600; }
.mlb-gd-linescore .sep { border-left: 1px solid var(--gd-line); }
.mlb-gd-ls-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
/* replay challenges remaining (diamond pips after the team code) */
.mlb-gd-ls-chal { margin-left: 7px; font-size: 8px; color: #F4D03F; letter-spacing: 2px; vertical-align: 1px; }
/* âââ Starting pitchers (Overview tab) âââ */
.mlb-gd-sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mlb-gd-sp-card {
  padding: 16px;
  background: linear-gradient(180deg, rgba(148,163,184,.06), rgba(148,163,184,.02));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 14px;
}
.mlb-gd-sp-top { display: flex; gap: 14px; align-items: center; min-width: 0; }
.mlb-gd-sp-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: rgba(148,163,184,.08);
  border: 1px solid rgba(255,255,255,.06);
}
.mlb-gd-sp-avatar.is-fallback { object-fit: contain; padding: 8px; }
.mlb-gd-sp-head { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mlb-gd-sp-team-tag {
  display: flex; align-items: center; gap: 6px;
  font-size: .65rem; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .1em; font-weight: 700;
}
.mlb-gd-sp-team-logo { width: 16px; height: 16px; object-fit: contain; }
.mlb-gd-sp-name {
  font-size: 1.25rem; font-weight: 700; color: #f8fafc;
  line-height: 1.15; letter-spacing: -.01em;
  text-decoration: none;
}
.mlb-gd-sp-name:hover { color: #67e8f9; text-decoration: underline; }
.mlb-gd-sp-chips { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.mlb-gd-sp-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  font-size: .65rem; font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase; letter-spacing: .06em;
}
.mlb-gd-sp-chip-hand {
  background: rgba(239,68,68,.12); color: #fca5a5;
  border: 1px solid rgba(239,68,68,.28);
}
.mlb-gd-sp-chip-record {
  background: rgba(148,163,184,.08); color: #cbd5e1;
  border: 1px solid rgba(148,163,184,.16);
  text-transform: none; letter-spacing: 0; font-weight: 500;
}
.mlb-gd-sp-chip-record b { color: #f8fafc; font-weight: 700; margin-left: 2px; }

.mlb-gd-sp-tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 2px;
}
.mlb-gd-sp-tab {
  background: none; border: none;
  color: #94a3b8;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 120ms ease, border-color 120ms ease;
}
.mlb-gd-sp-tab:hover { color: #e2e8f0; }
.mlb-gd-sp-tab.is-active {
  color: #67e8f9;
  border-bottom-color: #22d3ee;
}
.mlb-gd-sp-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.mlb-gd-sp-stats-grid[hidden] { display: none; }
.mlb-gd-sp-split-panel[hidden] { display: none; }

/* Hand-split table (Against Hitters tab) */
.mlb-gd-sp-split-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  color: #e2e8f0;
}
.mlb-gd-sp-split-table thead th {
  font-size: .6rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  padding: 6px 6px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.mlb-gd-sp-split-table thead th:first-child { text-align: left; }
.mlb-gd-sp-split-table tbody td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.mlb-gd-sp-split-table tbody tr:last-child td { border-bottom: none; }
.mlb-gd-sp-split-table .sp-split-label {
  text-align: left;
  font-weight: 700;
  color: #67e8f9;
  letter-spacing: .02em;
  font-size: .78rem;
}
.mlb-gd-sp-split-table .sp-split-empty-cell {
  color: #64748b;
  font-style: italic;
}
.mlb-gd-sp-split-empty {
  padding: 20px 8px;
  text-align: center;
  color: #64748b;
  font-style: italic;
  font-size: .85rem;
}
/* Arsenal table â pitch-type name gets a colored dot */
.mlb-gd-sp-arsenal-table .sp-arsenal-name {
  text-align: left;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
}
.mlb-gd-sp-arsenal-table .sp-arsenal-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* Tiered color classes â match the player dashboard Q2 palette so the
   two views read identically. */
.mlb-gd-sp-split-table .sp-split-green-3 { background: rgba(34, 197, 94, 0.30); color: #bbf7d0; font-weight: 700; }
.mlb-gd-sp-split-table .sp-split-green-2 { background: rgba(34, 197, 94, 0.18); color: #d9f99d; }
.mlb-gd-sp-split-table .sp-split-green-1 { background: rgba(34, 197, 94, 0.09); color: #ecfccb; }
.mlb-gd-sp-split-table .sp-split-red-1   { background: rgba(239, 68, 68, 0.10); color: #fed7aa; }
.mlb-gd-sp-split-table .sp-split-red-2   { background: rgba(239, 68, 68, 0.20); color: #fca5a5; }
.mlb-gd-sp-split-table .sp-split-red-3   { background: rgba(239, 68, 68, 0.32); color: #fecaca; font-weight: 700; }
.mlb-gd-sp-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px;
  background: rgba(148,163,184,.04);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: 8px;
  min-width: 0;
}
.mlb-gd-sp-stat-label {
  font-size: .6rem; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.mlb-gd-sp-stat-val {
  font-size: 1.1rem; font-weight: 700; color: #f8fafc;
  line-height: 1.1; letter-spacing: -.01em;
  display: inline-flex; align-items: center; gap: 3px;
}
.mlb-gd-sp-stat-base {
  font-size: .6rem; color: #64748b;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.mlb-gd-sp-arrow { font-size: .68rem; line-height: 1; }
.mlb-gd-sp-stat.is-good {
  background: rgba(34,197,94,.07);
  border-color: rgba(34,197,94,.22);
}
.mlb-gd-sp-stat.is-good .mlb-gd-sp-stat-val { color: #4ade80; }
.mlb-gd-sp-stat.is-good .mlb-gd-sp-arrow   { color: #4ade80; }
.mlb-gd-sp-stat.is-bad {
  background: rgba(239,68,68,.06);
  border-color: rgba(239,68,68,.22);
}
.mlb-gd-sp-stat.is-bad .mlb-gd-sp-stat-val { color: #f87171; }
.mlb-gd-sp-stat.is-bad .mlb-gd-sp-arrow    { color: #f87171; }

.mlb-gd-sp-empty-card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  background: rgba(148,163,184,.04);
  border: 1px dashed rgba(255,255,255,.08);
  border-radius: 12px;
}
.mlb-gd-sp-empty-card .mlb-gd-sp-team-logo { width: 40px; height: 40px; }
.mlb-gd-sp-empty { font-size: .88rem; color: #64748b; font-style: italic; }

/* Mobile-only: stretch the game-detail container to fill the viewport
   so the page-level footer is pushed below the fold on every tab â
   Weather's chart-heavy layout naturally fills most screens, but Props
   with an empty "No props posted" card and Overview with a short layout
   leave the footer creeping into view. `min-height: 100dvh` uses the
   dynamic viewport height (accounts for mobile browser chrome that
   shows/hides on scroll); `100vh` is the static fallback for browsers
   that don't support `dvh` yet. The bottom-nav is position: fixed so
   it doesn't claim layout height â main-app-wrapper's padding-bottom
   already keeps content above it, so we don't need to subtract here. */
@media (max-width: 1000px) {
  #mlb-game-detail {
    min-height: 100vh;
    min-height: 100dvh;
  }
}

@media (max-width: 880px) {
  .mlb-gd-sp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .mlb-gd-sp-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
/* âââ Section-level âââ */
.mlb-gd-section-title { margin: 0 0 10px; font-size: .95rem; color: #f8fafc; letter-spacing: .02em; }
.mlb-gd-inj-grid, .mlb-gd-lineup-grid, .mlb-gd-props-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mlb-gd-inj-team, .mlb-gd-lineup-team, .mlb-gd-props-team {
  font-weight: 700; color: #67e8f9;
  font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 6px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* âââ Injuries âââ */
.mlb-gd-inj-row { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.mlb-gd-inj-row:last-child { border-bottom: none; }
.mlb-gd-inj-name { font-size: .88rem; color: #e2e8f0; font-weight: 500; }
.mlb-gd-inj-pos { margin-left: 8px; font-size: .68rem; color: #64748b; text-transform: uppercase; }
.mlb-gd-inj-status {
  display: inline-block; margin-top: 3px; padding: 1px 7px;
  font-size: .65rem; border-radius: 999px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  background: rgba(239, 68, 68, .12); color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, .28);
}
.mlb-gd-inj-status-day-to-day { background: rgba(245, 158, 11, .12); color: #fcd34d; border-color: rgba(245, 158, 11, .28); }
.mlb-gd-inj-desc { font-size: .76rem; color: #94a3b8; margin-top: 2px; }
.mlb-gd-inj-return { font-size: .7rem; color: #64748b; margin-top: 1px; }
.mlb-gd-inj-empty, .mlb-gd-empty { font-size: .82rem; color: #64748b; font-style: italic; padding: 6px 0; }

/* âââ Lineup tables âââ */
.mlb-gd-lineup-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.mlb-gd-lineup-table th {
  text-align: left; color: #94a3b8;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  padding: 6px; border-bottom: 1px solid rgba(255,255,255,.06); font-weight: 600;
}
.mlb-gd-lineup-table td { padding: 8px 6px; color: #e2e8f0; border-bottom: 1px solid rgba(255,255,255,.03); vertical-align: middle; }
.mlb-gd-lineup-table tr:last-child td { border-bottom: none; }
.mlb-gd-order { font-weight: 700; color: #67e8f9; width: 24px; }

/* Batter cell â avatar + name + confirmed / hand chips. */
.mlb-gd-lineup-batter {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mlb-gd-lineup-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(148,163,184,.08);
  border: 1px solid rgba(255,255,255,.06);
}
.mlb-gd-lineup-avatar.is-fallback { object-fit: contain; padding: 4px; }
.mlb-gd-lineup-name-col {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.mlb-gd-lineup-name-link {
  font-weight: 600; color: #e2e8f0;
  text-decoration: none; font-size: .9rem;
  line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mlb-gd-lineup-name-link:hover { color: #67e8f9; text-decoration: underline; }
.mlb-gd-lineup-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.mlb-gd-lineup-confirmed {
  color: #4ade80; font-weight: 700;
}
.mlb-gd-lineup-confirmed.mlb-gd-lineup-projected {
  color: #f59e0b;
}
.mlb-gd-lineup-hand {
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: .58rem;
  letter-spacing: .06em;
}
.mlb-gd-lineup-hand-r { background: rgba(239,68,68,.14); color: #fca5a5; }
.mlb-gd-lineup-hand-l { background: rgba(79,143,247,.14); color: #7dd3fc; }
.mlb-gd-lineup-hand-s { background: rgba(168,85,247,.14); color: #d8b4fe; }

/* Section header (title + toggle pill group on the right) */
.mlb-gd-section-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.mlb-gd-section-header .mlb-gd-section-title { margin: 0; }

/* Season / vs-SP toggle */
.mlb-gd-lineup-toggle {
  display: inline-flex;
  gap: 4px;
  background: rgba(148, 163, 184, .06);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 999px;
  padding: 2px;
}
.mlb-gd-lineup-pill {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: .03em;
  transition: color 120ms ease, background-color 120ms ease;
}
.mlb-gd-lineup-pill:hover:not(.is-active) { color: #e2e8f0; }
.mlb-gd-lineup-pill.is-active {
  color: #0a1628;
  background: rgba(0, 211, 189, 0.75);
}

/* Each team is its own card. Header is centered: logo + full team name
   + mode toggle (Season / vs SP) stacked; range toggle sits on its own
   centered row below; table scrolls horizontally on narrow screens. */
.mlb-gd-lineup-tablewrap {
  overflow-x: auto;
}
.mlb-gd-lineup-table td[data-stat] {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mlb-gd-lineup-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 4px 0 14px;
  margin-bottom: 10px;
}
.mlb-gd-lineup-logo {
  width: 56px; height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}
.mlb-gd-lineup-head-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.mlb-gd-lineup-team-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -.01em;
  line-height: 1.1;
}

.mlb-gd-lineup-projected-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  border-radius: 999px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Range toggle â right-aligned, compact. Each option is its own
   standalone pill; inactive pills are outlined / muted, the active
   one is filled teal. */
.mlb-gd-lineup-toggle-range {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 0 14px;
  border-radius: 0;
}
.mlb-gd-lineup-toggle-range .mlb-gd-lineup-pill {
  border: 1px solid rgba(255, 255, 255, .10);
  background: transparent;
  padding: 4px 14px;
  font-size: .72rem;
  text-align: center;
}
.mlb-gd-lineup-toggle-range .mlb-gd-lineup-pill:hover:not(.is-active) {
  color: #e2e8f0;
  background: rgba(148, 163, 184, .08);
  border-color: rgba(255, 255, 255, .16);
}
.mlb-gd-lineup-toggle-range .mlb-gd-lineup-pill.is-active {
  color: #0a1628;
  background: rgba(0, 211, 189, 0.75);
  border-color: rgba(0, 211, 189, 0.82);
}

.mlb-gd-lineup-pill:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* Loading dim â while a filter fetch is in flight, dim only that team
   section's table (leave the filter bar interactive so the user can
   flip again or bail). */
.mlb-gd-lineup-section.is-loading .mlb-gd-lineup-tablewrap {
  opacity: 0.5;
  transition: opacity 120ms ease;
  pointer-events: none;
}

/* Tier colors â mirror the player-dashboard Q2 palette so readers get a
   consistent visual language across cards. */
.mlb-gd-lineup-table .lineup-green-3 { background: rgba(34, 197, 94, 0.30); color: #bbf7d0; font-weight: 700; }
.mlb-gd-lineup-table .lineup-green-2 { background: rgba(34, 197, 94, 0.18); color: #d9f99d; }
.mlb-gd-lineup-table .lineup-green-1 { background: rgba(34, 197, 94, 0.09); color: #ecfccb; }
.mlb-gd-lineup-table .lineup-red-1   { background: rgba(239, 68, 68, 0.10); color: #fed7aa; }
.mlb-gd-lineup-table .lineup-red-2   { background: rgba(239, 68, 68, 0.20); color: #fca5a5; }
.mlb-gd-lineup-table .lineup-red-3   { background: rgba(239, 68, 68, 0.32); color: #fecaca; font-weight: 700; }

/* âââ Pitch Mix column â clickable grade pill per batter âââ */
.mlb-gd-pm-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; padding: 4px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(148,163,184,.08);
  color: #cbd5e1;
  font-size: .82rem; font-weight: 700;
  cursor: pointer; user-select: none;
  transition: transform 100ms ease, border-color 100ms, background 100ms;
}
.mlb-gd-pm-pill:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.20); }
.mlb-gd-pm-pill.is-empty { cursor: default; opacity: .5; }
.mlb-gd-pm-pill.is-empty:hover { transform: none; border-color: rgba(255,255,255,.08); }
.mlb-gd-pm-pill.q2-green-3 { background: rgba(34,197,94,.30); color: #bbf7d0; border-color: rgba(34,197,94,.45); }
.mlb-gd-pm-pill.q2-green-2 { background: rgba(34,197,94,.18); color: #d9f99d; border-color: rgba(34,197,94,.30); }
.mlb-gd-pm-pill.q2-red-2   { background: rgba(239,68,68,.20); color: #fca5a5; border-color: rgba(239,68,68,.35); }
.mlb-gd-pm-pill.q2-red-3   { background: rgba(239,68,68,.32); color: #fecaca; border-color: rgba(239,68,68,.50); }

/* âââ Pitch Mix modal âââ */
body.mlb-gd-pm-open { overflow: hidden; }

.mlb-gd-pm-overlay {
  position: fixed; inset: 0; z-index: 1300;   /* above the fixed bottom nav (z-index 1200) */
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: mlb-gd-pm-fade-in 140ms ease;
}
@keyframes mlb-gd-pm-fade-in { from { opacity: 0; } to { opacity: 1; } }

.mlb-gd-pm-modal {
  position: relative;
  background: linear-gradient(180deg, #0f172a 0%, #0a0f1f 100%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  width: min(1000px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 22px 24px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  color: #e2e8f0;
}

.mlb-gd-pm-close {
  position: absolute; top: 10px; right: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  color: #cbd5e1; font-size: 1.1rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 100ms;
}
.mlb-gd-pm-close:hover { background: rgba(255,255,255,.12); }

.mlb-gd-pm-header { margin-bottom: 14px; }
.mlb-gd-pm-matchup-title {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  font-size: 1.05rem; font-weight: 700; color: #f8fafc;
}
.mlb-gd-pm-name { color: #f8fafc; }
.mlb-gd-pm-vs {
  color: #64748b; font-weight: 600;
  font-size: .82rem; text-transform: lowercase;
  letter-spacing: .04em;
  margin: 0 2px;
}
/* Hand chips â red/blue/purple matches the batting-order chips so a
   batter reads as L/R/S the same across the app. */
.mlb-gd-pm-hand {
  font-size: .62rem; font-weight: 700;
  letter-spacing: .4px;
  padding: 2px 7px; border-radius: 4px;
}
.mlb-gd-pm-hand-r { background: rgba(239,68,68,.14);  color: #fca5a5; }
.mlb-gd-pm-hand-l { background: rgba(79,143,247,.14); color: #7dd3fc; }
.mlb-gd-pm-hand-s { background: rgba(168,85,247,.14); color: #d8b4fe; }

/* Rating banner */
.mlb-gd-pm-rating {
  background: rgba(148,163,184,.05);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.mlb-gd-pm-rating-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.mlb-gd-pm-rating-label {
  font-size: .7rem; font-weight: 700; letter-spacing: 1px;
  color: #94a3b8; text-transform: uppercase;
}
.mlb-gd-pm-rating-score { display: flex; align-items: baseline; gap: 6px; }
.mlb-gd-pm-rating-num { font-size: 1.6rem; font-weight: 700; color: #f8fafc; }
.mlb-gd-pm-rating-denom { font-size: .8rem; color: #64748b; }
.mlb-gd-pm-rating-tag {
  margin-left: 10px; font-size: .82rem; font-weight: 700; color: #86efac;
}
.mlb-gd-pm-rating.q2-red-3 .mlb-gd-pm-rating-tag,
.mlb-gd-pm-rating.q2-red-2 .mlb-gd-pm-rating-tag { color: #fca5a5; }
.mlb-gd-pm-rating.q2-green-3 .mlb-gd-pm-rating-tag { color: #bbf7d0; }

.mlb-gd-pm-rating-track {
  position: relative; height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.06); overflow: hidden;
}
.mlb-gd-pm-rating-fill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(34,197,94,.6), rgba(34,197,94,.95));
  border-radius: 999px; transition: width 200ms ease;
}
.mlb-gd-pm-rating.q2-red-3 .mlb-gd-pm-rating-fill,
.mlb-gd-pm-rating.q2-red-2 .mlb-gd-pm-rating-fill {
  background: linear-gradient(90deg, rgba(239,68,68,.6), rgba(239,68,68,.95));
}
.mlb-gd-pm-rating-marks {
  position: absolute; left: 0; right: 0; top: 14px;
  display: flex; justify-content: space-between;
  font-size: .62rem; letter-spacing: .5px; color: #64748b;
  text-transform: uppercase; font-weight: 700;
}
.mlb-gd-pm-rating-marks span { flex: 1; text-align: center; }

/* Per-pitch table */
.mlb-gd-pm-table {
  width: 100%; border-collapse: collapse;
  font-size: .82rem; margin-top: 18px;
}
.mlb-gd-pm-table th {
  text-align: left; padding: 8px 10px; font-size: .68rem;
  font-weight: 700; color: #64748b; letter-spacing: .7px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.mlb-gd-pm-table td {
  padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.04);
  color: #cbd5e1; vertical-align: middle;
}
.mlb-gd-pm-table tr:last-child td { border-bottom: none; }

.mlb-gd-pm-pitch { font-weight: 600; color: #f1f5f9; }
.mlb-gd-pm-usage { color: #94a3b8; font-size: .78rem; }
.mlb-gd-pm-velo  { color: #64748b; font-size: .68rem; margin-top: 2px; }

.mlb-gd-pm-batter,
.mlb-gd-pm-pitcher { font-weight: 700; width: 80px; }
.mlb-gd-pm-ab {
  font-size: .65rem; font-weight: 600;
  color: #64748b; margin-top: 2px;
  letter-spacing: .3px;
}
.mlb-gd-pm-ab-prior {
  color: #475569; font-weight: 500;
  margin-left: 3px;
}
/* Per-player coloring: sign-based. `+` = above league avg for that player
   (green), `â` = below league avg (red). The edge bar + overall rating
   still read from the batter's matchup perspective. */
.mlb-gd-pm-batter.is-pos,
.mlb-gd-pm-pitcher.is-pos { color: #86efac; }
.mlb-gd-pm-batter.is-neg,
.mlb-gd-pm-pitcher.is-neg { color: #fca5a5; }
.mlb-gd-pm-batter { text-align: right; }

.mlb-gd-pm-edge-head { text-align: center !important; color: #64748b; }

.mlb-gd-pm-edge-cell { padding: 0 8px; }
.mlb-gd-pm-edge-track {
  position: relative; height: 22px; background: rgba(255,255,255,.04);
  border-radius: 4px;
}
.mlb-gd-pm-edge-track::before {
  content: ""; position: absolute; left: 50%; top: 2px; bottom: 2px;
  width: 1px; background: rgba(255,255,255,.14);
}
.mlb-gd-pm-edge-fill {
  position: absolute; top: 0; bottom: 0;
  border-radius: 3px;
  display: flex; align-items: center;
}
.mlb-gd-pm-edge-batter  {
  left: 50%;
  background: linear-gradient(90deg, rgba(34,197,94,.35), rgba(34,197,94,.85));
  justify-content: flex-end;
  padding-right: 6px;
}
.mlb-gd-pm-edge-pitcher {
  right: 50%;
  background: linear-gradient(90deg, rgba(239,68,68,.85), rgba(239,68,68,.35));
  justify-content: flex-start;
  padding-left: 6px;
}
.mlb-gd-pm-edge-val {
  font-size: .72rem; font-weight: 700;
  color: #f8fafc; white-space: nowrap; pointer-events: none;
}

.mlb-gd-pm-empty {
  text-align: center; padding: 20px; color: #64748b; font-style: italic;
}
.mlb-gd-pm-foot {
  margin-top: 14px; font-size: .72rem; color: #64748b; line-height: 1.5;
}

/* âââ Props â pills + single row per player âââ */
.mlb-gd-pills {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.mlb-gd-pill {
  background: rgba(148,163,184,.08); color: #cbd5e1;
  border: 1px solid rgba(255,255,255,.06);
  padding: 6px 14px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; cursor: pointer;
  transition: color 120ms, background 120ms, border-color 120ms;
}
.mlb-gd-pill:hover { color: #f8fafc; background: rgba(148,163,184,.14); }
/* Active state mirrors .mlb-gd-tab.is-active above (the Overview/Props/
   Weather tabs) â same teal fill + dark text â so the visual treatment
   for "selected" is consistent across both rows of pills. */
.mlb-gd-pill.is-active {
  color: #0a1628;
  background: rgba(0, 211, 189, 0.75);
  border-color: rgba(0, 211, 189, 0.82);
}
.mlb-gd-players-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.mlb-gd-team-col { display: flex; flex-direction: column; min-width: 0; }
.mlb-gd-team-col-header {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; color: #67e8f9;
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.mlb-gd-team-col-logo { width: 20px; height: 20px; object-fit: contain; }
.mlb-gd-prop-player {
  display: grid; grid-template-columns: 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.04);
}
.mlb-gd-prop-player:last-child { border-bottom: none; }

/* ââ Model projection badge ("74% PROJ") + stated bet + factor-impact pills.
   The % is the model's chance the over clears â deliberately untiered
   (absolute thresholds can't be calibrated across prop types); the pills
   carry the good/bad signal per factor. ââ */
.mlb-gd-prop-grade {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 10px; border-radius: 6px; flex-shrink: 0;
  /* Same chrome as the odds pills â the cluster reads as one family. */
  background: rgba(15,23,42,.4); border: 1px solid rgba(255,255,255,.06);
  box-sizing: border-box;
}
/* Number sized/weighted to match the odds inside the odds pills (.74rem/700)
   â all three pills' numbers read as one family. */
.mlb-gd-grade-num  { font-size: .74rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: #f8fafc; }
.mlb-gd-grade-word { font-size: .52rem; font-weight: 800; letter-spacing: .09em; color: #94a3b8; }
/* Edge pill mirrors the proj pill's type (same num/word classes inside).
   Both pills' NUMBERS take the edge sign's color (white when no edge);
   captions stay gray. */
.mlb-gd-edge-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 10px; border-radius: 6px; flex-shrink: 0;
  background: rgba(15,23,42,.4); border: 1px solid rgba(255,255,255,.06);
  box-sizing: border-box; white-space: nowrap;
}
.mlb-gd-edge-pill.is-up .mlb-gd-grade-num,
.mlb-gd-prop-grade.is-up .mlb-gd-grade-num   { color: #4ade80; }
.mlb-gd-edge-pill.is-down .mlb-gd-grade-num,
.mlb-gd-prop-grade.is-down .mlb-gd-grade-num { color: #f87171; }
.mlb-gd-prop-verdict {
  margin-top: 2px; font-size: .76rem; font-weight: 600; color: #cbd5e1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Right cluster: [proj Â· odds Â· edge] pills, one chrome family, one height,
   top-aligned so expanded alt lines grow downward; the alt-lines expand
   chevron sits centered under the odds column. */
.mlb-gd-prop-right { display: flex; align-items: flex-start; gap: 8px; justify-self: end; }
.mlb-gd-lines-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mlb-gd-factors { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.mlb-gd-factor {
  font-size: .62rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  color: #94a3b8; background: rgba(148,163,184,.07);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  cursor: pointer;
}
.mlb-gd-factor:hover { filter: brightness(1.25); }
.mlb-gd-factor.is-up   { color: #4ade80; border-color: rgba(74,222,128,.28); background: rgba(34,197,94,.09); }
.mlb-gd-factor.is-down { color: #f87171; border-color: rgba(248,113,113,.28); background: rgba(248,113,113,.09); }
.mlb-gd-prop-header { display: flex; gap: 10px; align-items: center; min-width: 0; }
.mlb-gd-prop-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; object-position: center top;
  background: rgba(34, 211, 238, .08); flex-shrink: 0;
}
.mlb-gd-prop-avatar.is-fallback { object-fit: contain; padding: 4px; }
.mlb-gd-prop-identity { min-width: 0; flex: 1; }
.mlb-gd-prop-name {
  font-size: .9rem; font-weight: 600; color: #f8fafc; line-height: 1.15;
  text-decoration: none; cursor: pointer;
  transition: color 120ms ease;
}
.mlb-gd-prop-name:hover { color: #67e8f9; text-decoration: underline; }
.mlb-gd-prop-meta {
  display: flex; gap: 6px; margin-top: 2px;
  font-size: .66rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em;
}
/* Subtle expand affordance under the odds column; rotates when open. */
.mlb-gd-more-btn {
  background: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1px 12px; color: #5b6b85;
}
.mlb-gd-more-btn:hover { color: #67e8f9; }
.mlb-gd-more-btn svg { transition: transform 140ms ease; }
.mlb-gd-prop-player[data-expanded="true"] .mlb-gd-more-btn svg { transform: rotate(180deg); }
.mlb-gd-lines { display: flex; flex-direction: column; gap: 4px; justify-self: end; }
.mlb-gd-line-row {
  display: flex; gap: 6px;
  /* Alt lines stay collapsed until user clicks +N */
  display: none;
}
.mlb-gd-line-row.is-main { display: flex; }
.mlb-gd-prop-player[data-expanded="true"] .mlb-gd-line-row { display: flex; }
.mlb-gd-line-over, .mlb-gd-line-under {
  display: inline-flex; align-items: center; gap: 4px;
  min-width: 78px; justify-content: center;
  height: 32px; padding: 0 10px; border-radius: 6px;
  font-size: .74rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255,255,255,.06);
  box-sizing: border-box;
}
.mlb-gd-line-over  { background: rgba(15,23,42,.4); color: #cbd5e1; }
.mlb-gd-line-under { background: rgba(15,23,42,.4); color: #cbd5e1; }
.mlb-gd-line-over em, .mlb-gd-line-under em { font-style: normal; font-weight: 700; color: #f8fafc; }
.mlb-gd-line-row.is-main .mlb-gd-line-over em  { color: #86efac; }
.mlb-gd-line-row.is-main .mlb-gd-line-under em { color: #fca5a5; }

/* âââ Loading / error âââ */
.mlb-gd-loading, .mlb-gd-error { padding: 30px; text-align: center; color: #94a3b8; }
.mlb-gd-error { color: #fca5a5; }

/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   Weather panel (ported from DataUpdater/demos/mlb/css/styles.css)
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.wx-panel { padding: 4px 0; }
.wx-panel.wx-indoor { text-align: center; padding: 28px; }
.wx-indoor-msg { font-size: 12px; color: #94a3b8; margin-top: 8px; }
.wx-empty { padding: 24px; text-align: center; color: #94a3b8; font-size: .85rem; }
.wx-top-row {
  display: grid; grid-template-columns: 280px 1fr; gap: 20px; margin-bottom: 16px;
}
/* Two-column layout: strip + field + venue caption on the left, score +
   key stats + ball flight model on the right. */
.wx-split-row {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 24px;
  margin-bottom: 16px;
}
.wx-split-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.wx-split-left svg {
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  height: auto;
}
.wx-venue-caption {
  padding: 8px 2px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.wx-venue-caption .wx-venue {
  font-size: 15px;
  justify-content: center;
}
.wx-split-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* Conditions strip (shared with the research-hub weather grid).
   When it's the top child of .wx-split-left we drop the bottom border to
   keep the visual grouping tight against the field. */
.wh-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 4px 0 8px;
}
.wh-stat {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  align-items: center; text-align: center;
}
.wh-stat-label {
  font-size: .7rem; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.wh-stat-val {
  font-size: 1.25rem; font-weight: 700; color: #f8fafc;
  line-height: 1.1; letter-spacing: -.01em;
}
.wh-stat-sub {
  font-size: .7rem; color: #64748b;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.wh-forecast {
  display: flex; align-items: center; gap: 6px;
  text-transform: none; letter-spacing: 0;
  font-size: .85rem; color: #cbd5e1; font-weight: 500;
}
.wh-pill-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px; padding: 0 2px 4px; margin-top: -4px;
}
.wh-pill-row-solo { margin-top: 0; padding: 14px 2px 8px; }
.wh-tag-row {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px;
}
.wh-tag {
  display: inline-block; align-self: flex-start;
  margin-top: 3px; padding: 2px 8px;
  font-size: .62rem; border-radius: 999px;
  font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; border: 1px solid transparent;
  white-space: nowrap;
}
.wh-tag-row .wh-tag { margin-top: 0; }
.wh-tag-boost       { background: rgba(34,197,94,.12);  color: #4ade80; border-color: rgba(34,197,94,.28); }
.wh-tag-boost-soft  { background: rgba(34,197,94,.07);  color: #86efac; border-color: rgba(34,197,94,.18); }
.wh-tag-suppress    { background: rgba(239,68,68,.12);  color: #f87171; border-color: rgba(239,68,68,.28); }
.wh-tag-suppress-soft { background: rgba(239,68,68,.07); color: #fca5a5; border-color: rgba(239,68,68,.18); }
.wh-tag-neutral     { background: rgba(148,163,184,.1); color: #cbd5e1; border-color: rgba(148,163,184,.18); }
.wh-tag-alert       { background: rgba(234,179,8,.12);  color: #fcd34d; border-color: rgba(234,179,8,.28); }
.wh-tag-indoor      { background: rgba(79,143,247,.12); color: #7dd3fc; border-color: rgba(79,143,247,.28); }

.wx-info-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wx-venue {
  font-size: 14px; font-weight: 600; color: #f8fafc;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.wx-desc { font-size: 12px; color: #cbd5e1; margin-top: 3px; }
.wx-gust { color: #fcd34d; font-size: 11px; }

.wx-score-box {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,.06);
}
.wx-score-num {
  font-size: 36px; font-weight: 800; letter-spacing: -1px;
  line-height: 1; min-width: 56px; text-align: center;
}
.wx-score-label { font-size: 14px; font-weight: 700; }
.wx-score-sub {
  font-size: 10px; color: #94a3b8; text-transform: uppercase;
  letter-spacing: .5px; margin-top: 1px;
}
.wx-score-elite    { background: rgba(34,197,94,.1);   border-color: rgba(34,197,94,.25); }
.wx-score-elite    .wx-score-num,
.wx-score-elite    .wx-score-label { color: #22c55e; }
.wx-score-boost    { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.2); }
.wx-score-boost    .wx-score-num,
.wx-score-boost    .wx-score-label { color: #4ade80; }
.wx-score-neutral  { background: rgba(139,146,165,.06); border-color: rgba(139,146,165,.15); }
.wx-score-neutral  .wx-score-num,
.wx-score-neutral  .wx-score-label { color: #cbd5e1; }
.wx-score-suppress { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.2); }
.wx-score-suppress .wx-score-num,
.wx-score-suppress .wx-score-label { color: #f87171; }
.wx-score-dead     { background: rgba(239,68,68,.1);   border-color: rgba(239,68,68,.25); }
.wx-score-dead     .wx-score-num,
.wx-score-dead     .wx-score-label { color: #ef4444; }

.wx-key-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wx-kstat { padding: 6px 10px; background: rgba(15,23,42,.5); border-radius: 8px; }
.wx-kstat-label {
  font-size: 9px; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .4px;
}
.wx-kstat-val { font-size: 13px; font-weight: 600; color: #f8fafc; margin-top: 1px; }

.wx-precip-warn {
  padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: rgba(234,179,8,.1); border: 1px solid rgba(234,179,8,.25);
  color: #fcd34d; margin-bottom: 14px; text-align: center;
}

.wx-physics { margin-top: 14px; }
.wx-panel-title {
  font-size: 11px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
}
.wx-panel-sub { font-weight: 400; text-transform: none; letter-spacing: 0; color: #64748b; }
.wx-physics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wx-phys-card {
  padding: 10px 12px; background: rgba(15,23,42,.5); border-radius: 8px;
  border: 1px solid transparent;
}
.wx-phys-title {
  font-size: 9px; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px;
}
.wx-phys-val { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.wx-phys-note { font-size: 10px; color: #94a3b8; line-height: 1.3; }

.wx-carry-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wx-carry-card {
  padding: 12px 14px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.06); text-align: center;
}
.wx-carry-boost { background: rgba(34,197,94,.06); border-color: rgba(34,197,94,.2); }
.wx-carry-suppress { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.2); }
.wx-carry-neutral { background: rgba(148,163,184,.04); border-color: rgba(148,163,184,.18); }
/* Roof-closed cards take the place of the three per-direction cards, so
   they span the same width â leaving the score box in the 4th column. */
.wx-carry-roof-closed { grid-column: span 3; }
.wx-carry-dir {
  font-size: 10px; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px;
}
.wx-carry-val { font-size: 22px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
.wx-carry-boost    .wx-carry-val { color: #4ade80; }
.wx-carry-suppress .wx-carry-val { color: #f87171; }
.wx-carry-neutral  .wx-carry-val { color: #cbd5e1; }
.wx-carry-breakdown { font-size: 9px; color: #94a3b8; }
.wx-carry-tag { color: #64748b; font-weight: 400; }

.wx-val-boost    { color: #4ade80; }
.wx-val-suppress { color: #f87171; }
.wx-val-neutral  { color: #cbd5e1; }
.wx-val-alert    { color: #fcd34d; }

.wx-roof-badge {
  font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: .3px;
}
.wx-roof-retractable { background: rgba(79,143,247,.12); color: #7dd3fc; }
.wx-roof-fixed       { background: rgba(139,146,165,.12); color: #cbd5e1; }
.wx-roof-open        { background: rgba(34,197,94,.12); color: #4ade80; }
.wx-roof-closed      { background: rgba(239,68,68,.12); color: #f87171; }
.wx-roof-uncertain   { background: rgba(234,179,8,.12); color: #fcd34d; }
.wx-roof-alert {
  padding: 8px 12px; border-radius: 8px; font-size: 11px; font-weight: 500;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2);
  color: #fca5a5; margin: 8px 0;
}
.wx-roof-warn {
  padding: 8px 12px; border-radius: 8px; font-size: 11px; font-weight: 500;
  background: rgba(234,179,8,.08); border: 1px solid rgba(234,179,8,.2);
  color: #fcd34d; margin: 8px 0;
}

/* âââ Weather-Adjusted Props table âââ */
.wx-prop-group { margin-top: 14px; }
.wx-prop-group:first-of-type { margin-top: 4px; }
.wx-prop-group-header {
  font-size: 12px; font-weight: 700; padding: 8px 12px;
  border-radius: 8px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.wx-prop-count {
  font-size: 10px; font-weight: 600; padding: 1px 8px;
  border-radius: 10px; background: rgba(255,255,255,.08);
}
.wx-grp-boost    { background: rgba(34,197,94,.08);  color: #4ade80; border: 1px solid rgba(34,197,94,.2); }
.wx-grp-suppress { background: rgba(239,68,68,.08);  color: #f87171; border: 1px solid rgba(239,68,68,.2); }

.wx-prop-scroll { overflow-x: auto; }
.wx-prop-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.wx-prop-table th {
  text-align: left; font-size: 10px; font-weight: 600;
  color: #94a3b8; text-transform: uppercase; letter-spacing: .06em;
  padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
}
.wx-prop-table td {
  padding: 7px 8px; color: #e2e8f0;
  border-bottom: 1px solid rgba(255,255,255,.03);
  vertical-align: top;
}
.wx-prop-table tr:last-child td { border-bottom: none; }
.wx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wx-prop-table .wx-prop-name { font-weight: 600; white-space: nowrap; }
.wx-prop-team {
  display: inline-block; margin-left: 8px;
  font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: .04em;
  font-weight: 500;
}
.wx-prop-rating { font-weight: 700; text-align: center; font-size: 13px; }
.wx-prop-reasons {
  font-size: 11px; color: #94a3b8; max-width: 360px;
  white-space: normal; line-height: 1.4;
}

/* Row tinting by impact */
#mlb-game-detail tr.wx-prop-strong-boost    td { background: rgba(34,197,94,.06); }
#mlb-game-detail tr.wx-prop-boost           td { background: rgba(34,197,94,.03); }
#mlb-game-detail tr.wx-prop-strong-suppress td { background: rgba(239,68,68,.06); }
#mlb-game-detail tr.wx-prop-suppress        td { background: rgba(239,68,68,.03); }

/* Rating arrow colors */
.wx-prop-strong-boost    .wx-prop-rating { color: #22c55e; }
.wx-prop-boost           .wx-prop-rating { color: #4ade80; }
.wx-prop-suppress        .wx-prop-rating { color: #f87171; }
.wx-prop-strong-suppress .wx-prop-rating { color: #ef4444; }
.wx-prop-neutral         .wx-prop-rating { color: #64748b; }

/* Handedness badges */
.wx-hand-badge {
  font-size: 9px; font-weight: 700; padding: 2px 6px;
  border-radius: 3px; letter-spacing: .3px;
}
.wx-hand-r { background: rgba(79,143,247,.12); color: #7dd3fc; }
.wx-hand-l { background: rgba(139,92,246,.12); color: #c4b5fd; }
.wx-hand-s { background: rgba(234,179,8,.12);  color: #fcd34d; }
.wx-hand-x { background: rgba(139,146,165,.12); color: #94a3b8; }

/* âââ Responsive âââ */
@media (max-width: 820px) {
  #mlb-game-detail { padding: 10px 12px; gap: 12px; }
  .mlb-gd-inj-grid, .mlb-gd-lineup-grid, .mlb-gd-props-grid,
  .mlb-gd-players-list { grid-template-columns: 1fr; gap: 12px; }
  .wx-top-row,
  .wx-split-row { grid-template-columns: 1fr; }
  .wx-physics-grid { grid-template-columns: 1fr 1fr; }
  .wx-carry-row { grid-template-columns: 1fr; }
}

/* ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   Live Game Tracker tab (pbr-* â layout from mlb-demo.html). Tokens (--gd-*)
   are declared on #mlb-game-detail and .pbr-modal near the top of this file,
   so the tab renders consistently regardless of the page's theme tokens.
   ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.pbr-wrap { display: flex; flex-direction: column; gap: 16px; }
.pbr-empty { text-align: center; padding: 40px 16px; color: var(--gd-text-3); font-size: 13px; }

/* live header score beside each team â sizing lives with the scoreboard styles
   above (.mlb-gd-team-score); leading/trailing classes set by the PBP module. */

/* ââ cards + layout grid ââ */
#mlb-pbp-root .pbr-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}
#mlb-pbp-root .pbr-grid[hidden] { display: none; }
#mlb-pbp-root .pbr-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pbr-card {
  background: var(--gd-surface);
  border: 1px solid var(--gd-line);
  border-radius: var(--gd-radius);
  overflow: hidden;
}
.pbr-card[hidden] { display: none; }
.pbr-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gd-line);
}
.pbr-card-title {
  font-family: var(--gd-font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: .16em;
  color: var(--gd-text-3); text-transform: uppercase;
}

/* ââ "This at-bat" card ââ */
.pbr-cab-status {
  font-family: var(--gd-font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  color: var(--gd-text-2); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  text-align: right; min-width: 0;
}
.pbr-cab-status.is-result { color: var(--gd-text); }
.pbr-live-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--gd-live); display: inline-block;
  animation: mlbGdPulse 1.6s ease-in-out infinite;
}
.pbr-matchup {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--gd-line); gap: 16px;
}
.pbr-player { display: flex; align-items: center; gap: 13px; min-width: 0; }
.pbr-player--pitcher { flex-direction: row-reverse; text-align: right; }
/* Avatar circle: initials sit underneath; a resolved headshot <img> covers them. */
.pbr-headshot {
  position: relative;
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--gd-font-display);
  font-weight: 600; font-size: 15px;
  background: var(--gd-surface-3);
  border: 1px solid var(--gd-line-strong);
  color: var(--gd-text-2);
  overflow: hidden;
}
.pbr-headshot img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  border-radius: 50%;
}
.pbr-headshot--sm { width: 36px; height: 36px; font-size: 12px; }
.pbr-headshot--xs { width: 32px; height: 32px; font-size: 11px; }
.pbr-player-id { min-width: 0; }
.pbr-player-tag {
  font-family: var(--gd-font-mono);
  font-size: 9px; font-weight: 600; letter-spacing: .12em;
  color: var(--gd-text-3); margin-bottom: 3px;
}
.pbr-player-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gd-text); }
.pbr-player-line { font-family: var(--gd-font-mono); font-size: 11px; color: var(--gd-text-2); margin-top: 3px; }
.pbr-vs {
  font-family: var(--gd-font-display);
  font-size: 13px; font-weight: 600;
  color: var(--gd-text-3); letter-spacing: .1em; flex: none;
}

/* pitch sequence (newest on top) | strike zone */
.pbr-cab-body { display: grid; grid-template-columns: 1fr 280px; gap: 0; }
.pbr-pitches { padding: 8px 8px 8px 12px; border-right: 1px solid var(--gd-line); min-width: 0; }
.pbr-pitches-empty { padding: 24px 12px; color: var(--gd-text-3); font-size: 12px; }
.pbr-pitch {
  display: grid;
  grid-template-columns: 24px 44px 1fr 76px 112px;
  align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 9px;
  transition: background .12s ease;
}
.pbr-pitch:hover { background: rgba(255, 255, 255, .03); }
.pbr-pitch.latest { background: rgba(255, 255, 255, .04); }
.pbr-pitch-num {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--gd-font-mono);
  font-size: 10px; font-weight: 600;
  border: 1px solid var(--gd-line-strong); color: var(--gd-text-2);
}
.pbr-pitch-num.strike { background: rgba(255, 92, 92, .14); border-color: rgba(255, 92, 92, .5); color: var(--gd-strike); }
.pbr-pitch-num.ball { background: rgba(61, 220, 132, .12); border-color: rgba(61, 220, 132, .45); color: var(--gd-ball); }
.pbr-pitch-num.inplay { background: rgba(90, 169, 255, .14); border-color: rgba(90, 169, 255, .5); color: var(--gd-inplay); }
.pbr-pitch-type { font-family: var(--gd-font-mono); font-size: 11px; font-weight: 600; color: var(--gd-text); }
.pbr-pitch-type span { display: block; font-size: 9px; font-weight: 400; color: var(--gd-text-3); margin-top: 1px; letter-spacing: .02em; }
/* Pitch type unknown until the Statcast backfill lands â muted dash, not "?" */
.pbr-pitch-type .pbr-pitch-type--none { display: inline; font-size: 11px; color: var(--gd-text-3); margin-top: 0; }
.pbr-velo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pbr-velo-bar {
  display: block; flex: 1; height: 3px; border-radius: 2px;
  background: var(--gd-surface-3); overflow: hidden; max-width: 120px;
}
.pbr-velo-fill { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #8A92A6, #E4E8F0); }
.pbr-velo-num {
  font-family: var(--gd-font-mono);
  font-size: 12px; font-weight: 500;
  font-variant-numeric: tabular-nums; color: var(--gd-text);
  width: 76px; text-align: right; white-space: nowrap;
}
.pbr-velo-num span { color: var(--gd-text-3); font-size: 10px; }
.pbr-pitch-result {
  font-size: 11px; font-weight: 500; text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--gd-text-2);
}
.pbr-pitch-result.strike { color: var(--gd-strike); }
.pbr-pitch-result.ball { color: var(--gd-ball); }
.pbr-pitch-result.inplay { color: var(--gd-inplay); }

/* transient "happening now" strip above the at-bat: ONE centered narrative
   line between hairlines ("Pitching Change: X replaces Y.") â appears when an
   event lands, is replaced by a newer event, clears on the next pitch */
.pbr-cab-banner {
  border-top: 1px solid var(--gd-line);
  border-bottom: 1px solid var(--gd-line);
  padding: 9px 20px;
}
.pbr-cab-banner[hidden] { display: none; }
.pbr-now {
  font-family: var(--gd-font-body);
  font-size: 13px; color: var(--gd-text-2);
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pbr-now--challenge { color: #F4D03F; }
.pbr-now--challenge.in-progress { animation: mlbGdPulse 1.6s ease-in-out infinite; }

/* durable event chips on history feed rows (subs, steals, wild pitches,
   challenge verdicts) */
.pbr-chip-event {
  font-family: var(--gd-font-mono);
  font-size: 9px; font-weight: 600; letter-spacing: .08em;
  color: var(--gd-text-2);
  border: 1px solid var(--gd-line-strong);
  padding: 2px 7px; border-radius: 99px;
  white-space: nowrap;
}
.pbr-chip-event.overturned { color: #F4D03F; border-color: rgba(244, 208, 63, .4); }

/* strike zone panel */
.pbr-zone-panel { padding: 16px 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pbr-zone-panel .pbr-cab-zone {
  width: 100%; max-width: 248px;
  background: rgba(14, 17, 22, .55);
  border: 1px solid var(--gd-line);
  border-radius: 10px;
  padding: 6px;
}
.pbr-zone-svg, .pbr-field-svg { width: 100%; height: auto; display: block; }
.pbr-zone-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; justify-content: center; }
.pbr-zli {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--gd-font-mono);
  font-size: 10px; color: var(--gd-text-2); letter-spacing: .06em;
}
.pbr-zdot { width: 7px; height: 7px; border-radius: 50%; }

/* ââ "Due up" / "On the mound" side cards ââ */
.pbr-dueup { display: flex; flex-direction: column; }
.pbr-due-row { display: flex; align-items: center; gap: 13px; padding: 13px 20px; }
.pbr-due-row + .pbr-due-row { border-top: 1px solid var(--gd-line); }
.pbr-due-pos {
  font-family: var(--gd-font-display);
  font-size: 18px; font-weight: 600;
  color: var(--gd-text-3); width: 16px; text-align: center; flex: none;
}
.pbr-due-info { min-width: 0; }
.pbr-due-name { font-weight: 600; font-size: 13px; color: var(--gd-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbr-due-stat { font-family: var(--gd-font-mono); font-size: 11px; color: var(--gd-text-2); margin-top: 2px; }
.pbr-due-label {
  font-family: var(--gd-font-mono);
  font-size: 9px; font-weight: 600; letter-spacing: .1em;
  color: var(--gd-text-3); margin-bottom: 2px;
}
/* Avatar-bases diamond beside the due-up rows â mobile only (the desktop
   header's small diamond covers it there). Runner headshots fill occupied
   bases; initials when no headshot resolves. */
.pbr-due-bases { display: none; position: relative; flex: none; }
.pbr-bb { position: absolute; }
.pbr-bb-sq {
  position: absolute; inset: 0; transform: rotate(45deg);
  border-radius: 10px; background: var(--gd-surface-3);
}
.pbr-bb.on .pbr-bb-sq { background: #2b3344; }
.pbr-bb-pic {
  position: absolute; inset: 12%; width: 76%; height: 76%;
  object-fit: cover; object-position: top center; border-radius: 50%; z-index: 1;
}
.pbr-bb-init {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--gd-font-display); font-weight: 600;
  color: var(--gd-text-2);
}
.pbr-pstat-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--gd-line); }
.pbr-pstat { padding: 14px 0 13px; text-align: center; }
.pbr-pstat + .pbr-pstat { border-left: 1px solid var(--gd-line); }
.pbr-pstat b {
  display: block;
  font-family: var(--gd-font-display);
  font-size: 22px; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1;
  color: var(--gd-text);
}
.pbr-pstat span {
  display: block;
  font-family: var(--gd-font-mono);
  font-size: 9px; letter-spacing: .12em;
  color: var(--gd-text-3); margin-top: 6px;
}

/* ââ recent plays (grouped by half-inning) ââ */
.pbr-plays .pbr-feed { display: flex; flex-direction: column; padding-bottom: 4px; }
.pbr-group-label {
  font-family: var(--gd-font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: .14em;
  color: var(--gd-text-3);
  padding: 12px 20px 8px;
  display: flex; align-items: center; gap: 10px;
}
.pbr-group-label::after { content: ''; flex: 1; height: 1px; background: var(--gd-line); }
.pbr-group-label:not(:first-child) { border-top: 1px solid var(--gd-line); margin-top: 2px; }
.pbr-play {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 20px;
  transition: background .12s ease;
}
.pbr-pa { cursor: pointer; }
.pbr-pa:hover { background: rgba(255, 255, 255, .025); }
.pbr-pa:focus-visible { outline: 2px solid var(--gd-text-2); outline-offset: -2px; }
.pbr-play-logo { width: 18px; height: 18px; object-fit: contain; flex: none; }
span.pbr-play-logo { display: inline-block; }
.pbr-play-desc { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pbr-play-batter { font-weight: 600; font-size: 13px; color: var(--gd-text); }
.pbr-play-event { font-size: 13px; color: var(--gd-text-2); }
.pbr-play-event.scoring { color: var(--gd-text); font-weight: 500; }
.pbr-chip-score {
  font-family: var(--gd-font-mono);
  font-size: 9px; font-weight: 600; letter-spacing: .08em;
  border: 1px solid;            /* color/border/background tinted inline with the batting team's accent */
  padding: 2px 7px; border-radius: 99px;
  white-space: nowrap;
}
.pbr-play-ctx {
  font-family: var(--gd-font-mono);
  font-size: 11px; color: var(--gd-text-3);
  flex: none; display: flex; align-items: center; gap: 14px;
  font-variant-numeric: tabular-nums;
}
.pbr-ctx-mini { display: flex; align-items: center; gap: 7px; flex: none; }
.pbr-ctx-logo { width: 16px; height: 16px; object-fit: contain; flex: none; }
.pbr-ctx-score { color: var(--gd-text-2); white-space: nowrap; }
.pbr-ctx-outs { white-space: nowrap; }
.pbr-chev { color: var(--gd-text-3); flex: none; }

/* ââ mobile-only elements (Game/team tabs + play-card extras) â hidden on desktop ââ */
.mlb-gd-tab--mobile { display: none; }
.pbr-play-headline, .pbr-play-sub, .pbr-feed-ava, .pbr-pitch-sub, .pbr-cab-count,
.mlb-gd-outs-line, .pbr-ctx-inn, .pbr-matchup-m,
.pbr-clu-batter, .pbr-clu-count, .pbr-clu-side, .pbr-cab-pthead { display: none; }

/* ââ Game tab: leads / momentum / head-to-head / details ââ */
.pbr-box-tab { border-top: none; background: none; padding: 10px 16px 12px; }
.pbr-leads { display: flex; gap: 28px; padding: 13px 20px; flex-wrap: wrap; }
.pbr-lead { display: flex; align-items: center; gap: 8px; }
.pbr-h2h-logo, .pbr-lead img { width: 20px; height: 20px; object-fit: contain; flex: none; }
.pbr-lead-team { font-size: 12px; color: var(--gd-text-2); }
.pbr-lead b { font-family: var(--gd-font-display); font-size: 18px; font-weight: 600; color: var(--gd-text); }
.pbr-lead-at { font-family: var(--gd-font-mono); font-size: 11px; color: var(--gd-text-3); }
.pbr-momentum { padding: 12px 14px 8px; }
.pbr-momentum-svg { width: 100%; height: 120px; display: block; }
.pbr-h2h { padding: 12px 20px 16px; }
.pbr-h2h-teams { display: flex; justify-content: space-between; margin-bottom: 8px; }
.pbr-h2h-row { margin-top: 12px; }
.pbr-h2h-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pbr-h2h-val { font-family: var(--gd-font-mono); font-size: 13px; font-weight: 600; color: var(--gd-text); min-width: 44px; }
.pbr-h2h-val + .pbr-h2h-val, .pbr-h2h-line .pbr-h2h-val:last-child { text-align: right; }
.pbr-h2h-lbl { font-size: 12px; color: var(--gd-text-2); text-align: center; flex: 1; }
.pbr-h2h-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; margin-top: 5px; background: var(--gd-surface-3); }
.pbr-h2h-bar i { display: block; height: 100%; opacity: .75; }
.pbr-details { padding: 12px 20px 14px; display: flex; flex-direction: column; gap: 8px; }
.pbr-detail-row { font-size: 13px; color: var(--gd-text-2); }

/* ââ team tabs: live box score ââ */
.pbr-bx-team { display: flex; align-items: center; gap: 12px; padding: 14px 20px 4px; }
.pbr-bx-logo { width: 34px; height: 34px; object-fit: contain; flex: none; }
.pbr-bx-code { font-family: var(--gd-font-display); font-size: 22px; font-weight: 700; letter-spacing: .04em; color: var(--gd-text); }
.pbr-bx-totals { display: flex; gap: 4px; padding: 8px 16px 14px; overflow-x: auto; scrollbar-width: none; }
.pbr-bx-totals::-webkit-scrollbar { display: none; }
.pbr-bx-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px 11px 16px; }
.pbr-bx-row + .pbr-bx-row { border-top: 1px solid var(--gd-line); }
.pbr-bx-id { min-width: 0; width: 118px; flex: none; }
.pbr-bx-id .pbr-due-name { font-size: 12.5px; }
.pbr-bx-stats { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pbr-bx-stats::-webkit-scrollbar { display: none; }
.pbr-bx-cell { flex: 1 0 36px; text-align: center; }
.pbr-bx-cell b { display: block; font-family: var(--gd-font-mono); font-size: 12px; font-weight: 600; color: var(--gd-text); white-space: nowrap; }
.pbr-bx-cell i { display: block; font-family: var(--gd-font-mono); font-style: normal; font-size: 8px; letter-spacing: .08em; color: var(--gd-text-3); margin-top: 2px; }

/* ââ detail modal (lives on document.body) ââ */
.pbr-modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .7); z-index: 1300;   /* above the fixed bottom nav (z-index 1200) */
  display: flex; align-items: center; justify-content: center; padding: 24px;
  font-family: var(--gd-font-body);
}
.pbr-modal-card {
  position: relative;
  background: var(--gd-surface-2);
  border: 1px solid var(--gd-line-strong);
  border-radius: var(--gd-radius);
  width: 100%; max-width: 560px; padding: 22px;
  max-height: calc(100vh - 48px); overflow-y: auto;
}
.pbr-modal-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: var(--gd-text-3);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.pbr-modal-close:hover { color: var(--gd-text); }
.pbr-modal-state { font-family: var(--gd-font-mono); font-size: 11px; font-weight: 600; color: var(--gd-text-2); letter-spacing: .04em; }
.pbr-modal-title { font-size: 22px; font-weight: 700; color: var(--gd-text); margin: 4px 0 10px; }
.pbr-modal-players { font-size: 13px; color: var(--gd-text-2); display: flex; flex-direction: column; gap: 8px; }
.pbr-modal-player { display: flex; align-items: center; gap: 8px; }
.pbr-pl-role { display: inline-block; width: 16px; color: var(--gd-text-3); font-weight: 700; }
.pbr-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 520px) { .pbr-modal-grid { grid-template-columns: 1fr; } }
.pbr-panel-title {
  font-family: var(--gd-font-mono);
  font-size: 10px; font-weight: 600;
  color: var(--gd-text-3); text-transform: uppercase; letter-spacing: .16em;
  margin-bottom: 6px;
}
.pbr-fieldwrap { display: flex; flex-direction: column; gap: 10px; }
.pbr-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pbr-stat { background: var(--gd-surface); border: 1px solid var(--gd-line); border-radius: 8px; padding: 8px 10px; }
.pbr-stat-val { font-family: var(--gd-font-display); font-size: 20px; font-weight: 600; color: var(--gd-text); }
.pbr-stat-lbl { font-family: var(--gd-font-mono); font-size: 9px; color: var(--gd-text-3); text-transform: uppercase; letter-spacing: .1em; margin-top: 2px; }
.pbr-modal-note { font-size: 12px; color: var(--gd-text-3); padding: 16px 0; }
.pbr-pitchlist { margin-top: 6px; display: flex; flex-direction: column; gap: 0; }
.pbr-pitch-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 4px; border-bottom: 1px solid var(--gd-line); }
.pbr-pitch-row:last-child { border-bottom: none; }
.pbr-pnum { color: var(--gd-text-3); min-width: 16px; font-family: var(--gd-font-mono); font-variant-numeric: tabular-nums; }
.pbr-ptype { font-family: var(--gd-font-mono); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; }
.pbr-pvelo { color: var(--gd-text-2); font-family: var(--gd-font-mono); font-size: 11px; }
.pbr-pcall { color: var(--gd-text-3); flex: 1; }

@media (prefers-reduced-motion: reduce) {
  .mlb-gd-pulse, .mlb-gd-tdot, .pbr-live-dot { animation: none; }
}

/* ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   GAME TRACKER â MOBILE (â¤1000px)
   IMPORTANT SIZING CONTEXT: templates/index.html ships NO <meta viewport>,
   so phones lay the page out at a ~980px VIRTUAL width and zoom out ~2.5Ã.
   Every size below is therefore ~1.7-2Ã its "natural" value to land readable
   on the glass â same convention as the rest of the site's mobile CSS. If a
   real viewport meta is ever added site-wide, this block must be re-scaled.
   ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
@media (max-width: 1000px) {
  /* ââ ONE CONTINUOUS SURFACE ââ
     The reference design reads as a single full-bleed sheet: no boxed cards,
     content directly on the page background, sections split by hairlines, and
     the tab row sitting seamlessly between the scoreboard and the feed. */
  #mlb-game-detail { padding: 0; gap: 0; }
  /* the classic tabs keep their breathing room */
  #mlb-game-detail .mlb-gd-tab-panel[data-panel="info"],
  #mlb-game-detail .mlb-gd-tab-panel[data-panel="props"],
  #mlb-game-detail .mlb-gd-tab-panel[data-panel="weather"] { padding: 12px; }

  /* scoreboard: flat full-bleed band (no gradient card / border / radius) */
  .mlb-gd-sb { background: none; border: none; border-radius: 0; }

  /* tabs: flush under the scoreboard, full-bleed with side padding */
  #mlb-game-detail .mlb-gd-tabs { margin: 0; padding: 0 10px; }

  /* tracker sections: de-boxed â hairlines instead of card chrome */
  .pbr-wrap { gap: 0; }
  #mlb-pbp-root .pbr-grid { gap: 0; }
  #mlb-pbp-root .pbr-side { gap: 0; }
  .pbr-card { background: none; border: none; border-radius: 0; border-bottom: 1px solid var(--gd-line); }
  .pbr-card-head { border-bottom: none; padding-bottom: 4px; }
  .pbr-matchup { border-bottom: none; }
  .pbr-pitches { border-right: none; }

  /* topbar: back link only â the venue/weather line lives in the Game tab */
  .mlb-gd-topbar { padding: 8px 14px 0; }
  .mlb-gd-back { font-size: 19px; padding: 4px 6px 4px 0; gap: 10px; }
  .mlb-gd-back svg { width: 20px; height: 20px; }
  .mlb-gd-meta { display: none; }
  .mlb-gd-hide-m { display: none !important; }

  /* scoreboard: one compact row, pulled into a centered cluster so the clubs
     don't fling to the screen edges at the 980px virtual width */
  .mlb-gd-sb-main {
    grid-template-columns: 1fr minmax(150px, auto) 1fr;
    padding: 16px 24px 12px; gap: 10px;
  }
  /* team block: logo at the outer edge, score with the nickname beneath it */
  .mlb-gd-team {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: "logo score" "logo info";
    gap: 0 18px; align-items: center; justify-content: start;
  }
  .mlb-gd-team-home {
    grid-template-areas: "score logo" "info logo";
    justify-content: end;
  }
  .mlb-gd-team-logo { grid-area: logo; width: 66px; height: 66px; }
  .mlb-gd-team-score {
    grid-area: score; justify-self: center;
    font-size: 58px; padding: 0; margin: 0; line-height: 1; align-self: end;
  }
  .mlb-gd-team-info { grid-area: info; justify-self: center; text-align: center; align-self: start; }
  .mlb-gd-team-code, .mlb-gd-team-name { display: none; }
  .mlb-gd-team-nick { display: block; font-size: 23px; font-weight: 700; color: var(--gd-text); margin-top: 5px; }
  /* center: just "â TOP 2ND / 1 out" â the diamond moves into the due-up
     block (with runner avatars) and the count headline lives in the at-bat */
  .mlb-gd-state { gap: 3px; padding: 0 6px; }
  .mlb-gd-live-chip { display: none; }
  .mlb-gd-final-chip { font-size: 13px; padding: 4px 12px; }
  .mlb-gd-basecount { display: none; }
  .mlb-gd-inning { font-size: 22px; letter-spacing: .1em; gap: 9px; }
  .mlb-gd-inning svg { display: none; }
  .mlb-gd-inning::before {
    content: ''; width: 9px; height: 9px; border-radius: 50%; flex: none;
    background: var(--gd-ball);
    animation: mlbGdPulse 1.6s ease-in-out infinite;
  }
  .mlb-gd-outs-line { display: block; font-size: 15px; color: var(--gd-text-2); }
  .mlb-gd-when-time { font-size: 26px; }
  .mlb-gd-when-date { font-size: 15px; }

  /* the box/linescore lives in the Game tab on phones â keep the header lean */
  #mlb-gd-linescore { display: none; }

  /* tabs: the live five-tab set (Live Â· Props Â· Game Â· AWAY Â· HOME) */
  #mlb-game-detail .mlb-gd-tabs { overflow-x: auto; scrollbar-width: none; justify-content: center; }
  #mlb-game-detail .mlb-gd-tabs::-webkit-scrollbar { display: none; }
  #mlb-game-detail .mlb-gd-tab { white-space: nowrap; flex: none; font-size: 23px; padding: 16px 26px 18px; gap: 10px; }
  #mlb-game-detail .mlb-gd-tab--mobile { display: flex; }
  #mlb-game-detail .mlb-gd-tab--desktop { display: none; }
  .mlb-gd-tdot { width: 9px; height: 9px; }

  /* density + readable card chrome */
  .pbr-wrap { gap: 14px; }
  .pbr-card { border-radius: 12px; }
  .pbr-card-head { padding: 14px 18px; }
  .pbr-card-title { font-size: 14px; }
  .pbr-empty { font-size: 18px; }

  /* Live tab: on-deck block first, no mound card, NO section kicker lines
     (DUE UP / THIS AT-BAT / RECENT PLAYS) â the content speaks for itself */
  #mlb-pbp-root .pbr-grid { grid-template-columns: 1fr; }
  #mlb-pbp-root .pbr-side { order: -1; }
  #mlb-pbp-mound { display: none; }
  #mlb-pbp-root .pbr-card-head { display: none; }
  #mlb-pbp-root .pbr-group-label { display: none; }
  .pbr-ctx-inn { display: inline; }

  /* due up: rows left, big avatar-bases diamond right */
  .pbr-due-flex { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 22px 12px 4px; }
  .pbr-due-row { padding: 8px 14px; gap: 14px; }
  .pbr-due-row + .pbr-due-row { border-top: none; }
  .pbr-due-label { font-size: 13px; margin-bottom: 3px; }
  .pbr-due-name { font-size: 20px; }
  .pbr-due-stat { font-size: 16px; margin-top: 3px; }
  .pbr-headshot--sm { width: 52px; height: 52px; font-size: 17px; }
  .pbr-due-bases { display: block; width: 168px; height: 128px; }
  .pbr-bb { width: 62px; height: 62px; }
  .pbr-bb--2 { top: 0; left: 53px; }
  .pbr-bb--1 { top: 58px; left: 106px; }
  .pbr-bb--3 { top: 58px; left: 0; }
  .pbr-bb-init { font-size: 17px; }

  /* at-bat: count headline, compact nameÂ·stat lines, zone beside the list */
  .pbr-cab-status { display: none; }
  /* the HITTER owns the block: big avatar with the pitcher tucked into its
     bottom-right corner, count headline + two tight lines beside (theScore) */
  .pbr-matchup { display: none; }
  .pbr-matchup-m { display: flex; gap: 18px; padding: 16px 18px 10px; align-items: flex-start; }
  .pbr-ab-faces { position: relative; width: 80px; height: 82px; flex: none; }
  .pbr-face-b { width: 66px; height: 66px; font-size: 21px; }
  .pbr-face-p { position: absolute; right: 0; bottom: 0; width: 36px; height: 36px; font-size: 12px; border: 3px solid #0d1320; }
  .pbr-ab-text { min-width: 0; flex: 1; }
  .pbr-matchup-m .pbr-cab-count { display: block; padding: 0 0 7px; font-size: 25px; font-weight: 700; color: var(--gd-text); }
  .pbr-ab-line {
    font-family: var(--gd-font-body); font-size: 15px; color: var(--gd-text-2);
    margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .pbr-ab-line b { color: var(--gd-text); font-weight: 700; font-size: 18px; }
  .pbr-ab-line .pbr-cab-bline, .pbr-ab-line .pbr-cab-pline { font-size: 14px; }
  .pbr-ab-line--p { font-size: 14px; }
  .pbr-cab-body { grid-template-columns: 1fr 44%; }
  .pbr-zone-panel { padding: 14px 16px 12px; justify-content: flex-start; }
  .pbr-zone-panel .pbr-cab-zone { max-width: 360px; padding: 8px; }
  .pbr-zone-legend { display: none; }

  /* pitch rows: number + call headline + "type Â· mph" subline */
  .pbr-pitch { grid-template-columns: 34px 1fr; gap: 14px; padding: 10px 12px; }
  .pbr-pitch-num { width: 28px; height: 28px; font-size: 13px; }
  .pbr-pitch-type, .pbr-velo, .pbr-velo-num { display: none; }
  .pbr-pitch-result { text-align: left; white-space: normal; }
  .pbr-pitch-call { display: block; font-size: 18px; font-weight: 600; }
  .pbr-pitch-sub { display: block; font-family: var(--gd-font-mono); font-size: 14px; color: var(--gd-text-3); margin-top: 2px; }
  .pbr-pitches-empty { font-size: 16px; padding: 28px 16px; }
  .pbr-cab-banner { padding: 12px 18px; }
  .pbr-now { font-size: 16px; }

  /* recent plays â one card per play: context on top, headline, day lines */
  .pbr-play {
    display: grid;
    grid-template-columns: 68px 1fr 18px;
    grid-template-rows: auto auto;
    gap: 3px 16px;
    align-items: start;
    padding: 17px 18px 18px;
  }
  .pbr-play-logo { display: none; }
  /* theScore alignment: the logos+score cluster is exactly as wide as the
     avatar column + grid gap, so "Top 3 Â· 2 out" starts flush with the text
     column below; score and state share one size/weight/color. */
  .pbr-play-ctx {
    grid-column: 1 / 3; grid-row: 1;
    flex-direction: row; justify-content: flex-start; gap: 0;
    font-family: var(--gd-font-body);
    font-size: 15px; font-weight: 600; color: var(--gd-text-2);
    margin-bottom: 6px;
  }
  .pbr-play-ctx .pbr-ctx-outs { display: inline; }
  .pbr-ctx-logo { width: 18px; height: 18px; }
  .pbr-ctx-mini { min-width: 84px; gap: 8px; }
  .pbr-play-ctx .pbr-ctx-score { color: inherit; }
  .pbr-feed-ava { display: block; position: relative; grid-column: 1; grid-row: 2; align-self: center; width: 68px; height: 68px; }
  .pbr-headshot--feed { display: flex; width: 68px; height: 68px; font-size: 21px; }
  .pbr-ava-badge { position: absolute; right: -5px; bottom: -3px; width: 27px; height: 27px; object-fit: contain; }
  .pbr-play-desc { display: block; min-width: 0; grid-column: 2; grid-row: 2; }
  .pbr-play-batter, .pbr-play-event { display: none; }
  .pbr-play-headline { display: block; font-size: 20px; font-weight: 700; color: var(--gd-text); line-height: 1.3; }
  .pbr-play-headline.scoring { color: var(--gd-ball); }
  .pbr-play-sub { display: block; font-family: var(--gd-font-body); font-size: 15px; color: var(--gd-text-2); margin-top: 3px; }
  .pbr-play-sub--b { color: var(--gd-text); font-size: 16px; }
  /* bare circular avatars (no ring chrome) like the reference */
  .pbr-headshot--feed, .pbr-headshot--sm, .pbr-face-b, .pbr-face-p { border-color: transparent; }
  .pbr-chip-score { margin-top: 8px; display: inline-block; margin-right: 8px; font-size: 12px; padding: 3px 10px; }
  /* durable event notes: quiet mono lines, not shouting pills */
  .pbr-chip-event {
    display: block; border: none; padding: 0; margin-top: 7px;
    font-size: 12px; letter-spacing: .08em; color: var(--gd-text-3);
  }
  .pbr-chip-event::before { content: "â³ "; }
  .pbr-chev { grid-column: 3; grid-row: 2; align-self: center; width: 18px; height: 18px; }
  .pbr-group-label { padding: 14px 18px 6px; font-size: 13px; }

  /* Game tab */
  .pbr-box-tab { padding: 12px 18px 14px; }
  .pbr-box-tab table { font-size: 16px; }
  .pbr-box-tab th { font-size: 13px; min-width: 34px; }
  .pbr-box-tab td:first-child { font-size: 16px; }
  .pbr-leads { gap: 36px; padding: 16px 22px; }
  .pbr-lead-team { font-size: 16px; }
  .pbr-lead b { font-size: 24px; }
  .pbr-lead-at { font-size: 14px; }
  .pbr-h2h-logo, .pbr-lead img { width: 28px; height: 28px; }
  .pbr-h2h { padding: 14px 22px 20px; }
  .pbr-h2h-row { margin-top: 16px; }
  .pbr-h2h-val { font-size: 17px; min-width: 56px; }
  .pbr-h2h-lbl { font-size: 16px; }
  .pbr-h2h-bar { height: 7px; margin-top: 7px; }
  .pbr-details { padding: 14px 22px 18px; gap: 11px; }
  .pbr-detail-row { font-size: 17px; }
  .pbr-momentum-svg { height: 150px; }
  .mlb-gd-ls-chal { font-size: 10px; }

  /* team tabs */
  .pbr-bx-team { gap: 14px; padding: 16px 22px 6px; }
  .pbr-bx-logo { width: 46px; height: 46px; }
  .pbr-bx-code { font-size: 28px; }
  .pbr-bx-totals { gap: 6px; padding: 10px 18px 16px; }
  .pbr-bx-row { gap: 14px; padding: 13px 16px 13px 18px; }
  .pbr-bx-id { width: 168px; }
  .pbr-bx-id .pbr-due-name { font-size: 17px; }
  .pbr-bx-id .pbr-due-stat { font-size: 13px; }
  .pbr-due-pos { font-size: 20px; width: 24px; }
  .pbr-bx-cell { flex: 1 0 48px; }
  .pbr-bx-cell b { font-size: 16px; }
  .pbr-bx-cell i { font-size: 11px; margin-top: 3px; }

  /* detail modal: enlarge content + widen card (it lives on document.body) */
  .pbr-modal { padding: 10px; }
  .pbr-modal .pbr-modal-card { max-width: 760px; padding: 28px 24px; }
  .pbr-modal .pbr-modal-state { font-size: 15px; }
  .pbr-modal .pbr-modal-title { font-size: 30px; }
  .pbr-modal .pbr-modal-players { font-size: 17px; gap: 10px; }
  .pbr-modal .pbr-headshot--xs { width: 42px; height: 42px; font-size: 14px; }
  .pbr-modal .pbr-panel-title { font-size: 13px; }
  .pbr-modal .pbr-zone-legend { gap: 18px; }
  .pbr-modal .pbr-zli { font-size: 14px; }
  .pbr-modal .pbr-zdot { width: 11px; height: 11px; }
  .pbr-modal .pbr-stat-val { font-size: 26px; }
  .pbr-modal .pbr-stat-lbl { font-size: 12px; }
  .pbr-modal .pbr-pitch-row { font-size: 16px; padding: 8px 6px; }
  .pbr-modal .pbr-pnum { min-width: 22px; }
  .pbr-modal .pbr-ptype { font-size: 13px; }
  .pbr-modal .pbr-pvelo { font-size: 14px; }
  .pbr-modal .pbr-modal-note { font-size: 16px; }

  /* ââ Props tab: the pregame decision surface. Same treatment as the Live
     tab â one continuous de-boxed surface, type at ~1.7-2x natural for the
     980px virtual viewport (no viewport meta site-wide). ââ */
  #mlb-game-detail .mlb-gd-props-group {
    background: none; border: none; border-radius: 0;
    padding: 6px 4px 16px; box-shadow: none;
  }
  .mlb-gd-pills {
    flex-wrap: nowrap; overflow-x: auto; gap: 10px;
    padding: 4px 2px 14px; margin-bottom: 10px;
    scrollbar-width: none;
  }
  .mlb-gd-pills::-webkit-scrollbar { display: none; }
  .mlb-gd-pill { font-size: 22px; padding: 13px 26px; flex: none; }
  .mlb-gd-players-list { grid-template-columns: 1fr; gap: 4px; }
  .mlb-gd-team-col-header { font-size: 18px; padding: 18px 0 12px; margin-bottom: 2px; }
  .mlb-gd-team-col-logo { width: 36px; height: 36px; }
  .mlb-gd-prop-player { padding: 17px 0; gap: 14px; }
  .mlb-gd-prop-header { gap: 15px; }
  .mlb-gd-prop-avatar { width: 62px; height: 62px; }
  .mlb-gd-prop-name { font-size: 24px; font-weight: 700; }
  .mlb-gd-prop-verdict { font-size: 19px; margin-top: 4px; }
  .mlb-gd-factors { gap: 9px; margin-top: 10px; }
  .mlb-gd-factor { font-size: 16px; padding: 6px 15px; }
  .mlb-gd-prop-grade { height: 60px; padding: 0 15px; gap: 9px; border-radius: 10px; }
  .mlb-gd-grade-num { font-size: 19px; }
  .mlb-gd-grade-word { font-size: 12px; }
  .mlb-gd-edge-pill { height: 60px; padding: 0 15px; gap: 9px; border-radius: 10px; }
  .mlb-gd-prop-right { gap: 12px; }
  .mlb-gd-lines { gap: 9px; }
  .mlb-gd-line-over, .mlb-gd-line-under {
    font-size: 19px; min-width: 132px; height: 60px; padding: 0 15px; border-radius: 10px;
  }
  .mlb-gd-more-btn { padding: 4px 18px; }
  .mlb-gd-more-btn svg { width: 25px; height: 25px; }
  .mlb-gd-props-group .mlb-gd-empty { font-size: 18px; padding: 18px 4px; }
}

/* ââ Live in-play odds: suspended lines (book pulled the quote mid-game) ââ */
.mlb-gd-line-row[data-live-suspended="1"] {
  opacity: 0.45;
  pointer-events: none;
}


/* ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   DESKTOP LIVE TAB â Game-State Cluster (from Claude Design). The at-bat is
   one instrument panel: batter | strike-zone + giant count | bases + pitcher,
   with the pitch table full-width below. Bases + pitcher fold up out of the
   old due-up/mound bands (the mound band is retired on desktop). Boxed cards â
   the cluster IS the integration. Real player/team images throughout. All new
   pieces are desktop-only (display:none â¤1000px), so the approved mobile
   layout is untouched. Scoped under #mlb-pbp-root (the Game/team tab panels
   share .pbr-wrap and must not catch these).
   ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
@media (min-width: 1001px) {
  /* macro: stage (col 1) | feed rail (col 2). Live/final switch is the
     sibling selector reacting to the `hidden` flips paintLive already does. */
  #mlb-pbp-root.pbr-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
  }
  #mlb-pbp-root .pbr-grid {
    grid-column: 1; grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  /* Feed rail: pinned + INDEPENDENTLY SCROLLABLE. Caps to the viewport and
     scrolls its inner feed when the play list outgrows the stage, instead of
     stretching the whole page tall. The "Recent plays" card-head stays put
     (only .pbr-feed scrolls). Sticky degrades gracefully — if an app-shell
     ancestor has overflow set so sticky no-ops, the inner feed still scrolls
     on its own, which is the actual ask. */
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays {
    grid-column: 2; grid-row: 1; min-width: 0;
    position: sticky; top: 12px; align-self: start;
    max-height: calc(100vh - 24px);
    display: flex; flex-direction: column;
  }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-feed {
    overflow-y: auto; min-height: 0;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent;
  }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-feed::-webkit-scrollbar { width: 8px; }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-feed::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.16); border-radius: 99px;
  }
  #mlb-pbp-root .pbr-grid[hidden] + .pbr-plays { grid-column: 1 / -1; }
  #mlb-pbp-root .pbr-side { gap: 16px; }
  #mlb-pbp-mound { display: none; }                    /* folded into the cluster */
  #mlb-pbp-current .pbr-card-head { display: none; }   /* the cluster needs no title */

  /* reveal the desktop cluster atoms (base rule hides them â¤1000) */
  #mlb-pbp-current .pbr-clu-batter,
  #mlb-pbp-current .pbr-clu-side,
  #mlb-pbp-current .pbr-clu-count { display: flex; }
  #mlb-pbp-current .pbr-cab-pthead { display: grid; }

  /* ââ the cluster grid inside the at-bat card ââ */
  #mlb-pbp-current {
    display: grid;
    grid-template-columns: 1fr 312px 1fr;
    grid-template-areas:
      "banner banner banner"
      "batter center side"
      "batter count  side"
      "pthead pthead pthead"
      "pitch  pitch  pitch";
  }
  #mlb-pbp-current .pbr-cab-banner { grid-area: banner; }
  #mlb-pbp-current .pbr-cab-banner[hidden] { display: block; visibility: hidden; }  /* CLS slot reservation */

  /* left column â batter */
  #mlb-pbp-current .pbr-clu-batter {
    grid-area: batter; align-self: center;
    flex-direction: column; gap: 14px; padding: 24px 22px;
  }
  .pbr-clu-ava { width: 56px; height: 56px; font-size: 18px; }
  .pbr-clu-name { font-weight: 700; font-size: 22px; line-height: 1.12; margin-top: 3px; color: var(--gd-text); }
  .pbr-clu-pos { font-family: var(--gd-font-mono); font-size: 12px; color: var(--gd-text-2); margin-top: 5px; }
  .pbr-clu-chips { display: flex; gap: 7px; flex-wrap: wrap; }
  .pbr-chip2 {
    font-family: var(--gd-font-mono); font-size: 11px; color: #C7CBD3;
    background: var(--gd-surface-2); border: 1px solid var(--gd-line);
    border-radius: 5px; padding: 4px 9px;
  }
  .pbr-chip2 b { color: #fff; font-weight: 700; }

  /* center column â strike zone (top) + giant count (bottom): one well */
  #mlb-pbp-current .pbr-zone-panel {
    grid-area: center;
    background: #0E0F15;
    border-left: 1px solid var(--gd-line); border-right: 1px solid var(--gd-line);
    padding: 20px 14px 6px; gap: 0; justify-content: flex-start;
  }
  #mlb-pbp-current .pbr-zone-panel .pbr-cab-zone { max-width: 248px; background: none; border: none; padding: 0; }
  #mlb-pbp-current .pbr-zone-legend { display: none; }
  #mlb-pbp-current .pbr-clu-count {
    grid-area: count;
    background: #0E0F15;
    border-left: 1px solid var(--gd-line); border-right: 1px solid var(--gd-line);
    padding: 4px 14px 22px;
    flex-direction: column; align-items: center; gap: 12px;
  }
  .pbr-clu-bs {
    font-family: var(--gd-font-display); font-weight: 700; font-size: 58px; line-height: .78;
    display: flex; align-items: baseline; gap: 3px;
  }
  .pbr-clu-b { color: var(--gd-ball); }
  .pbr-clu-s { color: var(--gd-strike); }
  .pbr-clu-sep { color: #3a4150; font-size: 36px; }
  .pbr-clu-pips { display: flex; align-items: center; gap: 14px; }
  .pbr-clu-pgrp { display: flex; align-items: center; gap: 5px; }
  .pbr-clu-pgrp i { font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; color: var(--gd-text-3); }
  .pbr-clu-pip { width: 9px; height: 9px; border-radius: 50%; border: 1.3px solid rgba(255,255,255,.18); }
  .pbr-clu-pip.on-b { background: var(--gd-ball); border-color: var(--gd-ball); }
  .pbr-clu-pip.on-s { background: var(--gd-strike); border-color: var(--gd-strike); }

  /* right column â bases + runners + pitcher + stat strip */
  #mlb-pbp-current .pbr-clu-side {
    grid-area: side; align-self: center;
    flex-direction: column; gap: 16px; padding: 24px 22px;
  }
  .pbr-clu-situ { display: flex; align-items: center; gap: 18px; }
  #mlb-pbp-current .pbr-clu-bases .pbr-due-bases { display: block; width: 80px; height: 80px; flex: none; }
  #mlb-pbp-current .pbr-clu-bases .pbr-bb { width: 32px; height: 32px; }
  #mlb-pbp-current .pbr-clu-bases .pbr-bb--2 { top: 0; left: 24px; }
  #mlb-pbp-current .pbr-clu-bases .pbr-bb--1 { top: 24px; left: 48px; }
  #mlb-pbp-current .pbr-clu-bases .pbr-bb--3 { top: 24px; left: 0; }
  #mlb-pbp-current .pbr-clu-bases .pbr-bb-init { font-size: 11px; }
  .pbr-clu-rlabel { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--gd-text-3); margin-bottom: 6px; }
  .pbr-clu-rlist { font-family: var(--gd-font-mono); font-size: 12px; color: #C7CBD3; line-height: 1.7; }
  .pbr-clu-rb { color: var(--gd-inplay); }
  .pbr-clu-div { height: 1px; background: var(--gd-line); }
  .pbr-clu-pitcher { display: flex; align-items: center; gap: 13px; }
  .pbr-clu-pname { font-weight: 600; font-size: 16px; color: var(--gd-text); }
  #mlb-pbp-current .pbr-clu-pstat { border-top: none; border: 1px solid var(--gd-line); border-radius: 9px; overflow: hidden; }
  #mlb-pbp-current .pbr-clu-pstat .pbr-pstat { padding: 9px 0; }
  #mlb-pbp-current .pbr-clu-pstat .pbr-pstat b { font-size: 21px; }

  /* full-width pitch table below the cluster */
  #mlb-pbp-current .pbr-cab-body { display: contents; }
  #mlb-pbp-current .pbr-cab-pthead {
    grid-area: pthead;
    grid-template-columns: 24px 1fr 76px 130px; gap: 12px;
    padding: 9px 22px;
    border-top: 1px solid var(--gd-line); border-bottom: 1px solid var(--gd-line);
    font-family: var(--gd-font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; color: var(--gd-text-3);
  }
  #mlb-pbp-current .pbr-cab-pthead .pbr-pth-mph,
  #mlb-pbp-current .pbr-cab-pthead .pbr-pth-res { text-align: right; }
  #mlb-pbp-current .pbr-pitches { grid-area: pitch; border-right: none; padding: 6px 12px 8px; }
  #mlb-pbp-current .pbr-pitch { grid-template-columns: 24px 1fr 76px 130px; }
  #mlb-pbp-current .pbr-velo { display: none; }

  /* due-up card â rows side by side; its diamond is hidden (now in the cluster) */
  #mlb-pbp-dueup .pbr-due-flex { justify-content: flex-start; gap: 28px; padding: 2px 2px 4px; }
  #mlb-pbp-dueup .pbr-dueup { flex-direction: row; gap: 28px; }
  #mlb-pbp-dueup .pbr-due-row + .pbr-due-row { border-top: none; }
  #mlb-pbp-dueup .pbr-due-flex .pbr-due-bases { display: none; }

  /* ââ feed rail: theScore play cards in a boxed card; sticky half-inning
     labels; scoring plays break the rhythm with a green rail + wash ââ */
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-group-label {
    position: sticky; top: 0; z-index: 2;
    background: var(--gd-surface);
    padding: 12px 20px 9px;
  }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 12px;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    align-items: start;
    padding: 11px 20px 13px;
  }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play + .pbr-play { border-top: 1px solid var(--gd-line); }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play-logo,
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play-batter,
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play-event { display: none; }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play-ctx {
    grid-column: 1 / 3; grid-row: 1;
    font-family: var(--gd-font-mono); font-size: 11px; font-weight: 600; color: var(--gd-text-2);
    gap: 0; margin-bottom: 3px;
  }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-ctx-mini { min-width: 58px; gap: 6px; }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-ctx-logo { width: 15px; height: 15px; }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-feed-ava {
    display: block; position: relative; grid-column: 1; grid-row: 2;
    width: 46px; height: 46px; align-self: center;
  }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-headshot--feed { display: flex; width: 46px; height: 46px; font-size: 14px; }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-ava-badge {
    position: absolute; right: -4px; bottom: -2px; width: 20px; height: 20px; object-fit: contain;
  }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play-desc { display: block; grid-column: 2; grid-row: 2; min-width: 0; }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play-headline {
    display: block; font-size: 14px; font-weight: 700; color: var(--gd-text); line-height: 1.3;
  }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play-headline.scoring { color: var(--gd-ball); }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play-sub {
    display: block; font-size: 12px; color: #C7CBD3; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play-sub--b { color: var(--gd-text); }
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-chev { grid-column: 3; grid-row: 2; align-self: center; }
  /* scoring play â green rail + wash, like the design */
  #mlb-pbp-root .pbr-grid:not([hidden]) + .pbr-plays .pbr-play--score {
    background: linear-gradient(90deg, rgba(61,220,132,.08), rgba(61,220,132,0) 60%);
    border-left: 3px solid var(--gd-ball);
    padding-left: 17px;
  }

  /* header + linescore de-card so the cards below don't sit under a boxed
     scoreboard; the cluster + cards carry the structure */
  #mlb-game-detail .mlb-gd-sb { background: none; border: none; border-radius: 0; }
  #mlb-game-detail .mlb-gd-sb-main { padding: 18px 10px 16px; }
  #mlb-game-detail .mlb-gd-linescore { display: none; }
  /* the cluster owns the bases + count now → drop the header mini-diamond/pips */
  #mlb-game-detail .mlb-gd-basecount { display: none; }
}
