/* ============================================================
   COMPONENTS — ZohnStats
   Reusable UI components. All values use design tokens.
   All @keyframes live in animations.css.
   ============================================================ */

/* ── Loading Spinner ──────────────────────────────────────── */
.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--accent-subtle);
    border-top-color: var(--accent);
    border-radius: var(--radius-full);
    animation: spin 0.9s linear infinite;
    margin: 0 auto;
}

/* ── Player / Team Avatar ─────────────────────────────────── */
.player-card-top {
    text-align: center;
    margin-bottom: var(--space-5);
    position: relative;
}

.player-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    color: #fff;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    border: 2px solid var(--border-mid);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Initials text — hidden by JS once logo/headshot loads */
.avatar-text {
    position: relative;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* ESPN headshot — absolutely covers the avatar */
.player-headshot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius-full);
}

.player-name {
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.player-team {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.2px;
}

.card-cta {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-default);
    text-align: center;
    color: var(--accent);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

/* ── Skeleton Loading ─────────────────────────────────────── */
.skeleton-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-3);
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.09) 50%,
        rgba(255,255,255,0.04) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s ease-in-out infinite;
}

.skeleton-line {
    border-radius: var(--radius-sm);
    background: linear-gradient(
        90deg,
        var(--skeleton-from) 0%,
        var(--skeleton-mid)  50%,
        var(--skeleton-from) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s ease-in-out infinite;
}

.skeleton-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    padding: 1.75rem;
}

.skeleton-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
}

.skeleton-card-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ── Toast Notifications ──────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: var(--space-8);
    right: var(--space-8);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - var(--space-8));
}

@media (max-width: 768px) {
    .toast-container {
        bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 0.75rem);
        right: 0.75rem;
        width: calc(100vw - 1.5rem);
    }
}

.toast {
    pointer-events: auto;
    background: var(--bg-toast);
    border: 1px solid var(--border-mid);
    backdrop-filter: var(--blur-md);
    padding: var(--space-4) 1.25rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: toastIn 0.25s var(--ease-out) forwards;
}

.toast.toast-error   { border-left: 4px solid var(--color-error); }
.toast.toast-warn    { border-left: 4px solid var(--color-warn); }
.toast.toast-success { border-left: 4px solid var(--color-win); }
.toast.toast-info    { border-left: 4px solid var(--accent); }

.toast.toast-out { animation: toastOut 0.25s var(--ease-out) forwards; }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.toast-body    { flex: 1; min-width: 0; }
.toast-title   { font-weight: 700; font-size: var(--text-sm); margin-bottom: 0.2rem; }
.toast-message { color: var(--text-secondary); font-size: var(--text-xs); line-height: 1.45; word-break: break-word; }

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}
.toast-close:hover { color: var(--text-secondary); }

/* ── Error State ──────────────────────────────────────────── */
.error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem var(--space-8);
    background: rgba(239,68,68,0.05);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--radius-lg);
}

.error-state-icon    { font-size: 3rem; margin-bottom: var(--space-4); }
.error-state-title   { color: #f87171; font-size: var(--text-lg); font-weight: 700; margin-bottom: 0.75rem; }
.error-state-message {
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    font-size: var(--text-base);
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem var(--space-8);
    color: var(--text-muted);
}

.empty-state-icon  { font-size: 3.5rem; margin-bottom: var(--space-4); opacity: 0.5; }
.empty-state-title { font-size: var(--text-lg); font-weight: 600; color: var(--text-muted); }

/* ── Retry Button ─────────────────────────────────────────── */
.retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.75rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    box-shadow: 0 4px 15px var(--accent-glow);
    font-family: var(--font-sans);
}
.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

/* ── Win / Season Badges ──────────────────────────────────── */
.win-badge {
    display: inline-block;
    background: rgba(34,211,160,0.14);
    color: var(--color-win);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 0.15rem var(--space-2);
    border-radius: var(--radius-xs);
    margin-top: 0.3rem;
}

.season-badge {
    display: inline-block;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    color: var(--accent-light);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    margin-top: var(--space-2);
}

/* ── Player Hero (detail header) ──────────────────────────── */
.player-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.75rem;
}

.player-hero-info { flex: 1; min-width: 0; }

.player-hero-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}

.player-hero-pos {
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    color: var(--accent-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

/* Bio attribute grid */
.player-bio-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: 0.875rem;
}

.player-bio-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    padding: 0.25rem 0.75rem;
    font-size: var(--text-xs);
    white-space: nowrap;
}

.bio-label {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bio-value {
    color: var(--text-primary);
    font-weight: 700;
}

@media (max-width: 600px) {
    .player-hero { flex-direction: column; align-items: center; text-align: center; }
    .player-hero-top { justify-content: center; }
    .player-bio-grid { justify-content: center; }
    .breadcrumb-current { max-width: 160px; }
}

/* Per-36 toggle */
.per36-btn {
    padding: 0.3rem 0.875rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
}
.per36-btn:hover {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
    color: var(--accent-light);
}

/* ── Player Detail — section headings ─────────────────────── */
.detail-section-title {
    color: var(--text-primary);
    font-size: var(--text-lg);
    font-weight: 800;
    margin-bottom: var(--space-5);
    letter-spacing: -0.2px;
}

.detail-no-stats {
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    text-align: center;
    color: var(--text-secondary);
}

/* ── Charts ───────────────────────────────────────────────── */
.charts-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-2);
}

