@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  --bg: rgb(7, 7, 7);
  --bg-card: rgb(13, 13, 13);
  --bg-elevated: rgb(18, 18, 18);
  --bg-subtle: rgb(22, 22, 22);
  --border: rgb(28, 28, 28);
  --border-strong: rgb(44, 44, 44);
  --text: rgba(255, 255, 255, 0.96);
  --text-muted: rgba(255, 255, 255, 0.55);
  --text-dim: rgba(255, 255, 255, 0.32);
  --accent: #00E676;
  --accent-bright: #5BFF9E;
  --accent-dim: rgba(0, 230, 118, 0.10);
  --accent-border: rgba(0, 230, 118, 0.28);
  --warn: #F59E0B;
  --cold: #64748B;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.app { max-width: 480px; margin: 0 auto; padding: 0 0 60px 0; position: relative; }

header {
  padding: 18px 18px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
}
.wordmark {
  font-weight: 800; font-size: 20px; letter-spacing: -0.03em;
  display: flex; align-items: center; gap: 6px;
}
.wordmark::before {
  content: ''; width: 8px; height: 8px;
  background: var(--accent); border-radius: 2px;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.5);
}
.date-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.04em; text-transform: uppercase;
}

.prop-tabs {
  display: flex; gap: 6px; padding: 14px 18px;
  justify-content: center;
  overflow-x: auto; scrollbar-width: none;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.prop-tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; padding: 7px 14px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted); background: transparent;
  cursor: pointer; letter-spacing: -0.01em;
  transition: all 0.18s ease; font-family: inherit;
}
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tab.premium { display: flex; align-items: center; gap: 5px; }

.profile-headline {
  padding: 18px 18px 6px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.profile-name { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.profile-name .sub { color: var(--text-muted); font-weight: 400; margin-left: 8px; font-size: 11px; }
.slate-count {
  font-family: 'Geist Mono', monospace;
  font-size: 11px; color: var(--text-dim); flex-shrink: 0;
}

.game-card {
  margin: 10px 12px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; cursor: pointer;
}
.game-card.expanded { border-color: var(--border-strong); cursor: default; }

.game-head {
  padding: 14px 16px;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 12px;
}
.team { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.team img { width: 38px; height: 38px; object-fit: contain; }
.team-name { font-size: 11px; font-weight: 500; color: var(--text); text-align: center; letter-spacing: -0.01em; line-height: 1.2; }
.team-meta { font-family: 'Geist Mono', monospace; font-size: 9px; color: var(--text-dim); letter-spacing: 0.04em; }
.vs { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--text-dim); letter-spacing: 0.1em; padding-bottom: 14px; }

.game-meta-strip {
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--border);
  background: transparent;
}
.meta-item {
  background: transparent;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--border);
  min-height: 56px;
}
.meta-item > div:last-child,
.meta-item > .meta-value {
  min-height: 22px;
  display: flex;
  align-items: center;
}
.meta-item:last-child { border-right: none; }
.meta-label { font-size: 9px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }
.meta-value { font-family: 'Geist Mono', monospace; font-size: 8px; color: var(--text); font-weight: 500; }
.meta-value.hot { color: var(--accent); }
.meta-value.cold { color: var(--cold); }

.collapsed-tail {
  padding: 8px 16px 12px; display: flex;
  justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border);
}
.collapsed-tail .prompt { font-size: 10px; color: var(--text-dim); letter-spacing: 0.04em; }
.collapsed-tail .arrow { color: var(--text-dim); font-size: 14px; }

.expanded-body { border-top: 1px solid var(--border); }

.section-label {
  padding: 18px 16px 8px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.section-label .hand-tag {
  font-family: 'Geist Mono', monospace; font-size: 10px;
  padding: 2px 7px; background: var(--bg-elevated);
  border: 1px solid var(--border-strong); border-radius: 4px;
  color: var(--text-muted); letter-spacing: 0.05em;
}

.pitcher-card {
  margin: 0 12px; padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 12px;
}
.pitcher-top { display: flex; gap: 14px; align-items: flex-start; }
.headshot { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex-shrink: 0; display: flex; align-items: flex-end; justify-content: center; background: transparent; }
.headshot img { width: 100%; height: auto; }
.pitcher-info { flex: 1; min-width: 0; }
.pitcher-name { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 3px; }
.pitcher-team { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--text-muted); letter-spacing: 0.05em; margin-bottom: 10px; }

.quick-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat-chip { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 6px 4px; text-align: center; }
.stat-chip .v { font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 500; color: var(--text); display: block; line-height: 1; margin-bottom: 3px; }
.stat-chip .l { font-size: 8px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }
.stat-chip .n { font-family: 'Geist Mono', monospace; font-size: 7px; color: var(--text-dim); display: block; margin-top: 2px; }
.stat-chip.hot .v { color: var(--accent); }
.stat-chip.elite .v { color: var(--accent-bright); }
.stat-chip.cold .v { color: var(--cold); }

