/* Worst Pickz MLB Research — matches main cheat sheet theme */
:root {
    --wpz-color-text: #f5efe9;
    --wpz-color-text-soft: #ffedd5;
    --wpz-color-heading: #fffbeb;
    --wpz-color-paragraph: #fde2c8;
    --wpz-bg-body: radial-gradient(ellipse at top, #0f1a14 0%, #0a0d0a 42%, #030201 100%);
    --wpz-bg-container: linear-gradient(135deg, rgba(12, 28, 18, 0.97) 0%, rgba(22, 10, 14, 0.96) 48%, rgba(10, 18, 32, 0.97) 100%);
    --wpz-border-container: rgba(234, 179, 8, 0.42);
    --wpz-bg-header: linear-gradient(145deg, #071910 0%, #241010 38%, #152238 100%);
    --wpz-border-header: rgba(248, 113, 113, 0.42);
    --wpz-brand-tag-bg: rgba(8, 26, 16, 0.52);
    --wpz-brand-tag-border: rgba(74, 222, 128, 0.38);
    --wpz-brand-tag-text: #ecfccb;
    --wpz-hero-frame: rgba(234, 179, 8, 0.4);
    --wpz-accent-gold: #facc15;
    --wpz-accent-green: #4ade80;
    --wpz-accent-rose: #fb7185;
    --wpz-accent-orange: #fb923c;
    --rs-panel: rgba(8, 15, 28, 0.82);
    --rs-panel-2: rgba(15, 23, 42, 0.66);
    --rs-border: rgba(251, 146, 60, 0.22);
    --rs-border-strong: rgba(234, 179, 8, 0.35);
    --rs-muted: #94a3b8;
    --rs-good-bg: rgba(34, 197, 94, 0.38);
    --rs-mid-bg: rgba(234, 179, 8, 0.32);
    --rs-bad-bg: rgba(244, 63, 94, 0.32);
    --rs-group-power: rgba(251, 191, 36, 0.14);
    --rs-group-contact: rgba(56, 189, 248, 0.1);
    --rs-group-batted: rgba(249, 115, 22, 0.14);
    --rs-group-plate: rgba(167, 139, 250, 0.1);
    --rs-group-matchup: rgba(74, 222, 128, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--wpz-bg-body);
    color: var(--wpz-color-text);
    min-height: 100vh;
    min-height: 100dvh;
    padding: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
button, select, input, summary {
    touch-action: manipulation;
    font: inherit;
}
a { color: #7dd3fc; text-decoration: none; }
a:hover { color: #bae6fd; }

.rs-container {
    max-width: 1680px;
    margin: 0 auto;
    background: var(--wpz-bg-container);
    border: 2px solid var(--wpz-border-container);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
@media (max-width: 768px) {
    .rs-container {
        overflow: visible;
        border-radius: 16px;
    }
}

/* ── Header ── */
.rs-header {
    position: relative;
    padding: 22px 20px 24px;
    background: var(--wpz-bg-header);
    border-bottom: 3px solid var(--wpz-border-header);
}
.rs-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}
.rs-header-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rs-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid rgba(254, 215, 170, 0.4);
    background: rgba(15, 23, 42, 0.55);
    color: var(--wpz-color-text-soft);
    font-weight: 700;
    font-size: 0.84rem;
    letter-spacing: 0.02em;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rs-back:hover {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(251, 146, 60, 0.55);
    color: #fff;
}
.rs-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(254, 215, 170, 0.4);
    background: rgba(15, 23, 42, 0.55);
    color: #e7e9ea;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
}
.rs-theme-toggle:hover {
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
}
.rs-header-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px 22px;
    align-items: center;
}
.rs-hero-wrap {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid var(--wpz-hero-frame);
    background: #050805;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.rs-hero-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rs-brand-tag {
    display: inline-flex;
    padding: 5px 12px;
    margin-bottom: 10px;
    border-radius: 999px;
    border: 1px solid var(--wpz-brand-tag-border);
    background: var(--wpz-brand-tag-bg);
    color: var(--wpz-brand-tag-text);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.rs-header-brand h1 {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wpz-color-heading);
    margin-bottom: 6px;
    line-height: 1.15;
}
.rs-header-brand p {
    color: var(--wpz-color-paragraph);
    font-size: 0.92rem;
    font-weight: 600;
    max-width: 52rem;
}

/* ── Toolbar ── */
.rs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(19, 11, 8, 0.88) 0%, rgba(10, 17, 31, 0.9) 100%);
    border-bottom: 1px solid rgba(251, 146, 60, 0.16);
}
.rs-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 12px;
}
.rs-controls label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rs-muted);
    font-weight: 800;
}
.rs-controls input[type="date"] {
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(251, 146, 60, 0.28);
    background: rgba(8, 15, 28, 0.88);
    color: var(--wpz-color-text);
    font-weight: 600;
    font-size: 0.88rem;
    min-width: 148px;
}
.rs-btn {
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid rgba(251, 146, 60, 0.35);
    background: rgba(15, 23, 42, 0.72);
    color: var(--wpz-color-text-soft);
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.rs-btn:hover {
    border-color: rgba(251, 146, 60, 0.6);
    background: rgba(15, 23, 42, 0.92);
}
.rs-btn--primary {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.85) 0%, rgba(234, 88, 12, 0.75) 100%);
    border-color: rgba(251, 191, 36, 0.45);
    color: #fffbeb;
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.35);
}
.rs-btn--primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}
.rs-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid transparent;
}
.rs-badge--api {
    background: rgba(74, 222, 128, 0.14);
    border-color: rgba(74, 222, 128, 0.35);
    color: #bbf7d0;
}
.rs-badge--enhanced {
    background: rgba(251, 191, 36, 0.16);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fde68a;
}

/* ── Main content ── */
.rs-main { padding: 16px 18px 28px; }

.rs-status {
    padding: 11px 14px;
    border-radius: 12px;
    background: rgba(8, 15, 28, 0.78);
    border: 1px solid rgba(125, 211, 252, 0.14);
    font-size: 0.82rem;
    color: var(--rs-muted);
    margin-bottom: 16px;
}
.rs-status[hidden] {
    display: none !important;
    margin: 0;
    padding: 0;
}
.rs-status strong { color: var(--wpz-accent-gold); }
.rs-status.is-error {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(76, 5, 25, 0.35);
    color: #fecdd3;
}

