        :root {
            --bg: #0d0d10;
            --panel: #17171d;
            --panel-2: #20202a;
            --panel-3: #2a2a35;
            --text: #f5f5f7;
            --muted: #a4a4b0;
            --accent: #ffd43b;
            --accent-2: #ffb703;
            --danger: #ff5c5c;
            --good: #60d394;
            --border: #333341;
        }

        * { box-sizing: border-box; }

        html,
        body {
            height: 100%;
            overflow: hidden;
        }

        body {
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
            background: radial-gradient(circle at top, #22222c 0, var(--bg) 38%);
            color: var(--text);
        }

        .app {
            width: 100%;
            max-width: 100%;
            height: 100vh;
            min-height: 0;
            margin: 0 auto;
            padding: 12px;
            overflow-y: auto;
            overflow-x: hidden;
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 212, 59, 0.75) rgba(23, 23, 29, 0.95);
        }

        .app::-webkit-scrollbar { width: 10px; }

        .app::-webkit-scrollbar-track {
            background: rgba(23, 23, 29, 0.95);
            border-left: 1px solid var(--border);
        }

        .app::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, var(--accent), var(--accent-2));
            border-radius: 999px;
            border: 2px solid rgba(23, 23, 29, 0.95);
        }

        .app::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

        body.streamer-mode {
            height: auto;
            min-height: 100%;
            overflow: auto;
        }

        body.streamer-mode .app {
            max-width: 1280px;
            height: auto;
            min-height: 100vh;
            overflow: visible;
            padding: 16px;
        }

        .topbar {
            position: sticky;
            top: 0;
            z-index: 10;
            background: linear-gradient(to bottom, rgba(13, 13, 16, 0.98), rgba(13, 13, 16, 0.9));
            backdrop-filter: blur(8px);
            padding: 10px 0 12px;
        }

        .brand-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 10px;
        }

        .brand h1 {
            margin: 0;
            font-size: 24px;
            line-height: 1;
            color: var(--accent);
            letter-spacing: 0.4px;
        }

        .brand .subtitle {
            margin-top: 4px;
            color: var(--muted);
            font-size: 12px;
        }

        .points-pill {
            text-align: right;
            background: linear-gradient(135deg, #2b250c, #1b1b20);
            border: 1px solid rgba(255, 212, 59, 0.4);
            border-radius: 14px;
            padding: 9px 10px;
            min-width: 132px;
            box-shadow: 0 0 18px rgba(255, 212, 59, 0.08);
        }

        .points-main {
            color: var(--accent);
            font-size: 20px;
            font-weight: 800;
        }

        .points-label {
            color: var(--muted);
            font-size: 11px;
            margin-top: 2px;
        }

        .mode-pill {
            display: none;
            margin-left: 6px;
            color: #111;
            background: var(--accent);
            border-radius: 999px;
            padding: 3px 7px;
            font-size: 10px;
            font-weight: 900;
        }

        body.streamer-mode .mode-pill { display: inline-block; }

        .controls {
            display: grid;
            grid-template-columns: 150px 150px 1fr auto;
            gap: 8px;
            align-items: center;
            margin-bottom: 10px;
        }

        .search-wrap { position: relative; }

        .search-wrap span {
            position: absolute;
            left: 11px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--muted);
            font-size: 14px;
        }

        #searchInput,
        #viewerNameInput,
        #targetPlayerInput,
        .admin-input {
            width: 100%;
            background: var(--panel);
            color: var(--text);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 9px 10px;
            outline: none;
            font-size: 13px;
        }

        #viewerNameInput { font-size: 13px; border-radius: 12px; }
        #targetPlayerInput { font-size: 13px; border-radius: 12px; }
        #searchInput { padding-left: 32px; font-size: 14px; border-radius: 12px; }
        #searchInput:focus,
        #viewerNameInput:focus,
        #targetPlayerInput:focus,
        .admin-input:focus { border-color: rgba(255, 212, 59, 0.75); }

        select.admin-input,
        #targetPlayerInput {
            appearance: none;
            cursor: pointer;
            background-image:
                linear-gradient(45deg, transparent 50%, var(--accent) 50%),
                linear-gradient(135deg, var(--accent) 50%, transparent 50%);
            background-position:
                calc(100% - 17px) 50%,
                calc(100% - 11px) 50%;
            background-size: 6px 6px, 6px 6px;
            background-repeat: no-repeat;
            padding-right: 32px;
        }

        select.admin-input:disabled,
        #targetPlayerInput:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }

        button {
            border: none;
            border-radius: 10px;
            padding: 9px 10px;
            font-weight: 800;
            cursor: pointer;
            background: var(--accent);
            color: #111;
            transition: transform 0.08s ease, opacity 0.12s ease, background 0.12s ease;
        }

        button:hover:not(:disabled) {
            transform: translateY(-1px);
            background: var(--accent-2);
        }

        button:disabled { cursor: not-allowed; opacity: 0.45; }

        .secondary-button {
            background: var(--panel-3);
            color: var(--text);
            border: 1px solid var(--border);
        }

        .secondary-button:hover:not(:disabled) { background: #343443; }

        .twitch-identity-button {
            display: none;
            white-space: nowrap;
            font-size: 12px;
            padding-left: 9px;
            padding-right: 9px;
        }

        body.twitch-mode:not(.streamer-mode) .twitch-identity-button {
            display: block;
        }

        body.twitch-mode:not(.streamer-mode) .controls {
            grid-template-columns: 150px auto 150px 1fr auto;
        }

        body.twitch-mode:not(.streamer-mode) #viewerNameInput {
            opacity: 0.82;
        }

        .admin-panel {
            display: none;
            margin: 10px 0 0;
            padding: 10px;
            border: 1px solid rgba(255, 212, 59, 0.28);
            border-radius: 14px;
            background: rgba(23, 23, 29, 0.95);
        }

        body.streamer-mode .admin-panel { display: block; }

        .admin-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 8px;
        }

        .admin-collapse-button {
            padding: 6px 9px;
            font-size: 11px;
            min-width: 86px;
        }

        .admin-panel.collapsed .admin-panel-body {
            display: none;
        }

        .admin-panel.collapsed .admin-panel-header {
            margin-bottom: 0;
        }

        .admin-panel-title {
            color: var(--accent);
            font-weight: 900;
            margin-bottom: 8px;
            font-size: 13px;
        }

        .admin-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 8px;
            align-items: end;
        }

        .field label,
        .effect-admin label {
            display: block;
            color: var(--muted);
            font-size: 11px;
            font-weight: 800;
            margin-bottom: 4px;
        }

        .admin-note {
            color: var(--muted);
            font-size: 11px;
            margin-top: 8px;
            line-height: 1.35;
        }

        .admin-auth {
            display: grid;
            grid-template-columns: 1fr auto auto;
            gap: 8px;
            align-items: end;
            margin-bottom: 10px;
        }

        body.streamer-mode:not(.admin-unlocked) .admin-grid { display: none; }
        body.streamer-mode:not(.admin-unlocked) .admin-note.settings-note { display: none; }
        body.streamer-mode:not(.admin-unlocked) .session-admin,
        body.streamer-mode:not(.admin-unlocked) .gift-admin,
        body.streamer-mode:not(.admin-unlocked) .server-setup-admin { display: none; }

        .session-admin,
        .gift-admin,
        .server-setup-admin {
            margin: 10px 0;
            padding: 10px;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: rgba(32, 32, 42, 0.65);
        }

        .session-admin-row,
        .gift-admin-row {
            display: grid;
            grid-template-columns: 1fr auto auto;
            gap: 8px;
            align-items: end;
        }

        .gift-admin-row {
            grid-template-columns: 1fr 120px auto auto;
        }


        .server-setup-grid {
            display: grid;
            grid-template-columns: minmax(260px, 1fr) auto auto;
            gap: 8px;
            align-items: end;
        }

        .secret-input {
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 12px;
        }

        .config-field {
            margin-top: 8px;
        }

        .config-output {
            width: 100%;
            resize: vertical;
            min-height: 112px;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 12px;
            line-height: 1.35;
        }

        .danger-button {
            border-color: rgba(255, 90, 90, 0.45);
            color: #ffb3b3;
        }

        .session-summary {
            color: var(--muted);
            font-size: 12px;
            font-weight: 800;
            line-height: 1.35;
        }

        .session-status {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: -4px 0 12px;
            padding: 8px 10px;
            border-radius: 12px;
            background: rgba(23, 23, 29, 0.82);
            border: 1px solid var(--border);
            color: var(--muted);
            font-size: 12px;
            font-weight: 800;
        }

        .session-dot {
            width: 8px;
            height: 8px;
            flex: 0 0 auto;
            border-radius: 50%;
            background: var(--danger);
        }

        .session-status.active { border-color: rgba(96, 211, 148, 0.24); }
        .session-status.active .session-dot { background: var(--good); }
        .session-status.inactive { border-color: rgba(255, 92, 92, 0.25); }
        .session-status.inactive .session-dot { background: var(--danger); }

        .admin-lock-note {
            color: var(--muted);
            font-size: 11px;
            line-height: 1.35;
            margin: 6px 0 0;
        }

        body.admin-unlocked .admin-lock-note { color: var(--good); }

        .content-layout {
            display: grid;
            grid-template-columns: 155px 1fr;
            gap: 10px;
            align-items: start;
        }

        .category-nav {
            position: sticky;
            top: 118px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 8px;
            border-radius: 14px;
            background: rgba(23, 23, 29, 0.92);
            border: 1px solid var(--border);
        }

        .category-button {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
            border: 1px solid transparent;
            background: transparent;
            color: var(--text);
            border-radius: 10px;
            padding: 8px;
            font-size: 12px;
            font-weight: 900;
            text-align: left;
        }

        .category-button:hover:not(:disabled) { transform: none; background: var(--panel-2); }
        .category-button.active { background: var(--accent); color: #111; border-color: var(--accent); }

        .category-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
        .category-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .category-count {
            flex: 0 0 auto;
            min-width: 22px;
            padding: 2px 5px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            color: var(--muted);
            font-size: 10px;
            text-align: center;
        }
        .category-button.active .category-count { background: rgba(0, 0, 0, 0.16); color: #111; }

        .effects-panel { min-width: 0; }

        .status {
            display: flex;
            align-items: center;
            gap: 8px;
            min-height: 38px;
            margin: 10px 0 12px;
            padding: 9px 10px;
            border-radius: 12px;
            background: rgba(32, 32, 42, 0.88);
            border: 1px solid var(--border);
            color: #ddd;
            font-size: 13px;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            flex: 0 0 auto;
            border-radius: 50%;
            background: var(--good);
        }

        .status.error .status-dot { background: var(--danger); }

        .bridge-status {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: -4px 0 12px;
            padding: 8px 10px;
            border-radius: 12px;
            background: rgba(23, 23, 29, 0.82);
            border: 1px solid var(--border);
            color: var(--muted);
            font-size: 12px;
            font-weight: 800;
        }

        .bridge-dot {
            width: 8px;
            height: 8px;
            flex: 0 0 auto;
            border-radius: 50%;
            background: var(--danger);
        }

        .bridge-status.connected .bridge-dot { background: var(--good); }
        .bridge-status.busy .bridge-dot { background: #ffcc66; }
        .bridge-status.offline .bridge-dot { background: var(--danger); }
        .bridge-status.connected { border-color: rgba(96, 211, 148, 0.24); }
        .bridge-status.busy { border-color: rgba(255, 204, 102, 0.26); }
        .bridge-status.offline { border-color: rgba(255, 92, 92, 0.25); }

        .section-head {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            margin: 4px 2px 10px;
        }

        .section-title { font-size: 16px; font-weight: 900; color: var(--accent); }
        .section-count { color: var(--muted); font-size: 12px; }

        .effects-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
            padding-bottom: 18px;
        }

        .effect-card {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 10px;
            align-items: start;
            background: rgba(23, 23, 29, 0.96);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 11px;
        }

        .effect-card.ready { border-color: rgba(96, 211, 148, 0.35); }
        .effect-card.blocked { opacity: 0.72; }
        .effect-card.disabled-effect { opacity: 0.55; border-color: rgba(255, 92, 92, 0.25); }

        .effect-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
        .effect-icon {
            width: 30px;
            height: 30px;
            flex: 0 0 auto;
            display: grid;
            place-items: center;
            border-radius: 10px;
            background: var(--panel-2);
            border: 1px solid var(--border);
            font-size: 15px;
        }

        .effect-name { font-size: 14px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .effect-id { margin-top: 2px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        .effect-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
        .meta-pill {
            border-radius: 999px;
            padding: 4px 7px;
            background: var(--panel-2);
            color: var(--muted);
            border: 1px solid var(--border);
            font-size: 11px;
            font-weight: 800;
        }
        .meta-pill.good { color: var(--good); border-color: rgba(96, 211, 148, 0.32); }
        .meta-pill.warn { color: #ffcc66; border-color: rgba(255, 204, 102, 0.32); }
        .meta-pill.danger { color: var(--danger); border-color: rgba(255, 92, 92, 0.32); }

        .effect-actions { display: flex; flex-direction: column; gap: 6px; min-width: 86px; }
        .use-button, .toggle-button, .save-effect-button { width: 100%; min-width: 78px; }
        .toggle-button, .save-effect-button {
            background: var(--panel-3);
            color: var(--text);
            border: 1px solid var(--border);
            font-size: 11px;
            padding: 7px 8px;
        }
        .toggle-button.disable { color: #ffcc66; }
        .toggle-button.enable { color: var(--good); }
        .save-effect-button { color: var(--accent); }

        .effect-admin {
            display: none;
            grid-column: 1 / -1;
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid var(--border);
        }

        body.streamer-mode .effect-admin { display: block; }

        .effect-admin-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 8px;
            align-items: end;
        }

        .empty {
            padding: 24px 14px;
            text-align: center;
            color: var(--muted);
            background: var(--panel);
            border: 1px dashed var(--border);
            border-radius: 14px;
        }


        body.streamer-mode .topbar {
            border: 1px solid rgba(255, 212, 59, 0.12);
            border-radius: 16px;
            padding: 12px;
            margin-bottom: 12px;
        }

        body.streamer-mode .controls {
            grid-template-columns: 220px 1fr auto;
        }

        body.streamer-mode .content-layout {
            grid-template-columns: 190px 1fr;
            gap: 14px;
        }

        body.streamer-mode .category-nav {
            top: 150px;
        }

        body.streamer-mode .effects-grid {
            grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
        }

        body.streamer-mode .admin-auth {
            grid-template-columns: minmax(260px, 1fr) auto auto;
        }

        body.streamer-mode .session-admin-row {
            grid-template-columns: minmax(260px, 1fr) auto auto;
        }

        body.streamer-mode .gift-admin-row {
            grid-template-columns: minmax(260px, 1fr) 140px auto auto;
        }

        body.streamer-mode .server-setup-grid {
            grid-template-columns: minmax(280px, 1fr) auto auto;
        }

        body.streamer-mode .admin-grid {
            grid-template-columns: repeat(4, minmax(160px, 1fr));
        }

        body.streamer-mode #saveSettingsButton {
            grid-column: 1 / -1;
            justify-self: end;
            min-width: 160px;
        }

        @media (min-width: 800px) {
            .effects-grid { grid-template-columns: 1fr 1fr; }
        }

        @media (max-width: 620px) {
            .app { padding: 8px; }
            .brand h1 { font-size: 20px; }
            .points-pill { min-width: 108px; padding: 8px; }
            .content-layout { grid-template-columns: 112px 1fr; gap: 8px; }
            .category-nav { top: 112px; padding: 6px; }
            .category-button { padding: 7px 6px; font-size: 11px; }
            .category-count { display: none; }
            .effect-card { grid-template-columns: 1fr; }
            .effect-actions { width: 100%; }
            .admin-grid, .effect-admin-grid, .gift-admin-row, .session-admin-row, .server-setup-grid { grid-template-columns: 1fr; }
            body.twitch-mode:not(.streamer-mode) .controls { grid-template-columns: 1fr; }
            .admin-auth { grid-template-columns: 1fr; }
        }


/* Streamer dashboard fixes */
html.streamer-mode,
html.streamer-mode body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

html.streamer-mode .app {
    max-width: 1280px;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 16px;
}

body.streamer-mode .topbar {
    position: static;
}

body.streamer-mode .points-pill,
body.streamer-mode #viewerNameInput,
body.streamer-mode #resetButton {
    display: none;
}

body.streamer-mode .brand-row {
    justify-content: flex-start;
}

body.streamer-mode .controls {
    grid-template-columns: 1fr;
}

body.streamer-mode #targetPlayerInput {
    display: none;
}

body.streamer-mode .search-wrap {
    width: 100%;
}

body.streamer-mode .effect-card.no-actions {
    grid-template-columns: 1fr;
}

body.streamer-mode .effect-card.no-actions .effect-admin {
    grid-column: 1 / -1;
}


/* Compact target player dropdown: show just the player name and prevent long names from overflowing. */
.controls,
.search-wrap {
    min-width: 0;
}

#targetPlayerInput {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.twitch-mode:not(.streamer-mode) .controls {
    grid-template-columns: minmax(0, 145px) auto minmax(0, 135px) minmax(0, 1fr) auto;
}

@media (max-width: 620px) {
    body.twitch-mode:not(.streamer-mode) .controls {
        grid-template-columns: 1fr;
    }
}

/* Viewer top-row layout cleanup: bigger search, slightly wider target, compact reset. */
body.twitch-mode:not(.streamer-mode) .controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

body.twitch-mode:not(.streamer-mode) #viewerNameInput {
    flex: 0 0 165px;
    min-width: 0;
}

