        /* ═══════════════════════════════════════════════════════════════
           LOCKER ROOM DESIGN SYSTEM — mirrored from style.css
           ═══════════════════════════════════════════════════════════════ */
        @import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&family=Oswald:wght@500;700&family=Inter:wght@400;500;600;800&display=swap');

        :root {
            /* Stadium palette — exact match to style.css */
            --night-sky: #020617;
            --bg-dark: #020617;
            --bg-panel: #020617;
            --floodlight: #38bdf8;
            --turf: #10b981;
            --clay: #f97316;
            --accent-gold: #fbbf24;
            --accent-primary: #10b981;
            --accent-secondary: #38bdf8;
            --accent-danger: #ef4444;
            --accent-purple: #8b5cf6;
            --accent-blue: #38bdf8;
            /* Glass surfaces */
            --glass-surf: rgba(15, 23, 42, 0.85);
            --glass-border: rgba(255, 255, 255, 0.12);
            --glass-highlight: rgba(255, 255, 255, 0.05);
            --bg-card: rgba(255, 255, 255, 0.05);
            --border-light: rgba(255, 255, 255, 0.12);
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
        }

        * {
            box-sizing: border-box;
            scrollbar-width: none;
            /* Firefox */
        }

        ::-webkit-scrollbar {
            display: none;
            /* Safari and Chrome */
        }

        body {
            margin: 0;
            background: radial-gradient(circle at 50% -10%, #172554 0%, var(--night-sky) 60%);
            background-attachment: fixed;
            color: var(--text-main);
            font-family: 'Manrope', 'Inter', sans-serif;
            -webkit-font-smoothing: antialiased;
            min-height: 100vh;
            overflow-x: hidden;
            display: flex;
            justify-content: center;
            align-items: flex-start;
        }

        .app-container {
            width: 100%;
            max-width: 520px; /* matches Glass Hub */
            margin: 0 auto;
            background: transparent;
            border-radius: 0;
            border: none;
            padding: 20px;
            box-sizing: border-box;
        }

        /* ── TYPOGRAPHY ─────────────────────────────────────────────── */
        h1,
        h2,
        h3 {
            font-family: 'Oswald', sans-serif;
            text-transform: uppercase;
            margin-top: 0;
            color: var(--text-main);
        }

        /* ── BUTTONS ─────────────────────────────────────────────────── */
        .btn-action {
            background: rgba(56, 189, 248, 0.12);
            color: white;
            border: 1px solid rgba(56, 189, 248, 0.35);
            padding: 10px 18px;
            border-radius: 10px;
            font-family: 'Oswald', sans-serif;
            font-weight: 600;
            font-size: 13px;
            letter-spacing: 0.5px;
            cursor: pointer;
            text-transform: uppercase;
            transition: all 0.2s;
        }

        .btn-action:hover {
            background: rgba(56, 189, 248, 0.22);
            border-color: rgba(56, 189, 248, 0.55);
            color: white;
            transform: translateY(-1px);
        }

        .btn-action:active {
            transform: scale(0.98);
        }

        .btn-action:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            transform: none;
        }

        .btn-secondary {
            background: rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.7);
            border: 1px solid var(--glass-border);
            padding: 10px 16px;
            border-radius: 10px;
            font-family: 'Oswald', sans-serif;
            font-size: 12px;
            letter-spacing: 0.5px;
            cursor: pointer;
            transition: all 0.2s;
            text-transform: uppercase;
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.10);
            color: white;
        }

        .btn-xs {
            font-size: 10px;
            padding: 5px 10px;
            border-radius: 6px;
            border: 1px solid var(--glass-border);
            background: rgba(255, 255, 255, 0.04);
            color: rgba(255, 255, 255, 0.7);
            cursor: pointer;
            font-weight: 700;
            transition: all 0.2s;
        }

        .btn-xs:hover {
            background: rgba(255, 255, 255, 0.10);
            color: white;
        }

        .btn-admin {
            background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
            color: white;
            border: none;
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
        }

        /* ── INPUTS ──────────────────────────────────────────────────── */
        .modern-input,
        select,
        input[type="text"],
        input[type="date"],
        input[type="time"],
        input[type="number"] {
            width: 100%;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid var(--glass-border);
            color: var(--text-main);
            padding: 10px 12px;
            border-radius: 10px;
            font-family: 'Manrope', 'Inter', sans-serif;
            font-size: 13px;
            transition: border-color 0.2s;
            outline: none;
        }

        .modern-input:focus,
        select:focus,
        input:focus {
            border-color: var(--accent-secondary);
            box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
        }

        /* ── CARDS ───────────────────────────────────────────────────── */
        .card {
            background: var(--bg-card);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            padding: 18px;
            margin-bottom: 16px;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
        }

        .ladder-setup-card {
            background: linear-gradient(135deg, rgba(56, 189, 248, 0.07) 0%, rgba(16, 185, 129, 0.04) 100%);
            border: 1px solid rgba(56, 189, 248, 0.3);
            padding: 20px;
            border-radius: 16px;
            margin-bottom: 20px;
            box-shadow: 0 0 20px rgba(56, 189, 248, 0.08);
        }

        .div-builder-row {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--glass-border);
            border-radius: 12px;
            padding: 14px;
            margin-bottom: 10px;
        }

        .div-header {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            font-weight: 800;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 12px;
            text-transform: uppercase;
            align-items: center;
            font-family: 'Oswald', sans-serif;
            letter-spacing: 0.5px;
        }

        .div-player-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 8px;
        }

        .season-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            background: linear-gradient(90deg, rgba(56, 189, 248, 0.10) 0%, transparent 100%);
            padding: 16px 18px;
            border-radius: 14px;
            border-left: 3px solid var(--accent-secondary);
        }

        .ladder-match-card {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--glass-border);
            border-radius: 12px;
            padding: 14px;
            margin-bottom: 10px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            transition: border-color 0.2s;
        }

        .ladder-match-card:hover {
            border-color: rgba(56, 189, 248, 0.3);
        }

        .match-row-main {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
        }

        .match-row-controls {
            display: flex;
            justify-content: center;
            gap: 10px;
            align-items: center;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            padding-top: 10px;
        }

        .ladder-team {
            font-size: 13px;
            font-weight: 700;
            color: white;
            flex: 1;
            line-height: 1.4;
        }

        .ladder-score-group {
            display: flex;
            gap: 5px;
            align-items: center;
            justify-content: center;
        }

        .ladder-score-input-premium {
            width: 44px !important;
            height: 50px !important;
            padding: 0 !important;
            text-align: center;
            font-size: 26px !important;
            font-weight: 900;
            color: white;
            border-radius: 10px;
            outline: none;
            font-family: 'Oswald', sans-serif;
            box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
            transition: 0.2s;
        }

        .ladder-score-input-premium:focus {
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), inset 0 2px 8px rgba(0, 0, 0, 0.4);
        }

        .ladder-score-input {
            width: 36px;
            height: 36px;
            text-align: center;
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid var(--glass-border);
            color: white;
            border-radius: 8px;
            font-weight: 800;
            font-size: 14px;
            transition: 0.2s;
        }

        .ladder-score-input:focus {
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
            outline: none;
        }

        .ladder-score-input:disabled {
            border-color: transparent;
            color: var(--accent-primary);
            background: rgba(16, 185, 129, 0.12);
        }

        /* ── RANK TAGS ───────────────────────────────────────────────── */
        .rank-tag {
            font-size: 9px;
            font-weight: 800;
            padding: 2px 7px;
            border-radius: 5px;
            text-transform: uppercase;
            display: inline-block;
            letter-spacing: 0.5px;
        }

        .tag-up {
            color: #022c22;
            background: var(--accent-primary);
        }

        .tag-down {
            color: white;
            background: var(--accent-danger);
        }

        /* ── TABLE ───────────────────────────────────────────────────── */
        .kotc-table {
            width: 100%;
            border-collapse: collapse;
        }

        .kotc-table td {
            padding: 8px 10px;
            border-bottom: 1px solid var(--glass-border);
            font-size: 13px;
            color: var(--text-muted);
        }

        .kotc-table tr:first-child td {
            color: rgba(255, 255, 255, 0.55);
            font-weight: 800;
            text-transform: uppercase;
            font-size: 10px;
            letter-spacing: 0.8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        }

        .kotc-val-pos {
            color: var(--accent-primary);
            font-weight: 700;
        }

        .kotc-val-neg {
            color: var(--accent-danger);
            font-weight: 700;
        }

        /* ── CHAT ICON BUTTON ─────────────────────────────────────────── */
        .div-chat-btn {
            position: relative;
            background: rgba(56, 189, 248, 0.08);
            border: 1px solid rgba(56, 189, 248, 0.28);
            border-radius: 8px;
            width: 30px;
            height: 30px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .div-chat-btn:hover {
            background: rgba(56, 189, 248, 0.18);
            border-color: rgba(56, 189, 248, 0.5);
            transform: translateY(-1px);
        }

        .div-chat-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--accent-danger);
            color: white;
            font-size: 9px;
            font-weight: 800;
            min-width: 16px;
            height: 16px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 3px;
            line-height: 1;
            border: 1px solid var(--bg-dark);
        }

        /* ── CHAT DRAWER ─────────────────────────────────────────────────── */
        .chat-drawer-overlay {
            position: fixed;
            inset: 0;
            z-index: 3000;
            background: rgba(2, 6, 23, 0.5);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            display: none;
            animation: chatFadeIn 0.2s ease both;
        }

        @keyframes chatFadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .chat-drawer {
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            width: 320px;
            max-width: 92vw;
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(2, 6, 23, 1) 100%);
            border-left: 1px solid rgba(56, 189, 248, 0.2);
            display: flex;
            flex-direction: column;
            animation: drawerSlideIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
        }

        @keyframes drawerSlideIn {
            from {
                transform: translateX(100%);
            }

            to {
                transform: translateX(0);
            }
        }

        .chat-drawer-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.07);
            background: rgba(56, 189, 248, 0.05);
            flex-shrink: 0;
        }

        .chat-drawer-title {
            font-family: 'Oswald', sans-serif;
            font-size: 13px;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.9);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .chat-drawer-close {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            cursor: pointer;
            color: var(--text-muted);
            font-size: 13px;
            transition: all 0.2s;
        }

        .chat-drawer-close:hover {
            background: rgba(255, 255, 255, 0.12);
            color: white;
        }

        .chat-drawer-messages {
            flex: 1;
            overflow-y: auto;
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .chat-drawer-messages::-webkit-scrollbar {
            width: 4px;
        }

        .chat-drawer-messages::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 4px;
        }

        .chat-msg-wrapper {
            display: flex;
            width: 100%;
            margin-bottom: 6px;
        }
        .chat-msg-wrapper.me {
            justify-content: flex-end;
        }
        .chat-msg-wrapper.other {
            justify-content: flex-start;
        }
        .chat-msg {
            max-width: 82%;
            background: rgba(255, 255, 255, 0.08);
            padding: 8px 12px;
            border-radius: 12px;
            border-bottom-left-radius: 2px;
            font-size: 13px;
            line-height: 1.45;
            border: 1px solid rgba(255, 255, 255, 0.04);
            box-shadow: 0 2px 5px rgba(0,0,0,0.15);
            word-break: break-word;
            color: rgba(255, 255, 255, 0.95);
        }

        .chat-msg b {
            color: var(--accent-secondary, #38bdf8);
            font-size: 10.5px;
            display: block;
            margin-bottom: 3px;
            font-weight: 700;
            letter-spacing: 0.3px;
        }

        .chat-msg.chat-msg-me {
            background: #2563eb;
            border-color: #1d4ed8;
            border-bottom-left-radius: 12px;
            border-bottom-right-radius: 2px;
            color: #fff;
        }

        .chat-msg.chat-msg-me b {
            display: none;
        }

        .chat-drawer-input-row {
            display: flex;
            gap: 8px;
            padding: 12px;
            background: rgba(255, 255, 255, 0.02);
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            flex-shrink: 0;
        }

        .chat-drawer-input {
            flex: 1;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: white;
            padding: 9px 12px;
            border-radius: 10px;
            font-family: 'Manrope', 'Inter', sans-serif;
            font-size: 13px;
            outline: none;
            transition: border-color 0.2s;
        }

        .chat-drawer-input:focus {
            border-color: var(--accent-secondary);
            box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
        }

        .chat-drawer-input::placeholder {
            color: rgba(255, 255, 255, 0.3);
        }

        .chat-send-btn {
            background: linear-gradient(135deg, #38bdf8, #0ea5e9);
            border: none;
            color: white;
            font-weight: 800;
            font-family: 'Oswald', sans-serif;
            font-size: 12px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            padding: 9px 14px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 4px 10px rgba(56, 189, 248, 0.25);
            white-space: nowrap;
        }

        .chat-send-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 14px rgba(56, 189, 248, 0.38);
        }

        /* ── MODAL ───────────────────────────────────────────────────── */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.88);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 2000;
            display: none;
            align-items: center;
            justify-content: center;
            overflow-y: auto;
            padding: 20px;
        }

        .modal-content {
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.98));
            border: 1px solid var(--glass-border);
            width: 100%;
            max-width: 480px;
            border-radius: 20px;
            padding: 24px;
            margin: 40px auto;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
        }

        .modal-content::-webkit-scrollbar {
            width: 6px;
        }

        .modal-content::-webkit-scrollbar-track {
            background: transparent;
        }

        .modal-content::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.15);
            border-radius: 10px;
        }

        /* ── ADMIN TOOLS ─────────────────────────────────────────────── */
        .admin-tool-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 8px;
            margin-bottom: 18px;
        }

        .admin-tool-btn {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid var(--glass-border);
            border-radius: 10px;
            padding: 14px 8px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .admin-tool-btn:hover {
            background: rgba(56, 189, 248, 0.08);
            border-color: rgba(56, 189, 248, 0.3);
            transform: translateY(-1px);
        }

        .tool-icon {
            font-size: 20px;
            margin-bottom: 6px;
        }

        .tool-label {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Responsive scaling for mobile friendliness */
        @media (max-width: 768px) {
            .admin-tool-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 6px;
            }
            .admin-tool-btn {
                padding: 10px 6px;
            }
            .tool-icon {
                font-size: 18px;
                margin-bottom: 4px;
            }
            .tool-label {
                font-size: 10px;
                letter-spacing: 0.3px;
            }
        }

        @media (max-width: 480px) {
            .admin-tool-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 6px;
            }
            .admin-tool-btn {
                padding: 10px 4px;
            }
            .tool-icon {
                font-size: 16px;
                margin-bottom: 2px;
            }
            .tool-label {
                font-size: 9px;
                letter-spacing: 0.2px;
            }
        }

        /* Responsive overrides for Roster Board Mobile Friendliness */
        @media (max-width: 600px) {
            .division-header {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 8px !important;
            }
            .division-header-right {
                width: 100% !important;
                justify-content: space-between !important;
            }
            .division-averages {
                margin-top: 0 !important;
                margin-bottom: 10px !important;
            }
        }

        @media (max-width: 400px) {
            .division-player-grid {
                grid-template-columns: 1fr !important;
                gap: 8px !important;
            }
        }

        @media (max-width: 480px) {
            .draggable-player {
                padding: 6px 8px !important;
                gap: 8px !important;
                border-radius: 8px !important;
            }
        }

        /* ── DRAG & DROP ─────────────────────────────────────────────── */
        .draggable-player {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.12);
            padding: 8px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.9);
            cursor: grab;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 10px;
            user-select: none;
            box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.02);
        }

        .draggable-player:hover {
            background: rgba(255, 255, 255, 0.12);
            border-color: rgba(255, 255, 255, 0.32);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .draggable-player:active {
            cursor: grabbing;
        }

        .drag-over {
            background: rgba(16, 185, 129, 0.15) !important;
            border-color: var(--accent-primary) !important;
            border-style: dashed !important;
        }

        /* ── LEAGUE MODAL ────────────────────────────────────────────── */
        .league-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.85);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 9999;
            display: flex;
            justify-content: center;
            align-items: center;
            font-family: 'Manrope', sans-serif;
        }

        .league-modal {
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 1));
            border: 1px solid rgba(56, 189, 248, 0.3);
            border-radius: 16px;
            padding: 24px;
            width: 90%;
            max-width: 400px;
            color: white;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.08);
        }

        .league-modal h3 {
            margin-top: 0;
            color: rgba(255, 255, 255, 0.95);
            font-family: 'Oswald', sans-serif;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .league-modal select,
        .league-modal input {
            width: 100%;
            box-sizing: border-box;
            padding: 10px 12px;
            margin-top: 5px;
            margin-bottom: 14px;
            background: rgba(0, 0, 0, 0.4);
            color: white;
            border: 1px solid var(--glass-border);
            border-radius: 10px;
            font-family: 'Manrope', sans-serif;
            font-size: 13px;
            outline: none;
            transition: border-color 0.2s;
        }

        .league-modal select:focus,
        .league-modal input:focus {
            border-color: var(--accent-secondary);
            box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
        }

        .lm-btn-row {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 12px;
        }

        .lm-btn-cancel {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--glass-border);
            color: var(--text-muted);
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 700;
            font-size: 12px;
            transition: all 0.2s;
        }

        .lm-btn-cancel:hover {
            background: rgba(255, 255, 255, 0.1);
            color: white;
        }

        .lm-btn-save {
            background: linear-gradient(135deg, #38bdf8, #0ea5e9);
            border: none;
            color: white;
            font-weight: 800;
            padding: 8px 18px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            font-family: 'Oswald', sans-serif;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            transition: all 0.2s;
            box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
        }

        .lm-btn-save:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(56, 189, 248, 0.45);
        }

        /* ── PAGE ENTRY ANIMATION ─────────────────────────────────────── */
        @keyframes leagueFadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        html {
            background: #020617;
            /* prevents white flash on load */
        }

        .app-container {
            animation: leagueFadeIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
        }

        /* ── SCROLLBAR ───────────────────────────────────────────────── */
        ::-webkit-scrollbar {
            width: 5px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.12);
            border-radius: 10px;
        }

        /* ── UTILITIES ───────────────────────────────────────────────── */
        .text-glow {
            background: linear-gradient(90deg, #f8fafc, #cbd5e1);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        @keyframes pnSeatPulse {
            0% {
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
            }

            70% {
                box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
            }
        }

        @keyframes pnPopIn {
            0% {
                opacity: 0;
                transform: scale(0.95) translateY(-5px);
            }

            100% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        @keyframes spinOnce {
            0% {
                transform: rotate(0deg) scale(0.6);
                opacity: 0;
            }

            60% {
                transform: rotate(20deg) scale(1.15);
                opacity: 1;
            }

            80% {
                transform: rotate(-8deg) scale(1.05);
            }

            100% {
                transform: rotate(0deg) scale(1);
                opacity: 1;
            }
        }

        @media (max-width: 600px) {
            .app-container {
                padding: 12px 10px;
            }

            .ladder-score-input-premium {
                width: 38px !important;
                height: 44px !important;
                font-size: 22px !important;
            }

            .btn-action {
                padding: 8px 12px;
                font-size: 11px;
            }

            /* Matchmaker card internal padding */
            div[style*="padding:20px 20px 20px"] {
                padding: 16px 12px 16px !important;
            }
        }

        /* ── GUEST MODE RESPONSIVE SCALING ──────────────────────────────────
           Matches the Glass Hub container feel when the page is opened
           standalone (via QR link) on any mobile/tablet device.
           Applied by JS on body when isGuestMode === true.             */
        body.guest-mode {
            padding: 0;
            background: radial-gradient(circle at 50% -10%, #172554 0%, #020617 60%);
            background-attachment: fixed;
        }

        body.guest-mode .app-container {
            max-width: 520px;   /* matches Glass Hub inner panel width */
            padding: 16px 14px;
            margin: 0 auto;
        }

        /* Guest context header banner */
        .guest-context-banner {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(56,189,248,0.07);
            border: 1px solid rgba(56,189,248,0.18);
            border-radius: 12px;
            padding: 10px 14px;
            margin-bottom: 16px;
            font-size: 12px;
            color: rgba(255,255,255,0.6);
            line-height: 1.4;
        }

        .guest-context-banner strong {
            color: #38bdf8;
            font-weight: 800;
        }

        @media (max-width: 768px) {
            body.guest-mode .app-container {
                padding: 12px 10px;
                max-width: 100%;
            }

            .guest-context-banner {
                font-size: 11px;
                padding: 8px 12px;
            }
        }

        /* Registered Players Toggle Details */
        .registered-players-details summary::-webkit-details-marker {
            display: none;
        }
        .registered-players-details summary {
            list-style: none;
        }
        .registered-players-details[open] .toggle-arrow {
            transform: rotate(180deg);
        }

        /* Dynamic Header Actions Mobile Optimization */
        #league-header-actions {
            flex-wrap: nowrap !important;
            gap: 6px !important;
        }
        #league-header-actions .btn-action {
            flex: 1 1 0% !important;
            min-width: 0 !important;
            padding: 8px 4px !important;
            font-size: clamp(9px, 2.5vw, 11px) !important;
            white-space: nowrap !important;
            text-overflow: ellipsis !important;
            overflow: hidden !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 4px !important;
        }