        :root {
            /* Map login accent tokens to the app theme */
            --v2-accent: #4f46e5;
            --v2-accent-strong: #6366f1;
            --v2-twitch: #9146FF;
            --v2-bg: var(--bg);
            --v2-line: var(--border);
            --v2-text: var(--text);
            --v2-muted: var(--muted);
            --v2-faint: var(--muted);
        }

        * { box-sizing: border-box; }

        body, html {
            margin: 0;
            padding: 0;
            min-height: 100vh;
            font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
            color: var(--v2-text);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Dot grid background (shared with success.html) */
        .sh-app-dotgrid {
            position: fixed;
            inset: 0;
            z-index: 0;
            overflow: hidden;
            background: var(--v2-bg);
            pointer-events: none;
        }
        .sh-app-dotgrid svg {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
        }

        /* Shell */
        .sh-shell {
            position: relative;
            z-index: 1;
            display: flex;
            min-height: 100vh;
            min-height: 100dvh;
            width: 100%;
        }

        /* ---------- Auth panel (left) ---------- */
        .sh-auth {
            flex: 0 0 clamp(420px, 44%, 580px);
            display: flex;
            flex-direction: column;
            padding: clamp(20px, 2.4vw, 28px) clamp(28px, 5vw, 72px) clamp(16px, 2vw, 22px);
            background: var(--surface);
            position: relative;
        }
        .sh-auth::after {
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 1px;
            background: var(--v2-line);
            pointer-events: none;
        }

        .sh-auth-brand {
            display: flex;
            align-items: center;
            gap: 14px;
        }
        .sh-auth-brand img {
            width: 52px;
            height: 52px;
            object-fit: contain;
            border-radius: 14px;
            display: block;
            flex-shrink: 0;
        }
        .sh-auth-brand-name {
            font-size: 19px;
            font-weight: 600;
            letter-spacing: -0.2px;
            line-height: 1.2;
        }

        .sh-auth-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            width: 100%;
            padding: clamp(28px, 5vh, 64px) 0;
        }

        .sh-auth-title {
            font-size: clamp(34px, 4.8vw, 52px);
            font-weight: 700;
            letter-spacing: -1.4px;
            line-height: 1.02;
            margin: 0;
        }
        .sh-auth-desc {
            font-size: 14.5px;
            color: var(--v2-muted);
            margin: 14px 0 36px;
            line-height: 1.55;
            max-width: 38ch;
        }

        /* Notifications */
        .sh-notification {
            padding: 0.75rem 0.875rem;
            border-radius: 6px;
            font-size: 0.84rem;
            font-weight: 500;
            margin-bottom: 0.75rem;
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            border: 1px solid;
            line-height: 1.45;
        }
        .sh-notification.is-danger {
            background: #fef2f2;
            color: #b91c1c;
            border-color: rgba(185, 28, 28, 0.25);
        }
        .sh-notification.is-success {
            background: #ecfdf5;
            color: #047857;
            border-color: rgba(16, 185, 129, 0.35);
        }
        html[data-theme="dark"] .sh-notification.is-danger {
            background: #2a1212;
            color: #fecaca;
            border-color: rgba(248, 113, 113, 0.35);
        }
        html[data-theme="dark"] .sh-notification.is-success {
            background: #112617;
            color: #bbf7d0;
            border-color: rgba(74, 222, 128, 0.35);
        }
        .sh-notification-icon {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            margin-top: 1px;
        }

        /* Primary CTA */
        .sh-btn-twitch {
            width: 100%;
            height: 56px;
            border: 0;
            border-radius: 10px;
            background: var(--v2-twitch);
            color: #fff;
            font-size: 14.5px;
            font-weight: 600;
            letter-spacing: 0.1px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            font-family: inherit;
            box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 12px 28px -16px rgba(0, 0, 0, 0.65);
            transition: transform 0.18s ease-out, opacity 0.2s;
        }
        .sh-btn-twitch:hover:not(:disabled) {
            transform: translateY(-1px);
        }
        .sh-btn-twitch:active:not(:disabled) {
            transform: translateY(0);
        }
        .sh-btn-twitch:disabled { opacity: 0.7; cursor: wait; }
        .sh-btn-icon { width: 18px; height: 18px; }

        /* Secondary CTA (Discord) */
        .sh-btn-discord {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            height: 44px;
            padding: 0 16px;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--surface-elev);
            color: var(--v2-text);
            font-size: 13.5px;
            font-weight: 600;
            letter-spacing: 0.1px;
            text-decoration: none;
            box-shadow: var(--shadow);
            transition: transform 0.18s ease-out, background 0.15s, border-color 0.15s;
            user-select: none;
        }
        .sh-btn-discord:hover {
            transform: translateY(-1px);
            background: rgba(145, 70, 255, 0.08);
            border-color: rgba(145, 70, 255, 0.28);
        }
        html[data-theme="dark"] .sh-btn-discord {
            border-color: rgba(255, 255, 255, 0.14);
            background: rgba(255, 255, 255, 0.04);
            box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 12px 28px -18px rgba(0, 0, 0, 0.55);
        }
        .sh-btn-discord:active { transform: translateY(0); }
        .sh-btn-discord-icon { width: 18px; height: 18px; }

        .sh-stage-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 18px;
        }

        /* Secondary expand link */
        .sh-v2-link {
            display: inline-block;
            margin-top: 18px;
            background: transparent;
            border: 0;
            padding: 0;
            cursor: pointer;
            color: var(--v2-muted);
            font-size: 12.5px;
            letter-spacing: 0.3px;
            font-family: inherit;
            text-decoration: none;
            text-underline-offset: 4px;
            text-decoration-color: rgba(0, 0, 0, 0.25);
            transition: color 0.15s, text-decoration-color 0.15s;
        }
        html[data-theme="dark"] .sh-v2-link {
            text-decoration-color: rgba(255, 255, 255, 0.4);
        }
        .sh-v2-link:hover {
            color: var(--v2-text);
            text-decoration: underline;
        }

        /* Username/password block */
        .sh-v2-form-block {
            display: none;
            flex-direction: column;
            gap: 12px;
            margin-top: 28px;
            padding-top: 26px;
            border-top: 1px solid var(--v2-line);
        }
        .sh-v2-form-block.is-visible {
            display: flex;
            animation: sh-fade-in 0.24s ease-out;
        }
        @keyframes sh-fade-in {
            from { opacity: 0; transform: translateY(4px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .sh-v2-field { display: flex; flex-direction: column; gap: 7px; }
        .sh-v2-lbl {
            font-size: 11px;
            color: var(--v2-muted);
            font-weight: 500;
            letter-spacing: 0.3px;
            text-transform: uppercase;
        }
        .sh-v2-input {
            height: 44px;
            border-radius: 8px;
            border: 1px solid var(--input-border);
            background: var(--input-bg);
            color: var(--v2-text);
            font-size: 14px;
            padding: 0 14px;
            outline: none;
            font-family: inherit;
            transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
        }
        .sh-v2-input:hover {
            border-color: var(--input-border);
            background: var(--input-bg-hover);
        }
        .sh-v2-input:focus {
            border-color: var(--input-border-focus);
            background: var(--input-bg-focus);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--input-border-focus) 25%, transparent);
        }

        .sh-v2-submit {
            margin-top: 6px;
            height: 44px;
            border-radius: 8px;
            border: 1px solid var(--border);
            background: var(--surface-elev);
            color: var(--v2-text);
            font-size: 13px;
            font-weight: 500;
            font-family: inherit;
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s;
        }
        .sh-v2-submit:hover:not(:disabled) {
            background: var(--input-bg-hover);
            border-color: var(--input-border-focus);
        }
        html[data-theme="dark"] .sh-v2-submit:hover:not(:disabled) {
            background: rgba(255, 255, 255, 0.07);
            border-color: rgba(255, 255, 255, 0.22);
        }
        .sh-v2-submit:disabled { opacity: 0.6; cursor: not-allowed; }

        .sh-auth-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 11.5px;
            letter-spacing: 0.3px;
            color: var(--v2-faint);
            margin-top: auto;
            padding-top: 24px;
        }
        .sh-auth-footer a {
            color: var(--v2-faint);
            text-decoration: none;
            transition: color 0.15s;
        }
        .sh-auth-footer a:hover { color: var(--v2-muted); }

        /* ---------- Showcase panel (right) ---------- */
        .sh-show {
            flex: 1;
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: clamp(56px, 9vh, 120px) clamp(40px, 6vw, 96px);
            overflow: hidden;
            min-height: 100vh;
            min-height: 100dvh;
        }

        /* Keep the primary pitch centered, but let the showcase sit at the bottom edge */
        .sh-show-main {
            position: absolute;
            inset: clamp(56px, 9vh, 120px) clamp(40px, 6vw, 96px);
            z-index: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
        }

        .sh-show-pill {
            position: absolute;
            top: clamp(24px, 3vw, 40px);
            right: clamp(24px, 3vw, 40px);
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 14px;
            border-radius: 99px;
            background: var(--surface);
            border: 1px solid var(--border);
            font-size: 12px;
            font-weight: 500;
            color: var(--text);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 2;
        }
        .sh-show-pill-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #22c55e;
            box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
            animation: sh-pulse-bg 2s infinite;
        }
        /* Hide marketing stats until public API data is loaded (avoids placeholder flash) */
        .sh-await-login-api {
            visibility: hidden;
        }
        .sh-await-login-api.is-revealed {
            visibility: visible;
        }
        @keyframes sh-pulse-bg {
            0%, 100% { opacity: 0.45; }
            50% { opacity: 0.85; }
        }

        /* ---------- Editorial stage (right showcase) ---------- */
        .sh-stage {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 620px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            pointer-events: auto;
        }

        .sh-stage-eyebrow {
            margin: 0 0 28px;
            font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
            font-size: 11px;
            font-weight: 500;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: var(--v2-muted);
        }

        .sh-stage-headline {
            margin: 0 0 22px;
            font-size: clamp(38px, 5.4vw, 68px);
            font-weight: 600;
            letter-spacing: -1.6px;
            line-height: 1.02;
            color: var(--v2-text);
        }

        .sh-stage-lede {
            margin: 0 0 56px;
            font-size: 16px;
            line-height: 1.55;
            color: var(--v2-muted);
            max-width: 46ch;
        }

        .sh-stage-list {
            list-style: none;
            margin: 0;
            padding: 0;
            border-top: 1px solid var(--v2-line);
        }
        .sh-stage-row {
            display: grid;
            grid-template-columns: 56px 1fr;
            gap: 24px;
            padding: 22px 0;
            border-bottom: 1px solid var(--v2-line);
        }
        .sh-stage-num {
            font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
            font-size: 12px;
            font-weight: 500;
            letter-spacing: 0.6px;
            color: var(--v2-muted);
            padding-top: 5px;
            font-variant-numeric: tabular-nums;
        }
        .sh-stage-row-body {
            display: flex;
            flex-direction: column;
            gap: 6px;
            min-width: 0;
        }
        .sh-stage-row-label {
            font-size: 17px;
            font-weight: 600;
            letter-spacing: -0.2px;
            color: var(--v2-text);
            line-height: 1.3;
        }
        .sh-stage-row-desc {
            font-size: 14px;
            line-height: 1.55;
            color: var(--v2-muted);
            max-width: 52ch;
        }

        /* ---------- Showcase marquee (right) ---------- */
        .sh-showcase {
            position: relative;
            z-index: 2;
            padding: 22px 0 0;
            height: auto;
            display: grid;
            grid-template-columns: 1fr;
            gap: 18px;
            align-items: start;
            width: 100%;
            align-self: stretch;
        }
        .sh-showcase-heading {
            grid-column: 1 / -1;
            margin: 0;
            font-size: 20px;
            font-weight: 600;
            color: var(--v2-text);
            letter-spacing: -0.1px;
            line-height: 1.25;
        }
        .sh-showcase-body {
            grid-column: 1 / -1;
            display: grid;
            grid-template-columns: 1fr;
            gap: 18px;
            align-items: start;
            margin-top: 8px;
        }

        .sh-showcase-live-dot {
            position: absolute;
            top: 0;
            right: 0;
            border-radius: 999px;
            background: #ef4444;
            box-shadow: 0 0 0 2px var(--surface);
            opacity: 0.95;
        }
        .sh-showcase-live-dot.is-crowd {
            width: 6px;
            height: 6px;
        }
        .sh-showcase-live-dot.is-pulsing {
            animation: sh-live-pulse 1.6s ease-in-out infinite;
        }
        @keyframes sh-live-pulse {
            0%, 100% { opacity: 0.55; }
            50% { opacity: 1; }
        }

        .sh-sr-only {
            position: absolute !important;
            width: 1px !important;
            height: 1px !important;
            padding: 0 !important;
            margin: -1px !important;
            overflow: hidden !important;
            clip: rect(0, 0, 0, 0) !important;
            white-space: nowrap !important;
            border: 0 !important;
        }

        .sh-showcase-crowd {
            position: relative;
            height: 148px;
            overflow: hidden;
            mask-image: linear-gradient(to right,
                rgba(0,0,0,0) 0px,
                rgba(0,0,0,1) 24px,
                rgba(0,0,0,1) calc(100% - 24px),
                rgba(0,0,0,0) 100%);
            -webkit-mask-image: linear-gradient(to right,
                rgba(0,0,0,0) 0px,
                rgba(0,0,0,1) 24px,
                rgba(0,0,0,1) calc(100% - 24px),
                rgba(0,0,0,0) 100%);
        }
        .sh-showcase-crowd:hover .sh-showcase-marquee-track {
            animation-play-state: paused;
        }
        .sh-showcase-marquee {
            width: 100%;
            height: 100%;
        }
        .sh-showcase-marquee-track {
            display: flex;
            align-items: flex-start;
            padding-top: 2px;
            gap: 32px;
            width: max-content;
            --showcase-loop-segments: 2;
            /* duration + keyframe distance set in JS from measured widths */
            animation: sh-marquee-scroll var(--showcase-marquee-duration, 70s) linear infinite;
            will-change: transform;
        }
        @keyframes sh-marquee-scroll {
            from { transform: translate3d(0, 0, 0); }
            to { transform: translate3d(calc(-100% / var(--showcase-loop-segments, 2)), 0, 0); }
        }
        .sh-showcase-crowd-item {
            width: 92px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            flex: 0 0 auto;
        }
        .sh-showcase-crowd-link {
            color: inherit;
            text-decoration: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            cursor: pointer;
        }
        .sh-showcase-crowd-avatar-wrap {
            position: relative;
            width: 60px;
            height: 60px;
        }
        .sh-showcase-crowd-avatar {
            width: 100%;
            height: 100%;
            border-radius: 999px;
            border: 1px solid var(--border);
            object-fit: cover;
            display: block;
            box-shadow: 0 2px 8px rgba(0,0,0,0.25);
        }
        .sh-showcase-crowd-name {
            font-size: 14px;
            font-weight: 600;
            color: var(--v2-muted);
            line-height: 1.15;
            text-align: center;
            max-width: 12ch;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-decoration: none;
            text-underline-offset: 4px;
            text-decoration-color: transparent;
            transition: color 0.15s ease-out, text-decoration-color 0.15s ease-out;
        }
        .sh-showcase-crowd-link:hover .sh-showcase-crowd-name {
            color: var(--v2-text);
            text-decoration: underline;
            text-decoration-color: var(--v2-accent);
        }

        /* ---------- Responsive ---------- */
        @media (max-width: 960px) {
            .sh-shell { flex-direction: column; }
            .sh-auth {
                flex: none;
                width: 100%;
                padding: 20px 28px 18px;
            }
            .sh-auth::after {
                top: auto;
                left: 0;
                right: 0;
                bottom: 0;
                width: 100%;
                height: 1px;
            }
            .sh-auth-content {
                max-width: 100%;
                padding: 32px 0 24px;
            }
            .sh-auth-footer { padding-top: 20px; }

            .sh-show {
                min-height: auto;
                padding: 56px 28px 64px;
                justify-content: center;
            }
            .sh-show-main {
                position: relative;
                inset: auto;
                width: 100%;
                pointer-events: auto;
            }
            .sh-show-pill {
                /* On mobile/tablet the pill must not overlay the brand icon */
                position: static;
                top: auto;
                right: auto;
                z-index: auto;
                transform: none;
                align-self: flex-end;
                margin: 0 0 22px 0;
            }
            .sh-stage-headline { font-size: clamp(28px, 6vw, 44px); }
            .sh-stage-lede { margin-bottom: 36px; }

            .sh-showcase { height: auto; grid-template-columns: 1fr; }
            .sh-showcase-body { grid-template-columns: 1fr; }
            .sh-showcase-heading { font-size: 19px; }
            .sh-showcase-crowd { height: 160px; }
            .sh-showcase-crowd-avatar-wrap { width: 56px; height: 56px; }
            .sh-showcase-crowd-item { width: 88px; }
            .sh-showcase-crowd-name { font-size: 13.5px; }
        }

        @media (max-width: 560px) {
            .sh-auth-title { font-size: clamp(30px, 9vw, 38px); }
            .sh-show { padding: 56px 22px 56px; }
            .sh-stage-headline { font-size: clamp(26px, 7.4vw, 34px); letter-spacing: -1px; }
            .sh-stage-lede { font-size: 14px; margin-bottom: 40px; }
            .sh-stage-row { grid-template-columns: 44px 1fr; gap: 16px; padding: 18px 0; }
            .sh-stage-row-label { font-size: 15.5px; }
            .sh-stage-row-desc { font-size: 13.5px; }
            .sh-showcase { display: none; }
        }

        .sh-dotgrid-fill { position: absolute; inset: 0; }
        .sh-dotgrid-fill--dark { display: none; }
        html[data-theme="dark"] .sh-dotgrid-fill--light { display: none; }
        html[data-theme="dark"] .sh-dotgrid-fill--dark { display: block; }