body.twitch-mode:not(.streamer-mode) #targetPlayerInput {
    flex: 0 0 180px;
    min-width: 0;
}

body.twitch-mode:not(.streamer-mode) .search-wrap {
    flex: 1 1 360px;
    min-width: 220px;
}

body.twitch-mode:not(.streamer-mode) #resetButton {
    flex: 0 0 76px;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
}

body.twitch-mode:not(.streamer-mode) .twitch-identity-button {
    flex: 0 0 auto;
}

@media (max-width: 620px) {
    body.twitch-mode:not(.streamer-mode) .controls {
        display: grid;
        grid-template-columns: 1fr;
    }

    body.twitch-mode:not(.streamer-mode) #viewerNameInput,
    body.twitch-mode:not(.streamer-mode) #targetPlayerInput,
    body.twitch-mode:not(.streamer-mode) .search-wrap,
    body.twitch-mode:not(.streamer-mode) #resetButton {
        width: 100%;
        flex: none;
    }
}


/* Identity-locked viewer controls: no custom viewer-name input and no identity prompt button. */
.viewer-identity-pill {
    width: 100%;
    min-width: 0;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.twitch-identity-button {
    display: none !important;
}

body.twitch-mode:not(.streamer-mode) .controls {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

body.twitch-mode:not(.streamer-mode) #viewerNameInput {
    flex: 0 0 190px;
    min-width: 0;
}

body.twitch-mode:not(.streamer-mode) #targetPlayerInput {
    flex: 0 0 180px;
    min-width: 0;
}

