/* static/css/player_search_themed.css */
/* Styles specific to player_search.html, adapted for the new theme. */
/* Base styles (body, typography, nav, footer, container) are inherited from best_matchups_redesign.css */

/* === MAIN LAYOUT === */
main {
    flex: 1 0 auto;
    /* padding: 2rem 0; /* Vertical padding only, horizontal handled by .bm-container or specific views */
    /* For initial view, we want full control */
}

/* ============================================================
   INITIAL SEARCH VIEW — v4.0 Redesigned
   ============================================================ */
.ps-initial-view {
    display: flex;
    flex-direction: column;
    background: #07080C;
}

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    --ps-bg: #07080C;
    --ps-surface: #0E1018;
    --ps-elevated: #141822;
    --ps-border: rgba(255, 255, 255, 0.07);
    --ps-border-s: rgba(255, 255, 255, 0.04);
    --ps-text-1: #F0F2F8;
    --ps-text-2: #888FA0;
    --ps-text-3: #4A5165;
    --ps-accent: #4582F0;
    --ps-accent-dim: rgba(69, 130, 240, 0.1);
    --ps-heatmap-bad-r: 99;
    --ps-heatmap-bad-g: 107;
    --ps-heatmap-bad-b: 118;
    --ps-heatmap-good-r: 25;
    --ps-heatmap-good-g: 123;
    --ps-heatmap-good-b: 255;
    --ps-hot: #30D158;
    --ps-cold: #FF453A;
    --ps-amber: #FFD60A;
    --ps-radius: 14px;
    --ps-radius-sm: 8px;
}

/* ============================================================
   INITIAL VIEW — LIGHT THEME OVERRIDES
   ============================================================ */
html[data-theme='light'] .ps-initial-view {
    --ps-bg: #f4f7ff;
    --ps-surface: #ffffff;
    --ps-elevated: #edf3ff;
    --ps-border: rgba(15, 23, 42, 0.14);
    --ps-border-s: rgba(15, 23, 42, 0.08);
    --ps-text-1: #0f172a;
    --ps-text-2: #334155;
    --ps-text-3: #64748b;
    --ps-accent: #2563eb;
    --ps-accent-dim: rgba(37, 99, 235, 0.12);
    --ps-heatmap-bad-r: 148;
    --ps-heatmap-bad-g: 163;
    --ps-heatmap-bad-b: 184;
    --ps-hot: #16a34a;
    --ps-cold: #dc2626;
    background: var(--ps-bg);
}

html[data-theme='light'] .ps-initial-view .ps-hero,
html[data-theme='light'] .ps-initial-view .ps-body {
    background: var(--ps-bg);
}

html[data-theme='light'] .ps-initial-view .ps-hero::before {
    background: radial-gradient(ellipse at 50% 35%,
            rgba(37, 99, 235, 0.11) 0%,
            rgba(37, 99, 235, 0.04) 42%,
            transparent 72%);
}

html[data-theme='light'] .ps-initial-view .ps-hero::after {
    background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px);
}

html[data-theme='light'] .ps-initial-view .ps-search-icon {
    stroke: rgba(51, 65, 85, 0.55);
}

html[data-theme='light'] .ps-initial-view .player-search-input,
html[data-theme='light'] .ps-initial-view .ps-search-wrap .player-search-input {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(148, 163, 184, 0.65) !important;
    color: var(--ps-text-1) !important;
}

html[data-theme='light'] .ps-initial-view .player-search-input:focus,
html[data-theme='light'] .ps-initial-view .ps-search-wrap .player-search-input:focus {
    background: #ffffff !important;
    border-color: rgba(37, 99, 235, 0.55) !important;
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

html[data-theme='light'] .ps-initial-view .player-search-input::placeholder,
html[data-theme='light'] .ps-initial-view .ps-search-wrap .player-search-input::placeholder {
    color: rgba(51, 65, 85, 0.5) !important;
}

html[data-theme='light'] .ps-initial-view .ps-hero__sub {
    color: rgba(51, 65, 85, 0.68);
}

html[data-theme='light'] .ps-initial-view .ps-hero__scroll {
    color: rgba(51, 65, 85, 0.45);
}

html[data-theme='light'] .ps-initial-view .ps-card {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

html[data-theme='light'] .ps-initial-view .ps-tab-group {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .ps-initial-view .ps-tab.is-active {
    background: rgba(255, 255, 255, 0.95);
}

html[data-theme='light'] .ps-initial-view .ps-matchup:hover,
html[data-theme='light'] .ps-initial-view .ps-spots-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.04);
}

html[data-theme='light'] .ps-initial-view .ps-chip {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}

html[data-theme='light'] .ps-initial-view .ps-chip--dim {
    color: var(--ps-text-3);
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .ps-initial-view .ps-matchup__batter {
    color: #0f172a;
}

html[data-theme='light'] .ps-initial-view .ps-matchup__batter:hover {
    color: #1d4ed8;
}

html[data-theme='light'] .ps-initial-view .ps-matchup__sep {
    color: rgba(51, 65, 85, 0.55);
}

html[data-theme='light'] .ps-initial-view .ps-select-mini,
html[data-theme='light'] .ps-initial-view .ps-select {
    background-color: rgba(255, 255, 255, 0.92);
    border-color: rgba(148, 163, 184, 0.45);
    color: var(--ps-text-1);
}

html[data-theme='light'] .ps-initial-view .ps-select-mini option,
html[data-theme='light'] .ps-initial-view .ps-select option {
    background: #ffffff;
    color: var(--ps-text-1);
}

html[data-theme='light'] .ps-initial-view .tms-season-btn,
html[data-theme='light'] .ps-initial-view .tms-radio-pill,
html[data-theme='light'] .ps-initial-view .ps-pill-label {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.12);
    color: var(--ps-text-2);
}

html[data-theme='light'] .ps-initial-view .tms-season-btn:hover,
html[data-theme='light'] .ps-initial-view .tms-radio-pill:hover,
html[data-theme='light'] .ps-initial-view .ps-pill-label:hover {
    background: rgba(37, 99, 235, 0.07);
    border-color: rgba(37, 99, 235, 0.25);
    color: #1d4ed8;
}

html[data-theme='light'] .ps-initial-view .tms-season-btn.is-active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

html[data-theme='light'] .ps-initial-view .tms-radio-pill.is-active,
html[data-theme='light'] .ps-initial-view .ps-pill-input:checked+.ps-pill-label {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

html[data-theme='light'] .ps-initial-view .tms-radio-pill.is-active:hover,
html[data-theme='light'] .ps-initial-view .ps-pill-input:checked+.ps-pill-label:hover {
    background: #1d4ed8;
    border-color: #1e40af;
    color: #ffffff;
}

html[data-theme='light'] .ps-initial-view .ps-spots-rate {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.1);
}

html[data-theme='light'] .ps-initial-view .ps-spots-rate__pct {
    color: #1e3a8a;
}

html[data-theme='light'] .ps-initial-view .ps-spots-rate__record {
    color: #475569;
}

html[data-theme='light'] .ps-initial-view .ps-spots-action-btn {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

html[data-theme='light'] .ps-initial-view .ps-spots-action-btn:hover,
html[data-theme='light'] .ps-initial-view .ps-spots-action-btn:focus {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.55);
    color: #1e3a8a;
}

html[data-theme='light'] .ps-initial-view .ps-spots-trait {
    color: #1e3a8a;
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(37, 99, 235, 0.34);
    font-weight: 700;
}

html[data-theme='light'] .ps-initial-view .ps-spots-trait-empty {
    color: #64748b;
}

/* ── Light mode: missing overrides ── */

/* Card backgrounds — more definition on light page bg */
html[data-theme='light'] .ps-initial-view .ps-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.11);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* Section description text */
html[data-theme='light'] .ps-initial-view .ps-section__desc {
    color: #475569;
}

/* Pitcher names — muted but readable on white */
html[data-theme='light'] .ps-initial-view .ps-matchup__pitcher {
    color: #64748b;
}

/* Matchup column headers */
html[data-theme='light'] .ps-initial-view .ps-matchup-head__match,
html[data-theme='light'] .ps-initial-view .ps-matchup-head__stats {
    color: #94a3b8;
}

/* Stat labels below numbers (AB, H, HR, etc.) */
html[data-theme='light'] .ps-initial-view .ps-stat__lbl {
    color: #94a3b8;
}

/* Card name labels (BATTER VS PITCHER, TODAY'S TOP SPOTS) */
html[data-theme='light'] .ps-initial-view .ps-card__name {
    color: #475569;
}

/* Card date suffix */
html[data-theme='light'] .ps-initial-view .ps-card__date {
    color: #94a3b8;
}

/* Inactive tab text */
html[data-theme='light'] .ps-initial-view .ps-tab {
    color: #64748b;
}

/* Game Traits filter box — visible container on white bg */
html[data-theme='light'] .ps-initial-view .tms-trait-filters {
    background: rgba(15, 23, 42, 0.025);
    border-color: rgba(15, 23, 42, 0.1);
}

/* Trait filter section labels (VENUE, TIME OF DAY, etc.) */
html[data-theme='light'] .ps-initial-view .tms-pills-label {
    color: #64748b;
}

/* "Filter by matchup conditions" hint */
html[data-theme='light'] .ps-initial-view .tms-trait-filters__hint {
    color: #94a3b8;
}

/* Trait filter title (GAME TRAITS) */
html[data-theme='light'] .ps-initial-view .tms-trait-filters__title {
    color: #475569;
}

/* Form control labels (TEAM, PROP, RANGE, MIN SAMPLE, SEASONS) */
html[data-theme='light'] .ps-initial-view .ps-label {
    color: #64748b;
}

/* Hero subtitle */
html[data-theme='light'] .ps-initial-view .ps-hero__sub {
    color: rgba(51, 65, 85, 0.72);
}

/* Matchup list scrollbar in light mode */
html[data-theme='light'] .ps-initial-view .ps-matchup-list {
    scrollbar-color: rgba(15, 23, 42, 0.12) transparent;
}

/* Empty state messages */
html[data-theme='light'] .ps-initial-view .ps-empty-state {
    color: #94a3b8;
}

/* Section border */
html[data-theme='light'] .ps-initial-view .ps-section {
    border-top-color: rgba(15, 23, 42, 0.07);
}

/* Matchup row hover */
html[data-theme='light'] .ps-initial-view .ps-matchup:hover {
    background: rgba(37, 99, 235, 0.035);
}

/* Top Spots table header */
html[data-theme='light'] .ps-initial-view .ps-spots-table th {
    color: #94a3b8;
}

/* Top Spots table cell text */
html[data-theme='light'] .ps-initial-view .ps-spots-table td {
    color: #475569;
}

html[data-theme='light'] .ps-initial-view .ps-spots-table td:first-child {
    color: #1e293b;
}

/* Usage notice (free plan info bar) */
html[data-theme='light'] .ps-initial-view .ps-usage-notice {
    background: rgba(37, 99, 235, 0.04);
    border-bottom-color: rgba(37, 99, 235, 0.1);
    color: #475569;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.ps-hero {
    min-height: clamp(360px, 56svh, 620px);
    min-height: clamp(360px, 56vh, 620px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(3.9rem, 8vh, 5.6rem) 2rem;
    position: relative;
    background: var(--ps-bg);
    overflow: hidden;
}

/* Soft blue radial glow behind content */
.ps-hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 700px;
    background: radial-gradient(ellipse at 50% 35%,
            rgba(69, 130, 240, 0.07) 0%,
            rgba(69, 130, 240, 0.03) 40%,
            transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle dot-grid texture */
.ps-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 80% 65% at 50% 38%, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 38%, black 0%, transparent 75%);
}

.ps-hero__inner {
    max-width: 760px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Hero label / eyebrow */
.ps-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ps-text-3);
}

.ps-hero-label__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ps-accent);
    box-shadow: 0 0 8px rgba(69, 130, 240, 0.7);
    flex-shrink: 0;
    animation: ps-dot-pulse 2.8s ease-in-out infinite;
}

@keyframes ps-dot-pulse {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(69, 130, 240, 0.5);
    }

    50% {
        box-shadow: 0 0 14px rgba(69, 130, 240, 0.9);
    }
}

/* Hero title — refined, not a billboard */
.ps-hero__title {
    font-family: 'Syne', 'Outfit', sans-serif;
    font-size: clamp(2.55rem, 6vw, 4.8rem);
    font-weight: 700;
    color: var(--ps-text-1);
    letter-spacing: -0.03em;
    line-height: 1.02;
    margin-bottom: 1.8rem;
}

/* Search wrapper — the true hero element */
.ps-search-wrap {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

/* Search field */
.ps-search-field {
    position: relative;
    width: 100%;
    /* Always-on ambient glow — draws the eye to the search bar */
    filter:
        drop-shadow(0 0 32px rgba(69, 130, 240, 0.12)) drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
    transition: filter 0.3s ease;
}

.ps-search-field:focus-within {
    filter:
        drop-shadow(0 0 48px rgba(69, 130, 240, 0.22)) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35));
}

.ps-search-icon {
    position: absolute;
    left: 1.3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.1rem;
    height: 1.1rem;
    stroke: rgba(255, 255, 255, 0.25);
    fill: none;
    pointer-events: none;
    z-index: 10;
    transition: stroke 0.2s ease;
}

.ps-search-field:focus-within .ps-search-icon {
    stroke: var(--ps-accent);
}

/* Search input — prominent, refined. !important beats Bootstrap .form-control */
.ps-initial-view .player-search-input,
.ps-search-wrap .player-search-input {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: var(--ps-text-1) !important;
    font-family: 'DM Sans', 'Manrope', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 400 !important;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem !important;
    border-radius: 16px !important;
    transition: background 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
    line-height: 1.5 !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: none !important;
}

.ps-initial-view .player-search-input:focus,
.ps-search-wrap .player-search-input:focus {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(69, 130, 240, 0.55) !important;
    box-shadow:
        0 0 0 4px rgba(69, 130, 240, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    outline: none !important;
    color: var(--ps-text-1) !important;
}

.ps-initial-view .player-search-input::placeholder,
.ps-search-wrap .player-search-input::placeholder {
    color: rgba(255, 255, 255, 0.22) !important;
    opacity: 1;
}

/* Ensure typeahead wrappers fill width */
.ps-search-wrap .twitter-typeahead {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.ps-search-wrap .twitter-typeahead,
.ps-search-wrap .tt-input,
.ps-search-wrap .tt-hint {
    width: 100% !important;
}

.ps-search-wrap .tt-hint {
    display: none !important;
}

/* Subtitle — lives below the search bar */
.ps-hero__sub {
    margin-top: 1rem;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.44);
    line-height: 1.6;
    letter-spacing: 0.01em;
}

/* Scroll hint */
.ps-hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.1);
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    z-index: 1;
    cursor: pointer;
    animation: ps-scroll-hint 2.5s ease-in-out infinite;
}

.ps-hero__scroll svg {
    width: 0.85rem;
    height: 0.85rem;
    stroke: currentColor;
}

@keyframes ps-scroll-hint {

    0%,
    100% {
        opacity: 0.45;
        transform: translateX(-50%) translateY(0);
    }

    50% {
        opacity: 0.75;
        transform: translateX(-50%) translateY(6px);
    }
}

/* ============================================================
   PAGE BODY — below the hero
   ============================================================ */
/* Shared MLB player page layout rules moved to static/css/mlb/player_page_layout.css */

/* ============================================================
   CARDS
   ============================================================ */
.ps-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    overflow: hidden;
}

.ps-two-col>.ps-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ps-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ps-border-s);
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ps-card__name {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ps-text-2);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ps-card__body {
    padding: 1.5rem;
}

.ps-two-col>.ps-card .ps-card__body {
    flex: 1 1 auto;
}

/* ============================================================
   TAB GROUP (BvP hot/cold tabs)
   ============================================================ */
.ps-tab-group {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;
    padding: 3px;
    gap: 2px;
}

.ps-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: 7px;
    border: none;
    background: transparent;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ps-text-3);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.ps-tab.is-active {
    background: rgba(255, 255, 255, 0.09);
    color: var(--ps-text-1);
}

.ps-tab__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.6;
}

.ps-tab.is-active .ps-tab__dot {
    opacity: 1;
}

.ps-tab__dot--hot {
    background: var(--ps-hot);
}

.ps-tab__dot--cold {
    background: var(--ps-cold);
}

/* ============================================================
   TAB PANELS
   ============================================================ */
.ps-tab-panel {
    display: none;
}

.ps-tab-panel.is-active {
    display: block;
}

/* ============================================================
   MATCHUP LIST (BvP)
   ============================================================ */
.ps-matchup-list {
    max-height: 460px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.ps-matchup-list::-webkit-scrollbar {
    width: 3px;
}

.ps-matchup-list::-webkit-scrollbar-track {
    background: transparent;
}

.ps-matchup-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.ps-matchup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.62rem 1.25rem;
    border-bottom: 1px solid var(--ps-border-s);
}

.ps-matchup-head__match,
.ps-matchup-head__stats {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ps-text-3);
}

.ps-matchup-head__stats {
    text-align: right;
}

.ps-matchup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--ps-border-s);
    gap: 1rem;
    transition: background 0.12s ease;
}

.ps-matchup:last-child {
    border-bottom: none;
}

.ps-matchup:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ps-matchup--hot {
    border-left: 2px solid rgba(48, 209, 88, 0.35);
}

.ps-matchup--cold {
    border-left: 2px solid rgba(255, 69, 58, 0.35);
}

.ps-matchup__players {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1;
}

.ps-chip {
    display: inline-flex;
    align-items: center;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #7B95C8;
    background: rgba(77, 144, 254, 0.1);
    border: 1px solid rgba(77, 144, 254, 0.18);
    border-radius: 4px;
    padding: 0.2em 0.55em;
    line-height: 1.4;
    flex-shrink: 0;
}

.ps-chip--dim {
    color: var(--ps-text-3);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.ps-matchup__batter {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #D4D8E8;
    text-decoration: none;
    transition: color 0.12s ease;
    white-space: nowrap;
}

.ps-matchup__batter:hover {
    color: #7EB6FF;
    text-decoration: none;
}

.ps-matchup__sep {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.ps-matchup__pitcher {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    color: #727A8F;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-star-badge {
    font-size: 0.6rem;
    color: var(--ps-amber);
    flex-shrink: 0;
}

.ps-matchup__stats {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.ps-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 2.25rem;
}

.ps-stat__val {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ps-text-1);
    line-height: 1.2;
}

.ps-stat__lbl {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ps-text-3);
    line-height: 1.2;
}

.ps-empty-state {
    padding: 2rem 1.25rem;
    text-align: center;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.85rem;
    color: var(--ps-text-3);
}

/* ============================================================
   TOP SPOTS CARD
   ============================================================ */
.ps-spots-list {
    max-height: 460px;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

/* Mini select for prop filter in cards */
.ps-select-mini {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ps-text-1);
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.35rem 1.5rem 0.35rem 0.65rem;
    border-radius: 7px;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5165' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    background-size: 0.75rem;
    transition: border-color 0.15s ease;
}

.ps-select-mini:focus {
    border-color: rgba(69, 130, 240, 0.4);
}

.ps-select-mini option {
    background: #14161E;
    color: var(--ps-text-1);
}

/* ============================================================
   RESEARCH TOOLS — TRAIT MATCH
   ============================================================ */
.ps-trait-card {
    margin-bottom: 1.25rem;
    border-top: 2px solid rgba(69, 130, 240, 0.22) !important;
}

/* Card header icon */
.tms-header-icon {
    font-size: 0.62rem;
    color: var(--ps-accent);
    opacity: 0.75;
    margin-right: 0.45rem;
}

.ps-usage-notice {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 1.25rem;
    background: rgba(69, 130, 240, 0.05);
    border-bottom: 1px solid rgba(69, 130, 240, 0.1);
    flex-wrap: wrap;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.78rem;
    color: var(--ps-text-2);
}

.ps-usage-notice a {
    color: var(--ps-accent);
    text-decoration: none;
}

.ps-usage-notice a:hover {
    text-decoration: underline;
}

.ps-usage-notice__text {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--ps-text-2);
}

.ps-usage-notice__link {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ps-accent);
    text-decoration: none;
}

.ps-usage-notice__link:hover {
    text-decoration: underline;
}

/* TMS controls grid */
.ps-tms-controls {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.875rem;
    margin-bottom: 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--ps-border-s);
}

.ps-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ps-control-group--seasons {
    grid-column: 1 / -1;
}

.tms-season-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tms-season-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ps-text-3);
    border-radius: 6px;
    padding: 0.32rem 0.7rem;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tms-season-btn:hover,
.tms-season-btn:focus {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ps-text-1);
}

.tms-season-btn.is-active {
    background: rgba(69, 130, 240, 0.18);
    border-color: rgba(69, 130, 240, 0.42);
    color: #9BBEF8;
    box-shadow: 0 0 0 1px rgba(69, 130, 240, 0.1) inset;
}

.ps-label {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ps-text-3);
}

.ps-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--ps-text-1);
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    padding: 0.55rem 2rem 0.55rem 0.75rem;
    border-radius: var(--ps-radius-sm);
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5165' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 0.8rem;
    width: 100%;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ps-select:focus {
    border-color: rgba(69, 130, 240, 0.45);
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(69, 130, 240, 0.07);
}

.ps-select option {
    background: #14161E;
    color: var(--ps-text-1);
}

/* Today's game traits section */
#tms-today-traits {
    margin-top: 1.25rem;
    padding: 0.75rem 0.9rem;
    background: rgba(69, 130, 240, 0.04);
    border: 1px solid rgba(69, 130, 240, 0.1);
    border-radius: 8px;
}

/* Trait filters container */
.tms-trait-filters {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.1rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ps-border);
    border-radius: 10px;
}

.tms-trait-filters__header {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.tms-trait-filters__title {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ps-text-2);
}

.tms-trait-filters__hint {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.66rem;
    color: #727A8F;
    font-weight: 400;
}

.tms-pills-groups {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tms-pills-section {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.tms-pills-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.61rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7E8699;
}

.tms-pills-label-icon {
    font-size: 0.55rem;
    opacity: 0.65;
}

.tms-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
}

/* Inline pair layout for Venue + Time of Day side-by-side */
.tms-pills-section--inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--ps-border-s);
}

.tms-inline-pair {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

/* Radio-style pill buttons (mutually exclusive within a group) */
.tms-radio-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35em 0.75em;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--ps-text-2);
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    cursor: pointer;
    line-height: 1.5;
}

.tms-radio-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.13);
    color: var(--ps-text-1);
}

.tms-radio-pill.is-active {
    background: rgba(69, 130, 240, 0.15);
    border-color: rgba(69, 130, 240, 0.38);
    color: #9BBEF8;
    box-shadow: inset 0 0 0 1px rgba(69, 130, 240, 0.08);
}

.tms-radio-pill.is-active:hover {
    background: rgba(69, 130, 240, 0.22);
    border-color: rgba(69, 130, 240, 0.46);
}

/* Trait toggle pills (legacy — kept for backwards compat) */
.ps-trait-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.ps-pill-toggle {
    cursor: pointer;
}

.ps-pill-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ps-pill-label {
    display: inline-flex;
    align-items: center;
    padding: 0.35em 0.75em;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--ps-text-2);
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    user-select: none;
    cursor: pointer;
    line-height: 1.5;
}

.ps-pill-input:checked+.ps-pill-label {
    background: rgba(69, 130, 240, 0.15);
    border-color: rgba(69, 130, 240, 0.38);
    color: #9BBEF8;
    box-shadow: inset 0 0 0 1px rgba(69, 130, 240, 0.08);
}

.ps-pill-label:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.13);
    color: var(--ps-text-1);
}

.ps-pill-input:checked+.ps-pill-label:hover {
    background: rgba(69, 130, 240, 0.22);
    border-color: rgba(69, 130, 240, 0.46);
}

/* Form actions */
.ps-form-actions {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    padding-top: 0.25rem;
}

/* Buttons */
.ps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    border-radius: var(--ps-radius-sm);
    border: none;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.ps-btn--primary {
    background: var(--ps-accent);
    color: #fff;
    box-shadow: 0 1px 8px rgba(69, 130, 240, 0.22);
    letter-spacing: 0.01em;
}

.ps-btn--primary:hover {
    background: #5E9BFF;
    color: #fff;
    box-shadow: 0 2px 14px rgba(69, 130, 240, 0.36);
    transform: translateY(-1px);
}

.tms-btn-icon {
    font-size: 0.72rem;
    margin-right: 0.45rem;
    opacity: 0.9;
}

.ps-btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ps-text-2);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.ps-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--ps-text-1);
}

.ps-btn--sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
}

/* ============================================================
   PERFORMANCE TABLE — DARK OVERRIDE (inside ps-card)
   Overrides any light-mode values from pitcher_search_themed.css
   ============================================================ */
.ps-card .performance-table,
.ps-tms-results-wrap .performance-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.82rem;
}

.ps-card .performance-table thead tr,
.ps-tms-results-wrap .performance-table thead tr {
    background: transparent !important;
    border-bottom: 1px solid var(--ps-border-s);
}

.ps-card .performance-table th,
.ps-tms-results-wrap .performance-table th {
    background: transparent !important;
    color: var(--ps-text-3) !important;
    font-family: 'DM Sans', 'Manrope', sans-serif !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase;
    padding: 0.65rem 1rem !important;
    border-bottom: none !important;
    white-space: nowrap;
}

.ps-card .performance-table th:first-child,
.ps-tms-results-wrap .performance-table th:first-child {
    text-align: left;
}

.ps-card .performance-table th:not(:first-child),
.ps-tms-results-wrap .performance-table th:not(:first-child) {
    text-align: center;
}

.ps-card .performance-table tbody tr,
.ps-tms-results-wrap .performance-table tbody tr {
    border-bottom: 1px solid var(--ps-border-s);
    background: transparent !important;
}

.ps-card .performance-table tbody tr:last-child td,
.ps-tms-results-wrap .performance-table tbody tr:last-child td {
    border-bottom: none;
}

.ps-card .performance-table tbody tr:hover td,
.ps-tms-results-wrap .performance-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025) !important;
}

.ps-card .performance-table td,
.ps-tms-results-wrap .performance-table td {
    color: var(--ps-text-2) !important;
    font-family: 'DM Sans', 'Manrope', sans-serif !important;
    padding: 0.65rem 1rem !important;
    border-bottom: 1px solid var(--ps-border-s) !important;
    text-align: center;
    background: transparent !important;
}

.ps-card .performance-table td:first-child,
.ps-tms-results-wrap .performance-table td:first-child {
    color: var(--ps-text-1) !important;
    font-weight: 500 !important;
    text-align: left;
}

/* Card body flush — removes padding so tables go edge-to-edge */
.ps-card__body--flush {
    padding: 0;
}

/* Date text in card header */
.ps-card__date {
    color: var(--ps-text-3);
    font-weight: 400;
}

/* TMS results wrapper + login overlay */
.ps-tms-results-wrap {
    overflow-x: auto;
    margin-top: 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--ps-border-s);
}

/* TMS rate badge */
.tms-rate-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.52rem;
    border-radius: 5px;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.79rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
}

.tms-rate-badge--hot {
    background: rgba(48, 209, 88, 0.1);
    border: 1px solid rgba(48, 209, 88, 0.22);
    color: #30D158;
}

.tms-rate-badge--warm {
    background: rgba(255, 214, 10, 0.08);
    border: 1px solid rgba(255, 214, 10, 0.18);
    color: #d4a500;
}

.tms-rate-badge--neutral {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--ps-text-2);
}

/* TMS player cell */
.tms-player-cell {
    white-space: nowrap;
}

.tms-player-team {
    display: inline-block;
    font-size: 0.71rem;
    color: var(--ps-text-3);
    font-weight: 500;
    margin-left: 0.32rem;
    letter-spacing: 0.02em;
}

/* TMS record cell */
.tms-record-cell {
    white-space: nowrap;
}

.tms-record {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.tms-record-sep {
    color: var(--ps-text-3);
    margin: 0 0.08rem;
}

/* Override my_picks.css .add-pick-btn inside TMS results */
#tms-results .add-pick-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--ps-text-3) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 6px !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-left: 0 !important;
    transform: none !important;
    width: 1.75rem !important;
    height: 1.75rem !important;
}

#tms-results .add-pick-btn:hover {
    background: rgba(48, 209, 88, 0.1) !important;
    border-color: rgba(48, 209, 88, 0.22) !important;
    color: #30D158 !important;
    box-shadow: none !important;
    transform: translateY(-1px) !important;
}

/* TMS action buttons */
.tms-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ps-text-3);
    font-size: 0.68rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.1s ease;
}

.tms-action-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.tms-action-btn.add:hover {
    background: rgba(48, 209, 88, 0.1);
    border-color: rgba(48, 209, 88, 0.22);
    color: #30D158;
}

#tms-results .add-pick-btn.is-added {
    background: rgba(48, 209, 88, 0.12) !important;
    border-color: rgba(48, 209, 88, 0.3) !important;
    color: #30D158 !important;
}

.tms-action-btn.save:hover {
    background: rgba(69, 130, 240, 0.1);
    border-color: rgba(69, 130, 240, 0.25);
    color: #9BBEF8;
}

#tms-results .save-trait-btn.is-saved {
    background: rgba(69, 130, 240, 0.12) !important;
    border-color: rgba(69, 130, 240, 0.32) !important;
    color: #9BBEF8 !important;
}

.tms-action-btn.view:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--ps-text-1);
}

/* TMS loading state */
.tms-loading-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.tms-spinner {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border: 2px solid rgba(69, 130, 240, 0.2);
    border-top-color: var(--ps-accent);
    border-radius: 50%;
    animation: tms-spin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes tms-spin {
    to {
        transform: rotate(360deg);
    }
}

.ps-login-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 8, 12, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ps-text-2);
    border-radius: var(--ps-radius);
    z-index: 10;
}

/* Inline field validation error */
.ps-field-error {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.7rem;
    color: var(--ps-cold);
    margin-top: 0.15rem;
}

/* ============================================================
   TRAIT MATCH EXPLORER — PTM STYLE PARITY
   ============================================================ */
#tms-panel.ps-card {
    border: 1px solid rgba(88, 105, 136, 0.28);
    border-top: 1px solid rgba(88, 105, 136, 0.28) !important;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(12, 18, 31, 0.95) 0%, rgba(10, 16, 28, 0.92) 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

#tms-panel .ps-card__head {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(88, 105, 136, 0.22);
}

#tms-panel .ps-card__name {
    color: var(--ps-text-2);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    font-weight: 700;
}

#tms-panel .ps-card__body {
    padding: 0.95rem;
    display: grid;
    gap: 0.9rem;
}

#tms-panel .ps-usage-notice {
    margin: 0;
    border: 1px solid rgba(59, 130, 246, 0.24);
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.12);
    padding: 0.6rem 0.8rem;
    color: var(--ps-text-2);
    font-size: 0.75rem;
}

#tms-panel .ps-tms-controls {
    border: 1px solid rgba(88, 105, 136, 0.32);
    border-radius: 14px;
    background: rgba(10, 17, 30, 0.62);
    padding: 0.72rem;
    margin: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.72rem;
}

#tms-panel .ps-control-group {
    gap: 0.34rem;
}

#tms-panel .ps-control-group--seasons {
    grid-column: auto;
}

#tms-panel .ps-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #8f9ab0;
}

#tms-panel .ps-select {
    height: 2.45rem;
    border-radius: 12px;
    border: 1px solid rgba(88, 105, 136, 0.36);
    background-color: rgba(15, 23, 42, 0.78);
    font-size: 0.84rem;
    padding-left: 0.72rem;
}

#tms-panel .ps-select:focus {
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background-color: rgba(15, 23, 42, 0.92);
}

#tms-panel .tms-seasons-filter {
    position: relative;
}

#tms-panel .tms-seasons-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    cursor: pointer;
    background-image: none;
    padding-right: 0.72rem;
}

#tms-panel .tms-seasons-trigger__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#tms-panel .tms-seasons-trigger__icon {
    font-size: 0.7rem;
    color: #8f9ab0;
    margin-left: 0.55rem;
}

#tms-panel .tms-seasons-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    z-index: 24;
    border: 1px solid rgba(88, 105, 136, 0.36);
    border-radius: 12px;
    background: rgba(8, 13, 24, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    padding: 0.35rem;
    max-height: 16rem;
    overflow-y: auto;
}

#tms-panel .tms-season-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 8px;
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
    color: var(--ps-text-2);
    cursor: pointer;
}

#tms-panel .tms-season-option:hover {
    background: rgba(59, 130, 246, 0.12);
    color: var(--ps-text-1);
}

#tms-panel .tms-season-option input {
    accent-color: #3b82f6;
}

#tms-panel #tms-today-traits {
    margin-top: 0;
    border-radius: 12px;
    border: 1px solid rgba(88, 105, 136, 0.24);
    background: rgba(10, 17, 30, 0.56);
    padding: 0.65rem 0.72rem;
}

#tms-panel #tms-today-traits .ps-label {
    margin-bottom: 0.42rem !important;
}

#tms-panel #tms-traits-lines {
    display: grid;
}

#tms-panel .tms-today-card {
    border: 1px solid rgba(88, 105, 136, 0.28);
    border-radius: 12px;
    background:
        linear-gradient(120deg, rgba(59, 130, 246, 0.09) 0%, rgba(59, 130, 246, 0.02) 45%, rgba(10, 17, 30, 0.4) 100%),
        rgba(10, 17, 30, 0.7);
    padding: 0.58rem 0.62rem;
    display: grid;
    gap: 0.45rem;
}

#tms-panel .tms-today-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.36rem;
}

#tms-panel .tms-today-row--combined {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}

#tms-panel .tms-today-row--pitcher {
    padding-top: 0.08rem;
    border-top: 1px solid rgba(88, 105, 136, 0.2);
}

#tms-panel .tms-today-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(88, 105, 136, 0.32);
    background: rgba(11, 18, 32, 0.46);
    color: var(--ps-text-2);
    font-size: 0.73rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.26rem 0.58rem;
    letter-spacing: 0.01em;
}

#tms-panel .tms-today-chip--matchup {
    border-color: rgba(96, 165, 250, 0.55);
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
    font-weight: 700;
}

#tms-panel .tms-today-chip--sub {
    background: rgba(10, 17, 30, 0.48);
    color: #c8d1e3;
}

#tms-panel .tms-today-chip--pitcher {
    font-weight: 700;
    color: #eef4ff;
    border-color: rgba(130, 145, 176, 0.5);
}

#tms-panel .tms-today-pitcher-name {
    color: #eef4ff;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-right: 0.08rem;
}

#tms-panel .tms-trait-filters {
    margin: 0;
    border: 1px solid rgba(88, 105, 136, 0.28);
    border-radius: 14px;
    background: rgba(10, 17, 30, 0.62);
    padding: 0.72rem;
}

#tms-panel .tms-trait-filters__header {
    margin-bottom: 0.55rem;
}

#tms-panel .tms-trait-filters__title {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--ps-text-faint, #7f8aa1);
}

#tms-panel .tms-trait-filters__hint {
    font-size: 0.68rem;
    color: var(--ps-text-3);
}

#tms-panel .tms-pills-groups {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.52rem;
}

#tms-panel .tms-pills-section {
    flex: 1 1 0;
    border: 1px solid rgba(88, 105, 136, 0.22);
    border-radius: 10px;
    background: rgba(10, 17, 30, 0.48);
    padding: 0.42rem 0.5rem;
    gap: 0.32rem;
    min-width: 0;
}

#tms-panel .tms-pills-section--inline {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding-bottom: 0.42rem;
    border-bottom: 1px solid rgba(88, 105, 136, 0.22);
}

#tms-panel .tms-pills-section--context .tms-context-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
}

#tms-panel .tms-pills-section--context .tms-pills-row--context {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
}

#tms-panel .tms-pills-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--ps-text-faint, #7f8aa1);
}

#tms-panel .tms-radio-pill,
#tms-panel .ps-pill-label {
    border-radius: 999px;
    border: 1px solid rgba(88, 105, 136, 0.32);
    background: rgba(11, 18, 32, 0.44);
    color: var(--ps-text-2);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.28rem 0.62rem;
}

#tms-panel .tms-radio-pill:hover,
#tms-panel .ps-pill-label:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(130, 145, 176, 0.55);
    color: var(--ps-text-1);
}

#tms-panel .tms-radio-pill.is-active,
#tms-panel .ps-pill-input:checked + .ps-pill-label {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(96, 165, 250, 0.62);
    color: #dbeafe;
    box-shadow: none;
}

#tms-panel .ps-form-actions {
    padding-top: 0;
    justify-content: flex-end;
}

#tms-panel .ps-btn {
    height: 2.45rem;
    border-radius: 12px;
    font-weight: 700;
    min-width: 6.25rem;
}

#tms-panel .ps-btn--primary {
    min-width: 10rem;
    box-shadow: none;
}

#tms-panel .ps-btn--primary:hover {
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.35);
}

#tms-panel .ps-tms-results-wrap {
    margin-top: 0;
    padding-top: 0.2rem;
    border-top: 0;
}

#tms-panel .ps-tms-results-wrap.is-hidden {
    display: none;
}

#tms-panel #tms-pagination {
    margin-top: 0.45rem;
    display: flex;
    justify-content: center;
}

#tms-panel .tms-page-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: 'DM Sans', 'Manrope', sans-serif;
}

#tms-panel .tms-page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 0.58rem;
}

#tms-panel .tms-page-link {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    min-width: 0;
    height: auto;
    line-height: 1;
    font-size: 0.86rem;
    font-weight: 600;
    color: #8f9ab0;
    cursor: pointer;
    transition: color 0.16s ease, opacity 0.16s ease;
}

#tms-panel #tms-page-prev,
#tms-panel #tms-page-next {
    color: #9bbef8;
}

#tms-panel .tms-page-link:hover:not(:disabled) {
    color: var(--ps-text-1);
}

#tms-panel .tms-page-link.is-active {
    color: var(--ps-text-1);
    font-weight: 700;
    cursor: default;
}

#tms-panel .tms-page-link:disabled {
    opacity: 0.52;
    cursor: default;
}

#tms-panel .tms-page-link.is-active:disabled {
    opacity: 1;
}

#tms-panel .tms-page-ellipsis {
    color: #8f9ab0;
    font-size: 0.86rem;
    line-height: 1;
    letter-spacing: 0.03em;
}

html[data-theme='light'] .ps-initial-view #tms-panel.ps-card {
    border-color: rgba(148, 163, 184, 0.34);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .ps-initial-view #tms-panel .ps-card__head,
html[data-theme='light'] .ps-initial-view #tms-panel .ps-tms-controls,
html[data-theme='light'] .ps-initial-view #tms-panel .tms-trait-filters,
html[data-theme='light'] .ps-initial-view #tms-panel .tms-pills-section {
    border-color: rgba(148, 163, 184, 0.36);
}

html[data-theme='light'] .ps-initial-view #tms-panel .ps-tms-controls,
html[data-theme='light'] .ps-initial-view #tms-panel .tms-trait-filters,
html[data-theme='light'] .ps-initial-view #tms-panel #tms-today-traits,
html[data-theme='light'] .ps-initial-view #tms-panel .tms-pills-section,
html[data-theme='light'] .ps-initial-view #tms-panel .tms-radio-pill,
html[data-theme='light'] .ps-initial-view #tms-panel .ps-pill-label {
    background: rgba(248, 250, 252, 0.94);
}

html[data-theme='light'] .ps-initial-view #tms-panel .ps-select {
    background-color: #ffffff;
    border-color: rgba(148, 163, 184, 0.5);
}

html[data-theme='light'] .ps-initial-view #tms-panel .tms-page-link {
    color: #8b95a7;
}

html[data-theme='light'] .ps-initial-view #tms-panel #tms-page-prev,
html[data-theme='light'] .ps-initial-view #tms-panel #tms-page-next {
    color: #223a72;
}

html[data-theme='light'] .ps-initial-view #tms-panel .tms-page-link:hover:not(:disabled),
html[data-theme='light'] .ps-initial-view #tms-panel .tms-page-link.is-active {
    color: #2f2f33;
}

html[data-theme='light'] .ps-initial-view #tms-panel #tms-today-traits {
    background: rgba(248, 250, 252, 0.94);
    border-color: rgba(148, 163, 184, 0.4);
}

html[data-theme='light'] .ps-initial-view #tms-panel .tms-today-card {
    background:
        linear-gradient(120deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.03) 45%, rgba(255, 255, 255, 0.92) 100%),
        #ffffff;
    border-color: rgba(148, 163, 184, 0.42);
}

html[data-theme='light'] .ps-initial-view #tms-panel .tms-today-chip {
    background: rgba(248, 250, 252, 0.96);
    border-color: rgba(148, 163, 184, 0.45);
    color: #334155;
}

html[data-theme='light'] .ps-initial-view #tms-panel .tms-today-chip--matchup {
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(37, 99, 235, 0.5);
    color: #1e3a8a;
}

html[data-theme='light'] .ps-initial-view #tms-panel .tms-today-chip--sub {
    color: #475569;
}

html[data-theme='light'] .ps-initial-view #tms-panel .tms-today-pitcher-name {
    color: #0f172a;
}

html[data-theme='light'] .ps-initial-view #tms-panel .tms-seasons-menu {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.5);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

html[data-theme='light'] .ps-initial-view #tms-panel .tms-season-option {
    color: #334155;
}

html[data-theme='light'] .ps-initial-view #tms-panel .tms-season-option:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #0f172a;
}

@media (max-width: 992px) {
    #tms-panel .ps-tms-controls {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    #tms-panel .ps-card__body {
        padding: 0.82rem;
    }

    #tms-panel .ps-tms-controls {
        grid-template-columns: 1fr;
    }

    #tms-panel .tms-pills-groups {
        flex-wrap: wrap;
    }

    #tms-panel .tms-pills-section {
        flex: 1 1 100%;
    }

    #tms-panel .ps-form-actions {
        justify-content: stretch;
    }

    #tms-panel .ps-btn--primary,
    #tms-panel .ps-btn--ghost {
        width: 100%;
    }

    #tms-panel .tms-today-row--combined {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

/* Top Spots table — alias for performance-table context */
.ps-spots-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.82rem;
}

.ps-spots-table th,
.ps-spots-table td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--ps-border-s);
    color: var(--ps-text-2);
    white-space: nowrap;
}

.ps-spots-table th {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ps-text-3);
}

.ps-spots-table td:first-child {
    color: var(--ps-text-1);
}

.ps-spots-table tr:last-child td {
    border-bottom: none;
}

.ps-spots-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ps-spots-player {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.32rem;
    min-width: 0;
}

.ps-spots-traits {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    max-width: 100%;
    overflow: visible;
}

.ps-spots-trait {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: nowrap;
}

.ps-spots-trait {
    color: #9bbef8;
    background: rgba(69, 130, 240, 0.14);
    border: 1px solid rgba(69, 130, 240, 0.28);
}

.ps-spots-trait-empty {
    color: var(--ps-text-3);
}

.ps-spots-rate-cell {
    white-space: nowrap !important;
}

.ps-spots-rate {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.24rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    background: rgba(29, 78, 216, 0.12);
    font-family: 'DM Sans', 'Manrope', sans-serif;
    line-height: 1;
}

.ps-spots-rate__pct {
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #dbeafe;
}

.ps-spots-rate__record {
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.ps-spots-traits-cell {
    white-space: normal !important;
    max-width: none;
    transition: none;
    overflow: visible;
}

.ps-spots-action-cell {
    width: 1%;
    text-align: right;
}

.ps-spots-action-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(66, 133, 244, 0.45);
    background: rgba(30, 136, 255, 0.15);
    color: #b8d6ff;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ps-spots-action-btn:hover,
.ps-spots-action-btn:focus {
    background: rgba(30, 136, 255, 0.28);
    border-color: rgba(100, 169, 255, 0.7);
    color: #e6f1ff;
    text-decoration: none;
}

/* Saved card */
.ps-saved-card {
    margin-top: 1.25rem;
}

/* Pagination inside a card */
.ps-card>.ps-pagination,
.ps-saved-card .ps-pagination {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--ps-border-s);
}

/* Live toggle (custom) */
.ps-live-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.ps-live-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ps-live-toggle__track {
    position: relative;
    display: inline-block;
    width: 2.2rem;
    height: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.ps-live-toggle__track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(1.2rem - 6px);
    height: calc(1.2rem - 6px);
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ps-live-toggle__input:checked+.ps-live-toggle__track {
    background: rgba(69, 130, 240, 0.3);
    border-color: rgba(69, 130, 240, 0.4);
}

.ps-live-toggle__input:checked+.ps-live-toggle__track::after {
    transform: translateX(1rem);
    background: var(--ps-accent);
}

.ps-live-toggle__label {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ps-text-2);
}

/* Pagination */
.ps-pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ps-pagination__info {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.78rem;
    color: var(--ps-text-2);
}

/* ============================================================
   INITIAL VIEW — RESPONSIVE
   ============================================================ */

/* Shared MLB player page responsive layout rules moved to static/css/mlb/player_page_layout.css */

/* ── Large desktop (1400px+) ── */
@media (min-width: 1400px) {
    .ps-hero__inner {
        max-width: 820px;
    }
}

/* ── Standard laptop / desktop (1024px–1399px) ── */
@media (min-width: 1024px) and (max-width: 1399px) {
    .ps-hero {
        min-height: clamp(350px, 50svh, 560px);
        min-height: clamp(350px, 50vh, 560px);
        padding: clamp(3.7rem, 7.4vh, 5rem) 3rem;
    }

    .ps-hero__title {
        font-size: clamp(2.6rem, 5.2vw, 4rem);
    }

}

/* ── Tablet (768px–1023px) ── */
@media (max-width: 1023px) and (min-width: 769px) {
    .ps-hero {
        min-height: clamp(330px, 46svh, 500px);
        min-height: clamp(330px, 46vh, 500px);
        padding: clamp(2.9rem, 6.2vh, 3.8rem) 2rem;
    }

    .ps-hero__title {
        font-size: clamp(2.35rem, 6.5vw, 3.4rem);
    }

}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
    .ps-hero {
        min-height: clamp(300px, 42svh, 450px);
        min-height: clamp(300px, 42vh, 450px);
        padding: clamp(2.55rem, 5.8vh, 3.2rem) 1.2rem;
    }

    .ps-hero__title {
        font-size: clamp(2.1rem, 10vw, 3rem);
        margin-bottom: 1.3rem;
    }

    .ps-matchup__stats {
        gap: 0.75rem;
    }

    .ps-stat__val {
        font-size: 0.78rem;
    }

    .ps-tms-controls {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.75rem;
    }

    .tms-trait-filters {
        padding: 0.9rem 0.9rem 0.85rem;
    }
}

/* ── Small mobile (≤480px) ── */
@media (max-width: 480px) {
    .ps-hero {
        min-height: clamp(280px, 40svh, 410px);
        min-height: clamp(280px, 40vh, 410px);
        padding: 2.35rem 0.95rem;
    }

    .ps-hero__title {
        font-size: clamp(1.95rem, 10.5vw, 2.45rem);
    }

    .ps-matchup {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .ps-matchup__stats {
        gap: 0.85rem;
        width: 100%;
        justify-content: flex-end;
    }

    .ps-card__head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Force Trait Match Explorer game-trait groups onto one row on desktop */
#tms-panel .tms-trait-filters .tms-pills-groups {
    display: grid !important;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr) minmax(0, 1.48fr) !important;
    gap: 0.52rem !important;
    align-items: stretch;
}

#tms-panel .tms-trait-filters .tms-pills-section {
    width: auto !important;
    min-width: 0 !important;
}

#tms-panel .tms-trait-filters .tms-pills-section .tms-pills-row {
    flex-wrap: nowrap;
}

@media (max-width: 1200px) {
    #tms-panel .tms-trait-filters .tms-pills-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    #tms-panel .tms-pills-section--context .tms-context-row {
        flex-wrap: wrap;
    }

    #tms-panel .tms-pills-section--context .tms-pills-row--context {
        flex-wrap: wrap;
    }

    #tms-panel .tms-trait-filters .tms-pills-section .tms-pills-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    #tms-panel .tms-trait-filters .tms-pills-groups {
        grid-template-columns: 1fr !important;
    }
}

/* === NAVBAR SEARCH (if full_name is present) === */
.nav-search-container {
    flex: 1;
    max-width: 300px;
    min-width: 180px;
    margin-left: 0.5rem;
    /* Bring search bar closer to logo */
    margin-right: 22rem;
}

/* Keep hint text visible and prevent it covering input text */
.tt-input {
    position: relative;
    z-index: 1;
}

.tt-hint {
    color: #8B949E;
    z-index: 0;
    /* Ensure hint aligns with the larger input text if Typeahead uses it visibly */
    font-size: 1.35rem;
    /* Match the main input's font size */
    padding: 1rem 1.5rem;
    /* Match the main input's padding */
    line-height: 1.5;
    /* Match the main input's line-height */
}

/* === TYPEAHEAD DROPDOWN === */
.ps-search-wrap .tt-menu {
    text-align: left;
    margin-top: 6px;
    width: 100%;
    background: var(--surface-overlay);
    border: 1px solid var(--nav-border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24), 0 0 0 1px var(--nav-border);
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1050;
}

.ps-search-wrap .tt-suggestion {
    padding: 0.75rem 1rem;
    display: block;
    color: var(--nav-text);
    font-family: var(--nav-font-body);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--nav-border);
    transition: background 0.12s ease;
    cursor: pointer;
}

.ps-search-wrap .tt-suggestion:last-child {
    border-bottom: none;
}

.ps-search-wrap .tt-suggestion:hover,
.ps-search-wrap .tt-suggestion.tt-cursor {
    background: var(--nav-accent-soft);
    color: var(--nav-text);
}

.ps-search-wrap .tt-dataset .tt-empty-message,
.ps-search-wrap .tt-dataset .tt-pending-message {
    padding: 0.75rem 1rem;
    color: var(--nav-text-muted);
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 640px) {
    .ps-search-wrap .tt-menu {
        border-radius: 12px;
        margin-top: 4px;
    }

    .ps-search-wrap .tt-suggestion {
        font-size: 0.85rem;
    }
}

/* === TABLES === */
.ps-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.ps-table-wrapper::-webkit-scrollbar {
    height: 8px;
    background-color: #0D1117;
}

.ps-table-wrapper::-webkit-scrollbar-thumb {
    background-color: #30363D;
    border-radius: 4px;
}

.ps-table-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #484F58;
}

.ps-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.ps-table th,
.ps-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #21262D;
    vertical-align: middle;
    white-space: nowrap;
}

.ps-table th {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #8B949E;
    background-color: rgba(13, 17, 23, 0.6);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    border-bottom: 2px solid #388BFD;
}

.ps-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.015);
}

.ps-table tbody tr:hover {
    background-color: rgba(56, 139, 253, 0.06);
}

.ps-table td {
    color: #C9D1D9;
}

.ps-table td:first-child {
    font-weight: 600;
    color: #F0F6FC;
}

/* Color-coded stat values (shared with pitcher page) */
.col-key {
    border-left: 2px solid rgba(56, 139, 253, 0.25) !important;
}

.stat-good {
    color: #3FB950 !important;
    font-weight: 600;
}

.stat-bad {
    color: #F85149 !important;
    font-weight: 600;
}

/* Game Logs and legacy tables without the ps-table class */
.performance-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.performance-table th,
.performance-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #21262D;
    vertical-align: middle;
    white-space: nowrap;
}

.performance-table thead tr {
    background-color: rgba(13, 17, 23, 0.6);
}

.performance-table th {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #8B949E;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    border-bottom: 2px solid #388BFD;
}

.performance-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.015);
}

.performance-table tbody tr:hover {
    background-color: rgba(56, 139, 253, 0.06);
}

.performance-table td {
    color: #C9D1D9;
}

.performance-table td:first-child {
    font-weight: 600;
    color: #F0F6FC;
}

/* DataTables specific overrides */
/* These selectors target Bootstrap 5 classes used by DataTables */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #0D1117;
    /* Darker background for pagination buttons */
    border: 1px solid #30363D;
    /* Theme border */
    color: #8B949E !important;
    /* Important to override Bootstrap default */
    border-radius: 4px;
    margin: 0 0.15em;
    /* Tighter spacing */
    padding: 0.35em 0.7em;
    /* Smaller padding */
    font-size: 0.8rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #161B22;
    /* Slightly lighter on hover */
    border-color: #58A6FF;
    /* Accent border on hover */
    color: #58A6FF !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #58A6FF;
    /* Accent blue for current page */
    border-color: #58A6FF;
    color: #FFFFFF !important;
    box-shadow: none;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
/* For "Show X entries" */
.dataTables_wrapper .dataTables_filter label {
    /* For "Search:" */
    color: #8B949E;
    /* Theme secondary text */
    font-size: 0.8rem;
    padding-top: 0.5em;
    /* Align with pagination */
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: #0D1117;
    /* Dark background for inputs */
    border: 1px solid #30363D;
    /* Theme border */
    color: #C9D1D9;
    /* Theme primary text */
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    /* Smaller padding */
    margin: 0 0.25rem;
    /* Adjust margin */
    font-size: 0.85rem;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #58A6FF;
    /* Theme accent on focus */
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
    /* Theme focus ring */
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.load-more-btn {
    /* Adapting to new button style from best_matchups_redesign.css */
    background-color: #1F6FEB;
    /* Primary action blue from theme */
    color: #FFFFFF;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5em 1.5em;
    /* Wider padding */
    border-radius: 6px;
    border: 1px solid #1F6FEB;
    /* Matching border */
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    cursor: pointer;
}

.load-more-btn:hover {
    background-color: #388BFD;
    /* Lighter blue on hover */
    border-color: #388BFD;
}

/* Prop Lab / View buttons */
.view-btn {
    background-color: #1F6FEB;
    border: 1px solid #1F6FEB;
    color: #FFFFFF;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    display: inline-block;
}

.view-btn:hover {
    background-color: #388BFD;
    border-color: #388BFD;
    color: #FFFFFF;
    text-decoration: none;
}

.meta-pill.meta-pill--status-active {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.45);
    color: #86efac;
}

.meta-pill.meta-pill--status-inactive {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.meta-pill.meta-pill--status-questionable,
.meta-pill.meta-pill--status-neutral {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fcd34d;
}

/* === PERCENTILE CHART === */
.ps-percentile-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem 1rem;
}

.ps-percentile-season-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid rgba(122, 143, 168, 0.16);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(26, 32, 53, 0.82), rgba(17, 21, 32, 0.92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.14);
}

.ps-percentile-season-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--ps-text-muted, #7A8FA8);
    min-width: 48px;
    padding: 0.24rem 0.65rem;
    font-size: 0.73rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.ps-percentile-season-btn:hover,
.ps-percentile-season-btn:focus-visible {
    color: var(--ps-text-primary, #EEF2FF);
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.28);
    outline: none;
}

.ps-percentile-season-btn.active {
    color: #f8fbff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow:
        0 2px 8px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.ps-percentile-description {
    font-size: 0.8rem;
    color: var(--ps-text-muted, #7A8FA8);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.ps-percentile-state {
    display: grid;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border: 1px dashed rgba(122, 143, 168, 0.28);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(20, 24, 34, 0.9), rgba(15, 18, 28, 0.98));
}

.ps-percentile-state__eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.82);
}

.ps-percentile-state__message {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ps-text-primary, #EEF2FF);
}

#percentileChart.ps-percentile-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0 0;
}

.stat-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 44px;
}

.percent-label {
    font-weight: 700;
    font-size: 0.78rem;
    font-family: 'DM Sans', 'Outfit', sans-serif;
    color: var(--ps-text-primary, #EEF2FF);
    margin-bottom: 0.4rem;
    line-height: 1;
}

.ordinal-suffix {
    font-size: 0.55em;
    vertical-align: super;
    margin-left: 1px;
    color: var(--ps-text-muted, #7A8FA8);
    font-weight: 600;
}

.bar-container {
    width: 100%;
    height: 160px;
    background-color: var(--ps-bg-elevated, #1A2035);
    border-radius: 4px 4px 0 0;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    width: 100%;
    position: absolute;
    bottom: 0;
    border-radius: 4px 4px 0 0;
    transition: height 0.55s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.stat-bar .stat-label {
    white-space: nowrap;
    margin-top: 0.5rem;
    font-size: 0.68rem;
    font-family: 'DM Sans', 'Outfit', sans-serif;
    color: var(--ps-text-muted, #7A8FA8);
    text-align: center;
    line-height: 1.3;
}

.percent-rank {
    margin-top: 0.2rem;
    font-size: 0.62rem;
    font-family: 'DM Sans', 'Outfit', sans-serif;
    color: var(--ps-text-muted, #7A8FA8);
    text-align: center;
    line-height: 1.25;
    white-space: nowrap;
}

html[data-theme='light'] .meta-pill.meta-pill--status-active {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(22, 163, 74, 0.35);
    color: #166534;
}

html[data-theme='light'] .meta-pill.meta-pill--status-inactive {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(220, 38, 38, 0.35);
    color: #991b1b;
}

html[data-theme='light'] .meta-pill.meta-pill--status-questionable,
html[data-theme='light'] .meta-pill.meta-pill--status-neutral {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(217, 119, 6, 0.35);
    color: #92400e;
}

html[data-theme='light'] .ps-percentile-season-toggle {
    border-color: rgba(148, 163, 184, 0.42);
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 12px 28px rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .ps-percentile-season-btn {
    color: #64748b;
}

html[data-theme='light'] .ps-percentile-season-btn:hover,
html[data-theme='light'] .ps-percentile-season-btn:focus-visible {
    color: #0f172a;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.24);
}

html[data-theme='light'] .ps-percentile-season-btn.active {
    color: #ffffff;
    border-color: rgba(37, 99, 235, 0.72);
    box-shadow:
        0 12px 22px rgba(37, 99, 235, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html[data-theme='light'] .ps-percentile-state {
    border-color: rgba(148, 163, 184, 0.42);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

html[data-theme='light'] .ps-percentile-state__eyebrow {
    color: #64748b;
}

html[data-theme='light'] .ps-percentile-state__message {
    color: #0f172a;
}

/* === GAME LOGS COLLAPSIBLE — light mode === */
html[data-theme='light'] .ps-collapsible-logs {
    border-color: rgba(148, 163, 184, 0.28);
    background: linear-gradient(180deg, rgba(241, 246, 255, 0.9) 0%, rgba(235, 242, 252, 0.95) 100%);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .ps-collapsible-logs__summary {
    color: #1e293b;
    background: rgba(220, 232, 250, 0.5);
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

html[data-theme='light'] .ps-collapsible-logs__summary:hover {
    background: rgba(203, 220, 245, 0.65);
}

html[data-theme='light'] .ps-collapsible-logs__summary::after {
    color: #64748b;
}

html[data-theme='light'] .ps-collapsible-logs[open] .ps-collapsible-logs__summary {
    background: rgba(210, 225, 248, 0.6);
    border-bottom-color: rgba(148, 163, 184, 0.25);
}

/* === CIRCLE GRAPHS (L10 Hit Rates) === */
@keyframes fillCircle {
    from {
        stroke-dasharray: 0, 100;
    }

    to {
        stroke-dasharray: var(--fill), 100;
    }
}

.circle-graph-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 1rem 1.25rem;
    align-items: start;
}

.circle-graph-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
    text-align: center;
}

.circle-graph-label {
    font-size: 0.67rem;
    font-weight: 600;
    font-family: 'DM Sans', 'Outfit', sans-serif;
    color: var(--ps-text-muted, #7A8FA8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

.circle-graph-svg-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto;
}

.circle-graph-svg-wrap svg {
    width: 72px;
    height: 72px;
}

.fill-circle {
    stroke-dasharray: var(--fill), 100;
    stroke-linecap: round;
    animation: fillCircle 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.circle-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'DM Sans', 'Outfit', sans-serif;
    color: var(--ps-text-primary, #EEF2FF);
    line-height: 1;
}

.hit-rate-summary {
    font-size: 0.68rem;
    color: var(--ps-text-muted, #7A8FA8);
    margin-top: 0.4rem;
    font-family: 'DM Sans', 'Outfit', sans-serif;
}

/* shared no-data message */
.ps-no-data-msg {
    color: var(--ps-text-muted, #7A8FA8);
    font-size: 0.875rem;
    text-align: center;
    padding: 1.5rem 0;
}

.ps-breakdown-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.ps-breakdown-summary__item {
    display: grid;
    gap: 0.28rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(122, 143, 168, 0.18);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(20, 24, 34, 0.92), rgba(15, 18, 28, 0.98));
}

.ps-breakdown-summary__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.82);
}

.ps-breakdown-summary__value {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ps-text-primary, #EEF2FF);
}

.ps-breakdown-table th:first-child,
.ps-breakdown-table td:first-child {
    width: 168px;
    min-width: 168px;
    white-space: nowrap;
}

.ps-expandable-parent td {
    vertical-align: middle;
}

.ps-expand-row-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.ps-expand-row-toggle__chevron {
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    opacity: 0.8;
    margin-top: -1px;
}

.ps-expand-row-toggle[aria-expanded='true'] .ps-expand-row-toggle__chevron {
    transform: rotate(45deg);
}

.ps-expandable-subrow td {
    background: rgba(8, 12, 20, 0.55);
    border-bottom-color: rgba(122, 143, 168, 0.08) !important;
}

.ps-expandable-subrow td:first-child {
    padding-left: 1.35rem !important;
}

.ps-expandable-subrow__label {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--ps-text-secondary, #C8D6E8);
}

.ps-expandable-subrow__label::before {
    content: '';
    width: 0.55rem;
    height: 1px;
    margin-right: 0.45rem;
    background: rgba(148, 163, 184, 0.45);
}

/* light-mode overrides */
html[data-theme='light'] .ps-percentile-description {
    color: #94a3b8;
}

html[data-theme='light'] .percent-label {
    color: #0f172a;
}

html[data-theme='light'] .ordinal-suffix {
    color: #94a3b8;
}

html[data-theme='light'] .bar-container {
    background-color: #e2e8f0;
}

html[data-theme='light'] .stat-bar .stat-label {
    color: #64748b;
}

html[data-theme='light'] .circle-graph-label {
    color: #94a3b8;
}

html[data-theme='light'] .circle-percent {
    color: #0f172a;
}

html[data-theme='light'] .hit-rate-summary {
    color: #94a3b8;
}

html[data-theme='light'] .ps-no-data-msg {
    color: #94a3b8;
}

html[data-theme='light'] .ps-breakdown-summary__item {
    border-color: rgba(148, 163, 184, 0.34);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

html[data-theme='light'] .ps-breakdown-summary__label {
    color: #64748b;
}

html[data-theme='light'] .ps-breakdown-summary__value {
    color: #0f172a;
}

html[data-theme='light'] .ps-expandable-subrow td {
    background: rgba(248, 250, 252, 0.92);
}

html[data-theme='light'] .ps-expandable-subrow__label {
    color: #64748b;
}


/* Prop Performance Section */
.ps-filter-box {
    background-color: #0D1117;
    border: 1px solid #21262D;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    position: relative;
    margin-bottom: 1.5rem;
}

.ps-chart-box {
    background-color: #0D1117;
    border: 1px solid #21262D;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.ps-prop-selector-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.25rem;
}

.ps-prop-selector__control {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.ps-prop-selector__control label {
    color: #6E7681;
    font-size: 0.68rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    margin-bottom: 0;
}

.ps-prop-selector__select {
    background-color: #0D1117;
    border: 1px solid #30363D;
    color: #C9D1D9;
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
    min-width: 110px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238B949E' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.prop-lab-trending #trending-prop-select {
    background-color: #161B22;
    border: 1px solid #30363D;
    color: #C9D1D9;
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    min-width: 100px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238B949E' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.prop-lab-trending #trending-prop-select:focus {
    border-color: #58A6FF;
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
    outline: none;
}

/* Responsive Top Prop Lab table */
.prop-lab-trending .performance-table {
    min-width: 600px;
}

@media (max-width: 600px) {

    .prop-lab-trending .performance-table th,
    .prop-lab-trending .performance-table td {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }

    .prop-lab-trending .view-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.75rem;
    }
}

.ps-prop-selector__select:focus {
    border-color: #388BFD;
    box-shadow: 0 0 0 3px rgba(56, 139, 253, 0.18);
    outline: none;
}

.ps-prop-selector__slider-control {
    /* Replaces .slider-control */
    flex: 1 1 100%;
    /* Take full width on small screens */
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
    /* Ensure slider has space */
}

#threshold-slider {
    flex-grow: 1;
    height: 4px;
    background: transparent;
    border-radius: 2px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

#threshold-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

#threshold-slider::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

#threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #58A6FF;
    /* Theme accent */
    border: 2px solid #161B22;
    /* Thumb border matching card bg */
    cursor: pointer;
    margin-top: -6px;
    /* Align thumb with track */
}

#threshold-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #58A6FF;
    border: 2px solid #161B22;
    cursor: pointer;
}

#threshold-value {
    /* Text displaying slider value */
    color: #F0F6FC;
    font-weight: 600;
    font-size: 0.9rem;
    background-color: #1F6FEB;
    /* Blue accent for value */
    padding: 0.15em 0.4em;
    border-radius: 4px;
    min-width: 2em;
    /* Ensure space for multi-digit numbers */
    text-align: center;
}

/* Prop Pulse Chart Card */
.ps-pulse-chart-card {
    /* Replaces .pulse-chart-card, which is a .card.mb-4 */
    /* This is a .card from Bootstrap, so we need to override its styles if it's not removed from HTML */
    /* Assuming it's within a .ps-content-block, it might not need much if it's just a Chart.js canvas wrapper */
    background-color: #0D1117;
    /* Darker background for this specific card */
    border: 1px solid #21262D;
    /* Darker border */
    border-radius: 6px;
    /* Consistent radius */
    margin-bottom: 0;
    /* If it's the last item in a ps-content-block */
}

.ps-pulse-chart-card .card-body {
    padding: 1rem;
}

/* Adjust padding */

.prop-history-header {
    /* From original, adapt to theme */
    display: flex;
    justify-content: space-between;
    /* Align items */
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.prop-header-left {
    flex-grow: 1;
}

#prop-player-name.card-title {
    /* Bootstrap class, make more specific or use new class */
    font-size: 1.2rem;
    color: #F0F6FC;
    /* Theme heading */
    margin-bottom: 0.15rem;
    border-bottom: none;
    /* Remove card-title default underline */
    font-weight: 900;
}

#prop-player-name.card-title::after {
    display: none;
}

/* Remove card-title default underline */

#prop-history-title.prop-history-title {
    /* Original class */
    font-size: 1.1rem;
    color: #8B949E;
    /* Theme secondary text */
    font-weight: 500;
    margin-bottom: 0;
}

#hit-rate.hit-rate-box {
    /* Original class */
    background: #161B22;
    /* Theme card-like bg */
    border: 1px solid #30363D;
    /* Theme border */
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 1rem;
    row-gap: 0.25rem;
    text-align: center;
    margin-right: 0;
}

#hit-rate .label {
    font-size: 0.75rem;
    color: #8B949E;
    text-transform: uppercase;
}

#hit-rate .value {
    font-size: 0.95rem;
    color: #F0F6FC;
    font-weight: 600;
}

#hit-leverage.hit-leverage-box,
#hrr-leverage.hit-leverage-box {
    background: linear-gradient(180deg, rgba(18, 23, 36, 0.95) 0%, rgba(13, 17, 24, 0.95) 100%);
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 0.85rem;
    row-gap: 0.4rem;
    text-align: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    position: relative;
    overflow: hidden;
}

#hit-leverage.hit-leverage-box::before,
#hrr-leverage.hit-leverage-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ps-accent, #3B82F6) 0%, transparent 75%);
    opacity: 0.55;
}

#ps-leverage-container,
.ps-leverage-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

#hit-leverage .heading,
#hrr-leverage .heading {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    color: var(--ps-text-secondary, #C8D6E8);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.15rem;
}

#hit-leverage .label,
#hrr-leverage .label {
    font-size: 0.68rem;
    color: var(--ps-text-muted, #7A8FA8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.25;
}

#hit-leverage .value,
#hrr-leverage .value {
    font-size: 0.95rem;
    color: var(--ps-text-primary, #EEF2FF);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.12);
}

#prop-line-box.prop-line-box {
    background: #161B22;
    border: 1px solid #30363D;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 1rem;
    row-gap: 0.25rem;
    text-align: center;
    width: 20rem;
    min-width: 20rem;
    box-sizing: border-box;
    margin: 0;
}

#prop-line-box .label {
    font-size: 0.75rem;
    color: #8B949E;
    text-transform: uppercase;
    white-space: nowrap;
}

#prop-line-box .value {
    font-size: 0.95rem;
    color: #F0F6FC;
    font-weight: 600;
}

#prop-line-box .odds-input {
    background: transparent;
    border: 1px solid #30363D;
    border-radius: 4px;
    text-align: center;
    color: #F0F6FC;
    width: 100%;
}

#prop-line-box .odds-input::placeholder {
    color: #8B949E;
}

.prop-line-box--nfl {
    grid-template-columns: 1fr;
    width: auto;
    min-width: 5.5rem;
    margin-bottom: 0.5rem;
}

#prop-line-box .line-value-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

#prop-line-box .live-indicator {
    display: none;
    font-size: 0.7rem;
    color: #28a745;
    font-weight: 600;
    white-space: nowrap;
    align-items: center;
    gap: 0.25rem;
}

#prop-line-box .live-indicator .dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background-color: #28a745;
    display: block;
    flex-shrink: 0;
}

.highlight-col {
    background: rgba(25, 123, 255, 0.25);
    border-radius: 4px;
}

@media (max-width: 992px) {

    #prop-line-box.prop-line-box,
    #hit-rate.hit-rate-box {
        width: 14rem;
        min-width: 14rem;
        font-size: 0.8rem;
        column-gap: 0.5rem;
        padding: 0.5rem;
    }

    #prop-line-box.prop-line-box.prop-line-box--nfl {
        width: auto;
        min-width: 5.5rem;
    }

    #hit-leverage.hit-leverage-box,
    #hrr-leverage.hit-leverage-box {
        width: 100%;
        min-width: 0;
        font-size: 0.8rem;
        column-gap: 0.5rem;
        padding: 0.65rem 0.75rem;
    }

    #prop-line-box .label,
    #hit-rate .label,
    #hit-leverage .label,
    #hit-leverage .heading,
    #hrr-leverage .label,
    #hrr-leverage .heading {
        font-size: 0.65rem;
    }

    #prop-line-box .value,
    #hit-rate .value,
    #hit-leverage .value,
    #hrr-leverage .value {
        font-size: 0.85rem;
    }
}

@media (max-width: 600px) {

    #prop-line-box.prop-line-box,
    #hit-rate.hit-rate-box,
    #hit-leverage.hit-leverage-box,
    #hrr-leverage.hit-leverage-box {
        width: 100%;
        min-width: 0;
        font-size: 0.7rem;
        column-gap: 0.4rem;
        padding: 0.6rem;
    }

    #prop-line-box.prop-line-box.prop-line-box--nfl {
        width: auto;
        min-width: 5.5rem;
    }

    #prop-line-box .label,
    #hit-rate .label,
    #hit-leverage .label,
    #hit-leverage .heading,
    #hrr-leverage .label,
    #hrr-leverage .heading {
        font-size: 0.55rem;
    }

    #prop-line-box .value,
    #hit-rate .value,
    #hit-leverage .value,
    #hrr-leverage .value {
        font-size: 0.8rem;
    }
}

html[data-theme='light'] #hit-leverage.hit-leverage-box,
html[data-theme='light'] #hrr-leverage.hit-leverage-box {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-color: #dde3ef;
}

html[data-theme='light'] #hit-leverage .heading,
html[data-theme='light'] #hrr-leverage .heading {
    color: #475569;
}

html[data-theme='light'] #hit-leverage .label,
html[data-theme='light'] #hrr-leverage .label {
    color: #64748b;
}

html[data-theme='light'] #hit-leverage .value,
html[data-theme='light'] #hrr-leverage .value {
    color: #0f172a;
    background: rgba(37, 99, 235, 0.1);
}

#prop-line-box .positive-ev {
    color: #2ECC71;
    background: rgba(46, 204, 113, 0.2);
    border-radius: 4px;
}

.prop-logo-box img {
    /* Vynta logo in prop chart */
    width: 35px;
    height: 35px;
    opacity: 0.7;
}

.ps-chart-container {
    position: relative;
    height: 250px;
    /* explicit height so Chart.js (maintainAspectRatio: false) has a parent size to fill */
    width: 100%;
}

#propPulseChart {
    /* Chart.js canvas */
    background: transparent;
    padding: 0;
    margin-top: 0.5rem;
}

/* Share/Download buttons */
.prop-share-buttons {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.prop-share-buttons .btn,
.prop-share-buttons .add-pick-btn {
    font-size: 1rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #1F6FEB;
    border-color: #1F6FEB;
    color: #FFFFFF;
}

.prop-share-buttons .btn:hover,
.prop-share-buttons .add-pick-btn:hover {
    background-color: #388BFD;
    border-color: #388BFD;
}

.prop-share-buttons .add-pick-btn {
    border-radius: 4px;
    margin-left: 0;
    box-shadow: none;
}

/* Game Log Section */
.ps-game-log__table {
    min-width: 650px;
    /* Allow horizontal scroll on small screens */
}

.ps-game-log__table--native-scroll thead,
.ps-game-log__table--native-scroll tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.ps-game-log__table--native-scroll tbody {
    display: block;
    max-height: 34rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.recent-performance-container .dataTables_wrapper .dataTables_scroll {
    border: 1px solid var(--ps-border-subtle, #171C2E);
    border-radius: 8px;
}

.recent-performance-container .dataTables_wrapper .dataTables_scrollHead,
.recent-performance-container .dataTables_wrapper .dataTables_scrollHeadInner {
    width: 100% !important;
}

.recent-performance-container .dataTables_wrapper .dataTables_scrollBody {
    border-bottom: none;
}

.ps-game-log__table tbody tr.selected {
    background-color: rgba(59, 130, 246, 0.12) !important;
    border-left: 2px solid var(--ps-accent, #3B82F6);
}

.ps-game-log__table tbody tr.range-selected {
    background-color: rgba(59, 130, 246, 0.06) !important;
}

.game-log-filter {
    margin-bottom: 0.75rem;
}

.game-log-filter input {
    width: 200px;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: 6px;
    background-color: var(--ps-bg-elevated, #1A2035);
    color: var(--ps-text-secondary, #C8D6E8);
    font-size: 0.82rem;
    font-family: 'DM Sans', 'Outfit', sans-serif;
    outline: none;
    transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.game-log-filter input:focus {
    border-color: var(--ps-accent, #3B82F6);
    box-shadow: 0 0 0 2px var(--ps-accent-glow, rgba(59, 130, 246, 0.18));
}

.game-log-filter input::placeholder {
    color: var(--ps-text-muted, #7A8FA8);
}

html[data-theme='light'] .game-log-filter input {
    background-color: #f1f5f9;
    border-color: #dde3ef;
    color: #1e293b;
}

html[data-theme='light'] .game-log-filter input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

/* Game Range Summary */
#game-range-summary.ps-game-range-summary {
    /* Targets #game-range-summary */
    position: fixed;
    /* Keep it sticky */
    bottom: 0;
    left: 0;
    right: 0;
    background: #0D1117;
    /* Dark background, slightly transparent to match theme */
    border-top: 1px solid #58A6FF;
    /* Accent border */
    padding: 0.75rem 1rem;
    /* Adjust padding */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    color: #C9D1D9;
    /* Theme primary text */
    z-index: 1000;
    /* Ensure it's above other content */
    display: none;
    /* Initially hidden by JS */
}

#game-range-summary .summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

#game-range-summary .summary-title {
    font-size: 1rem;
    font-weight: 600;
    color: #F0F6FC;
    /* Theme heading */
}

#game-range-summary .clear-btn {
    background-color: #484F58;
    /* Darker grey button */
    border: 1px solid #484F58;
    color: #C9D1D9;
    /* Theme primary text */
    padding: 0.25em 0.75em;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#game-range-summary .clear-btn:hover {
    background-color: #58A6FF;
    /* Theme accent on hover */
    color: #FFFFFF;
    border-color: #58A6FF;
}

/* Table within summary bar */
#game-range-summary table th,
#game-range-summary table td {
    padding: 0.5rem;
    font-size: 0.8rem;
    color: #C9D1D9;
    white-space: nowrap;
}

#game-range-summary table th {
    background-color: rgba(88, 166, 255, 0.05);
    /* Very subtle header bg */
    color: #F0F6FC;
    /* Theme heading */
    font-weight: 500;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1051;
}

.loading-spinner .spinner-border {
    /* Bootstrap class */
    border-color: #58A6FF;
    /* Theme accent */
    border-right-color: transparent;
    width: 3rem;
    height: 3rem;
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 992px) {

    /* Tablet and smaller */
    .ps-header-hero-stats {
        padding-left: 1.25rem;
    }

    .ps-hero-stat {
        padding: 0.5rem 1rem;
    }

    #percentileChart.ps-percentile-chart {
        gap: 0.75rem;
    }

    .stat-bar {
        width: 45px;
    }

    .bar-container {
        height: 140px;
    }
}

@media (max-width: 768px) {

    /* Mobile */
    main {
        padding: 0;
    }

    .ps-initial-view {
        padding: 2rem 0;
    }

    .ps-initial-view .title-section h1 {
        font-size: 2.2rem;
    }

    .ps-initial-view .title-section p {
        font-size: 1rem;
    }

    .ps-initial-search__form-container {
        max-width: 100%;
    }

    .ps-player-header,
    .ps-overview-container,
    .ps-game-card,
    .ps-content-block,
    .recent-performance-container,
    .ps-bvp-leaderboard,
    .ps-initial-search__form-container {
        border-radius: 0;
    }

    /* Header identity row: layout handled by player_page_shared.css mobile rules */

    .ps-header-identity {
        padding: 1rem 1.25rem;
        gap: 0;
    }

    .ps-header-photo {
        width: 76px;
        height: 104px;
        margin-right: 1rem;
    }

    .ps-player-header__name,
    .ps-player-header .pitcher-name {
        font-size: 1.55rem;
    }

    .ps-header-team-name {
        font-size: 0.85rem;
    }

    .ps-player-header__team-badge {
        font-size: 0.95rem;
        padding: 0.35em 0.6em;
    }

    .ps-header-stat-bar {
        padding: 0.7rem 1.25rem;
    }

    .ps-content-block {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .ps-content-block__title {
        font-size: 1.25rem;
    }

    .ps-content-block__description {
        font-size: 0.85rem;
    }

    .ps-table th,
    .ps-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .ps-table th {
        font-size: 0.8rem;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.4em 0.8em;
        font-size: 0.85rem;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_length label,
    .dataTables_wrapper .dataTables_filter label {
        font-size: 0.85rem;
    }

    .dataTables_wrapper .dataTables_length select,
    .dataTables_wrapper .dataTables_filter input {
        font-size: 0.85rem;
        padding: 0.35rem 0.5rem;
    }

    .ps-filter-box {
        padding: 0.75rem;
        position: relative;
    }

    .ps-chart-box {
        padding: 0.75rem;
        position: relative;
    }

    .ps-chart-container {
        height: 200px;
    }

    .ps-prop-selector-container {
        flex-direction: column;
        /* Stack controls vertically */
        align-items: stretch;
        /* Make controls full width */
        gap: 0.75rem;
    }

    .ps-prop-selector__control {
        justify-content: space-between;
        /* Space out label and select */
    }

    .ps-prop-selector__select {
        flex-grow: 1;
        /* Allow select to take available space */
    }

    #percentileChart.ps-percentile-chart {
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .stat-bar {
        width: 40px;
    }

    .bar-container {
        height: 120px;
    }

    .percent-label {
        font-size: 0.8rem;
    }

    .stat-bar .stat-label {
        font-size: 0.65rem;
    }

    .circle-graph-group {
        gap: 1rem;
    }

    .circle-graph-item {
        width: 80px;
    }

    .circle-graph-svg-wrap {
        width: 60px;
        height: 60px;
    }

    .circle-percent {
        font-size: 0.8rem;
    }

    .circle-graph-label {
        font-size: 0.7rem;
    }

    #game-range-summary.ps-game-range-summary {
        padding: 0.5rem;
    }

    #game-range-summary .summary-title {
        font-size: 0.9rem;
    }

    #game-range-summary table th,
    #game-range-summary table td {
        font-size: 0.7rem;
        padding: 0.3rem;
    }

    #game-range-summary .clear-btn {
        font-size: 0.75rem;
        padding: 0.2em 0.6em;
    }
}

@media (max-width: 600px) {

    /* ── Player header: mobile hierarchy fix ── */
    .ps-header-identity {
        padding: 1rem 1rem 0.875rem;
        align-items: flex-start;
    }

    /* Bigger, more prominent headshot */
    .ps-header-photo {
        width: 88px;
        height: 118px;
        margin-right: 1rem;
    }

    /* Stack team badge ABOVE player name so name owns its visual line */
    .ps-header-name-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        margin-bottom: 0.25rem;
    }

    /* Badge becomes a small label, not a competing element */
    .ps-player-header .team-badge {
        font-size: 0.72rem;
        padding: 0.2em 0.6em;
        border-radius: 6px;
    }

    /* Name is now the dominant visual element */
    .ps-player-header__name,
    .ps-player-header .pitcher-name {
        font-size: 1.65rem;
        font-weight: 800;
        line-height: 1.1;
        margin-bottom: 0;
    }

    /* Pills are metadata — compact and subdued */
    .ps-player-header .meta-pill {
        font-size: 0.68rem;
        padding: 2px 8px;
    }

    .ps-player-header .player-meta-row {
        gap: 0.3rem;
        margin-top: 0.3rem;
    }

    .ps-header-stat-bar .stat-chip {
        min-width: 40px;
        padding: 0.3rem 0.5rem;
    }

    .ps-header-stat-bar .chip-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {

    /* Smaller Mobiles */
    main {
        padding: 0;
    }

    .ps-initial-view {
        padding: 1rem 0;
    }

    .ps-initial-view .title-section h1 {
        font-size: 1.8rem;
    }

    .ps-initial-view .title-section p {
        font-size: 0.9rem;
    }

    .ps-header-identity {
        padding: 0.875rem 0.875rem 0.75rem;
    }

    .ps-header-photo {
        width: 80px;
        height: 107px;
        margin-right: 0.875rem;
    }

    /* Name stays large even on tiny phones */
    .ps-player-header__name,
    .ps-player-header .pitcher-name {
        font-size: 1.45rem;
        font-weight: 800;
    }

    .ps-player-header .team-badge,
    .ps-player-header__team-badge {
        font-size: 0.68rem;
        padding: 0.18em 0.55em;
    }

    /* Pills even more compact on very small screens */
    .ps-player-header .meta-pill {
        font-size: 0.65rem;
        padding: 1px 7px;
    }

    .ps-table th,
    .ps-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .ps-table th {
        font-size: 0.75rem;
    }

    /* Further reduce padding/font for very small screens if necessary */
    .ps-prop-selector__control label {
        font-size: 0.8rem;
    }

    .ps-prop-selector__select {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    #threshold-value {
        font-size: 0.8rem;
    }
}

/* === PLAYER VIEW === */
.ps-player-view .bm-container.ps-container {
    /* bm-container provides max-width, ps-container for specifics */
    padding-top: 1.5rem;
    /* Add some space below nav if not already handled by main's padding */
}

/* Widen player pages on large screens for better use of real estate */
@media (min-width: 1200px) {
    .ps-player-view .bm-container {
        max-width: 1280px;
    }
}

@media (min-width: 1440px) {
    .ps-player-view .bm-container {
        max-width: 1360px;
    }
}

/* Container wrapping the player header, season stats, percentiles
   and last-10 hit rates for a unified layout */
.ps-overview-container {
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    background-color: #161B22;
    /* Unified card background */
    border: 1px solid #30363D;
    /* Unified card border */
    border-radius: 8px;
    /* Unified card radius */
    padding: 1.5rem;
    /* Inner spacing */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* Consistent shadow */
}

/* Remove individual card styling for content blocks inside the overview,
   but keep the player header as a full hero card */
.ps-overview-container .ps-content-block {
    background: none;
    border: none;
    box-shadow: none;
    margin-bottom: 0;
    padding: 0;
}

/* Container wrapping recent performance and split tables — now transparent,
   individual .recent-performance-container cards handle their own styling */
.ps-performance-card {
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.ps-performance-card .ps-content-block {
    background: none;
    border: none;
    box-shadow: none;
    margin-bottom: 0;
    padding: 0;
}

.ps-performance-card .ps-content-block+.ps-content-block {
    margin-top: 1.75rem;
}

/* Container wrapping today's game info, prop filters, prop chart
   and game logs for a unified layout */
.ps-game-card {
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-bottom: 2rem;
    background-color: #161B22;
    border: 1px solid #30363D;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ps-game-card .ps-content-block,
.ps-game-card .ps-prop-selector-container,
.ps-game-card .ps-pulse-chart-card,
.ps-game-card .recent-performance-container,
.ps-game-card .no-data-alert {
    background: none;
    border: none;
    box-shadow: none;
    margin-bottom: 0;
    padding: 0;
}

.ps-game-card .ps-prop-selector-container {
    margin-bottom: 0;
}

.ps-game-card .ps-pulse-chart-card {
    margin-bottom: 0;
}

.ps-alert {
    /* For messages like 'No data available' or general alerts */
    background-color: #161B22;
    /* Theme card background */
    border: 1px solid #30363D;
    /* Theme border */
    color: #8B949E;
    /* Softer text for info */
    border-radius: 6px;
    /* Consistent radius */
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    /* Consistent spacing */
}

/* Override for Bootstrap's .alert-warning if used, or create a .ps-alert--warning */
.alert.alert-warning.ps-alert {
    background-color: rgba(187, 134, 252, 0.1);
    /* Purple-ish warning, modern */
    border-color: rgba(187, 134, 252, 0.3);
    color: #BB86FC;
    /* Purple text */
}

@media (max-width: 576px) {
    .ps-alert {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .premium-lock .premium-overlay {
        font-size: 0.9rem;
        padding: 0.75rem;
        width: 100%;
        margin: 0;
        flex-direction: column;
    }
}

/* === PLAYER HEADER — HERO CARD === */
.ps-player-header {
    background-color: var(--ps-bg-card, #111520);
    border: 1px solid #30363D;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    padding: 0;
}

/* Shared MLB player page header rules moved to static/css/mlb/player_page_shared.css */

/* === TAB RAIL (Overview / Prop Lab) — matches pitcher page === */
/* Full-width underline tab nav anchored to the bottom of the header card */
.ps-tab-rail {
    display: flex;
    align-items: flex-end;
    gap: 0;
    width: 100%;
    border-top: 1px solid rgba(30, 37, 64, 0.8);
    border-bottom: 1px solid rgba(30, 37, 64, 0.8);
    background: rgba(10, 13, 20, 0.45);
    padding: 0 1.75rem;
    margin: 0;
    box-sizing: border-box;
}

.ps-tab-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 0.1rem;
    margin-right: 2rem;
    font-family: 'DM Sans', 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ps-text-muted, #7A8FA8);
    text-decoration: none;
    letter-spacing: 0.04em;
    position: relative;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: -1px;
}

.ps-tab-link:hover {
    color: var(--ps-text-secondary, #C8D6E8);
    text-decoration: none;
    border-bottom-color: rgba(59, 130, 246, 0.4);
}

.ps-tab-link.is-active {
    color: var(--ps-text-primary, #EEF2FF);
    border-bottom-color: var(--ps-accent, #3B82F6);
}

@media (max-width: 768px) {
    .ps-tab-rail {
        padding: 0 1rem;
    }

    .ps-tab-link {
        font-size: 0.78rem;
        margin-right: 1.5rem;
        padding: 0.75rem 0.1rem;
    }
}

@media (max-width: 480px) {
    .ps-tab-rail {
        padding: 0 0.75rem;
    }

    .ps-tab-link {
        margin-right: 1.25rem;
    }
}

html[data-theme='light'] .ps-tab-rail {
    border-top-color: #dde3ef;
    border-bottom-color: #dde3ef;
    background: rgba(241, 245, 253, 0.6);
}

html[data-theme='light'] .ps-tab-link {
    color: #94a3b8;
}

html[data-theme='light'] .ps-tab-link:hover {
    color: #475569;
    border-bottom-color: rgba(37, 99, 235, 0.35);
}

html[data-theme='light'] .ps-tab-link.is-active {
    color: #0f172a;
    border-bottom-color: #2563eb;
}

/* Legacy L5 box — no longer used in new HTML but keep for fallback */
.ps-player-header__bio-and-l5 {
    display: contents;
    padding-top: 0;
    border-top: none;
}

.ps-player-header__bio {
    font-size: 0.85rem;
    color: #C9D1D9;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.2rem 0.6rem;
    margin-top: 1rem;
    align-items: baseline;
    flex: 2 1 300px;
}

.ps-player-header__bio dt {
    font-weight: 500;
    color: #8B949E;
}

.ps-player-header__bio dd {
    margin: 0;
    color: #C9D1D9;
}

.ps-player-header__l5-box {
    background-color: #161B22;
    border: 1px solid #21262D;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    flex: 1 1 150px;
    max-width: 100%;
}

.ps-player-header__l5-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #F0F6FC;
    margin: 0 0 0.6rem 0;
    border-bottom: 1px solid #21262D;
    padding-bottom: 0.45rem;
}

.ps-player-header__l5-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 0.2rem 0.4rem;
    font-size: 0.8rem;
}

.ps-player-header__l5-stat-item {
    color: #C9D1D9;
    white-space: nowrap;
}

.ps-player-header__l5-label {
    font-weight: 500;
    color: #8B949E;
    margin-right: 0.25em;
}

/* Shared MLB player page section-card shell moved to static/css/mlb/player_page_shared.css */

/* === CONTENT BLOCKS (replaces .recent-performance-container) === */
.ps-content-block {
    background-color: #161B22;
    border: 1px solid #21262D;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Give extra breathing room when these blocks stack with legacy
   .recent-performance-container sections */
.ps-content-block+.recent-performance-container,
.recent-performance-container+.recent-performance-container {
    margin-top: 0.5rem;
}

/* Season stats specific block */
.ps-season-stats-block {
    width: 100%;
    max-width: none;
}

/* Hitter season stats table: match pitcher table card treatment */
.ps-season-stats-card {
    background-color: #161B22;
    border: 1px solid #21262D;
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.ps-season-stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #388BFD 0%, transparent 70%);
    opacity: 0.5;
}

.ps-season-stats-card .recent-performance-title {
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #8B949E;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ps-season-stats-card .recent-performance-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: #388BFD;
    border-radius: 2px;
    flex-shrink: 0;
}

.ps-season-stats-card .table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.ps-season-stats-card .performance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.845rem;
    font-family: 'Manrope', sans-serif;
}

.ps-season-stats-card .performance-table thead tr {
    border-bottom: 1px solid #21262D;
    background: transparent;
}

.ps-season-stats-card .performance-table th {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    color: #8B949E;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    padding: 0.55rem 0.85rem;
    white-space: nowrap;
    background: transparent;
    border-bottom: none;
    text-align: center;
}

.ps-season-stats-card .performance-table tbody tr {
    border-bottom: 1px solid #30363D;
    transition: background-color 0.2s ease;
}

.ps-season-stats-card .performance-table tbody tr:last-child {
    border-bottom: none;
}

.ps-season-stats-card .performance-table tbody tr:hover {
    background-color: rgba(56, 139, 253, 0.06);
}

.ps-season-stats-card .performance-table td {
    padding: 0.65rem 0.85rem;
    color: #C9D1D9;
    white-space: nowrap;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.ps-season-stats-card .performance-table .col-key {
    border-left: none !important;
    color: inherit;
    font-weight: inherit;
    font-size: inherit;
}

.ps-content-block__title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #F0F6FC;
    margin-bottom: 1rem;
    border-left: 3px solid #388BFD;
    padding-left: 0.7rem;
    border-bottom: none;
    padding-bottom: 0;
    letter-spacing: -0.01em;
}

.ps-content-block__description {
    /* For paragraphs directly under titles in content blocks */
    font-size: 0.9rem;
    color: #8B949E;
    margin-bottom: 1.25rem;
    line-height: 1.5;
    max-width: 160ch;
    /* For readability of longer descriptions */
}

.ps-content-block__no-data {
    /* For 'no data available' messages within blocks */
    color: #8B949E;
    text-align: center;
    padding: 1.5rem 0;
    /* More padding for no data messages */
    font-style: italic;
}

/* === TODAY'S GAME SECTION === */
.game-details-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-info-row {
    background-color: #161B22;
    border: 1px solid #30363D;
    border-radius: 0.375rem;
    padding: 1rem;
    transition: background-color 0.2s ease-in-out;
}

.game-info-row:hover {
    background-color: #21262D;
}

.game-info-row.lineup-row:hover {
    background-color: #0D1117;
}

.lineup-table tbody tr:hover {
    background-color: #21262D;
}

.lineup-last10 {
    font-size: 0.85rem;
    color: rgba(240, 246, 252, 0.85);
    font-weight: 500;
}

.lineup-player-name {
    font-size: 0.95rem;
    font-weight: 600;
    display: block;
    color: #FFFFFF;
}

.info-row-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #F0F6FC;
    margin: 0 0 8px;
}

.opposing-pitcher-title,
.career-vs-title,
.season-splits-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #C9D1D9;
    margin-bottom: 4px;
}

.pitcher-stats-line,
.career-stats-line,
.season-splits-line,
.bullpen-stats-line {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: baseline;
    white-space: nowrap;
}

.season-splits-line {
    gap: 12px;
}

.bullpen-stats-line {
    gap: 12px;
}

.bp-rank-select {
    background-color: #161B22;
    border: 1px solid #30363D;
    color: #C9D1D9;
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238B949E' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: auto;
}

.bp-rank-select:focus {
    border-color: #58A6FF;
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
    outline: none;
}

.stat-item {
    display: inline-flex;
    align-items: baseline;
}

.stat-label {
    font-weight: 600;
    color: #F0F6FC;
    margin-right: 6px;
}

.pitcher-stats-line .separator {
    margin: 0 12px;
    color: #8B949E;
}

.pitcher-stats-line .spacer {
    margin-right: 12px;
}

.split-gap {
    margin-left: 24px;
}

.stat-highlight {
    background: rgba(88, 166, 255, 0.15);
    border-radius: 6px;
    padding: 1px 3px;
    margin: -1px -3px;
}

.no-game-message {
    font-size: 0.9rem;
    color: #aaaaaa;
    text-align: center;
    padding: 0.5rem;
}

.text-muted {
    font-size: 0.9rem;
    color: #aaaaaa !important;
}

.todays-game-subtitle .team-badge {
    font-size: 0.95rem;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    color: #ffffff;
}

/* === PREMIUM LOCKOVERLAY === */
.premium-lock {
    position: relative;
}

.premium-lock .premium-content {
    position: relative;
    z-index: 0;
    filter: blur(6px);
    pointer-events: none;
}

.premium-lock .premium-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1rem;
    /* slightly smaller, matches ps-alert */
    color: #C9D1D9;
    /* theme text color */
    font-weight: 500;
    line-height: 1.4;
    background: rgba(22, 27, 34, 0.92);
    border: 1px solid #30363D;
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(2px);
    z-index: 20;
    pointer-events: auto;
    /* allow links inside overlay to be clickable */
    width: 100%;
    margin: 0;
}

.premium-lock .premium-overlay a {
    color: #58A6FF;
    text-decoration: underline;
}

/* === TODAY'S GAME NEW STYLES === */
.todays-game {
    background-color: var(--ps-bg-card, #111520);
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: var(--ps-radius-card, 12px);
    padding: 1.5rem 1.75rem;
    position: relative;
    overflow: hidden;
}

.todays-game__title {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    /* Allow subtitle to wrap on small screens */
    margin-bottom: 1rem;
}

.todays-game__subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--ps-text-muted, #7A8FA8);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.todays-game__subtitle .team-badge {
    font-size: 0.9rem;
    padding: 0.25em 0.6em;
    color: #ffffff;
}

.todays-game__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    /* Consistent gap between cards */
    margin-top: 1rem;
}

/* Balance card layout on tablets so rows are even */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .todays-game__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.todays-game__card {
    background: linear-gradient(180deg, rgba(18, 23, 36, 0.95) 0%, rgba(13, 17, 24, 0.95) 100%);
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    /* Ensure cards have consistent height if needed */
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(3, 8, 20, 0.25);
}

.todays-game__card-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--ps-border-subtle, #171C2E);
    background: rgba(12, 18, 30, 0.65);
}

.todays-game__card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ps-text-secondary, #C8D6E8);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

.todays-game__card-body {
    padding: 1rem;
    flex-grow: 1;
    /* Allow body to fill available space */
}

.todays-game__pitcher-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #C9D1D9;
    margin-bottom: 0.75rem;
}

.todays-game__stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.todays-game__stats-list li {
    display: flex;
    justify-content: flex-start;
    gap: 0.25rem;
    padding: 0.3rem 0;
    color: var(--ps-text-primary, #EEF2FF);
    border-bottom: 1px dashed rgba(122, 143, 168, 0.16);
}

.todays-game__stats-list li:last-child {
    border-bottom: none;
}

.todays-game__stats-list li .label {
    font-weight: 500;
    color: var(--ps-text-muted, #7A8FA8);
}

.pitcher-stats-columns {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.pitcher-stats-col {
    flex: 1;
}

.pitcher-stats-heading {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #E6EDF3;
}

/* For side-by-side splits */
.todays-game__stats-list--splits li {
    justify-content: flex-start;
    gap: 0.5rem;
}

.todays-game__stats-list--splits li.highlight {
    background-color: rgba(56, 139, 253, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 6px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin: 0.1rem -0.5rem;
}

.todays-game__split-divider {
    border-top: 1px solid #30363d;
    margin: 0.25rem 0;
}

.todays-game__sub-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ps-text-secondary, #C8D6E8);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--ps-border-subtle, #171C2E);
}

.todays-game__split-group:first-child .todays-game__sub-title {
    margin-top: 0;
    /* Remove top margin for the first split group */
}

.todays-game__no-data {
    color: var(--ps-text-muted, #7A8FA8);
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
}

/* Bullpen Table Specifics */
.todays-game__bullpen-card .todays-game__card-title {
    font-size: 1rem;
    /* Match other titles */
}

.todays-game__bullpen-card .todays-game__card-body {
    padding-top: 0.25rem;
}

.todays-game__bullpen-table {
    width: 100%;
    font-size: 0.8rem;
    /* Smaller font for dense table */
}

.todays-game__bullpen-table th,
.todays-game__bullpen-table td {
    text-align: center;
    padding: 0.6rem 0.4rem;
    /* taller rows for readability */
}

.todays-game__bullpen-table th {
    font-size: 0.7rem;
}

.todays-game__bullpen-table td:first-child,
.todays-game__bullpen-table th:first-child {
    text-align: left;
    font-weight: 600;
}

.bp-status-circle {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
}

.bp-status-up {
    background-color: #3fb950;
}

.bp-status-5050 {
    background-color: #e3b341;
}

.bp-status-down {
    background-color: #f85149;
}

/* Bullpen Card Tabs */
.todays-game__bullpen-tabs {
    border-bottom: 1px solid var(--ps-border-subtle, #171C2E);
    margin-bottom: 1rem;
}

.todays-game__bullpen-tabs .nav-link {
    color: var(--ps-text-muted, #7A8FA8);
    font-weight: 600;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

.todays-game__bullpen-tabs .nav-link.active {
    color: var(--ps-text-primary, #EEF2FF);
    border-bottom-color: var(--ps-accent, #3B82F6);
    background: transparent;
}

.todays-game__bullpen-tabs .nav-link:hover {
    color: var(--ps-text-secondary, #C8D6E8);
}

/* === General Page Polish === */

/* Player Header Refinements */
.ps-player-header__name,
.ps-player-header .pitcher-name {
    font-size: 2.2rem;
    /* Slightly larger name */
}

.ps-player-header__bio {
    margin-top: 0.25rem;
    /* Better align bio with name details if wrapped */
}

/* Table styling consistency (applied to .ps-table, .performance-table) */
.ps-table th,
.performance-table th {
    background-color: #161B22;
    /* Darker, consistent header */
    border-bottom: 2px solid #388BFD;
    /* Accent border for header bottom */
}

.ps-table td,
.performance-table td {
    border-bottom: 1px solid #21262D;
    /* Consistent row separator */
}

#recent-contact-quality-shell .performance-table th.rcq-expand-col,
#recent-contact-quality-shell .performance-table td.rcq-expand-col {
    width: 1%;
    min-width: 22px;
    max-width: 26px;
    padding-left: 0.45rem;
    padding-right: 0.2rem;
    text-align: center !important;
}

#recent-contact-quality-shell .performance-table th.rcq-game-col,
#recent-contact-quality-shell .performance-table td.rcq-game-col {
    text-align: left !important;
    padding-left: 0.25rem;
}

#recent-contact-quality-shell .performance-table tr.rcq-season-row {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(24, 46, 86, 0.22));
    box-shadow:
        inset 0 1px 0 rgba(88, 128, 201, 0.34),
        inset 0 -1px 0 rgba(76, 116, 189, 0.28);
}

#recent-contact-quality-shell .performance-table tr.rcq-season-row td {
    background: transparent !important;
    font-weight: 600;
    color: rgba(228, 237, 251, 0.95);
}

#recent-contact-quality-shell .performance-table tr.rcq-season-row td:first-child {
    border-left: 2px solid rgba(102, 151, 240, 0.58);
    font-weight: 700;
}

#recent-contact-quality-shell .performance-table tr.rcq-season-row td.rcq-expand-col {
    color: transparent;
}

#recent-contact-quality-shell .rcq-chart-panel {
    margin-top: 0.95rem;
    margin-bottom: 1rem;
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(15, 20, 35, 0.9), rgba(12, 16, 29, 0.94));
    padding: 0.8rem 0.9rem 0.85rem;
}

#recent-contact-quality-shell .rcq-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 0.9rem;
    margin: 0.35rem 0 0.45rem;
}

#recent-contact-quality-shell .rcq-table-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem 0.85rem;
    margin: 0;
}

#recent-contact-quality-shell .rcq-table-heading {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #8B949E;
    line-height: 1.2;
}

#recent-contact-quality-shell .rcq-table-controls .sp-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

#recent-contact-quality-shell .rcq-table-controls .sp-filter-label {
    margin-bottom: 0;
}

#recent-contact-quality-shell .rcq-table-hand-toggle {
    padding: 0.18rem;
    gap: 0.18rem;
    border-color: rgba(83, 109, 154, 0.44);
    background:
        linear-gradient(180deg, rgba(26, 34, 56, 0.84), rgba(14, 22, 38, 0.93));
}

#recent-contact-quality-shell .rcq-table-hand-toggle .ps-percentile-season-btn {
    min-height: 32px;
    padding: 0.24rem 0.62rem;
    font-size: 0.69rem;
    letter-spacing: 0.04em;
}

#recent-contact-quality-shell .rcq-table-select {
    min-width: 182px;
    height: 2.5rem;
    padding: 0.5rem 2.15rem 0.5rem 0.74rem;
    border: 1px solid rgba(83, 109, 154, 0.5);
    border-radius: 12px;
    color: rgba(235, 242, 255, 0.97);
    font-size: 0.82rem;
    font-weight: 600;
    background-color: rgba(18, 26, 43, 0.92);
    background-image:
        linear-gradient(180deg, rgba(34, 49, 78, 0.35), rgba(13, 21, 36, 0.3)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.2L7 9l4-3.8' fill='none' stroke='%2398B4E2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 0.64rem center;
    background-size: auto, 14px;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

#recent-contact-quality-shell .rcq-table-select:hover {
    border-color: rgba(113, 142, 193, 0.68);
    background-color: rgba(22, 31, 52, 0.95);
}

#recent-contact-quality-shell .rcq-table-select:focus {
    outline: none;
    border-color: rgba(86, 144, 255, 0.86);
    box-shadow: 0 0 0 2px rgba(55, 122, 244, 0.22);
}

#recent-contact-quality-shell .rcq-chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.72rem 0.94rem;
    margin-bottom: 0.6rem;
}

#recent-contact-quality-shell .rcq-chart-control {
    display: grid;
    gap: 0.28rem;
}

#recent-contact-quality-shell .rcq-chart-control label {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.085em;
    text-transform: uppercase;
    color: rgba(142, 161, 186, 0.96);
    padding-left: 0.14rem;
}

#recent-contact-quality-shell .rcq-chart-select {
    min-width: 170px;
    height: 2.5rem;
    padding: 0.5rem 2.15rem 0.5rem 0.74rem;
    border: 1px solid rgba(83, 109, 154, 0.52);
    border-radius: 12px;
    color: rgba(235, 242, 255, 0.97);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background-color: rgba(18, 26, 43, 0.92);
    background-image:
        linear-gradient(180deg, rgba(34, 49, 78, 0.35), rgba(13, 21, 36, 0.3)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.2L7 9l4-3.8' fill='none' stroke='%2398B4E2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 0.64rem center;
    background-size: auto, 14px;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

#recent-contact-quality-shell .rcq-chart-select:hover {
    border-color: rgba(113, 142, 193, 0.68);
    background-color: rgba(22, 31, 52, 0.95);
}

#recent-contact-quality-shell .rcq-chart-select:focus {
    outline: none;
    border-color: rgba(86, 144, 255, 0.86);
    box-shadow: 0 0 0 2px rgba(55, 122, 244, 0.22);
}

#recent-contact-quality-shell .rcq-chart-hand-toggle {
    padding: 0.18rem;
    gap: 0.18rem;
    border-color: rgba(83, 109, 154, 0.46);
    background:
        linear-gradient(180deg, rgba(26, 34, 56, 0.88), rgba(14, 22, 38, 0.95));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 3px 10px rgba(0, 0, 0, 0.16);
}

#recent-contact-quality-shell .rcq-chart-hand-toggle .ps-percentile-season-btn {
    min-width: 48px;
    min-height: 32px;
    padding: 0.24rem 0.58rem;
    font-size: 0.69rem;
    letter-spacing: 0.045em;
}

#recent-contact-quality-shell .rcq-chart-meta {
    margin-left: auto;
    display: grid;
    justify-items: end;
    gap: 0.05rem;
    font-size: 0.75rem;
    color: var(--ps-text-muted, #7A8FA8);
    line-height: 1.3;
    padding-bottom: 0.2rem;
}

#recent-contact-quality-shell .rcq-event-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    padding: 0.18rem;
    border: 1px solid rgba(83, 109, 154, 0.46);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(26, 34, 56, 0.88), rgba(14, 22, 38, 0.95));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 3px 10px rgba(0, 0, 0, 0.16);
}

#recent-contact-quality-shell .rcq-events-row {
    display: flex;
    align-items: center;
    gap: 0.58rem;
}

#recent-contact-quality-shell .rcq-event-filter-btn {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ps-text-muted, #7A8FA8);
    border-radius: 999px;
    min-height: 32px;
    padding: 0.24rem 0.62rem;
    font-size: 0.69rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.04em;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

#recent-contact-quality-shell .rcq-event-filter-btn:hover {
    color: var(--ps-text-primary, #EEF2FF);
    border-color: rgba(96, 165, 250, 0.44);
    background: rgba(59, 130, 246, 0.12);
}

#recent-contact-quality-shell .rcq-event-filter-btn.is-active {
    color: #eef7ff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.32), rgba(37, 99, 235, 0.2));
    border-color: rgba(96, 165, 250, 0.62);
}

#recent-contact-quality-shell .rcq-chart-canvas-wrap {
    position: relative;
    border: 1px solid rgba(56, 139, 253, 0.2);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(8, 13, 26, 0.9), rgba(10, 15, 29, 0.95));
    padding: 0.35rem 0.35rem 0.2rem;
    overflow: hidden;
}

#recent-contact-quality-shell .rcq-chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 1rem;
    margin: 0 0 0.55rem;
    color: var(--ps-text-muted, #7A8FA8);
    font-size: 0.72rem;
    line-height: 1.2;
}

#recent-contact-quality-shell .rcq-chart-legend--inline {
    margin: 0;
    font-size: 0.8rem;
    gap: 0.5rem;
    white-space: nowrap;
}

#recent-contact-quality-shell .rcq-chart-legend--inline .rcq-legend-item {
    gap: 0.32rem;
}

#recent-contact-quality-shell .rcq-chart-legend--inline .rcq-legend-dot {
    width: 8px;
    height: 8px;
}

#recent-contact-quality-shell .rcq-chart-summary-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem 0.6rem;
    margin: 0;
    padding: 0.62rem 0.72rem 0.54rem;
    border-top: 1px solid rgba(78, 101, 142, 0.24);
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(10, 16, 30, 0.12) 0%, rgba(12, 19, 34, 0.74) 42%, rgba(10, 16, 30, 0.95) 100%);
    color: var(--ps-text-muted, #8da3c1);
    font-size: 0.76rem;
    line-height: 1.3;
    box-shadow: inset 0 10px 18px rgba(4, 10, 22, 0.33);
}

#recent-contact-quality-shell .rcq-chart-summary-item strong {
    color: #dfe9f9;
    font-weight: 700;
}

#recent-contact-quality-shell .rcq-chart-summary-sep {
    color: rgba(114, 136, 171, 0.55);
}

#recent-contact-quality-shell [data-rcq-chart-delta-value].is-up {
    color: #6be38f;
}

#recent-contact-quality-shell [data-rcq-chart-delta-value].is-down {
    color: #ff8a8a;
}

#recent-contact-quality-shell [data-rcq-chart-delta-value].is-neutral {
    color: #c7d2e8;
}

#recent-contact-quality-shell .rcq-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

#recent-contact-quality-shell .rcq-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
}

#recent-contact-quality-shell .rcq-legend-dot--hit {
    background: rgba(74, 222, 128, 0.95);
}

#recent-contact-quality-shell .rcq-legend-dot--out {
    background: rgba(248, 113, 113, 0.95);
}

#recent-contact-quality-shell .rcq-legend-dot--foul {
    background: rgba(251, 191, 36, 0.95);
}

#recent-contact-quality-shell .rcq-chart-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 260px;
}

#recent-contact-quality-shell .rcq-chart-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--ps-text-muted, #7A8FA8);
    font-size: 0.84rem;
    pointer-events: none;
}

#recent-contact-quality-shell .rcq-metric-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 0.14rem 0.42rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    line-height: 1.1;
    color: #ffffff !important;
}

#recent-contact-quality-shell .rcq-metric-pill--up-1 {
    color: #bbf7d0;
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(34, 197, 94, 0.26);
}

#recent-contact-quality-shell .rcq-metric-pill--up-2 {
    color: #86efac;
    background: rgba(22, 163, 74, 0.22);
    border-color: rgba(34, 197, 94, 0.4);
}

#recent-contact-quality-shell .rcq-metric-pill--up-3 {
    color: #4ade80;
    background: rgba(22, 163, 74, 0.3);
    border-color: rgba(34, 197, 94, 0.56);
}

#recent-contact-quality-shell .rcq-metric-pill--down-1 {
    color: #fecaca;
    background: rgba(220, 38, 38, 0.13);
    border-color: rgba(248, 113, 113, 0.24);
}

#recent-contact-quality-shell .rcq-metric-pill--down-2 {
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(248, 113, 113, 0.38);
}

#recent-contact-quality-shell .rcq-metric-pill--down-3 {
    color: #f87171;
    background: rgba(220, 38, 38, 0.29);
    border-color: rgba(248, 113, 113, 0.54);
}

#recent-contact-quality-shell .rcq-metric-pill--neutral-0 {
    color: #cbd5e1;
    background: rgba(100, 116, 139, 0.2);
    border-color: rgba(148, 163, 184, 0.3);
}

#recent-contact-quality-shell .rcq-detail-table {
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.845rem;
    border: none;
    border-radius: 0;
    overflow: visible;
}

#recent-contact-quality-shell .rcq-detail-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: transparent !important;
    border-bottom: none;
    color: var(--ps-text-muted, #7A8FA8);
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    padding-top: 0.54rem;
    padding-bottom: 0.54rem;
}

#recent-contact-quality-shell .rcq-detail-table td {
    padding-top: 0.58rem;
    padding-bottom: 0.58rem;
    border-bottom-color: var(--ps-border-subtle, #171C2E);
    background: transparent !important;
    color: var(--ps-text-primary, #EEF2FF);
}

#recent-contact-quality-shell .rcq-detail-table tbody tr,
#recent-contact-quality-shell .rcq-detail-table tbody tr:nth-child(even),
#recent-contact-quality-shell .rcq-detail-table tbody tr:nth-child(odd) {
    background: transparent !important;
}

#recent-contact-quality-shell .rcq-detail-table tbody tr:hover td {
    background: var(--ps-bg-card-hover, #161B29);
}

#recent-contact-quality-shell .rcq-detail-table tbody tr.rcq-detail-row--ab-start td {
    border-top: 1px solid var(--ps-border, #1E2540);
}

#recent-contact-quality-shell .rcq-detail-table tbody tr.rcq-detail-row--foul td {
    color: var(--ps-text-muted, #7A8FA8);
}

#recent-contact-quality-shell .rcq-detail-table tbody tr.rcq-detail-row--foul .rcq-detail-cell--date,
#recent-contact-quality-shell .rcq-detail-table tbody tr.rcq-detail-row--foul .rcq-detail-cell--num {
    color: var(--ps-text-muted, #7A8FA8);
}

#recent-contact-quality-shell .rcq-detail-table tbody tr.rcq-detail-row--foul:hover td {
    background: rgba(148, 163, 184, 0.08);
}

#recent-contact-quality-shell .rcq-detail-cell--date {
    color: var(--ps-text-primary, #EEF2FF);
    font-weight: 600;
}

#recent-contact-quality-shell .rcq-detail-cell--ab {
    text-align: center;
}

#recent-contact-quality-shell .rcq-detail-cell--num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    color: var(--ps-text-primary, #EEF2FF);
    font-weight: 500;
}

#recent-contact-quality-shell .rcq-detail-event-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.44rem;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1.1;
}

#recent-contact-quality-shell .rcq-detail-event-pill--hit {
    color: #ffffff;
    background: rgba(22, 163, 74, 0.22);
    border: 1px solid rgba(74, 222, 128, 0.45);
}

@media (max-width: 860px) {
    #recent-contact-quality-shell .rcq-chart-meta {
        margin-left: 0;
        justify-items: start;
    }

    #recent-contact-quality-shell .rcq-table-controls {
        justify-content: flex-start;
    }

    #recent-contact-quality-shell .rcq-table-header {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    #recent-contact-quality-shell .rcq-chart-select {
        min-width: 148px;
    }

    #recent-contact-quality-shell .rcq-table-select {
        min-width: 148px;
    }

    #recent-contact-quality-shell .rcq-chart-summary-strip {
        justify-content: flex-start;
    }

    #recent-contact-quality-shell .rcq-events-row {
        flex-wrap: wrap;
        row-gap: 0.42rem;
    }

    #recent-contact-quality-shell .rcq-chart-legend--inline {
        white-space: normal;
    }
}


.ps-table tbody tr:hover,
.performance-table tbody tr:hover {
    background-color: #1C2128;
    /* Slightly lighter hover for rows */
}


/* Prop Performance History Filters */
.ps-prop-selector-container {
    gap: 0.75rem;
    /* Tighter gap for controls */
}

.ps-prop-selector__control label {
    font-size: 0.8rem;
    /* Smaller labels */
}

.ps-prop-selector__select {
    padding: 0.3rem 0.5rem;
    /* More compact select */
    font-size: 0.8rem;
}

#threshold-slider {
    height: 3px;
    /* Slimmer slider track */
}

#threshold-slider::-webkit-slider-thumb {
    width: 14px;
    /* Smaller thumb */
    height: 14px;
    margin-top: -5.5px;
    /* Adjust thumb alignment */
}

#threshold-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
}

#threshold-value {
    font-size: 0.85rem;
    /* Smaller value display */
    padding: 0.1em 0.35em;
}

/* Game Logs Table — alignment only; sizing/color from .recent-performance-container .performance-table */
#game-log-section-shell {
    width: 100%;
    min-width: 0;
    align-self: stretch;
    flex: 1 1 auto;
}

.ps-collapsible-logs {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    align-self: stretch;
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%),
        var(--ps-bg-card, #111723);
    box-shadow: 0 12px 30px rgba(5, 9, 18, 0.32);
    margin-bottom: 1rem;
    overflow: hidden;
}

.ps-collapsible-logs__summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.92rem 1.05rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.93rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ps-text-primary, #EEF2FF);
    background: rgba(15, 23, 36, 0.6);
    border-bottom: 1px solid transparent;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.ps-collapsible-logs__summary::-webkit-details-marker {
    display: none;
}

.ps-collapsible-logs__summary::after {
    content: '▾';
    font-size: 0.9rem;
    color: var(--ps-text-muted, #7A8FA8);
    transition: transform 180ms ease, color 160ms ease;
}

.ps-collapsible-logs[open] .ps-collapsible-logs__summary {
    background: rgba(17, 26, 40, 0.85);
    border-bottom-color: var(--ps-border, #1E2540);
}

.ps-collapsible-logs[open] .ps-collapsible-logs__summary::after {
    transform: rotate(180deg);
    color: var(--ps-text-secondary, #C8D6E8);
}

.ps-collapsible-logs .ps-game-log-section {
    margin-top: 0;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding-top: 0.9rem;
}

.ps-game-log__hint {
    margin: -0.1rem 0 0.9rem;
    color: var(--ps-text-muted, #7A8FA8);
    font-size: 0.84rem;
}

/* Game logs should keep the left title accent but not the top card accent strip */
.ps-game-log-section::before {
    display: none;
}

/* Ensure Game Logs card/table surfaces match section-card theming */
.ps-game-log-section .performance-table thead tr {
    border-bottom: 1px solid var(--ps-border, #1E2540);
}

.ps-game-log-section .performance-table th {
    background: transparent;
    border-bottom: none;
    color: var(--ps-text-muted, #7A8FA8);
}

.ps-game-log-section .performance-table td {
    color: var(--ps-text-primary, #EEF2FF);
    border-bottom: 1px solid var(--ps-border-subtle, #171C2E);
}

.ps-game-log-section .performance-table tbody tr:last-child td {
    border-bottom: none;
}

.ps-game-log-section .performance-table tbody tr:hover {
    background-color: var(--ps-bg-card-hover, #161B29);
}

.ps-game-log__table th {
    text-align: center;
}

.ps-game-log__table td {
    text-align: center;
}

.ps-game-log__table td:first-child {
    text-align: left;
}

/* Load More Button - ensure it stands out but fits the theme */
.load-more-btn {
    background: transparent;
    border: 1px solid var(--ps-border, #1E2540);
    color: var(--ps-text-secondary, #C8D6E8);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
        color 150ms cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.04em;
}

.load-more-btn:hover {
    background-color: var(--ps-accent, #3B82F6);
    border-color: var(--ps-accent, #3B82F6);
    color: #fff;
}


/* Alternate overlay using pseudo-element */
.premium-auto-overlay::after {
    content: "Premium Feature";
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    z-index: 20;
    pointer-events: none;
}

@media (max-width: 768px) {
    main {
        padding: 1rem 10px;
    }

    .ps-breakdown-summary {
        grid-template-columns: 1fr;
    }

    .ps-hm-stat-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ps-content-block,
    .ps-overview-container,
    .ps-game-card {
        padding: 1.25rem;
    }

    .recent-performance-container {
        padding: 1.1rem 1rem;
    }

    .ps-player-header__name,
    .ps-player-header .pitcher-name {
        font-size: 1.6rem;
    }

    .ps-player-header__meta {
        font-size: 0.8rem;
    }

    .ps-bvp-title {
        font-size: 1.6rem;
    }

    .ps-bvp-table th,
    .ps-bvp-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    main {
        padding: 0.75rem 4px;
    }

    .ps-player-header__name,
    .ps-player-header .pitcher-name {
        font-size: 1.2rem;
    }

    .ps-player-header__meta {
        font-size: 0.7rem;
    }

    .ps-content-block,
    .ps-overview-container,
    .ps-game-card {
        padding: 1rem;
    }

    .recent-performance-container {
        padding: 1rem;
    }

    .ps-content-block__title {
        font-size: 1rem;
    }

    .ps-table th,
    .ps-table td {
        padding: 0.35rem 0.4rem;
        font-size: 0.7rem;
    }

    .ps-prop-selector__control label,
    .ps-prop-selector__select,
    #threshold-value {
        font-size: 0.75rem;
    }

    .circle-graph-item {
        width: 60px;
    }

    .circle-graph-svg-wrap {
        width: 45px;
        height: 45px;
    }

    .circle-percent {
        font-size: 0.75rem;
    }

    .circle-graph-label {
        font-size: 0.65rem;
    }

    .ps-chart-container {
        height: 180px;
    }

    .ps-initial-view .ps-initial-view__title h1 {
        font-size: 1.8rem;
    }

    .ps-initial-view .ps-initial-view__title p {
        font-size: 0.9rem;
    }

    .ps-initial-search__form-container .form-control.typeahead.player-search-input {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }

    .ps-bvp-table th,
    .ps-bvp-table td {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* === LIGHT MODE OVERRIDES (MLB PLAYER SEARCH) === */
html[data-theme='light'] body {
    background: #eef3fb;
    color: #0f172a;
}

html[data-theme='light'] .background-glow,
html[data-theme='light'] .particle-container {
    opacity: 0.2;
}

html[data-theme='light'] .ps-initial-view {
    background: linear-gradient(180deg, #f7f9fd 0%, #eef3fb 100%);
}

html[data-theme='light'] .ps-initial-view .ps-initial-view__title h1 {
    color: #0f172a;
}

html[data-theme='light'] .ps-initial-view .ps-initial-view__title p {
    color: #475569;
}

html[data-theme='light'] .ps-initial-search__form-container {
    box-shadow: none;
}

html[data-theme='light'] .ps-initial-search__form-container .form-control.typeahead.player-search-input {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

html[data-theme='light'] .ps-initial-search__form-container .tt-input {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

html[data-theme='light'] .ps-initial-search__form-container .form-control.typeahead.player-search-input:focus {
    border-color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.18);
}

html[data-theme='light'] .ps-initial-search__form-container .tt-input:focus {
    border-color: #2563eb !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.18) !important;
}

html[data-theme='light'] .ps-initial-search__form-container .form-control.typeahead.player-search-input::placeholder {
    color: #64748b;
}

html[data-theme='light'] .tt-hint {
    color: #94a3b8;
}

html[data-theme='light'] .ps-bvp-title,
html[data-theme='light'] .ps-bvp-section h3,
html[data-theme='light'] .ps-content-block__title,
html[data-theme='light'] .ps-player-header__name,
html[data-theme='light'] .ps-player-header .pitcher-name,
html[data-theme='light'] .todays-game__title,
html[data-theme='light'] .todays-game__card-title,
html[data-theme='light'] .ps-game-log__title {
    color: #0f172a;
}

html[data-theme='light'] .ps-player-header,
html[data-theme='light'] .ps-content-block,
html[data-theme='light'] .ps-season-stats-card,
html[data-theme='light'] .ps-filter-box,
html[data-theme='light'] .ps-chart-box,
html[data-theme='light'] .ps-bvp-section .ps-table-wrapper,
html[data-theme='light'] .todays-game__bullpen-card .todays-game__card-body {
    background-color: #ffffff;
    border-color: #dde3ef;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

/* .todays-game__card uses background: linear-gradient(...) — must use `background` shorthand
   (not background-color) to reset the background-image and clear the dark gradient */
html[data-theme='light'] .todays-game__card {
    background: #ffffff;
    border-color: #dde3ef;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .todays-game {
    background-color: #ffffff;
    border-color: #dde3ef;
}

html[data-theme='light'] .todays-game__card-header {
    background: rgba(241, 245, 253, 0.75);
    border-bottom-color: #e2e8f0;
}

/* Shared light-mode player header rules moved to static/css/mlb/player_page_shared.css */

html[data-theme='light'] .ps-content-block__title {
    border-left-color: #2563eb;
}

html[data-theme='light'] .ps-season-stats-card .recent-performance-title {
    color: #64748b;
}

html[data-theme='light'] .ps-season-stats-card .recent-performance-title::before {
    background: #2563eb;
}

html[data-theme='light'] .ps-season-stats-card .performance-table thead tr {
    border-bottom-color: #dde3ef;
}

html[data-theme='light'] .ps-season-stats-card .performance-table tbody tr {
    border-bottom-color: #e2e8f0;
}

html[data-theme='light'] .col-key {
    border-left-color: rgba(37, 99, 235, 0.25) !important;
}

/* =======================================================
   CUSTOM SPLITS — Redesign
   ======================================================= */

.cs-section {
    background: var(--ps-bg-card, #111520);
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: visible;
}

.cs-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ps-accent, #4582F0) 0%, transparent 60%);
    opacity: 0.5;
}

.cs-header {
    padding: 1.25rem 1.5rem 0.9rem;
}

.cs-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ps-text-2, #888FA0);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'DM Sans', 'Outfit', sans-serif;
}

.cs-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--ps-accent, #4582F0);
    border-radius: 2px;
    flex-shrink: 0;
}

.cs-subtitle {
    margin: 0.45rem 0 0;
    color: var(--ps-text-2, #7A8FA8);
    font-size: 0.82rem;
    line-height: 1.45;
    max-width: 54rem;
}

.cs-builder {
    padding: 0 1.5rem 1rem;
    display: grid;
    gap: 0.6rem;
}

.cs-filter-bar--builder {
    gap: 8px;
}

.cs-filter-bar--builder .cs-filter-group {
    min-width: 108px;
    flex: 1 1 108px;
}

.cs-filter-bar--builder .cs-multi-select {
    width: 100%;
}

.cs-filter-bar--builder .cs-multi-select__trigger,
.cs-filter-bar--builder .cs-select-compact {
    width: 100%;
    min-width: 0;
    padding-left: 0.55rem;
    padding-right: 1.45rem;
}

.cs-action-row--builder {
    margin-left: 0;
}

.cs-action-row--builder .ps-btn {
    min-width: 112px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.cs-filter-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
}

.cs-action-inline {
    display: flex;
    align-items: flex-end;
    padding-top: 1.18rem;
}

.cs-filter-card {
    background: rgba(10, 14, 25, 0.42);
    border: 1px solid rgba(30, 37, 64, 0.8);
    border-radius: 10px;
    padding: 0.48rem 0.58rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: fit-content;
}

.cs-filter-card--wide {
    /* naturally sized by content */
}

.cs-filter-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ps-text-2, #7A8FA8);
    margin: 0;
    font-family: 'DM Sans', 'Outfit', sans-serif;
}

.cs-multi-select {
    position: relative;
    width: fit-content;
}

.cs-multi-select.is-open {
    z-index: 30;
}

.cs-multi-select__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    cursor: pointer;
}

.cs-multi-select__menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 31;
    z-index: 12;
    min-width: 100%;
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid rgba(30, 37, 64, 0.92);
    background: rgba(10, 15, 25, 0.98);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.34);
    display: grid;
    gap: 0.22rem;
}

.cs-multi-select__option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
    color: #C8D6E8;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.cs-multi-select__option:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #EEF2FF;
}

.cs-multi-select__option.is-selected {
    background: rgba(69, 130, 240, 0.1);
    color: #DCE9FF;
}

.cs-multi-select__option input {
    margin: 0;
    accent-color: #4582F0;
}

.cs-multi-select__option-name {
    white-space: nowrap;
}

.cs-seg-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.cs-seg-group .ps-pill-toggle {
    margin: 0;
}


.cs-seg-group .ps-pill-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cs-seg-group .ps-pill-label {
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #94A3B8;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.cs-seg-group .ps-pill-label:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #D4DCEC;
}

.cs-seg-group .ps-pill-input:checked + .ps-pill-label {
    background: rgba(69, 130, 240, 0.14);
    border-color: rgba(69, 130, 240, 0.28);
    color: #CFE0FF;
}

.cs-select {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    min-width: 6.45rem;
    padding: 0.28rem 1.7rem 0.28rem 0.62rem;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #D4DCEC;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%237A8FA8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.58rem center;
    background-size: 0.85rem;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.cs-select:focus {
    border-color: rgba(69, 130, 240, 0.32);
    box-shadow: 0 0 0 3px rgba(69, 130, 240, 0.12);
}

.cs-select option {
    background: #0E1219;
    color: #E2E8F0;
}

.cs-builder-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cs-run-btn {
    min-height: 2.2rem;
    padding: 0.52rem 0.9rem;
    border-radius: 999px;
    font-family: 'DM Sans', 'Outfit', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    border: none;
    background: #4582F0;
    color: #ffffff;
    min-width: 7.15rem;
    box-shadow: 0 6px 16px rgba(69, 130, 240, 0.2);
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 120ms ease, box-shadow 140ms ease;
}

.cs-run-btn:hover:not(:disabled) {
    background: #5E9BFF;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(69, 130, 240, 0.26);
}

.cs-run-btn:disabled {
    opacity: 0.72;
    cursor: wait;
}

.cs-reset-link {
    border: none;
    background: transparent;
    padding: 0;
    color: #8EA3C4;
    font-family: 'DM Sans', 'Outfit', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: color 140ms ease, opacity 140ms ease;
}

.cs-reset-link:hover:not(:disabled) {
    color: #EEF2FF;
}

.cs-reset-link:disabled {
    opacity: 0.6;
    cursor: wait;
}

.cs-status-msg {
    max-width: 28rem;
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
}

.cs-status-msg--warning {
    color: #FBBF24;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.cs-status-msg--error {
    color: #FCA5A5;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.cs-results {
    border-top: 1px solid rgba(30, 37, 64, 0.75);
    padding: 0.8rem 1.5rem 1rem;
    display: grid;
    gap: 0.7rem;
    transition: opacity 0.18s ease;
}

.cs-results.is-loading {
    opacity: 0.72;
}

.cs-summary-card {
    border: 1px solid rgba(30, 37, 64, 0.85);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(13, 19, 31, 0.92) 0%, rgba(10, 15, 25, 0.92) 100%);
    padding: 0.75rem 0.8rem;
    display: grid;
    gap: 0.65rem;
}

.cs-summary-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.cs-summary-kicker {
    display: inline-block;
    font-size: 0.57rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7A8FA8;
    margin-bottom: 0.18rem;
}

.cs-summary-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #EEF2FF;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.cs-summary-subtitle {
    margin: 0.18rem 0 0;
    color: #9AA3B8;
    font-size: 0.74rem;
    line-height: 1.35;
}

.cs-summary-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, auto));
    gap: 0.4rem;
}

.cs-summary-meta-stat {
    min-width: 4.1rem;
    border: 1px solid rgba(30, 37, 64, 0.75);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.38rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    align-items: flex-start;
}

.cs-summary-meta-label {
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7A8FA8;
}

.cs-summary-meta-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: #EEF2FF;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.cs-summary-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.42rem;
}

.cs-summary-stat {
    border: 1px solid rgba(30, 37, 64, 0.75);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.45rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.14rem;
    min-height: 3.1rem;
    justify-content: center;
}

.cs-summary-value {
    font-size: 0.98rem;
    font-weight: 700;
    color: #EEF2FF;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.cs-summary-label {
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #7A8FA8;
}

.cs-low-sample {
    color: #FBBF24;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font-size: 0.76rem;
    font-weight: 600;
}

.cs-summary-note {
    border-radius: 8px;
    padding: 0.48rem 0.6rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(30, 37, 64, 0.75);
    color: #9AA3B8;
    font-size: 0.71rem;
    line-height: 1.35;
}

.cs-summary-note--muted {
    color: #D4DCEC;
}

.cs-summary-note--error {
    color: #FCA5A5;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.18);
}

.ps-async-section { transition: opacity 0.18s ease; }
.ps-async-section.is-loading { opacity: 0.68; }
.ps-btn.is-loading { cursor: wait; }

@media (max-width: 900px) {
    .cs-filter-card,
    .cs-filter-card--wide {
        flex: 1 1 calc(50% - 0.5rem);
        width: auto;
    }
}

@media (max-width: 760px) {
    .cs-header,
    .cs-builder,
    .cs-results {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .cs-filter-card,
    .cs-filter-card--wide {
        flex: 1 1 100%;
        width: auto;
    }

    .cs-summary-head {
        flex-direction: column;
    }

    .cs-action-inline {
        width: 100%;
        padding-top: 0;
    }

    .cs-builder-meta {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .cs-run-btn,
    .cs-action-inline .cs-run-btn {
        width: 100%;
        justify-content: center;
    }

    .cs-summary-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

html[data-theme='light'] .cs-section {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .cs-title,
html[data-theme='light'] .cs-filter-label,
html[data-theme='light'] .cs-summary-kicker,
html[data-theme='light'] .cs-summary-label,
html[data-theme='light'] .cs-summary-meta-label {
    color: #64748b;
}

html[data-theme='light'] .cs-title::before {
    background: #2563eb;
}

html[data-theme='light'] .cs-subtitle,
html[data-theme='light'] .cs-summary-note {
    color: #64748b;
}

html[data-theme='light'] .cs-builder,
html[data-theme='light'] .cs-results {
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .cs-filter-card,
html[data-theme='light'] .cs-summary-card,
html[data-theme='light'] .cs-summary-stat,
html[data-theme='light'] .cs-summary-meta-stat,
html[data-theme='light'] .cs-summary-note {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .cs-multi-select__menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

html[data-theme='light'] .cs-multi-select__option {
    color: #334155;
}

html[data-theme='light'] .cs-multi-select__option:hover {
    background: rgba(15, 23, 42, 0.04);
    color: #0f172a;
}

html[data-theme='light'] .cs-multi-select__option.is-selected {
    background: rgba(37, 99, 235, 0.1);
    color: #1D4ED8;
}

html[data-theme='light'] .cs-seg-group .ps-pill-label {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
    color: #475569;
}

html[data-theme='light'] .cs-seg-group .ps-pill-label:hover {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

html[data-theme='light'] .cs-seg-group .ps-pill-input:checked + .ps-pill-label {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
    color: #1D4ED8;
}

html[data-theme='light'] .cs-select {
    background-color: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.09);
    color: #0f172a;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

html[data-theme='light'] .cs-select option {
    background: #ffffff;
    color: #0f172a;
}

html[data-theme='light'] .cs-summary-title,
html[data-theme='light'] .cs-summary-value,
html[data-theme='light'] .cs-summary-meta-value {
    color: #0f172a;
}

html[data-theme='light'] .cs-run-btn {
    background: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

html[data-theme='light'] .cs-run-btn:hover:not(:disabled) {
    background: #1D4ED8;
}

html[data-theme='light'] .cs-reset-link {
    color: #475569;
}

html[data-theme='light'] .cs-reset-link:hover:not(:disabled) {
    color: #1D4ED8;
}

html[data-theme='light'] .cs-status-msg--warning,
html[data-theme='light'] .cs-low-sample {
    color: #92400E;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.18);
}

html[data-theme='light'] .cs-status-msg--error {
    color: #991B1B;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.16);
}

html[data-theme='light'] .cs-summary-note--error {
    color: #991B1B;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.16);
}

html[data-theme='light'] .stat-good {
    color: #16a34a !important;
}

html[data-theme='light'] .stat-bad {
    color: #dc2626 !important;
}

/* =======================================================
   HITTER VS PITCHER PROFILES — Filter Bar
   These classes were referenced in HTML but never defined.
   ======================================================= */

.cs-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(16, 22, 38, 0.94) 0%, rgba(12, 17, 30, 0.96) 100%);
    border: 1px solid rgba(69, 130, 240, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    margin-bottom: 14px;
}

.cs-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cs-filter-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #7E8699;
    white-space: nowrap;
}

.cs-select-compact {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(27, 34, 53, 0.92);
    border: 1px solid rgba(69, 130, 240, 0.14);
    border-radius: 7px;
    color: #C8D2E8;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    padding: 0.32rem 1.6rem 0.32rem 0.6rem;
    cursor: pointer;
    outline: none;
    min-width: 110px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235A6378' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 7px center;
    background-size: 10px;
    transition: border-color 0.15s ease;
}

.cs-select-compact:focus {
    border-color: rgba(69, 130, 240, 0.4);
    outline: none;
    box-shadow: 0 0 0 2px rgba(69, 130, 240, 0.07);
}

.cs-select-compact option {
    background: #0E1219;
    color: #C8D2E8;
}

.cs-action-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-left: 4px;
}

/* Light mode */
html[data-theme='light'] .cs-filter-bar {
    background: linear-gradient(180deg, rgba(241, 245, 253, 0.9) 0%, rgba(233, 240, 252, 0.96) 100%);
    border-color: rgba(37, 99, 235, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

html[data-theme='light'] .cs-filter-label {
    color: #64748b;
}

html[data-theme='light'] .cs-select-compact {
    background-color: rgba(255, 255, 255, 0.88);
    border-color: rgba(37, 99, 235, 0.16);
    color: #334155;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

html[data-theme='light'] .cs-select-compact option {
    background: #ffffff;
    color: #0f172a;
}

html[data-theme='light'] .cs-select-compact:focus {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.07);
}

/* Responsive: filter groups stack 2-per-row on small screens */
@media (max-width: 700px) {
    .cs-filter-bar {
        gap: 8px;
        padding: 10px;
    }
    .cs-filter-group {
        flex: 1 1 calc(50% - 8px);
        min-width: 120px;
    }
    .cs-action-row {
        flex: 1 1 100%;
        margin-left: 0;
    }
    .cs-action-row .ps-btn {
        width: 100%;
    }
    .cs-filter-bar--builder .cs-filter-group {
        min-width: 120px;
    }
}

html[data-theme='light'] .ps-player-header__meta,
html[data-theme='light'] .ps-player-header__bio dt,
html[data-theme='light'] .ps-player-header__l5-label,
html[data-theme='light'] .ps-content-block__description,
html[data-theme='light'] .todays-game__subtitle,
html[data-theme='light'] .todays-game__stats-list li .label,
html[data-theme='light'] .todays-game__sub-title {
    color: #475569;
}

html[data-theme='light'] .ps-player-header__bio dd,
html[data-theme='light'] .ps-player-header__l5-stat-item,
html[data-theme='light'] .todays-game__pitcher-name,
html[data-theme='light'] .todays-game__stats-list li {
    color: #1e293b;
}

html[data-theme='light'] .todays-game__stats-list li {
    border-bottom-color: rgba(148, 163, 184, 0.28);
}

html[data-theme='light'] .todays-game__stats-list--splits li.highlight {
    background-color: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}

html[data-theme='light'] .ps-table-wrapper::-webkit-scrollbar,
html[data-theme='light'] .todays-game__bullpen-table-wrapper::-webkit-scrollbar {
    background-color: #f1f5f9;
}

html[data-theme='light'] .ps-table-wrapper::-webkit-scrollbar-thumb,
html[data-theme='light'] .todays-game__bullpen-table-wrapper::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
}

html[data-theme='light'] .ps-table th,
html[data-theme='light'] .performance-table th,
html[data-theme='light'] .todays-game__bullpen-table th {
    color: #334155;
    background-color: #f1f5f9;
    border-bottom-color: #cbd5e1;
}

html[data-theme='light'] .ps-table td,
html[data-theme='light'] .performance-table td,
html[data-theme='light'] .todays-game__bullpen-table td {
    color: #1e293b;
    border-bottom-color: #e2e8f0;
}

html[data-theme='light'] .ps-table td:first-child,
html[data-theme='light'] .performance-table td:first-child {
    color: #0f172a;
}

html[data-theme='light'] .ps-table tbody tr:hover,
html[data-theme='light'] .performance-table tbody tr:hover,
html[data-theme='light'] .todays-game__bullpen-table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.06);
}

html[data-theme='light'] .ps-prop-selector__control label,
html[data-theme='light'] #hit-rate .label,
html[data-theme='light'] #prop-line-box .label,
html[data-theme='light'] #opp-rank-box .label {
    color: #94a3b8;
}

html[data-theme='light'] .ps-prop-selector__select,
html[data-theme='light'] .prop-lab-trending #trending-prop-select,
html[data-theme='light'] #rank-split.form-select,
html[data-theme='light'] #rank-range.form-select {
    background-color: #ffffff;
    border-color: #dde3ef;
    color: #1e293b;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

html[data-theme='light'] .ps-prop-selector__select:focus,
html[data-theme='light'] .prop-lab-trending #trending-prop-select:focus,
html[data-theme='light'] #rank-split.form-select:focus,
html[data-theme='light'] #rank-range.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

html[data-theme='light'] #threshold-slider::-webkit-slider-runnable-track {
    background: rgba(15, 23, 42, 0.15);
}

html[data-theme='light'] #threshold-slider::-moz-range-track {
    background: rgba(15, 23, 42, 0.15);
}

html[data-theme='light'] #threshold-slider::-webkit-slider-thumb,
html[data-theme='light'] #threshold-slider::-moz-range-thumb {
    border-color: #ffffff;
}

html[data-theme='light'] #threshold-value {
    background-color: #2563eb;
    color: #ffffff;
}

html[data-theme='light'] #prop-player-name.card-title {
    color: #0f172a;
}

html[data-theme='light'] #prop-history-title.prop-history-title {
    color: #475569;
}

html[data-theme='light'] #hit-rate.hit-rate-box,
html[data-theme='light'] #prop-line-box.prop-line-box,
html[data-theme='light'] #opp-rank-box.rank-box {
    background: #f8fafc;
    border-color: #cbd5e1;
}

html[data-theme='light'] #hit-rate .value,
html[data-theme='light'] #prop-line-box .value,
html[data-theme='light'] #opp-rank-box .value {
    color: #0f172a;
}

html[data-theme='light'] .highlight-col {
    background: rgba(37, 99, 235, 0.12);
}

html[data-theme='light'] #game-range-summary.ps-game-range-summary {
    background: #ffffff;
    border-top-color: #2563eb;
    color: #334155;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.16);
}

html[data-theme='light'] #game-range-summary .summary-title,
html[data-theme='light'] #game-range-summary table th {
    color: #0f172a;
}

html[data-theme='light'] #game-range-summary table th {
    background-color: #f1f5f9;
}

html[data-theme='light'] #game-range-summary .clear-btn {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
}

html[data-theme='light'] #game-range-summary .clear-btn:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

html[data-theme='light'] .ps-alert,
html[data-theme='light'] .alert.alert-warning.ps-alert,
html[data-theme='light'] .alert.alert-info.ps-alert {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

html[data-theme='light'] .load-more-btn,
html[data-theme='light'] .view-btn {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

html[data-theme='light'] .load-more-btn:hover,
html[data-theme='light'] .view-btn:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

/* ============================================================
   INNING BREAKDOWN HEATMAP STRIP
   ============================================================ */
.ps-heatmap-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    position: relative;
    align-items: flex-start;
}

.ps-heatmap-strip {
    display: flex;
    width: 100%;
    min-height: 88px;
    padding: 0;
    gap: 0.55rem;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    border: none;
}

.ps-breakdown-toggle {
    align-self: flex-start;
    margin-top: -0.25rem;
    padding: 0.58rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(122, 143, 168, 0.24);
    color: var(--ps-text-1);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ps-breakdown-toggle:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.38);
    color: #fff;
}

.ps-heatmap-segment {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    position: relative;
    min-width: 0;
    padding: 0;
    border-right: none;
    border-radius: 14px;
    overflow: hidden;
    transition: filter 0.22s ease, opacity 0.22s ease;
    --ops-scale: clamp(0, calc((var(--ops) - 0.590) / 0.250), 1);
    background: rgb(
        calc(var(--ps-heatmap-bad-r) + (var(--ps-heatmap-good-r) - var(--ps-heatmap-bad-r)) * var(--ops-scale))
        calc(var(--ps-heatmap-bad-g) + (var(--ps-heatmap-good-g) - var(--ps-heatmap-bad-g)) * var(--ops-scale))
        calc(var(--ps-heatmap-bad-b) + (var(--ps-heatmap-good-b) - var(--ps-heatmap-bad-b)) * var(--ops-scale))
    );
}

.ps-heatmap-segment--button {
    border-top: none;
    border-left: none;
    border-bottom: none;
    cursor: pointer;
    appearance: none;
    text-align: inherit;
}

.ps-heatmap-segment-content {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.2rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.ps-heatmap-segment:last-child {
    border-right: none;
}

.ps-heatmap-segment.is-low-sample {
    background: rgba(99, 107, 118, 0.42);
    opacity: 0.7;
}

.ps-heatmap-segment:hover,
.ps-heatmap-segment.is-hovered {
    filter: saturate(1.1) brightness(1.1);
}

.ps-heatmap-segment--button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: -3px;
}

.ps-heatmap-segment.is-selected {
    filter: saturate(1.16) brightness(1.08);
}

.ps-heatmap-segment.is-selected .ps-heatmap-segment-content {
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ps-heatmap-segment-label {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, color 0.2s ease;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.ps-heatmap-segment-ops {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    min-width: 0;
    padding: 0.24rem 0.46rem 0.22rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.56rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.76);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transition: transform 0.2s ease, color 0.2s ease;
    line-height: 1.05;
}

.ps-heatmap-segment-ops small {
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    opacity: 0.7;
}

.ps-heatmap-segment-ops strong {
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
}

.ps-heatmap-segment:hover .ps-heatmap-segment-label,
.ps-heatmap-segment.is-hovered .ps-heatmap-segment-label,
.ps-heatmap-segment:hover .ps-heatmap-segment-ops,
.ps-heatmap-segment.is-hovered .ps-heatmap-segment-ops {
    color: #fff;
}

.ps-inning-detail-panel {
    width: 100%;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(14, 16, 24, 0.98), rgba(10, 14, 24, 0.96));
    border: 1px solid rgba(122, 143, 168, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 14px 28px rgba(2, 6, 23, 0.24);
}

.ps-inning-detail-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.ps-inning-detail-eyebrow {
    display: block;
    margin-bottom: 0.2rem;
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ps-text-2);
}

.ps-inning-detail-title {
    margin: 0;
    font-family: 'Syne', 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ps-text-1);
}

.ps-inning-detail-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.55rem;
}

.ps-inning-detail-stat {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    padding: 0.65rem 0.68rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ps-inning-detail-stat-label {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ps-text-2);
}

.ps-inning-detail-stat strong {
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--ps-text-1);
}

/* Detail Card (Tooltip/Stats block below the strip) */
/* Light Mode Overrides for Heatmap Setup */
html[data-theme='light'] .ps-heatmap-strip {
    background: transparent;
    border: none;
    box-shadow: none;
}

html[data-theme='light'] .ps-breakdown-toggle {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(148, 163, 184, 0.38);
    color: #1e293b;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 8px 18px rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .ps-breakdown-toggle:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.32);
    color: #1d4ed8;
}

html[data-theme='light'] .ps-heatmap-segment {
    border-right-color: rgba(255, 255, 255, 0.36);
}

html[data-theme='light'] .ps-heatmap-segment-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.12));
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 8px 18px rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .ps-heatmap-segment.is-low-sample {
    background: rgba(148, 163, 184, 0.5);
}

html[data-theme='light'] .ps-heatmap-segment:hover,
html[data-theme='light'] .ps-heatmap-segment.is-hovered {
    filter: saturate(1.1) brightness(1.05);
}

html[data-theme='light'] .ps-heatmap-segment--button:focus-visible {
    outline-color: rgba(29, 78, 216, 0.7);
}

html[data-theme='light'] .ps-heatmap-segment.is-selected .ps-heatmap-segment-content {
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 0 0 1px rgba(29, 78, 216, 0.08);
}

html[data-theme='light'] .ps-heatmap-segment-label,
html[data-theme='light'] .ps-heatmap-segment-ops {
    text-shadow: none;
    color: #fff;
}

html[data-theme='light'] .ps-heatmap-segment-ops {
    background: rgba(15, 23, 42, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
}

html[data-theme='light'] .ps-inning-detail-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.94));
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        0 12px 24px rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .ps-inning-detail-title,
html[data-theme='light'] .ps-inning-detail-stat strong {
    color: #0f172a;
}

html[data-theme='light'] .ps-inning-detail-eyebrow,
html[data-theme='light'] .ps-inning-detail-stat-label {
    color: #64748b;
}

html[data-theme='light'] .ps-inning-detail-stat {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(148, 163, 184, 0.18);
}

@media (max-width: 980px) {
    .ps-inning-detail-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ps-inning-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ps-inning-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Toggle for By Inning / By Group */
.ps-inning-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.ps-inning-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.25rem;
    border-radius: 20px;
    border: 1px solid var(--ps-border-s);
}

.ps-inning-toggle-btn {
    background: transparent;
    border: none;
    color: var(--ps-text-3);
    font-family: 'DM Sans', 'Manrope', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 1.25rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ps-inning-toggle-btn.is-active {
    background: var(--ps-elevated);
    color: var(--ps-text-1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

html[data-theme='light'] .ps-inning-toggle {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .ps-inning-toggle-btn {
    color: #64748b;
}

html[data-theme='light'] .ps-inning-toggle-btn.is-active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

/* Shared MLB player page jump-nav shell moved to static/css/mlb/player_page_shared.css */

/* Mobile: jump nav graceful scroll (superseded by end-of-file block) */

/* ================================================================
   RESPONSIVE OVERRIDES — END OF FILE
   Base header/component styles appear at lines 4195+, so all
   responsive rules MUST come after them in the cascade to take effect.
   ================================================================ */

/* ── Header: Tablet (769–992px) ───────────────────────────── */
@media (max-width: 992px) {
    .ps-header-hero-stats {
        padding-left: 1.25rem;
        border-left: 1px solid rgba(48,54,61,0.5);
    }
    .ps-hero-stat {
        padding: 0.5rem 1rem;
    }
}

/* ── Header: Mobile-Tablet (≤ 768px) ──────────────────────── */
@media (max-width: 768px) {
    .ps-player-header {
        border-radius: 0;
        margin-bottom: 0;
    }
    .ps-header-identity {
        padding: 1rem 1.25rem;
        gap: 0;
        align-items: flex-start;
    }
    .ps-header-photo {
        width: 80px;
        height: 108px;
        margin-right: 1rem;
    }
    /* Hide season hero stats (AVG/HR/RBI/OPS) — shown in Season Stats below */
    .ps-header-hero-stats {
        display: none;
    }
    .ps-header-stat-bar {
        padding: 0.65rem 1.25rem;
        flex-wrap: wrap;
        gap: 0.4rem 0.75rem;
    }
    .ps-player-header .pitcher-name {
        font-size: 1.45rem;
        line-height: 1.2;
    }
    .ps-header-team-name {
        font-size: 0.82rem;
    }
}

/* ── Header: Mobile (≤ 576px) ─────────────────────────────── */
@media (max-width: 576px) {
    .ps-player-header {
        border-radius: 0;
        margin-bottom: 0;
    }
    .ps-header-identity {
        padding: 1rem 1rem 0.875rem;
        align-items: flex-start;
    }
    /* Bigger headshot — the player should feel like the hero */
    .ps-header-photo {
        width: 88px;
        height: 118px;
        margin-right: 1rem;
        border-radius: 9px;
    }
    .ps-header-bio {
        min-width: 0;
        flex: 1;
        justify-content: flex-start;
    }
    /* Stack badge above name so name gets its own visual prominence */
    .ps-header-name-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        margin-bottom: 0.2rem;
        flex-wrap: nowrap;
    }
    /* Badge becomes a small label above the name */
    .ps-player-header .team-badge {
        font-size: 0.7rem;
        padding: 0.2em 0.55em;
        border-radius: 5px;
    }
    /* Name is the dominant hero element */
    .ps-player-header .pitcher-name {
        font-size: 1.55rem;
        font-weight: 800;
        line-height: 1.1;
        margin-bottom: 0;
    }
    .ps-header-team-name {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    /* Pills are supporting metadata — compact and subdued */
    .ps-player-header .player-meta-row {
        gap: 0.3rem 0.3rem;
        margin-top: 0.25rem;
    }
    .ps-player-header .meta-pill {
        font-size: 0.67rem;
        padding: 0.18em 0.55em;
    }
    /* Season hero stats hidden on mobile */
    .ps-header-hero-stats {
        display: none;
    }
    /* L5 stat bar hidden on mobile — data is in Recent Performance section below */
    .ps-header-stat-bar {
        display: none;
    }
    /* Tab rail */
    .ps-tab-rail {
        padding: 0 0.75rem;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .ps-tab-link {
        font-size: 0.8rem;
        padding: 0.55rem 0.6rem;
        white-space: nowrap;
    }
}

/* ── Tables: prevent horizontal overflow on mobile ─────────── */
@media (max-width: 576px) {
    .table-wrapper,
    .ps-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .performance-table th,
    .performance-table td {
        font-size: 0.75rem;
        padding: 0.5rem 0.35rem;
        white-space: nowrap;
    }
    .recent-performance-container {
        border-radius: 0;
    }
}

/* ── Light mode: header on mobile ─────────────────────────── */
@media (max-width: 768px) {
    html[data-theme='light'] .ps-header-stat-bar {
        background: rgba(226,232,240,0.3);
        border-top-color: #e2e8f0;
    }
}

/* Shared MLB player page team-badge sizing moved to static/css/mlb/player_page_shared.css */

/* Shared mobile team-badge sizing moved to static/css/mlb/player_page_shared.css */

/* ── Circle Charts: mobile SVG sizing + label overflow fix ──── */
@media (max-width: 576px) {
    /* SVG was 72px inside a 45px wrap; overflow:visible caused it to render at full size */
    .circle-graph-svg-wrap svg {
        width: 45px;
        height: 45px;
    }

    /* Widen item to fill the grid column (~100px) so labels don't overflow into neighbors */
    .circle-graph-item {
        width: 90px;
    }

    /* Allow long labels like "1+ TOTAL BASES" to wrap instead of overflowing */
    .circle-graph-label {
        white-space: normal;
        line-height: 1.2;
        margin-bottom: 0.4rem;
    }
}

/* ── Prop Lab CTA button (LEFT side of jump nav) ──────────── */
/* Shared MLB player page Prop Lab nav shell moved to static/css/mlb/player_page_shared.css */

/* ── Mobile: stack-friendly adjustments ────────────────────── */
@media (max-width: 576px) {
    .ps-player-header {
        border-radius: 0;
    }

    /* Shared mobile jump-nav shell moved to static/css/mlb/player_page_shared.css */
}

/* ── Detached state: when header has scrolled out of view ───── */
/* JS toggles .ps-jump-nav--detached via IntersectionObserver   */
/* Shared detached jump-nav shell moved to static/css/mlb/player_page_shared.css */

/* ============================================================
   LIGHT MODE FIXES: Today's Game missing overrides
   ============================================================ */
html[data-theme='light'] .pitcher-stats-heading {
    color: #475569;
}

html[data-theme='light'] .todays-game__split-divider {
    border-top-color: #dde3ef;
}

html[data-theme='light'] .todays-game__sub-title {
    border-bottom-color: #dde3ef;
}

/* ============================================================
   LIGHT MODE FIXES: Custom Splits pill toggles
   (general override; .ps-initial-view rules have higher specificity
   and continue to win on the Discover page)
   ============================================================ */
html[data-theme='light'] .ps-pill-label {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.12);
    color: #334155;
}

html[data-theme='light'] .ps-pill-label:hover {
    background: rgba(37, 99, 235, 0.07);
    border-color: rgba(37, 99, 235, 0.25);
    color: #1d4ed8;
}

html[data-theme='light'] .ps-pill-input:checked + .ps-pill-label {
    background: rgba(37, 99, 235, 0.10);
    border-color: rgba(37, 99, 235, 0.35);
    color: #1d4ed8;
}

html[data-theme='light'] .ps-pill-input:checked + .ps-pill-label:hover {
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(37, 99, 235, 0.46);
}


/* ============================================================
   LIGHT MODE FIXES: Prop Performance History — odds inputs
   ============================================================ */
html[data-theme='light'] #prop-line-box .odds-input {
    color: #1e293b;
    border-color: #cbd5e1;
    background: #f8fafc;
}

html[data-theme='light'] #prop-line-box .odds-input::placeholder {
    color: #94a3b8;
}

/* ============================================================
   PLAYER PAGE LAYOUT ENHANCEMENTS — Laptop & Desktop
   ============================================================ */

/* Shared MLB player page header polish moved to static/css/mlb/player_page_shared.css */

/* Shared MLB player page section-title polish moved to static/css/mlb/player_page_shared.css */

/* Shared MLB player page context-note and splits-pair shell moved to static/css/mlb/player_page_shared.css */

/* Shared MLB player page nav enhancement layer moved to static/css/mlb/player_page_shared.css */

/* --- Section cards: subtle visual rhythm (every other gets a micro-tint) --- */
/* Shared MLB player page section-card glow tweak moved to static/css/mlb/player_page_shared.css */

/* Shared light-mode player header polish moved to static/css/mlb/player_page_shared.css */

/* Shared light-mode header detail rules moved to static/css/mlb/player_page_shared.css */

/* ============================================================
   HEADER REDESIGN v2 — "Athletic Identity"
   Team color becomes atmosphere, not just accent.
   All changes scoped to player view / 1200px+ where noted.
   ============================================================ */

/* --- A. Team Color Atmosphere Gradient --- */
/* ::before creates a left-to-right ambient wash in team color */
/* Shared MLB player page team-color header atmosphere moved to static/css/mlb/player_page_shared.css */

/* --- B. Hero Stats Panel — Subtle Recessed Dark Panel --- */
/* Creates a "split card" feel: identity left, data panel right */
/* Shared MLB player page hero-stats atmosphere moved to static/css/mlb/player_page_shared.css */

/* --- C. Photo — Larger + Team Color Border --- */
/* Shared MLB player page photo enhancement moved to static/css/mlb/player_page_shared.css */

/* --- D. Player Name — Editorial Typography --- */
/* Shared MLB player page name enhancement moved to static/css/mlb/player_page_shared.css */

/* --- E. Team Badge — Dimensional Inset Highlight --- */
/* Shared MLB player page team-badge polish moved to static/css/mlb/player_page_shared.css */

/* --- F. Hero Stat Values — Larger + Team Color Underline Accent --- */
/* Shared MLB player page hero-value accent moved to static/css/mlb/player_page_shared.css */

/* Shared MLB player page nav enhancement layer moved to static/css/mlb/player_page_shared.css */

/* Shared MLB player page final jump-nav redesign moved to static/css/mlb/player_page_shared.css */

/* ============================================================
   TODAY'S GAME — REDESIGN (tg- prefix)
   Dark mode is default. Light mode overrides at bottom.
   ============================================================ */

.tg-section {
    background: var(--ps-bg-card, #111520);
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
}

/* --- Header --- */
.tg-header {
    margin-bottom: 1.25rem;
}

.tg-title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem 1.1rem;
    flex-wrap: wrap;
}

.tg-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tg-matchup-bar {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 3.25rem;
    width: fit-content;
    max-width: 100%;
    padding: 0;
    border-radius: 18px;
    border: 1px solid rgba(59, 85, 151, 0.34);
    background:
        linear-gradient(180deg, rgba(20, 30, 54, 0.96), rgba(10, 16, 30, 0.98)),
        radial-gradient(circle at top left, rgba(80, 140, 255, 0.18), transparent 58%);
    box-shadow: 0 10px 24px rgba(2, 8, 24, 0.2);
    overflow: hidden;
}

.tg-matchup-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 48%);
    pointer-events: none;
}

.tg-matchup-bar__title-wrap,
.tg-matchup-bar__segment {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.52rem 0.88rem 0.58rem;
}

.tg-matchup-bar__title-wrap {
    min-width: 15.5rem;
    padding-right: 1.05rem;
}

.tg-matchup-bar__segment {
    min-width: max-content;
}

.tg-matchup-bar__segment+.tg-matchup-bar__segment,
.tg-matchup-bar__title-wrap+.tg-matchup-bar__segment {
    border-left: 1px solid rgba(94, 118, 185, 0.2);
}

.tg-matchup-bar__label {
    margin-bottom: 0.28rem;
    color: #7e8aa8;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.tg-matchup-bar__value {
    display: flex;
    align-items: center;
    gap: 0.48rem;
    flex-wrap: wrap;
    color: #f3f6ff;
}

.tg-matchup-bar__segment--selector .tg-matchup-bar__value {
    min-width: 13.5rem;
}

.tg-game-select {
    width: 100%;
    min-width: 13.5rem;
    min-height: 2.05rem;
    padding: 0.38rem 2.05rem 0.38rem 0.72rem;
    border-radius: 10px;
    border: 1px solid rgba(126, 160, 235, 0.26);
    background-color: rgba(13, 21, 38, 0.96);
    color: #eaf1ff;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 16px rgba(2, 8, 24, 0.24);
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%23dbeafe' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.62rem center;
    background-size: 0.98rem 0.98rem;
}

.tg-game-select:hover {
    border-color: rgba(146, 184, 255, 0.42);
}

.tg-game-select:focus-visible {
    outline: none;
    border-color: rgba(122, 176, 255, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 3px rgba(66, 133, 255, 0.2),
        0 8px 22px rgba(5, 14, 36, 0.36);
}

.tg-game-select option {
    background: #0f1a30;
    color: #eaf1ff;
    font-weight: 600;
}

.tg-matchup-bar__prefix {
    color: #8fa3d6;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.tg-matchup-bar__team-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.2rem;
    min-height: 1.7rem;
    padding: 0.16rem 0.68rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 10px 24px rgba(0, 0, 0, 0.18);
    color: #f8fbff;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
}

.tg-matchup-bar__name,
.tg-matchup-bar__time {
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.1;
    color: #f4f7ff;
}

.tg-matchup-bar__name {
    max-width: 14rem;
}

.tg-matchup-bar__hand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.35rem;
    padding: 0.1rem 0.42rem;
    border-radius: 999px;
    background: rgba(76, 134, 240, 0.16);
    border: 1px solid rgba(98, 156, 255, 0.26);
    color: #86b6ff;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 960px) {
    .tg-title-row {
        align-items: flex-start;
    }

    .tg-matchup-bar {
        width: 100%;
        flex-direction: column;
    }

    .tg-matchup-bar__title-wrap,
    .tg-matchup-bar__segment {
        width: 100%;
        min-width: 0;
    }

    .tg-matchup-bar__segment--selector .tg-matchup-bar__value,
    .tg-game-select {
        min-width: 0;
    }

    .tg-matchup-bar__segment+.tg-matchup-bar__segment,
    .tg-matchup-bar__title-wrap+.tg-matchup-bar__segment {
        border-left: none;
        border-top: 1px solid rgba(94, 118, 185, 0.2);
    }
}

/* --- 3-column card grid --- */
.tg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 960px) {
    .tg-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .tg-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Cards --- */
.tg-card {
    background: rgba(18, 23, 38, 0.7);
    border: 1px solid #1E2540;
    border-radius: 10px;
    padding: 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tg-card__eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ps-text-2, #888FA0);
}

/* --- Pitcher Card --- */
.tg-pitcher__namerow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tg-pitcher__name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ps-text-1, #F0F2F8);
    line-height: 1.2;
}

.tg-pitcher__hand {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--ps-accent, #4582F0);
    background: rgba(69, 130, 240, 0.12);
    border: 1px solid rgba(69, 130, 240, 0.25);
    border-radius: 4px;
    padding: 0.15em 0.5em;
}

/* Big 3 metrics */
.tg-metrics {
    display: flex;
    border: 1px solid #1E2540;
    border-radius: 8px;
    overflow: hidden;
}

.tg-metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.65rem 0.25rem;
    border-right: 1px solid #1E2540;
    gap: 0.2rem;
}

.tg-metric:last-child {
    border-right: none;
}

.tg-metric__value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ps-text-1, #F0F2F8);
    line-height: 1;
    letter-spacing: -0.01em;
}

.tg-metric__label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ps-text-2, #888FA0);
}

/* Season vs Last 3 trend table */
.tg-trend {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: rgba(10, 14, 25, 0.45);
    border: 1px solid #191E30;
    border-radius: 7px;
    padding: 0.5rem 0.65rem;
}

.tg-trend__header,
.tg-trend__row {
    display: grid;
    grid-template-columns: 3.25rem 1fr 1fr 1fr;
    gap: 0.2rem;
    font-size: 0.75rem;
    align-items: center;
}

.tg-trend__header {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ps-text-2, #888FA0);
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #1E2540;
}

.tg-trend__header > span:not(:first-child),
.tg-trend__row > span:not(:first-child) {
    text-align: center;
}

.tg-trend__label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--ps-text-2, #888FA0);
}

.tg-trend__row {
    color: var(--ps-text-1, #F0F2F8);
    font-weight: 500;
}

.tg-trend__row--recent {
    color: var(--ps-accent, #4582F0);
}

/* Relevant split pill */
.tg-split-highlight {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(69, 130, 240, 0.06);
    border: 1px solid rgba(69, 130, 240, 0.18);
    border-radius: 7px;
    padding: 0.5rem 0.65rem;
    flex-wrap: wrap;
}

.tg-split-highlight__tag {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ps-accent, #4582F0);
    background: rgba(69, 130, 240, 0.12);
    border-radius: 4px;
    padding: 0.15em 0.45em;
    white-space: nowrap;
    flex-shrink: 0;
}

.tg-split-highlight__stats {
    font-size: 0.82rem;
    color: var(--ps-text-1, #F0F2F8);
    font-weight: 500;
}

/* --- H2H Card --- */
.tg-h2h-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0 0.25rem;
    gap: 0.25rem;
}

.tg-h2h-avg {
    font-size: 3rem;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
    line-height: 1;
    letter-spacing: -0.02em;
}

.tg-h2h-ab {
    font-size: 0.75rem;
    color: var(--ps-text-2, #888FA0);
    font-weight: 500;
}

.tg-h2h-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
}

.tg-h2h-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(10, 14, 25, 0.45);
    border: 1px solid #191E30;
    border-radius: 7px;
    padding: 0.5rem 0.25rem;
    gap: 0.15rem;
}

.tg-h2h-stat__value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ps-text-1, #F0F2F8);
    line-height: 1;
}

.tg-h2h-stat__label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ps-text-2, #888FA0);
}

.tg-h2h-first-meeting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 7rem;
    gap: 0.5rem;
}

.tg-h2h-first-meeting__icon {
    font-size: 1.75rem;
    opacity: 0.25;
}

.tg-h2h-first-meeting__label {
    font-size: 0.85rem;
    color: var(--ps-text-2, #888FA0);
    font-style: italic;
    text-align: center;
}

/* --- Edge Card --- */
.tg-edge-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: rgba(69, 130, 240, 0.06);
    border: 1px solid rgba(69, 130, 240, 0.18);
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
}

.tg-edge-tag {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ps-accent, #4582F0);
    background: rgba(69, 130, 240, 0.12);
    border-radius: 4px;
    padding: 0.2em 0.5em;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 3rem;
    text-align: center;
}

.tg-edge-stats {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tg-edge-avg {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
    line-height: 1;
    letter-spacing: -0.01em;
}

.tg-edge-ops,
.tg-edge-hr {
    font-size: 0.8rem;
    color: var(--ps-text-2, #888FA0);
    font-weight: 500;
}

/* --- Bullpen Strip --- */
.tg-bullpen {
    background: rgba(14, 18, 30, 0.5);
    border: 1px solid #1E2540;
    border-radius: 10px;
    padding: 0.9rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.tg-bullpen__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tg-bullpen__header>div {
    flex: 1;
    min-width: 0;
}

.tg-bullpen__title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-bullpen__summary {
    margin: 0.55rem 0 0;
    max-width: none;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--ps-text-2, #888FA0);
}

.tg-bullpen__summary strong {
    color: var(--ps-text-1, #F0F2F8);
    font-weight: 700;
}

.tg-bullpen__summary--positive strong {
    color: #7fb2ff;
}

.tg-bullpen__summary--negative strong {
    color: #ff9b8f;
}

.tg-bullpen__range {
    font-size: 0.78rem;
    background: #111520;
    border: 1px solid #2A3050;
    color: var(--ps-text-1, #F0F2F8);
    border-radius: 6px;
    padding: 0.25rem 0.55rem;
    cursor: pointer;
    outline: none;
}

.tg-bp-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    min-height: 2.25rem;
    align-items: center;
    margin-top: 0.45rem;
    margin-bottom: 0.75rem;
}

.tg-bp-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(18, 23, 38, 0.8);
    border: 1px solid #2A3050;
    border-radius: 7px;
    padding: 0.35rem 0.65rem;
}

.tg-bp-pill__label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ps-text-2, #888FA0);
}

.tg-bp-pill__value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-rank {
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 0.15em 0.45em;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.tg-rank--good {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.tg-rank--mid {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.tg-rank--bad {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.tg-bp-toggle {
    background: none;
    border: 1px solid #2A3050;
    border-radius: 6px;
    color: var(--ps-text-2, #888FA0);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    width: fit-content;
    margin-top: 0.15rem;
    transition: color 0.15s, border-color 0.15s;
}

.tg-bp-toggle:hover {
    color: var(--ps-text-1, #F0F2F8);
    border-color: var(--ps-accent, #4582F0);
}

.tg-bp-table-wrap {
    overflow-x: auto;
}

.tg-bp-table {
    width: max-content;
    min-width: 0;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.tg-bp-col--pitcher {
    width: 230px;
}

.tg-bp-col--last3 {
    width: 110px;
}

.tg-bp-col--status {
    width: 140px;
}

.tg-bp-col--season {
    width: 240px;
}

.tg-bp-col--last5 {
    width: 270px;
}

.tg-bp-col--split {
    width: 190px;
}

.tg-bp-table th {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ps-text-2, #888FA0);
    padding: 0.4rem 0.6rem;
    text-align: center;
    border-bottom: 1px solid #1E2540;
    white-space: nowrap;
}

.tg-bp-table th:first-child {
    text-align: left;
}

.tg-bp-table th:nth-child(3),
.tg-bp-table th:nth-child(4),
.tg-bp-table th:nth-child(5),
.tg-bp-table th:nth-child(6) {
    text-align: left;
}

.tg-bp-table td {
    padding: 0.55rem 0.6rem;
    color: var(--ps-text-1, #F0F2F8);
    border-bottom: 1px solid rgba(30, 37, 64, 0.5);
    text-align: center;
    font-weight: 500;
}

.tg-bp-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.tg-bp-table th:nth-child(2),
.tg-bp-table td:nth-child(2) {
    padding-right: 1rem;
}

.tg-bp-table th:nth-child(3),
.tg-bp-table td:nth-child(3) {
    padding-left: 0.85rem;
}

.tg-bp-table tbody tr:hover {
    background: rgba(69, 130, 240, 0.05);
}

.tg-bp-group-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    min-width: 230px;
}

.tg-bp-group-cell--season {
    min-width: 0;
}

.tg-bp-group-cell--last5 {
    min-width: 0;
}

.tg-bp-statgrid {
    display: grid;
    row-gap: 0.18rem;
    column-gap: 0.9rem;
    align-items: end;
}

.tg-bp-statgrid--3 {
    grid-template-columns: repeat(3, minmax(0, auto));
}

.tg-bp-statgrid--4 {
    grid-template-columns: repeat(4, minmax(0, auto));
}

.tg-bp-statgrid--5 {
    grid-template-columns: repeat(5, minmax(0, auto));
}

.tg-bp-statgrid__value {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(240, 242, 248, 0.9);
    line-height: 1.1;
    white-space: nowrap;
}

.tg-bp-statgrid__label {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(136, 143, 160, 0.88);
    line-height: 1;
    white-space: nowrap;
}

.tg-bp-status {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    white-space: nowrap;
}

.tg-bp-status__text {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ps-text-2, #888FA0);
}

.tg-bp-usage {
    display: flex;
    justify-content: center;
    gap: 0.26rem;
}

.tg-bp-usage-box {
    width: 0.95rem;
    height: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    border: 1px solid rgba(136, 143, 160, 0.35);
    background: rgba(14, 22, 42, 0.28);
    color: rgba(240, 242, 248, 0.85);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
}

.tg-bp-usage-box.is-active {
    border-color: rgba(69, 130, 240, 0.45);
    background: rgba(69, 130, 240, 0.18);
    color: rgba(240, 242, 248, 0.95);
}

/* No-data state */
.tg-no-data {
    font-size: 0.84rem;
    color: var(--ps-text-2, #888FA0);
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
    margin: 0;
}

/* ============================================================
   TODAY'S GAME — LIGHT MODE OVERRIDES
   ============================================================ */

html[data-theme='light'] .tg-section {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-title {
    color: #0f172a;
}

html[data-theme='light'] .tg-matchup-bar {
    border-color: rgba(37, 99, 235, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.98)),
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 58%);
    box-shadow: 0 14px 30px rgba(148, 163, 184, 0.14);
}

html[data-theme='light'] .tg-matchup-bar__segment+.tg-matchup-bar__segment,
html[data-theme='light'] .tg-matchup-bar__title-wrap+.tg-matchup-bar__segment {
    border-color: rgba(37, 99, 235, 0.12);
}

html[data-theme='light'] .tg-matchup-bar__label {
    color: #64748b;
}

html[data-theme='light'] .tg-matchup-bar__prefix {
    color: #335ea8;
}

html[data-theme='light'] .tg-matchup-bar__name,
html[data-theme='light'] .tg-matchup-bar__time {
    color: #0f172a;
}

html[data-theme='light'] .tg-matchup-bar__team-badge {
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 10px 20px rgba(148, 163, 184, 0.16);
}

html[data-theme='light'] .tg-matchup-bar__hand {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.18);
    color: #2563eb;
}

html[data-theme='light'] .tg-game-select {
    border-color: rgba(37, 99, 235, 0.18);
    background-color: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.84),
        0 6px 18px rgba(148, 163, 184, 0.18);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%232563eb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme='light'] .tg-game-select:hover {
    border-color: rgba(37, 99, 235, 0.34);
}

html[data-theme='light'] .tg-game-select:focus-visible {
    border-color: rgba(37, 99, 235, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 0 0 3px rgba(37, 99, 235, 0.16),
        0 10px 20px rgba(148, 163, 184, 0.26);
}

html[data-theme='light'] .tg-game-select option {
    background: #f8fafc;
    color: #0f172a;
}

html[data-theme='light'] .tg-card {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-card__eyebrow {
    color: #94a3b8;
}

html[data-theme='light'] .tg-pitcher__name {
    color: #0f172a;
}

html[data-theme='light'] .tg-pitcher__hand {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}

html[data-theme='light'] .tg-metrics {
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .tg-metric {
    border-right-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-metric__value {
    color: #0f172a;
}

html[data-theme='light'] .tg-metric__label {
    color: #64748b;
}

html[data-theme='light'] .tg-trend {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-trend__header {
    color: #94a3b8;
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-trend__label {
    color: #64748b;
}

html[data-theme='light'] .tg-trend__row {
    color: #1e293b;
}

html[data-theme='light'] .tg-trend__row--recent {
    color: #2563eb;
}

html[data-theme='light'] .tg-split-highlight {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.15);
}

html[data-theme='light'] .tg-split-highlight__tag {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

html[data-theme='light'] .tg-split-highlight__stats {
    color: #1e293b;
}

html[data-theme='light'] .tg-h2h-avg {
    color: #0f172a;
}

html[data-theme='light'] .tg-h2h-ab {
    color: #64748b;
}

html[data-theme='light'] .tg-h2h-stat {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-h2h-stat__value {
    color: #0f172a;
}

html[data-theme='light'] .tg-h2h-stat__label {
    color: #64748b;
}

html[data-theme='light'] .tg-h2h-first-meeting__label {
    color: #94a3b8;
}

html[data-theme='light'] .tg-edge-row {
    background: rgba(37, 99, 235, 0.04);
    border-color: rgba(37, 99, 235, 0.15);
}

html[data-theme='light'] .tg-edge-tag {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

html[data-theme='light'] .tg-edge-avg {
    color: #0f172a;
}

html[data-theme='light'] .tg-edge-ops,
html[data-theme='light'] .tg-edge-hr {
    color: #64748b;
}

html[data-theme='light'] .tg-bullpen {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-bullpen__title {
    color: #0f172a;
}

html[data-theme='light'] .tg-bullpen__range {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.15);
    color: #1e293b;
}

html[data-theme='light'] .tg-bp-pill {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .tg-bp-pill__label {
    color: #94a3b8;
}

html[data-theme='light'] .tg-bp-pill__value {
    color: #0f172a;
}

html[data-theme='light'] .tg-bp-toggle {
    border-color: rgba(15, 23, 42, 0.15);
    color: #64748b;
}

html[data-theme='light'] .tg-bp-toggle:hover {
    color: #1e293b;
    border-color: #2563eb;
}

html[data-theme='light'] .tg-bp-table th {
    color: #64748b;
    border-bottom-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .tg-bp-table td {
    color: #1e293b;
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .tg-bp-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.04);
}

html[data-theme='light'] .tg-bullpen__summary strong {
    color: #0f172a;
}

html[data-theme='light'] .tg-bullpen__summary--positive strong {
    color: #1d4ed8;
}

html[data-theme='light'] .tg-bullpen__summary--negative strong {
    color: #b91c1c;
}

html[data-theme='light'] .tg-rank--good {
    color: #15803d;
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.28);
}

html[data-theme='light'] .tg-rank--mid {
    color: #92400e;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.28);
}

html[data-theme='light'] .tg-rank--bad {
    color: #991b1b;
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.28);
}

html[data-theme='light'] .tg-bp-statgrid__value {
    color: #1e293b;
}

html[data-theme='light'] .tg-bp-statgrid__label {
    color: #64748b;
}

html[data-theme='light'] .tg-bp-status__text {
    color: #64748b;
}

html[data-theme='light'] .tg-bp-usage-box {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.2);
    color: #475569;
}

html[data-theme='light'] .tg-bp-usage-box.is-active {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.38);
    color: #1d4ed8;
}

/* ============================================================
   TODAY'S GAME REDESIGN
   ============================================================ */

.tg-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tg-row {
    display: grid;
    gap: 1rem;
}

.tg-row--hero {
    grid-template-columns: minmax(0, 1fr);
}

.tg-row--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tg-row--hero .tg-panel--verdict:only-child {
    min-height: auto;
}

.tg-panel {
    background:
        linear-gradient(180deg, rgba(18, 23, 38, 0.92) 0%, rgba(11, 15, 27, 0.92) 100%);
    border: 1px solid #1E2540;
    border-radius: 14px;
    padding: 1.2rem 1.2rem 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.tg-panel--positive {
    border-color: rgba(56, 189, 248, 0.32);
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(15, 28, 40, 0.96) 0%, rgba(9, 14, 24, 0.96) 100%);
}

.tg-panel--negative {
    border-color: rgba(239, 68, 68, 0.25);
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(24, 18, 28, 0.94) 0%, rgba(13, 12, 22, 0.96) 100%);
}

.tg-panel--verdict {
    min-height: auto;
}

.tg-panel__eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ps-text-2, #888FA0);
    margin-bottom: 0.55rem;
}

.tg-panel__title {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.12;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-subtitle {
    margin-top: 0.32rem;
    font-size: 0.86rem;
    color: var(--ps-text-2, #98A1B3);
}

.tg-panel__copy {
    margin: 0.85rem 0 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--ps-text-2, #A1A9BA);
}

.tg-panel__footer {
    margin-top: 0.9rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--ps-text-2, #96A0B4);
}

.tg-verdict__label {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    background: rgba(69, 130, 240, 0.14);
    border: 1px solid rgba(69, 130, 240, 0.22);
    color: #7FB2FF;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.tg-verdict__hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.tg-verdict__score-wrap {
    display: flex;
    align-items: flex-end;
    gap: 0.3rem;
    min-width: 0;
}

.tg-verdict__score {
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 0.9;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-verdict__score-max {
    padding-bottom: 0.2rem;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--ps-text-2, #98A1B3);
}

.tg-verdict-components {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.tg-verdict-component {
    min-width: 0;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(30, 37, 64, 0.72);
    border-radius: 12px;
    background: rgba(8, 14, 28, 0.34);
}

.tg-verdict-component__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.tg-verdict-component__heading {
    min-width: 0;
}

.tg-verdict-component__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-verdict-component__score {
    margin-top: 0.1rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--ps-text-2, #A5B0C5);
}

.tg-verdict-component__pill {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    border: 1px solid rgba(69, 130, 240, 0.2);
    background: rgba(69, 130, 240, 0.12);
    color: #7FB2FF;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tg-verdict-component__pill--positive {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.18);
    color: #6EE7B7;
}

.tg-verdict-component__pill--negative {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.18);
    color: #FDA4AF;
}

.tg-verdict-component__reason {
    margin-top: 0.32rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--ps-text-2, #98A1B3);
}

/* Hitter Form indicator — sits below the three components, inside the verdict card */
.tg-hitter-form {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.7rem 0.9rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0.25rem;
}

.tg-hitter-form__label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ps-text-2, #727A8F);
    white-space: nowrap;
}

.tg-hitter-form__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.46rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.tg-hitter-form__badge--positive {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.18);
    color: #6EE7B7;
}

.tg-hitter-form__badge--negative {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.18);
    color: #FDA4AF;
}

.tg-hitter-form__badge--neutral {
    background: rgba(148, 163, 184, 0.10);
    border-color: rgba(148, 163, 184, 0.15);
    color: #94A3B8;
}

.tg-hitter-form__reason {
    font-size: 0.80rem;
    line-height: 1.4;
    color: var(--ps-text-2, #98A1B3);
}

/* Light mode overrides for hitter form */
html[data-theme='light'] .tg-hitter-form {
    border-top-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-hitter-form__badge--positive {
    background: rgba(22, 163, 74, 0.10);
    border-color: rgba(22, 163, 74, 0.20);
    color: #15803d;
}

html[data-theme='light'] .tg-hitter-form__badge--negative {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.18);
    color: #dc2626;
}

html[data-theme='light'] .tg-hitter-form__badge--neutral {
    background: rgba(100, 116, 139, 0.08);
    border-color: rgba(100, 116, 139, 0.16);
    color: #64748b;
}

@media (max-width: 980px) {
    .tg-verdict__hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .tg-verdict-components {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .tg-verdict-components {
        grid-template-columns: 1fr;
    }
}

.tg-panel--positive .tg-verdict__label {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.22);
    color: #6EE7B7;
}

.tg-panel--negative .tg-verdict__label {
    background: rgba(239, 68, 68, 0.13);
    border-color: rgba(239, 68, 68, 0.2);
    color: #FDA4AF;
}

.tg-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.95rem;
}

.tg-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(69, 130, 240, 0.11);
    border: 1px solid rgba(69, 130, 240, 0.18);
    color: #8AB7FF;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tg-chip--muted {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.07);
    color: var(--ps-text-2, #A1A9BA);
}

.tg-inline-pill {
    display: inline-flex;
    align-items: center;
    transform: translateY(-0.08rem);
    margin-left: 0.45rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: rgba(69, 130, 240, 0.12);
    border: 1px solid rgba(69, 130, 240, 0.2);
    color: #8AB7FF;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tg-prop-list {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    margin-top: 0.95rem;
}

.tg-prop-item {
    border: 1px solid rgba(69, 130, 240, 0.12);
    background: rgba(10, 14, 25, 0.55);
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
}

.tg-prop-item__main,
.tg-prop-item__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
}

.tg-prop-item__label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-prop-item__rate {
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 800;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-prop-item__meta {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: var(--ps-text-2, #96A0B4);
    flex-wrap: wrap;
}

.tg-prop-item__diff.is-positive {
    color: #6EE7B7;
}

.tg-prop-item__diff.is-negative {
    color: #FDA4AF;
}

.tg-feature-block {
    margin-top: 0.95rem;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    background: rgba(7, 12, 22, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tg-feature-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ps-text-2, #8893A7);
    margin-bottom: 0.35rem;
}

.tg-feature-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-feature-copy {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--ps-text-2, #A1A9BA);
}

.tg-starter-grid,
.tg-matchup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tg-compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.tg-compare-col {
    min-width: 0;
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.tg-compare-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0;
}

.tg-compare-head__photo {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.tg-compare-head__name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ps-text-1, #F0F2F8);
    line-height: 1.15;
}

.tg-compare-head__sub {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ps-text-2, #96A0B4);
}

.tg-compare-head__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.36rem;
    row-gap: 0.28rem;
    margin-top: 0.44rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--ps-text-2, #A1A9BA);
}

.tg-compare-head__kv {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
    white-space: nowrap;
}

.tg-compare-head__k {
    color: var(--ps-text-2, #A1A9BA);
    font-weight: 600;
}

.tg-compare-head__line strong,
.tg-compare-head__v {
    color: var(--ps-text-1, #F0F2F8);
    font-weight: 800;
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
}

.tg-compare-head__sep {
    display: inline-flex;
    align-items: center;
    color: var(--ps-text-3, #6B7280);
    opacity: 0.72;
    line-height: 1;
}

.tg-starter-block {
    margin-top: 0;
    padding: 0.72rem 0.82rem;
    border-radius: 12px;
    background: rgba(8, 12, 21, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tg-starter-block:first-of-type {
    margin-top: 0;
}

.tg-starter-stat-grid {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
}

.tg-starter-stat-grid--hitter {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tg-starter-block--history {
    margin-top: 0.8rem;
}

.tg-starter-stat,
.tg-history-stat {
    padding: 0.52rem 0.4rem;
    border-radius: 9px;
    background: rgba(69, 130, 240, 0.06);
    border: 1px solid rgba(69, 130, 240, 0.12);
    text-align: center;
}

.tg-starter-stat__value,
.tg-history-stat__value {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-starter-stat__label,
.tg-history-stat__label {
    margin-top: 0.12rem;
    font-size: 0.62rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ps-text-2, #8F98AB);
}

.tg-hand-list,
.tg-pitch-mix-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tg-hand-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.tg-hand-row,
.tg-pitch-mix-item {
    padding: 0.72rem 0.78rem;
    border-radius: 10px;
    background: rgba(7, 12, 22, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tg-hand-row.is-matchup,
.tg-pitch-mix-item.is-primary {
    background: rgba(69, 130, 240, 0.09);
    border-color: rgba(69, 130, 240, 0.2);
}

.tg-hand-row__title,
.tg-pitch-mix-item__label {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-hand-row__meta {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ps-text-3, #6B7280);
    opacity: 0.9;
    margin-left: 0.1rem;
}

.tg-hand-row__tag {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 0.12rem 0.38rem;
    border-radius: 999px;
    background: rgba(69, 130, 240, 0.14);
    color: #8AB7FF;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tg-hand-row__stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.38rem;
    margin-top: 0.5rem;
}

.tg-hand-row__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.28rem 0.34rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    gap: 0.2rem;
    white-space: nowrap;
    text-align: center;
    font-size: 0.74rem;
    color: var(--ps-text-2, #A1A9BA);
}

.tg-hand-row__k {
    color: var(--ps-text-2, #A1A9BA);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.61rem;
    line-height: 1.05;
    margin-top: 0.05rem;
}

.tg-hand-row__stat strong,
.tg-hand-row__v {
    color: var(--ps-text-1, #F0F2F8);
    font-weight: 800;
    font-size: 0.8rem;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.tg-pitch-mix-item__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.tg-pitch-mix-item__usage {
    font-size: 1rem;
    font-weight: 800;
    color: #8AB7FF;
}

.tg-pitch-mix-item__detail {
    margin-top: 0.28rem;
    font-size: 0.82rem;
    color: var(--ps-text-2, #96A0B4);
}

.tg-history-grid {
    margin-top: 0.55rem;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.5rem;
}

.tg-starter-block--pitch-table {
    margin-top: 0.8rem;
}

.tg-starter-block--pitch-table.is-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.tg-pitch-table-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tg-pitch-season-toggle {
    gap: 0.3rem;
}

.tg-pitch-season-toggle .ps-percentile-season-btn,
.tg-pitch-hand-toggle .ps-percentile-season-btn {
    padding: 0.26rem 0.48rem;
    font-size: 0.64rem;
}

.tg-pitch-table-grid {
    margin-top: 0.58rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.68rem;
}

.tg-pitch-table-wrap {
    background: rgba(7, 12, 22, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.tg-pitch-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.58rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-wrap: wrap;
}

.tg-pitch-table-head__title {
    display: flex;
    align-items: baseline;
    gap: 0.48rem;
}

.tg-pitch-table-head h4 {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-pitch-table-head span {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8AB7FF;
    font-weight: 700;
}

.tg-pitch-table-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tg-pitch-table-scroll {
    overflow-x: auto;
}

.tg-pitch-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.tg-pitch-table th,
.tg-pitch-table td {
    padding: 0.4rem 0.46rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.77rem;
    line-height: 1.2;
}

.tg-pitch-table th {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ps-text-2, #8F98AB);
    background: rgba(8, 12, 21, 0.42);
}

.tg-pitch-table tbody tr:last-child td {
    border-bottom: 0;
}

.tg-pitch-table td:first-child,
.tg-pitch-table th:first-child {
    text-align: left;
    padding-left: 0.64rem;
    min-width: 8.5rem;
}

.tg-pitch-table td {
    color: var(--ps-text-1, #F0F2F8);
    font-weight: 600;
}

.tg-pitch-heat {
    --tg-heat: 0;
}

.tg-pitch-heat--good {
    background: rgba(28, 176, 98, calc(0.12 + (var(--tg-heat) * 0.3)));
}

.tg-pitch-heat--bad {
    background: rgba(230, 77, 77, calc(0.12 + (var(--tg-heat) * 0.28)));
}

.tg-pitch-heat--neutral {
    background: rgba(123, 139, 161, 0.1);
}

.tg-panel--starter .tg-panel__title {
    font-size: 1.18rem;
}

.tg-panel--starter .tg-subtitle {
    margin-top: 0.22rem;
    font-size: 0.8rem;
}

.tg-panel--starter .tg-feature-label {
    margin-bottom: 0.18rem;
    font-size: 0.66rem;
}

.tg-highlight-row {
    margin-top: 0.95rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    background: rgba(69, 130, 240, 0.08);
    border: 1px solid rgba(69, 130, 240, 0.16);
}

.tg-highlight-row__tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.58rem;
    border-radius: 999px;
    background: rgba(69, 130, 240, 0.14);
    color: #8AB7FF;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tg-highlight-row__stats {
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-edge-list {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    margin-top: 0.95rem;
}

.tg-edge-item {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    background: rgba(8, 12, 21, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tg-edge-item__label {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8AB7FF;
}

.tg-edge-item__value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-edge-item__detail {
    margin-top: 0.2rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--ps-text-2, #96A0B4);
}

.tg-bvp-hero {
    margin-top: 0.7rem;
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.tg-bvp-hero__avg {
    font-size: 3rem;
    line-height: 1;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-bvp-hero__meta {
    font-size: 0.9rem;
    color: var(--ps-text-2, #96A0B4);
}

.tg-bvp-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.7rem;
}

.tg-bvp-stat {
    padding: 0.8rem 0.7rem;
    border-radius: 12px;
    background: rgba(8, 12, 21, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.tg-bvp-stat__value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
}

.tg-bvp-stat__label {
    margin-top: 0.18rem;
    font-size: 0.7rem;
    color: var(--ps-text-2, #8F98AB);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tg-bullpen-card .tg-bullpen__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.tg-bullpen-card .tg-bullpen__range {
    margin-top: 0.2rem;
}

@media (max-width: 980px) {
    .tg-row--hero,
    .tg-row--split {
        grid-template-columns: 1fr;
    }

    .tg-starter-grid,
    .tg-matchup-grid,
    .tg-compare-grid {
        grid-template-columns: 1fr;
    }

    .tg-bvp-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tg-history-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .tg-pitch-table-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .tg-panel {
        padding: 1rem;
        border-radius: 12px;
    }

    .tg-panel__title {
        font-size: 1.15rem;
    }

    .tg-edge-item {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .tg-bvp-hero__avg {
        font-size: 2.35rem;
    }

    .tg-bvp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tg-starter-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* 5-stat pitcher grid: 3 cols avoids orphaned last item */
    .tg-starter-stat-grid--pitcher {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tg-history-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tg-hand-list {
        grid-template-columns: 1fr;
    }

    .tg-hand-row__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tg-bullpen-card .tg-bullpen__header {
        flex-direction: column;
        align-items: stretch;
    }

    .tg-pitch-table-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .tg-prop-item__main {
        align-items: flex-start;
    }
}

html[data-theme='light'] .tg-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: none;
}

html[data-theme='light'] .tg-panel--positive {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.09), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

html[data-theme='light'] .tg-panel--negative {
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.08), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

html[data-theme='light'] .tg-panel__title,
html[data-theme='light'] .tg-feature-value,
html[data-theme='light'] .tg-highlight-row__stats,
html[data-theme='light'] .tg-edge-item__value,
html[data-theme='light'] .tg-bvp-hero__avg,
html[data-theme='light'] .tg-bvp-stat__value,
html[data-theme='light'] .tg-prop-item__label,
html[data-theme='light'] .tg-prop-item__rate {
    color: #0f172a;
}

html[data-theme='light'] .tg-panel__copy,
html[data-theme='light'] .tg-feature-copy,
html[data-theme='light'] .tg-edge-item__detail,
html[data-theme='light'] .tg-panel__footer,
html[data-theme='light'] .tg-bvp-hero__meta,
html[data-theme='light'] .tg-subtitle,
html[data-theme='light'] .tg-prop-item__meta {
    color: #64748b;
}

html[data-theme='light'] .tg-chip--muted,
html[data-theme='light'] .tg-feature-block,
html[data-theme='light'] .tg-edge-item,
html[data-theme='light'] .tg-bvp-stat,
html[data-theme='light'] .tg-prop-item,
html[data-theme='light'] .tg-starter-block,
html[data-theme='light'] .tg-hand-row,
html[data-theme='light'] .tg-pitch-mix-item {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-compare-head__photo {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-starter-stat,
html[data-theme='light'] .tg-history-stat {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.12);
}

html[data-theme='light'] .tg-pitch-table-wrap {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-pitch-table-head {
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-pitch-table-head h4,
html[data-theme='light'] .tg-pitch-table td {
    color: #0f172a;
}

html[data-theme='light'] .tg-pitch-table th {
    color: #64748b;
    background: rgba(148, 163, 184, 0.08);
}

html[data-theme='light'] .tg-pitch-table th,
html[data-theme='light'] .tg-pitch-table td {
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme='light'] .tg-chip {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.14);
    color: #2563eb;
}

html[data-theme='light'] .tg-inline-pill,
html[data-theme='light'] .tg-highlight-row__tag,
html[data-theme='light'] .tg-verdict__label,
html[data-theme='light'] .tg-hand-row__tag {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.16);
    color: #2563eb;
}

html[data-theme='light'] .tg-hand-row.is-matchup,
html[data-theme='light'] .tg-pitch-mix-item.is-primary {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.16);
}

html[data-theme='light'] .tg-starter-stat__value,
html[data-theme='light'] .tg-history-stat__value,
html[data-theme='light'] .tg-hand-row__title,
html[data-theme='light'] .tg-pitch-mix-item__label,
html[data-theme='light'] .tg-compare-head__name {
    color: #0f172a;
}

html[data-theme='light'] .tg-hand-row__meta {
    color: #64748b;
}

html[data-theme='light'] .tg-starter-stat__label,
html[data-theme='light'] .tg-history-stat__label,
html[data-theme='light'] .tg-hand-row__stat,
html[data-theme='light'] .tg-pitch-mix-item__detail,
html[data-theme='light'] .tg-compare-head__sub,
html[data-theme='light'] .tg-compare-head__line {
    color: #64748b;
}

html[data-theme='light'] .tg-hand-row__stat {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(100, 116, 139, 0.18);
}

html[data-theme='light'] .tg-hand-row__stat strong {
    color: #0f172a;
}

html[data-theme='light'] .tg-hand-row__v {
    color: #0f172a;
}

html[data-theme='light'] .tg-hand-row__k {
    color: #64748b;
}

html[data-theme='light'] .tg-compare-head__line strong,
html[data-theme='light'] .tg-compare-head__v {
    color: #0f172a;
}

html[data-theme='light'] .tg-compare-head__k {
    color: #64748b;
}

html[data-theme='light'] .tg-no-data {
    color: #94a3b8;
}

/* ============================================================
   SEASON STATS — REDESIGN (ss- prefix)
   Dark mode default. Light mode overrides at bottom.
   ============================================================ */

.ss-section {
    background: var(--ps-bg-card, #111520);
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.ss-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ps-accent, #4582F0) 0%, transparent 60%);
    opacity: 0.5;
}

.ss-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ss-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ps-text-2, #888FA0);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'DM Sans', 'Outfit', sans-serif;
}

.ss-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--ps-accent, #4582F0);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Primary 4-stat row */
.ss-primary {
    display: flex;
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

.ss-stat--hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.9rem 0.5rem;
    border-right: 1px solid var(--ps-border, #1E2540);
    gap: 0.25rem;
}

.ss-stat--hero:last-child {
    border-right: none;
}

.ss-stat__val {
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--ps-text-1, #F0F2F8);
    line-height: 1;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    font-family: 'DM Sans', 'Outfit', sans-serif;
}

.ss-stat__lbl {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ps-text-2, #888FA0);
    font-family: 'DM Sans', 'Outfit', sans-serif;
}

/* Secondary stats strip */
.ss-secondary {
    display: flex;
    border: 1px solid rgba(30, 37, 64, 0.7);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(10, 14, 25, 0.3);
}

.ss-mini {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.25rem;
    border-right: 1px solid rgba(30, 37, 64, 0.6);
    gap: 0.15rem;
}

.ss-mini:last-child {
    border-right: none;
}

.ss-mini__val {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ps-text-1, #F0F2F8);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-family: 'DM Sans', 'Outfit', sans-serif;
}

.ss-mini__lbl {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ps-text-2, #888FA0);
    font-family: 'DM Sans', 'Outfit', sans-serif;
}

.ss-empty {
    font-size: 0.84rem;
    color: var(--ps-text-2, #888FA0);
    font-style: italic;
    text-align: center;
    padding: 1.25rem 0;
    margin: 0;
}

/* ============================================================
   RECENT PERFORMANCE — TABLE REDESIGN (rp- prefix)
   Dark mode default. Light mode overrides at bottom.
   ============================================================ */

.rp-section {
    background: var(--ps-bg-card, #111520);
    border: 1px solid var(--ps-border, #1E2540);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}

.rp-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ps-accent, #4582F0) 0%, transparent 60%);
    opacity: 0.5;
}

.rp-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rp-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ps-text-2, #888FA0);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'DM Sans', 'Outfit', sans-serif;
}

.rp-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--ps-accent, #4582F0);
    border-radius: 2px;
    flex-shrink: 0;
}

.rp-season {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ps-accent, #4582F0);
    background: rgba(69, 130, 240, 0.1);
    border: 1px solid rgba(69, 130, 240, 0.2);
    border-radius: 4px;
    padding: 0.12em 0.55em;
    letter-spacing: 0.04em;
    font-family: 'DM Sans', 'Outfit', sans-serif;
}

/* Table wrapper — horizontal scroll on mobile */
.rp-table-wrap {
    overflow-x: auto;
    margin: 0 -0.25rem;
    padding: 0 0.25rem;
}

.rp-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'DM Sans', 'Outfit', sans-serif;
    min-width: 520px;
}

/* Header row */
.rp-thead-row {
    border-bottom: 1px solid var(--ps-border, #1E2540);
}

.rp-th {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ps-text-2, #7A8FA8);
    padding: 0 0.9rem 0.65rem;
    text-align: center;
    white-space: nowrap;
}

.rp-th--period {
    text-align: left;
    padding-left: 0;
    width: 5.5rem;
}

.rp-th--rate {
    color: var(--ps-text-1, #C8D6E8);
    font-size: 0.68rem;
}

.rp-th--divider {
    border-left: 1px solid var(--ps-border, #1E2540);
}

.rp-th--dim {
    opacity: 0.45;
}

/* Data rows */
.rp-tr {
    border-bottom: 1px solid rgba(30, 37, 64, 0.55);
    transition: background-color 120ms;
}

.rp-tr--last {
    border-bottom: none;
}

.rp-tr:hover {
    background-color: rgba(69, 130, 240, 0.04);
}

.rp-td {
    padding: 0.8rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ps-text-1, #EEF2FF);
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Period cell */
.rp-td--period {
    text-align: left;
    padding-left: 0;
    padding-right: 1rem;
}

.rp-period-cell {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.rp-period-abbr {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.rp-period-sub {
    font-size: 0.58rem;
    font-weight: 500;
    color: var(--ps-text-2, #888FA0);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Rate stat columns (AVG, OPS) — slightly more prominent */
.rp-td--rate {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ps-text-1, #F0F2F8);
    letter-spacing: -0.01em;
}

/* Column divider before counting stats */
.rp-td--divider {
    border-left: 1px solid rgba(30, 37, 64, 0.55);
}

/* Dimmed (AB) */
.rp-td--dim {
    opacity: 0.45;
    font-size: 0.83rem;
}

/* Mobile: shrink padding slightly */
@media (max-width: 640px) {
    .rp-section {
        padding: 1.1rem 1.1rem;
    }
    .rp-th,
    .rp-td {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }
    .ss-stat__val {
        font-size: 1.35rem;
    }
    .ss-mini__val {
        font-size: 0.8rem;
    }
}

/* ============================================================
   SEASON STATS + RECENT PERFORMANCE — LIGHT MODE OVERRIDES
   ============================================================ */

html[data-theme='light'] .ss-section {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .ss-title {
    color: #64748b;
}

html[data-theme='light'] .ss-title::before {
    background: #2563eb;
}

html[data-theme='light'] .ss-primary {
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .ss-stat--hero {
    border-right-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .ss-stat__val {
    color: #0f172a;
}

html[data-theme='light'] .ss-stat__lbl {
    color: #64748b;
}

html[data-theme='light'] .ss-secondary {
    background: rgba(15, 23, 42, 0.025);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .ss-mini {
    border-right-color: rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .ss-mini__val {
    color: #1e293b;
}

html[data-theme='light'] .ss-mini__lbl {
    color: #94a3b8;
}

html[data-theme='light'] .rp-section {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .rp-title {
    color: #64748b;
}

html[data-theme='light'] .rp-title::before {
    background: #2563eb;
}

html[data-theme='light'] .rp-season {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.15);
}

html[data-theme='light'] .rp-thead-row {
    border-bottom-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .rp-th {
    color: #94a3b8;
}

html[data-theme='light'] .rp-th--rate {
    color: #475569;
}

html[data-theme='light'] .rp-th--divider {
    border-left-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .rp-tr {
    border-bottom-color: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .rp-tr:hover {
    background-color: rgba(37, 99, 235, 0.04);
}

html[data-theme='light'] .rp-td {
    color: #334155;
}

html[data-theme='light'] .rp-td--rate {
    color: #0f172a;
}

html[data-theme='light'] .rp-period-abbr {
    color: #0f172a;
}

html[data-theme='light'] .rp-period-sub {
    color: #94a3b8;
}

html[data-theme='light'] .rp-td--divider {
    border-left-color: rgba(15, 23, 42, 0.08);
}

/* =====================================================
   SPLITS SECTIONS  (sp- prefix)
   Home/Away and vs. Pitcher Hand
   ===================================================== */

.sp-section {
    background: #111520;
    border: 1px solid #1E2540;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.sp-section::before {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, #4582F0 0%, rgba(69,130,240,0.3) 60%, transparent 100%);
}

.sp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    gap: 12px;
}

.sp-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888FA0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 12px;
    background: #4582F0;
    border-radius: 2px;
    flex-shrink: 0;
}

.sp-table-wrap {
    overflow-x: auto;
    padding: 0 0 16px;
}

.sp-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
    font-size: 0.85rem;
}

.sp-thead-row {
    border-bottom: 1px solid #1E2540;
}

.sp-th {
    padding: 8px 12px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #4A5165;
    text-align: center;
    white-space: nowrap;
}

.sp-th:first-child,
.sp-th--split {
    text-align: left;
    padding-left: 20px;
    width: 80px;
}

.sp-th--rate {
    color: #727A8F;
}

.sp-th--secondary {
    color: #3D4560;
}

.sp-th:not(.sp-th--secondary) + .sp-th--secondary {
    border-left: 1px solid #1E2540;
}

.sp-th--divider {
    border-left: 1px solid #1E2540;
}

.sp-th--dim {
    color: #3D445A;
}

.sp-tr {
    border-bottom: 1px solid rgba(30, 37, 64, 0.6);
    transition: background-color 0.1s ease;
}

.sp-tr:hover {
    background-color: rgba(69, 130, 240, 0.04);
}

.sp-tr--last {
    border-bottom: none;
}

.sp-tr--opp-match {
    background-color: rgba(69, 130, 240, 0.09);
}

.sp-tr--opp-match td:first-child {
    border-left: 2px solid rgba(69, 130, 240, 0.6);
    padding-left: 10px;
}

.sp-tr--opp-match:hover {
    background-color: rgba(69, 130, 240, 0.14);
}

html[data-theme='light'] .sp-tr--opp-match {
    background-color: rgba(37, 99, 235, 0.05);
}

html[data-theme='light'] .sp-tr--opp-match td:first-child {
    border-left: 2px solid rgba(37, 99, 235, 0.5);
    padding-left: 10px;
}

html[data-theme='light'] .sp-tr--opp-match:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

/* Starter's Pitches Only — filter */
[data-vs-table-view-panel="pitch"].sp-starter-only-active tr[data-pitch-type]:not(.sp-tr--opp-match) {
    display: none;
}

/* Starter's Pitches Only — SP% column visibility */
.sp-section--vs-pitch [data-vs-table-view-panel="pitch"] .sp-th--sp-usage,
.sp-section--vs-pitch [data-vs-table-view-panel="pitch"] .sp-td--sp-usage {
    display: none;
    border-left: none;
}

.sp-section--vs-pitch [data-vs-table-view-panel="pitch"] .sp-th--sp-usage {
    border-right: 1px solid #1E2540;
}

.sp-section--vs-pitch [data-vs-table-view-panel="pitch"] .sp-td--sp-usage {
    border-right: 1px solid rgba(30, 37, 64, 0.8);
}

.sp-section--vs-pitch [data-vs-table-view-panel="pitch"].sp-starter-only-active .sp-th--sp-usage,
.sp-section--vs-pitch [data-vs-table-view-panel="pitch"].sp-starter-only-active .sp-td--sp-usage {
    display: table-cell;
}

.sp-section--vs-pitch [data-vs-table-view-panel="pitch"] .sp-tr--section-divider {
    pointer-events: none;
}

.sp-section--vs-pitch [data-vs-table-view-panel="pitch"] .sp-td--section-divider {
    padding: 9px 14px 8px;
    background: rgba(10, 16, 34, 0.95);
    border-top: 1px solid rgba(122, 143, 168, 0.3);
    border-bottom: 1px solid rgba(122, 143, 168, 0.2);
    color: #8FA3C8;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

html[data-theme='light'] .sp-section--vs-pitch [data-vs-table-view-panel="pitch"] .sp-th--sp-usage {
    border-right-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .sp-section--vs-pitch [data-vs-table-view-panel="pitch"] .sp-td--sp-usage {
    border-right-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .sp-section--vs-pitch [data-vs-table-view-panel="pitch"] .sp-td--section-divider {
    background: rgba(248, 250, 252, 0.95);
    border-top-color: rgba(37, 99, 235, 0.2);
    border-bottom-color: rgba(15, 23, 42, 0.08);
    color: #38507A;
}

/* Starter-only toggle button — lives inside sp-opp-mix */
.sp-opp-mix .sp-starter-only-btn {
    margin-left: auto;
    flex-shrink: 0;
}

.sp-starter-only-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 7px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #4A5878;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    line-height: 1;
}

.sp-starter-only-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.14);
    color: #6B7FA8;
}

.sp-starter-only-btn.active {
    background: rgba(69, 130, 240, 0.15);
    border-color: rgba(69, 130, 240, 0.4);
    color: #7AABF0;
}

/* Checkbox indicator */
.sp-starter-only-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.sp-starter-only-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
    /* checkmark via border trick */
    top: 1px;
    left: 3px;
    width: 5px;
    height: 8px;
    border: 1.5px solid #7AABF0;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.sp-starter-only-btn.active .sp-starter-only-dot {
    background: rgba(69, 130, 240, 0.2);
    border-color: rgba(69, 130, 240, 0.6);
}

.sp-starter-only-btn.active .sp-starter-only-dot::after {
    opacity: 1;
}

html[data-theme='light'] .sp-starter-only-btn {
    color: #64748B;
    border-color: rgba(15, 23, 42, 0.12);
}

html[data-theme='light'] .sp-starter-only-btn:hover {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.2);
    color: #334155;
}

html[data-theme='light'] .sp-starter-only-btn.active {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.35);
    color: #1d4ed8;
}

html[data-theme='light'] .sp-starter-only-dot {
    border-color: rgba(15, 23, 42, 0.2);
}

html[data-theme='light'] .sp-starter-only-dot::after {
    border-color: #2563eb;
}

html[data-theme='light'] .sp-starter-only-btn.active .sp-starter-only-dot {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.5);
}

.sp-td {
    padding: 13px 12px;
    text-align: center;
    color: #9AA3B8;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sp-td:first-child,
.sp-td--split {
    text-align: left;
    padding-left: 20px;
}

.sp-td--rate {
    color: #E2E6F0;
    font-weight: 600;
    font-size: 0.9rem;
}

.sp-td--secondary {
    color: #3D4560;
    font-size: 0.8rem;
}

.sp-td:not(.sp-td--secondary) + .sp-td--secondary {
    border-left: 1px solid rgba(30, 37, 64, 0.8);
}

.sp-td--divider {
    border-left: 1px solid rgba(30, 37, 64, 0.8);
}

.sp-td--dim {
    color: #4A5165;
    font-size: 0.8rem;
}

.sp-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #B0B8CC;
    background: rgba(69, 130, 240, 0.1);
    border: 1px solid rgba(69, 130, 240, 0.2);
    border-radius: 4px;
    padding: 3px 8px;
    line-height: 1;
}

.sp-label.sp-label--today-side {
    border-color: rgba(69, 130, 240, 0.38);
    background: linear-gradient(180deg, rgba(69, 130, 240, 0.18), rgba(69, 130, 240, 0.09));
    box-shadow:
        0 0 0 1px rgba(69, 130, 240, 0.16) inset,
        0 0 12px rgba(69, 130, 240, 0.18);
}

.sp-empty {
    padding: 24px 20px;
    color: #4A5165;
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
}

/* Vs Pitch control bar */
.sp-section--vs-pitch .sp-header {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 14px;
    row-gap: 10px;
}

.sp-section--vs-pitch .sp-view-toggle {
    justify-self: start;
    margin-left: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid rgba(69, 130, 240, 0.16);
    border-radius: 10px;
    background: rgba(69, 130, 240, 0.05);
    box-shadow: none;
}

.sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn {
    min-height: unset;
    padding: 0.36rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #4A5878;
    box-shadow: none;
    font-size: 0.79rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 0;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn:hover,
.sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn:focus-visible {
    color: #8090B8;
    background: rgba(255, 255, 255, 0.05);
    border-color: transparent;
}

.sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn.active {
    color: #D0DCFA;
    font-weight: 700;
    background: rgba(69, 130, 240, 0.2);
    border-color: rgba(69, 130, 240, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sp-section--vs-pitch .sp-controls {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sp-section--vs-pitch .sp-actions {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.sp-section--vs-pitch .sp-filter-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7b869d;
    white-space: nowrap;
}

.sp-section--vs-pitch .sp-filter-select {
    min-width: 88px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #d6deef;
    font-size: 0.93rem;
    font-weight: 600;
    padding: 0 0.7rem;
    line-height: 1;
}

.sp-section--vs-pitch .sp-filter-select:focus {
    outline: none;
    border-color: rgba(69, 130, 240, 0.6);
    box-shadow: 0 0 0 3px rgba(69, 130, 240, 0.16);
}

@media (max-width: 1220px) {
    .sp-section--vs-pitch .sp-header {
        grid-template-columns: 1fr auto;
    }

    .sp-section--vs-pitch .sp-view-toggle {
        justify-self: start;
    }

    .sp-section--vs-pitch .sp-controls {
        grid-column: auto;
        justify-self: end;
    }
}

@media (max-width: 860px) {
    .sp-section--vs-pitch .sp-header {
        grid-template-columns: 1fr;
    }

    .sp-section--vs-pitch .sp-view-toggle,
    .sp-section--vs-pitch .sp-controls {
        justify-self: start;
    }
}

/* ── VS PITCH: pitcher hand toggle (pill tabs) ───────── */

.sp-hand-toggle.ps-percentile-season-toggle .ps-percentile-season-btn {
    padding: 0.26rem 0.5rem;
    font-size: 0.64rem;
    min-width: unset;
}

/* ── VS PITCH: per-pitch results visual style ─────────── */

/* Remove section top gradient bar */
.sp-section--vs-pitch::before {
    display: none;
}


/* Compact header with border-bottom separator */
.sp-section--vs-pitch .sp-header {
    padding: 0.58rem 0.78rem;
    border-bottom: 1px solid #1E2540;
    row-gap: 6px;
}

/* Pitch/bucket labels: plain text, no badge box */
.sp-section--vs-pitch .sp-label {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #D0D8EC;
}

/* Compact table cells */
.sp-section--vs-pitch .sp-td {
    padding: 0.5rem 0.56rem;
}

.sp-section--vs-pitch .sp-th {
    padding: 0.4rem 0.56rem;
}

/* Subtle thead background */
.sp-section--vs-pitch thead tr {
    background: rgba(255, 255, 255, 0.02);
}

/* ── Opponent starter pitch mix banner ───────────────── */

.sp-opp-mix {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 16px;
    margin-bottom: 2px;
    background: rgba(69, 130, 240, 0.06);
    border-bottom: 1px solid rgba(69, 130, 240, 0.12);
}

.sp-opp-mix-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #6b7a99;
    white-space: nowrap;
    flex-shrink: 0;
}

.sp-opp-mix-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sp-opp-mix-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.78rem;
    line-height: 1;
}

.sp-opp-mix-name {
    font-weight: 600;
    color: #c8d3ea;
}

.sp-opp-mix-speed {
    font-weight: 500;
    color: #4582f0;
    font-size: 0.74rem;
}

.sp-opp-mix-pct {
    font-weight: 700;
    color: #8da8d8;
    font-size: 0.74rem;
}

html[data-theme='light'] .sp-opp-mix {
    background: rgba(37, 99, 235, 0.04);
    border-bottom-color: rgba(37, 99, 235, 0.1);
}

html[data-theme='light'] .sp-opp-mix-label {
    color: #64748b;
}

html[data-theme='light'] .sp-opp-mix-chip {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.04);
}

html[data-theme='light'] .sp-opp-mix-name {
    color: #334155;
}

html[data-theme='light'] .sp-opp-mix-speed {
    color: #1d4ed8;
}

html[data-theme='light'] .sp-opp-mix-pct {
    color: #4a6fa5;
}

/* ── Light mode overrides ────────────────────────────── */

html[data-theme='light'] .sp-section {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .sp-section::before {
    background: linear-gradient(90deg, #2563eb 0%, rgba(37,99,235,0.3) 60%, transparent 100%);
}

html[data-theme='light'] .sp-title {
    color: #64748b;
}

html[data-theme='light'] .sp-title::before {
    background: #2563eb;
}

html[data-theme='light'] .sp-thead-row {
    border-bottom-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .sp-th {
    color: #94a3b8;
}

html[data-theme='light'] .sp-th--rate {
    color: #475569;
}

html[data-theme='light'] .sp-th--divider {
    border-left-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .sp-th--dim {
    color: #94a3b8;
}

html[data-theme='light'] .sp-tr {
    border-bottom-color: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .sp-tr:hover {
    background-color: rgba(37, 99, 235, 0.04);
}

html[data-theme='light'] .sp-td {
    color: #64748b;
}

html[data-theme='light'] .sp-td--rate {
    color: #0f172a;
}

html[data-theme='light'] .sp-td--divider {
    border-left-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .sp-td--dim {
    color: #94a3b8;
}

html[data-theme='light'] .sp-label {
    color: #334155;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.18);
}

html[data-theme='light'] .sp-label.sp-label--today-side {
    border-color: rgba(37, 99, 235, 0.3);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.14), rgba(37, 99, 235, 0.08));
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.1) inset,
        0 0 10px rgba(37, 99, 235, 0.14);
}

html[data-theme='light'] .sp-empty {
    color: #94a3b8;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-view-toggle {
    border: none;
    background: transparent;
    border-bottom-color: rgba(15, 23, 42, 0.14);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn {
    color: #94a3b8;
    font-weight: 500;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn:hover,
html[data-theme='light'] .sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn:focus-visible {
    background: rgba(37, 99, 235, 0.04);
    color: #475569;
    border-bottom-color: rgba(37, 99, 235, 0.3);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn.active {
    background: rgba(37, 99, 235, 0.04);
    color: #1d4ed8;
    font-weight: 700;
    border-bottom-color: #2563eb;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-filter-label {
    color: #64748b;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-filter-select {
    border-color: rgba(15, 23, 42, 0.18);
    background: #ffffff;
    color: #1f2937;
}

/* Per-pitch results style overrides (light mode) */
html[data-theme='light'] .sp-section--vs-pitch::before {
    display: none;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-header {
    border-bottom-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-label {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #1f2937;
}

html[data-theme='light'] .sp-section--vs-pitch thead tr {
    background: rgba(15, 23, 42, 0.025);
}

/* ── VS PITCH / VS VELOCITY visual refresh ─────────────────── */
.sp-section--vs-pitch {
    overflow: hidden;
    border-radius: 8px;
    border-color: rgba(126, 177, 248, 0.13);
    background:
        radial-gradient(circle at top left, rgba(69, 130, 240, 0.1), transparent 34rem),
        linear-gradient(180deg, rgba(14, 18, 30, 0.98), rgba(9, 13, 22, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 18px 38px rgba(2, 8, 23, 0.18);
}

.sp-section--vs-pitch .sp-header.sp-vs-header {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: start;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(126, 177, 248, 0.1);
    background:
        linear-gradient(90deg, rgba(69, 130, 240, 0.08), transparent 58%),
        rgba(255, 255, 255, 0.015);
}

.sp-vs-heading {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.sp-vs-eyebrow {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #7eb1f8;
}

.sp-vs-title {
    margin: 0;
    color: #f2f6ff;
    font-family: 'Outfit', 'DM Sans', sans-serif;
    font-size: 1.06rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.sp-vs-subtitle {
    margin: 0;
    color: #7d879b;
    font-size: 0.78rem;
    line-height: 1.38;
}

.sp-vs-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.sp-section--vs-pitch .sp-view-toggle,
.sp-section--vs-pitch .sp-hand-toggle.ps-percentile-season-toggle {
    min-height: 2.35rem;
    border-radius: 8px;
    border: 1px solid rgba(126, 177, 248, 0.16);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sp-section--vs-pitch .sp-view-toggle,
.sp-section--vs-pitch .sp-hand-toggle.ps-percentile-season-toggle {
    margin: 0;
    padding: 0.22rem;
}

.sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn,
.sp-hand-toggle.ps-percentile-season-toggle .ps-percentile-season-btn {
    min-height: 1.85rem;
    border-radius: 6px;
    color: #7f8ca5;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn {
    padding: 0 0.92rem;
    min-width: 5.4rem;
}

.sp-hand-toggle.ps-percentile-season-toggle .ps-percentile-season-btn {
    padding: 0 0.76rem;
    min-width: 4.45rem;
}

.sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn.active,
.sp-hand-toggle.ps-percentile-season-toggle .ps-percentile-season-btn.active {
    color: #f8fbff;
    border-color: rgba(96, 165, 250, 0.45);
    background: linear-gradient(180deg, rgba(69, 130, 240, 0.58), rgba(37, 99, 235, 0.62));
    box-shadow:
        0 8px 18px rgba(37, 99, 235, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.sp-section--vs-pitch .sp-controls {
    grid-column: auto;
    justify-self: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.sp-section--vs-pitch .sp-actions {
    min-height: 2rem;
}

.sp-section--vs-pitch .sp-filter-label {
    color: #8a96ad;
}

.sp-section--vs-pitch .sp-filter-select {
    height: 2rem;
    border-radius: 7px;
    border-color: rgba(126, 177, 248, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #e6edf8;
    font-size: 0.82rem;
}

.sp-section--vs-pitch .sp-opp-mix {
    position: relative;
    display: grid;
    grid-template-columns: minmax(185px, 0.34fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    margin: 0.9rem 1rem 0;
    padding: 0.86rem 0.92rem;
    border: 1px solid rgba(126, 177, 248, 0.14);
    border-radius: 8px;
    background:
        radial-gradient(circle at top left, rgba(69, 130, 240, 0.14), transparent 16rem),
        linear-gradient(180deg, rgba(18, 25, 40, 0.92), rgba(13, 18, 30, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.sp-opp-mix-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.sp-opp-mix-eyebrow {
    color: #7a88a1;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sp-opp-mix-label {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    color: #eef4ff;
    font-size: 0.86rem;
    font-weight: 850;
    letter-spacing: -0.01em;
    text-transform: none;
    white-space: normal;
}

.sp-opp-mix-label span,
.sp-opp-mix-label em {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0.16rem 0.38rem;
    border-radius: 5px;
    border: 1px solid rgba(126, 177, 248, 0.18);
    background: rgba(69, 130, 240, 0.09);
    color: #9fc5ff;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sp-opp-mix-chips {
    gap: 0.46rem;
}

.sp-opp-mix-chip {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 0.24rem;
    min-height: 2.28rem;
    padding: 0.42rem 0.62rem;
    border-radius: 7px;
    border-color: rgba(126, 177, 248, 0.14);
    background:
        linear-gradient(90deg, rgba(69, 130, 240, 0.22) var(--mix-pct, 0%), rgba(255, 255, 255, 0.045) 0),
        rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sp-opp-mix-name {
    color: #e6edf8;
    font-weight: 800;
    font-size: 0.77rem;
    line-height: 1.1;
    min-height: 0.92rem;
    display: inline-flex;
    align-items: center;
}

.sp-opp-mix-meta {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    gap: 0.26rem;
    min-height: 1.04rem;
}

.sp-opp-mix-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.3rem;
    border-radius: 999px;
    border: 1px solid rgba(126, 177, 248, 0.2);
    background: rgba(9, 14, 25, 0.26);
    line-height: 1;
    white-space: nowrap;
}

.sp-opp-mix-stat-label {
    color: #7f8eaa;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sp-opp-mix-stat-value {
    color: #8ab9ff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.sp-opp-mix-speed,
.sp-opp-mix-pct {
    color: #8ab9ff;
    font-weight: 850;
}

.sp-opp-mix .sp-starter-only-btn {
    justify-self: end;
    margin-left: 0;
}

.sp-section--vs-pitch .sp-starter-only-btn {
    min-height: 2rem;
    padding: 0.42rem 0.7rem 0.42rem 0.52rem;
    border-color: rgba(126, 177, 248, 0.16);
    background: rgba(255, 255, 255, 0.035);
    color: #8a96ad;
    font-weight: 750;
}

.sp-section--vs-pitch .sp-starter-only-btn:hover {
    border-color: rgba(126, 177, 248, 0.28);
    background: rgba(69, 130, 240, 0.08);
    color: #cbd9ee;
}

.sp-section--vs-pitch .sp-starter-only-btn.active {
    border-color: rgba(96, 165, 250, 0.42);
    background: rgba(69, 130, 240, 0.16);
    color: #dbeafe;
}

.sp-section--vs-pitch .sp-table-wrap {
    margin: 0.9rem 1rem 1rem;
    padding: 0;
    border: 1px solid rgba(126, 177, 248, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.018);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.sp-section--vs-pitch .sp-table {
    min-width: 1060px;
}

.sp-section--vs-pitch .sp-thead-row {
    border-bottom-color: rgba(126, 177, 248, 0.12);
    background: rgba(255, 255, 255, 0.035);
}

.sp-section--vs-pitch .sp-th {
    padding: 0.62rem 0.6rem;
    color: #65728b;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.sp-section--vs-pitch .sp-th--rate {
    color: #9db3d4;
}

.sp-section--vs-pitch .sp-tr {
    border-bottom-color: rgba(126, 177, 248, 0.055);
}

.sp-section--vs-pitch .sp-tr:hover {
    background: rgba(69, 130, 240, 0.07);
}

.sp-section--vs-pitch .sp-tr--pitch-group {
    background: rgba(69, 130, 240, 0.06);
}

.sp-section--vs-pitch .sp-tr--pitch-group .sp-label {
    color: #f4f8ff;
    letter-spacing: 0.01em;
}

.sp-section--vs-pitch .sp-tr--pitch-divider .sp-td {
    border-top: 1px solid rgba(126, 177, 248, 0.2);
}

.sp-section--vs-pitch .sp-tr--opp-match {
    background: transparent;
}

.sp-section--vs-pitch .sp-tr--opp-match td:first-child {
    border-left: 3px solid rgba(91, 151, 255, 0.88);
    padding-left: 0.78rem;
    background: linear-gradient(90deg, rgba(69, 130, 240, 0.13), rgba(69, 130, 240, 0.035) 68%, transparent);
}

.sp-section--vs-pitch .sp-tr--opp-match .sp-td {
    border-top: 1px solid rgba(126, 177, 248, 0.09);
    border-bottom: 1px solid rgba(126, 177, 248, 0.08);
}

.sp-section--vs-pitch .sp-tr--opp-match .sp-label {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.22rem 0.5rem;
    border: 1px solid rgba(126, 177, 248, 0.18);
    border-radius: 6px;
    background: rgba(69, 130, 240, 0.09);
    color: #f4f8ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sp-section--vs-pitch .sp-tr--opp-match .sp-label::before {
    content: '';
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 999px;
    background: #6aa5ff;
    box-shadow: 0 0 0 3px rgba(106, 165, 255, 0.14);
    flex: 0 0 auto;
}

.sp-section--vs-pitch .sp-tr--opp-match .sp-td--rate {
    color: #f7fbff;
}

.sp-section--vs-pitch .sp-td {
    padding: 0.72rem 0.6rem;
    color: #93a0b6;
    font-size: 0.85rem;
}

.sp-section--vs-pitch .sp-td--split {
    min-width: 8rem;
}

.sp-section--vs-pitch .sp-label {
    color: #eef4ff;
    font-size: 0.88rem;
    font-weight: 850;
}

.sp-section--vs-pitch .sp-td--rate {
    color: #f2f6ff;
    font-weight: 850;
    font-size: 0.92rem;
}

.sp-section--vs-pitch .sp-td--secondary,
.sp-section--vs-pitch .sp-th--secondary,
.sp-section--vs-pitch .sp-td--dim,
.sp-section--vs-pitch .sp-th--dim {
    color: #5f6b80;
}

html[data-theme='light'] .sp-section--vs-pitch {
    border-color: rgba(15, 23, 42, 0.1);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34rem),
        #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05), 0 10px 24px rgba(15, 23, 42, 0.04);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-header.sp-vs-header {
    border-bottom-color: rgba(15, 23, 42, 0.08);
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.055), transparent 58%),
        rgba(255, 255, 255, 0.92);
}

html[data-theme='light'] .sp-vs-eyebrow {
    color: #2563eb;
}

html[data-theme='light'] .sp-vs-title {
    color: #0f172a;
}

html[data-theme='light'] .sp-vs-subtitle {
    color: #64748b;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-view-toggle,
html[data-theme='light'] .sp-section--vs-pitch .sp-hand-toggle.ps-percentile-season-toggle {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.035);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn,
html[data-theme='light'] .sp-hand-toggle.ps-percentile-season-toggle .ps-percentile-season-btn {
    color: #64748b;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn.active,
html[data-theme='light'] .sp-hand-toggle.ps-percentile-season-toggle .ps-percentile-season-btn.active {
    color: #ffffff;
    background: linear-gradient(180deg, #4f8dff, #2563eb);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-filter-select {
    border-color: rgba(15, 23, 42, 0.14);
    background: #ffffff;
    color: #0f172a;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-opp-mix {
    border-color: rgba(37, 99, 235, 0.13);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 16rem),
        linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(241, 245, 249, 0.94));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.045);
}

html[data-theme='light'] .sp-opp-mix-eyebrow {
    color: #64748b;
}

html[data-theme='light'] .sp-opp-mix-label {
    color: #0f172a;
}

html[data-theme='light'] .sp-opp-mix-label span,
html[data-theme='light'] .sp-opp-mix-label em {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.16);
}

html[data-theme='light'] .sp-opp-mix-chip {
    border-color: rgba(37, 99, 235, 0.13);
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.12) var(--mix-pct, 0%), rgba(15, 23, 42, 0.035) 0),
        #ffffff;
}

html[data-theme='light'] .sp-opp-mix-name {
    color: #1e293b;
}

html[data-theme='light'] .sp-opp-mix-stat {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(37, 99, 235, 0.2);
}

html[data-theme='light'] .sp-opp-mix-stat-label {
    color: #64748b;
}

html[data-theme='light'] .sp-opp-mix-stat-value {
    color: #2563eb;
}

html[data-theme='light'] .sp-opp-mix-speed,
html[data-theme='light'] .sp-opp-mix-pct {
    color: #2563eb;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-starter-only-btn {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.78);
    color: #64748b;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-starter-only-btn:hover {
    border-color: rgba(37, 99, 235, 0.22);
    background: rgba(37, 99, 235, 0.055);
    color: #1d4ed8;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-starter-only-btn.active {
    border-color: rgba(37, 99, 235, 0.34);
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-table-wrap {
    border-color: rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.72);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-thead-row {
    background: rgba(15, 23, 42, 0.035);
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-th {
    color: #94a3b8;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-th--rate {
    color: #475569;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-tr {
    border-bottom-color: rgba(15, 23, 42, 0.055);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-tr--pitch-group {
    background: rgba(37, 99, 235, 0.05);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-tr--pitch-group .sp-label {
    color: #0f172a;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-tr--pitch-divider .sp-td {
    border-top-color: rgba(37, 99, 235, 0.18);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-tr--opp-match {
    background: transparent;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-tr--opp-match td:first-child {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.025) 68%, transparent);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-tr--opp-match .sp-td {
    border-top-color: rgba(37, 99, 235, 0.1);
    border-bottom-color: rgba(37, 99, 235, 0.08);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-tr--opp-match .sp-label {
    border-color: rgba(37, 99, 235, 0.16);
    background: rgba(37, 99, 235, 0.06);
    color: #0f172a;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-tr--opp-match .sp-label::before {
    background: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

html[data-theme='light'] .sp-section--vs-pitch .sp-label,
html[data-theme='light'] .sp-section--vs-pitch .sp-td--rate {
    color: #0f172a;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-td {
    color: #64748b;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-td--secondary,
html[data-theme='light'] .sp-section--vs-pitch .sp-th--secondary,
html[data-theme='light'] .sp-section--vs-pitch .sp-td--dim,
html[data-theme='light'] .sp-section--vs-pitch .sp-th--dim {
    color: #b6c1d1;
}

@media (max-width: 1220px) {
    .sp-section--vs-pitch .sp-header.sp-vs-header {
        grid-template-columns: 1fr;
    }

    .sp-vs-toolbar,
    .sp-section--vs-pitch .sp-controls {
        justify-content: flex-start;
    }

    .sp-section--vs-pitch .sp-opp-mix {
        grid-template-columns: 1fr;
    }

    .sp-opp-mix .sp-starter-only-btn {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .sp-section--vs-pitch .sp-header.sp-vs-header {
        padding: 0.95rem;
    }

    .sp-vs-toolbar,
    .sp-section--vs-pitch .sp-controls,
    .sp-section--vs-pitch .sp-view-toggle,
    .sp-section--vs-pitch .sp-hand-toggle.ps-percentile-season-toggle {
        width: 100%;
    }

    .sp-section--vs-pitch .sp-view-toggle .ps-percentile-season-btn,
    .sp-hand-toggle.ps-percentile-season-toggle .ps-percentile-season-btn {
        flex: 1;
        min-width: 0;
    }

    .sp-section--vs-pitch .sp-actions {
        width: 100%;
        justify-content: space-between;
    }

    .sp-section--vs-pitch .sp-filter-select {
        flex: 1;
    }

    .sp-section--vs-pitch .sp-opp-mix,
    .sp-section--vs-pitch .sp-table-wrap {
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }
}

/* ============================================================
   BETTING FOCUSED SECTION
   ============================================================ */

/* Outer wrapper */
.ps-betting-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
}

/* Section header bar */
.ps-betting-section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0 1rem 0;
    border-bottom: 1px solid rgba(69, 130, 240, 0.2);
    margin-bottom: 0.25rem;
}

.ps-betting-section-header::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4582F0;
    flex-shrink: 0;
}

.ps-betting-section-header__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #4582F0;
}

/* Individual pillar containers */
.ps-betting-pillar {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1.25rem 0 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ps-betting-pillar:last-child {
    border-bottom: none;
}

/* Pillar label */
.ps-pillar-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5a6378;
    margin-bottom: 0.75rem;
}

/* LIVE INTEL pillar accent */
.ps-betting-pillar--live {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
}

/* LIVE badge */
.ps-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 3px;
    padding: 0.15rem 0.45rem;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #22c55e;
    text-transform: uppercase;
}

/* Pulsing dot inside LIVE badge */
.ps-live-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    animation: ps-live-pulse 2s ease-in-out infinite;
}

@keyframes ps-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

/* PROP SNAPSHOT: side-by-side grid */
.ps-snap-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: start;
}

.ps-snap-grid .recent-performance-container {
    margin-bottom: 0;
}

/* LIVE GRID: side-by-side panels */
.ps-live-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: start;
}

.ps-live-grid__section {
    margin-bottom: 0;
}

/* Ensure live grid sections fill height cleanly */
.ps-live-grid__panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ps-live-grid__panel .recent-performance-container {
    flex: 1;
    margin-bottom: 0;
}

/* Mobile: stack all grids */
@media (max-width: 767px) {
    .ps-snap-grid {
        grid-template-columns: 1fr;
    }

    .ps-live-grid {
        grid-template-columns: 1fr;
    }

}

/* Light mode overrides */
html[data-theme='light'] .ps-betting-section-header {
    border-bottom-color: rgba(37, 99, 235, 0.2);
}

html[data-theme='light'] .ps-betting-section-header__label {
    color: #2563eb;
}

html[data-theme='light'] .ps-betting-section-header::before {
    background: #2563eb;
}

html[data-theme='light'] .ps-betting-pillar {
    border-bottom-color: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .ps-pillar-label {
    color: #94a3b8;
}

html[data-theme='light'] .ps-live-badge {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.3);
    color: #16a34a;
}

html[data-theme='light'] .ps-live-dot {
    background: #16a34a;
}


/* =====================================================
   PAGE CHAPTER BLOCKS
   Three top-level content chapters:
   01 Stats & Splits | 02 Today's Game | 03 Betting
   ===================================================== */

/* ── Outer chapter wrapper (blocks 1 & 3) ─────────── */
.ps-chapter-block {
    background: #0D1120;
    border: 1px solid rgba(30, 37, 64, 0.72);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.75rem;
    position: relative;
}

/* ── Chapter header area ───────────────────────────── */
.ps-chapter-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(69, 130, 240, 0.1);
}

/* ── Kicker: number badge + category label ─────────── */
.ps-chapter-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ps-accent, #4582F0);
    font-family: 'DM Sans', 'Outfit', sans-serif;
    line-height: 1;
}

/* ── Chapter number badge ──────────────────────────── */
.ps-chapter-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: rgba(69, 130, 240, 0.12);
    border: 1px solid rgba(69, 130, 240, 0.22);
    font-size: 0.58rem;
    font-weight: 800;
    color: #4582F0;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    line-height: 1;
}

/* ── Chapter section title ─────────────────────────── */
.ps-chapter-title {
    font-family: 'Outfit', 'DM Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ps-text-1, #F0F2F8);
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

/* ── Today's Game kicker variant (inside tg-header) ── */
.tg-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ps-accent, #4582F0);
    font-family: 'DM Sans', 'Outfit', sans-serif;
    line-height: 1;
    margin-bottom: 0.4rem;
}

/* ── Align tg-section visually with chapter blocks ─── */
#player-overview-content > .tg-section {
    background: #0D1120;
    border-color: rgba(30, 37, 64, 0.72);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.75rem;
}

/* ── Clean up last-child margins within chapter block ─ */
.ps-chapter-block > *:last-child,
.ps-chapter-block .ps-betting-section > *:last-child {
    margin-bottom: 0;
}

/* ── Remove redundant margin-top inside betting block ─ */
.ps-chapter-block--betting .ps-betting-section {
    margin-top: 0;
}


/* ── Responsive: tighten padding on small screens ──── */
@media (max-width: 600px) {
    .ps-chapter-block {
        padding: 1.25rem 1rem;
        border-radius: 12px;
        margin-bottom: 1.25rem;
    }

    #player-overview-content > .tg-section {
        padding: 1.25rem 1rem;
        border-radius: 12px;
        margin-bottom: 1.25rem;
    }

}

/* ── Light mode ─────────────────────────────────────── */
html[data-theme='light'] .ps-chapter-block {
    background: #edf2fb;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .ps-chapter-header {
    border-bottom-color: rgba(37, 99, 235, 0.12);
}

html[data-theme='light'] .ps-chapter-kicker,
html[data-theme='light'] .tg-kicker {
    color: #2563eb;
}

html[data-theme='light'] .ps-chapter-num {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.18);
    color: #2563eb;
}

html[data-theme='light'] .ps-chapter-title {
    color: #0f172a;
}

html[data-theme='light'] #player-overview-content > .tg-section {
    background: #edf2fb;
    border-color: rgba(15, 23, 42, 0.1);
}


/* ============================================================
   PAV2 — PROP ANGLES V2 REDESIGN
   Dark mode = base; light mode overrides at bottom
   ============================================================ */

/* ── Section container ──────────────────────────────────────── */
.pav2-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0;
}

/* ── Intelligence bar ───────────────────────────────────────── */
.pav2-intel-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: rgba(69, 130, 240, 0.08);
    border: 1px solid rgba(69, 130, 240, 0.2);
    border-radius: 10px;
}

.pav2-intel-chip {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.45rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    min-width: 100px;
}

.pav2-intel-chip--accent {
    background: rgba(69, 130, 240, 0.15);
    border-color: rgba(69, 130, 240, 0.35);
}

.pav2-intel-chip__label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #727A8F;
}

.pav2-intel-chip__value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #F0F2F8;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

/* ── Module (card) ──────────────────────────────────────────── */
.pav2-module {
    background: #0E1017;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pav2-module__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pav2-module__title-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.pav2-module__title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #E8ECF4;
    margin: 0;
    letter-spacing: -0.01em;
}

.pav2-module__subtitle {
    font-size: 0.775rem;
    color: #727A8F;
    margin: 0;
    line-height: 1.4;
}

.pav2-module__header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── Two-column layout ──────────────────────────────────────── */
.pav2-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .pav2-two-col {
        grid-template-columns: 1fr;
    }
}

/* ── Percentile chart wrapper ───────────────────────────────── */
.pav2-percentile-chart {
    /* inherits ps-percentile-chart sizing */
}

/* ── Prop Correlations ──────────────────────────────────────── */
.pav2-corr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

@media (max-width: 640px) {
    .pav2-corr-grid {
        grid-template-columns: 1fr;
    }
}

#prop-ladders-shell .pav2-module {
    padding: 0.875rem 1.5rem;
    gap: 0.75rem;
}


#prop-ladders-shell .pav2-corr-row2__prop {
    font-size: 0.78rem;
}

#prop-ladders-shell .pav2-corr-row2--featured .pav2-corr-row2__prop {
    font-size: 0.84rem;
}

.pav2-corr-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 0.75rem 1.2rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 100%;
    position: relative;
    overflow: hidden;
    transition:
        transform 220ms cubic-bezier(0.25, 1, 0.5, 1),
        border-color 220ms cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 220ms cubic-bezier(0.25, 1, 0.5, 1),
        background-color 220ms cubic-bezier(0.25, 1, 0.5, 1);
    animation: pav2-corr-card-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pav2-corr-card:nth-child(2) {
    animation-delay: 70ms;
}

.pav2-corr-card:hover,
.pav2-corr-card:focus-within {
    transform: translateY(-2px);
    border-color: rgba(126, 177, 248, 0.16);
    background: rgba(255, 255, 255, 0.036);
    box-shadow:
        0 14px 30px rgba(6, 12, 24, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.pav2-corr-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(126, 177, 248, 0.08), transparent 30%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-corr-card:hover::after,
.pav2-corr-card:focus-within::after {
    opacity: 1;
}

.pav2-corr-card__if {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4A5165;
}

.pav2-corr-card__trigger {
    font-size: 0.875rem;
    font-weight: 600;
    color: #C4C9D4;
    line-height: 1.35;
}

.pav2-corr-card__prop {
    font-size: 0.75rem;
    color: #888FA0;
    line-height: 1.3;
    padding: 0.35rem 0.5rem;
    background: rgba(69, 130, 240, 0.08);
    border-radius: 5px;
    border-left: 2px solid rgba(69, 130, 240, 0.4);
}

.pav2-corr-card__sample {
    font-size: 0.64rem;
    font-weight: 500;
    color: #5c6478;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    margin-left: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}

.pav2-corr-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.15rem;
}

.pav2-corr-row {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    align-items: center;
    gap: 0.5rem;
}

.pav2-corr-row__label {
    font-size: 0.75rem;
    color: #888FA0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pav2-corr-row__bar-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.pav2-corr-row__bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.pav2-corr-row__bar--high { background: #22c55e; }
.pav2-corr-row__bar--mid  { background: #4582F0; }
.pav2-corr-row__bar--low  { background: #F59E0B; }

.pav2-corr-row__pct {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pav2-corr-row__pct--high { color: #22c55e; }
.pav2-corr-row__pct--mid  { color: #4582F0; }
.pav2-corr-row__pct--low  { color: #F59E0B; }

/* ── Matchup Split ──────────────────────────────────────────── */
.pav2-matchup-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pav2-matchup-head-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 0.25rem;
    padding: 0 0 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 0.375rem;
}

.pav2-matchup-col-head {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-align: center;
    color: #727A8F;
}

.pav2-matchup-col-head--starter { color: #4582F0; }
.pav2-matchup-col-head--bullpen { color: #38BDF8; }

.pav2-matchup-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 0.25rem;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pav2-matchup-row:last-of-type {
    border-bottom: none;
}

.pav2-matchup-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #727A8F;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pav2-matchup-cell {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    transition: background 0.15s;
}

.pav2-matchup-cell--winner {
    background: rgba(34, 197, 94, 0.06);
}

.pav2-matchup-cell__val {
    font-size: 0.8rem;
    font-weight: 700;
    color: #C4C9D4;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.pav2-matchup-cell--winner .pav2-matchup-cell__val {
    color: #4ade80;
}

.pav2-matchup-bar-wrap {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.pav2-matchup-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.pav2-matchup-bar--starter { background: rgba(69, 130, 240, 0.5); }
.pav2-matchup-bar--bullpen { background: rgba(56, 189, 248, 0.5); }
.pav2-matchup-bar--starter.pav2-matchup-bar--winner { background: #4582F0; }
.pav2-matchup-bar--bullpen.pav2-matchup-bar--winner { background: #38BDF8; }

.pav2-matchup-pa-note {
    font-size: 0.65rem;
    color: #4A5165;
    text-align: center;
    padding-top: 0.25rem;
}

.pav2-advantage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.675rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.25rem;
}

.pav2-advantage-badge--starter {
    background: rgba(69, 130, 240, 0.15);
    color: #4582F0;
    border: 1px solid rgba(69, 130, 240, 0.25);
}

.pav2-advantage-badge--bullpen {
    background: rgba(56, 189, 248, 0.12);
    color: #38BDF8;
    border: 1px solid rgba(56, 189, 248, 0.22);
}

.pav2-matchup-detail {
    margin-top: 1rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.pav2-matchup-cols-head {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 0.5rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 0.25rem;
}

.pav2-matchup-cols-head__spacer {}

.pav2-matchup-cols-head__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.14rem;
    padding: 0.5rem 0.6rem 0.44rem;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.pav2-matchup-cols-head__col--starter {
    background: rgba(69,130,240,0.08);
    border: 1px solid rgba(69,130,240,0.18);
}

.pav2-matchup-cols-head__col--bullpen {
    background: rgba(124, 92, 246, 0.07);
    border: 1px solid rgba(124, 92, 246, 0.15);
}

.pav2-matchup-cols-head__name {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pav2-matchup-cols-head__col--starter .pav2-matchup-cols-head__name { color: #4582F0; }
.pav2-matchup-cols-head__col--bullpen .pav2-matchup-cols-head__name { color: #38BDF8; }

.pav2-matchup-cols-head__pa {
    font-size: 0.63rem;
    color: #6b7387;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.pav2-matchup-row {
    display: grid;
    grid-template-columns: 1fr 72px 1fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.pav2-matchup-row:last-of-type {
    border-bottom: none;
}

.pav2-matchup-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #8b93a8;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    text-align: center;
    align-self: center;
}

.pav2-matchup-cell {
    display: flex;
    flex-direction: column;
    gap: 0.26rem;
    padding: 0.55rem 0.75rem 0.52rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.03);
    background: rgba(255,255,255,0.015);
    transition: background 0.15s, border-color 0.15s;
}

.pav2-matchup-cell--starter {
    align-items: flex-end;
}

.pav2-matchup-cell--bullpen {
    align-items: flex-start;
}

.pav2-matchup-cell--starter.pav2-matchup-cell--winner {
    background: rgba(69, 130, 240, 0.08);
    border-color: rgba(69, 130, 240, 0.14);
}

.pav2-matchup-cell--bullpen.pav2-matchup-cell--winner {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.14);
}

.pav2-matchup-cell__val {
    font-size: 0.98rem;
    font-weight: 800;
    color: #E3E8F2;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}

.pav2-matchup-cell--starter.pav2-matchup-cell--winner .pav2-matchup-cell__val {
    color: #7eb6ff;
}

.pav2-matchup-cell--bullpen.pav2-matchup-cell--winner .pav2-matchup-cell__val {
    color: #7DD3FC;
}

.pav2-matchup-bar-wrap {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.pav2-matchup-cell--starter .pav2-matchup-bar-wrap {
    direction: rtl;
}

.pav2-matchup-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.pav2-matchup-bar--starter { background: rgba(69, 130, 240, 0.62); }
.pav2-matchup-bar--bullpen { background: rgba(56, 189, 248, 0.58); }
.pav2-matchup-bar--starter.pav2-matchup-bar--winner { background: #4582F0; }
.pav2-matchup-bar--bullpen.pav2-matchup-bar--winner { background: #38BDF8; }

/* ── Matchup Split: 2-column body layout ──────────────────── */
.pav2-matchup-body {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 1.25rem;
    align-items: stretch;
}

.pav2-matchup-left {
    /* butterfly summary — inherits existing .pav2-matchup-cols-head and .pav2-matchup-table styles */
}

.pav2-matchup-right {
    background: rgba(255,255,255,0.022);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

/* ── Tabs ────────────────────────────────────────────────── */
.pav2-matchup-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.pav2-matchup-tab {
    flex: 1;
    padding: 0.65rem 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5a6278;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

.pav2-matchup-tab:hover {
    color: #a0aabb;
}

.pav2-matchup-tab--active {
    color: #d0dcf4;
    border-bottom-color: #4582F0;
}

/* ── Tab content panels ──────────────────────────────────── */
.pav2-matchup-tab-content {
    position: relative;
}

.pav2-matchup-panel-body {
    display: none;
    padding: 0.75rem 0.75rem 0.65rem;
}

.pav2-matchup-panel-body--active {
    display: block;
}

/* ── Matrix in right column — tighter split column ───────── */
.pav2-matchup-right .pav2-matchup-matrix__head,
.pav2-matchup-right .pav2-matchup-matrix__row {
    grid-template-columns: minmax(80px, 1fr) repeat(2, 54px);
    min-width: 0;
}

.pav2-matchup-detail-intro {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    margin-bottom: 0.75rem;
}

.pav2-matchup-detail-intro__title {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d8e1f0;
}

.pav2-matchup-detail-intro__subtitle {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #7f879b;
}

.pav2-matchup-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.pav2-matchup-panel {
    background: rgba(255,255,255,0.022);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 0.85rem 0.95rem 0.72rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.pav2-matchup-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.pav2-matchup-panel__title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    color: #e8ecf4;
    letter-spacing: -0.01em;
}

.pav2-matchup-panel__subtitle {
    margin: 0.18rem 0 0;
    font-size: 0.67rem;
    line-height: 1.45;
    color: #7f879b;
}

.pav2-matchup-matrix {
    display: flex;
    flex-direction: column;
}

.pav2-matchup-matrix__head,
.pav2-matchup-matrix__row {
    display: grid;
    grid-template-columns: minmax(220px, 2.5fr) repeat(4, minmax(52px, 0.7fr));
    gap: 0.75rem;
    align-items: center;
}

.pav2-matchup-matrix__head {
    padding: 0 0 0.45rem;
    border-bottom: 1px solid rgba(255,255,255,0.055);
}

.pav2-matchup-matrix__head span {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #727a8f;
}

.pav2-matchup-matrix__head span:not(:first-child),
.pav2-matchup-matrix__stat {
    text-align: right;
}

.pav2-matchup-matrix__row {
    padding: 0.62rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.pav2-matchup-matrix__row:last-child {
    border-bottom: none;
    padding-bottom: 0.15rem;
}

.pav2-matchup-matrix__split {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.pav2-matchup-matrix__split-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #e6ebf5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pav2-matchup-matrix__split-meta {
    font-size: 0.65rem;
    color: #727a8f;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.pav2-matchup-matrix__stat {
    font-size: 0.82rem;
    font-weight: 700;
    color: #c4c9d4;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ── Rich stat cells with inline bars ── */
.pav2-matchup-matrix__stat--rich {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.pav2-matchup-matrix__stat-val {
    line-height: 1;
}

.pav2-matchup-matrix__stat-bar {
    height: 3px;
    border-radius: 999px;
    margin-left: auto;
    min-width: 4px;
    transition: width 0.3s ease;
}

.pav2-matchup-matrix__stat-bar--avg {
    background: rgba(69, 130, 240, 0.55);
}

.pav2-matchup-matrix__stat-bar--ops {
    background: rgba(149, 123, 255, 0.55);
}

/* ── Best-row highlight ── */
.pav2-matchup-matrix__row--best {
    background: rgba(69, 130, 240, 0.07);
    border-left: 2px solid rgba(69, 130, 240, 0.5);
    margin-left: -2px;
    padding-left: 2px;
    border-radius: 4px;
}

.pav2-matchup-matrix__row--best .pav2-matchup-matrix__stat--best .pav2-matchup-matrix__stat-val {
    color: #7aaeff;
}

/* ── Group labels (VS STARTERS / VS RELIEVERS) ── */
.pav2-matchup-group-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4a5165;
    padding: 0.5rem 0 0.2rem;
    grid-column: 1 / -1;
}

.pav2-matchup-group-label--divider {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0.25rem;
    padding-top: 0.6rem;
}

/* ── PA Trend pill ── */
.pav2-pa-trend-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.25);
    background: rgba(74, 222, 128, 0.08);
    border-radius: 999px;
    padding: 2px 8px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.pav2-pa-trend-pill__arrow {
    font-size: 0.7rem;
    line-height: 1;
}

@media (max-width: 780px) {
    .pav2-matchup-cols-head {
        grid-template-columns: 1fr 52px 1fr;
    }

    .pav2-matchup-row {
        grid-template-columns: 1fr 52px 1fr;
    }

    .pav2-matchup-stat-label {
        font-size: 0.6rem;
    }

    .pav2-matchup-detail-grid {
        grid-template-columns: 1fr;
    }

    .pav2-matchup-matrix {
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }

    .pav2-matchup-matrix__head,
    .pav2-matchup-matrix__row {
        min-width: 620px;
    }
}

/* ── Prop Cash Timing ───────────────────────────────────────── */
.pav2-prop-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.8rem;
}

.pav2-prop-tab {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #888FA0;
    cursor: pointer;
    transition:
        background 0.18s cubic-bezier(0.25, 1, 0.5, 1),
        color 0.18s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.18s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.18s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.18s cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-prop-tab:hover,
.pav2-prop-tab.is-active {
    background: rgba(69, 130, 240, 0.18);
    border-color: rgba(69, 130, 240, 0.4);
    color: #7EB1F8;
}

.pav2-prop-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(4, 12, 28, 0.16);
}

.pav2-prop-tab:active {
    transform: translateY(0) scale(0.98);
}

.pav2-prop-tab:focus-visible {
    outline: 2px solid rgba(126, 177, 248, 0.55);
    outline-offset: 2px;
}

/* (also covers [data-prop-cash-btn] = ps-inning-toggle-btn already styled) */

.pav2-cash-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.pav2-cash-summary__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.pav2-cash-rate-stat {
    font-size: 1.5rem;
    font-weight: 800;
    color: #F0F2F8;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.pav2-cash-summary__label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #727A8F;
}

.pav2-cash-summary__divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.pav2-cash-summary-text {
    font-size: 0.8rem;
    color: #888FA0;
    line-height: 1.4;
}

.pav2-cash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1.1rem;
}

@media (max-width: 680px) {
    .pav2-cash-grid {
        grid-template-columns: 1fr;
    }
}

.pav2-cash-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pav2-cash-panel__header {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #727A8F;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pav2-bar-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pav2-bar-row {
    display: grid;
    grid-template-columns: 45px 1fr 38px 30px;
    align-items: center;
    gap: 0.4rem;
}

.pav2-bar-row--featured .pav2-bar-row__label,
.pav2-bar-row--featured .pav2-bar-row__pct {
    color: #dbe9ff;
}

.pav2-bar-row--featured .pav2-bar-row__count {
    color: #8a9bb9;
}

.pav2-bar-row--featured .pav2-bar-row__track {
    background: rgba(69, 130, 240, 0.1);
}

.pav2-bar-row__label {
    font-size: 0.7rem;
    color: #888FA0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pav2-bar-row__track {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.pav2-bar-row__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    transform-origin: left center;
    will-change: transform;
}

.pav2-bar-row__fill--inning {
    background: linear-gradient(90deg, #4582F0 0%, #7EB1F8 100%);
}

.pav2-bar-row__fill--pa {
    background: linear-gradient(90deg, #A78BFA 0%, #C4B5FD 100%);
}

.pav2-bar-row__pct {
    font-size: 0.7rem;
    font-weight: 600;
    color: #C4C9D4;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.pav2-bar-row__count {
    font-size: 0.65rem;
    color: #4A5165;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.pav2-cash-vs-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pav2-cash-vs-card {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pav2-cash-vs-card__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #727A8F;
}

.pav2-cash-vs-card__rate {
    font-size: 1.2rem;
    font-weight: 800;
    color: #F0F2F8;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.pav2-cash-vs-card__rate-sub {
    font-size: 0.65rem;
    font-weight: 500;
    color: #727A8F;
    margin-left: 0.25rem;
}

.pav2-cash-vs-card__detail {
    font-size: 0.7rem;
    color: #4A5165;
}

/* ── No-data message ────────────────────────────────────────── */
.pav2-no-data {
    font-size: 0.8rem;
    color: #4A5165;
    text-align: center;
    padding: 1.5rem 0;
    margin: 0;
}

/* ── Prop Performance History: streak bar ───────────────────── */
.pav2-streak-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

.pav2-streak-bar__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #727A8F;
    flex-shrink: 0;
}

.pav2-streak-dots {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: wrap;
}

.pav2-streak-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pav2-streak-dot--hit  { background: #22c55e; }
.pav2-streak-dot--miss { background: rgba(255, 255, 255, 0.12); }

.pav2-streak-bar__rate,
.pav2-streak-rate {
    font-size: 0.8rem;
    font-weight: 700;
    color: #C4C9D4;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ── Filter row (prop history) ──────────────────────────────── */
.pav2-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.pav2-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pav2-filter-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #727A8F;
}

.pav2-filter-select {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #C4C9D4;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
    min-width: 100px;
    appearance: auto;
}

.pav2-filter-select:hover,
.pav2-filter-select:focus {
    border-color: rgba(69, 130, 240, 0.5);
    color: #F0F2F8;
}

.pav2-filter-select option {
    background: #0E1017;
    color: #C4C9D4;
}

.pav2-filter-slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 140px;
}

.pav2-filter-slider-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pav2-filter-slider-inner input[type="range"] {
    flex: 1;
}

.pav2-filter-slider-val {
    font-size: 0.8rem;
    font-weight: 700;
    color: #F0F2F8;
    font-variant-numeric: tabular-nums;
    min-width: 1.8rem;
}

/* ── Prop lab link button ───────────────────────────────────── */
.pav2-prop-lab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 7px;
    background: rgba(69, 130, 240, 0.12);
    border: 1px solid rgba(69, 130, 240, 0.25);
    color: #7EB1F8;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.pav2-prop-lab-btn:hover {
    background: rgba(69, 130, 240, 0.22);
    border-color: rgba(69, 130, 240, 0.45);
    color: #A5C9FC;
    text-decoration: none;
}

/* ── Heatmap strip v2 ───────────────────────────────────────── */
.ps-heatmap-strip--v2 {
    gap: 4px;
    border-radius: 8px;
    overflow: hidden;
}

.ps-heatmap-segment--v2 {
    border-radius: 6px;
    min-width: 52px;
    flex: 1;
    transition: transform 0.12s, box-shadow 0.12s;
}

.ps-heatmap-segment--v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    z-index: 2;
    position: relative;
}

.ps-heatmap-segment--v2.is-selected {
    outline: 2px solid rgba(69, 130, 240, 0.7);
    outline-offset: 1px;
    z-index: 3;
    position: relative;
}


/* ============================================================
   LIGHT MODE OVERRIDES — PAV2
   ============================================================ */

html[data-theme='light'] .pav2-intel-bar {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.15);
}

html[data-theme='light'] .pav2-intel-chip {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .pav2-intel-chip--accent {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.22);
}

html[data-theme='light'] .pav2-intel-chip__label {
    color: #64748b;
}

html[data-theme='light'] .pav2-intel-chip__value {
    color: #0f172a;
}

html[data-theme='light'] .pav2-module {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(15, 23, 42, 0.04);
}

html[data-theme='light'] .pav2-module__title {
    color: #0f172a;
}

html[data-theme='light'] .pav2-module__subtitle {
    color: #64748b;
}

html[data-theme='light'] .pav2-corr-card {
    background: rgba(15, 23, 42, 0.025);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-corr-card__if {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-corr-card__trigger {
    color: #334155;
}

html[data-theme='light'] .pav2-corr-card__prop {
    color: #475569;
    background: rgba(37, 99, 235, 0.06);
    border-left-color: rgba(37, 99, 235, 0.3);
}

html[data-theme='light'] .pav2-corr-card__sample {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-corr-row__label {
    color: #64748b;
}

html[data-theme='light'] .pav2-corr-row__bar-wrap {
    background: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .pav2-matchup-col-head {
    color: #64748b;
}

html[data-theme='light'] .pav2-matchup-col-head--starter { color: #2563eb; }
html[data-theme='light'] .pav2-matchup-col-head--bullpen { color: #0284C7; }

html[data-theme='light'] .pav2-matchup-head-row {
    border-bottom-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .pav2-matchup-row {
    border-bottom-color: rgba(15, 23, 42, 0.05);
}

html[data-theme='light'] .pav2-matchup-stat-label {
    color: #64748b;
}

html[data-theme='light'] .pav2-matchup-cell__val {
    color: #334155;
}

html[data-theme='light'] .pav2-matchup-cell--starter.pav2-matchup-cell--winner {
    background: rgba(37, 99, 235, 0.07);
    border-color: rgba(37, 99, 235, 0.16);
}

html[data-theme='light'] .pav2-matchup-cell--bullpen.pav2-matchup-cell--winner {
    background: rgba(2, 132, 199, 0.06);
    border-color: rgba(2, 132, 199, 0.14);
}

html[data-theme='light'] .pav2-matchup-cell--starter.pav2-matchup-cell--winner .pav2-matchup-cell__val {
    color: #2563eb;
}

html[data-theme='light'] .pav2-matchup-cell--bullpen.pav2-matchup-cell--winner .pav2-matchup-cell__val {
    color: #0284C7;
}

html[data-theme='light'] .pav2-matchup-bar-wrap {
    background: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .pav2-matchup-bar--starter { background: rgba(37, 99, 235, 0.35); }
html[data-theme='light'] .pav2-matchup-bar--bullpen { background: rgba(2, 132, 199, 0.35); }
html[data-theme='light'] .pav2-matchup-bar--starter.pav2-matchup-bar--winner { background: #2563eb; }
html[data-theme='light'] .pav2-matchup-bar--bullpen.pav2-matchup-bar--winner { background: #0284C7; }

html[data-theme='light'] .pav2-matchup-pa-note {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-advantage-badge--starter {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.2);
}

html[data-theme='light'] .pav2-advantage-badge--bullpen {
    background: rgba(2, 132, 199, 0.07);
    color: #0284C7;
    border-color: rgba(2, 132, 199, 0.18);
}

.pav2-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(126, 177, 248, 0.2);
    background: linear-gradient(180deg, rgba(69, 130, 240, 0.1), rgba(69, 130, 240, 0.04));
    color: #dbe9ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.pav2-expand-btn:hover {
    background: linear-gradient(180deg, rgba(69, 130, 240, 0.16), rgba(69, 130, 240, 0.08));
    border-color: rgba(126, 177, 248, 0.34);
    color: #f5f9ff;
    transform: translateY(-1px);
}

.pav2-expand-btn__chevron {
    width: 0.9rem;
    height: 0.9rem;
    transition: transform 0.18s ease;
}

html[data-theme='light'] .pav2-expand-btn {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.02));
    border-color: rgba(37, 99, 235, 0.14);
    color: #64748b;
}

html[data-theme='light'] .pav2-expand-btn:hover {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.04));
    border-color: rgba(37, 99, 235, 0.24);
    color: #0f172a;
}

html[data-theme='light'] .pav2-prop-tab {
    border-color: rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.04);
    color: #475569;
}

html[data-theme='light'] .pav2-prop-tab:hover,
html[data-theme='light'] .pav2-prop-tab.is-active {
    background: rgba(37, 99, 235, 0.09);
    border-color: rgba(37, 99, 235, 0.28);
    color: #2563eb;
}

html[data-theme='light'] .pav2-cash-summary {
    background: rgba(15, 23, 42, 0.025);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-cash-rate-stat {
    color: #0f172a;
}

html[data-theme='light'] .pav2-cash-summary__label {
    color: #64748b;
}

html[data-theme='light'] .pav2-cash-summary__divider {
    background: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .pav2-cash-summary-text {
    color: #475569;
}

html[data-theme='light'] .pav2-cash-panel__header {
    color: #64748b;
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-bar-row__track {
    background: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .pav2-bar-row__label {
    color: #64748b;
}

html[data-theme='light'] .pav2-bar-row__pct {
    color: #334155;
}

html[data-theme='light'] .pav2-bar-row__count {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-cash-vs-card {
    background: rgba(15, 23, 42, 0.025);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-cash-vs-card__label {
    color: #64748b;
}

html[data-theme='light'] .pav2-cash-vs-card__rate {
    color: #0f172a;
}

html[data-theme='light'] .pav2-cash-vs-card__rate-sub {
    color: #64748b;
}

html[data-theme='light'] .pav2-cash-vs-card__detail {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-no-data {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-streak-bar__label {
    color: #64748b;
}

html[data-theme='light'] .pav2-streak-dot--miss {
    background: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .pav2-streak-bar__rate,
html[data-theme='light'] .pav2-streak-rate {
    color: #334155;
}

html[data-theme='light'] .pav2-filter-label {
    color: #64748b;
}

html[data-theme='light'] .pav2-filter-select {
    border-color: rgba(15, 23, 42, 0.15);
    background: #ffffff;
    color: #334155;
}

html[data-theme='light'] .pav2-filter-select:hover,
html[data-theme='light'] .pav2-filter-select:focus {
    border-color: rgba(37, 99, 235, 0.4);
    color: #0f172a;
}

html[data-theme='light'] .pav2-filter-select option {
    background: #ffffff;
    color: #334155;
}

html[data-theme='light'] .pav2-filter-slider-val {
    color: #0f172a;
}

html[data-theme='light'] .pav2-prop-lab-btn {
    background: rgba(37, 99, 235, 0.07);
    border-color: rgba(37, 99, 235, 0.18);
    color: #2563eb;
}

html[data-theme='light'] .pav2-prop-lab-btn:hover {
    background: rgba(37, 99, 235, 0.13);
    border-color: rgba(37, 99, 235, 0.35);
    color: #1d4ed8;
}

html[data-theme='light'] .ps-heatmap-segment--v2.is-selected {
    outline-color: rgba(37, 99, 235, 0.6);
}

/* ============================================================
   REDESIGN 2025: NEW PAV2 COMPONENT STYLES
   ============================================================ */

/* ── Percentile Grid (replaces vertical bars) ───────────────── */
.pctile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.625rem;
}

@media (max-width: 900px) {
    .pctile-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 580px) {
    .pctile-grid { grid-template-columns: repeat(2, 1fr); }
}

.pctile-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.9rem 1rem 0.85rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.pctile-card--elite,
.pctile-card--strong {
    border-color: rgba(69, 130, 240, 0.18);
}

.pctile-card--average {
    border-color: rgba(122, 143, 168, 0.1);
}

.pctile-card--weak {
    border-color: rgba(74, 81, 101, 0.18);
}

.pctile-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem;
}

.pctile-card__label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #7f879b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.pctile-card__num {
    font-size: 1.55rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: #cbd5e1;
}

.pctile-card--elite .pctile-card__num { color: #8ec2ff; }
.pctile-card--strong .pctile-card__num { color: #6ba8ff; }
.pctile-card--average .pctile-card__num { color: #b8c6dd; }
.pctile-card--weak .pctile-card__num { color: #7e8699; }

.pctile-card__ord {
    font-size: 0.55em;
    font-weight: 700;
    vertical-align: super;
    margin-left: 1px;
    color: inherit;
}

.pctile-card__track-shell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pctile-card__track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    overflow: visible;
}

.pctile-card__tick {
    position: absolute;
    top: 50%;
    width: 1px;
    height: 14px;
    background: rgba(148, 163, 184, 0.22);
    transform: translate(-50%, -50%);
    z-index: 1;
}

.pctile-card__tick--50 { left: 50%; }
.pctile-card__tick--75 { left: 75%; }
.pctile-card__tick--90 { left: 90%; }

.pctile-card__bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.pctile-card--elite .pctile-card__bar-fill {
    background: linear-gradient(90deg, #4c88f2 0%, #8ec2ff 100%);
}

.pctile-card--strong .pctile-card__bar-fill {
    background: linear-gradient(90deg, #3b78df 0%, #6ba8ff 100%);
}

.pctile-card--average .pctile-card__bar-fill {
    background: #6f84a3;
}

.pctile-card--weak .pctile-card__bar-fill {
    background: #4a5165;
}

.pctile-card__marker {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid #111827;
    background: currentColor;
    transform: translate(-50%, -50%);
    z-index: 3;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.35);
}

.pctile-card--elite .pctile-card__marker { color: #8ec2ff; }
.pctile-card--strong .pctile-card__marker { color: #6ba8ff; }
.pctile-card--average .pctile-card__marker { color: #8ea0bb; }
.pctile-card--weak .pctile-card__marker { color: #6c7488; }

.pctile-card__track-labels {
    position: relative;
    height: 0.75rem;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #5c6478;
    font-variant-numeric: tabular-nums;
}

.pctile-card__track-labels span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}

.pctile-card__track-labels span:nth-child(1) { left: 50%; }
.pctile-card__track-labels span:nth-child(2) { left: 75%; }
.pctile-card__track-labels span:nth-child(3) { left: 90%; }

.pctile-card__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 2rem;
}

.pctile-card__rate {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    color: #a0a8bc;
}

.pctile-card__rank {
    font-size: 0.66rem;
    color: #7f879b;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* ── Prop Correlations v2 ───────────────────────────────────── */
.pav2-corr-card__header {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: border-color 220ms cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-corr-card:hover .pav2-corr-card__header,
.pav2-corr-card:focus-within .pav2-corr-card__header {
    border-bottom-color: rgba(126, 177, 248, 0.11);
}

.pav2-corr-card__trigger-prop {
    font-size: 0.82rem;
    font-weight: 800;
    color: #E8ECF4;
    letter-spacing: -0.01em;
    line-height: 1.25;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    white-space: normal;
}

.pav2-corr-row2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.22rem 0.75rem;
    transition: transform 180ms cubic-bezier(0.25, 1, 0.5, 1);
    animation: pav2-corr-row-in 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pav2-corr-row2:nth-child(1) { animation-delay: 120ms; }
.pav2-corr-row2:nth-child(2) { animation-delay: 170ms; }
.pav2-corr-row2:nth-child(3) { animation-delay: 220ms; }
.pav2-corr-row2:nth-child(4) { animation-delay: 270ms; }

.pav2-corr-row2:hover {
    transform: translateX(2px);
}

.pav2-corr-row2 + .pav2-corr-row2 {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.pav2-corr-row2--featured {
    padding-bottom: 0.15rem;
}

.pav2-corr-row2--featured .pav2-corr-row2__prop {
    font-size: 0.92rem;
    font-weight: 800;
    color: #e8ecf4;
}

.pav2-corr-row2__meta {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
}

.pav2-corr-row2__also {
    display: none;
}

.pav2-corr-row2__prop {
    font-size: 0.84rem;
    font-weight: 650;
    color: #C4C9D4;
    line-height: 1.2;
    white-space: normal;
    overflow: hidden;
    transition: color 180ms cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-corr-row2:hover .pav2-corr-row2__prop {
    color: #e8ecf4;
}

.pav2-corr-row2__bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 7px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
    transition: background-color 180ms cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-corr-row2:hover .pav2-corr-row2__bar-track {
    background: rgba(255,255,255,0.075);
}

.pav2-corr-row2__bar-fill {
    height: 100%;
    border-radius: 999px;
    position: relative;
    transition:
        width 0.45s ease,
        opacity 180ms cubic-bezier(0.25, 1, 0.5, 1),
        filter 180ms cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0.9;
    overflow: hidden;
}

.pav2-corr-row2__bar-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: translateX(-140%);
    transition: transform 420ms cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-corr-row2:hover .pav2-corr-row2__bar-fill::after {
    transform: translateX(140%);
}

.pav2-corr-row2:hover .pav2-corr-row2__bar-fill {
    filter: brightness(1.04);
}

.pav2-corr-row2--featured .pav2-corr-row2__bar-track {
    height: 8px;
}

.pav2-corr-row2--featured .pav2-corr-row2__bar-fill {
    opacity: 1;
}

.pav2-corr-row2__bar--high { background: #93c5fd; }
.pav2-corr-row2__bar--mid  { background: #4c88f2; }
.pav2-corr-row2__bar--low  { background: #586882; }

.pav2-corr-row2__pct {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: right;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition:
        color 180ms cubic-bezier(0.25, 1, 0.5, 1),
        transform 180ms cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-corr-row2--featured .pav2-corr-row2__pct {
    font-size: 0.92rem;
}

.pav2-corr-row2:hover .pav2-corr-row2__pct {
    transform: translateY(-1px);
}

.pav2-corr-row2__pct--high { color: #93c5fd; }
.pav2-corr-row2__pct--mid  { color: #4c88f2; }
.pav2-corr-row2__pct--low  { color: #7f8ca3; }

@keyframes pav2-corr-card-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pav2-corr-row-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pav2-corr-card,
    .pav2-corr-row2,
    .pav2-corr-row2__bar-fill,
    .pav2-corr-row2__pct,
    .pav2-corr-card__header,
    .pav2-corr-row2__prop,
    .pav2-corr-row2__bar-track {
        animation: none !important;
        transition: none !important;
    }

    .pav2-corr-card::after,
    .pav2-corr-row2__bar-fill::after {
        display: none !important;
    }

    .pav2-corr-card:hover,
    .pav2-corr-card:focus-within,
    .pav2-corr-row2:hover,
    .pav2-corr-row2:hover .pav2-corr-row2__pct {
        transform: none !important;
    }
}

/* ── Matchup Split: new column headers ──────────────────────── */
.pav2-matchup-cols-head {
    display: grid;
    grid-template-columns: 1fr 72px 1fr;
    gap: 0.5rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 0.45rem;
}

.pav2-matchup-cols-head__center {}

.pav2-matchup-cols-head__col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.14rem;
    padding: 0.62rem 0.8rem 0.56rem;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.pav2-matchup-cols-head__col--starter {
    background: rgba(69,130,240,0.08);
    border: 1px solid rgba(69,130,240,0.18);
    align-items: flex-end;
    text-align: right;
}

.pav2-matchup-cols-head__col--bullpen {
    background: rgba(124, 92, 246, 0.07);
    border: 1px solid rgba(124, 92, 246, 0.15);
    align-items: flex-start;
    text-align: left;
}

.pav2-matchup-cols-head__name {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pav2-matchup-cols-head__col--starter .pav2-matchup-cols-head__name { color: #4582F0; }
.pav2-matchup-cols-head__col--bullpen .pav2-matchup-cols-head__name { color: #38BDF8; }

.pav2-matchup-cols-head__pa {
    font-size: 0.63rem;
    color: #6b7387;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* ── Inning Breakdown redesign ──────────────────────────────── */
.pav2-module__header--stacked {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
}

.pav2-module--inning-redesign {
    overflow: hidden;
}

.pav2-inning-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.pav2-inning-summary-chip {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.68rem 0.8rem 0.66rem;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(69, 130, 240, 0.12), rgba(69, 130, 240, 0.05)),
        rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(126, 177, 248, 0.18);
    transition:
        transform 0.18s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.18s cubic-bezier(0.25, 1, 0.5, 1),
        background 0.18s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.18s cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-inning-summary-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(126, 177, 248, 0.28);
    box-shadow: 0 12px 24px rgba(4, 12, 28, 0.12);
}

.pav2-inning-summary-chip__label {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7ea3d7;
}

.pav2-inning-summary-chip__value {
    font-size: 0.86rem;
    font-weight: 800;
    color: #f0f2f8;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.pav2-inning-phase-block,
.pav2-inning-detail-shell {
    margin-top: 0.95rem;
}

.pav2-inning-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.58rem;
}

.pav2-inning-section-head__title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: #f4f7fb;
}

.pav2-inning-phase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.pav2-inning-phase-card {
    display: flex;
    flex-direction: column;
    gap: 0.68rem;
    padding: 0.8rem;
    border-radius: 14px;
    background:
        radial-gradient(circle at top left, rgba(69, 130, 240, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(13, 18, 30, 0.96), rgba(10, 14, 24, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition:
        transform 0.2s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.2s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-inning-phase-card.is-best {
    border-color: rgba(126, 177, 248, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 38px rgba(4, 12, 28, 0.22);
}

.pav2-inning-phase-card:hover {
    transform: translateY(-1px);
    border-color: rgba(126, 177, 248, 0.18);
}

.pav2-inning-phase-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.pav2-inning-phase-card__title {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: #f3f7ff;
}

.pav2-inning-phase-card__tag {
    padding: 0.24rem 0.48rem;
    border-radius: 999px;
    background: rgba(69, 130, 240, 0.12);
    color: #8fb6ee;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pav2-inning-phase-card__main-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: start;
}

.pav2-inning-phase-card__main-stats > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pav2-inning-phase-card__metric-label {
    display: block;
    margin-bottom: 0.12rem;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a8cad;
}

.pav2-inning-phase-card__metric-value {
    display: block;
    font-size: 1.14rem;
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: #f6fbff;
    font-variant-numeric: tabular-nums;
}

.pav2-inning-phase-card__bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    overflow: hidden;
}

.pav2-inning-phase-card__bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(69, 130, 240, 0.88), rgba(138, 198, 255, 0.88));
    transform-origin: left center;
}

.pav2-inning-phase-card__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: start;
}

.pav2-inning-phase-card__stats div {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    min-width: 0;
    padding-top: 0.56rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    align-items: center;
    text-align: center;
}

.pav2-inning-phase-card__stats span {
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7b869b;
}

.pav2-inning-phase-card__stats strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: #f0f4fb;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.pav2-inning-rail {
    min-width: 0;
}

.pav2-inning-rail__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pav2-inning-rail__item[hidden] {
    display: none;
}

.pav2-inning-rail__item {
    display: grid;
    grid-template-columns: 150px 190px minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.82rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    color: inherit;
    text-align: left;
    transition:
        transform 0.16s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.16s cubic-bezier(0.25, 1, 0.5, 1),
        background 0.16s cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-inning-rail__item.is-active {
    border-color: rgba(126, 177, 248, 0.36);
    background:
        linear-gradient(90deg, rgba(69, 130, 240, 0.12), rgba(69, 130, 240, 0.02)),
        rgba(255, 255, 255, 0.025);
}

.pav2-inning-rail__item:hover {
    transform: translateY(-1px);
    border-color: rgba(126, 177, 248, 0.18);
}

.pav2-inning-rail__item.is-low-sample {
    opacity: 0.82;
}

.pav2-inning-rail__label {
    font-size: 0.84rem;
    font-weight: 850;
    letter-spacing: -0.01em;
    color: #f2f6fb;
}

.pav2-inning-rail__metrics {
    display: flex;
    min-width: 0;
}

.pav2-inning-rail__metrics--main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: start;
    justify-items: center;
    padding-right: 0.2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.pav2-inning-rail__metric-block {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    align-items: center;
    text-align: center;
}

.pav2-inning-rail__metric-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a8cad;
}

.pav2-inning-rail__metric-value {
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.04;
    color: #eef3fb;
    font-variant-numeric: tabular-nums;
}

.pav2-inning-rail__metric-value--ops {
    color: #8bbcff;
    font-size: 1rem;
    font-weight: 900;
}

.pav2-inning-rail__metrics--support {
    display: grid;
    grid-template-columns: repeat(5, minmax(52px, 1fr));
    gap: 0.45rem;
    align-items: center;
    justify-items: center;
    min-width: 0;
}

.pav2-inning-rail__microstat {
    display: flex;
    flex-direction: column;
    gap: 0.14rem;
    min-width: 0;
    align-items: center;
    text-align: center;
}

.pav2-inning-rail__microstat span {
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #798397;
}

.pav2-inning-rail__microstat strong {
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.05;
    color: #e8edf7;
    font-variant-numeric: tabular-nums;
}

.pav2-inning-rail__sample-note {
    justify-self: end;
    padding: 0.22rem 0.42rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #95a0b3;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pav2-inning-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.75rem;
    padding: 0.2rem 0;
    border: 0;
    background: transparent;
    color: #8fb6ee;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.16s cubic-bezier(0.25, 1, 0.5, 1), transform 0.16s cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-inning-toggle__chevron {
    width: 0.9rem;
    height: 0.9rem;
    transition: transform 0.14s ease;
}

.pav2-inning-toggle:hover {
    color: #b0d0ff;
    transform: translateY(-1px);
}

.pav2-inning-toggle:focus-visible {
    outline: 2px solid rgba(126, 177, 248, 0.5);
    outline-offset: 4px;
    border-radius: 6px;
}

.pav2-inning-table__row--best td {
    background: rgba(69, 130, 240, 0.06);
}

html[data-theme='light'] .pav2-inning-summary-chip {
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.02)),
        rgba(255, 255, 255, 0.9);
    border-color: rgba(37, 99, 235, 0.12);
}

html[data-theme='light'] .pav2-inning-summary-chip__label {
    color: #4c6fa2;
}

html[data-theme='light'] .pav2-inning-summary-chip__value,
html[data-theme='light'] .pav2-inning-section-head__title,
html[data-theme='light'] .pav2-inning-phase-card__title,
html[data-theme='light'] .pav2-inning-phase-card__metric-value,
html[data-theme='light'] .pav2-inning-phase-card__stats strong,
html[data-theme='light'] .pav2-inning-rail__label,
html[data-theme='light'] .pav2-inning-rail__metric-value,
html[data-theme='light'] .pav2-inning-rail__microstat strong {
    color: #0f172a;
}

html[data-theme='light'] .pav2-inning-phase-card__metric-label,
html[data-theme='light'] .pav2-inning-phase-card__stats span,
html[data-theme='light'] .pav2-inning-rail__metric-label,
html[data-theme='light'] .pav2-inning-rail__microstat span {
    color: #64748b;
}

html[data-theme='light'] .pav2-inning-phase-card,
html[data-theme='light'] .pav2-inning-rail__item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96));
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

html[data-theme='light'] .pav2-inning-summary-chip:hover,
html[data-theme='light'] .pav2-inning-phase-card:hover,
html[data-theme='light'] .pav2-inning-rail__item:hover {
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .pav2-inning-phase-card__tag,
html[data-theme='light'] .pav2-inning-rail__item.is-active {
    background: rgba(37, 99, 235, 0.08);
}

html[data-theme='light'] .pav2-inning-toggle {
    color: #2563eb;
}

html[data-theme='light'] .pav2-inning-rail__ops {
    color: #2563eb;
}

html[data-theme='light'] .pav2-inning-rail__metric-value--ops {
    color: #2563eb;
}

@media (prefers-reduced-motion: reduce) {
    .pav2-inning-summary-chip,
    .pav2-inning-phase-card,
    .pav2-inning-rail__item,
    .pav2-inning-toggle {
        transition: none !important;
    }

    .pav2-inning-summary-chip:hover,
    .pav2-inning-phase-card:hover,
    .pav2-inning-rail__item:hover,
    .pav2-inning-toggle:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

@media (max-width: 1160px) {
    .pav2-inning-summary-strip,
    .pav2-inning-phase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .pav2-inning-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pav2-inning-phase-grid {
        grid-template-columns: 1fr;
    }

    .pav2-inning-rail__item {
        grid-template-columns: 1fr;
        gap: 0.42rem;
    }

    .pav2-inning-rail__metrics--main {
        padding-right: 0;
        border-right: 0;
    }

    .pav2-inning-rail__metrics--support {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem 0.8rem;
    }

    .pav2-inning-rail__sample-note {
        justify-self: start;
    }

    .pav2-inning-phase-card__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .pav2-inning-summary-strip {
        grid-template-columns: 1fr;
    }

    .pav2-inning-summary-chip__value {
        font-size: 0.82rem;
    }
}

/* ── Two-col inning+cash: 55/45 split ───────────────────────── */
.pav2-two-col--inning-cash {
    grid-template-columns: 55fr 45fr;
}

@media (max-width: 1024px) {
    .pav2-two-col--inning-cash {
        grid-template-columns: 1fr;
    }
}

/* ── Prop Cash Timing: hero rate ────────────────────────────── */
.pav2-cash-hero {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 0.68rem 0.85rem;
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    align-items: center;
    margin-bottom: 0.2rem;
}

.pav2-cash-hero__primary,
.pav2-cash-hero__stat {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    min-width: 0;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.pav2-cash-hero__primary {
    border-right: 1px solid rgba(255, 255, 255, 0.035);
    padding-right: 0.75rem;
}

.pav2-cash-hero__stat {
    padding-left: 0.15rem;
}

.pav2-cash-hero__stat + .pav2-cash-hero__stat {
    border-left: 1px solid rgba(255, 255, 255, 0.035);
    padding-left: 0.75rem;
}

.pav2-cash-hero__rate {
    font-size: 1.12rem;
    font-weight: 800;
    color: #E8ECF4;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.pav2-cash-hero__label {
    font-size: 0.67rem;
    color: #888FA0;
    line-height: 1.3;
    font-weight: 500;
}

.pav2-cash-hero__stat-value {
    font-size: 1.12rem;
    font-weight: 700;
    color: #E8ECF4;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.pav2-cash-hero__stat-label {
    font-size: 0.67rem;
    color: #888FA0;
    line-height: 1.3;
}

/* ── Cash VS cards: colored ─────────────────────────────────── */
.pav2-cash-panel--context {
    gap: 0.7rem;
    margin-top: 0.35rem;
}

.pav2-cash-vs-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.pav2-cash-vs-card--starter {
    border-top-color: rgba(69,130,240,0.35);
}

.pav2-cash-vs-card--bullpen {
    border-top-color: rgba(124, 180, 248, 0.28);
}

.pav2-cash-vs-card {
    min-width: 0;
    padding: 0.72rem 0.85rem 0.78rem;
    background: rgba(255, 255, 255, 0.016);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-top-width: 2px;
    border-radius: 10px;
    display: grid;
    gap: 0.18rem;
    transition:
        transform 0.2s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.2s cubic-bezier(0.25, 1, 0.5, 1),
        background 0.2s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.pav2-cash-vs-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(4, 12, 28, 0.12);
}

.pav2-cash-vs-card--starter:hover {
    border-color: rgba(69, 130, 240, 0.16);
    background: rgba(69, 130, 240, 0.03);
}

.pav2-cash-vs-card--bullpen:hover {
    border-color: rgba(118, 181, 245, 0.15);
    background: rgba(118, 181, 245, 0.028);
}

.pav2-cash-vs-card--starter .pav2-cash-vs-card__label,
.pav2-cash-vs-card--starter .pav2-cash-vs-card__rate { color: #7EB1F8; }

.pav2-cash-vs-card--bullpen .pav2-cash-vs-card__label,
.pav2-cash-vs-card--bullpen .pav2-cash-vs-card__rate { color: #A7C8F8; }

.pav2-cash-vs-card__rate-sub {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #727A8F;
    margin: 0;
}

.pav2-cash-vs-card__bar-track {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
    margin: 0.2rem 0 0.16rem;
}

.pav2-cash-vs-card__bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
    transform-origin: left center;
    will-change: transform;
}

.pav2-cash-vs-card--starter .pav2-cash-vs-card__bar-fill { background: #4582F0; }
.pav2-cash-vs-card--bullpen .pav2-cash-vs-card__bar-fill { background: #76B5F5; }

.pav2-cash-vs-card__detail {
    font-size: 0.7rem;
    color: #b8c3d8;
}

.pav2-cash-vs-card__meta {
    font-size: 0.64rem;
    color: #667087;
}

.pav2-cash-vs-card__rate {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.pav2-cash-vs-card__label {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 860px) {
    .pav2-cash-hero {
        grid-template-columns: 1fr;
    }

    .pav2-cash-hero__primary {
        padding-right: 0;
        padding-bottom: 0.15rem;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .pav2-cash-hero__stat {
        padding-left: 0;
    }

    .pav2-cash-hero__stat + .pav2-cash-hero__stat {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
        padding-left: 0;
        padding-top: 0.7rem;
    }
}

@media (max-width: 680px) {
    .pav2-cash-vs-row {
        grid-template-columns: 1fr;
    }
}

html[data-theme='light'] .pav2-cash-hero {
    background: rgba(15, 23, 42, 0.025);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-cash-hero__primary {
    border-right-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-cash-hero__rate,
html[data-theme='light'] .pav2-cash-hero__stat-value {
    color: #0f172a;
}

html[data-theme='light'] .pav2-cash-hero__label,
html[data-theme='light'] .pav2-cash-vs-card__meta {
    color: #64748b;
}

html[data-theme='light'] .pav2-cash-hero__stat-label {
    color: #475569;
}

html[data-theme='light'] .pav2-cash-vs-card {
    background: rgba(15, 23, 42, 0.025);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-cash-vs-card:hover {
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .pav2-cash-vs-card__detail {
    color: #334155;
}

html[data-theme='light'] .pav2-cash-vs-card__bar-track {
    background: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-bar-row--featured .pav2-bar-row__label,
html[data-theme='light'] .pav2-bar-row--featured .pav2-bar-row__pct {
    color: #0f172a;
}

html[data-theme='light'] .pav2-bar-row--featured .pav2-bar-row__count {
    color: #64748b;
}

html[data-theme='light'] .pav2-bar-row--featured .pav2-bar-row__track {
    background: rgba(37, 99, 235, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .pav2-prop-tab,
    .pav2-cash-vs-card,
    .pav2-bar-row__fill,
    .pav2-cash-vs-card__bar-fill {
        transition: none !important;
    }

    .pav2-prop-tab:hover,
    .pav2-prop-tab:active,
    .pav2-cash-vs-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

/* ── Prop History: hit rate cards + meta row ─────────────────── */
.pav2-history-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.pav2-hitrate-cards {
    display: flex;
    gap: 0.5rem;
}

.pav2-hitrate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.45rem 0.75rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    min-width: 64px;
}

.pav2-hitrate-card__label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #727A8F;
    line-height: 1;
}

.pav2-hitrate-card__val {
    font-size: 1rem;
    font-weight: 800;
    color: #F0F2F8;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

/* ── Light mode overrides for new components ────────────────── */
html[data-theme='light'] .pctile-card {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

html[data-theme='light'] .pctile-card--elite,
html[data-theme='light'] .pctile-card--strong {
    border-color: rgba(37, 99, 235, 0.18);
}

html[data-theme='light'] .pctile-card--average {
    border-color: rgba(100, 116, 139, 0.14);
}

html[data-theme='light'] .pctile-card--weak {
    border-color: rgba(100, 116, 139, 0.22);
}

html[data-theme='light'] .pctile-card__label { color: #64748b; }
html[data-theme='light'] .pctile-card__num { color: #334155; }
html[data-theme='light'] .pctile-card__rate { color: #64748b; }
html[data-theme='light'] .pctile-card__rank { color: #94a3b8; }
html[data-theme='light'] .pctile-card__track { background: rgba(15, 23, 42, 0.08); }
html[data-theme='light'] .pctile-card__tick { background: rgba(15, 23, 42, 0.16); }
html[data-theme='light'] .pctile-card__track-labels { color: #94a3b8; }
html[data-theme='light'] .pctile-card__marker {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(226, 232, 240, 0.8);
}

html[data-theme='light'] .pctile-card--elite .pctile-card__num { color: #2563eb; }
html[data-theme='light'] .pctile-card--strong .pctile-card__num { color: #3b82f6; }
html[data-theme='light'] .pctile-card--average .pctile-card__num { color: #475569; }
html[data-theme='light'] .pctile-card--weak .pctile-card__num { color: #64748b; }

html[data-theme='light'] .pav2-corr-card__header {
    border-bottom-color: rgba(15,23,42,0.08);
}

html[data-theme='light'] .pav2-corr-card__trigger-prop { color: #0f172a; }
html[data-theme='light'] .pav2-corr-card__sample { color: #94a3b8; }
html[data-theme='light'] .pav2-corr-row2__prop { color: #334155; }
html[data-theme='light'] .pav2-corr-row2--featured .pav2-corr-row2__prop { color: #0f172a; }
html[data-theme='light'] .pav2-corr-row2__also { color: #94a3b8; }

html[data-theme='light'] .pav2-corr-row2__bar-track {
    background: rgba(15,23,42,0.07);
}

html[data-theme='light'] .pav2-corr-row2 + .pav2-corr-row2 {
    border-top-color: rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .pav2-corr-row2__pct--high { color: #60a5fa; }
html[data-theme='light'] .pav2-corr-row2__pct--mid  { color: #2563eb; }
html[data-theme='light'] .pav2-corr-row2__pct--low  { color: #64748b; }

html[data-theme='light'] .pav2-corr-row2__bar--high { background: #60a5fa; }
html[data-theme='light'] .pav2-corr-row2__bar--mid  { background: #2563eb; }
html[data-theme='light'] .pav2-corr-row2__bar--low  { background: #94a3b8; }

html[data-theme='light'] .pav2-matchup-right {
    background: rgba(15,23,42,0.025);
    border-color: rgba(15,23,42,0.09);
}
html[data-theme='light'] .pav2-matchup-tabs {
    border-bottom-color: rgba(15,23,42,0.08);
}
html[data-theme='light'] .pav2-matchup-tab {
    color: #94a3b8;
}
html[data-theme='light'] .pav2-matchup-tab:hover {
    color: #475569;
}
html[data-theme='light'] .pav2-matchup-tab--active {
    color: #1e3a6e;
    border-bottom-color: #2563eb;
}

html[data-theme='light'] .pav2-matchup-cols-head__col--starter {
    background: rgba(37,99,235,0.07);
    border-color: rgba(37,99,235,0.15);
}
html[data-theme='light'] .pav2-matchup-cols-head__col--bullpen {
    background: rgba(2,132,199,0.055);
    border-color: rgba(2,132,199,0.11);
}
html[data-theme='light'] .pav2-matchup-cols-head__col--starter .pav2-matchup-cols-head__name { color: #2563eb; }
html[data-theme='light'] .pav2-matchup-cols-head__col--bullpen .pav2-matchup-cols-head__name { color: #0284C7; }
html[data-theme='light'] .pav2-matchup-cols-head__pa { color: #94a3b8; }
html[data-theme='light'] .pav2-matchup-detail { border-top-color: rgba(15,23,42,0.08); }
html[data-theme='light'] .pav2-matchup-detail-intro__title { color: #0f172a; }
html[data-theme='light'] .pav2-matchup-detail-intro__subtitle { color: #64748b; }
html[data-theme='light'] .pav2-matchup-panel {
    background: rgba(15,23,42,0.02);
    border-color: rgba(15,23,42,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
html[data-theme='light'] .pav2-matchup-panel__title { color: #0f172a; }
html[data-theme='light'] .pav2-matchup-panel__subtitle { color: #64748b; }
html[data-theme='light'] .pav2-matchup-matrix__head { border-bottom-color: rgba(15,23,42,0.08); }
html[data-theme='light'] .pav2-matchup-matrix__head span { color: #94a3b8; }
html[data-theme='light'] .pav2-matchup-matrix__row { border-bottom-color: rgba(15,23,42,0.05); }
html[data-theme='light'] .pav2-matchup-matrix__split-name { color: #0f172a; }
html[data-theme='light'] .pav2-matchup-matrix__split-meta { color: #94a3b8; }
html[data-theme='light'] .pav2-matchup-matrix__stat { color: #334155; }

/* ── Light mode: rich stat bars ── */
html[data-theme='light'] .pav2-matchup-matrix__stat-bar--avg {
    background: rgba(37, 99, 235, 0.4);
}
html[data-theme='light'] .pav2-matchup-matrix__stat-bar--ops {
    background: rgba(124, 58, 237, 0.4);
}

/* ── Light mode: best-row highlight ── */
html[data-theme='light'] .pav2-matchup-matrix__row--best {
    background: rgba(37, 99, 235, 0.06);
    border-left-color: rgba(37, 99, 235, 0.4);
}
html[data-theme='light'] .pav2-matchup-matrix__row--best .pav2-matchup-matrix__stat--best .pav2-matchup-matrix__stat-val {
    color: #1d4ed8;
}

/* ── Light mode: group labels ── */
html[data-theme='light'] .pav2-matchup-group-label {
    color: #94a3b8;
}
html[data-theme='light'] .pav2-matchup-group-label--divider {
    border-top-color: rgba(15, 23, 42, 0.08);
}

/* ── Light mode: PA trend pill ── */
html[data-theme='light'] .pav2-pa-trend-pill {
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.3);
    background: rgba(22, 163, 74, 0.07);
}

html[data-theme='light'] .pav2-best-inning-badge {
    background: rgba(22,163,74,0.07);
    border-color: rgba(22,163,74,0.18);
}
html[data-theme='light'] .pav2-best-inning-badge__eyebrow,
html[data-theme='light'] .pav2-best-inning-badge__val { color: #16a34a; }

html[data-theme='light'] .pav2-pill-toggle {
    background: rgba(15,23,42,0.04);
    border-color: rgba(15,23,42,0.1);
}
html[data-theme='light'] .pav2-pill-toggle-btn { color: #64748b; }
html[data-theme='light'] .pav2-pill-toggle-btn.is-active {
    background: rgba(37,99,235,0.12);
    color: #2563eb;
}

html[data-theme='light'] .pav2-cash-hero {
    background: rgba(37,99,235,0.05);
    border-color: rgba(37,99,235,0.12);
}
html[data-theme='light'] .pav2-cash-hero__rate { color: #0f172a; }
html[data-theme='light'] .pav2-cash-hero__label { color: #64748b; }

html[data-theme='light'] .pav2-cash-vs-card--starter {
    background: rgba(37,99,235,0.06);
    border-color: rgba(37,99,235,0.15);
}
html[data-theme='light'] .pav2-cash-vs-card--bullpen {
    background: rgba(124,58,237,0.05);
    border-color: rgba(124,58,237,0.12);
}
html[data-theme='light'] .pav2-cash-vs-card--starter .pav2-cash-vs-card__label { color: #2563eb; }
html[data-theme='light'] .pav2-cash-vs-card--bullpen .pav2-cash-vs-card__label { color: #0284C7; }
html[data-theme='light'] .pav2-cash-vs-card--starter .pav2-cash-vs-card__rate { color: #1d4ed8; }
html[data-theme='light'] .pav2-cash-vs-card--bullpen .pav2-cash-vs-card__rate { color: #0369A1; }
html[data-theme='light'] .pav2-cash-vs-card__bar-track { background: rgba(15,23,42,0.08); }
html[data-theme='light'] .pav2-cash-vs-card--starter .pav2-cash-vs-card__bar-fill { background: #2563eb; }
html[data-theme='light'] .pav2-cash-vs-card--bullpen .pav2-cash-vs-card__bar-fill { background: #0284C7; }

html[data-theme='light'] .pav2-hitrate-card {
    background: rgba(15,23,42,0.03);
    border-color: rgba(15,23,42,0.08);
}
html[data-theme='light'] .pav2-hitrate-card__label { color: #64748b; }
html[data-theme='light'] .pav2-hitrate-card__val { color: #0f172a; }

/* ── Prop History redesign ─────────────────────────────────── */
.pav2-module--prop-history {
    position: relative;
    overflow: hidden;
    gap: 0.9rem;
    background:
        radial-gradient(circle at top right, rgba(69, 130, 240, 0.08), transparent 24%),
        radial-gradient(circle at bottom left, rgba(126, 177, 248, 0.04), transparent 30%),
        #0e1017;
}

.pav2-module--prop-history::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%);
    pointer-events: none;
}

.pav2-module--prop-history > * {
    position: relative;
    z-index: 1;
}

.pav2-history-control-shell {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.72rem 0.82rem 0.82rem;
    border-radius: 14px;
    border: 1px solid rgba(126, 177, 248, 0.1);
    background:
        linear-gradient(135deg, rgba(69, 130, 240, 0.05), rgba(69, 130, 240, 0.015) 36%),
        rgba(8, 12, 22, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.pav2-history-filter-grid {
    display: grid;
    grid-template-columns: minmax(150px, 1.15fr) minmax(140px, 0.95fr) minmax(140px, 0.95fr) minmax(260px, 1.7fr);
    gap: 0.6rem;
    align-items: stretch;
}

.pav2-module--prop-history .pav2-filter-group,
.pav2-module--prop-history .pav2-filter-slider-group {
    gap: 0.4rem;
    min-width: 0;
}

.pav2-module--prop-history .pav2-filter-label {
    color: #7186a8;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
}

.pav2-module--prop-history .pav2-filter-select,
.pav2-module--prop-history .pav2-filter-slider-inner {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.pav2-module--prop-history .pav2-filter-select {
    padding: 0.58rem 0.8rem;
    font-size: 0.85rem;
    color: #eef3fb;
}

.pav2-module--prop-history .pav2-filter-select:hover,
.pav2-module--prop-history .pav2-filter-select:focus {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(126, 177, 248, 0.34);
}

.pav2-module--prop-history .pav2-filter-slider-inner {
    padding: 0 0.75rem;
    gap: 0.7rem;
}

.pav2-module--prop-history .pav2-filter-slider-val {
    min-width: 2.9rem;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    background: rgba(69, 130, 240, 0.18);
    color: #eef5ff;
    text-align: center;
    font-size: 0.78rem;
}

.pav2-filter-slider-group--history {
    justify-content: end;
}

.pav2-filter-slider-group--history .pav2-filter-label {
    padding-left: 0.1rem;
}

.pav2-filter-slider-group--history input[type="range"] {
    min-width: 0;
}

.pav2-hitrate-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.pav2-hitrate-cards--header {
    min-width: auto;
    padding: 0;
    border: 1px solid rgba(126, 177, 248, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
}

.pav2-hitrate-card {
    position: relative;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
    padding: 0.32rem 0.7rem 0.28rem;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.pav2-hitrate-card + .pav2-hitrate-card {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.pav2-hitrate-card::after {
    display: none;
}

.pav2-hitrate-card__label {
    color: #7d90ae;
    font-size: 0.46rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
}

.pav2-hitrate-card__val {
    font-size: 0.96rem;
    letter-spacing: -0.02em;
    line-height: 1;
    color: #f4f7fd;
}

.prop-history-price-card {
    cursor: text;
}

.prop-history-price-input {
    width: 3rem;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    font-variant-numeric: tabular-nums;
}

.prop-history-price-input::placeholder {
    color: rgba(148, 165, 191, 0.7);
}

.prop-history-price-input:focus {
    outline: none;
}

.pav2-streak-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    padding: 0.2rem 0 0;
    border-radius: 0;
    border: none;
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.015) 36%),
        transparent;
}

.pav2-streak-bar__head {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 94px;
}

.pav2-streak-bar__label {
    color: #d8f6e4;
    font-size: 0.66rem;
    letter-spacing: 0.11em;
}

.pav2-streak-bar__context {
    color: #78a38a;
    font-size: 0.72rem;
    font-weight: 600;
}

.pav2-streak-bar__body {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    justify-content: space-between;
}

.pav2-streak-dots {
    gap: 0.42rem;
}

.pav2-streak-dot {
    width: 11px;
    height: 11px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.01);
}

.pav2-streak-dot--hit {
    background: linear-gradient(180deg, #3ad576, #16a34a);
}

.pav2-streak-dot--miss {
    background: rgba(255, 255, 255, 0.12);
}

.pav2-streak-bar__rate,
.pav2-streak-rate {
    padding: 0.34rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #eef6f1;
    font-size: 0.82rem;
}

.ps-chart-box--prop-history {
    margin-bottom: 0;
    padding: 0.95rem 0.95rem 1rem;
    border-radius: 16px;
    border-color: rgba(126, 177, 248, 0.1);
    background:
        radial-gradient(circle at top right, rgba(69, 130, 240, 0.06), transparent 24%),
        linear-gradient(180deg, rgba(9, 13, 21, 0.94), rgba(7, 11, 18, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.prop-history-header {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) auto auto;
    align-items: flex-start;
    gap: 0.9rem 1.1rem;
    margin-bottom: 0.85rem;
}

.prop-header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 0;
}

.prop-history-header__meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    padding-top: 0.1rem;
    flex: 0 0 auto;
}

#prop-player-name.card-title {
    font-size: clamp(1.14rem, 1.55vw, 1.42rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f3f7fd;
}

#prop-history-title.prop-history-title {
    display: inline-flex;
    align-items: center;
    min-height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #90a4c7;
    line-height: 1.25;
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.prop-history-chart-frame {
    position: relative;
    border-radius: 14px;
    padding: 0.45rem 0.55rem 0.35rem;
    background: rgba(4, 8, 16, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.ps-chart-box--prop-history .ps-chart-container {
    height: 284px;
    margin-top: 0;
}

#propPulseChart {
    margin-top: 0;
}

.prop-share-buttons {
    position: static;
    display: flex;
    gap: 0.4rem;
    margin-left: 0;
    align-self: flex-start;
}

.prop-share-buttons .btn,
.prop-share-buttons .add-pick-btn {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 999px;
    border: 1px solid rgba(126, 177, 248, 0.16);
    background:
        linear-gradient(180deg, rgba(69, 130, 240, 0.12), rgba(69, 130, 240, 0.06)),
        rgba(9, 14, 22, 0.8);
    color: #eaf2ff;
    box-shadow: none;
}

.prop-share-buttons .btn:hover,
.prop-share-buttons .add-pick-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(126, 177, 248, 0.32);
    background:
        linear-gradient(180deg, rgba(69, 130, 240, 0.24), rgba(69, 130, 240, 0.12)),
        rgba(9, 14, 22, 0.86);
}

html[data-theme='light'] .pav2-module--prop-history {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 28%),
        radial-gradient(circle at bottom left, rgba(96, 165, 250, 0.08), transparent 34%),
        #ffffff;
}

html[data-theme='light'] .pav2-module--prop-history::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent 18%);
}

html[data-theme='light'] .pav2-history-control-shell,
html[data-theme='light'] .ps-chart-box--prop-history {
    border-color: rgba(37, 99, 235, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 14px 30px rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .pav2-history-control-shell {
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(37, 99, 235, 0.02) 40%),
        #f8fbff;
}

html[data-theme='light'] #prop-history-title.prop-history-title {
    background: transparent;
    color: #64748b;
}

html[data-theme='light'] .pav2-module--prop-history .pav2-filter-label {
    color: #5f7393;
}

html[data-theme='light'] .pav2-module--prop-history .pav2-filter-select,
html[data-theme='light'] .pav2-module--prop-history .pav2-filter-slider-inner,
html[data-theme='light'] .pav2-hitrate-card,
html[data-theme='light'] .pav2-streak-bar,
html[data-theme='light'] .prop-history-chart-frame {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-module--prop-history .pav2-filter-select {
    color: #0f172a;
}

html[data-theme='light'] .pav2-module--prop-history .pav2-filter-slider-val {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

html[data-theme='light'] .pav2-hitrate-card__val,
html[data-theme='light'] #prop-player-name.card-title {
    color: #0f172a;
}

html[data-theme='light'] .pav2-streak-bar {
    background:
        linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(22, 163, 74, 0.02) 36%),
        transparent;
}

html[data-theme='light'] .pav2-streak-bar__label {
    color: #166534;
}

html[data-theme='light'] .pav2-streak-bar__context {
    color: #64748b;
}

html[data-theme='light'] .pav2-streak-bar__rate,
html[data-theme='light'] .pav2-streak-rate {
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
}

html[data-theme='light'] .pav2-hitrate-cards--header {
    background: rgba(37, 99, 235, 0.04);
    border-color: rgba(37, 99, 235, 0.12);
}

html[data-theme='light'] .pav2-hitrate-card + .pav2-hitrate-card {
    border-left-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .prop-history-price-input {
    color: inherit;
}

html[data-theme='light'] .ps-chart-box--prop-history {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 25%),
        linear-gradient(180deg, #ffffff, #f8fbff);
}

html[data-theme='light'] .prop-history-chart-frame {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.88)),
        #ffffff;
}

html[data-theme='light'] .prop-share-buttons .btn,
html[data-theme='light'] .prop-share-buttons .add-pick-btn {
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.05)),
        #ffffff;
    border-color: rgba(37, 99, 235, 0.16);
    color: #1d4ed8;
}

@media (max-width: 1100px) {
    .prop-history-header {
        grid-template-columns: 1fr;
    }

    .prop-history-header__meta {
        flex-wrap: wrap;
        gap: 0.65rem;
    }

    .pav2-hitrate-cards--header {
        width: auto;
    }
}

@media (max-width: 860px) {
    .pav2-history-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pav2-filter-slider-group--history {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .pav2-module--prop-history {
        padding: 1rem;
    }

    /* Stack header vertically so title isn't crushed by season toggle + Prop Lab btn */
    .pav2-module--prop-history .pav2-module__header {
        flex-direction: column;
        gap: 0.65rem;
    }

    .pav2-module--prop-history .pav2-module__header-actions {
        flex-shrink: 1;
        flex-wrap: wrap;
    }

    .pav2-history-control-shell,
    .ps-chart-box--prop-history {
        padding: 0.9rem;
    }

    .pav2-history-filter-grid {
        grid-template-columns: 1fr;
    }

    .prop-history-header__meta {
        width: 100%;
    }

    .prop-share-buttons {
        margin-left: 0;
    }

    .ps-chart-box--prop-history .ps-chart-container {
        height: 248px;
    }
}

@media (max-width: 480px) {
    .pav2-hitrate-cards--header {
        width: 100%;
    }

    .pav2-hitrate-cards--header {
        justify-content: space-between;
        gap: 0.6rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   Prop History v2 – premium redesign (ph-*)
   ═══════════════════════════════════════════════════════════ */

/* ── Controls Bar ───────────────────────────────────────────── */
.ph-controls-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.62rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
}

/* ── Control fields (inline label + control) ────────────────── */
.ph-ctrl-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.85rem;
    min-width: 0;
}

.ph-ctrl-field:first-child { padding-left: 0; }
.ph-ctrl-field:last-child  { padding-right: 0; flex: 1; }

.ph-ctrl-field-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #607a99;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Separator between control groups */
.ph-ctrl-sep {
    width: 1px;
    height: 1.25rem;
    background: rgba(255, 255, 255, 0.09);
    flex-shrink: 0;
}

/* Prop select */
.ph-select-wrap { position: relative; }

.ph-native-select {
    padding: 0.38rem 1.75rem 0.38rem 0.62rem;
    font-size: 0.83rem;
    font-weight: 700;
    color: #d6e3f5;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.14s, background 0.14s;
    font-family: inherit;
    white-space: nowrap;
}

.ph-native-select:hover,
.ph-native-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(69, 130, 240, 0.5);
    color: #edf4ff;
}

.ph-native-select option {
    background: #0e1017;
    color: #d6e3f5;
}

.ph-select-chevron {
    position: absolute;
    right: 0.58rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.56rem;
    color: #40506a;
    pointer-events: none;
}

/* Segmented pill controls — shared border, no gap */
.ph-pill-row {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.ph-pill {
    padding: 0.35rem 0.64rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #58718e;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background 0.13s, color 0.13s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}

.ph-pill:last-child { border-right: none; }

.ph-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #9ab5cf;
}

.ph-pill--on {
    background: rgba(69, 130, 240, 0.2);
    color: #7eb8ff;
    font-weight: 700;
}

.ph-pill--on:hover { background: rgba(69, 130, 240, 0.28); }

/* Line slider */
.ph-ctrl-field--line { /* inherits flex:1 from last-child rule */ }

.ph-slider-inner {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
}

.ph-slider-inner input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: #4582F0;
}

.ph-line-badge {
    flex-shrink: 0;
    min-width: 2.1rem;
    padding: 0.18rem 0.4rem;
    border-radius: 6px;
    background: rgba(69, 130, 240, 0.18);
    border: 1px solid rgba(69, 130, 240, 0.32);
    color: #7eb8ff;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ── Chart Header ───────────────────────────────────────────── */
.ph-chart-head {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1rem;
    flex-wrap: nowrap;
}

.ph-player-block {
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
    flex: 1;
    min-width: 0;
    padding-right: 1.4rem;
}

.ph-player-name {
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f3f7fd;
    margin: 0;
    line-height: 1.1;
}

.ph-prop-subtitle {
    font-size: 0.81rem;
    font-weight: 600;
    color: #4582F0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

/* ── Flat stats row: value on top, label below ─────────────── */
.ph-stats-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex-shrink: 0;
}

.ph-stat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.24rem;
    padding: 0.08rem 0.82rem;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.ph-stat-cell:first-child { border-left: none; }

/* Editable cells (odds inputs) */
.ph-stat-cell--editable { cursor: text; }

.ph-stat-val {
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: #edf4ff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ph-stat-lbl {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5e7898;
    line-height: 1;
    white-space: nowrap;
}

/* Odds inputs (inherit ph-stat-val sizing) */
.ph-stat-input {
    width: 3.4rem;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    font-variant-numeric: tabular-nums;
    text-align: center;
    -moz-appearance: textfield;
}

.ph-stat-input::placeholder { color: rgba(130, 153, 183, 0.35); }
.ph-stat-input:focus { outline: none; }

/* Stronger divider between rate group and odds group */
.ph-stats-sep {
    width: 1px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 0.12rem;
    flex-shrink: 0;
}

/* highlight-col for active range column */
.ph-stat-lbl.highlight-col {
    color: #5b9cf6;
    background: transparent;
    border-radius: 0;
}

.ph-stat-val.highlight-col {
    color: #7eb8ff;
    background: transparent;
    border-radius: 0;
}

/* ── Action buttons ─────────────────────────────────────────── */
.ph-action-strip {
    display: flex;
    gap: 0.25rem;
    padding-left: 0.85rem;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    align-self: stretch;
    align-items: center;
    flex-shrink: 0;
}

.ph-act-btn {
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: transparent;
    color: #5e7898;
    font-size: 0.64rem;
    cursor: pointer;
    transition: all 0.14s;
    padding: 0;
    font-family: inherit;
}

.ph-act-btn:hover {
    background: rgba(69, 130, 240, 0.13);
    border-color: rgba(69, 130, 240, 0.3);
    color: #7eb8ff;
    transform: translateY(-1px);
}

/* ── Light mode ─────────────────────────────────────────────── */
html[data-theme='light'] .ph-controls-bar {
    background: #f4f8ff;
    border-color: rgba(37, 99, 235, 0.1);
}

html[data-theme='light'] .ph-ctrl-field-label { color: #8299b5; }

html[data-theme='light'] .ph-ctrl-sep { background: rgba(15, 23, 42, 0.1); }

html[data-theme='light'] .ph-native-select {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    color: #1e293b;
}

html[data-theme='light'] .ph-native-select:hover,
html[data-theme='light'] .ph-native-select:focus {
    border-color: rgba(37, 99, 235, 0.35);
    background: #fafcff;
}

html[data-theme='light'] .ph-native-select option {
    background: #ffffff;
    color: #0f172a;
}

html[data-theme='light'] .ph-select-chevron { color: #8299b5; }

html[data-theme='light'] .ph-pill-row {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] .ph-pill {
    color: #7590ab;
    border-right-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .ph-pill:hover {
    background: rgba(37, 99, 235, 0.06);
    color: #334155;
}

html[data-theme='light'] .ph-pill--on {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

html[data-theme='light'] .ph-pill--on:hover { background: rgba(37, 99, 235, 0.16); }

html[data-theme='light'] .ph-line-badge {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.22);
    color: #1d4ed8;
}

html[data-theme='light'] .ph-player-name { color: #0f172a; }
html[data-theme='light'] .ph-prop-subtitle { color: #2563eb; }

html[data-theme='light'] .ph-stat-cell {
    border-left-color: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .ph-stat-val { color: #0f172a; }
html[data-theme='light'] .ph-stat-lbl { color: #94a8bc; }

html[data-theme='light'] .ph-stat-lbl.highlight-col { color: #2563eb; }
html[data-theme='light'] .ph-stat-val.highlight-col { color: #1d4ed8; }

html[data-theme='light'] .ph-stat-input::placeholder {
    color: rgba(100, 116, 139, 0.4);
}

html[data-theme='light'] .ph-stats-sep { background: rgba(15, 23, 42, 0.12); }

html[data-theme='light'] .ph-action-strip {
    border-left-color: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .ph-act-btn {
    border-color: rgba(15, 23, 42, 0.08);
    color: #94a8bc;
}

html[data-theme='light'] .ph-act-btn:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
    color: #1d4ed8;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .ph-chart-head { flex-wrap: wrap; }
    .ph-player-block { padding-right: 0; width: 100%; }
    .ph-stats-row { flex-wrap: wrap; }
}

@media (max-width: 860px) {
    .ph-controls-bar { flex-wrap: wrap; gap: 0.5rem; padding: 0.7rem 0.85rem; }
    .ph-ctrl-field { padding: 0; }
    .ph-ctrl-field--line { width: 100%; }
    .ph-ctrl-sep { display: none; }
}

@media (max-width: 640px) {
    .ph-stat-cell { padding: 0.08rem 0.6rem; }
    .ph-stat-val { font-size: 1.12rem; }
}

/* ── Matchup Split: right-panel redesign ───────────────────── */
.pav2-matchup-right {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
}

.pav2-matchup-tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pav2-matchup-panel-body--active {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pav2-matchup-tabs {
    gap: 0.35rem;
    padding: 0.85rem 0.9rem 0;
    border-bottom: none;
}

.pav2-matchup-tab {
    flex: 0 0 auto;
    min-width: 0;
    padding: 0.24rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: #7f879b;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    margin-bottom: 0;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.pav2-matchup-tab:hover {
    color: #dce4f7;
    border-color: rgba(255, 255, 255, 0.14);
}

.pav2-matchup-tab--active {
    color: #eff4ff;
    border-color: rgba(69, 130, 240, 0.26);
    background: rgba(69, 130, 240, 0.12);
    box-shadow: none;
}

.pav2-matchup-panel-body {
    padding: 0.95rem;
}

.pav2-compact-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pav2-compact-panel__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.35rem;
    font-size: 0.69rem;
    color: #91a0bb;
    font-variant-numeric: tabular-nums;
}

.pav2-compact-table {
    display: grid;
    gap: 0;
}

.pav2-compact-table__head,
.pav2-compact-table__row {
    display: grid;
    grid-template-columns: minmax(140px, 1.7fr) 44px repeat(4, 56px) 40px 44px 52px 52px;
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
}

.pav2-compact-table__head {
    padding: 0 0 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pav2-compact-table__head span {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #73809b;
}

.pav2-compact-table__row {
    padding: 0.44rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: #dbe4f4;
    font-variant-numeric: tabular-nums;
}

.pav2-compact-table__row:last-child {
    border-bottom: none;
}

.pav2-compact-table__split {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.pav2-compact-table__split strong {
    font-size: 0.8rem;
    color: #f0f4fb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pav2-compact-table__split span {
    font-size: 0.68rem;
    color: #8f9bb2;
}

.pav2-compact-table__ops {
    color: #9fc5ff;
    font-weight: 700;
}

.pav2-compact-table__row.is-best .pav2-compact-table__split strong,
.pav2-compact-table__row.is-best .pav2-compact-table__ops {
    color: #b8d6ff;
}

html[data-theme='light'] .pav2-matchup-right {
    background: rgba(248, 250, 252, 0.95);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

html[data-theme='light'] .pav2-matchup-tab {
    background: transparent;
    border-color: rgba(15, 23, 42, 0.08);
    color: #64748b;
}

html[data-theme='light'] .pav2-matchup-tab:hover {
    color: #0f172a;
    border-color: rgba(37, 99, 235, 0.16);
}

html[data-theme='light'] .pav2-matchup-tab--active {
    color: #0f172a;
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(37, 99, 235, 0.08);
}

html[data-theme='light'] .pav2-compact-panel__meta,
html[data-theme='light'] .pav2-compact-table__split span {
    color: #64748b;
}

html[data-theme='light'] .pav2-compact-table__split strong,
html[data-theme='light'] .pav2-compact-table__row {
    color: #0f172a;
}

html[data-theme='light'] .pav2-compact-table__head {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-compact-table__head span {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-compact-table__row {
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] .pav2-compact-table__ops {
    color: #1d4ed8;
}

@media (max-width: 1100px) {
    .pav2-matchup-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .pav2-compact-panel__meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 680px) {
    .pav2-matchup-tabs {
        padding: 0.55rem 0.75rem 0;
        flex-wrap: wrap;
    }

    .pav2-matchup-panel-body {
        padding: 0.85rem 0.75rem;
    }

    .pav2-compact-table {
        overflow-x: auto;
    }

    .pav2-compact-table__head,
    .pav2-compact-table__row {
        min-width: 760px;
    }
}

/* ── Handedness Split Card Grid ─────────────────────────── */
.pav2-hs-grid {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.pav2-hs-group__label {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5a6278;
    margin: 0 0 0.45rem;
}

.pav2-hs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.pav2-hs-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 0.8rem 0.8rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
}

.pav2-hs-card--empty {
    opacity: 0.38;
}

.pav2-hs-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    min-width: 0;
}

.pav2-hs-card__name {
    font-size: 0.77rem;
    font-weight: 700;
    color: #c8d4ec;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.pav2-hs-card__pa {
    font-size: 0.67rem;
    color: #5a6278;
    white-space: nowrap;
    flex-shrink: 0;
}

/* OPS bar */
.pav2-hs-card__bar-wrap {
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 99px;
    overflow: hidden;
}

.pav2-hs-card__bar {
    height: 100%;
    background: #4582F0;
    border-radius: 99px;
}

/* Stat row */
.pav2-hs-card__stats {
    display: flex;
    justify-content: space-between;
    gap: 0.2rem;
}

.pav2-hs-card__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    min-width: 0;
    flex: 1;
}

.pav2-hs-card__stat-val {
    font-size: 0.78rem;
    font-weight: 600;
    color: #c4d2ec;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pav2-hs-card__stat--ops .pav2-hs-card__stat-val {
    font-weight: 700;
    color: #9fc5ff;
}

.pav2-hs-card__stat-label {
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #4a5165;
}

/* Empty state text */
.pav2-hs-card__no-data {
    font-size: 0.68rem;
    color: #4a5165;
    text-align: center;
    padding: 0.5rem 0 0.25rem;
    margin: 0;
}

/* Light mode overrides */
html[data-theme='light'] .pav2-hs-group__label {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-hs-card {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-hs-card__name {
    color: #1e293b;
}

html[data-theme='light'] .pav2-hs-card__pa {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-hs-card__bar-wrap {
    background: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-hs-card__bar {
    background: #2563eb;
}

html[data-theme='light'] .pav2-hs-card__stat-val {
    color: #1e293b;
}

html[data-theme='light'] .pav2-hs-card__stat--ops .pav2-hs-card__stat-val {
    color: #1d4ed8;
}

html[data-theme='light'] .pav2-hs-card__stat-label {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-hs-card__no-data {
    color: #94a3b8;
}

/* ── PA Familiarity card strip ───────────────────────────── */
.pav2-hs-row--3 {
    grid-template-columns: repeat(3, 1fr);
}

.pav2-pa-trend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.pav2-pa-trend__label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #7f879b;
}

.pav2-pa-trend__delta {
    font-size: 0.65rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #7f879b;
}

.pav2-pa-trend__delta--up   { color: #5dbe8a; }
.pav2-pa-trend__delta--down { color: #e06c75; }

.pav2-hs-card__sub {
    font-size: 0.59rem;
    color: #4a5165;
    margin-top: -0.1rem;
    white-space: nowrap;
}

.pav2-hs-card__stats + .pav2-hs-card__stats {
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Vertical stat list (used in PA Familiarity cards) */
.pav2-hs-card__stats--vert {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.pav2-hs-card__stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.pav2-hs-card__stat-row__label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #4a5165;
}

.pav2-hs-card__stat-row__val {
    font-size: 0.72rem;
    font-weight: 600;
    color: #c4d2ec;
    font-variant-numeric: tabular-nums;
}

.pav2-hs-card__stat-row--ops .pav2-hs-card__stat-row__val {
    font-weight: 700;
    color: #9fc5ff;
}

.pav2-hs-card__stat-row--divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.1rem 0;
}

html[data-theme='light'] .pav2-hs-card__stat-row__label {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-hs-card__stat-row__val {
    color: #1e293b;
}

html[data-theme='light'] .pav2-hs-card__stat-row--ops .pav2-hs-card__stat-row__val {
    color: #1d4ed8;
}

html[data-theme='light'] .pav2-hs-card__stat-row--divider {
    background: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .pav2-pa-trend__label,
html[data-theme='light'] .pav2-pa-trend__delta {
    color: #64748b;
}

html[data-theme='light'] .pav2-pa-trend__delta--up   { color: #16a34a; }
html[data-theme='light'] .pav2-pa-trend__delta--down { color: #dc2626; }

html[data-theme='light'] .pav2-hs-card__sub {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-hs-card__stats + .pav2-hs-card__stats {
    border-top-color: rgba(15, 23, 42, 0.07);
}

/* ── PA Familiarity comparison table ─────────────────────── */
.pav2-pa-table {
    display: grid;
    grid-template-columns: 2.2rem repeat(3, 1fr);
    gap: 0;
    width: 100%;
}

.pav2-pa-table__head {
    display: contents;
}

.pav2-pa-table__head-spacer {
    /* empty top-left cell */
}

.pav2-pa-table__head-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0 0.25rem 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pav2-pa-table__head-col__name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #c8d4ec;
}

.pav2-pa-table__head-col__pa {
    font-size: 0.60rem;
    color: #4a5165;
    font-variant-numeric: tabular-nums;
}

.pav2-pa-table__head-col__sub {
    font-size: 0.56rem;
    color: #3d4459;
    font-variant-numeric: tabular-nums;
}

.pav2-pa-table__row {
    display: contents;
}

.pav2-pa-table__label {
    display: flex;
    align-items: center;
    padding: 0.36rem 0;
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4a5165;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pav2-pa-table__row:last-child .pav2-pa-table__label,
.pav2-pa-table__row:last-child .pav2-pa-table__val {
    border-bottom: none;
}

.pav2-pa-table__val {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.36rem 0.2rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #b8c8e4;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    transition: background 0.1s;
}

.pav2-pa-table__row:last-child .pav2-pa-table__val {
    border-bottom: none;
}

/* Best value in each row */
.pav2-pa-table__val--best {
    background: rgba(69, 130, 240, 0.1);
    color: #9fc5ff;
    font-weight: 700;
}

/* OPS row emphasis */
.pav2-pa-table__row--ops .pav2-pa-table__label {
    color: #6a7490;
}

.pav2-pa-table__row--ops .pav2-pa-table__val {
    color: #9fc5ff;
    font-weight: 700;
}

.pav2-pa-table__row--ops .pav2-pa-table__val--best {
    background: rgba(69, 130, 240, 0.14);
    color: #b8d6ff;
}

/* Divider row between rate and counting stats */
.pav2-pa-table__divider {
    grid-column: 1 / -1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.2rem 0;
}

/* Light mode */
html[data-theme='light'] .pav2-pa-table__head-col {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .pav2-pa-table__head-col__name {
    color: #1e293b;
}

html[data-theme='light'] .pav2-pa-table__head-col__pa {
    color: #94a3b8;
}

html[data-theme='light'] .pav2-pa-table__head-col__sub {
    color: #cbd5e1;
}

html[data-theme='light'] .pav2-pa-table__label {
    color: #94a3b8;
    border-bottom-color: rgba(15, 23, 42, 0.05);
}

html[data-theme='light'] .pav2-pa-table__val {
    color: #334155;
    border-bottom-color: rgba(15, 23, 42, 0.05);
}

html[data-theme='light'] .pav2-pa-table__val--best {
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

html[data-theme='light'] .pav2-pa-table__row--ops .pav2-pa-table__val {
    color: #1d4ed8;
}

html[data-theme='light'] .pav2-pa-table__row--ops .pav2-pa-table__val--best {
    background: rgba(37, 99, 235, 0.1);
    color: #1e40af;
}

html[data-theme='light'] .pav2-pa-table__divider {
    background: rgba(15, 23, 42, 0.07);
}

/* =====================================================================
   PREMIUM IN-GAME PERFORMANCE & TIMING
   ===================================================================== */
.premium-timing-module {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow: hidden;
}

.premium-timing-header {
    margin-bottom: 0.5rem;
}

.premium-timing-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.01em;
}

.premium-timing-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

.premium-timing-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .premium-timing-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Common Column Headers */
.premium-timing-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.premium-timing-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.premium-timing-col-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
}

/* ─────────────────────────────────────────────────────────────────
   LEFT: INNING BREAKDOWN
   ───────────────────────────────────────────────────────────────── */
.premium-timing-toggle {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 99px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-timing-toggle-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.premium-timing-toggle-btn:hover {
    color: #e2e8f0;
}

.premium-timing-toggle-btn.is-active {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.premium-inning-view {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.premium-inning-scroller {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}
.premium-inning-scroller::-webkit-scrollbar { display: none; }

.premium-inning-card {
    appearance: none;
    border: 1px solid rgba(56, 189, 248, calc(var(--intensity) * 0.5 + 0.05));
    background: rgba(56, 189, 248, calc(var(--intensity) * 0.2 + 0.02));
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 72px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
}

.premium-inning-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.premium-inning-card.is-selected {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.25);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.premium-inning-card__name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-inning-card.is-selected .premium-inning-card__name {
    color: #bae6fd;
}

.premium-inning-card__val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
}

.premium-inning-card__val small {
    font-size: 0.65rem;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 2px;
}

/* Inning Detail Panel */
.premium-inning-detail {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.premium-inning-detail__head {
    margin-bottom: 1rem;
}

.premium-inning-detail__head span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-inning-detail__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (min-width: 576px) {
    .premium-inning-detail__grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

.premium-inning-detail__stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.premium-inning-detail__stat span {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}

.premium-inning-detail__stat strong {
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
}

/* Link Button & Table */
.premium-link-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: #38bdf8;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    align-self: flex-start;
}

.premium-link-btn:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.premium-table-wrap {
    overflow-x: auto;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.premium-data-table th,
.premium-data-table td {
    padding: 0.75rem 1rem;
    text-align: right;
    white-space: nowrap;
}

.premium-data-table th:first-child,
.premium-data-table td:first-child {
    text-align: left;
}

.premium-data-table th {
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-data-table td {
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.premium-data-table tr:last-child td {
    border-bottom: none;
}


/* ─────────────────────────────────────────────────────────────────
   RIGHT: PROP CASH TIMING
   ───────────────────────────────────────────────────────────────── */
.premium-prop-pill-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}
.premium-prop-pill-nav::-webkit-scrollbar { display: none; }

.premium-prop-pill {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.premium-prop-pill:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

.premium-prop-pill.is-active {
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
    font-weight: 600;
}

.premium-cash-hero {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin: 0.5rem 0 1rem 0;
}

.premium-cash-hero__rate {
    font-size: 2.5rem;
    font-weight: 300;
    color: #f8fafc;
    line-height: 1;
    letter-spacing: -0.02em;
}

.premium-cash-hero__desc {
    font-size: 0.9rem;
    color: #94a3b8;
}

.premium-cash-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 576px) {
    .premium-cash-split {
        grid-template-columns: 1fr 1fr;
    }
}

.premium-cash-split-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.premium-cash-split-lbl {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-bar-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.premium-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.premium-bar-row__label {
    width: 3.5rem;
    font-size: 0.85rem;
    color: #cbd5e1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.premium-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    overflow: hidden;
}

.premium-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-bar-row__val {
    width: 3rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #f8fafc;
    text-align: right;
}

.premium-cash-vs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.premium-vs-card {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.premium-vs-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.premium-vs-card__lbl {
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
}

.premium-vs-card__rate {
    font-size: 1.1rem;
    font-weight: 700;
}

.premium-vs-card__rate small {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.8;
}

.premium-vs-card__track {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.premium-vs-card__fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-vs-card__sub {
    font-size: 0.75rem;
    color: #64748b;
}

.premium-vs-card--starter .premium-vs-card__rate { color: #818cf8; }
.premium-vs-card--starter .premium-vs-card__fill { background: #818cf8; }
.premium-vs-card--bullpen .premium-vs-card__rate { color: #38bdf8; }
.premium-vs-card--bullpen .premium-vs-card__fill { background: #38bdf8; }


/* LIGHT THEME OVERRIDES */
html[data-theme='light'] .premium-timing-module {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.05);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
}
html[data-theme='light'] .premium-timing-title { color: #0f172a; }
html[data-theme='light'] .premium-timing-col-title { color: #1e293b; }
html[data-theme='light'] .premium-timing-subtitle { color: #64748b; }

html[data-theme='light'] .premium-timing-toggle {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.05);
}
html[data-theme='light'] .premium-timing-toggle-btn.is-active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

html[data-theme='light'] .premium-inning-card {
    background: rgba(2, 132, 199, calc(var(--intensity) * 0.15 + 0.02));
    border-color: rgba(2, 132, 199, calc(var(--intensity) * 0.3 + 0.1));
}
html[data-theme='light'] .premium-inning-card:hover { box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15); }
html[data-theme='light'] .premium-inning-card.is-selected {
    border-color: #0284c7;
    background: rgba(2, 132, 199, 0.2);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}
html[data-theme='light'] .premium-inning-card__name { color: #64748b; }
html[data-theme='light'] .premium-inning-card.is-selected .premium-inning-card__name { color: #0369a1; }
html[data-theme='light'] .premium-inning-card__val { color: #0f172a; }

html[data-theme='light'] .premium-inning-detail {
    background: rgba(248, 250, 252, 0.8);
    border-color: rgba(15, 23, 42, 0.05);
}
html[data-theme='light'] .premium-inning-detail__head span { color: #0284c7; }
html[data-theme='light'] .premium-inning-detail__stat strong { color: #0f172a; }

html[data-theme='light'] .premium-table-wrap {
    background: rgba(248, 250, 252, 0.8);
    border-color: rgba(15, 23, 42, 0.05);
}
html[data-theme='light'] .premium-data-table th { border-bottom-color: rgba(15, 23, 42, 0.05); color: #475569; }
html[data-theme='light'] .premium-data-table td { border-bottom-color: rgba(15, 23, 42, 0.02); color: #334155; }

html[data-theme='light'] .premium-prop-pill {
    border-color: rgba(15, 23, 42, 0.1);
    background: rgba(15, 23, 42, 0.02);
    color: #475569;
}
html[data-theme='light'] .premium-prop-pill:hover { background: rgba(15, 23, 42, 0.05); color: #0f172a; }
html[data-theme='light'] .premium-prop-pill.is-active { background: #0ea5e9; color: #ffffff; border-color: #0ea5e9; }

html[data-theme='light'] .premium-cash-hero__rate { color: #0f172a; }
html[data-theme='light'] .premium-cash-split-lbl { color: #64748b; }

html[data-theme='light'] .premium-bar-row__label { color: #334155; }
html[data-theme='light'] .premium-bar-row__val { color: #0f172a; }
html[data-theme='light'] .premium-bar-track { background: rgba(15, 23, 42, 0.05); }
html[data-theme='light'] .premium-bar-fill { background: linear-gradient(90deg, #0284c7, #4f46e5); }

html[data-theme='light'] .premium-vs-card {
    background: rgba(248, 250, 252, 0.8);
    border-color: rgba(15, 23, 42, 0.05);
}
html[data-theme='light'] .premium-vs-card__lbl { color: #334155; }
html[data-theme='light'] .premium-vs-card__track { background: rgba(15, 23, 42, 0.05); }
html[data-theme='light'] .premium-vs-card--starter .premium-vs-card__rate { color: #4f46e5; }
html[data-theme='light'] .premium-vs-card--starter .premium-vs-card__fill { background: #4f46e5; }
html[data-theme='light'] .premium-vs-card--bullpen .premium-vs-card__rate { color: #0284c7; }
html[data-theme='light'] .premium-vs-card--bullpen .premium-vs-card__fill { background: #0284c7; }

/* ── RECENT CONTACT QUALITY – light mode ── */

html[data-theme='light'] #recent-contact-quality-shell .rcq-chart-select {
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5.2L7 9l4-3.8' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.64rem center;
    background-size: 14px;
    border-color: rgba(15, 23, 42, 0.14);
    color: #0f172a;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-chart-select:hover {
    background-color: #f8fafc;
    border-color: rgba(15, 23, 42, 0.22);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-event-filter-group {
    background: rgba(15, 23, 42, 0.035);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: none;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-chart-hand-toggle {
    background: rgba(15, 23, 42, 0.035);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: none;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-event-filter-btn {
    color: #475569;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-event-filter-btn:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-event-filter-btn.is-active {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.4);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-chart-summary-strip {
    background: rgba(15, 23, 42, 0.03);
    box-shadow: none;
    border-top-color: rgba(15, 23, 42, 0.08);
    color: #64748b;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-chart-summary-item strong {
    color: #0f172a;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-chart-summary-sep {
    color: rgba(15, 23, 42, 0.2);
}

html[data-theme='light'] #recent-contact-quality-shell [data-rcq-chart-delta-value].is-up { color: #16a34a; }
html[data-theme='light'] #recent-contact-quality-shell [data-rcq-chart-delta-value].is-down { color: #dc2626; }
html[data-theme='light'] #recent-contact-quality-shell [data-rcq-chart-delta-value].is-neutral { color: #64748b; }

html[data-theme='light'] #recent-contact-quality-shell .rcq-metric-pill {
    color: #1e293b !important;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-metric-pill--up-1 {
    color: #15803d !important;
    background: rgba(22, 163, 74, 0.16);
    border-color: rgba(22, 163, 74, 0.4);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-metric-pill--up-2 {
    color: #15803d !important;
    background: rgba(22, 163, 74, 0.24);
    border-color: rgba(22, 163, 74, 0.52);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-metric-pill--up-3 {
    color: #14532d !important;
    background: rgba(22, 163, 74, 0.32);
    border-color: rgba(22, 163, 74, 0.65);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-metric-pill--down-1 {
    color: #991b1b !important;
    background: rgba(220, 38, 38, 0.14);
    border-color: rgba(220, 38, 38, 0.34);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-metric-pill--down-2 {
    color: #991b1b !important;
    background: rgba(220, 38, 38, 0.22);
    border-color: rgba(220, 38, 38, 0.46);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-metric-pill--down-3 {
    color: #7f1d1d !important;
    background: rgba(220, 38, 38, 0.3);
    border-color: rgba(220, 38, 38, 0.58);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-metric-pill--neutral-0 {
    color: #475569 !important;
    background: rgba(100, 116, 139, 0.14);
    border-color: rgba(100, 116, 139, 0.32);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-table-heading {
    color: #64748b;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-legend-item,
html[data-theme='light'] #recent-contact-quality-shell .rcq-chart-legend {
    color: #64748b;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-game-row {
    border-bottom-color: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] #recent-contact-quality-shell tbody tr {
    background-color: transparent;
}

html[data-theme='light'] #recent-contact-quality-shell .performance-table tr.rcq-season-row {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.04));
    box-shadow:
        inset 0 1px 0 rgba(37, 99, 235, 0.18),
        inset 0 -1px 0 rgba(37, 99, 235, 0.14);
}

html[data-theme='light'] #recent-contact-quality-shell .performance-table tr.rcq-season-row td {
    color: #1e40af !important;
}

html[data-theme='light'] #recent-contact-quality-shell .performance-table tr.rcq-season-row td:first-child {
    border-left-color: rgba(37, 99, 235, 0.45);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-chart-panel {
    background: #f1f5fb;
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-chart-canvas-wrap {
    background: rgba(15, 23, 42, 0.025);
    border-radius: 8px;
}

/* ── RCQ expanded per-pitch detail table ── */

html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-event-pill--hit {
    color: #15803d;
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(22, 163, 74, 0.38);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-table thead th {
    color: #64748b;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-table td {
    color: #334155;
    border-bottom-color: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-cell--date {
    color: #0f172a;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-cell--num {
    color: #1e293b;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-table tbody tr:hover td {
    background: rgba(15, 23, 42, 0.03) !important;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-table tbody tr.rcq-detail-row--ab-start td {
    border-top-color: rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-table tbody tr.rcq-detail-row--foul td,
html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-table tbody tr.rcq-detail-row--foul .rcq-detail-cell--date,
html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-table tbody tr.rcq-detail-row--foul .rcq-detail-cell--num {
    color: #94a3b8;
}

html[data-theme='light'] #recent-contact-quality-shell .rcq-detail-table tbody tr.rcq-detail-row--foul:hover td {
    background: rgba(148, 163, 184, 0.12) !important;
}

/* ── PITCH SPLITS – light mode fixes ── */

html[data-theme='light'] .sp-section--vs-pitch .sp-th--secondary,
html[data-theme='light'] .sp-section--vs-pitch .sp-td--secondary {
    color: #64748b;
}

html[data-theme='light'] .sp-section--vs-pitch .sp-th--dim,
html[data-theme='light'] .sp-section--vs-pitch .sp-td--dim {
    color: #94a3b8;
}

/* ── MATCHUP RATING – light mode ── */

html[data-theme='light'] .tg-verdict__score {
    color: #0f172a;
}

html[data-theme='light'] .tg-verdict__score-max {
    color: #64748b;
}

html[data-theme='light'] .tg-verdict-component {
    background: rgba(15, 23, 42, 0.025);
    border-color: rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .tg-verdict-component__name {
    color: #0f172a;
}

html[data-theme='light'] .tg-verdict-component__score {
    color: #64748b;
}

html[data-theme='light'] .tg-verdict-component__reason {
    color: #475569;
}

html[data-theme='light'] .tg-verdict-component__pill {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}

html[data-theme='light'] .tg-verdict-component__pill--positive {
    color: #15803d;
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.2);
}

html[data-theme='light'] .tg-verdict-component__pill--negative {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

html[data-theme='light'] .tg-matchup-bar__value {
    color: #0f172a;
}

html[data-theme='light'] .tg-panel__eyebrow,
html[data-theme='light'] .tg-feature-label {
    color: #64748b;
}
