        /* =========================================================
           FINAL GAME UI
           Authoritative styling for current game interface.
        ========================================================= */

        .game-section {
            margin-bottom: 24px;
            padding: 22px;
            border: 1px solid var(--border);
            border-radius: 20px;
            background: rgba(23,23,26,.92);
            backdrop-filter: blur(10px);
        }

        .game-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 18px;
        }

        .game-header .section-title {
            margin: 0;
        }

        .game-status {
            flex: 0 0 auto;
        }


        /* ---------------- EMPTY GAME ---------------- */

        .game-empty {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }

        .game-empty-text {
            color: var(--muted);
            font-size: .92rem;
        }


        /* ---------------- COMMON BUTTONS ---------------- */

        .game-button {
            min-height: 46px;
            padding: 0 18px;
            border-radius: 12px;
            background: var(--accent);
            color: #fff;
            font-weight: 750;
            cursor: pointer;
        }

        .game-button.secondary {
            background: var(--surface-3);
            color: var(--text);
        }


        /* ---------------- GAME TYPE ---------------- */

        .game-type-buttons {
            display: grid;
            grid-template-columns:
                repeat(2, minmax(0, 1fr));
            gap: 10px;
            width: 100%;
            margin-bottom: 20px;
        }

        .game-type-button {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 52px;
            padding: 0 16px;
            border: 1px solid var(--border);
            border-radius: 13px;
            background: var(--surface-2);
            color: var(--muted);
            font-size: 1rem;
            font-weight: 800;
            text-align: center;
            cursor: pointer;
        }

        .game-type-button.active {
            border-color: var(--accent);
            background: rgba(118,87,255,.16);
            color: #fff;
        }


        /* ---------------- ROUND SELECTOR ---------------- */

        .game-round-options {
            margin-bottom: 20px;
        }

        .game-round-options > .game-team-label {
            margin-bottom: 10px;
            text-align: center;
        }

        .game-round-buttons {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px;
        }

        .game-round-button {
            min-height: 40px;
            padding: 0 14px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--surface-2);
            color: var(--muted);
            font-weight: 700;
            cursor: pointer;
        }

        .game-round-button.active {
            border-color: var(--accent);
            background: rgba(118,87,255,.16);
            color: #fff;
        }

        #selected-rounds-status {
            margin-top: 10px;
            text-align: center;
        }


        /* ---------------- TEAM ENTRY ---------------- */

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

        .game-team-form {
            min-width: 0;
            padding: 15px;
            border: 1px solid var(--border);
            border-radius: 14px;
            background: var(--surface-2);
        }

        .game-team-form > .game-team-label {
            margin-bottom: 10px;
            text-align: center;
        }

        .game-player-input {
            display: block;
            width: 100%;
            height: 46px;
            margin-bottom: 8px;
            padding: 0 13px;
            border: 1px solid var(--border);
            border-radius: 11px;
            background: var(--surface);
            color: #fff;
            text-align: center;
        }

        .game-player-input:focus {
            border-color: var(--accent);
        }

        .game-form-actions {
            display: grid;
            grid-template-columns:
                repeat(2, minmax(0, 1fr));
            gap: 10px;
            margin-top: 16px;
        }

        .game-form-actions .game-button {
            width: 100%;
        }


        /* ---------------- ACTIVE MATCH ---------------- */

        .game-active {
            margin-top: 0;
            padding: 18px;
            border: 1px solid var(--border);
            border-radius: 16px;
            background: var(--surface-2);
        }

        .game-matchup {
            display: grid;
            grid-template-columns:
                minmax(0, 1fr) auto minmax(0, 1fr);
            align-items: center;
            gap: 14px;
            text-align: center;
        }

        .game-matchup > div {
            min-width: 0;
        }

        .game-team {
            color: var(--text);
            font-size: 1.08rem;
            font-weight: 800;
            line-height: 1.35;
            overflow-wrap: anywhere;
        }

        .game-vs {
            color: var(--muted);
            font-size: .72rem;
            font-weight: 850;
            letter-spacing: .12em;
        }

        .game-type {
            margin-top: 10px;
            text-align: center;
            color: var(--muted);
            font-size: .78rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .06em;
        }

        .game-score-status {
            margin-top: 8px;
            text-align: center;
            color: var(--muted);
            font-size: .82rem;
            font-weight: 650;
        }


        /* ---------------- SCORE ---------------- */

        .game-score {
            display: grid;
            grid-template-columns:
                minmax(0, 1fr) auto minmax(0, 1fr);
            align-items: stretch;
            gap: 10px;
            margin-top: 14px;
        }

        .game-score-button {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-width: 0;
            min-height: 108px;
            padding: 14px 10px;
            border: 1px solid var(--border);
            border-radius: 14px;
            background: var(--surface);
            color: var(--text);
            cursor: pointer;
        }

        .game-score-player {
            width: 100%;
            color: var(--muted);
            font-size: .82rem;
            font-weight: 700;
            line-height: 1.25;
            text-align: center;
            overflow-wrap: anywhere;
        }

        .game-score-number {
            font-size: 2.5rem;
            font-weight: 850;
            line-height: 1;
        }

        .game-score-divider {
            align-self: center;
            color: var(--muted);
            font-size: 1.4rem;
            font-weight: 700;
        }

        .game-actions {
            display: grid;
            grid-template-columns:
                repeat(2, minmax(0, 1fr));
            gap: 10px;
            margin-top: 14px;
        }

        .game-actions .game-button {
            width: 100%;
        }



        /* =========================================================
           FINAL GAME UI — MOBILE
        ========================================================= */

        @media (max-width: 700px) {

            .game-section {
                padding: 14px;
                border-radius: 16px;
            }

            .game-header {
                align-items: center;
                margin-bottom: 14px;
            }


            /* Empty state */

            .game-empty {
                display: grid;
                grid-template-columns: 1fr;
                gap: 10px;
                text-align: center;
            }

            .game-empty-text {
                padding: 2px 0;
            }

            .game-empty .game-button {
                width: 100%;
            }


            /* 1v1 / 2v2 */

            .game-type-buttons {
                gap: 8px;
                margin-bottom: 16px;
            }

            .game-type-button {
                min-height: 48px;
                padding: 0 10px;
                border-radius: 11px;
                font-size: .95rem;
                text-align: center;
                justify-content: center;
                align-items: center;
            }


            /* Rounds */

            .game-round-options {
                margin-bottom: 16px;
            }

            .game-round-buttons {
                display: grid;
                grid-template-columns:
                    repeat(3, minmax(0, 1fr));
                gap: 7px;
            }

            .game-round-button {
                width: 100%;
                min-height: 42px;
                padding: 0 6px;
                font-size: .82rem;
            }


            /* Player entry */

            .game-teams {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .game-team-form {
                padding: 13px;
            }

            .game-player-input {
                height: 46px;
                text-align: left;
            }


            /* Active matchup
               Team 1
                 VS
               Team 2
            */

            .game-active {
                padding: 14px;
            }

            .game-matchup {
                display: flex;
                flex-direction: column;
                align-items: stretch;
                gap: 5px;
                width: 100%;
            }

            .game-matchup > div:first-child {
                order: 1;
            }

            .game-matchup > .game-vs {
                order: 2;
            }

            .game-matchup > div:last-child {
                order: 3;
            }

            .game-team {
                width: 100%;
                padding: 7px 8px;
                font-size: 1.05rem;
                line-height: 1.3;
                text-align: center;
            }

            .game-vs {
                width: 100%;
                padding: 1px 0;
                text-align: center;
                font-size: .68rem;
            }

            .game-type {
                margin-top: 10px;
                text-align: center;
            }

            .game-score-status {
                margin-top: 5px;
            }


            /* Score remains side-by-side */

            .game-score {
                grid-template-columns:
                    minmax(0, 1fr)
                    18px
                    minmax(0, 1fr);
                gap: 6px;
                margin-top: 12px;
            }

            .game-score-button {
                min-height: 104px;
                padding: 11px 6px;
                border-radius: 12px;
            }

            .game-score-player {
                font-size: .76rem;
            }

            .game-score-number {
                font-size: 2.55rem;
            }

            .game-score-divider {
                font-size: 1rem;
                text-align: center;
            }


            /* Actions */

            .game-actions,
            .game-form-actions {
                display: grid;
                grid-template-columns:
                    repeat(2, minmax(0, 1fr));
                gap: 8px;
            }

            .game-actions .game-button,
            .game-form-actions .game-button {
                width: 100%;
                min-width: 0;
                padding: 0 8px;
                font-size: .86rem;
            }

        }


        @media (max-width: 380px) {

            .game-round-buttons {
                grid-template-columns:
                    repeat(2, minmax(0, 1fr));
            }

            .game-actions,
            .game-form-actions {
                grid-template-columns: 1fr;
            }
        }