body.twitch-mode:not(.streamer-mode) .search-wrap {
    flex: 1 1 360px;
    min-width: 220px;
}

body.twitch-mode:not(.streamer-mode) #resetButton {
    flex: 0 0 76px;
    min-width: 0;
}

@media (max-width: 620px) {
    body.twitch-mode:not(.streamer-mode) .controls {
        display: grid;
        grid-template-columns: 1fr;
    }

    body.twitch-mode:not(.streamer-mode) #viewerNameInput,
    body.twitch-mode:not(.streamer-mode) #targetPlayerInput,
    body.twitch-mode:not(.streamer-mode) .search-wrap,
    body.twitch-mode:not(.streamer-mode) #resetButton {
        width: 100%;
        flex: none;
    }
}


/* Phase 5: Twitch Hosted Test view split. */
body.config-mode .points-pill,
body.config-mode .controls,
body.config-mode .content-layout,
body.config-mode #sessionStatus {
    display: none !important;
}

body.config-mode .session-admin,
body.config-mode .gift-admin {
    display: none !important;
}

body.config-mode .topbar {
    gap: 12px;
}

body.config-mode .admin-panel {
    display: block;
}

body.config-mode .admin-panel.collapsed .admin-panel-body {
    display: block;
}

body.config-mode .admin-collapse-button {
    display: none;
}