.chart-panel {
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-5);
}

.chart-label {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-4);
}

.chart-wrap { position: relative; height: 240px; }
.chart-wrap--tall { height: 200px; }

@media (max-width: 640px) {
    .charts-duo { grid-template-columns: 1fr; }
    .chart-wrap { height: 200px; }
}

/* ── Player Comparison ────────────────────────────────────── */
.compare-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-mid);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
    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 d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
.compare-select:focus {
    outline: none;
    border-color: var(--accent-border);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
.compare-select option { background: var(--bg-surface); color: var(--text-secondary); }

/* Compare table (butterfly chart) */
.compare-table-wrap { margin-top: var(--space-5); }

.cmp-table {
    width: 100%;
    border-collapse: collapse;
}
.cmp-th-a,
.cmp-th-b {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.4rem 0.5rem;
    text-align: center;
    width: 22%;
}
.cmp-th-mid {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
}
.cmp-row { border-bottom: 1px solid var(--border-subtle); }
.cmp-row:last-child { border-bottom: none; }

.cmp-val-a,
.cmp-val-b {
    width: 22%;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.45rem 0.5rem;
    text-align: center;
    vertical-align: middle;
}
.cmp-winner {
    color: var(--text-primary);
    font-weight: 800;
}

.cmp-bars {
    vertical-align: middle;
    padding: 0.3rem 0;
}
.cmp-bar-wrap {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.4rem;
    height: 20px;
}
.cmp-stat-lbl {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    white-space: nowrap;
    min-width: 36px;
}
.cmp-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-subtle);
    transition: width 0.45s var(--ease-out);
}
.cmp-bar--a { margin-left: auto; background: rgba(129,140,248,0.35); }
.cmp-bar--b { background: rgba(52,211,153,0.35); }
.cmp-bar--a.cmp-bar--win { background: #818cf8; }
.cmp-bar--b.cmp-bar--win { background: #34d399; }

/* ── Game Cards — redesigned ──────────────────────────────── */
.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.game-date {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.game-status {
    font-size: var(--text-xs);
    font-weight: 800;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    letter-spacing: 0.3px;
}
.game-status--final { background: rgba(34,211,160,0.10); color: var(--color-win); }
.game-status--live  { background: rgba(245,158,11,0.12);  color: var(--color-live); }
.game-status--sched { background: var(--bg-subtle);       color: var(--text-muted); }

.game-margin {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--color-live);
    animation: pulseDot 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

.game-matchup {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-3);
}

.game-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    opacity: 0.72;
    transition: opacity var(--transition-fast);
}
.game-team--winner { opacity: 1; }

.game-team-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.02em;
    border: 1.5px solid var(--border-default);
    position: relative;
    overflow: hidden;
}

.game-logo-img {
    position: absolute;
    inset: 5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    object-fit: contain;
}

.game-logo-text {
    position: relative;
    z-index: 0;
}

.game-team-abbr {
    font-size: var(--text-sm);
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.game-team-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-scores {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.game-score {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-secondary);
    min-width: 2ch;
    text-align: center;
}
.game-score--win  { color: var(--color-win); }
.game-score--loss { color: var(--text-muted); }

.game-scores-sep {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 1.25rem;
}

/* ── Quarter Score Table ──────────────────────────────────── */
.game-quarters {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-default);
}

.quarter-row {
    display: grid;
    grid-template-columns: 2.5rem repeat(4, 1fr) auto;
    gap: 0;
    align-items: center;
    padding: 0.18rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.quarter-row--header {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.2rem;
}

.quarter-row--header span,
.quarter-row span { text-align: center; }

.quarter-team {
    text-align: left !important;
    font-weight: 800;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.quarter-total {
    font-weight: 900;
    color: var(--text-primary);
    min-width: 2.5rem;
    text-align: right !important;
    font-size: 0.82rem;
}

.quarter-win { color: var(--color-win); }

/* ── Leaderboard — avatar ─────────────────────────────────── */
.lb-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    border: 1px solid var(--border-default);
    position: relative;
    overflow: hidden;
}

.lb-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius-full);
}

.lb-avatar-initials {
    position: relative;
    z-index: 0;
}

/* Mini stat bar */
.lb-bar {
    height: 3px;
    background: var(--bg-interactive);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.lb-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s var(--ease-out);
}

/* ── Stat Builder — redesigned ────────────────────────────── */

.builder-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}
.builder-header-row .builder-title { margin-bottom: 0; }

.builder-group-toggle {
    display: flex;
    gap: 0.3rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-md);
    padding: 3px;
}
.builder-group-btn {
    padding: 0.3rem 0.85rem;
    border-radius: calc(var(--radius-md) - 3px);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.builder-group-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.builder-title {
    font-size: var(--text-xl);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.2px;
}

.builder-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-5);
    line-height: 1.5;
}