.rs-section { margin-bottom: 18px; }
.rs-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fed7aa;
}
.rs-section-title::before {
    content: "";
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: linear-gradient(180deg, #fde68a, #f97316);
}

/* ── Game pills ── */
.rs-games-wrap {
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(234, 179, 8, 0.4) transparent;
}
.rs-games {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: min-content;
    padding: 2px 0;
}
.rs-game-pill {
    flex: 0 0 auto;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(251, 146, 60, 0.22);
    background: rgba(8, 15, 28, 0.84);
    color: var(--wpz-color-text);
    cursor: pointer;
    text-align: left;
    min-width: 130px;
    scroll-snap-align: start;
    transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.rs-game-pill:hover {
    border-color: rgba(251, 146, 60, 0.5);
    transform: translateY(-1px);
}
.rs-game-pill.is-active {
    background: linear-gradient(145deg, rgba(66, 32, 6, 0.75) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: rgba(234, 179, 8, 0.55);
    box-shadow: 0 6px 20px rgba(180, 83, 9, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.rs-game-pill__matchup {
    font-weight: 800;
    font-size: 0.94rem;
    display: block;
    color: var(--wpz-color-heading);
}
.rs-game-pill__meta {
    font-size: 0.72rem;
    color: var(--rs-muted);
    margin-top: 5px;
    display: block;
    line-height: 1.35;
}
.rs-game-pill.is-active .rs-game-pill__meta { color: rgba(255, 237, 213, 0.78); }

/* ── Matchup bar ── */
.rs-matchup-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(38, 16, 10, 0.92) 0%, rgba(30, 64, 175, 0.35) 100%);
    border: 1px solid rgba(251, 146, 60, 0.22);
    margin-bottom: 14px;
}
.rs-matchup-bar h2,
.rs-matchup-bar h3 {
    font-size: 1.05rem;
    color: var(--wpz-color-heading);
    letter-spacing: 0.02em;
}
.rs-section-title--hitters {
    margin-top: 4px;
    margin-bottom: 10px;
}
.rs-section-title--pitchers {
    margin-top: 16px;
    margin-bottom: 0;
}

.rs-pitcher-panel {
    margin-top: 14px;
    margin-bottom: 10px;
}
.rs-pitcher-panel[hidden] { display: none !important; }
.rs-pitcher-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
}
.rs-pitcher-lead {
    color: var(--rs-muted);
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0;
}

.rs-pitcher-duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rs-pitcher-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--rs-border);
    border-radius: 14px;
    background: var(--rs-panel);
    overflow: visible;
}
.rs-pitcher-card__head {
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 41, 59, 0.72) 100%);
}
.rs-pitcher-card--awy .rs-pitcher-card__head {
    background: linear-gradient(135deg, rgba(30, 16, 10, 0.92) 0%, rgba(30, 64, 175, 0.28) 100%);
}
.rs-pitcher-card--hom .rs-pitcher-card__head {
    background: linear-gradient(135deg, rgba(12, 28, 18, 0.92) 0%, rgba(120, 53, 15, 0.28) 100%);
}
.rs-pitcher-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.rs-pitcher-card__team {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fde68a;
    background: rgba(234, 179, 8, 0.14);
    border: 1px solid rgba(234, 179, 8, 0.28);
}
.rs-pitcher-card__hand {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--rs-muted);
}
.rs-pitcher-card__name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--wpz-color-heading);
    letter-spacing: 0.01em;
    line-height: 1.25;
}
.rs-pitcher-card__mix {
    margin-top: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #bae6fd;
    line-height: 1.35;
}