body.dashboard-mode .mode-pill,
body.config-mode .mode-pill,
body.viewer-mode .mode-pill {
    display: inline-block;
}


/* Phase 5 cleanup: make Twitch views feel like separate pages. */
body.dashboard-mode .brand h1::after {
    content: " Live Dashboard";
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    margin-left: 8px;
}

body.config-mode .brand h1::after {
    content: " Setup";
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    margin-left: 8px;
}

body.viewer-mode .brand h1::after {
    content: " Viewer";
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    margin-left: 8px;
}

/* Viewer mode is redeem-only: no streamer/admin controls. */
body.viewer-mode #adminPanel {
    display: none !important;
}

/* Dashboard mode is live control focused. Keep search/effects, hide viewer-only identity/target clutter. */
body.dashboard-mode .points-pill,
body.dashboard-mode #viewerNameInput,
body.dashboard-mode #targetPlayerInput,
body.dashboard-mode #resetButton {
    display: none !important;
}

body.dashboard-mode .controls {
    grid-template-columns: 1fr;
}

body.dashboard-mode .search-wrap {
    width: 100%;
}

body.dashboard-mode .server-setup-admin .admin-note::after {
    content: " For first-time setup, use the Config page. This panel is kept here as a quick live reference.";
}

/* Config mode is setup-only: no live session/gifting/effect grid. */
body.config-mode .session-admin,
body.config-mode .gift-admin,
body.config-mode .content-layout,
body.config-mode #sessionStatus,
body.config-mode #resetButton,
body.config-mode #viewerNameInput,
body.config-mode #targetPlayerInput,
body.config-mode .search-wrap,
body.config-mode .points-pill {
    display: none !important;
}

body.config-mode .controls {
    display: none !important;
}

body.config-mode .server-setup-admin {
    border-color: rgba(255, 212, 59, 0.45);
}

body.config-mode .admin-grid::before {
    content: "Default channel settings";
    grid-column: 1 / -1;
    color: var(--accent);
    font-weight: 900;
    font-size: 13px;
    margin-bottom: 2px;
}

body.config-mode .settings-note {
    display: block !important;
}

body.config-mode .settings-note::before {
    content: "Config page only changes setup/defaults. Use the Live Dashboard page for sessions, gifts, queue monitoring, and effect balancing. ";
}

body.config-mode #bridgeStatus {
    margin-top: 10px;
}