/* ── Builder Filter Section ── */
.builder-filter-section {
    margin-bottom: var(--space-5);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.builder-filter-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--bg-card);
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-sans);
    text-align: left;
    transition: background var(--transition-fast);
}
.builder-filter-header:hover { background: var(--bg-interactive); }
.builder-filter-title { flex: 1; }
.builder-filter-badge {
    background: rgba(99,102,241,0.25);
    color: #818cf8;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
}
.builder-filter-chevron { transition: transform var(--transition-fast); color: var(--text-muted); }

.builder-filter-body {
    padding: 0.9rem;
    border-top: 1px solid var(--border-default);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.builder-filter-body[hidden] { display: none; }

.builder-filter-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.builder-filter-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 4.5rem;
}

.position-pill-group { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.position-pill {
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    border: 1px solid var(--border-mid);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.position-pill:hover { background: var(--bg-interactive); color: var(--text-primary); }
.position-pill.active { background: rgba(99,102,241,0.18); border-color: rgba(99,102,241,0.5); color: #818cf8; }

.condition-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.builder-select {
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: var(--font-sans);
    padding: 0.3rem 0.5rem;
    cursor: pointer;
}
.builder-select:focus { outline: none; border-color: var(--accent-mid); }
.builder-cond-input {
    width: 80px;
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: var(--font-sans);
    padding: 0.3rem 0.5rem;
}
.builder-cond-input:focus { outline: none; border-color: var(--accent-mid); }
.cond-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}
.cond-remove:hover { color: var(--color-error-light); }

.builder-add-cond-btn {
    align-self: flex-start;
    background: none;
    border: 1px dashed var(--border-mid);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-sans);
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}
.builder-add-cond-btn:hover { border-color: var(--accent-mid); color: var(--accent-light); }

.builder-filter-summary {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: -0.25rem 0 var(--space-3);
}

.builder-field { margin-bottom: var(--space-5); }

.builder-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    letter-spacing: 0.2px;
}

.builder-input {
    width: 100%;
    padding: 0.75rem var(--space-4);
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-mid);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.builder-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.formula-input {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    letter-spacing: 0.3px;
}

.formula-input-wrap { position: relative; }

.formula-status {
    font-size: var(--text-xs);
    font-weight: 700;
    margin-top: var(--space-2);
    min-height: 1.2em;
}
.formula-ok  { color: var(--color-win); }
.formula-err { color: var(--color-loss); }

/* Variable chips */
.var-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.var-chip {
    padding: 0.25rem 0.65rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.var-chip:hover {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
    color: var(--accent-light);
}

/* Example buttons */
.builder-examples { margin-bottom: var(--space-6); }

.builder-examples-title {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-3);
}

.builder-example-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.builder-example-btn {
    padding: 0.35rem 0.875rem;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: var(--radius-full);
    color: var(--color-pts);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.builder-example-btn:hover { background: rgba(251,191,36,0.15); }

/* Run button */
.builder-run-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: all var(--transition-base);
    box-shadow: 0 4px 16px var(--accent-glow);
}
.builder-run-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}
.builder-run-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Export / Save buttons */
.builder-export-btn {
    padding: var(--space-2) 1.25rem;
    background: rgba(34,211,160,0.08);
    border: 1px solid rgba(34,211,160,0.25);
    border-radius: var(--radius-full);
    color: var(--color-win);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.builder-export-btn:hover { background: rgba(34,211,160,0.15); }

.builder-save-btn {
    padding: var(--space-2) 1.25rem;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-full);
    color: var(--accent-light);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.builder-save-btn:hover { background: rgba(124,141,240,0.2); }

/* Empty state inside builder */
.builder-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem var(--space-4);
    color: var(--text-muted);
    text-align: center;
    gap: var(--space-3);
}
.builder-empty-icon { font-size: 2.5rem; opacity: 0.5; }
.builder-empty p    { font-size: var(--text-sm); line-height: 1.6; max-width: 240px; }

/* Saved stat cards */
.saved-stat-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    transition: border-color var(--transition-fast);
}
.saved-stat-card:hover { border-color: var(--border-mid); }

.saved-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.saved-stat-name  { font-weight: 800; color: var(--text-primary); font-size: var(--text-sm); }
.saved-stat-meta  { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; margin-top: 0.15rem; }
.saved-stat-value { font-size: 1.5rem; font-weight: 900; color: var(--accent-light); flex-shrink: 0; }

.saved-stat-del {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.25rem;
    line-height: 1;
    transition: color var(--transition-fast);
    flex-shrink: 0;
}
.saved-stat-del:hover { color: var(--color-loss); }

.saved-stat-formula {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── MLB header badge ─────────────────────────────────────── */
.sport-badge-mlb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-xl);
    background: rgba(251,191,36,0.12);
    border: 1px solid rgba(251,191,36,0.3);
    color: #fbbf24;
    font-weight: 800;
    font-size: var(--text-sm);
    letter-spacing: 0.3px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ── Sport Switcher (kept for JS compatibility, hidden) ───── */
.sport-switcher {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-interactive);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-2xl);
    padding: 0.2rem;
    flex-shrink: 0;
}

.sport-btn {
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-xl);
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--text-muted);
    background: transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.sport-btn.active {
    background: rgba(99,102,241,0.22);
    color: var(--accent-light);
    box-shadow: 0 0 0 1px rgba(99,102,241,0.4);
}

