        :root {
            /* Nuvio / Modern Wiki Dark Theme Colors */
            --bg: #09090b;
            --surface: #18181b;
            --surface-hover: #27272a;
            --border: #27272a;
            --border-highlight: #3f3f46;
            --text: #f4f4f5;
            --text-muted: #a1a1aa;
            
            /* Vibrant Accents */
            --primary: #8b5cf6;
            --primary-hover: #7c3aed;
            --secondary: #3b82f6;
            --accent-glow: rgba(139, 92, 246, 0.15);
            
            /* Value Colors */
            --val-green-bg: rgba(34, 197, 94, 0.15);
            --val-green-txt: #4ade80;
            --val-red-bg: rgba(239, 68, 68, 0.15);
            --val-red-txt: #f87171;
            --val-amber-bg: rgba(245, 158, 11, 0.15);
            --val-amber-txt: #fbbf24;

            /* Value Badge Colors — deliberately more saturated/higher-contrast
               than the --val-*-bg row-tint colors above, so the badge never
               blends into a same-hued position row (e.g. green badge on a
               green RB row, red badge on a red QB row, amber on a TE row). */
            --badge-good-bg: rgba(34, 197, 94, 0.35);
            --badge-good-txt: #bbf7d0;
            --badge-good-border: rgba(74, 222, 128, 0.7);
            --badge-bad-bg: rgba(239, 68, 68, 0.35);
            --badge-bad-txt: #fecaca;
            --badge-bad-border: rgba(248, 113, 113, 0.7);
            --badge-mixed-bg: rgba(245, 158, 11, 0.35);
            --badge-mixed-txt: #fde68a;
            --badge-mixed-border: rgba(245, 158, 11, 0.7);

            /* Design tokens — consistent scales for new/updated rules
               (existing rules keep their tuned one-off values; this isn't a
               full retrofit, just a system going forward). */
            --font-xs: 0.7rem;
            --font-sm: 0.8rem;
            --font-md: 0.9rem;
            --font-lg: 1.1rem;
            --font-xl: 1.4rem;
            --font-2xl: 2rem;

            --space-1: 4px;
            --space-2: 8px;
            --space-3: 12px;
            --space-4: 16px;
            --space-5: 20px;
            --space-6: 24px;

            --radius-sm: 6px;
            --radius-md: 10px;
            --radius-lg: 14px;
            --radius-pill: 999px;

            --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
            --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
            --shadow-lg: 0 10px 32px rgba(0,0,0,0.4);

            --focus-ring: 0 0 0 3px var(--accent-glow);

            /* Single source of truth for the sidebar column width, shared by
               .header and .layout-container so the header's brand stays
               aligned above the main-content column without a hardcoded
               pixel offset that silently drifts if the sidebar width ever
               changes in one place but not the other. */
            --sidebar-width: 260px;

            /* Translucent overlay for table row hover — layered on top via
               inset box-shadow rather than replacing background-color, so
               the existing position-tinted row colors show through instead
               of being wiped out on hover. */
            --row-hover-overlay: rgba(255, 255, 255, 0.05);
        }

        .icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }
        
        body { 
            font-family: 'Inter', system-ui, sans-serif; 
            background-color: var(--bg); 
            color: var(--text);
            margin: 0; 
            padding: 15px; 
            font-size: 0.9rem; 
            -webkit-font-smoothing: antialiased;
        }

        /* App Wrapper for Widescreen Constraints */
        .app-wrapper {
            max-width: 1350px;
            margin: 0 auto;
        }
        
        /* Mirrors .layout-container's grid (same --sidebar-width token) so
           the brand sits centered over the main-content column, not the
           whole page — without a hardcoded pixel offset that can drift out
           of sync with the sidebar's actual width. */
        .header {
            display: grid;
            grid-template-columns: var(--sidebar-width) 1fr;
            gap: 24px;
            max-width: 96%;
            margin: 0 auto 25px;
            padding-top: 10px;
            text-align: center;
        }
        .header-brand { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; justify-self: center; min-width: 0; }
        .header-logo { height: 52px; width: auto; }
        .header h1 { 
            margin: 0; 
            color: var(--text); 
            font-size: 2rem; 
            font-weight: 800;
            letter-spacing: -0.5px;
            background: linear-gradient(to right, #a78bfa, #60a5fa);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .header-hq-badge {
            font-size: 0.80rem;
            font-weight: 700;
            color: #a78bfa;
            border: 1px solid rgba(139, 92, 246, 0.5);
            border-radius: 20px;
            padding: 2px 12px;
            margin-left: 10px;
            letter-spacing: 1px;
            vertical-align: middle;
            display: inline-block;
        }

        .data-status-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.68rem;
            font-weight: 500;
            color: var(--text-muted);
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-pill, 999px);
            padding: 3px 10px;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        .data-status-pill:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-highlight); }
        .data-status-pill.stale { color: var(--badge-mixed-txt, #92400e); border-color: var(--badge-mixed-border, #f59e0b); }

        /* Same pill shape as .data-status-pill, but always the same
           accent color -- there's no "stale" state here since this is a
           one-time, dated analysis rather than a live data feed. */
        .backtest-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.68rem;
            font-weight: 600;
            color: var(--primary);
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-pill, 999px);
            padding: 3px 10px;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }
        .backtest-pill:hover { background: var(--surface-hover); border-color: var(--border-highlight); }

        .backtest-intro { margin: 0 0 16px; font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

        .backtest-stat-row { display: flex; gap: 12px; margin-bottom: 6px; }
        .backtest-stat-box {
            flex: 1;
            text-align: center;
            padding: 14px 10px;
            border-radius: var(--radius-md, 10px);
            background: var(--surface-hover);
            border: 1px solid var(--border);
        }
        .backtest-stat-box.backtest-stat-model {
            background: var(--accent-glow);
            border-color: var(--primary);
        }
        .backtest-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1.1; }
        .backtest-stat-box.backtest-stat-model .backtest-stat-value { color: var(--primary); }
        .backtest-stat-label { margin-top: 4px; font-size: 0.72rem; color: var(--text-muted); line-height: 1.3; }
        .backtest-stat-caption { margin: 8px 0 0; font-size: 0.74rem; color: var(--text-muted); font-style: italic; }

        .backtest-section { padding: 14px 0 0; border-top: 1px solid var(--border); margin-top: 14px; }
        .backtest-section h4 { margin: 0 0 6px; font-size: 0.9rem; color: var(--text); }
        .backtest-section p { margin: 0; font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
        .backtest-section strong { color: var(--text); }

        .data-status-group { padding: 10px 0 16px; border-bottom: 1px solid var(--border); }
        .data-status-group:last-child { border-bottom: none; padding-bottom: 4px; }
        .data-status-group h4 { margin: 0 0 4px; font-size: 0.92rem; color: var(--text); }
        .data-status-method { margin: 0 0 8px; font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }
        .data-status-source-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            color: var(--primary);
            text-decoration: none;
            margin-bottom: 10px;
        }
        .data-status-source-link:hover { text-decoration: underline; }
        .data-status-files { display: flex; flex-direction: column; gap: 2px; }
        .data-status-file-row {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            padding: 3px 0;
        }
        .data-status-file-name { color: var(--text-muted); font-family: monospace; }
        .data-status-file-time { font-variant-numeric: tabular-nums; }
        .data-status-file-time.stale { color: var(--badge-bad-txt, #991b1b); font-weight: 600; }

        .coffee-btn {
            position: fixed;
            top: 18px;
            right: 70px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0 14px;
            height: 38px;
            background: linear-gradient(135deg,#FFDD00,#FFB800);
            color: #1f2937;
            border-radius: 999px;
            border: none;
            font-weight: 700;
            font-size: .85rem;
            text-decoration: none;
            box-shadow: 0 4px 14px rgba(255,184,0,.35);
            transition: .2s;
            z-index: 100;
        }

        .coffee-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 22px rgba(255,184,0,.45);
        }

        .theme-toggle-btn {
            position: fixed;
            top: 18px;
            right: 18px;
            background: var(--surface);
            border: 1px solid var(--border);
            color: var(--text);
            width: 38px;
            height: 38px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            z-index: 10;
        }
        .theme-toggle-btn:hover { background: var(--surface-hover); transform: translateY(-1px); }

        /* ===================== LIGHT THEME OVERRIDES ===================== */
        body.light-theme {
            --bg: #f8fafc;
            --surface: #ffffff;
            --surface-hover: #f1f5f9;
            --border: #e2e8f0;
            --border-highlight: #cbd5e1;
            --text: #1e293b;
            --text-muted: #64748b;
            --primary: #7c3aed;
            --primary-hover: #6d28d9;
            --secondary: #2563eb;
            --accent-glow: rgba(124, 58, 237, 0.12);
            --val-green-bg: #dcfce7;
            --val-green-txt: #166534;
            --val-red-bg: #fee2e2;
            --val-red-txt: #991b1b;
            --val-amber-bg: #fef3c7;
            --val-amber-txt: #92400e;

            /* More saturated than the pastel row tints above (pos-RB is the
               same #dcfce7 as --val-green-bg) so the badge stays visible
               against a same-colored position row. */
            --badge-good-bg: #86efac;
            --badge-good-txt: #14532d;
            --badge-good-border: #22c55e;
            --badge-bad-bg: #fca5a5;
            --badge-bad-txt: #7f1d1d;
            --badge-bad-border: #ef4444;
            --badge-mixed-bg: #fcd34d;
            --badge-mixed-txt: #78350f;
            --badge-mixed-border: #f59e0b;

            /* Lighter shadows for a light background — the dark-theme values
               would look muddy rather than give a sense of depth. */
            --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
            --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.10);
            --shadow-lg: 0 10px 32px rgba(15, 23, 42, 0.14);
            --row-hover-overlay: rgba(15, 23, 42, 0.04);
        }
        body.light-theme .header h1 {
            background: linear-gradient(to right, #7c3aed, #2563eb);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        body.light-theme .badge-QB { background-color: #ffe4e6; color: #be123c; border-color: #fecdd3; }
        body.light-theme .badge-RB { background-color: #dcfce7; color: #15803d; border-color: #bbf7d0; }
        body.light-theme .badge-WR { background-color: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
        body.light-theme .badge-TE { background-color: #fef3c7; color: #b45309; border-color: #fde68a; }
        body.light-theme .badge-K  { background-color: #f3e8ff; color: #7e22ce; border-color: #e9d5ff; }
        body.light-theme .badge-DST{ background-color: #e7e5e4; color: #44403c; border-color: #d6d3d1; }
        /* The dark-mode Top Rookie color (pale yellow text) had no
           light-theme override at all, so light mode fell back to that
           same pale yellow on a near-white card -- barely readable. Dark,
           saturated gold text on a light yellow tint instead. */
        body.light-theme .top-rookie-badge { background-color: #fef9c3; color: #854d0e; border-color: #fde047; }

        body.light-theme .tab-btn.active[onclick="setFilter('ALL')"] { background: var(--text); color: #fff; border-color: var(--text); }
        body.light-theme .tab-btn.active[onclick="setFilter('QB')"] { background-color: #ffe4e6; color: #be123c; border-color: #fda4af; }
        body.light-theme .tab-btn.active[onclick="setFilter('RB')"] { background-color: #dcfce7; color: #15803d; border-color: #86efac; }
        body.light-theme .tab-btn.active[onclick="setFilter('WR')"] { background-color: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
        body.light-theme .tab-btn.active[onclick="setFilter('TE')"] { background-color: #fef3c7; color: #b45309; border-color: #fcd34d; }
        body.light-theme .tab-btn.active[onclick="setFilter('K')"] { background-color: #f3e8ff; color: #7e22ce; border-color: #d8b4fe; }
        body.light-theme .tab-btn.active[onclick="setFilter('DST')"] { background-color: #e7e5e4; color: #44403c; border-color: #d6d3d1; }
        body.light-theme .tab-btn.active[onclick="setFilter('DRAFTED')"] { background-color: #e2e8f0; color: #0f172a; border-color: #cbd5e1; }

        /* Enhanced Row Backgrounds for Light Mode */
        body.light-theme .pos-QB td { background-color: #ffe4e6; }
        body.light-theme .pos-RB td { background-color: #dcfce7; }
        body.light-theme .pos-WR td { background-color: #dbeafe; }
        body.light-theme .pos-TE td { background-color: #fef3c7; }
        body.light-theme .pos-K td  { background-color: #f3e8ff; }
        body.light-theme .pos-DST td{ background-color: #e7e5e4; }

        body.light-theme .drafted-me td { background-color: #ede9fe !important; color: #1e1b4b; border-bottom-color: #ddd6fe; }
        body.light-theme .value-neutral { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
        body.light-theme .value-none { background: transparent; color: #cbd5e1; }
        body.light-theme .bye-warning { color: #b91c1c; background: #fee2e2; border-color: #fca5a5; }
        body.light-theme .injury-flag { color: #b91c1c; background: #fee2e2; border-color: #fca5a5; }
        body.light-theme .tier-badge { color: #fff; background: #94a3b8; }
        body.light-theme .faq-card {
            background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid #e2e8f0;
            border-top: 1px solid #e2e8f0;
            box-shadow: 0 4px 14px rgba(0,0,0,0.06);
        }
        body.light-theme .faq-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.1); border-color: #cbd5e1; }
        
        body.light-theme .search-input {
            background: #ffffff;
            border-color: #e2e8f0;
            color: #1e293b;
        }
        body.light-theme .checkbox-group { background: #ffffff; border-color: #e2e8f0; }
        body.light-theme .checkbox-group label { color: #1e293b; }
        /* ==================================================================== */
        
        /* Expanded Layout Container */
        .layout-container {
            display: grid;
            grid-template-columns: var(--sidebar-width) 1fr;
            gap: 24px;
            max-width: 96%;
            margin: auto;
            align-items: start;
        }
        /* Grid items default to min-width: auto, meaning they refuse to
           shrink below their own content's natural (unwrapped) width --
           e.g. a form-row of number inputs that would only wrap once its
           container is narrow enough. Without this, .main-content/.sidebar
           can force the whole page wider than the viewport on small screens
           even though flex-wrap is set correctly further down. */
        .sidebar, .main-content { min-width: 0; }

        /* Sidebar Styles */
        .sidebar {
            background: var(--surface);
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
            border: 1px solid var(--border);
            position: sticky;
            top: 20px; 
        }
        
        .pick-tracker {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            padding: 12px; 
            border-radius: 8px;
            text-align: center;
            margin-bottom: 20px;
            box-shadow: 0 4px 15px var(--accent-glow);
            border: 1px solid rgba(255,255,255,0.1);
        }
        .pick-tracker-top {
            display: flex; align-items: baseline; justify-content: center; gap: 8px;
        }
        .pick-tracker .label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; font-weight: 600; }
        .pick-tracker .number { font-size: 1.15rem; font-weight: 800; }

        .needs-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 6px;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid rgba(255,255,255,0.2);
        }
        .need-item {
            background: rgba(255,255,255,0.12);
            border: 1px solid rgba(255,255,255,0.15);
            border-radius: 6px;
            padding: 5px 2px;
            text-align: center;
            transition: all 0.2s;
        }
        .need-item .need-pos {
            display: block;
            font-size: 0.65rem; font-weight: 700; letter-spacing: 0.5px; opacity: 0.85;
        }
        .need-item .need-count {
            display: block;
            font-size: 1rem; font-weight: 800; margin-top: 1px;
        }
        .need-item.filled {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.08);
        }
        .need-item.filled .need-count { opacity: 0.55; }

        .sleeper-sync-box { margin-bottom: 20px; }
        /* Variant for placement inline in the Update/Reset button row rather
           than stacked in the sidebar -- fixed width instead of 100% (which
           would otherwise stretch to fill the whole flex row), pushed to the
           far right via margin-left: auto, and no bottom margin since it's
           sitting next to buttons rather than stacked above other boxes. */
        .sleeper-sync-box-inline {
            width: 260px;
            flex: 0 0 auto;
            margin-left: auto;
            margin-bottom: 0;
        }
        .sleeper-sync-toggle-btn {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 6px;
            justify-content: center;
            background: var(--surface);
            border: 1px solid rgba(0, 206, 184, 0.35);
            color: var(--text-muted);
            border-radius: var(--radius-md, 8px);
            padding: 8px 10px;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .sleeper-sync-toggle-btn:hover { background: var(--surface-hover); color: var(--text); }
        /* Sleeper's brand color is a distinctive teal -- used here (even in
           the default, not-yet-connected state) so this panel reads as
           "this is the Sleeper-specific integration" at a glance, distinct
           from the app's own purple/blue palette used everywhere else. */
        .sleeper-sync-toggle-btn .icon { color: #00ceb8; }
        .sleeper-sync-toggle-btn.sync-live {
            background: linear-gradient(135deg, #00ceb8, #00a896);
            border-color: transparent;
            color: white;
            box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset, 0 2px 10px rgba(0, 206, 184, 0.35);
        }
        .sleeper-sync-toggle-btn.sync-live:hover { filter: brightness(1.08); }
        .sleeper-sync-toggle-btn.sync-live .icon {
            color: #fde047;
            animation: sleeper-bolt-glow 1.6s ease-in-out infinite;
        }
        @keyframes sleeper-bolt-glow {
            0%, 100% { filter: drop-shadow(0 0 1px rgba(253, 224, 71, 0.5)); }
            50% { filter: drop-shadow(0 0 6px rgba(253, 224, 71, 1)); }
        }
        .sleeper-sync-live-dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #22c55e;
            box-shadow: 0 0 0 rgba(34, 197, 94, 0.6);
            animation: sleeper-live-dot-pulse 1.8s ease-in-out infinite;
        }
        @keyframes sleeper-live-dot-pulse {
            0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
            70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
            100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
        }
        .sleeper-sync-panel { display: none; margin-top: 8px; }
        .sleeper-sync-panel.open { display: block; }
        .sleeper-sync-input {
            width: 100%;
            box-sizing: border-box;
            margin-bottom: 6px;
            padding: 7px 9px;
            font-size: 0.8rem;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: var(--bg);
            color: var(--text);
        }
        .sleeper-sync-connect-btn, .sleeper-sync-disconnect-btn {
            width: 100%;
            padding: 7px;
            border-radius: 6px;
            border: none;
            font-weight: 600;
            font-size: 0.8rem;
            cursor: pointer;
        }
        .sleeper-sync-connect-btn { background: #00ceb8; color: white; }
        .sleeper-sync-connect-btn:hover { background: #00a896; }
        .sleeper-sync-disconnect-btn { background: var(--surface-hover); color: var(--text-muted); }
        .sleeper-sync-disconnect-btn:hover { color: var(--text); }
        .sleeper-sync-connected-label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 8px;
        }
        .sleeper-sync-connected-label .icon { color: #22c55e; }
        .sleeper-sync-status {
            font-size: 0.72rem;
            color: var(--text-muted);
            text-align: center;
            margin-top: 4px;
        }
        .sleeper-sync-status.sync-error { color: var(--badge-bad-txt, #991b1b); font-weight: 600; }

        /* Set Keepers panel -- lives in the same collapsible sidebar-box
           style as the Sleeper boxes above it (reuses .sleeper-sync-*
           classes for the shell), with its own search/results/list styling
           for the keeper-marking workflow specifically. */
        .keeper-panel-hint {
            font-size: 0.72rem;
            color: var(--text-muted);
            margin: 0 0 8px;
            line-height: 1.4;
        }
        .keeper-search-wrapper { width: 100%; margin-bottom: 6px; }
        .keeper-search-wrapper .search-input { width: 100%; padding-right: 28px; }
        .keeper-search-results { margin-bottom: 4px; }
        .keeper-no-results {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-style: italic;
            padding: 4px 2px;
        }
        .keeper-result-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 6px 0;
            border-bottom: 1px solid var(--border);
        }
        .keeper-result-row:last-child { border-bottom: none; }
        .keeper-result-name {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .keeper-result-pos {
            font-size: 0.68rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-left: 4px;
        }
        .keeper-list-header {
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            color: var(--text-muted);
            margin: 10px 0 6px;
            padding-top: 8px;
            border-top: 1px solid var(--border);
        }
        .keeper-list { max-height: 220px; overflow-y: auto; }
        .keeper-list-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 5px 0;
            font-size: 0.78rem;
        }
        .keeper-list-name { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .keeper-list-owner { color: var(--text-muted); font-size: 0.7rem; white-space: nowrap; }
        .keeper-remove-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 2px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .keeper-remove-btn:hover { color: #ef4444; background: var(--val-red-bg); }
        .keeper-remove-btn .icon { width: 12px; height: 12px; }

        .roster-header {
            font-size: 1.1rem; font-weight: 700; margin-bottom: 15px;
            padding-bottom: 10px; border-bottom: 1px solid var(--border);
            color: var(--text);
            letter-spacing: -0.3px;
        }
        .roster-group { margin-bottom: 15px; }
        .roster-pos { 
            font-size: 0.85rem; margin-bottom: 8px; 
            display: flex; justify-content: space-between; align-items: center;
        }
        
        /* Roster Position Badges (Dark Mode Translucent) */
        .roster-pos-badge { padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 0.75rem; }
        .badge-QB { background-color: rgba(225, 29, 72, 0.15); color: #fda4af; border: 1px solid rgba(225, 29, 72, 0.3); }
        .badge-RB { background-color: rgba(34, 197, 94, 0.15); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.3); }
        .badge-WR { background-color: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
        .badge-TE { background-color: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
        .badge-K  { background-color: rgba(168, 85, 247, 0.15); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.3); }
        .badge-DST{ background-color: rgba(120, 113, 108, 0.15); color: #d6d3d1; border: 1px solid rgba(120, 113, 108, 0.3); }

        .roster-player { 
            font-size: 0.85rem; padding: 6px 0; 
            border-bottom: 1px solid var(--border);
            color: var(--text);
        }
        .roster-player:last-child { border-bottom: none; }
        .empty-slot { color: var(--text-muted); font-style: italic; font-size: 0.8rem; }

        /* Main Content Styles */
        .panel { 
            background: var(--surface); 
            padding: 16px 24px; 
            border-radius: 12px; 
            box-shadow: 0 4px 20px rgba(0,0,0,0.3); 
            border: 1px solid var(--border);
            margin-bottom: 20px;
        }
        
        form { display: flex; flex-direction: column; gap: 15px; }
        
        .form-row { 
            display: flex; 
            flex-wrap: wrap; 
            gap: 12px; 
            align-items: flex-end; 
            justify-content: flex-start; 
        }

        .settings-divider {
            width: 100%;
            height: 1px;
            background-color: var(--border);
            margin: 6px 0;
        }
        
        .input-group { display: flex; flex-direction: column; }
        label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px;}
        
        /* Dark Mode Inputs */
        input[type="number"], select { 
            padding: 6px 10px; 
            background: var(--bg);
            color: var(--text);
            border: 1px solid var(--border); 
            border-radius: 6px; 
            font-size: 0.85rem; 
            width: 60px; 
            transition: border-color 0.2s;
        }
        select { width: auto; height: 31px; }
        input[type="number"]:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
        
        .checkbox-group { 
            display: flex; align-items: center; gap: 8px; 
            background: var(--bg); padding: 0 12px; 
            border-radius: 6px; border: 1px solid var(--border); height: 31px; 
        }
        .checkbox-group input[type="checkbox"] { cursor: pointer; width: 14px; height: 14px; margin: 0; accent-color: var(--primary); }
        .checkbox-group label { margin: 0; cursor: pointer; font-size: 0.8rem; color: var(--text); white-space: nowrap; text-transform: none; letter-spacing: 0; }

        .update-btn { 
            padding: 0 24px; background: var(--primary); color: white; 
            border: 1px solid var(--primary-hover); border-radius: 6px; 
            font-size: 0.85rem; font-weight: 600; cursor: pointer; 
            transition: all 0.2s; height: 31px;
            box-shadow: 0 2px 10px var(--accent-glow);
        }
        .update-btn:hover { background: var(--primary-hover); transform: translateY(-1px); }

        .reset-btn {
            padding: 0 20px; background: var(--bg); color: var(--text-muted);
            border: 1px solid var(--border); border-radius: 6px;
            font-size: 0.85rem; font-weight: 600; cursor: pointer;
            transition: all 0.2s; height: 31px;
        }
        .reset-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-highlight); }

        /* Clear Draft & Search Action Bar Styling */
        .table-action-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            flex-wrap: wrap;
            gap: 12px;
        }
        
        .action-bar-right {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .search-input-wrapper {
            position: relative;
            display: inline-flex;
            align-items: center;
        }
        .search-input {
            padding: 4px 28px 4px 12px;
            background: var(--bg);
            color: var(--text);
            border: 1px solid var(--border);
            border-radius: 20px;
            font-size: 0.80rem;
            height: 31px;
            width: 200px;
            transition: all 0.2s;
            box-sizing: border-box;
        }
        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: var(--focus-ring);
        }
        /* X button to clear the search field in one tap instead of
           backspacing/re-selecting -- only shown once there's actually text
           to clear (toggled in handleSearch/clearSearchInput). */
        .search-clear-btn {
            position: absolute;
            right: 6px;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            padding: 0;
            background: none;
            border: none;
            border-radius: 50%;
            color: var(--text-muted);
            cursor: pointer;
        }
        .search-clear-btn:hover { color: var(--text); background: var(--surface-hover); }
        .search-clear-btn .icon { width: 12px; height: 12px; }

        /* Consistent keyboard-focus ring across every interactive element —
           :focus-visible so it only shows for keyboard nav, not mouse clicks. */
        button:focus-visible {
            outline: none;
            box-shadow: var(--focus-ring);
        }

        .keeper-trigger-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 5px 14px;
            background: var(--bg);
            color: var(--text-muted);
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 0.80rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .keeper-trigger-btn:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-highlight); }
        .keeper-trigger-btn .icon { width: 13px; height: 13px; }

        .clear-draft-btn {
            padding: 5px 14px;
            background: rgba(239, 68, 68, 0.12);
            color: #f87171;
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 6px;
            font-size: 0.80rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            height: 31px;
        }
        .clear-draft-btn:hover {
            background: rgba(239, 68, 68, 0.25);
            border-color: rgba(239, 68, 68, 0.5);
            color: #fca5a5;
        }

        /* Color Matched Tabs */
        .tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0; align-items: center;}
        .tab-btn {
            padding: 6px 16px; border: 1px solid var(--border); background: var(--surface);
            border-radius: 20px; cursor: pointer; font-weight: 600; color: var(--text-muted); font-size: 0.8rem;
            transition: all 0.2s;
        }
        .tab-btn:hover { background: var(--surface-hover); color: var(--text); }
        
        /* Active Tab Color Mappings */
        .tab-btn.active[onclick="setFilter('ALL')"] { background: var(--text); color: var(--bg); border-color: var(--text); }
        .tab-btn.active[onclick="setFilter('QB')"] { background-color: rgba(225, 29, 72, 0.15); color: #fda4af; border-color: rgba(225, 29, 72, 0.4); }
        .tab-btn.active[onclick="setFilter('RB')"] { background-color: rgba(34, 197, 94, 0.15); color: #86efac; border-color: rgba(34, 197, 94, 0.4); }
        .tab-btn.active[onclick="setFilter('WR')"] { background-color: rgba(59, 130, 246, 0.15); color: #93c5fd; border-color: rgba(59, 130, 246, 0.4); }
        .tab-btn.active[onclick="setFilter('TE')"] { background-color: rgba(245, 158, 11, 0.15); color: #fcd34d; border-color: rgba(245, 158, 11, 0.4); }
        .tab-btn.active[onclick="setFilter('K')"] { background-color: rgba(168, 85, 247, 0.15); color: #d8b4fe; border-color: rgba(168, 85, 247, 0.4); }
        .tab-btn.active[onclick="setFilter('DST')"] { background-color: rgba(120, 113, 108, 0.15); color: #d6d3d1; border-color: rgba(120, 113, 108, 0.4); }
        .tab-btn.active[onclick="setFilter('DRAFTED')"] { background-color: rgba(113, 113, 122, 0.2); color: #f4f4f5; border-color: rgba(113, 113, 122, 0.4); }

        /* Table Stylings */
        table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 0.85rem; }
        th { 
            background: var(--bg); padding: 12px 10px; font-weight: 600; 
            border-bottom: 1px solid var(--border-highlight); color: var(--text-muted); 
            text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px;
        }
        td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }

        .sortable-th { cursor: pointer; user-select: none; transition: color 0.15s; }
        .sortable-th:hover { color: var(--text); }
        .sort-indicator { font-size: 0.65rem; margin-left: 2px; color: var(--primary); }

        /* Row hover — an inset box-shadow overlay rather than a background
           swap, so it layers on top of (instead of replacing) the existing
           position-tinted / drafted-me row colors below. */
        tbody tr:not(.tier-divider-row):hover td {
            box-shadow: inset 0 0 0 9999px var(--row-hover-overlay);
        }

        /* Subtle Translucent Row Backgrounds for Dark Mode */
        /* Enhanced Translucent Row Backgrounds for Dark Mode */
        .pos-QB td { background-color: rgba(225, 29, 72, 0.10); }
        .pos-RB td { background-color: rgba(34, 197, 94, 0.10); }
        .pos-WR td { background-color: rgba(59, 130, 246, 0.10); }
        .pos-TE td { background-color: rgba(245, 158, 11, 0.10); }
        .pos-K td  { background-color: rgba(168, 85, 247, 0.10); }
        .pos-DST td{ background-color: rgba(120, 113, 108, 0.10); }
        
        
        .drafted-other td { opacity: 0.25; filter: grayscale(100%); }
        .drafted-me td { background-color: rgba(139, 92, 246, 0.15) !important; color: #fff; border-bottom-color: rgba(139, 92, 246, 0.3); }

        .action-flex { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
        th.action-col { text-align: right; }
        td.action-col { text-align: right; }
        
        .star-btn {
            background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); 
            font-size: 1rem; cursor: pointer; border-radius: 6px; padding: 2px 8px; transition: all 0.2s;
        }
        .star-btn:hover { color: #fbbf24; border-color: #fbbf24; }
        .star-btn.active { color: #fbbf24; border-color: #fbbf24; background: rgba(251, 191, 36, 0.1); }

        /* Inline star shown before a starred player's name in the table */
        .icon-star-inline { color: #fbbf24; margin-right: 1px; }

        .draft-btn { 
            padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg);
            color: var(--text); font-weight: 600; cursor: pointer; font-size: 0.75rem; transition: all 0.2s;
        }
        .draft-btn.mine:hover { background: rgba(139, 92, 246, 0.15); border-color: var(--primary); color: var(--primary); }
        .draft-btn.mine.active { background: var(--primary); color: white; border-color: var(--primary); }
        .draft-btn.other:hover { background: var(--val-red-bg); border-color: #ef4444; color: #ef4444; }
        .draft-btn.other.active { background: #ef4444; color: white; border-color: #ef4444; }

        .edge-badge {
            background: var(--border-highlight); color: var(--text); padding: 4px 8px; border-radius: 6px;
            font-size: 0.85rem; font-weight: 700; border: 1px solid var(--border);
            cursor: pointer; transition: all 0.15s;
        }
        .edge-badge:hover { border-color: var(--primary); color: var(--primary); background: var(--accent-glow); }

        /* Edge Score Breakdown Modal */
        .edge-modal-overlay {
            display: none;
            position: fixed; inset: 0; z-index: 1000;
            background: rgba(0, 0, 0, 0.55);
            align-items: center; justify-content: center;
        }
        .edge-modal-overlay.open { display: flex; }

        .edge-modal {
            width: 100%; max-width: 380px; margin: 16px;
            background: var(--surface); border: 1px solid var(--border);
            border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,0.4);
            overflow: hidden;
        }

        .edge-modal-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 16px 18px; border-bottom: 1px solid var(--border);
        }
        .edge-modal-header h3 { margin: 0; font-size: 1rem; color: var(--text); }

        .edge-modal-close {
            background: none; border: none; color: var(--text-muted); font-size: 1rem;
            cursor: pointer; padding: 2px 6px; border-radius: 6px; transition: all 0.15s;
        }
        .edge-modal-close:hover { color: var(--text); background: var(--surface-hover); }

        .edge-modal-body { padding: 8px 18px 18px; }

        .edge-breakdown-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 8px 0; border-bottom: 1px solid var(--border);
            font-size: 0.85rem; color: var(--text);
        }
        .edge-breakdown-row:last-child { border-bottom: none; }
        .edge-breakdown-label { color: var(--text-muted); }
        .edge-breakdown-hint { font-size: 0.75rem; opacity: 0.7; }
        .edge-breakdown-value { font-weight: 600; font-variant-numeric: tabular-nums; }

        .edge-breakdown-subtotal {
            font-weight: 600; border-top: 1px dashed var(--border-highlight); margin-top: 2px;
        }
        .edge-breakdown-subtotal .edge-breakdown-label,
        .edge-breakdown-subtotal .edge-breakdown-value { color: var(--text); }

        .edge-breakdown-hint-row { opacity: 0.75; font-size: 0.78rem; }

        .edge-breakdown-final {
            margin-top: 6px; padding-top: 12px; border-top: 2px solid var(--primary);
        }
        .edge-breakdown-final .edge-breakdown-label { color: var(--text); font-weight: 700; }
        .edge-breakdown-final .edge-breakdown-value { color: var(--primary); font-size: 1.05rem; font-weight: 800; }
        .adp-text { color: var(--text-muted); font-size: 0.85rem; font-weight: 500; }

        .value-badge {
            padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 700;
            display: inline-block; min-width: 32px; text-align: center; border: 1px solid transparent;
            box-shadow: 0 1px 2px rgba(0,0,0,0.18);
        }
        /* Use dedicated --badge-* colors (not the --val-*-bg row-tint vars)
           so the badge stays visually distinct even on a same-hued position
           row — e.g. a green "value-good" badge on a green-tinted RB row. */
        .value-good { background: var(--badge-good-bg); color: var(--badge-good-txt); border-color: var(--badge-good-border); }
        .value-bad  { background: var(--badge-bad-bg); color: var(--badge-bad-txt); border-color: var(--badge-bad-border); }
        .value-mixed { background: var(--badge-mixed-bg); color: var(--badge-mixed-txt); border-color: var(--badge-mixed-border); }
        .value-neutral { background: var(--bg); color: var(--text-muted); border-color: var(--border); }
        .value-none { background: transparent; color: var(--border); }

        /* Team & Bye Week Styling */
        .team-text {
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--text-muted);
            margin-left: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .bye-text { font-size: 0.72rem; font-weight: 500; color: var(--text-muted); margin-left: 6px; }
        .bye-warning { 
            font-size: 0.72rem; font-weight: 700; color: #fca5a5; 
            background: rgba(239, 68, 68, 0.2); padding: 2px 6px; border-radius: 4px; 
            margin-left: 6px; border: 1px solid rgba(239, 68, 68, 0.4); 
        }

        /* Injury / Suspension Flag Styling (shown right after bye week) */
        .injury-flag {
            font-size: 0.72rem; font-weight: 700; color: #fca5a5;
            background: rgba(239, 68, 68, 0.2); padding: 2px 6px; border-radius: 4px;
            margin-left: 6px; border: 1px solid rgba(239, 68, 68, 0.4);
            display: inline-block; vertical-align: middle;
        }

        /* Synergy Badges (Handcuff / Stack) */
        .synergy-badge {
            font-size: 0.70rem; font-weight: 700; padding: 2px 6px; border-radius: 4px;
            margin-left: 6px; display: inline-block; vertical-align: middle;
        }
        .badge-handcuff { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
        .badge-stack { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }

        /* Top Rookie -- yellow so it reads as "hype," distinct enough from
           the more orange-toned handcuff/bye-warning amber (#fbbf24) it can
           sit next to. */
        .top-rookie-badge {
            font-size: 0.70rem; font-weight: 700; padding: 2px 6px; border-radius: 4px;
            margin-left: 6px; display: inline-block; vertical-align: middle;
            background: rgba(250, 204, 21, 0.2); color: #fde047; border: 1px solid rgba(250, 204, 21, 0.4);
        }

        /* Tier Styling */
        .tier-badge {
            font-size: 0.65rem;
            font-weight: 800;
            color: var(--bg);
            background: var(--text-muted);
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 6px;
            display: inline-block;
            vertical-align: middle;
        }
        
        .tier-divider-row td {
            padding: 16px 8px 8px 8px !important;
            background-color: transparent !important;
            border-bottom: none !important;
        }
        
        .tier-divider {
            display: flex;
            align-items: center;
            text-align: center;
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 1px;
            text-transform: uppercase;
        }
        .tier-divider::before, .tier-divider::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid var(--border-highlight);
        }
        .tier-divider span {
            padding: 4px 16px;
            background: var(--bg);
            color: var(--text-muted);
            border: 1px solid var(--border-highlight);
            border-radius: 20px;
            font-size: 0.72rem;
            margin: 0 15px;
        }

        /* Nuvio Wiki Styled FAQ Panel */
        .faq-toggle-btn {
            background: var(--bg); border: 1px solid var(--border); color: var(--text);
            padding: 8px 16px; border-radius: 8px; font-size: 0.8rem; font-weight: 600;
            cursor: pointer; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
            transition: all 0.2s;
        }
        .faq-toggle-btn:hover { background: var(--surface-hover); }
        .faq-panel {
            display: none; 
            margin-bottom: 24px;
        }
        .faq-panel.open { display: block; }
        .faq-grid { 
            display: grid; 
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
            gap: 20px; 
        }
        /* The Glassy Card Look */
        .faq-card { 
            background: linear-gradient(160deg, rgba(39, 39, 42, 0.4) 0%, rgba(24, 24, 27, 0.8) 100%);
            border: 1px solid rgba(255, 255, 255, 0.05); 
            border-top: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px; 
            padding: 22px; 
            box-shadow: 0 8px 24px rgba(0,0,0,0.4);
            backdrop-filter: blur(8px);
            transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
        }
        .faq-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 32px rgba(0,0,0,0.6);
            border-color: rgba(255, 255, 255, 0.15);
        }
        .faq-card h4 { 
            margin: 0 0 10px 0; 
            font-size: 1rem; 
            color: var(--text); 
            display: flex;
            align-items: center;
            gap: 8px;
        }
        /* Nuvio Accents on Headers */
        .faq-card.edge h4 { color: #a855f7; }
        .faq-card.rank h4 { color: #06b6d4; }
        .faq-card.adp h4 { color: #3b82f6; }
        .faq-card.val h4 { color: #22c55e; }
        .faq-card.tier h4 { color: #f59e0b; }
        
        .faq-card p { margin: 0; font-size: 0.85rem; line-height: 1.6; color: var(--text-muted); }

        @media (max-width: 1024px) {
            .layout-container { grid-template-columns: 1fr; }
            .header { grid-template-columns: 1fr; }
            .header-brand { grid-column: 1; }
            .sidebar { position: static; margin-bottom: 20px; }

            /* Reorder for mobile: Settings first, then the Live Draft
               Sync/My Team sidebar, then the player board -- desktop keeps
               the sidebar as its own left column with settings/board
               stacked to the right, but that grouping doesn't match what's
               actually useful to see first on a phone. .main-content has no
               styling of its own (just a grid-column wrapper around the
               settings form and the board panel), so display:contents drops
               it from the box tree entirely and promotes its two children
               to be direct grid items alongside .sidebar -- only then can
               `order` interleave all three instead of the sidebar's whole
               block rendering before or after main-content's block intact. */
            .main-content { display: contents; }
            /* min-width: 0 has to move down onto the panels themselves now --
               .main-content's own min-width: 0 (further up) no longer applies
               to anything once it's display: contents, since it's no longer
               a real box its former children can inherit sizing from. */
            .form-panel, .results-panel { min-width: 0; }
            .form-panel { order: 1; }
            .sidebar { order: 2; }
            .results-panel { order: 3; }
        }

        /* Table stays a normal (non-squished) table but scrolls horizontally
           inside its own box instead of overflowing the page or wrapping
           every cell onto multiple lines. Kept unconditional (not just
           inside a mobile media query) since it's harmless at any width --
           it simply never triggers a scrollbar once everything fits. */
        .table-scroll {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        /* ===================== PHONE-WIDTH LAYOUT ===================== */
        @media (max-width: 640px) {
            body { padding: 10px; }

            /* The two fixed corner buttons (coffee support + theme toggle)
               sit at top:18 and would otherwise overlap the centered header
               title once the title's own font shrinks less than the
               available width -- shrinking the coffee button down to an
               icon-only circle (matching the theme toggle) and giving the
               header some breathing room below both fixes it. */
            .coffee-btn {
                right: 62px;
                width: 38px;
                height: 38px;
                padding: 0;
                justify-content: center;
                border-radius: 50%;
            }
            .coffee-btn-label { display: none; }
            .header { padding-top: 60px; margin-bottom: 16px; }
            .header h1 { font-size: 1.4rem; }
            .header-hq-badge { font-size: 0.68rem; padding: 1px 9px; margin-left: 6px; }
            .data-status-pill { font-size: 0.7rem; padding: 4px 10px; white-space: normal; text-align: center; }
            .backtest-pill { font-size: 0.7rem; padding: 4px 10px; white-space: normal; text-align: center; }
            .backtest-stat-row { flex-direction: column; }

            .sidebar { padding: 14px; }

            /* Scoring/roster settings form: let inputs shrink and rows sit
               closer together rather than wrapping into a huge stack of
               single-column rows. */
            .form-row { gap: 8px; }
            .input-group input[type="number"], .input-group select { width: 48px; font-size: 0.8rem; padding: 6px 6px; }
            label { font-size: 0.68rem; margin-bottom: 4px; }
            .panel { padding: 14px 14px; }

            .table-action-bar { gap: 8px; }
            .action-bar-right { flex-wrap: wrap; width: 100%; }
            .search-input-wrapper { flex: 1 1 140px; }
            .search-input { width: 100%; }
            .tabs { gap: 6px; }
            .tab-btn { padding: 5px 11px; font-size: 0.75rem; }

            /* Table itself: tighten padding/font so more columns fit before
               the scroll container kicks in, and drop the ADP column --
               the Value badge already reflects ADP vs. current pick, so
               losing the raw number here is a reasonable trade for not
               having to scroll sideways to see the Action buttons. */
            table { font-size: 0.78rem; }
            th, td { padding: 8px 6px; }
            .adp-col { display: none; }
            .draft-btn { padding: 4px 8px; font-size: 0.72rem; }
            .action-flex { gap: 4px; }

            /* Mine/Taken are the buttons actually tapped during a live
               draft -- pin them to the right edge of the scrolling table so
               they're always reachable without having to scroll sideways
               past Edge Score/Value first. The row's tinted background
               (.pos-QB td etc.) is only 10-15% opaque by design (meant as a
               subtle wash), which turns out to be exactly the problem once
               this cell is pinned via position: sticky -- whatever column
               scrolls underneath (most noticeably the colorful Value badge)
               shows straight through that translucency, making Mine/Taken
               hard to read. Force a fully opaque backdrop here specifically
               (the !important matches .drafted-me td's own !important, which
               would otherwise still win and reintroduce the see-through
               tint for your own drafted picks). */
            td.action-col {
                background-color: var(--surface) !important;
            }

            .action-col {
                position: sticky;
                right: 0;
                z-index: 2;
                box-shadow: -6px 0 8px -6px rgba(0, 0, 0, 0.5);
            }

            .faq-grid { grid-template-columns: 1fr; gap: 12px; }
        }
        /* ================================================================= */