.rs-pitcher-risk-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.rs-pitcher-risk-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(8, 15, 28, 0.55);
    position: relative;
    cursor: default;
}
.rs-pitcher-risk-card__label {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--rs-muted);
}
.rs-pitcher-risk-card__score {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: #f8fafc;
}
.rs-pitcher-risk-card__sub {
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--rs-muted);
    line-height: 1.3;
}
.rs-pitcher-risk-card--prime {
    border-color: rgba(74, 222, 128, 0.42);
    background: rgba(12, 40, 24, 0.42);
}
.rs-pitcher-risk-card--prime .rs-pitcher-risk-card__score { color: #86efac; }
.rs-pitcher-risk-card--mid {
    border-color: rgba(234, 179, 8, 0.35);
    background: rgba(60, 45, 10, 0.35);
}
.rs-pitcher-risk-card--mid .rs-pitcher-risk-card__score { color: #fde68a; }
.rs-pitcher-risk-card--fade {
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(60, 15, 15, 0.45);
}
.rs-pitcher-risk-card--fade .rs-pitcher-risk-card__score { color: #fca5a5; }

@media (max-width: 520px) {
    .rs-pitcher-risk-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
    }
    .rs-pitcher-risk-card {
        padding: 8px 5px;
    }
    .rs-pitcher-risk-card__label {
        font-size: 0.58rem;
        letter-spacing: 0.03em;
    }
    .rs-pitcher-risk-card__score {
        font-size: 1.05rem;
    }
    .rs-pitcher-risk-card__sub {
        font-size: 0.58rem;
    }
}

.rs-pitcher-card__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rs-pitcher-card--clickable {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rs-pitcher-card--clickable:hover {
    border-color: rgba(251, 146, 60, 0.45);
    box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.2);
}
.rs-pitcher-card__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    margin: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(8, 15, 28, 0.5);
}
.rs-pitcher-card__tab {
    border: none;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0;
    background: transparent;
    color: var(--rs-muted);
    padding: 10px 4px;
    min-height: 42px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
    touch-action: manipulation;
}
.rs-pitcher-card__tab:last-child {
    border-right: none;
}
.rs-pitcher-card__tab.is-active {
    color: #fde68a;
    border-color: rgba(148, 163, 184, 0.12);
    background: rgba(251, 146, 60, 0.14);
    box-shadow: inset 0 -2px 0 #f97316;
}
.rs-pitcher-card__tab .rs-tab-short {
    display: none;
}
.rs-pitcher-group__grid--overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.rs-pitcher-splits {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.rs-pitcher-splits th,
.rs-pitcher-splits td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    text-align: left;
}
.rs-pitcher-splits thead th {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rs-muted);
}
.rs-pitcher-splits tbody th {
    color: var(--rs-muted);
    font-weight: 600;
}
.rs-pitcher-splits__empty,
.rs-pitcher-arsenal__empty {
    font-size: 0.78rem;
    color: var(--rs-muted);
    margin: 0;
}
.rs-pitcher-arsenal__row {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.rs-pitcher-arsenal__label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #bae6fd;
}
.rs-pitcher-arsenal__bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    overflow: hidden;
}
.rs-pitcher-arsenal__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f97316, #facc15);
}
.rs-pitcher-arsenal__pct {
    font-size: 0.72rem;
    font-weight: 800;
    text-align: right;
    color: #fde68a;
}
.rs-pitcher-arsenal__note {
    margin: 10px 0 0;
    font-size: 0.72rem;
    color: var(--rs-muted);
    line-height: 1.45;
}
.rs-date-hint {
    font-size: 0.72rem;
    color: var(--rs-muted);
    align-self: center;
}
.rs-leaderboard--pitchers {
    min-width: 640px;
}
.rs-plb-sort.is-sorted {
    color: var(--wpz-accent-gold);
}
.rs-pitcher-group__label {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rs-muted);
    margin-bottom: 8px;
}
.rs-pitcher-group__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
}
.rs-pitcher-stat {
    position: relative;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
    min-width: 0;
    cursor: default;
}
.rs-pitcher-stat.rs-has-tip[data-tip]::before,
.rs-pitcher-risk-card.rs-has-tip[data-tip]::before {
    width: min(248px, 88vw);
    font-size: 0.7rem;
    line-height: 1.42;
    z-index: 60;
}
.rs-pitcher-stat dt {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rs-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rs-pitcher-stat dd {
    font-size: 0.92rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.2;
}
.rs-pitcher-stat--good {
    border-color: rgba(74, 222, 128, 0.32);
    background: rgba(34, 197, 94, 0.1);
}
.rs-pitcher-stat--good dd { color: #bbf7d0; }
.rs-pitcher-stat--bad {
    border-color: rgba(248, 113, 113, 0.32);
    background: rgba(244, 63, 94, 0.1);
}
.rs-pitcher-stat--bad dd { color: #fecaca; }
.rs-pitcher-stat--mid {
    border-color: rgba(234, 179, 8, 0.28);
    background: rgba(234, 179, 8, 0.06);
}
.rs-pitcher-stat--mid dd { color: #fde68a; }

@media (max-width: 1100px) {
    .rs-pitcher-group__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .rs-pitcher-duo {
        grid-template-columns: 1fr;
    }
    .rs-pitcher-panel__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

html.theme-light .rs-pitcher-card__head {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.55) 0%, rgba(255, 237, 213, 0.45) 100%);
}
html.theme-light .rs-pitcher-card--awy .rs-pitcher-card__head,
html.theme-light .rs-pitcher-card--hom .rs-pitcher-card__head {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.65) 0%, rgba(254, 215, 170, 0.35) 100%);
}
html.theme-light .rs-pitcher-card__name { color: #1c1917; }
html.theme-light .rs-pitcher-card__mix { color: #0369a1; }
html.theme-light .rs-pitcher-stat {
    background: rgba(255, 251, 235, 0.85);
    border-color: rgba(180, 83, 9, 0.15);
}
html.theme-light .rs-pitcher-stat dd { color: #1c1917; }
html.theme-light .rs-pitcher-stat--good {
    border-color: rgba(22, 163, 74, 0.45);
    background: rgba(220, 252, 231, 0.85);
}
html.theme-light .rs-pitcher-stat--good dd { color: #15803d; }
html.theme-light .rs-pitcher-stat--mid {
    border-color: rgba(202, 138, 4, 0.4);
    background: rgba(254, 249, 195, 0.85);
}
html.theme-light .rs-pitcher-stat--mid dd { color: #a16207; }
html.theme-light .rs-pitcher-stat--bad {
    border-color: rgba(220, 38, 38, 0.4);
    background: rgba(254, 226, 226, 0.85);
}
html.theme-light .rs-pitcher-stat--bad dd { color: #b91c1c; }
html.theme-light .rs-pitcher-risk-card {
    background: rgba(255, 251, 235, 0.9);
}
html.theme-light .rs-pitcher-risk-card--prime .rs-pitcher-risk-card__score { color: #15803d; }
html.theme-light .rs-pitcher-risk-card--mid .rs-pitcher-risk-card__score { color: #a16207; }
html.theme-light .rs-pitcher-risk-card--fade .rs-pitcher-risk-card__score { color: #b91c1c; }

.rs-matchup-bar .rs-sp {
    display: block;
    color: #bae6fd;
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.4;
    max-width: 760px;
    margin-top: 4px;
}
.rs-side-toggle {
    display: inline-flex;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(234, 179, 8, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.rs-side-toggle button {
    padding: 9px 18px;
    border: none;
    background: rgba(8, 15, 28, 0.75);
    color: var(--rs-muted);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.rs-side-toggle button.is-active {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.65) 0%, rgba(234, 88, 12, 0.5) 100%);
    color: #fffbeb;
}

/* ── Table ── */
.rs-table-wrap {
    overflow: auto;
    border-radius: 14px;
    border: 1px solid var(--rs-border-strong);
    background: linear-gradient(180deg, rgba(8, 15, 28, 0.95) 0%, rgba(5, 8, 14, 1) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.rs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
    min-width: 1280px;
    font-variant-numeric: tabular-nums;
    --rs-sticky-order-w: 2.5rem;
    --rs-sticky-name-w: 10.5rem;
    --rs-sticky-hand-w: 1.75rem;
    --rs-sticky-name-left: var(--rs-sticky-order-w);
    --rs-sticky-hand-left: calc(var(--rs-sticky-order-w) + var(--rs-sticky-name-w));
}
.rs-table th,
.rs-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    text-align: right;
    white-space: nowrap;
}
.rs-table th:first-child,
.rs-table td:first-child,
.rs-table th:nth-child(2),
.rs-table td:nth-child(2),
.rs-table th:nth-child(3),
.rs-table td:nth-child(3) {
    text-align: left;
}
.rs-table thead tr.rs-group-row th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 7px 10px;
    font-size: 0.64rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #cbd5e1;
    cursor: default;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.rs-table thead tr.rs-group-row th.rs-group--identity { background: rgba(15, 23, 42, 0.98); }
.rs-table thead tr.rs-group-row th.rs-group--power { background: var(--rs-group-power); color: #fde68a; }
.rs-table thead tr.rs-group-row th.rs-group--contact { background: var(--rs-group-contact); color: #bae6fd; }
.rs-table thead tr.rs-group-row th.rs-group--batted { background: var(--rs-group-batted); color: #fdba74; }
.rs-table thead tr.rs-group-row th.rs-group--plate { background: var(--rs-group-plate); color: #ddd6fe; }
.rs-table thead tr.rs-group-row th.rs-group--matchup { background: var(--rs-group-matchup); color: #86efac; }
.rs-table thead tr.rs-col-row th {
    position: sticky;
    top: 29px;
    z-index: 2;
    background: rgba(12, 18, 32, 0.98);
    color: var(--rs-muted);
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    user-select: none;
    border-bottom: 2px solid rgba(234, 179, 8, 0.28);
    transition: color 0.12s;
}
.rs-table thead tr.rs-col-row th:hover { color: #fde68a; }
.rs-table thead tr.rs-col-row th.rs-col--sorted { color: var(--wpz-accent-gold); }
.rs-table thead tr.rs-col-row th.rs-col--matchup { color: #86efac; }
.rs-table thead tr.rs-col-row th.rs-col--matchup.rs-col--sorted { color: #86efac; }
.rs-table thead tr.rs-col-row th.rs-col--batted { color: #fdba74; }
.rs-table thead tr.rs-col-row th.rs-col--batted.rs-col--sorted { color: #fdba74; }
.rs-table thead tr.rs-col-row th.rs-col--contact { color: #7dd3fc; }
.rs-table thead tr.rs-col-row th.rs-col--contact.rs-col--sorted { color: #7dd3fc; }
.rs-sort-indicator {
    margin-left: 0.2em;
    font-size: 0.9em;
    font-weight: 700;
    opacity: 0.95;
}
.rs-table tbody tr:nth-child(even) { background: rgba(15, 23, 42, 0.35); }
.rs-table tbody tr:hover { background: rgba(251, 146, 60, 0.08); }

/* Frozen identity block (#, name, B) — stays aligned when scrolling horizontally */
.rs-table th:nth-child(1),
.rs-table td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
    width: var(--rs-sticky-order-w);
    min-width: var(--rs-sticky-order-w);
    max-width: var(--rs-sticky-order-w);
    padding-left: 12px;
    padding-right: 8px;
}
.rs-table th:nth-child(2),
.rs-table td:nth-child(2) {
    position: sticky;
    left: var(--rs-sticky-name-left);
    z-index: 2;
    width: var(--rs-sticky-name-w);
    min-width: var(--rs-sticky-name-w);
    max-width: var(--rs-sticky-name-w);
    padding-left: 10px;
    padding-right: 10px;
}
.rs-table th:nth-child(3),
.rs-table td:nth-child(3) {
    position: sticky;
    left: var(--rs-sticky-hand-left);
    z-index: 2;
    width: var(--rs-sticky-hand-w);
    min-width: var(--rs-sticky-hand-w);
    max-width: var(--rs-sticky-hand-w);
    padding-left: 8px;
    padding-right: 12px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.28);
}
.rs-table tbody tr:nth-child(odd) td:nth-child(-n+3) {
    background: rgba(8, 15, 28, 0.98);
}
.rs-table tbody tr:nth-child(even) td:nth-child(-n+3) {
    background: rgba(15, 23, 42, 0.98);
}
.rs-table tbody tr:hover td:nth-child(-n+3) {
    background: rgba(28, 20, 12, 0.98);
}
.rs-table thead tr.rs-group-row th:nth-child(-n+3) {
    z-index: 6;
    background: rgba(15, 23, 42, 0.98);
}
.rs-table thead tr.rs-col-row th:nth-child(-n+3) {
    z-index: 5;
    background: rgba(12, 18, 32, 0.98);
}
.rs-table thead tr.rs-group-row th:nth-child(3),
.rs-table thead tr.rs-col-row th:nth-child(3) {
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.28);
}
.rs-hitter {
    font-weight: 700;
    color: var(--wpz-color-heading);
    display: inline-block;
    max-width: calc(var(--rs-sticky-name-w) - 2.75rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}
.rs-hand { color: var(--rs-muted); font-size: 0.72rem; margin-left: 4px; }
.rs-cell-heat {
    display: inline-block;
    min-width: 2.8rem;
    padding: 3px 7px;
    border-radius: 7px;
    font-weight: 700;
    text-align: center;
}
.rs-cell-heat--good { color: #ecfccb; }
.rs-cell-heat--mid { color: #fef3c7; }
.rs-cell-heat--bad { color: #fee2e2; }
.rs-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--rs-muted);
}

/* ── Mobile card layout (shown ≤768px) ── */
.rs-mobile-bar,
.rs-card-list { display: none; }

.rs-mobile-bar {
    margin-bottom: 12px;
    position: sticky;
    top: 0;
    z-index: 4;
    padding: 10px 0 8px;
    background: linear-gradient(180deg, rgba(8, 15, 28, 0.98) 0%, rgba(8, 15, 28, 0.92) 85%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.rs-mobile-bar__row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.rs-mobile-sort-label {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rs-muted);
    font-weight: 800;
}
.rs-mobile-sort {
    width: 100%;
    padding: 12px 36px 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(251, 146, 60, 0.28);
    background-color: rgba(8, 15, 28, 0.88);
    color: var(--wpz-color-text);
    font-weight: 700;
    font-size: 1rem;
    min-height: 48px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.rs-mobile-sort-dir {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(251, 146, 60, 0.35);
    background: rgba(15, 23, 42, 0.88);
    color: var(--wpz-accent-gold);
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    line-height: 1;
}
.rs-mobile-sort-dir:active {
    transform: scale(0.96);
}

.rs-card-list {
    display: none;
    flex-direction: column;
    gap: 12px;
}
.rs-card {
    border-radius: 14px;
    border: 1px solid rgba(251, 146, 60, 0.22);
    background: linear-gradient(180deg, rgba(8, 15, 28, 0.95) 0%, rgba(5, 8, 14, 0.98) 100%);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.rs-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(135deg, rgba(38, 16, 10, 0.55) 0%, rgba(15, 23, 42, 0.75) 100%);
}
.rs-card__order {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(234, 179, 8, 0.18);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #fde68a;
    font-weight: 800;
    font-size: 0.95rem;
}
.rs-card__identity { min-width: 0; flex: 1; }
.rs-card__name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--wpz-color-heading);
    line-height: 1.25;
    word-break: break-word;
}
.rs-card__meta {
    margin-top: 4px;
    font-size: 0.76rem;
    color: var(--rs-muted);
    font-weight: 600;
}
.rs-card__highlights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.35);
}
.rs-card-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 8px 4px;
    border-radius: 10px;
    background: rgba(8, 15, 28, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.1);
}
.rs-card-highlight__label {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--rs-muted);
    text-align: center;
    line-height: 1.2;
}
.rs-card-highlight__val {
    font-size: 0.88rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    padding: 2px 6px;
    border-radius: 6px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rs-hand--proj {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(125, 211, 252, 0.15);
    color: #7dd3fc;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}
.rs-flag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}

.rs-weather {
    margin: 0 0 14px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    background: linear-gradient(135deg, rgba(8, 20, 36, 0.92) 0%, rgba(12, 28, 24, 0.88) 100%);
    overflow: hidden;
}
.rs-weather[hidden] { display: none !important; }
.rs-weather > summary {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.rs-weather > summary::-webkit-details-marker { display: none; }
.rs-weather > summary::marker { content: ""; }
.rs-weather__head {
    display: contents;
}
.rs-weather__chev {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid #7dd3fc;
    border-bottom: 2px solid #7dd3fc;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    margin-left: auto;
}
.rs-weather[open] > summary .rs-weather__chev {
    transform: rotate(-135deg);
}
.rs-weather__body {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
    padding: 0 16px 14px;
}
.rs-weather:not([open]) .rs-weather__body {
    display: none;
}
@media (min-width: 769px) {
    .rs-weather > summary {
        cursor: default;
        pointer-events: none;
    }
    .rs-weather__chev { display: none; }
    .rs-weather:not([open]) .rs-weather__body {
        display: flex;
    }
}
.rs-weather__title {
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7dd3fc;
}
.rs-weather__meta {
    font-size: 0.78rem;
    color: var(--rs-muted);
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
}
.rs-wind-field {
    flex: 0 0 320px;
    width: 320px;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: #0c1219;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.rs-wind-field--good { border-color: rgba(74, 222, 128, 0.35); --rs-wind-arrow: #86efac; }
.rs-wind-field--bad { border-color: rgba(248, 113, 113, 0.35); --rs-wind-arrow: #fca5a5; }
.rs-wind-field--mid { border-color: rgba(148, 163, 184, 0.22); --rs-wind-arrow: #cbd5e1; }
.rs-wind-field--idle { border-color: rgba(148, 163, 184, 0.14); --rs-wind-arrow: #94a3b8; }
.rs-wind-field__map {
    padding: 8px 8px 2px;
}
.rs-wind-field__svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 260px;
}
.rs-wind-field__fill {
    fill: rgba(22, 32, 48, 0.95);
}
.rs-wind-field__fence {
    fill: none;
    stroke: rgba(248, 113, 113, 0.9);
    stroke-width: 1.6;
    stroke-linejoin: round;
}
.rs-wind-field__foul {
    fill: none;
    stroke: rgba(248, 113, 113, 0.5);
    stroke-width: 1;
    stroke-linecap: round;
}
.rs-wind-field__infield {
    fill: none;
    stroke: rgba(248, 113, 113, 0.38);
    stroke-width: 1;
    stroke-linejoin: round;
}
.rs-wind-field__dim {
    fill: rgba(255, 255, 255, 0.32);
    font-size: 7px;
    font-weight: 600;
    font-family: system-ui, sans-serif;
    pointer-events: none;
}
.rs-wind-field__arrow-line {
    stroke: var(--rs-wind-arrow, #cbd5e1);
    stroke-width: 1.2;
    stroke-linecap: round;
}
.rs-wind-field__arrow-tip {
    fill: var(--rs-wind-arrow, #cbd5e1);
}
.rs-wind-field__arrow {
    transition: opacity 0.2s ease;
}
.rs-wind-field__info {
    padding: 6px 10px 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rs-wind-field__row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.68rem;
    line-height: 1.35;
}
.rs-wind-field__row span:first-child {
    color: rgba(148, 163, 184, 0.85);
    font-weight: 600;
    flex-shrink: 0;
}
.rs-wind-field__row span:last-child {
    color: #e2e8f0;
    font-weight: 700;
    text-align: right;
}
.rs-wind-field--good .rs-wind-field__row span:last-child { color: #bbf7d0; }
.rs-wind-field--bad .rs-wind-field__row span:last-child { color: #fecaca; }
.rs-weather__grid {
    flex: 1 1 280px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
    min-width: 0;
}
.rs-weather__cell {
    padding: 10px 11px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
    position: relative;
}
.rs-weather__cell--hero dd {
    font-size: 1.15rem;
}
.rs-weather__cell--wide {
    grid-column: 1 / -1;
}
.rs-weather__cell--good {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(34, 197, 94, 0.12);
}
.rs-weather__cell--good dd { color: #bbf7d0; }
.rs-weather__cell--bad {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(244, 63, 94, 0.1);
}
.rs-weather__cell--bad dd { color: #fecaca; }
.rs-weather__cell--mid {
    border-color: rgba(234, 179, 8, 0.28);
    background: rgba(234, 179, 8, 0.06);
}
.rs-weather__sub {
    display: block;
    margin-top: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--rs-muted);
}
.rs-weather__cell dt {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rs-muted);
    margin-bottom: 4px;
}
.rs-has-tip {
    position: relative;
    cursor: default;
}
.rs-has-tip dt::after {
    display: none;
}
.rs-has-tip[data-tip]::before {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: min(280px, 92vw);
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(125, 211, 252, 0.35);
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.45;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 40;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}
.rs-has-tip:hover::before,
.rs-has-tip:focus-visible::before {
    opacity: 1;
    visibility: visible;
}
.rs-table thead tr.rs-col-row th.rs-has-tip[data-tip]::before,
.rs-table thead tr.rs-group-row th.rs-has-tip[data-tip]::before,
.rs-leaderboard thead th.rs-has-tip[data-tip]::before {
    top: calc(100% + 8px);
    bottom: auto;
    z-index: 30;
}
.rs-lb-sort.rs-has-tip:hover {
    color: #fde68a;
}
.rs-table thead tr.rs-col-row th.rs-has-tip,
.rs-lb-sort.rs-has-tip {
    cursor: pointer;
}
@media (hover: none) {
    .rs-has-tip {
        cursor: default;
    }
    .rs-has-tip dt::after {
        display: none;
    }
    .rs-has-tip:hover::before,
    .rs-has-tip:focus-visible::before {
        opacity: 0;
        visibility: hidden;
    }
    .rs-weather__sub {
        display: block;
    }
}
.rs-weather__cell dd {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}
.rs-weather__cell--carry.rs-weather__cell--good {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(34, 197, 94, 0.12);
}
.rs-weather__cell--carry.rs-weather__cell--bad {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(244, 63, 94, 0.1);
}
.rs-weather__cell--carry.rs-weather__cell--mid {
    border-color: rgba(234, 179, 8, 0.3);
    background: rgba(234, 179, 8, 0.08);
}
.rs-game-pill__wx {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    vertical-align: middle;
}
.rs-game-pill__wx--good { background: rgba(74, 222, 128, 0.2); color: #86efac; }
.rs-game-pill__wx--mid { background: rgba(234, 179, 8, 0.18); color: #fde68a; }
.rs-game-pill__wx--pass { background: rgba(248, 113, 113, 0.22); color: #fca5a5; font-size: 0.62rem; letter-spacing: 0.04em; }
.rs-weather__cell--pass { border-color: rgba(248, 113, 113, 0.35); background: rgba(60, 15, 15, 0.45); }
.rs-weather__cell--pass dd { color: #fca5a5; }
.rs-flag--pass {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.45);
}
.rs-card__section {
    padding: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.rs-card__section:last-child { border-bottom: none; }
.rs-card__section > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.rs-card__section > summary::-webkit-details-marker { display: none; }
.rs-card__section > summary::marker { content: ""; }
.rs-card__section-chev {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--rs-muted);
    border-bottom: 2px solid var(--rs-muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    margin-top: -3px;
}
.rs-card__section[open] > summary .rs-card__section-chev {
    transform: rotate(-135deg);
    margin-top: 3px;
}
.rs-card__section > .rs-card__stats {
    padding: 0 14px 12px;
}
.rs-card__section-title {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0;
}
.rs-card__section--matchup .rs-card__section-title { color: #86efac; }
.rs-card__section--power .rs-card__section-title { color: #fde68a; }
.rs-card__section--plate .rs-card__section-title { color: #ddd6fe; }
.rs-card__section--batted .rs-card__section-title { color: #fdba74; }
.rs-card__section--contact .rs-card__section-title { color: #7dd3fc; }
.rs-card__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    margin: 0;
}
.rs-card-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.08);
}
.rs-card-stat dt {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rs-muted);
}
.rs-card-stat dd {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.rs-card-stat dd .rs-cell-heat {
    min-width: auto;
    padding: 2px 6px;
    font-size: 0.88rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .rs-table-wrap::after {
        content: "Swipe → for more stats";
        display: block;
        padding: 8px 12px 10px;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--rs-muted);
        text-align: center;
        border-top: 1px solid rgba(148, 163, 184, 0.1);
        background: rgba(8, 15, 28, 0.6);
    }
}

@media (max-width: 768px) {
    body {
        padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    }
    .rs-header { padding: 14px 12px 16px; }
    .rs-header-brand {
        grid-template-columns: auto 1fr;
        text-align: left;
        gap: 12px;
        align-items: center;
    }
    .rs-hero-wrap {
        width: 56px;
        height: 56px;
        margin: 0;
        border-radius: 14px;
    }
    .rs-header-brand h1 { font-size: 1.05rem; margin-bottom: 0; }
    .rs-header-brand p { display: none; }
    .rs-brand-tag {
        font-size: 0.62rem;
        padding: 4px 10px;
        margin-bottom: 6px;
    }
    .rs-header-actions { margin-bottom: 12px; }
    .rs-back {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    .rs-theme-toggle {
        width: 44px;
        height: 44px;
    }
    .rs-toolbar {
        padding: 10px 12px;
        gap: 10px;
    }
    .rs-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
    .rs-controls label:first-child {
        grid-column: 1 / -1;
    }
    .rs-controls label { width: 100%; }
    .rs-controls input[type="date"] {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
    }
    .rs-btn {
        min-height: 48px;
        font-size: 0.88rem;
        padding: 10px 12px;
    }
    .rs-btn--primary {
        grid-column: 1 / -1;
    }
    .rs-badge {
        align-self: center;
        font-size: 0.62rem;
    }
    .rs-main { padding: 10px 12px 28px; }
    .rs-status {
        font-size: 0.78rem;
        line-height: 1.45;
        word-break: break-word;
        padding: 10px 12px;
    }
    .rs-section { margin-bottom: 14px; }
    .rs-section-title { font-size: 0.68rem; margin-bottom: 8px; }
    .rs-games-wrap {
        margin: 0;
        padding-bottom: 6px;
    }
    .rs-games {
        padding-inline: 6px;
    }
    .rs-game-pill {
        min-width: 118px;
        scroll-snap-align: center;
    }
    .rs-game-pill__matchup { font-size: 0.86rem; }
    .rs-game-pill__meta {
        font-size: 0.68rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        white-space: normal;
    }
    .rs-matchup-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
        position: static;
        margin-bottom: 10px;
    }
    .rs-matchup-bar h2,
    .rs-matchup-bar h3 {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    .rs-section-title--hitters {
        margin-top: 2px;
        margin-bottom: 8px;
    }
    .rs-matchup-bar .rs-sp {
        font-size: 0.76rem;
        max-width: none;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .rs-side-toggle {
        align-self: stretch;
        width: 100%;
    }
    .rs-side-toggle button {
        flex: 1;
        min-height: 48px;
        font-size: 0.84rem;
    }
    .rs-weather > summary {
        padding: 12px 14px;
    }
    .rs-weather__title { font-size: 0.84rem; }
    .rs-weather__meta {
        font-size: 0.72rem;
        flex-basis: 100%;
        order: 3;
    }
    .rs-weather__body {
        flex-direction: column;
        align-items: stretch;
        padding: 0 12px 12px;
        gap: 12px;
    }
    .rs-weather__grid {
        order: 1;
        flex: none;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .rs-wind-field {
        order: 2;
        flex: none;
        width: 100%;
        max-width: none;
    }
    .rs-wind-field__svg {
        min-height: 200px;
    }
    .rs-weather__cell {
        padding: 10px;
    }
    .rs-weather__cell dt {
        font-size: 0.62rem;
    }
    .rs-weather__cell dd {
        font-size: 1rem;
    }
    .rs-weather__cell--hero dd {
        font-size: 1.2rem;
    }
    .rs-wind-field__row {
        font-size: 0.72rem;
    }
    .rs-table-wrap { display: none; }
    .rs-mobile-bar,
    .rs-card-list { display: flex; }
    .rs-table-wrap::after { display: none; }
    .rs-card-list { gap: 10px; }
    .rs-card__head { padding: 12px; }
    .rs-card__name { font-size: 0.95rem; }
    .rs-card__highlights {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        padding: 8px 10px;
    }
    .rs-card-highlight {
        padding: 7px 3px;
    }
    .rs-card-highlight__label {
        font-size: 0.54rem;
        letter-spacing: 0.04em;
    }
    .rs-card-highlight__val {
        font-size: 0.86rem;
    }
    .rs-card-stat {
        padding: 9px 10px;
    }
    .rs-card-stat dd {
        font-size: 0.95rem;
    }

    /* ── Mobile: explore, leaderboards, pitchers, profile ── */
    .rs-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .rs-search-wrap {
        width: 100%;
        max-width: none;
    }
    .rs-search-input {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
    }
    .rs-date-hint {
        grid-column: 1 / -1;
        font-size: 0.68rem;
        line-height: 1.4;
        padding: 0 2px 4px;
    }
    .rs-updated {
        grid-column: 1 / -1;
        font-size: 0.68rem;
    }
    .rs-explore__head {
        padding: 12px 14px;
        min-height: 48px;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
    }
    .rs-explore__title {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.9rem;
    }
    .rs-explore__meta {
        flex: 1 1 100%;
        order: 3;
        margin-left: 0;
        font-size: 0.68rem;
        line-height: 1.35;
    }
    .rs-explore__chev {
        flex-shrink: 0;
    }
    .rs-explore__panel {
        overflow: visible;
    }
    .rs-explore__body {
        padding: 0 10px 12px;
    }
    .rs-explore-lb-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        margin-bottom: 12px;
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid rgba(251, 146, 60, 0.28);
        background: rgba(8, 15, 28, 0.65);
    }
    .rs-explore-lb-nav__btn {
        font-size: 0.72rem;
        padding: 12px 8px;
        line-height: 1.25;
        white-space: normal;
    }
    .rs-leaderboard-wrap[data-lb-panel]:not(.is-active) {
        display: none;
    }
    .rs-leaderboard-wrap .rs-explore__sub {
        display: none;
    }
    .rs-leaderboard-wrap--pitchers .rs-explore__hint {
        margin-top: 0;
        margin-bottom: 10px;
        font-size: 0.68rem;
        line-height: 1.35;
    }
    .rs-explore__filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .rs-explore__filters label {
        min-width: 0;
    }
    .rs-explore__select,
    .rs-explore__input {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }
    .rs-btn--ghost {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
    }
    .rs-explore__lede {
        font-size: 0.72rem;
    }
    .rs-explore__lede .rs-pillar {
        display: block;
        margin: 6px 0 0;
    }
    .rs-leaderboard-scroll {
        max-height: min(58vh, 420px);
        overflow-x: scroll;
        overflow-y: auto;
    }
    .rs-leaderboard-scroll-hint {
        display: block;
    }
    .rs-leaderboard thead th {
        position: static;
        top: auto;
    }
    .rs-leaderboard th,
    .rs-leaderboard td {
        white-space: nowrap;
    }
    .rs-leaderboard-link {
        touch-action: pan-x pan-y;
    }
    .rs-leaderboard tbody tr {
        cursor: pointer;
    }
    .rs-leaderboard thead th,
    .rs-leaderboard tbody td {
        padding: 8px 5px;
        font-size: 0.72rem;
    }
    .rs-leaderboard-link {
        padding: 2px 0;
        display: inline;
        min-height: 0;
    }
    .rs-explore-grid {
        min-width: 0;
    }
    .rs-pitcher-panel {
        margin-top: 8px;
        margin-bottom: 12px;
    }
    .rs-pitcher-duo {
        gap: 16px;
    }
    .rs-pitcher-card {
        border-radius: 12px;
        overflow: hidden;
    }
    .rs-pitcher-card__head {
        padding: 12px 14px 10px;
    }
    .rs-pitcher-card__name {
        font-size: 0.95rem;
    }
    .rs-pitcher-card__mix {
        font-size: 0.68rem;
        margin-top: 4px;
        line-height: 1.35;
    }
    .rs-pitcher-card__tab {
        min-height: 44px;
        font-size: 0.66rem;
        padding: 10px 2px;
    }
    .rs-pitcher-card__tab .rs-tab-long {
        display: none;
    }
    .rs-pitcher-card__tab .rs-tab-short {
        display: inline;
    }
    .rs-pitcher-card--clickable:active {
        transform: none;
    }
    .rs-pitcher-card__body {
        padding: 10px 12px 12px;
        gap: 10px;
    }
    .rs-pitcher-group__grid,
    .rs-pitcher-group__grid--overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .rs-pitcher-splits {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .rs-pitcher-splits th,
    .rs-pitcher-splits td {
        padding: 8px 6px;
        font-size: 0.72rem;
    }
    .rs-pitcher-arsenal__row {
        grid-template-columns: 2.25rem 1fr 2.25rem;
        gap: 6px;
    }
    .rs-profile {
        width: 100vw;
        max-width: 100vw;
        height: 100%;
        max-height: 100%;
        margin: 0;
    }
    .rs-profile__inner {
        border-radius: 0;
        max-height: 100dvh;
        min-height: 100dvh;
    }
    .rs-profile__body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .rs-profile__hero {
        padding: 12px 14px 0;
    }
    .rs-profile-hero__value {
        font-size: clamp(1.75rem, 8vw, 2.4rem);
    }
    .rs-profile__grid {
        padding: 0 14px 14px;
    }
    .rs-profile-block__grid,
    .rs-profile-block__grid--power-top,
    .rs-profile-block__grid--power-bottom,
    .rs-profile-block__grid--breakdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .rs-profile__foot {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    }
    .rs-profile__foot .rs-btn,
    .rs-profile__foot .rs-btn--link {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        text-align: center;
    }
    .rs-profile__close {
        min-width: 44px;
        min-height: 44px;
    }
    .rs-pitcher-stat.rs-has-tip[data-tip]::before,
    .rs-pitcher-risk-card.rs-has-tip[data-tip]::before,
    .rs-leaderboard thead th.rs-has-tip[data-tip]::before {
        display: none;
    }
}

@media (max-width: 380px) {
    .rs-header-brand {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .rs-hero-wrap { margin: 0 auto; }
    .rs-card__highlights {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
        padding: 8px;
    }
    .rs-card-highlight__label {
        font-size: 0.5rem;
    }
    .rs-card-highlight__val {
        font-size: 0.8rem;
        padding: 2px 4px;
    }
    .rs-card__stats {
        grid-template-columns: 1fr;
    }
    .rs-explore__filters {
        grid-template-columns: 1fr;
    }
    .rs-pitcher-group__grid,
    .rs-pitcher-group__grid--overview {
        grid-template-columns: 1fr;
    }
}

/* ── Light theme ── */
html.theme-light {
    color-scheme: light;
    --wpz-color-text: #1e293b;
    --wpz-color-text-soft: #334155;
    --wpz-color-heading: #7c2d12;
    --wpz-color-paragraph: #475569;
    --wpz-bg-body: #e2e8f0;
    --wpz-bg-container: linear-gradient(135deg, #fff 0%, #f8fafc 48%, #fef3c7 100%);
    --wpz-border-container: rgba(180, 83, 9, 0.35);
    --wpz-bg-header: linear-gradient(145deg, #fff7ed 0%, #fef3c7 38%, #eff6ff 100%);
    --wpz-border-header: rgba(234, 88, 12, 0.35);
    --wpz-brand-tag-bg: rgba(22, 101, 52, 0.1);
    --wpz-brand-tag-border: rgba(22, 163, 74, 0.35);
    --wpz-brand-tag-text: #15803d;
    --rs-panel: #fff;
    --rs-panel-2: #f8fafc;
    --rs-border: rgba(180, 83, 9, 0.2);
    --rs-muted: #64748b;
}
html.theme-light body { background: #e2e8f0; }
html.theme-light .rs-back,
html.theme-light .rs-theme-toggle {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(180, 83, 9, 0.25);
    color: #334155;
}
html.theme-light .rs-toolbar {
    background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 100%);
    border-bottom-color: rgba(180, 83, 9, 0.15);
}
html.theme-light .rs-status {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.35);
}
html.theme-light .rs-section-title { color: #9a3412; }
html.theme-light .rs-game-pill {
    background: #fff;
    border-color: rgba(180, 83, 9, 0.2);
}
html.theme-light .rs-game-pill.is-active {
    background: linear-gradient(145deg, #fef3c7 0%, #fff 100%);
    border-color: rgba(180, 83, 9, 0.45);
}
html.theme-light .rs-matchup-bar {
    background: linear-gradient(135deg, #fff7ed 0%, #eff6ff 100%);
    border-color: rgba(180, 83, 9, 0.2);
}
html.theme-light .rs-table-wrap {
    border-color: rgba(180, 83, 9, 0.25);
    background: #fff;
}
html.theme-light .rs-table thead tr.rs-col-row th { background: #f1f5f9; }
html.theme-light .rs-table thead tr.rs-group-row th:nth-child(-n+3),
html.theme-light .rs-table thead tr.rs-col-row th:nth-child(-n+3) {
    background: #f1f5f9;
}
html.theme-light .rs-table tbody tr:nth-child(odd) td:nth-child(-n+3) {
    background: #fff;
}
html.theme-light .rs-table tbody tr:nth-child(even) td:nth-child(-n+3) {
    background: #f8fafc;
}
html.theme-light .rs-table tbody tr:hover td:nth-child(-n+3) {
    background: #fff7ed;
}
html.theme-light .rs-table tbody tr:nth-child(even) { background: rgba(241, 245, 249, 0.85); }
html.theme-light .rs-cell-heat--good { color: #14532d; }
html.theme-light .rs-cell-heat--mid { color: #78350f; }
html.theme-light .rs-cell-heat--bad { color: #7f1d1d; }
html.theme-light .rs-badge--api {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.3);
    color: #15803d;
}
html.theme-light .rs-mobile-sort {
    background-color: #fff;
    border-color: rgba(180, 83, 9, 0.25);
    color: #1e293b;
}
html.theme-light .rs-mobile-sort-dir {
    background: #fff;
    border-color: rgba(180, 83, 9, 0.25);
    color: #92400e;
}
html.theme-light .rs-mobile-bar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 85%, transparent 100%);
}
html.theme-light .rs-card {
    background: #fff;
    border-color: rgba(180, 83, 9, 0.2);
}
html.theme-light .rs-card__head {
    background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 100%);
}
html.theme-light .rs-card__highlights {
    background: #f8fafc;
    border-bottom-color: rgba(148, 163, 184, 0.2);
}
html.theme-light .rs-card-highlight {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.2);
}
html.theme-light .rs-card-stat {
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.2);
}
html.theme-light .rs-card__order {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(180, 83, 9, 0.3);
    color: #92400e;
}

/* ── Player search ── */
.rs-search-wrap {
    position: relative;
    flex: 1 1 220px;
    max-width: 420px;
    min-width: 180px;
}
.rs-search-label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rs-muted);
    font-weight: 800;
}
.rs-search-input {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(251, 146, 60, 0.28);
    background: rgba(8, 15, 28, 0.88);
    color: var(--wpz-color-text);
    font-weight: 600;
    font-size: 0.88rem;
}
.rs-search-results {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid rgba(251, 146, 60, 0.28);
    background: rgba(10, 17, 31, 0.98);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.rs-search-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.rs-search-item:last-child { border-bottom: none; }
.rs-search-item:hover,
.rs-search-item:focus-visible {
    background: rgba(251, 146, 60, 0.12);
    outline: none;
}
.rs-search-item__name { font-weight: 800; font-size: 0.92rem; }
.rs-search-item__meta { font-size: 0.74rem; color: var(--rs-muted); }
.rs-search-empty {
    padding: 12px;
    font-size: 0.82rem;
    color: var(--rs-muted);
}

/* ── Explore / leaderboards ── */
.rs-explore { margin-bottom: 14px; }
.rs-explore__panel {
    border-radius: 14px;
    border: 1px solid rgba(251, 146, 60, 0.22);
    background: linear-gradient(145deg, rgba(19, 11, 8, 0.72) 0%, rgba(10, 17, 31, 0.82) 100%);
    overflow: hidden;
}
.rs-explore__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.rs-explore__head::-webkit-details-marker { display: none; }
.rs-explore__title { font-weight: 900; font-size: 0.98rem; letter-spacing: 0.02em; }
.rs-explore__meta {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--rs-muted);
    font-weight: 700;
}
.rs-explore__chev {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--rs-muted);
    border-bottom: 2px solid var(--rs-muted);
    transform: rotate(45deg);
    transition: transform 0.15s;
}
.rs-explore__panel[open] .rs-explore__chev { transform: rotate(-135deg); }
.rs-explore__body { padding: 0 14px 14px; }
.rs-explore-lb-nav {
    display: none;
}
.rs-explore-lb-nav__btn {
    border: none;
    background: rgba(8, 15, 28, 0.55);
    color: var(--rs-muted);
    font-weight: 800;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    padding: 12px 10px;
    min-height: 48px;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.15s, color 0.15s;
}
.rs-explore-lb-nav__btn:first-child {
    border-radius: 12px 0 0 12px;
}
.rs-explore-lb-nav__btn:last-child {
    border-radius: 0 12px 12px 0;
}
.rs-explore-lb-nav__btn.is-active {
    color: #fde68a;
    background: linear-gradient(180deg, rgba(251, 146, 60, 0.22) 0%, rgba(180, 83, 9, 0.18) 100%);
    box-shadow: inset 0 -2px 0 #f97316;
}
.rs-explore__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 12px;
}
.rs-explore__filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--rs-muted);
    font-weight: 800;
}
.rs-explore__select {
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(251, 146, 60, 0.25);
    background: rgba(8, 15, 28, 0.88);
    color: var(--wpz-color-text);
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 130px;
}
.rs-explore-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 14px;
}
@media (max-width: 900px) {
    .rs-explore-grid { grid-template-columns: 1fr; }
}
.rs-explore__sub {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rs-muted);
}
.rs-explore__lede {
    margin: 0 0 10px;
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--wpz-color-text-soft);
}
.rs-explore__lede .rs-pillar {
    display: inline-block;
    margin: 4px 8px 0 0;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 0.68rem;
    color: var(--rs-muted);
}
.rs-explore__lede .rs-pillar strong { color: #fcd34d; font-weight: 800; }
.rs-explore__hint {
    margin: -4px 0 8px;
    font-size: 0.72rem;
    color: var(--rs-muted);
}
.rs-leaderboard-wrap {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(8, 15, 28, 0.45);
    padding: 10px 12px;
    min-width: 0;
}
.rs-leaderboard-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 360px;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior: contain;
}
.rs-leaderboard-scroll__track {
    display: inline-block;
    min-width: 100%;
    vertical-align: top;
}
.rs-leaderboard-scroll-hint {
    display: none;
    margin: 8px 0 0;
    padding: 0;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rs-muted);
    text-align: center;
}
.rs-leaderboard {
    width: auto;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.rs-leaderboard thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px 6px;
    text-align: left;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rs-muted);
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.rs-leaderboard tbody td {
    padding: 7px 6px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    vertical-align: middle;
}
.rs-leaderboard tbody tr:hover { background: rgba(251, 146, 60, 0.08); }
.rs-leaderboard-link {
    border: none;
    background: none;
    padding: 0;
    color: #fcd34d;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
    font-size: inherit;
}
.rs-leaderboard-link:hover { text-decoration: underline; }
.rs-leaderboard-env { font-weight: 900; }
.rs-leaderboard-env--good { color: #86efac; }
.rs-leaderboard-env--mid { color: #fcd34d; }
.rs-leaderboard-env--bad { color: #fca5a5; }
.rs-leaderboard-env--pass { color: var(--rs-muted); font-style: italic; }

/* ── Clickable hitters ── */
.rs-hitter-btn {
    border: none;
    background: none;
    padding: 0;
    color: inherit;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
}
.rs-hitter-btn:hover { color: #fcd34d; text-decoration: underline; }
.rs-card__name-btn { color: #fcd34d; }
.rs-row--flash {
    animation: rsFlash 1.8s ease-out;
}
@keyframes rsFlash {
    0%, 20% { background: rgba(251, 191, 36, 0.35); }
    100% { background: transparent; }
}

/* ── Player profile dialog ── */
.rs-profile {
    border: none;
    padding: 0;
    max-width: min(720px, calc(100vw - 24px));
    width: 100%;
    background: transparent;
    color: var(--wpz-color-text);
}
.rs-profile::backdrop {
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(4px);
}
.rs-profile__inner {
    border-radius: 16px;
    border: 1px solid rgba(251, 146, 60, 0.28);
    background: linear-gradient(160deg, rgba(19, 11, 8, 0.98) 0%, rgba(10, 17, 31, 0.98) 100%);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: min(92vh, 860px);
}
.rs-profile__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    flex-shrink: 0;
}
.rs-profile__head-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.rs-profile__head-text { min-width: 0; }
.rs-profile__head-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.rs-profile__photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(251, 146, 60, 0.35);
    background: rgba(15, 23, 42, 0.8);
    flex-shrink: 0;
}
.rs-profile__game {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--rs-muted);
    text-align: right;
    line-height: 1.35;
    max-width: 11rem;
    white-space: pre-line;
}
.rs-profile__name {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    line-height: 1.15;
}
.rs-profile__sub {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--rs-muted);
    line-height: 1.45;
}
.rs-profile__close {
    border: none;
    background: rgba(148, 163, 184, 0.12);
    color: var(--wpz-color-text-soft);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.rs-profile__close:hover { background: rgba(251, 146, 60, 0.2); }
.rs-profile__body {
    overflow: auto;
    flex: 1;
    min-height: 0;
}
.rs-profile__hero { padding: 14px 18px 0; }
.rs-profile-hero {
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    align-items: center;
}
.rs-profile-hero--good {
    background: linear-gradient(135deg, rgba(22, 101, 52, 0.35) 0%, rgba(15, 23, 42, 0.5) 100%);
    border-color: rgba(74, 222, 128, 0.35);
}
.rs-profile-hero--mid {
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.35) 0%, rgba(15, 23, 42, 0.5) 100%);
    border-color: rgba(251, 191, 36, 0.35);
}
.rs-profile-hero--bad {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.35) 0%, rgba(15, 23, 42, 0.5) 100%);
    border-color: rgba(252, 165, 165, 0.35);
}
.rs-profile-hero--pass { background: rgba(15, 23, 42, 0.55); }
.rs-profile-hero__label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rs-muted);
    font-weight: 800;
}
.rs-profile-hero__value {
    font-size: clamp(2.4rem, 8vw, 3.1rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
}
.rs-profile-hero__value--pass { font-size: 2rem; }
.rs-profile-hero__sub {
    font-size: 0.74rem;
    color: var(--rs-muted);
    line-height: 1.4;
    max-width: 36rem;
}
.rs-profile__trends {
    padding: 14px 18px 0;
}
.rs-profile-trends {
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.14);
}
.rs-profile-trends--loading {
    font-size: 0.78rem;
    color: var(--rs-muted);
    text-align: center;
    padding: 18px;
}
.rs-profile-trends__summary {
    margin: 0 0 10px;
    font-size: 0.78rem;
    color: var(--wpz-color-text-soft);
    line-height: 1.45;
}
.rs-profile-trends__charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.rs-profile-trend {
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.1);
}
.rs-profile-trend__label {
    margin: 0 0 4px;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rs-muted);
    font-weight: 800;
}
.rs-profile-trend__value {
    margin: 0 0 6px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--wpz-color-text-soft);
}
.rs-sparkline {
    display: block;
    width: 100%;
    height: 44px;
}
.rs-sparkline__line {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.rs-sparkline__line--barrel { stroke: #86efac; }
.rs-sparkline__line--ev { stroke: #fcd34d; }
.rs-sparkline__dot { fill: currentColor; }
.rs-profile__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 14px 18px 16px;
}
.rs-profile-block {
    padding: 14px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.rs-profile-block:first-child { border-top: none; padding-top: 0; }
.rs-profile-block__title {
    margin: 0 0 8px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--rs-muted);
    font-weight: 800;
}
.rs-profile-block__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 8px;
}
.rs-profile-block__grid--breakdown {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.rs-profile-block__grid--power-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 8px;
}
.rs-profile-block__grid--power-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 520px) {
    .rs-profile-block__grid--power-top { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .rs-profile-block__grid--power-bottom { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .rs-profile-block__grid--breakdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .rs-profile-trends__charts { grid-template-columns: 1fr; }
    .rs-profile__head { flex-wrap: wrap; }
    .rs-profile__head-right {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
}
.rs-profile-stat {
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.14);
}
.rs-profile-stat dt {
    margin: 0;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rs-muted);
    font-weight: 800;
}
.rs-profile-stat dd {
    margin: 4px 0 0;
    font-size: 0.92rem;
    font-weight: 800;
}
.rs-profile-stat--good dd { color: #86efac; }
.rs-profile-stat--mid dd { color: #fcd34d; }
.rs-profile-stat--bad dd { color: #fca5a5; }
.rs-profile__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 18px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    flex-shrink: 0;
}
.rs-btn--ghost {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
}
.rs-btn--ghost.is-on {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.35);
    color: #86efac;
}
.rs-profile-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    opacity: 0;
    pointer-events: none;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: #86efac;
    font-size: 0.82rem;
    font-weight: 700;
    z-index: 10001;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.rs-profile-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.rs-btn--link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

html.theme-light .rs-search-input,
html.theme-light .rs-explore__select {
    background: #fff;
    border-color: rgba(180, 83, 9, 0.25);
    color: #1e293b;
}
html.theme-light .rs-search-results {
    background: #fff;
    border-color: rgba(180, 83, 9, 0.25);
}
html.theme-light .rs-search-item:hover { background: #fff7ed; }
html.theme-light .rs-explore__panel {
    background: linear-gradient(145deg, #fff7ed 0%, #fff 100%);
    border-color: rgba(180, 83, 9, 0.25);
}
html.theme-light .rs-explore-lb-nav {
    border-color: rgba(180, 83, 9, 0.25);
    background: #f8fafc;
}
html.theme-light .rs-explore-lb-nav__btn {
    background: #fff;
    color: #64748b;
}
html.theme-light .rs-explore-lb-nav__btn.is-active {
    color: #92400e;
    background: linear-gradient(180deg, #fef3c7 0%, #fff7ed 100%);
}
html.theme-light .rs-pitcher-card__tabs {
    background: #f1f5f9;
    border-top-color: rgba(180, 83, 9, 0.15);
}
html.theme-light .rs-pitcher-card__tab {
    color: #64748b;
    border-right-color: rgba(180, 83, 9, 0.12);
}
html.theme-light .rs-pitcher-card__tab.is-active {
    color: #92400e;
    background: rgba(254, 243, 199, 0.65);
}
html.theme-light .rs-leaderboard-wrap { background: #fff; border-color: rgba(180, 83, 9, 0.2); }
html.theme-light .rs-leaderboard thead th { background: #f1f5f9; }
html.theme-light .rs-leaderboard-link { color: #92400e; }
html.theme-light .rs-profile__inner { background: #fff; border-color: rgba(180, 83, 9, 0.25); }
html.theme-light .rs-profile-stat { background: #f8fafc; }
html.theme-light .rs-profile-trends,
html.theme-light .rs-profile-trend { background: #f8fafc; }
html.theme-light .rs-profile-hero--good { background: linear-gradient(135deg, #dcfce7 0%, #f8fafc 100%); }
html.theme-light .rs-profile-hero--mid { background: linear-gradient(135deg, #fef3c7 0%, #f8fafc 100%); }
html.theme-light .rs-profile-hero--bad { background: linear-gradient(135deg, #fee2e2 0%, #f8fafc 100%); }

.rs-updated {
    font-size: 0.78rem;
    color: var(--rs-muted);
    white-space: nowrap;
}
.rs-explore__input {
    width: 4.5rem;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    border: 1px solid rgba(251, 146, 60, 0.3);
    background: rgba(15, 23, 42, 0.65);
    color: inherit;
    font-size: 0.85rem;
}
.rs-btn--ghost {
    background: transparent;
    border: 1px solid rgba(251, 146, 60, 0.35);
    color: #fcd34d;
    align-self: end;
}
.rs-btn--ghost:hover { background: rgba(251, 146, 60, 0.12); }
.rs-lb-sort {
    cursor: pointer;
    user-select: none;
}
.rs-lb-sort:hover { color: #fde68a; }
.rs-lb-sort.is-sorted { color: var(--wpz-accent-gold); }
html.theme-light .rs-btn--ghost {
    background: #fff;
    border-color: rgba(180, 83, 9, 0.3);
    color: #78350f;
}
html.theme-light .rs-btn--ghost.is-on {
    background: #ffedd5;
    color: #92400e;
}
html.theme-light .rs-explore__input {
    background: #fff;
    border-color: rgba(180, 83, 9, 0.25);
}