.sport-btn:hover:not(.active) {
    background: var(--bg-interactive-hov);
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .sport-switcher { order: -1; }
    .sport-btn { padding: 0.25rem 0.6rem; font-size: var(--text-xs); }
}

.sport-btn--soon {
    opacity: 0.35;
    cursor: not-allowed;
    position: relative;
}

.sport-btn--soon::after {
    content: 'soon';
    position: absolute;
    top: -6px;
    right: -2px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--accent-light);
    text-transform: uppercase;
    background: var(--accent-subtle);
    padding: 1px 4px;
    border-radius: var(--radius-xs);
    line-height: 1.4;
}

/* ── Player Rank Badge ────────────────────────────────────── */
.player-rank-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 0.15rem var(--space-2);
    border-radius: var(--radius-full);
    background: var(--bg-interactive);
    border: 1px solid var(--border-mid);
    color: var(--text-muted);
    z-index: 1;
}

.player-rank-badge--top {
    background: rgba(251,191,36,0.12);
    border-color: rgba(251,191,36,0.35);
    color: var(--color-pts);
}

/* ── Recent Game Stats ────────────────────────────────────── */
.recent-game-stats {
    display: flex;
    gap: 0.75rem;
    font-size: var(--text-sm);
    font-weight: 700;
    flex-wrap: wrap;
}

/* ── Stat Rank Badges (player detail) ────────────────────── */
.stat-rank {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    margin-bottom: 0.1rem;
    line-height: 1;
}
.stat-rank--good  { color: var(--color-ast); }
.stat-rank--great { color: var(--color-reb); }
.stat-rank--elite { color: var(--color-pts); }

/* ── Conference Accent Borders ────────────────────────────── */
.player-card.conference-east { border-top: 3px solid rgba(59,130,246,0.65); }
.player-card.conference-west { border-top: 3px solid rgba(244,63,94,0.65); }

/* ── Team Roster List ─────────────────────────────────────── */
.roster-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.roster-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
        "avatar info stats"
        "avatar info labels";
    align-items: center;
    gap: 0 var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.roster-row:hover {
    background: var(--bg-interactive);
    border-color: var(--border-mid);
}

.roster-row--clickable {
    cursor: pointer;
}

.roster-row--clickable:hover {
    border-color: rgba(99,102,241,0.3);
}

.roster-avatar {
    grid-area: avatar;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    border: 1.5px solid var(--border-default);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.roster-info {
    grid-area: info;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.roster-name {
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.roster-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 600;
}

.roster-stats {
    grid-area: stats;
    display: flex;
    gap: var(--space-4);
    font-size: var(--text-sm);
    font-weight: 800;
    text-align: center;
}

.roster-labels {
    grid-area: labels;
    display: flex;
    gap: var(--space-4);
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    justify-content: flex-end;
}

.roster-stats span,
.roster-labels span {
    min-width: 2.5rem;
    text-align: center;
}

@media (max-width: 480px) {
    .roster-stats, .roster-labels { gap: var(--space-2); }
    .roster-stats span, .roster-labels span { min-width: 1.75rem; }
}

/* ── NBA Standings View ───────────────────────────────────── */
.standings-container {
    display: block !important;
    padding: 0 var(--space-4) var(--space-6);
}

.mlb-date-nav-btn {
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s;
}
.mlb-date-nav-btn:not(:disabled):hover {
    border-color: #818cf8;
    color: #818cf8;
}

.standings-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: 1.25rem;
}

.standings-tab {
    padding: 0.45rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-mid);
    background: var(--bg-interactive);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    font-family: var(--font-sans);
}
.standings-tab.active,
.standings-tab:hover {
    background: var(--accent-subtle);
    border-color: var(--accent-border);
    color: var(--accent);
}

.standings-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    min-width: 540px;
}

.standings-table thead th {
    padding: 0.65rem 0.75rem;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-table-head);
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
}

.standings-th-rank { width: 2rem; }
.standings-th-team { text-align: left !important; min-width: 160px; }

.standings-row td {
    padding: 0.55rem 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-default);
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: background var(--transition-fast);
}

.standings-row:last-child td { border-bottom: none; }
.standings-row:hover td { background: rgba(99,102,241,0.06); }

.standings-row--playoff td { background: rgba(34,211,160,0.04); }
.standings-row--playin  td { background: rgba(245,158,11,0.04); }

.standings-rank {
    font-weight: 800;
    color: var(--text-muted) !important;
    font-size: 0.75rem;
}

.standings-team-cell {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-align: left !important;
}

