        /* Signup flow styles cover AJAX-replaced cards, verification timers, and CAPTCHA gates. */
        body {
            background-color: var(--page-bg);
            color: var(--text);
        }
        .signup-page {
            flex: 1 0 auto;
            min-height: 100%;
            padding: calc(var(--nav-height) + 32px) 16px 40px;
            display: grid;
            place-items: center;
            background:
                var(--page-bg-gradient),
                var(--page-bg);
        }
        .signup-card {
            width: min(720px, 96vw);
            background:
                var(--liquid-linear-highlight),
                var(--glass-card-bg);
            border: 1px solid var(--panel-border);
            border-radius: 18px;
            padding: 30px 34px;
            box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
            display: grid;
            gap: 20px;
        }
        .signup-header {
            display: grid;
            gap: 6px;
        }
        .step-indicator {
            margin: 0;
            font-weight: 700;
            font-size: 11px;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: rgba(211, 220, 242, 0.72);
        }
        h1 {
            margin: 0;
            font-size: 26px;
            line-height: 1.16;
            letter-spacing: 0.01em;
            color: var(--text);
        }
        .subtitle {
            margin: 0;
            color: var(--muted);
            font-size: 14px;
            line-height: 1.45;
        }
        .notice-banner {
            background: rgba(34, 197, 94, 0.16);
            border: 1px solid rgba(34, 197, 94, 0.45);
            color: #c3f1d5;
            padding: 10px 12px;
            border-radius: 10px;
            font-size: 13px;
            animation: messageDrop 0.2s ease-out both;
        }
        .notice-toast {
            position: fixed;
            top: calc(var(--nav-height) + 12px);
            left: 50%;
            transform: translateX(-50%);
            width: min(720px, calc(100% - 32px));
            z-index: 1500;
        }
        /* The form card is replaced after AJAX validation, so selector names stay stable. */
        .signup-form {
            display: grid;
            gap: 16px;
        }
        .field-row {
            display: grid;
            gap: 16px;
        }
        .field-row.two {
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        }
        .field {
            display: grid;
            gap: 6px;
            position: relative;
            width: 100%;
        }
        .field-header {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
            position: relative;
            min-height: 18px;
        }
        label {
            font-size: 12px;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--muted);
            display: inline-block;
            padding-right: 0;
        }
        .required-star {
            color: #f28b82;
            margin-left: 4px;
        }
        .required-note {
            margin: 0;
            color: var(--muted);
            font-size: 12px;
        }
        .field-error {
            margin: 0;
            color: #f28b82;
            font-size: 12px;
            text-align: right;
            position: static;
            margin-left: auto;
            max-width: 320px;
            line-height: 1.2;
            pointer-events: none;
        }
        input {
            width: 100%;
            display: block;
            background: var(--surface-muted-alt);
            border: 1px solid var(--panel-border);
            border-radius: 10px;
            padding: 12px 14px;
            color: var(--text);
            font-size: 14px;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            height: 44px;
        }
        input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
        }
        .field.has-error input {
            border-color: #ff4d4f;
            box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.25);
        }
        .field.has-error input:focus {
            border-color: #ff4d4f;
            box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.3);
        }
        .field.has-error {
            animation: fieldShake 0.18s ease-in-out 2;
        }
        @keyframes fieldShake {
            0% { transform: translateX(0); }
            25% { transform: translateX(-2px); }
            50% { transform: translateX(2px); }
            75% { transform: translateX(-2px); }
            100% { transform: translateX(0); }
        }
        input[readonly] {
            color: var(--muted);
            border-color: var(--border-subtle);
        }
        input:disabled {
            background: #3b1a1f;
            border-color: #ff4d4f;
            color: #ffd6d6;
            opacity: 0.9;
        }
        input:-webkit-autofill,
        input:-webkit-autofill:hover,
        input:-webkit-autofill:focus {
            -webkit-text-fill-color: var(--text);
            box-shadow: 0 0 0px 1000px var(--surface-muted-alt) inset;
            caret-color: var(--text);
            transition: background-color 9999s ease-in-out 0s;
        }
        input:autofill {
            box-shadow: 0 0 0px 1000px var(--surface-muted-alt) inset;
            -webkit-text-fill-color: var(--text);
            caret-color: var(--text);
        }
        .email-display {
            font-size: 14px;
            color: var(--muted);
        }
        .email-display strong {
            color: var(--text);
        }
        .resend-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .resend-link {
            background: transparent !important;
            border: none;
            padding: 0;
            color: var(--accent);
            font-size: 13px;
            cursor: pointer;
            box-shadow: none !important;
            filter: none !important;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            transition: color 0.2s ease, text-shadow 0.2s ease;
        }
        .resend-link:hover,
        .resend-link:focus-visible,
        .resend-link:active {
            box-shadow: none !important;
            filter: none !important;
            background: transparent !important;
        }
        .resend-link:hover,
        .resend-link:focus-visible {
            text-shadow: 0 0 8px rgba(0, 123, 255, 0.45);
        }
        .resend-link:disabled {
            color: var(--muted);
            cursor: not-allowed;
        }
        .resend-timer {
            color: var(--muted);
            font-size: 12px;
        }
        .form-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-top: 4px;
        }
        .footer-left {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--muted);
            font-size: 13px;
        }
        .footer-left a {
            color: var(--accent);
            text-decoration: none;
            font-weight: 600;
        }
        .footer-left a:hover {
            text-decoration: underline;
        }
        .btn {
            border: none;
            border-radius: 999px;
            padding: 12px 18px;
            padding-left: 42px;
            padding-right: 42px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.2s ease, box-shadow 0.2s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        .btn .btn-spinner {
            width: 14px;
            height: 14px;
            border: 2px solid rgba(255, 255, 255, 0.4);
            border-top-color: #ffffff;
            border-right-color: #ffffff;
            border-radius: 50%;
            display: inline-block;
            visibility: hidden;
            animation: spin 0.9s linear infinite;
            position: absolute;
            left: 14px;
        }
        .btn.loading .btn-spinner {
            visibility: visible;
        }
        .btn.loading .btn-label {
            opacity: 0.8;
        }
        .btn.primary {
            background: var(--accent);
            color: #ffffff;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.26);
        }
        .btn.primary:hover {
            background: var(--accent-dark);
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
        }
        .btn.secondary {
            background: var(--surface-muted-alt);
            color: var(--text);
            border: 1px solid var(--panel-border);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.26);
        }
        .btn.secondary:hover {
            background: var(--surface-hover-strong);
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
        }
        .btn:disabled,
        .resend-link:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .recaptcha-wrap {
            margin-top: 4px;
            display: grid;
            gap: 6px;
            justify-items: start;
        }
        .recaptcha-error {
            margin: 0;
            color: #f28b82;
            font-size: 12px;
        }
        @media (max-width: 640px) {
            .signup-card {
                padding: 24px 20px;
            }
            h1 {
                font-size: 24px;
            }
            .form-footer {
                flex-direction: column;
                align-items: stretch;
            }
            .form-footer .footer-left {
                order: 2;
            }
        }
