
        *, *::before, *::after { box-sizing: border-box; }

        :root {
            color-scheme: dark;
            --page: oklch(.13 .005 250);
            --card: oklch(.16 .005 250);
            --surface: oklch(.18 .005 250);
            --surface-hover: oklch(.22 .005 250);
            --border: oklch(.22 .005 250);
            --border-strong: oklch(.28 .005 250);
            --text: oklch(.96 .003 250);
            --muted: oklch(.70 .005 250);
            --subtle: oklch(.52 .005 250);
            --faint: oklch(.52 .005 250);
            --button: oklch(.96 .003 250);
            --button-text: oklch(.15 .005 250);
            --danger: #e05257;
            --success: #63b889;
            --shadow: 0 6px 16px rgba(0, 0, 0, .32), 0 2px 4px rgba(0, 0, 0, .24);
            --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        }

        html[data-theme="light"] {
            color-scheme: light;
            --page: #f5f5f6;
            --card: #fff;
            --surface: #f7f7f8;
            --surface-hover: #efeff1;
            --border: #e1e1e4;
            --border-strong: #c8c8ce;
            --text: #18181b;
            --muted: #606067;
            --subtle: #85858d;
            --faint: #a0a0a7;
            --button: #19191c;
            --button-text: #fff;
            --shadow: 0 24px 70px rgba(20, 20, 24, .10), 0 2px 8px rgba(20, 20, 24, .05);
        }

        html, body { min-height: 100%; margin: 0; }
        html { background: var(--page); }
        body {
            background: var(--page);
            color: var(--text);
            font-family: var(--font);
            font-size: 14px;
            line-height: 1.5;
            -webkit-font-smoothing: antialiased;
            text-rendering: optimizeLegibility;
            transition: background-color .18s ease, color .18s ease;
        }
        button, input { font: inherit; }
        button, a { -webkit-tap-highlight-color: transparent; }
        ::selection { color: #fff; background: rgba(224, 69, 74, .42); }
        * { scrollbar-width: thin; scrollbar-color: #35363b transparent; }
        *::-webkit-scrollbar { width: 8px; height: 8px; }
        *::-webkit-scrollbar-track { background: transparent; }
        *::-webkit-scrollbar-thumb {
            background: #35363b;
            border: 2px solid transparent;
            border-radius: 999px;
            background-clip: padding-box;
        }

        main {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            min-height: 100vh;
            min-height: 100dvh;
            place-items: center;
            padding: 48px 16px;
        }
        .auth-shell {
            display: flex;
            min-width: 0;
            width: 100%;
            max-width: 400px;
            flex-direction: column;
            gap: 20px;
        }
        .auth-card {
            padding: 28px;
            overflow: hidden;
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 16px;
            box-shadow: var(--shadow);
            animation: card-in .42s cubic-bezier(.22, 1, .36, 1) both;
        }
        @keyframes card-in {
            from { opacity: 0; transform: translateY(9px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .auth-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            text-align: center;
        }
        .auth-logo { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; }
        .auth-mark { display: block; width: 36px; height: 36px; object-fit: contain; opacity: 1; visibility: visible; }
        html[data-theme="light"] .auth-mark { filter: invert(1); }
        .auth-heading { display: flex; flex-direction: column; gap: 4px; }
        h1 {
            margin: 0;
            color: var(--text);
            font-size: 22px;
            font-weight: 500;
            line-height: 1.25;
            letter-spacing: -.01em;
        }
        .auth-subtitle {
            margin: 0;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.625;
        }
        .auth-content { margin-top: 24px; }
        .token-form { display: flex; flex-direction: column; gap: 16px; }
        .field { display: flex; flex-direction: column; gap: 6px; }
        .field-label {
            color: var(--muted);
            font-size: 12px;
            font-weight: 500;
            line-height: 18px;
        }
        .token-input {
            display: flex;
            width: 100%;
            height: 36px;
            padding: 0 12px;
            color: var(--text);
            caret-color: var(--text);
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 6px;
            outline: none;
            box-shadow: none;
            font-size: 14px;
            line-height: 21px;
            transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
        }
        .token-input::placeholder { color: var(--faint); }
        .token-input:hover { border-color: var(--border-strong); }
        .token-input:focus {
            border-color: var(--border-strong);
            box-shadow: none;
        }
        .token-input.valid { border-color: rgba(99, 184, 137, .72); }
        .token-input.invalid { border-color: rgba(224, 82, 87, .82); }
        .input-hint {
            min-height: 18px;
            margin: 0;
            color: var(--subtle);
            font-size: 11px;
            line-height: 18px;
        }
        .input-hint:empty { display: none; }
        .input-hint.ok { color: var(--success); }
        .input-hint.err { color: var(--danger); }

        .primary-button, .session-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 40px;
            border-radius: 6px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease, transform .1s ease;
        }
        .primary-button {
            margin-top: 4px;
            padding: 0 20px;
            color: var(--button-text);
            background: var(--button);
            border: 0;
            box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
            font-size: 14px;
        }
        .primary-button:hover:not(:disabled) { opacity: .9; }
        .primary-button:active:not(:disabled), .session-button:active:not(:disabled), .round-control:active { transform: scale(.98); }
        .primary-button:disabled, .session-button:disabled { cursor: not-allowed; opacity: .48; }
        .discord-step {
            display: block;
        }
        .discord-button {
            gap: 8px;
            margin-top: 0;
            color: #fff;
            background: #5865f2;
        }
        .discord-button svg { width: 17px; height: 17px; fill: currentColor; }
        .login-turnstile {
            display: flex;
            min-height: 65px;
            margin-top: 12px;
            align-items: center;
            justify-content: center;
        }
        .security-note {
            margin: 10px 0 0;
            color: var(--subtle);
            font-size: 11px;
            line-height: 1.625;
            text-align: center;
        }
        .security-note a { color: var(--muted); font-weight: 500; text-underline-offset: 2px; }
        .security-note a:hover { color: var(--text); }
        .divider {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 20px 0;
            color: var(--subtle);
            font-size: 11px;
            font-weight: 500;
            line-height: 16px;
            letter-spacing: .08em;
            text-transform: uppercase;
        }
        .divider::before, .divider::after { width: 100%; height: 1px; content: ""; background: var(--border); }
        .session-button {
            justify-content: space-between;
            gap: 12px;
            padding: 0 12px;
            color: var(--text);
            background: color-mix(in srgb, var(--surface) 45%, transparent);
            border: 1px solid var(--border);
            box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
            font-size: 13px;
        }
        .session-button:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--border-strong); }
        .session-state { display: flex; min-width: 0; align-items: center; gap: 9px; }
        .session-dot {
            width: 6px;
            height: 6px;
            flex: 0 0 auto;
            background: var(--faint);
            border-radius: 50%;
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--faint) 12%, transparent);
            transition: background-color .2s ease, box-shadow .2s ease;
        }
        .session-dot.ok { background: var(--success); box-shadow: 0 0 0 3px rgba(99, 184, 137, .11); }
        .session-dot.err { background: var(--danger); box-shadow: 0 0 0 3px rgba(224, 82, 87, .11); }
        .session-copy { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .session-action { flex: 0 0 auto; color: var(--subtle); font-size: 11px; font-weight: 500; }
        .token-value, .btn-reveal { display: none !important; }

        .outside-copy { margin: 0; color: var(--muted); font-size: 13px; line-height: 20px; text-align: center; }
        .outside-copy a { color: var(--text); font-weight: 500; text-decoration: none; text-underline-offset: 4px; }
        .outside-copy a:hover { text-decoration: underline; }
        .footer-controls { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 4px; }
        .round-control, .theme-switch {
            color: var(--subtle);
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 999px;
        }
        .round-control {
            display: inline-flex;
            width: 32px;
            height: 32px;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            transition: color .15s ease, border-color .15s ease, transform .1s ease;
        }
        .round-control:hover { color: var(--text); border-color: var(--border-strong); }
        .round-control svg, .theme-button svg { width: 15px; height: 15px; }
        .theme-switch { display: inline-flex; align-items: center; gap: 2px; padding: 2px; }
        .theme-button {
            display: inline-flex;
            width: 28px;
            height: 28px;
            padding: 0;
            align-items: center;
            justify-content: center;
            color: var(--subtle);
            background: transparent;
            border: 0;
            border-radius: 50%;
            cursor: pointer;
            transition: color .15s ease, background-color .15s ease;
        }
        .theme-button:hover { color: var(--muted); }
        .theme-button[aria-pressed="true"] { color: var(--text); background: var(--surface-hover); }

        .toast {
            position: fixed;
            top: 18px;
            left: 50%;
            z-index: 10;
            max-width: calc(100vw - 32px);
            padding: 9px 14px;
            overflow: hidden;
            color: var(--text);
            background: var(--surface-hover);
            border: 1px solid var(--border);
            border-radius: 7px;
            box-shadow: var(--shadow);
            font-size: 12px;
            opacity: 0;
            pointer-events: none;
            text-overflow: ellipsis;
            transform: translate(-50%, -6px);
            transition: opacity .2s ease, transform .2s ease;
            white-space: nowrap;
        }
        .toast.show { opacity: 1; transform: translate(-50%, 0); }

        @media (max-width: 400px) {
            main { padding: 24px 12px; }
            .auth-card { padding: 24px 16px; }
            .auth-subtitle { overflow-wrap: anywhere; }
        }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                scroll-behavior: auto !important;
                animation-duration: .01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: .01ms !important;
            }
        }
    