.standings-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.standings-team-name {
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.standings-num {
    font-weight: 600;
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.standings-pct   { color: var(--text-secondary) !important; }
.standings-gb    { color: var(--text-muted) !important; }
.standings-split { color: var(--text-muted) !important; font-size: 0.78rem; }

.standings-streak--win  { color: var(--color-win) !important; }
.standings-streak--loss { color: var(--color-loss) !important; }

.standings-rdiff--pos { color: var(--color-win) !important; }
.standings-rdiff--neg { color: var(--color-loss) !important; }

.standings-sep td {
    padding: 0.3rem 0.75rem;
    background: transparent !important;
    border-bottom: none !important;
    border-top: 1px solid var(--border-default);
}
.standings-sep span {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
.standings-sep--playoff span   { color: rgba(245,158,11,0.6); }
.standings-sep--eliminated span{ color: rgba(100,116,139,0.5); }

/* Clinch badges */
.clinch-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-xs);
    font-size: 0.6rem;
    font-weight: 900;
    flex-shrink: 0;
}
.clinch-badge--po  { background: rgba(34,211,160,0.15); color: var(--color-win); border: 1px solid rgba(34,211,160,0.3); }
.clinch-badge--div { background: var(--accent-subtle);   color: var(--accent);    border: 1px solid var(--accent-border); }

/* Standings legend */
.standings-legend {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
    padding: 0 0.25rem;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}
.legend-dot--playoff { background: var(--color-win); }
.legend-dot--playin  { background: var(--color-live); }

@media (max-width: 600px) {
    .standings-container { padding: 0 var(--space-3) var(--space-5); }
    .standings-table { font-size: 0.78rem; }
    .standings-table thead th { padding: var(--space-2) 0.4rem; font-size: 0.62rem; }
    .standings-row td { padding: 0.45rem 0.4rem; }
    .standings-logo { width: 18px; height: 18px; }
}

/* ── MLB Standings Grid ───────────────────────────────────── */
.mlb-standings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 0;
}

.mlb-division-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.mlb-division-title {
    padding: 0.6rem 0.875rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-table-sub);
    border-bottom: 1px solid var(--border-default);
    margin: 0;
}

.mlb-division-panel .standings-table-wrap {
    border: none;
    border-radius: 0;
}

.mlb-division-panel .standings-table {
    min-width: unset;
    font-size: 0.8rem;
}

.mlb-division-panel .standings-team-name {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

@media (max-width: 900px) {
    .mlb-standings-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .mlb-standings-grid { grid-template-columns: 1fr; }
    .mlb-division-panel .standings-table { font-size: 0.75rem; }
}

/* ── Ticker Live Badge ────────────────────────────────────── */
.ticker-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: var(--radius-full);
    padding: 0.1rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--color-live);
    letter-spacing: 0.3px;
    animation: tickerLivePulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

/* ── Player Detail Avatar ─────────────────────────────────── */
.player-detail-avatar {
    position: relative;
    overflow: hidden;
}

/* ── MLB Game Detail ──────────────────────────────────────── */

.mlb-game-detail-wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* Game header — away score home */

.mlb-game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.mlb-gh-team {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    flex: 1;
}

.mlb-gh-team:last-child {
    align-items: flex-end;
}

.mlb-gh-logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.mlb-gh-logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.mlb-gh-logo span {
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}

.mlb-gh-abbr {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.mlb-gh-name {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.mlb-gh-team--winner .mlb-gh-abbr {
    color: #fbbf24;
}

.mlb-gh-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 2.6rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    flex-shrink: 0;
}

.mlb-gh-sep {
    color: #334155;
    font-weight: 300;
    font-size: 2rem;
}

.mlb-gh-score-val--win {
    color: var(--text-primary);
}

/* Linescore table */

.mlb-linescore-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.mlb-ls-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mlb-ls-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mlb-ls-table th,
.mlb-ls-table td {
    text-align: center;
    padding: 0.38rem 0.4rem;
    min-width: 1.8rem;
}

.mlb-ls-table thead th {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-default);
}

.mlb-ls-table tbody td {
    color: var(--text-secondary);
}

.mlb-ls-table tbody tr:hover td {
    background: rgba(99,102,241,0.04);
}

.mlb-ls-team-hdr,
.mlb-ls-team-cell {
    text-align: left !important;
    font-weight: 700;
    color: var(--text-primary) !important;
    padding-right: 0.85rem !important;
}

.mlb-ls-inn {
    min-width: 1.6rem;
}

.mlb-ls-cell {
    min-width: 1.6rem;
}

.mlb-ls-rhe {
    font-weight: 700;
    border-left: 1px solid var(--border-default);
    min-width: 2rem;
}

.mlb-ls-rhe--r {
    color: var(--text-primary);
}

.mlb-ls-win {
    color: #fbbf24 !important;
}

/* Box score grid */

.mlb-box-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

@media (max-width: 680px) {
    .mlb-box-grid { grid-template-columns: 1fr; }
}

.mlb-box-section {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    overflow: hidden;
}

.mlb-box-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-default);
    margin: 0;
}

.mlb-box-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mlb-box-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mlb-box-table th,
.mlb-box-table td {
    text-align: center;
    padding: 0.35rem 0.45rem;
}

.mlb-box-table thead th {
    color: #475569;
    font-size: 0.68rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-default);
    background: var(--bg-subtle);
    position: sticky;
    top: 0;
}

.mlb-box-name-hdr {
    text-align: left !important;
    padding-left: 0.75rem !important;
    min-width: 120px;
}

.mlb-box-row:hover td {
    background: rgba(99,102,241,0.04);
    cursor: pointer;
}

.mlb-box-name {
    text-align: left !important;
    padding-left: 0.75rem !important;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.mlb-box-pos {
    display: inline-block;
    width: 1.6rem;
    font-size: 0.65rem;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
}

.mlb-box-avg {
    color: #6366f1;
    font-weight: 600;
    font-size: 0.76rem;
}

.mlb-box-table tbody td {
    color: var(--text-muted);
    border-bottom: 1px solid rgba(30,41,59,0.5);
}

.mlb-box-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── MLB Hitting Splits ───────────────────────────────────── */

.mlb-splits-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.mlb-splits-tab {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--border-default);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    white-space: nowrap;
}

