        /* Step117: shared tokens moved to frontend-foundation.css. */

        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: var(--font-family-ui);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background: linear-gradient(180deg, var(--surface-muted) 0%, var(--bg) 100%);
            color: var(--text);
            overflow-x: hidden;
        }
        .auth-shell {
            width: 100%;
            max-width: 420px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow);
            padding: 28px;
        }
        h1 {
            font-size: var(--font-size-display);
            letter-spacing: -0.02em;
            margin-bottom: 8px;
        }
        .subtitle {
            color: var(--text-muted);
            margin-bottom: 22px;
            font-size: var(--font-size-body);
            line-height: 1.5;
        }
        .field { margin-bottom: 14px; }
        .field label {
            display: block;
            font-size: var(--font-size-body-sm);
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 6px;
        }
        .field input {
            width: 100%;
            min-height: 44px;
            padding: 10px 12px;
            border: 1px solid var(--border);
            border-radius: 12px;
            font-size: var(--font-size-body);
            color: var(--text);
            background: var(--surface);
        }
        .field input:focus {
            outline: none;
            border-color: #94a3b8;
            box-shadow: 0 0 0 3px rgba(148,163,184,.18);
        }
        .error {
            display: none;
            margin-bottom: 14px;
            padding: 10px 12px;
            background: var(--danger-soft);
            color: var(--danger);
            border: 1px solid #fecaca;
            border-radius: 12px;
            font-size: var(--font-size-body);
        }
        .btn {
            width: 100%;
            min-height: 44px;
            border: none;
            border-radius: 12px;
            background: var(--accent);
            color: var(--surface);
            font-weight: 700;
            font-size: var(--font-size-body);
            cursor: pointer;
        }
        .btn:hover { background: var(--accent-hover); }
        .btn:disabled { opacity: .7; cursor: wait; }
        .note {
            margin-top: 14px;
            color: var(--text-muted);
            font-size: var(--font-size-body-sm);
            text-align: center;
        }

        @media (max-width: 640px) {
            body {
                align-items: flex-start;
                padding: 16px;
            }
            .auth-shell {
                max-width: none;
                border-radius: var(--radius-lg);
                padding: 20px 18px;
                margin: 12px 0;
            }
            h1 { font-size: var(--font-size-title-lg); }
            .subtitle { margin-bottom: 18px; }
            .btn { width: 100%; min-height: 46px; }
            .field input { min-height: 46px; }
        }
        @media (max-height: 720px) {
            body { align-items: flex-start; }
        }

/* Step 51 v1.1.0: login CSP helpers. */
.login-error.open { display: block; }
.login-error:not(.open) { display: none; }
/* Step 51 v1.1.1: login error CSP-safe visibility for existing .error node. */
.error.open { display: block; }
.error:not(.open) { display: none; }