.splits-row {
  margin-top: 10px; padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.split { display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; }
.split .l { font-size: 9px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.split .v { font-family: 'Geist Mono', monospace; font-size: 13px; color: var(--text); font-weight: 500; }
.split.hot .v { color: var(--accent); }
.split.cold .v { color: var(--cold); }

.pitch-mix { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.pitch-mix-label { font-size: 9px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.pitch-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -4px; padding: 0 4px; }
.pitch-scroll::-webkit-scrollbar { display: none; }
.pitch-card { flex-shrink: 0; min-width: 92px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.pitch-type { font-size: 10px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.pitch-type::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }
.pitch-stats-mini { display: flex; flex-direction: column; gap: 2px; font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--text-muted); }
.pitch-stats-mini .usage { color: var(--text); font-weight: 500; }

.lineup-head { padding: 18px 16px 10px; display: flex; justify-content: space-between; align-items: center; }
.lineup-title { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.confirmed-pill, .projected-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px; font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.confirmed-pill { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }
.projected-pill { background: rgba(245, 158, 11, 0.10); border: 1px solid rgba(245, 158, 11, 0.28); color: var(--warn); }

.batter-row { margin: 0 12px 6px; padding: 10px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; display: flex; gap: 8px; align-items: flex-start; }
.batter-pos { font-family: 'Geist Mono', monospace; font-size: 9px; color: var(--text-dim); padding: 2px 5px; background: var(--bg); border-radius: 3px; letter-spacing: 0.05em; align-self: flex-start; margin-top: 2px; }
.batter-head { flex-shrink: 0; }
.batter-head img { width: 56px; height: 56px; object-fit: contain; object-position: center; border-radius: 12px; background: transparent; }
.batter-info { flex: 1; min-width: 0; }
.batter-name-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.batter-name { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.batter-hand { font-family: 'Geist Mono', monospace; font-size: 9px; color: var(--text-muted); padding: 1px 5px; border: 1px solid var(--border-strong); border-radius: 3px; letter-spacing: 0.06em; flex-shrink: 0; }

.batter-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; width: 100%; }
.bstat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bstat .l { font-size: 8px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bstat .v { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--text); font-weight: 500; }
.bstat .n { font-family: 'Geist Mono', monospace; font-size: 8px; color: var(--text-dim); letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bstat .n .k-season { font-style: italic; cursor: help; }
.bstat .n .no-data { cursor: help; opacity: 0.7; }
.bstat.hot .v { color: var(--accent); }
.bstat.elite .v { color: var(--accent-bright); }
.bstat.cold .v { color: var(--cold); }

.adv-splits { padding-top: 8px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.adv-split { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; gap: 6px; }
.adv-split .l { color: var(--text-dim); font-weight: 500; letter-spacing: 0.02em; }
.adv-split .v { font-family: 'Geist Mono', monospace; color: var(--text); font-weight: 500; }
.adv-split.hot .v { color: var(--accent); }
.adv-split.elite .v { color: var(--accent-bright); }
.adv-split .tag { font-family: 'Geist Mono', monospace; font-size: 8px; color: var(--text-dim); margin-right: 4px; letter-spacing: 0.04em; }

.loading { padding: 60px 24px; text-align: center; color: var(--text-dim); font-size: 12px; letter-spacing: 0.04em; }
.error { padding: 20px; text-align: center; color: var(--warn); font-size: 12px; }

.footer-note { padding: 30px 18px 20px; font-size: 10px; color: var(--text-dim); text-align: center; letter-spacing: 0.04em; line-height: 1.7; }

.pitcher-name-row { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.pitcher-hand {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.matchup-toggle {
  display: flex;
  padding: 12px 12px 0;
  gap: 6px;
}
.toggle-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  letter-spacing: -0.01em;
  font-family: inherit;
}
.toggle-btn.active {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}
.toggle-btn .sub {
  color: var(--text-dim);
  font-weight: 400;
}

/* Verdict callouts */
.verdict {
  font-size: 11px;
  padding: 6px 8px;
  background: var(--bg);
  border-left: 2px solid var(--border-strong);
  border-radius: 3px;
  margin-bottom: 10px;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--text-muted);
}
.verdict-hot {
  border-left-color: var(--accent);
  color: var(--text);
}
.verdict-hot::before {
  content: '⚡ ';
  color: var(--accent);
  margin-right: 2px;
}
.verdict-cold {
  border-left-color: var(--cold);
  color: var(--text-muted);
}
.verdict-cold::before {
  content: '❄ ';
  color: var(--cold);
  margin-right: 2px;
}
.verdict-neutral {
  border-left-color: var(--border-strong);
  color: var(--text-muted);
}

/* PA Log accordion */
.batter-row-wrap { margin: 0 8px 6px; }
.batter-row-wrap .batter-row { margin: 0; }
.batter-head[data-batter-id] { cursor: pointer; }
.batter-head[data-batter-id]:hover { opacity: 0.85; }

.pa-log-panel {
  margin-top: -1px;
  padding: 10px 12px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.batter-row-wrap:has(.pa-log-panel) .batter-row {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.pa-log-loading, .pa-empty {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  padding: 12px;
  letter-spacing: 0.04em;
}

.pa-list { display: flex; flex-direction: column; gap: 4px; }

.pa-row {
  display: grid;
  grid-template-columns: 60px 50px 1fr;
  align-items: baseline;
  gap: 10px;
  font-size: 10.5px;
  padding: 5px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pa-row:last-child { border-bottom: none; }

.pa-date {
  font-family: 'Geist Mono', monospace;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.pa-outcome {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 1px 0;
}
.pa-outcome.pa-hr { color: var(--accent-bright); font-weight: 700; }
.pa-outcome.pa-hit { color: var(--accent); }
.pa-outcome.pa-k { color: #EF7A5A; }
.pa-outcome.pa-out { color: var(--text-dim); }
.pa-outcome.pa-neutral { color: var(--text-muted); }

.pa-detail {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Smooth slide-down animation for PA log */
.pa-log-panel {
  animation: pa-slide-down 0.22s ease-out;
  transform-origin: top;
  overflow: hidden;
}

@keyframes pa-slide-down {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    max-height: 600px;
    padding-top: 10px;
    padding-bottom: 12px;
    transform: translateY(0);
  }
}

/* Closing animation — mirror of the opening slide */
.pa-log-panel.pa-log-closing {
  animation: pa-slide-up 0.18s ease-in forwards;
}

@keyframes pa-slide-up {
  from {
    opacity: 1;
    max-height: 600px;
    padding-top: 10px;
    padding-bottom: 12px;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    transform: translateY(-4px);
  }
}

/* ========== BvP VIEW ========== */
.bvp-view {
  padding: 0 0 40px;
}

.bvp-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  margin: 8px 12px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
}
.bvp-back:hover { color: var(--text); border-color: var(--text-muted); }

.bvp-hero {
  margin: 10px 12px;
  padding: 16px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
}

.bvp-hero-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.bvp-hero-player {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bvp-hero-player.right {
  justify-content: flex-end;
}

.bvp-hero-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bvp-hero-meta.right { text-align: right; }

.bvp-hero-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.bvp-hero-sub {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.bvp-hero-vs {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  padding: 0 4px;
}

/* Sub-tabs */
.bvp-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 12px;
  margin-top: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.bvp-subtabs::-webkit-scrollbar { display: none; }

.sub-tab {
  flex-shrink: 0;
  padding: 9px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
  margin-bottom: -1px;
}
.sub-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.bvp-body {
  padding: 14px 12px;
}

/* PA log panel inside BvP view — bigger than the accordion version */
.bvp-pa-wrap .pa-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.bvp-pa-wrap .pa-row {
  padding: 7px 4px;
  font-size: 11px;
}

/* Splits tables */
.splits-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.splits-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
  padding-left: 2px;
}
.splits-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.splits-table th {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--border);
}
.splits-table th:first-child { text-align: left; }
.splits-table td {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text);
  text-align: right;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.splits-table tr:last-child td { border-bottom: none; }
.splits-table td.split-label {
  font-family: 'Geist', -apple-system, sans-serif;
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: -0.01em;
}

/* Game Log sub-tab */
.gl-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gl-totals {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.gl-total {
  background: var(--bg-card);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.gl-total .l {
  font-family: 'Geist Mono', monospace;
  font-size: 8px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.gl-total .v {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}

.gl-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.gl-row {
  display: grid;
  grid-template-columns: 60px repeat(auto-fit, minmax(0, 1fr));
  grid-auto-flow: column;
  gap: 4px;
  padding: 7px 10px;
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: baseline;
}
.gl-row:last-child { border-bottom: none; }

.gl-row.gl-header {
  background: var(--bg-subtle);
  padding: 6px 10px;
}
.gl-row.gl-header .gl-date,
.gl-row.gl-header .gl-cell {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.gl-date {
  font-family: 'Geist Mono', monospace;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.gl-cell {
  font-family: 'Geist Mono', monospace;
  color: var(--text);
  text-align: right;
  font-size: 11px;
}
.gl-cell.gl-hr { color: var(--accent-bright); font-weight: 700; }
.gl-cell.gl-hit { color: var(--accent); }
.gl-cell.gl-out { color: var(--text-dim); }

/* Solo batter hero (Game Log / Splits / Advanced sub-tabs) */
.bvp-hero-solo {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
}
.bvp-hero-meta.solo {
  align-items: center;
  text-align: center;
}

/* Advanced sub-tab */
.adv-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.adv-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adv-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-left: 2px;
}

/* Recent Form grid */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.recent-cell {
  background: var(--bg-card);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.recent-cell .l {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.recent-cell .v {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

/* Spray bar */
.spray-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.spray-bar {
  display: flex;
  height: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.spray-seg {
  height: 100%;
  transition: width 0.3s ease;
}
.spray-seg.spray-pull { background: #5BFF9E; }
.spray-seg.spray-center { background: #64748B; }
.spray-seg.spray-oppo { background: #4ECDC4; }
.spray-legend {
  display: flex;
  justify-content: space-between;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
}
.spray-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: baseline;
}
.spray-legend .dot.spray-pull { background: #5BFF9E; }
.spray-legend .dot.spray-center { background: #64748B; }
.spray-legend .dot.spray-oppo { background: #4ECDC4; }

/* Pitch-type table */
.pt-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.pt-row {
  display: grid;
  grid-template-columns: 1.3fr repeat(6, 1fr);
  gap: 4px;
  padding: 8px 10px;
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: baseline;
}
.pt-row:last-child { border-bottom: none; }
.pt-row.pt-header {
  background: var(--bg-subtle);
  padding: 6px 10px;
}
.pt-row.pt-header .pt-name,
.pt-row.pt-header .pt-cell {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.pt-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text);
  font-weight: 500;
}
.pt-row.pt-header .pt-name { justify-content: flex-start; }
.pt-cell {
  font-family: 'Geist Mono', monospace;
  color: var(--text);
  text-align: right;
  font-size: 11px;
}
.pt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.pt-dot.pt-ff, .pt-dot.pt-fa { background: #FF6B6B; }
.pt-dot.pt-sl { background: #4ECDC4; }
.pt-dot.pt-ch { background: #F7B731; }
.pt-dot.pt-cu, .pt-dot.pt-kc { background: #A55EEA; }
.pt-dot.pt-si { background: #5D7AC9; }
.pt-dot.pt-fc { background: #E879F9; }

/* Pitch-type cell highlights (mirrors gl-hr/gl-hit for game log) */
.pt-cell.gl-hr { color: var(--accent-bright); font-weight: 700; }
.pt-cell.gl-hit { color: var(--accent); }

/* Cold value (e.g. high Whiff% vs a pitch = bad for batter) */
.pt-cell.gl-cold { color: var(--cold); }

/* Low-sample row (5 <= PA < 10) — de-emphasized; tooltip explains */
.pt-row.pt-low-sample .pt-name,
.pt-row.pt-low-sample .pt-cell { color: var(--text-dim); opacity: 0.65; }

/* Next / prev batter navigation */
.bvp-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px;
  margin-top: 10px;
}

.bvp-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.bvp-nav-btn:hover:not(:disabled) {
  border-color: var(--text-dim);
  background: var(--bg-subtle);
}
.bvp-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.bvp-nav-btn.next {
  justify-content: flex-end;
}

.bvp-nav-photo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: transparent;
}
.bvp-nav-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bvp-nav-txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}
.bvp-nav-txt.right {
  align-items: flex-end;
  text-align: right;
}

.bvp-nav-spot {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
}

.bvp-nav-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.bvp-nav-empty {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  margin: 0 auto;
}

/* ============================================
   NEW HEADER (hamburger + brand + date)
   ============================================ */
.app-header {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 44px;
}

.menu-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.menu-btn:hover { background: var(--bg-subtle); }
.menu-btn span {
  display: block;
  width: 16px;
  height: 1.6px;
  background: var(--text);
  border-radius: 2px;
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  height: 100%;
}
.brand-logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent);
  flex-shrink: 0;
}
.brand-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
}

.header-date {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  justify-self: end;
}

/* ============================================
   MENU DRAWER
   ============================================ */
.menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
}
.menu-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.menu-drawer.open .menu-backdrop { opacity: 1; }

.menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding: 14px 0 24px;
}
.menu-drawer.open .menu-panel { transform: translateX(0); }

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.menu-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.menu-close {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.menu-close:hover { background: var(--bg-subtle); color: var(--text); }

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 10px;
}

.menu-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px 10px;
}
.menu-sport-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, color 0.15s ease;
}
.menu-item:hover { background: var(--bg-subtle); color: var(--text); }
.menu-item.active {
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 600;
}


/* Date strip under header */
.header-date-strip {
  display: flex;
  justify-content: center;
  padding: 10px 14px;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}



/* Retry button in error states */
.retry-btn {
  display: inline-block;
  margin-left: 8px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--text-muted);
  border-radius: 999px;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.retry-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--text);
}

/* ============================================
   WEATHER PAGE
   ============================================ */
.weather-container {
  padding: 12px 12px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.weather-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.weather-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.weather-teams {
  display: flex;
  align-items: center;
  gap: 8px;
}
.weather-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.weather-at {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.weather-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
  min-width: 0;
}
.weather-venue {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.weather-time {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.weather-park-wrap {
  position: relative;
  background: var(--bg);
  padding: 12px 12px 10px;
  min-height: 160px;
}

.park-svg {
  width: 100%;
  height: auto;
  max-height: 260px;
  display: block;
}

.park-fallback {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 0;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.park-roof-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  font-weight: 500;
  z-index: 2;
  white-space: nowrap;
  pointer-events: none;
}
.park-roof-badge.roof-retractable { color: var(--text-muted); }
.park-roof-badge.roof-dome { color: var(--text-muted); }

.weather-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.wstat {
  background: var(--bg-card);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wstat .l {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.wstat .v {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.wstat .n {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.park-roof-badge.roof-closed {
  color: #F5A05B;
  border-color: rgba(245, 160, 91, 0.3);
}
.park-roof-badge.roof-open {
  color: #5BFF9E;
  border-color: rgba(91, 255, 158, 0.3);
}

/* Roof status line under wind on game card */
.roof-status {
  font-family: 'Geist Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 500;
  margin-top: 2px;
  color: var(--text-dim);
  line-height: 1.1;
  white-space: nowrap;
}
.roof-status.hot { color: #00E676; }
.roof-status.cold { color: #F59E0B; }

/* Park meta: full name in small type, rank stays prominent */
.park-name-full {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-weight: 500;
  display: inline-block;
  margin-right: 3px;
  line-height: 1.2;
  white-space: nowrap;
}
.park-rank {
  font-family: 'Geist Mono', monospace;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Wind box variants for roof state */
.meta-value.roof-closed-text {
  color: #F59E0B;
}
.roof-open-tag {
  font-family: 'Geist Mono', monospace;
  font-size: 8px;
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 2px;
}

/* ============================================
   STATUS PILL + SCORE BOX
   ============================================ */
.status-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 5px;
  border-radius: 999px;
  font-family: 'Geist Mono', monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
  z-index: 2;
}
.status-pill.live {
  background: rgba(255, 59, 59, 0.12);
  border: 1px solid rgba(255, 59, 59, 0.4);
  color: #FF5E5E;
}
.status-pill.final {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FF5E5E;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ensure .game-head is positioned so pill can anchor */
.game-head { position: relative; }

/* Score box */
.score-box {
  padding: 14px 14px;
  border-top: 1px solid var(--border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 72px;
}
.score-box .score-side {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.score-box .score-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
}
.score-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: 'Geist Mono', monospace;
  min-width: 70px;
}
.score-row .sb-team { min-width: 34px; }
.score-row .sb-runs { margin-left: auto; }
.sb-team {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}
.sb-runs {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.score-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  align-self: center;
}

.score-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.inning-pill {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  letter-spacing: 0.06em;
}
.bases-mini {
  opacity: 0.95;
}
.outs-dots {
  display: flex;
  gap: 3px;
  align-items: center;
 margin-top: -8px !important; }
.out-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.out-dot.filled {
  background: var(--text);
  border-color: var(--text);
}

/* Single-line score ticker */
.score-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  font-family: 'Geist Mono', monospace;
  flex: 1;
}
.score-line .sb-team,
.score-line .sb-runs,
.score-line .sb-dash {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}
.score-line .sb-dash {
  color: var(--text-dim);
  font-weight: 500;
}


/* Date positioned absolutely so it doesn't affect brand centering */
.app-header {
  position: relative;
}
.header-date {
  position: absolute;
  right: 14px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
}

/* Hand filter pill group (Advanced sub-tab) */
.adv-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.hand-filter {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}
.hand-btn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.hand-btn:hover { color: var(--text); }
.hand-btn.active {
  background: var(--bg-subtle);
  color: var(--text);
}

/* ============================================
   LINEUP FILTERS (platoon + sort label)
   ============================================ */
.lineup-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px 10px;
  flex-wrap: wrap;
}
.filter-group.platoon-group {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}
.pfbtn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.pfbtn:hover { color: var(--text); }
.pfbtn.active {
  background: var(--bg-subtle);
  color: var(--text);
}
.sort-label {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Pitch mix: tappable state */
.pitch-chip {
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.pitch-chip.active {
  border: 1px solid var(--accent);
  background: rgba(0, 230, 118, 0.06);
  box-shadow: 0 0 0 1px rgba(0, 230, 118, 0.3);
}
.pitch-chip.dimmed {
  opacity: 0.4;
}
.reset-hint {
  font-weight: 400;
  font-size: 8px;
  color: var(--text-dim);
  margin-left: 4px;
  letter-spacing: 0.08em;
}

/* Pitch card tappable states */
.pitch-card {
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.pitch-card.active {
  border: 1px solid var(--accent);
  background: rgba(0, 230, 118, 0.06);
  box-shadow: 0 0 0 1px rgba(0, 230, 118, 0.3);
}
.pitch-card.dimmed {
  opacity: 0.4;
}

/* ============================================
   HOW TO READ PAGE
   ============================================ */
.howto-container {
  padding: 0 0 80px 0;
}
.howto-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px;
}
.howto-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px 0;
  color: var(--text);
}
.howto-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 20px 0;
}

/* Anchor navigation */
.howto-anchors {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 20px 0;
  margin: 0 0 16px 0;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  justify-content: center;
}
.howto-anchors::-webkit-scrollbar { display: none; }
.howto-anchors a {
  flex-shrink: 0;
  padding: 6px 12px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.howto-anchors a:hover { background: var(--bg-subtle); }

/* Section */
.howto-section {
  margin: 36px 0;
  scroll-margin-top: 80px;
}
.howto-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.howto-subhead {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px 0;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0;
}
.howto-intro {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 8px 0 16px 0;
}
.howto-tip {
  font-size: 13px;
  color: var(--text);
  background: rgba(0, 230, 118, 0.05);
  border-left: 2px solid var(--accent);
  padding: 10px 14px;
  border-radius: 4px;
  margin: 16px 0 8px 0;
  line-height: 1.5;
}
.howto-tip strong {
  color: var(--accent);
  font-weight: 700;
}
.howto-list {
  padding-left: 18px;
  margin: 10px 0 14px 0;
}
.howto-list li {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 6px;
}
.howto-list strong {
  color: var(--text);
  font-weight: 600;
}

/* Example cards */
.example-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0 20px 0;
  background: var(--bg-card);
  position: relative;
}
.example-card.tone-hot { border-color: rgba(0, 230, 118, 0.3); background: rgba(0, 230, 118, 0.03); }
.example-card.tone-cold { border-color: rgba(255, 94, 94, 0.3); background: rgba(255, 94, 94, 0.03); }
.example-card-head {
  margin-bottom: 12px;
}
.example-card-title {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text);
  margin-bottom: 4px;
}
.example-card-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.4;
}
.example-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 10px;
}
@media (min-width: 600px) {
  .example-chips { grid-template-columns: repeat(4, 1fr); }
}
.example-chip {
  padding: 10px 10px 12px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  text-align: center;
  position: relative;
}
.example-chip.good-pitcher,
.example-chip.bad-batter {
  border-color: rgba(0, 230, 118, 0.45);
  background: rgba(0, 230, 118, 0.06);
}
.example-chip.good-batter {
  border-color: rgba(0, 230, 118, 0.45);
  background: rgba(0, 230, 118, 0.06);
}
.example-chip.bad-pitcher {
  border-color: rgba(255, 94, 94, 0.45);
  background: rgba(255, 94, 94, 0.06);
}
.example-chip.neutral {
  border-color: var(--border);
  background: var(--bg-subtle);
}
.ec-value {
  font-size: 18px;
  font-weight: 700;
  font-family: 'Geist Mono', monospace;
  color: var(--text);
  margin-bottom: 2px;
}
.ec-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}
.ec-annotation {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  line-height: 1.2;
  color: var(--accent);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 230, 118, 0.3);
  font-weight: 500;
}
.example-chip.bad-pitcher .ec-annotation,
.example-chip.bad-batter .ec-annotation {
  color: #FF8080;
  border-top-color: rgba(255, 94, 94, 0.3);
}
.example-chip.neutral .ec-annotation {
  color: var(--text-dim);
  border-top-color: var(--border);
}

/* Thresholds table */
.howto-thresholds {
  margin: 20px 0 8px 0;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.howto-thresholds h4 {
  font-family: 'Caveat', cursive;
  font-size: 20px;
  color: var(--accent);
  margin: 0 0 8px 0;
  letter-spacing: 0;
  font-weight: 700;
}
.threshold-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
}
.threshold-table th {
  text-align: left;
  padding: 6px 8px 8px 0;
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.threshold-table td {
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.threshold-table tr:last-child td { border-bottom: none; }

/* Legend */
.howto-legend {
  margin: 40px 0 20px 0;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.howto-legend h2 {
  font-size: 16px;
  margin: 0 0 12px 0;
  border-bottom: none;
}
.legend-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}
.legend-chip {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}
.legend-chip.legend-hot {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.5);
}
.legend-chip.legend-cold {
  background: rgba(255, 94, 94, 0.15);
  border: 1px solid rgba(255, 94, 94, 0.5);
}
.legend-chip.legend-neutral {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

/* ==== HANDWRITTEN ANNOTATED EXAMPLES ==== */
/* Replace old example-card visuals with a real-card-in-frame approach */

.annotated-example {
  margin: 14px 0 28px 0;
}
.ann-caption {
  margin-bottom: 10px;
}
.ann-title {
  font-family: 'Kalam', cursive;
  font-size: 22px;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.1;
}
.ann-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 4px;
}
.ann-card-wrap {
  position: relative;
  padding: 0;
}
.howto-example-card {
  opacity: 1;
  pointer-events: none;
}
.headshot-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.headshot-placeholder.small {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.ann-notes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 18px;
  margin-top: 16px;
  padding: 14px;
  background: rgba(125, 211, 192, 0.04);
  border: 1px dashed rgba(125, 211, 192, 0.3);
  border-radius: 8px;
}
.ann-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.ann-squiggle {
  width: 28px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.ann-text {
  font-family: 'Kalam', cursive;
  font-size: 15px;
  line-height: 1.25;
  color: #7DD3C0;
  font-weight: 400;
}

/* Tighten howto-intro and subheads for the new layout */
.howto-subhead {
  font-family: 'Kalam', cursive !important;
  font-size: 20px !important;
  color: var(--text) !important;
  font-weight: 700 !important;
  margin: 28px 0 10px 0 !important;
}

/* ==== INTERACTIVE HOWTO TUTORIAL ==== */

/* Reset howto-subhead back to plain app style */
.howto-subhead-plain {
  font-family: inherit;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin: 24px 0 4px 0 !important;
  letter-spacing: 0 !important;
}
.howto-example-caption {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  margin: 0 0 12px 0;
}

.howto-card-wrap {
  position: relative;
  margin-bottom: 32px;
}
.howto-live-card {
  pointer-events: auto;
}

/* Tappable chip styling */
.howto-tap {
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.howto-tap:not(.active) {
  opacity: 0.7;
}
.howto-tap.active {
  opacity: 1;
  border: 2px solid #7DD3C0 !important;
  background: rgba(125, 211, 192, 0.1) !important;
  box-shadow: 0 0 0 2px rgba(125, 211, 192, 0.2);
}
.howto-tap:active {
  transform: scale(0.97);
}

/* Note bubble below the card */
.howto-note-bubble {
  margin-top: 14px;
  padding: 16px 18px;
  background: rgba(125, 211, 192, 0.08);
  border: 1.5px dashed rgba(125, 211, 192, 0.5);
  border-radius: 10px;
  position: relative;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, max-height 0.3s ease, padding 0.2s ease;
}
.howto-note-bubble.visible {
  opacity: 1;
  max-height: 200px;
  padding: 16px 18px;
}
.howto-note-arrow {
  position: absolute;
  top: -8px;
  left: 32px;
  width: 14px;
  height: 14px;
  background: rgba(125, 211, 192, 0.08);
  border-top: 1.5px dashed rgba(125, 211, 192, 0.5);
  border-left: 1.5px dashed rgba(125, 211, 192, 0.5);
  transform: rotate(45deg);
}
.howto-note-text {
  font-family: 'Kalam', cursive;
  font-size: 17px;
  line-height: 1.35;
  color: #7DD3C0;
  font-weight: 400;
}

/* ==== HOWTO REFINEMENTS ==== */

/* Note text: regular font, green color, keep dashed border on bubble */
.howto-note-text {
  font-family: inherit !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: #7DD3C0 !important;
  font-weight: 400 !important;
  font-style: normal !important;
}

/* Tab switcher (replaces anchor links) */
.howto-anchors {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 16px 0;
  margin: 0 0 20px 0;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  justify-content: center;
}
.howto-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.howto-tab:hover {
  color: var(--text);
}
.howto-tab.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Menu items indented under section header for visual hierarchy */
.menu-section .menu-item {
  padding-left: 28px;
}

/* Locked menu item (PIN-protected, but still clickable + matches other items) */
.menu-item.locked {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.menu-item.locked .lock-icon {
  opacity: 0.55;
}

.roof-open-stack {
  font-family: 'Geist Mono', monospace;
  font-size: 7px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: lowercase;
  margin-top: 2px;
}

/* Postponed/cancelled status pill */
.status-pill.postponed {
  background: rgba(180, 180, 180, 0.08);
  color: rgba(220, 220, 220, 0.7);
  border: 1px solid rgba(180, 180, 180, 0.25);
}

/* Dim postponed/cancelled game cards */
.game-card.postponed {
  opacity: 0.45;
}
.game-card.postponed:hover {
  opacity: 0.6;
}

/* PIN modal overlay */
.pin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pin-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 20px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.pin-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px 0;
}
.pin-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0 0 18px 0;
}
.pin-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.pin-display {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
  cursor: text;
}
.pin-cell {
  width: 34px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pin-cell.filled {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
}
.pin-cell.active {
  border-color: rgba(255,255,255,0.45);
}
.pin-actions {
  display: flex;
  gap: 10px;
}
.pin-cancel,
.pin-submit {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
}
.pin-cancel {
  background: var(--bg-subtle);
  color: var(--text-dim);
}
.pin-submit {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.pin-shake {
  animation: pin-shake 0.32s ease;
}
@keyframes pin-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* Projections page placeholder */
.projections-container {
  padding: 0 0 80px 0;
}
.projections-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 16px;
  text-align: center;
}
.projections-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text);
}
.projections-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}



/* === BATTER CARD: photo as header, stats span full card width === */
.batter-row {
  display: block;
  position: relative;
  padding: 10px 12px;
}
.batter-row .batter-head {
  float: left;
  width: 56px;
  height: 56px;
  margin: 0 10px 6px 0;
}
.batter-row .batter-head img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.batter-row .batter-info {
  display: block;
  min-width: 0;
}
.batter-row .batter-stats {
  clear: left;
  width: 100%;
  margin-top: 8px;
}
.batter-row .adv-splits {
  width: 100%;
  grid-template-columns: 1fr 1fr 1fr;  /* 3 columns default */
}
/* HR tab keeps 2-column adv-splits (paired L15 / '26 stats) */
.batter-row[data-tab="hr"] .adv-splits {
  grid-template-columns: 1fr 1fr;
}


/* Verdict starts to the right of the photo, not behind it */
.batter-row .verdict {
  margin-left: 66px;
}


/* Center each bstat cell within its grid track for visual spread */
.batter-row .bstat {
  align-items: center;
  text-align: center;
}


/* Stronger dim on inactive matchup toggle button */
.toggle-btn:not(.active) {
  opacity: 0.45;
}


/* Active matchup toggle: green outline only */
.toggle-btn.active {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75);
}

/* Matchup grid: 1 column on mobile, 2 columns on desktop */
.matchup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-width: 0;
}
.matchup-grid > .side-block {
  min-width: 0;  /* allow grid item to shrink so its content respects card width */
}

/* Mobile: show only the active side. Desktop CSS comes in stage 4. */
.expanded-body[data-active-side="away"] .matchup-grid > .side-block[data-side="home"],
.expanded-body[data-active-side="home"] .matchup-grid > .side-block[data-side="away"] {
  display: none;
}

/* === DESKTOP SPLIT-VIEW (≥1024px) ===
   Show BOTH sides side-by-side; hide toggle; widen card container. */
@media (min-width: 768px) {
  /* Wider page container so cards have room for two-column expansion */
  .app, .slate-container {
    max-width: 1400px;
  }

  /* Show both sides */
  .expanded-body[data-active-side="away"] .matchup-grid > .side-block[data-side="home"],
  .expanded-body[data-active-side="home"] .matchup-grid > .side-block[data-side="away"] {
    display: block;
  }

  /* Two columns, divider between */
  .matchup-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Visual divider between sides */
  .matchup-grid > .side-block:first-child {
    border-right: 1px solid var(--border);
    padding-right: 12px;
  }

  /* Toggle redundant on desktop — hide it */
  .expanded-body > .matchup-toggle {
    display: none;
  }
}

/* === Statcast tab === */
.sc-wrap {
  padding: 0;
}
.sc-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.sc-summary-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.sc-summary-cell .l {
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sc-summary-cell .v {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.sc-summary-cell .v.sc-hot { color: var(--accent); }
.sc-summary-cell .v.sc-elite { color: var(--accent-bright); }
.sc-summary-cell .v.sc-hr { color: var(--accent-bright); }

.sc-filters {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: visible;
  position: relative;
  z-index: 200;
}
.sc-filters::-webkit-scrollbar { display: none; }
.sc-filter-group {
  flex-shrink: 0;
}
.sc-filter-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.sc-filter-label {
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 4px;
}
.sc-pill {
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.sc-pill.active {
  background: var(--bg-subtle);
  color: var(--text);
  border-color: var(--text);
}
.sc-pill.sc-clear {
  color: var(--cold);
}

.sc-table {
  font-family: 'Geist Mono', monospace;
}
.sc-row {
  display: grid;
  grid-template-columns: 50px 1fr 32px 50px repeat(5, 1fr) 70px 70px;
  gap: 4px;
  padding: 6px 10px;
  font-size: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: baseline;
}
.sc-row.sc-header {
  background: var(--bg-subtle);
  padding: 6px 10px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.sc-row.sc-header .sc-cell {
  font-size: 8px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.sc-row.sc-row-hr {
  background: rgba(74, 222, 128, 0.18);
  border-left: 3px solid var(--accent);
}
.sc-row.sc-row-hr .sc-cell {
  color: var(--text);
  font-weight: 600;
}
.sc-row.sc-row-hr .sc-cell.sc-result {
  color: var(--accent-bright);
  font-weight: 700;
}
.sc-cell {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-cell.sc-date { color: var(--text-dim); }
.sc-cell.sc-pitcher { font-family: inherit; font-size: 11px; }
.sc-cell.sc-arm { color: var(--text-dim); }
.sc-cell.sc-result { font-family: inherit; font-size: 10px; color: var(--text-dim); }
.sc-cell.sc-traj { font-family: inherit; font-size: 10px; color: var(--text-dim); }
.sc-cell.sc-hot { color: var(--accent); font-weight: 600; }
.sc-cell.sc-elite { color: var(--accent-bright); font-weight: 700; }

@media (max-width: 600px) {
  .sc-row {
    grid-template-columns: 44px 1fr 24px 44px repeat(5, 0.7fr) 60px 60px;
    font-size: 9px;
    gap: 3px;
    padding: 5px 8px;
  }
}

/* === Statcast filter dropdowns === */
.sc-dd-group {
  position: relative;
}
.sc-dd-button {
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-dd-caret {
  font-size: 8px;
  color: var(--text-dim);
}
.sc-dd-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  z-index: 100;
  min-width: 140px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.sc-dd-menu-multi {
  min-width: 180px;
}
.sc-dd-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 8px;
  font-size: 11px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  border: none;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
}
.sc-dd-item:hover {
  background: var(--bg-subtle);
}
.sc-dd-item.active {
  color: var(--accent);
}
.sc-dd-item.sc-dd-action {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sc-dd-checkbox {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  color: var(--accent);
  flex-shrink: 0;
}
.sc-dd-item.active .sc-dd-checkbox {
  border-color: var(--accent);
}
.sc-dd-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* === Statcast horizontally scrollable table === */
.sc-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sc-table {
  min-width: 720px;  /* table will horizontally scroll on smaller screens */
}

/* Solo (single-player) BvP hero — switch to flex centering since we only have one child */
.bvp-hero-row-solo {
  display: flex;
  justify-content: center;
}


/* === Skeleton placeholder bars (used in Statcast tab while loading) === */
.sk-bar {
  display: inline-block;
  height: 11px;
  background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-subtle) 50%, var(--bg-elevated) 100%);
  background-size: 200% 100%;
  border-radius: 3px;
  animation: sk-shimmer 1.4s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sc-row-skeleton { opacity: 0.6; }

/* === C1 wind streaks (matchup card) === */
.wind-streaks {
  display: inline-block;
  width: 22px;
  height: 22px;
  position: relative;
  vertical-align: middle;
  overflow: visible;
}
.wind-streak {
  position: absolute;
  left: 0;
  animation: wind-streak-flow 1.6s ease-in-out infinite;
}
.wind-streak svg { display: block; }
.wind-streak.streak-1 { top: 2px; animation-delay: 0s; }
.wind-streak.streak-2 { top: 7px; animation-delay: 0.2s; }
.wind-streak.streak-3 { top: 12px; animation-delay: 0.4s; }
@keyframes wind-streak-flow {
  0% { transform: translateX(-10px); opacity: 0; }
  25% { opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translateX(10px); opacity: 0; }
}

/* === Statcast tab-aware row highlights === */
/* Hits / Bases / RBI tabs: green tint (similar to HR but slightly less prominent) */
.sc-row.sc-row-hit {
  background: rgba(74, 222, 128, 0.10);
  border-left: 2px solid var(--accent);
}
.sc-row.sc-row-hit .sc-cell {
  color: var(--text);
  font-weight: 500;
}
.sc-row.sc-row-hit .sc-cell.sc-result {
  color: var(--accent);
  font-weight: 600;
}

/* K's tab: orange tint (the prop is K's so K = hit for the prop) */
.sc-row.sc-row-k {
  background: rgba(245, 158, 11, 0.12);
  border-left: 2px solid #F59E0B;
}
.sc-row.sc-row-k .sc-cell {
  color: var(--text);
  font-weight: 500;
}
.sc-row.sc-row-k .sc-cell.sc-result {
  color: #F59E0B;
  font-weight: 600;
}

/* Projections page */
.proj-section { margin-top: 24px; }
.proj-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  padding: 0 16px;
}
.proj-hr-list, .proj-parlay-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
}
.proj-hr-row, .proj-parlay-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #1a1a1a;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
}
.proj-rank {
  font-size: 18px;
  font-weight: 700;
  color: #888;
  min-width: 36px;
}
.proj-batter-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.proj-batter-meta {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}



/* === Projections page v4 === */
.projections-wrap {
  padding: 14px 0 24px;
  max-width: 600px;
  margin: 0 auto;
}
.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 18px;
  margin-bottom: 6px;
}
.projections-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  color: #fff;
}
.proj-date {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.proj-section { margin-top: 12px; }
.proj-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.proj-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #2a2a2a, transparent);
}
.proj-hr-list, .proj-parlay-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 14px;
}
.proj-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #1f1f1f;
  border-radius: 0;
  min-height: 40px;
  transition: all 0.2s ease;
}
.proj-row:last-child { border-bottom: none; }
.proj-row-hit {
  background: linear-gradient(90deg, rgba(76, 175, 80, 0.08) 0%, transparent 60%);
  border-bottom-color: rgba(76, 175, 80, 0.3);
}

.proj-row-miss {
  opacity: 0.45;
}
.proj-rank {
  font-size: 14px;
  font-weight: 800;
  color: #666;
  min-width: 22px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.proj-headshot {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-headshot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.proj-batter {
  flex: 1;
  min-width: 0;
}
.proj-batter-name {
  font-size: 13px;
  font-weight: 700;
  color: #f5f5f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}
.proj-batter-meta {
  font-size: 11px;
  color: #888;
  margin-top: 1px;
  font-weight: 500;
}
.proj-team-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.proj-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.proj-hit {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.15);
  border: 1.5px solid rgba(76, 175, 80, 0.4);
}
.proj-miss {
  color: #f44336;
  background: rgba(244, 67, 54, 0.12);
  border: 1.5px solid rgba(244, 67, 54, 0.3);
}
.proj-pending {
  color: #444;
  background: transparent;
  border: 1.5px solid #2a2a2a;
}
.proj-loading, .proj-empty {
  padding: 24px;
  text-align: center;
  color: #888;
  font-size: 13px;
}


/* Void leg (postponed / rescheduled game) */
.proj-row-void { opacity: 0.4; }
.proj-row-void .proj-batter-name { text-decoration: line-through; }
.proj-void {
  color: #888;
  background: transparent;
  border: 1.5px solid #333;
}