.mlb-splits-tab:hover {
    border-color: rgba(99,102,241,0.4);
    color: var(--text-secondary);
}

.mlb-splits-tab--active {
    background: rgba(99,102,241,0.18);
    border-color: #818cf8;
    color: #c7d2fe;
}

.mlb-splits-panel { display: none; }
.mlb-splits-panel--active { display: block; }

.mlb-splits-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.mlb-splits-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 2.8rem;
}

.mlb-splits-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.mlb-splits-lbl {
    font-size: 0.62rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ── Career / Multi-season Stats Table ───────────────────────── */

.career-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: var(--space-3);
}
.career-table-wrap::-webkit-scrollbar { height: 4px; }
.career-table-wrap::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }

.career-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
    min-width: 540px;
}
.career-table thead th {
    padding: 0.45rem 0.75rem;
    text-align: right;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-table-head);
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
    cursor: default;
}
.career-table thead th:first-child { text-align: left; border-radius: var(--radius-sm) 0 0 0; }
.career-table thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

.career-table tbody tr {
    border-bottom: 1px solid var(--border-default);
    transition: background var(--transition-fast);
}
.career-table tbody tr:last-child { border-bottom: none; }
.career-table tbody tr:hover { background: var(--bg-interactive); }

.career-table td {
    padding: 0.6rem 0.75rem;
    text-align: right;
    color: var(--text-secondary);
    font-weight: 500;
}
.career-season {
    text-align: left !important;
    font-weight: 700 !important;
    color: var(--accent-light) !important;
    white-space: nowrap;
}
.career-gp { color: var(--text-muted) !important; font-weight: 400 !important; }

/* ── Career Trend Chart ────────────────────────────────────────── */

.career-trend-section {
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-default);
}

.career-trend-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.career-stat-btn {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--border-mid);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-sans);
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.career-stat-btn:hover {
    background: var(--bg-interactive);
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.career-stat-btn.active {
    background: rgba(99,102,241,0.18);
    border-color: rgba(99,102,241,0.5);
    color: #818cf8;
}

/* ── Announcer Notes Card ─────────────────────────────────────── */

.player-notes-textarea {
    width: 100%;
    min-height: 100px;
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: var(--font-sans);
    line-height: 1.6;
    padding: 0.65rem 0.85rem;
    resize: vertical;
    transition: border-color var(--transition-fast);
}
.player-notes-textarea:focus {
    outline: none;
    border-color: rgba(99,102,241,0.5);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.player-notes-textarea::placeholder { color: var(--text-muted); opacity: 0.7; }

.player-notes-saved {
    font-size: 0.75rem;
    font-weight: 600;
    color: #34d399;
    letter-spacing: 0.04em;
}

/* ── NBA Advanced Efficiency Card ─────────────────────────────── */

.adv-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem 1.5rem;
}

.adv-metric { display: flex; flex-direction: column; gap: 0.35rem; }

.adv-metric-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}
.adv-metric-label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: default;
}
.adv-metric-value {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.adv-bar {
    height: 4px;
    background: var(--bg-interactive);
    border-radius: 2px;
    overflow: hidden;
}
.adv-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s var(--ease-out);
}

/* ── Statcast Card ────────────────────────────────────────────── */

.statcast-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: 20px;
    padding: 0.1rem 0.5rem;
    vertical-align: middle;
    margin-left: 0.4rem;
}

.sc-grid {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.sc-row {
    display: grid;
    grid-template-columns: 120px 60px 1fr 42px;
    align-items: center;
    gap: 0.6rem;
}

.sc-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.sc-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
}

.sc-bar-wrap {
    background: var(--bg-subtle);
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
}

.sc-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s var(--ease-out);
}

.sc-pct {
    font-size: 0.72rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.sc-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-style: italic;
}

/* ── Power Rankings ───────────────────────────────────────────── */

.power-header-row {
    display: grid;
    grid-template-columns: 32px 36px 1fr 90px 100px 56px 80px;
    gap: 0.5rem;
    padding: 0.35rem 1rem 0.35rem 0.75rem;
    align-items: center;
}
/* MLB power rankings — no L10 pip column */
.power-header-row--mlb,
.power-row--mlb {
    grid-template-columns: 32px 36px 1fr 90px 56px 80px;
}
.power-col-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.power-list { display: flex; flex-direction: column; }

.power-row {
    display: grid;
    grid-template-columns: 32px 36px 1fr 90px 100px 56px 80px;
    gap: 0.5rem;
    padding: 0.6rem 1rem 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-default);
    align-items: center;
    transition: background var(--transition-fast);
}
.power-row:hover { background: var(--bg-interactive); }
.power-row:last-child { border-bottom: none; }

