        :root {
            --bg-base: #070709;
            --bg-card: rgba(15, 15, 20, 0.82);
            --border-subtle: rgba(255, 255, 255, 0.08);
            --border-highlight: rgba(255, 255, 255, 0.22);
            --accent-purple: #9d4edd;
            --accent-purple-glow: rgba(157, 78, 221, 0.45);
            --text-primary: #ffffff;
            --text-secondary: #a1a1aa;
            --text-muted: #71717a;
            --white: #ffffff;
            --black: #000000;
        }
        html:not(.js) .page-loader {
            display: none;
        }

        .page-loader {
            position: fixed;
            inset: 0;
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 14px;
            background: var(--bg-base);
            color: var(--text-secondary);
            font: 600 12px 'JetBrains Mono', monospace;
            letter-spacing: .08em;
            transition: opacity .3s ease, visibility .3s ease;
        }

        .page-loader.is-hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        .page-loader-spinner {
            width: 22px;
            height: 22px;
            border: 2px solid rgba(255, 255, 255, .16);
            border-top-color: var(--accent-purple);
            border-radius: 50%;
            animation: pageLoaderSpin .75s linear infinite;
        }

        @keyframes pageLoaderSpin {
            to { transform: rotate(360deg); }
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html, body {
            width: 100%;
            height: 100%;
            font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--bg-base);
            color: var(--text-primary);
            overflow: hidden;
        }

        body {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 24px;
            position: relative;
        }

        /* Interactive Ambient Particle Canvas */
        #particleCanvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
        }

        /* Ambient Glow Layers */
        .ambient-layer {
            position: fixed;
            pointer-events: none;
            z-index: 0;
            filter: blur(100px);
            border-radius: 50%;
        }

        .ambient-glow-1 {
            width: 600px;
            height: 600px;
            background: radial-gradient(circle, rgba(147, 51, 234, 0.14) 0%, transparent 70%);
            top: -150px;
            left: 50%;
            transform: translateX(-50%);
            animation: breatheGlow 10s ease-in-out infinite alternate;
        }

        .ambient-glow-2 {
            width: 450px;
            height: 450px;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
            bottom: -100px;
            left: 50%;
            transform: translateX(-50%);
        }

        @keyframes breatheGlow {
            0% { transform: translateX(-50%) scale(0.95); opacity: 0.8; }
            100% { transform: translateX(-50%) scale(1.1); opacity: 1; }
        }

        .auth-wrapper {
            width: 100%;
            max-width: 450px;
            position: relative;
            z-index: 10;
            animation: cardEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .honeypot {
            position: absolute;
            left: -10000px;
            width: 1px;
            height: 1px;
            overflow: hidden;
        }

        @keyframes cardEntrance {
            from {
                opacity: 0;
                transform: translateY(24px) scale(0.97);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* Brand Showcase */
        .brand-showcase {
            text-align: center;
            margin-bottom: 26px;
            position: relative;
        }

        .emblem-wrapper {
            display: inline-block;
            position: relative;
            margin-bottom: 16px;
        }

        .emblem-halo {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 100px;
            height: 100px;
            border-radius: 28px;
            background: radial-gradient(circle, var(--accent-purple-glow) 0%, transparent 70%);
            filter: blur(18px);
            z-index: -1;
            animation: pulseHalo 4s ease-in-out infinite alternate;
        }

        @keyframes pulseHalo {
            0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
            100% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
        }

        .brand-logo-card {
            width: 84px;
            height: 84px;
            border-radius: 24px;
            background: #0d0d12;
            border: 1px solid rgba(255, 255, 255, 0.2);
            padding: 3px;
            box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(157, 78, 221, 0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            overflow: hidden;
        }

        .brand-logo-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, transparent 50%);
            pointer-events: none;
        }

        .brand-logo-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 20px;
            display: block;
        }

        .emblem-wrapper:hover .brand-logo-card {
            transform: translateY(-3px) scale(1.04);
            border-color: #ffffff;
            box-shadow: 0 0 45px rgba(157, 78, 221, 0.5), 0 0 20px rgba(255, 255, 255, 0.3);
        }

        .brand-title-text {
            font-size: 26px;
            font-weight: 800;
            letter-spacing: -0.02em;
            color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 6px;
        }

        .version-badge {
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            padding: 3px 8px;
            background: #ffffff;
            color: #000000;
            border-radius: 6px;
            box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
        }

        .brand-subtitle-text {
            font-size: 13px;
            color: var(--text-muted);
            letter-spacing: 0.02em;
        }

        /* Glassmorphic Login Card */
        .login-card {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 24px;
            padding: 38px 34px;
            box-shadow: 0 35px 70px -15px rgba(0, 0, 0, 0.9), 
                        inset 0 1px 0 rgba(255, 255, 255, 0.12);
            backdrop-filter: blur(28px);
            -webkit-backdrop-filter: blur(28px);
            position: relative;
            overflow: hidden;
        }

        .login-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 20%, rgba(157, 78, 221, 0.8) 50%, rgba(255, 255, 255, 0.1) 80%, transparent 100%);
            animation: sweepBorder 6s linear infinite;
        }

        @keyframes sweepBorder {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .form-field {
            margin-bottom: 20px;
        }

        .field-label {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-secondary);
            margin-bottom: 9px;
        }

        .input-shell {
            position: relative;
            display: flex;
            align-items: center;
        }

        .input-lead-icon {
            position: absolute;
            left: 16px;
            color: var(--text-muted);
            font-size: 14px;
            pointer-events: none;
            transition: color 0.25s ease;
        }

        .styled-input {
            width: 100%;
            padding: 14px 44px 14px 44px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            font-family: inherit;
            font-size: 14px;
            color: #ffffff;
            outline: none;
            transition: all 0.25s ease;
        }

        .styled-input::placeholder {
            color: #52525b;
        }

        .styled-input:hover {
            border-color: var(--border-highlight);
            background: rgba(255, 255, 255, 0.05);
        }

        .styled-input:focus {
            border-color: var(--white);
            background: rgba(255, 255, 255, 0.07);
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 0 20px rgba(157, 78, 221, 0.2);
        }

        .styled-input:focus ~ .input-lead-icon {
            color: #ffffff;
        }

        .eye-toggle-btn {
            position: absolute;
            right: 14px;
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 6px;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .eye-toggle-btn:hover {
            color: #ffffff;
            transform: scale(1.1);
        }

        /* Remember Me Option */
        .option-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 22px;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .custom-check-label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            user-select: none;
        }

        .custom-checkbox {
            appearance: none;
            -webkit-appearance: none;
            width: 17px;
            height: 17px;
            border: 1px solid var(--border-highlight);
            border-radius: 5px;
            background: rgba(255, 255, 255, 0.04);
            cursor: pointer;
            position: relative;
            outline: none;
            transition: all 0.2s ease;
        }

        .custom-checkbox:checked {
            background: #ffffff;
            border-color: #ffffff;
        }

        .custom-checkbox:checked::after {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            font-size: 10px;
            color: #000000;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        /* Primary Submit Button */
        .auth-submit-btn {
            width: 100%;
            padding: 15px;
            background: #ffffff;
            color: #000000;
            border: none;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 800;
            letter-spacing: 0.03em;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            overflow: hidden;
            box-shadow: 0 4px 18px rgba(255, 255, 255, 0.2);
        }

        .auth-submit-btn::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
            transition: left 0.6s ease;
        }

        .auth-submit-btn:hover {
            background: #f0f0f0;
            transform: translateY(-2px);
            box-shadow: 0 8px 28px rgba(255, 255, 255, 0.3);
        }

        .auth-submit-btn:hover::after {
            left: 100%;
        }

        .auth-submit-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 10px rgba(255, 255, 255, 0.15);
        }

        .auth-submit-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* Card Meta Footer */
        .card-meta-footer {
            margin-top: 24px;
            padding-top: 20px;
            border-top: 1px solid var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 12px;
            color: var(--text-muted);
        }

        .meta-status-pill {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .live-dot {
            width: 7px;
            height: 7px;
            background: #ffffff;
            border-radius: 50%;
            box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
            animation: pulseDot 2s infinite;
        }

        @keyframes pulseDot {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.35; transform: scale(0.85); }
        }

        .meta-tech-tag {
            font-family: 'JetBrains Mono', monospace;
            font-size: 11px;
            display: flex;
            align-items: center;
            gap: 5px;
            color: var(--text-secondary);
        }

        /* Toast Deck */
        .toast-deck {
            position: fixed;
            top: 24px;
            right: 24px;
            z-index: 99999;
            display: flex;
            flex-direction: column;
            gap: 12px;
            pointer-events: none;
            width: 100%;
            max-width: 380px;
        }

        .toast-card {
            pointer-events: auto;
            background: rgba(18, 18, 24, 0.92);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 16px;
            padding: 16px 18px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            display: flex;
            align-items: flex-start;
            gap: 14px;
            position: relative;
            overflow: hidden;
            transform-origin: top right;
            animation: toastPopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .toast-card.dismissing {
            opacity: 0;
            transform: translateX(40px) scale(0.94);
        }

        @keyframes toastPopIn {
            from {
                opacity: 0;
                transform: translateY(-20px) scale(0.92);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .toast-card.error { border-left: 3px solid #ff4d4d; }
        .toast-card.error .toast-icon-wrap {
            background: rgba(255, 77, 77, 0.12);
            color: #ff5252;
            border: 1px solid rgba(255, 77, 77, 0.25);
        }

        .toast-card.success { border-left: 3px solid #00e676; }
        .toast-card.success .toast-icon-wrap {
            background: rgba(0, 230, 118, 0.12);
            color: #00e676;
            border: 1px solid rgba(0, 230, 118, 0.25);
        }

        .toast-card.warning { border-left: 3px solid #ffb300; }
        .toast-card.warning .toast-icon-wrap {
            background: rgba(255, 179, 0, 0.12);
            color: #ffb300;
            border: 1px solid rgba(255, 179, 0, 0.25);
        }

        .toast-card.info { border-left: 3px solid #9d4edd; }
        .toast-card.info .toast-icon-wrap {
            background: rgba(157, 78, 221, 0.12);
            color: #9d4edd;
            border: 1px solid rgba(157, 78, 221, 0.25);
        }

        .toast-icon-wrap {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            flex-shrink: 0;
        }

        .toast-content {
            flex: 1;
            padding-right: 8px;
        }

        .toast-title {
            font-size: 13px;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 3px;
        }

        .toast-message {
            font-size: 12px;
            color: #a1a1aa;
            line-height: 1.45;
        }

        .toast-close-btn {
            background: none;
            border: none;
            color: #71717a;
            cursor: pointer;
            padding: 4px;
            font-size: 13px;
            transition: color 0.2s ease;
            flex-shrink: 0;
        }

        .toast-close-btn:hover { color: #ffffff; }

        .toast-progress {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 2px;
            width: 100%;
            background: rgba(255, 255, 255, 0.25);
            transform-origin: left;
            animation: shrinkBar linear forwards;
        }

        .toast-card.error .toast-progress { background: #ff4d4d; }
        .toast-card.success .toast-progress { background: #00e676; }
        .toast-card.warning .toast-progress { background: #ffb300; }
        .toast-card.info .toast-progress { background: #9d4edd; }

        @keyframes shrinkBar {
            from { transform: scaleX(1); }
            to { transform: scaleX(0); }
        }

        @media (max-width: 480px) {
            .toast-deck {
                top: 14px;
                right: 14px;
                left: 14px;
                max-width: none;
            }

            .login-card {
                padding: 28px 20px;
                border-radius: 20px;
            }

            .brand-title-text {
                font-size: 22px;
            }

            .brand-logo-card {
                width: 72px;
                height: 72px;
            }
        }

        :root {
            --bg-base: #111614;
            --bg-card: rgba(24, 31, 28, 0.84);
            --border-subtle: rgba(227, 237, 227, 0.11);
            --border-highlight: rgba(227, 237, 227, 0.23);
            --accent-purple: #ef826e;
            --accent-purple-glow: rgba(239, 130, 110, 0.35);
            --text-primary: #f4f3ed;
            --text-secondary: #c0c8c0;
            --text-muted: #818f87;
        }

        html, body { width: 100%; min-height: 100%; height: auto; overflow-x: hidden; overflow-y: auto; }
        body { min-height: 100vh; display: block; padding: 0; background: #111614; }
        #particleCanvas { z-index: 0; opacity: .32; }
        .ambient-layer { display: none; }
        .page-shell {
            min-height: 100vh;
            display: grid;
            grid-template-columns: minmax(410px, 46%) minmax(0, 54%);
            position: relative;
            z-index: 2;
        }
        .login-side {
            min-height: 100vh;
            padding: clamp(28px, 5vw, 72px);
            display: flex;
            align-items: center;
            justify-content: center;
            background: #151c18;
            border-right: 1px solid rgba(227, 237, 227, .08);
            position: relative;
            z-index: 3;
        }
        .auth-wrapper { width: min(100%, 390px); max-width: none; z-index: 3; animation: cardEntrance .7s cubic-bezier(.16, 1, .3, 1); }
        .brand-showcase { text-align: left; margin-bottom: 30px; }
        .brand-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 25px; }
        .emblem-wrapper { margin: 0; flex: 0 0 auto; }
        .brand-logo-card { width: 54px; height: 54px; padding: 2px; border-radius: 14px; background: #222a25; border-color: var(--border-subtle); box-shadow: none; }
        .brand-logo-img { border-radius: 11px; }
        .emblem-halo { width: 64px; height: 64px; filter: blur(13px); }
        .brand-heading { min-width: 0; }
        .brand-title-text { justify-content: flex-start; margin: 0 0 5px; font-size: 17px; letter-spacing: 0; }
        .version-badge { padding: 3px 6px; background: rgba(239,130,110,.14); color: #f2a18e; box-shadow: none; }
        .brand-subtitle-text { font-size: 12px; letter-spacing: 0; }
        .login-intro { margin: 0 0 24px; }
        .login-intro .eyebrow { margin: 0 0 9px; color: #e99a88; font: 700 11px/1.4 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; }
        .login-intro h2 { margin: 0; color: #f4f3ed; font-size: 29px; line-height: 1.14; font-weight: 700; }
        .login-intro p { margin: 9px 0 0; color: #98a49b; font-size: 13px; line-height: 1.55; }
        .login-card { padding: 25px 0 0; border: 0; border-top: 1px solid var(--border-subtle); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; overflow: visible; }
        .login-card::before { display: none; }
        .field-label { color: #c0c8c0; letter-spacing: .07em; }
        .styled-input { min-height: 50px; border-radius: 7px; background: rgba(255,255,255,.035); border-color: rgba(227,237,227,.14); color: #f4f3ed; }
        .styled-input:hover { border-color: rgba(227,237,227,.26); }
        .styled-input:focus { border-color: #e98f7b; box-shadow: 0 0 0 3px rgba(233,143,123,.12); }
        .input-lead-icon { color: #87958b; }
        .eye-toggle-btn { color: #89978d; }
        .option-row { color: #a9b4ab; }
        .custom-checkbox { accent-color: #ef826e; }
        .auth-submit-btn { min-height: 50px; border-radius: 7px; background: #e98773; color: #211b19; box-shadow: 0 8px 24px rgba(191,91,73,.18); }
        .auth-submit-btn:hover { background: #f09a85; box-shadow: 0 10px 30px rgba(191,91,73,.25); }
        .auth-footer-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: #7f8c83; font-size: 11px; }
        .auth-footer-note i { color: #e9917e; }
        .character-side {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(
        ellipse at 52% 45%,
        #260609 0%,
        #150306 39%,
        #080102 74%,
        #000000 100%
    );
}

.character-side::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .20;
    background-image:
        linear-gradient(rgba(255, 70, 85, .10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 70, 85, .10) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(
        90deg,
        transparent,
        #000 34%,
        #000 74%,
        transparent
    );
    z-index: -1;
}

.character-gif {
    position: absolute;
    left: 50%;
    top: 50%;
    width: auto;
    height: 100%;
    max-width: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    filter: sepia(.35) saturate(1.65) hue-rotate(310deg) contrast(1.08) brightness(1.02);
}

.character-side::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at 52% 45%,
            rgba(255, 30, 55, .08),
            transparent 55%
        ),
        linear-gradient(
            180deg,
            rgba(12, 0, 2, .12),
            transparent 22%,
            transparent 70%,
            rgba(12, 0, 2, .75)
        );
    z-index: 0;
}

       
        .scene-topline { position: absolute; top: 34px; left: 38px; right: 38px; display: flex; justify-content: space-between; align-items: center; z-index: 1; color: rgba(238,242,232,.72); font: 600 10px/1.4 'JetBrains Mono', monospace; letter-spacing: .12em; text-transform: uppercase; }
        .scene-status { display: inline-flex; align-items: center; gap: 8px; }
        .scene-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #b8d887; box-shadow: 0 0 12px rgba(184,216,135,.7); }
        .scene-copy { position: absolute; left: clamp(30px, 5vw, 76px); bottom: clamp(38px, 7vh, 78px); z-index: 1; max-width: 330px; pointer-events: none; }
        .scene-copy .scene-kicker { color: #f0a08d; font: 700 10px/1.4 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .16em; }
        .scene-copy h2 { margin: 11px 0 9px; color: #f3f0e7; font-size: clamp(25px, 3vw, 39px); line-height: 1.04; font-weight: 650; }
        .scene-copy p { margin: 0; color: rgba(228,235,225,.65); font-size: 13px; line-height: 1.6; }
        .scene-index { position: absolute; bottom: 42px; right: 40px; z-index: 1; color: rgba(238,242,232,.55); font: 11px 'JetBrains Mono', monospace; }
        .toast-deck { z-index: 20; }
        @media (max-width: 860px) {
            .page-shell { grid-template-columns: minmax(360px, 49%) minmax(0, 51%); }
            .login-side { padding: 36px 30px; }
            .scene-topline { left: 22px; right: 22px; }
            .scene-copy { left: 25px; right: 20px; bottom: 34px; }
        }
        @media (max-width: 680px) {
            .page-shell { display: flex; flex-direction: column; }
            .login-side { order: 2; min-height: auto; padding: 34px 22px 40px; border-right: 0; }
            .character-side { order: 1; min-height: 48vh; height: 48vh; max-height: 440px; }
            .character-gif { object-position: center 23%; }
            .auth-wrapper { width: min(100%, 430px); }
            .brand-showcase { margin-bottom: 22px; }
            .scene-topline { top: 19px; left: 19px; right: 19px; }
            .scene-copy { left: 22px; bottom: 22px; max-width: 235px; }
            .scene-copy h2 { font-size: 25px; }
            .scene-copy p { max-width: 210px; font-size: 11px; }
            .scene-index { right: 20px; bottom: 23px; }
        }
        @media (max-width: 400px) {
            .character-side { min-height: 42vh; height: 42vh; }
            .login-side { padding: 28px 18px 34px; }
            .login-intro h2 { font-size: 26px; }
            .option-row { align-items: flex-start; gap: 10px; }
            .option-row > span { white-space: nowrap; }
        }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
        }

        :root {
            --bg-base: #080b12;
            --bg-card: rgba(15, 23, 36, 0.88);
            --border-subtle: rgba(148, 163, 184, 0.14);
            --border-highlight: rgba(148, 163, 184, 0.28);
            --accent-purple: #60a5fa;
            --accent-purple-glow: rgba(59, 130, 246, 0.28);
            --text-primary: #f1f5f9;
            --text-secondary: #a7b3c5;
            --text-muted: #8290a4;
        }

        body { background: #080b12; }
        .login-side {
            background: linear-gradient(145deg, #0d1420, #090e17);
            border-right-color: rgba(148, 163, 184, .12);
        }
        .brand-logo-card { background: #111827; }
        .version-badge { background: rgba(59, 130, 246, .14); color: #93c5fd; }
        .login-intro .eyebrow { color: #93c5fd; }
        .login-intro h2 { color: #f1f5f9; }
        .login-intro p,
        .field-label { color: #a7b3c5; }
        .styled-input {
            background: rgba(15, 23, 36, .86);
            border-color: rgba(148, 163, 184, .18);
            color: #f1f5f9;
        }
        .styled-input:hover { border-color: rgba(148, 163, 184, .32); }
        .styled-input:focus {
            border-color: #60a5fa;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
        }
        .auth-submit-btn {
            background: #2563eb;
            color: #eff6ff;
            box-shadow: 0 8px 24px rgba(37, 99, 235, .2);
        }
        .auth-submit-btn:hover {
            background: #3478f6;
            box-shadow: 0 10px 30px rgba(37, 99, 235, .28);
        }
        .auth-footer-note i { color: #60a5fa; }
        .character-side {
            background: radial-gradient(ellipse at 52% 45%, #101b31 0%, #0b1220 48%, #080b12 100%);
        }
        .character-side::before {
            background-image:
                linear-gradient(rgba(96, 165, 250, .08) 1px, transparent 1px),
                linear-gradient(90deg, rgba(96, 165, 250, .08) 1px, transparent 1px);
        }
        .character-gif {
            filter: saturate(.82) hue-rotate(15deg) contrast(1.05) brightness(.9);
        }
        .character-side::after {
            background:
                radial-gradient(ellipse at 52% 45%, rgba(59, 130, 246, .08), transparent 55%),
                linear-gradient(180deg, rgba(8, 11, 18, .12), transparent 22%, transparent 70%, rgba(8, 11, 18, .8));
        }
        .scene-copy .scene-kicker { color: #93c5fd; }
        .scene-status::before { background: #60a5fa; box-shadow: 0 0 12px rgba(96, 165, 250, .7); }

        :root {
            --login-accent: #60a5fa;
            --login-accent-strong: #2563eb;
            --login-accent-soft: rgba(59, 130, 246, .14);
            --login-surface: #0d1420;
            --login-page: #080b12;
        }

        :root[data-theme="violet"] {
            --bg-base: #0d0a16;
            --accent-purple: #a78bfa;
            --accent-purple-glow: rgba(139, 92, 246, .28);
            --text-primary: #f5f3ff;
            --text-secondary: #c4bdd5;
            --text-muted: #9c91b0;
            --login-accent: #a78bfa;
            --login-accent-strong: #7c3aed;
            --login-accent-soft: rgba(139, 92, 246, .16);
            --login-surface: #171023;
            --login-page: #0d0a16;
        }

        :root[data-theme="emerald"] {
            --bg-base: #07120f;
            --accent-purple: #34d399;
            --accent-purple-glow: rgba(16, 185, 129, .25);
            --text-primary: #ecfdf5;
            --text-secondary: #b6d2c4;
            --text-muted: #88a997;
            --login-accent: #34d399;
            --login-accent-strong: #059669;
            --login-accent-soft: rgba(16, 185, 129, .16);
            --login-surface: #0e1d18;
            --login-page: #07120f;
        }

        :root[data-theme="graphite"] {
            --bg-base: #101113;
            --accent-purple: #d4d4d8;
            --accent-purple-glow: rgba(212, 212, 216, .2);
            --text-primary: #f4f4f5;
            --text-secondary: #c4c6ca;
            --text-muted: #92959c;
            --login-accent: #d4d4d8;
            --login-accent-strong: #71717a;
            --login-accent-soft: rgba(212, 212, 216, .12);
            --login-surface: #1a1b1e;
            --login-page: #101113;
        }

        body,
        .login-side { background-color: var(--login-page); }

        body { background: var(--login-page); }

        .login-side {
            background: linear-gradient(145deg, var(--login-surface), var(--login-page));
            border-right-color: var(--border-subtle);
        }

        .styled-input:focus {
            border-color: var(--login-accent);
            box-shadow: 0 0 0 3px var(--login-accent-soft);
        }

        .auth-submit-btn {
            background: var(--login-accent-strong);
            color: #f8fafc;
            box-shadow: 0 8px 24px var(--login-accent-soft);
        }

        .auth-submit-btn:hover { background: var(--login-accent); color: #07111f; }
        .version-badge { background: var(--login-accent-soft); color: var(--login-accent); }
        .login-intro .eyebrow,
        .auth-footer-note i,
        .scene-copy .scene-kicker { color: var(--login-accent); }
        .character-side {
            background: radial-gradient(ellipse at 52% 45%, var(--login-surface), var(--login-page) 78%);
        }

        .character-side::before {
            background-image:
                linear-gradient(color-mix(in srgb, var(--login-accent) 9%, transparent) 1px, transparent 1px),
                linear-gradient(90deg, color-mix(in srgb, var(--login-accent) 9%, transparent) 1px, transparent 1px);
        }

        .character-side::after {
            background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--login-page) 80%, transparent));
        }

        .otp-entry {
            position: relative;
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: clamp(6px, 1.8vw, 11px);
            width: 100%;
            margin-top: 6px;
        }

        .otp-slot {
            display: grid;
            min-width: 0;
            height: clamp(50px, 7vw, 62px);
            place-items: center;
            border: 1px solid var(--border-highlight);
            border-radius: 12px;
            background: rgba(15, 23, 36, .86);
            color: var(--text-primary);
            font: 700 clamp(20px, 4vw, 25px)/1 'JetBrains Mono', monospace;
            transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
        }

        .otp-slot.is-filled { border-color: var(--login-accent); background: var(--login-accent-soft); }
        .otp-entry:focus-within .otp-slot.is-current {
            border-color: var(--login-accent);
            box-shadow: 0 0 0 3px var(--login-accent-soft);
            transform: translateY(-2px);
        }

        .otp-input {
            position: absolute;
            z-index: 2;
            inset: 0;
            width: 100%;
            height: 100%;
            min-height: 0;
            padding: 0;
            border: 0;
            background: transparent !important;
            color: transparent !important;
            caret-color: transparent;
            opacity: .02;
            cursor: text;
        }

        .otp-input:focus { outline: none; box-shadow: none; }
        .otp-help { display: block; min-height: 16px; margin-top: 9px; color: var(--text-muted); font-size: 11px; }

        html.high-contrast { --border-subtle: rgba(226, 232, 240, .28); --border-highlight: rgba(226, 232, 240, .48); --text-secondary: #dbe5f1; --text-muted: #b7c4d5; }
        html.large-text .auth-wrapper { font-size: 1.06rem; }
        html.reduce-motion *,
        html.reduce-motion *::before,
        html.reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }

        @media (max-width: 860px) {
            .page-shell { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
            .login-side { padding: clamp(28px, 5vw, 52px); }
            .auth-wrapper { width: min(100%, 410px); }
            .scene-copy { max-width: 290px; }
        }

        @media (max-width: 760px) {
            .page-shell { display: flex; flex-direction: column; }
            .character-side { order: 1; min-height: clamp(210px, 34vh, 330px); height: clamp(210px, 34vh, 330px); max-height: 330px; }
            .login-side { order: 2; min-height: auto; flex: 1; padding: 30px 22px 40px; border-right: 0; }
            .auth-wrapper { width: min(100%, 430px); }
            .character-gif { object-position: center 24%; }
            .scene-topline { top: 18px; left: 20px; right: 20px; }
            .scene-copy { left: 22px; right: 20px; bottom: 20px; max-width: 250px; }
            .scene-copy h2 { font-size: clamp(23px, 5vw, 30px); }
            .scene-copy p { font-size: 11px; }
        }

        @media (max-width: 420px) {
            .character-side { min-height: 190px; height: 29vh; }
            .login-side { padding: 26px 18px 34px; }
            .login-intro h2 { font-size: clamp(23px, 7vw, 27px); }
            .otp-entry { gap: 5px; }
            .otp-slot { height: 52px; border-radius: 9px; }
            .auth-submit-btn { width: 100%; min-height: 50px; }
        }

        @media (max-height: 540px) and (min-width: 761px) {
            .login-side { padding-top: 20px; padding-bottom: 20px; }
            .brand-showcase { margin-bottom: 14px; }
            .login-intro { margin-bottom: 15px; }
            .character-side { min-height: 100vh; }
        }

        @media (max-width: 600px) {
            html,
            body {
                min-width: 320px;
                height: auto;
                min-height: 100%;
                overflow-x: clip;
                overflow-y: auto;
            }

            body { min-height: 100vh; min-height: 100svh; }
            .page-shell { width: 100%; min-height: 100vh; min-height: 100svh; overflow: clip; }
            .character-side {
                width: 100%;
                min-height: 180px;
                height: clamp(180px, 27svh, 250px);
                max-height: 250px;
            }
            .character-gif { width: 100%; height: 100%; object-fit: cover; object-position: center 24%; }
            .scene-topline { top: max(14px, env(safe-area-inset-top)); left: 16px; right: 16px; font-size: 9px; }
            .scene-copy { left: 18px; right: 65px; bottom: 17px; max-width: 270px; }
            .scene-copy h2 { margin: 7px 0 5px; font-size: clamp(20px, 5.7vw, 27px); }
            .scene-copy p { max-width: 245px; font-size: 11px; line-height: 1.45; }
            .scene-index { right: 16px; bottom: 18px; font-size: 10px; }
            .login-side {
                width: 100%;
                min-height: 0;
                padding: 25px 20px calc(26px + env(safe-area-inset-bottom));
                align-items: flex-start;
            }
            .auth-wrapper { width: 100%; max-width: 430px; margin: 0 auto; }
            .brand-showcase { margin-bottom: 20px; }
            .brand-lockup { gap: 12px; margin-bottom: 20px; }
            .brand-logo-card { width: 48px; height: 48px; border-radius: 13px; }
            .brand-logo-img { border-radius: 10px; }
            .brand-title-text { flex-wrap: wrap; gap: 7px; font-size: 17px; }
            .brand-subtitle-text { font-size: 11px; }
            .login-intro { margin-bottom: 19px; }
            .login-intro h2 { font-size: clamp(23px, 7vw, 28px); line-height: 1.16; }
            .login-intro p { font-size: 13px; line-height: 1.5; }
            .form-field { margin-bottom: 17px; }
            .styled-input { min-height: 50px; font-size: 16px; }
            .auth-submit-btn { min-height: 52px; }
            .card-meta-footer { gap: 12px; flex-wrap: wrap; }
            .toast-deck { top: max(12px, env(safe-area-inset-top)); right: 12px; left: 12px; width: auto; max-width: none; }
        }

        @media (max-width: 380px) {
            .login-side { padding-right: 16px; padding-left: 16px; }
            .character-side { min-height: 165px; height: 23svh; }
            .scene-copy { left: 15px; right: 56px; bottom: 14px; }
            .scene-copy p { font-size: 10px; }
            .scene-index { right: 13px; bottom: 15px; }
            .otp-entry { gap: 5px; }
            .otp-slot { height: 48px; border-radius: 8px; }
        }

        @media (max-width: 760px) and (max-height: 560px) {
            .character-side { min-height: 145px; height: 32svh; max-height: 190px; }
            .login-side { padding-top: 20px; }
            .brand-lockup { margin-bottom: 14px; }
            .brand-showcase { margin-bottom: 15px; }
            .login-intro { margin-bottom: 14px; }
        }

        .scene-copy .scene-title-gradient {
            width: fit-content;
            max-width: 100%;
            color: var(--login-accent);
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            font-size: clamp(24px, 3.2vw, 39px);
            font-weight: 800;
            letter-spacing: .035em;
            text-transform: uppercase;
            line-height: 1.12;
            background: linear-gradient(
                105deg,
                #fff 0%,
                var(--login-accent) 28%,
                #e9d5ff 48%,
                var(--login-accent-strong) 68%,
                #fff 88%
            );
            background-size: 240% 100%;
            background-position: 0% 50%;
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: yumiTitleGradient 6s ease-in-out infinite;
            filter: drop-shadow(0 0 16px var(--login-accent-soft));
        }

        @keyframes yumiTitleGradient {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        @media (prefers-reduced-motion: reduce) {
            .scene-copy .scene-title-gradient {
                animation: none;
                background-position: 50% 50%;
            }
        }

        html.reduce-motion .scene-copy .scene-title-gradient {
            animation: none;
            background-position: 50% 50%;
        }

        .styled-input.is-invalid {
            border-color: #ef4444 !important;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, .16) !important;
            background-color: rgba(127, 29, 29, .16) !important;
        }

        .styled-input.is-invalid:focus { border-color: #f87171 !important; }
        .otp-entry.has-error .otp-slot {
            border-color: #ef4444;
            background: rgba(127, 29, 29, .2);
            color: #fecaca;
        }
        .otp-entry.has-error:focus-within .otp-slot.is-current {
            border-color: #f87171;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, .18);
        }