.power-rank {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.power-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.power-team { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.power-team-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.power-bar-wrap {
    height: 3px;
    background: var(--bg-interactive);
    border-radius: 2px;
    overflow: hidden;
}
.power-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
    transition: width 0.6s var(--ease-out);
}

.power-record {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    display: flex;
    flex-direction: column;
}
.power-pct {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.power-l10 {
    display: flex;
    gap: 3px;
    align-items: center;
    flex-wrap: wrap;
}
.power-pip {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.power-pip--win  { background: var(--color-win); }
.power-pip--loss { background: var(--bg-interactive-hov); }

.power-streak {
    font-size: var(--text-sm);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.power-heat {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.2em 0.55em;
    border-radius: var(--radius-full);
    text-align: center;
    white-space: nowrap;
}
.power-heat--hot   { background: rgba(251,191,36,0.15); color: #fbbf24; }
.power-heat--solid { background: rgba(34,211,160,0.12); color: #22d3a0; }
.power-heat--mid   { background: var(--bg-interactive); color: var(--text-muted); }
.power-heat--cold  { background: rgba(99,179,237,0.10); color: #63b3ed; }

.power-conf {
    font-size: 0.55rem;
    font-weight: 800;
    padding: 0.1em 0.35em;
    border-radius: 3px;
    letter-spacing: 0.05em;
}
.power-conf--east { background: rgba(59,130,246,0.15); color: var(--color-east); }
.power-conf--west { background: rgba(244,63,94,0.12);  color: var(--color-west); }

.power-note {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-default);
}

@media (max-width: 600px) {
    .power-header-row,
    .power-row { grid-template-columns: 28px 28px 1fr 70px 0 40px 64px; }
    .power-l10 { display: none; }
    .power-col-label:nth-child(5) { display: none; }
    .adv-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Game Prep ─────────────────────────────────────────────── */

.prep-page-wrap { max-width: 820px; margin: 0 auto; padding: 1.25rem 0; }
.prep-page-title { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); margin: 0 0 0.2rem; }
.prep-page-sub { color: var(--text-muted); font-size: 0.82rem; margin: 0 0 1.25rem; }

/* Game select cards */
.prep-game-list { display: flex; flex-direction: column; gap: 0.6rem; }

.prep-game-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: border-color 0.15s, transform 0.1s;
}
.prep-game-card:hover { border-color: var(--accent-primary); transform: translateY(-1px); }

.prep-gc-team { display: flex; align-items: center; gap: 0.6rem; }
.prep-gc-team--home { flex-direction: row-reverse; text-align: right; }
.prep-gc-logo { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.prep-gc-info { display: flex; flex-direction: column; gap: 0.05rem; }
.prep-gc-info--home { align-items: flex-end; }
.prep-gc-abbr { font-size: 1.05rem; font-weight: 800; }
.prep-gc-rec { font-size: 0.72rem; color: var(--text-muted); }
.prep-gc-pitcher { font-size: 0.68rem; color: var(--text-muted); }
.prep-gc-mid { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.prep-gc-at { font-size: 1.3rem; font-weight: 800; color: var(--text-muted); line-height: 1; }
.prep-gc-status { font-size: 0.68rem; color: var(--text-muted); }
.prep-gc-cta { font-size: 0.7rem; font-weight: 600; color: var(--accent-primary); margin-top: 0.1rem; }

/* Prep sheet layout */
.prep-sheet { max-width: 820px; margin: 0 auto; padding: 1rem 0; }
.prep-sheet-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.prep-print-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: border-color 0.15s, color 0.15s;
}
.prep-print-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

/* Matchup header */
.prep-matchup-hdr {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 0.9rem;
}
.prep-mh-team {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 0.65rem;
}
.prep-mh-team--home {
    flex-direction: row-reverse;
    padding-left: 0;
    padding-right: 0.65rem;
    border-right: 4px solid transparent;
}
.prep-mh-team-info--home { text-align: right; }
.prep-mh-logo { width: 52px; height: 52px; object-fit: contain; }
.prep-mh-city { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.prep-mh-name { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); }
.prep-mh-rec { font-size: 0.78rem; color: var(--text-muted); }
.prep-mh-center { text-align: center; }
.prep-mh-vs { font-size: 1.8rem; font-weight: 900; color: var(--text-muted); line-height: 1; }
.prep-mh-time { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); margin-top: 0.2rem; }
.prep-mh-venue { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.1rem; }
.prep-mh-date { font-size: 0.65rem; color: var(--text-muted); }

/* Sections */
.prep-section {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 1.1rem;
    margin-bottom: 0.9rem;
}
.prep-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-default);
    padding-bottom: 0.5rem;
    margin-bottom: 0.9rem;
}
.prep-two-col {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 1rem;
    align-items: start;
}
.prep-divider { background: var(--border-default); align-self: stretch; min-height: 60px; }

/* Probable pitchers */
.prep-pp-card { display: flex; flex-direction: column; gap: 0.6rem; }
.prep-pp-top { display: flex; align-items: center; gap: 0.6rem; }
.prep-pp-hs {
    width: 48px; height: 48px; border-radius: 50%;
    object-fit: cover; object-position: top center;
    border: 2px solid var(--border-default); flex-shrink: 0;
}
.prep-pp-avatar {
    width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
    background: var(--bg-elevated); display: flex; align-items: center;
    justify-content: center; font-weight: 800; font-size: 1.1rem; color: var(--text-secondary);
}
.prep-pp-name { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.prep-pp-rec { font-size: 0.72rem; color: var(--text-muted); }
.prep-pp-stats { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.prep-pp-stat { display: flex; flex-direction: column; align-items: center; min-width: 36px; }
.prep-pp-val { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.prep-pp-lbl { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

/* Compare rows */
.prep-cmp-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    padding: 0 0.1rem;
}
.prep-cmp-team-lbl { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.prep-cmp-header .prep-cmp-team-lbl:last-child { text-align: right; }
.prep-cmp-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border-default);
    align-items: center;
}
.prep-cmp-row:last-of-type { border-bottom: none; }
.prep-cmp-row--highlight { background: var(--bg-elevated); border-radius: 6px; padding: 0.3rem 0.4rem; margin: 0 -0.4rem; }
.prep-cmp-val { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.prep-cmp-row .prep-cmp-val:last-child { text-align: right; }
.prep-cmp-lbl {
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted); text-align: center;
    background: var(--bg-elevated); border-radius: 4px; padding: 0.1rem 0.3rem;
}

/* Key hitters */
.prep-hitters-col { display: flex; flex-direction: column; gap: 0.15rem; }
.prep-hitters-lbl {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 0.4rem;
}
.prep-hitter-row {
    display: flex; align-items: center; gap: 0.45rem;
    padding: 0.3rem 0.35rem; border-radius: 8px;
    cursor: pointer; transition: background 0.1s;
}
.prep-hitter-row:hover { background: var(--bg-elevated); }
.prep-hitter-hs {
    width: 30px; height: 30px; border-radius: 50%;
    object-fit: cover; object-position: top center; flex-shrink: 0;
}
.prep-hitter-init {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: var(--bg-elevated); display: flex; align-items: center;
    justify-content: center; font-weight: 700; font-size: 0.72rem; color: var(--text-secondary);
}
.prep-hitter-info { flex: 1; display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.prep-hitter-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prep-hitter-pos { font-size: 0.62rem; color: var(--text-muted); }
.prep-hitter-stats { display: flex; gap: 0.4rem; font-size: 0.72rem; color: var(--text-secondary); white-space: nowrap; }
.prep-no-hitters { font-size: 0.75rem; color: var(--text-muted); text-align: center; padding: 0.75rem 0; font-style: italic; }

@media (max-width: 680px) {
    .prep-matchup-hdr { grid-template-columns: 1fr; text-align: center; gap: 0.5rem; }
    .prep-mh-team { justify-content: center; border: none !important; padding: 0; }
    .prep-mh-team--home { flex-direction: row; padding: 0; }
    .prep-mh-team-info--home { text-align: left; }
    .prep-two-col { grid-template-columns: 1fr; }
    .prep-divider { display: none; }
    .prep-gc-pitcher { display: none; }
}

@media print {
    .prep-sheet-toolbar { display: none !important; }
    .prep-matchup-hdr, .prep-section { break-inside: avoid; }
}

/* ── Last N Starts ───────────────────────────────────────── */
.last-starts-wrap { display: flex; flex-direction: column; gap: 0.75rem; }

.ls-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.ls-label {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 0.2rem;
}
.ls-stat-pill {
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    background: var(--bg-interactive);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    white-space: nowrap;
}
.ls-stat-pill--hr {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.3);
    color: #f87171;
}

.ls-rows { display: flex; flex-direction: column; gap: 0.15rem; }
.ls-row {
    display: grid;
    grid-template-columns: 2.8rem 5.5rem 3.2rem 2.8rem 2.8rem 2.8rem 1.8rem;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.1rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}
.ls-row:last-child { border-bottom: none; }
.ls-date  { color: var(--text-muted); }
.ls-opp   { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-ip    { font-weight: 600; color: var(--text-secondary); }
.ls-k     { color: var(--accent-light); font-weight: 700; }
.ls-bb    { color: var(--text-muted); }
.ls-er    { font-weight: 600; }
.ls-er--zero { color: #4ade80; }
.ls-er--bad  { color: #f87171; }
.ls-dec  { font-weight: 800; text-align: center; }
.ls-dec--w  { color: #4ade80; }
.ls-dec--l  { color: #f87171; }
.ls-dec--nd { color: var(--text-muted); }

@media (max-width: 480px) {
    .ls-row { grid-template-columns: 2.4rem 1fr 3rem 2.5rem 2.5rem 2.5rem 1.6rem; }
}

/* Game Prep — form strip */
.prep-form-strip { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.prep-form-badge {
    font-size: 0.65rem; font-weight: 700; border-radius: 4px;
    padding: 0.1rem 0.35rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.prep-form-badge--w   { background: #14532d; color: #4ade80; }
.prep-form-badge--l   { background: #450a0a; color: #f87171; }
.prep-form-badge--pos { background: #14532d22; color: #4ade80; border: 1px solid #4ade8040; }
.prep-form-badge--neg { background: #450a0a22; color: #f87171; border: 1px solid #f8717140; }
.prep-form-tag { font-size: 0.62rem; color: var(--text-muted); }

/* MLB multi-player compare */
.mlb-cmp-selects {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.mlb-cmp-selects .compare-select { flex: 1; min-width: 160px; }

.cmp-stat-lbl-cell {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-align: center;
    padding: 0.4rem 0.35rem;
    white-space: nowrap;
}
