.auth-captcha {
    margin-top: 20px;
    min-width: 0;
    font-size: 14px;
    --altcha-max-width: 100%;
    --altcha-color-base: #f9fafb;
    --altcha-color-base-content: #374151;
    --altcha-border-color: #d5d6d7;
    --altcha-color-neutral: #d5d6d7;
    --altcha-color-neutral-content: #4b5563;
    --altcha-color-primary: #7e3af2;
    --altcha-color-primary-content: #fff;
    --altcha-color-success: #047857;
    --altcha-color-success-content: #fff;
    --altcha-color-error: #dc2626;
    --altcha-checkbox-border-color: #9ca3af;
    --altcha-checkbox-outline-color: #7e3af2;
    --altcha-border-radius: 6px;
    --altcha-padding: 14px;
    --altcha-transition-duration: 150ms;
}
.auth-captcha altcha-widget { display: block; width: 100%; min-height: 50px; }
.auth-captcha altcha-widget:not([data-captcha-ready]):not([hidden]) {
    position: relative;
    display: block;
    height: 52px;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid var(--altcha-border-color);
    border-radius: var(--altcha-border-radius);
    background: var(--altcha-color-base);
    color: var(--altcha-color-base-content);
}
.auth-captcha altcha-widget:not([data-captcha-ready]) > * { visibility: hidden; }
.auth-captcha altcha-widget:not([data-captcha-ready])::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 14px;
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    border: 2px solid var(--altcha-border-color);
    border-top-color: var(--altcha-color-primary);
    border-radius: 50%;
    animation: auth-captcha-spin 800ms linear infinite;
}
.auth-captcha altcha-widget:not([data-captcha-ready])::after {
    content: attr(data-loading-label);
    position: absolute;
    top: 14px;
    left: 44px;
    right: 14px;
    font-size: 14px;
    line-height: 22px;
}
@keyframes auth-captcha-spin { to { transform: rotate(360deg); } }
.auth-captcha__error { margin-top: 8px; color: #dc2626; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.auth-captcha [hidden] { display: none; }
.auth-captcha .altcha-checkbox svg polyline { stroke: var(--altcha-color-success-content); stroke-width: 2; fill: none; }
.auth-captcha .altcha-checkbox input:focus-visible { outline: 2px solid #7e3af2; outline-offset: 2px; }
.auth-account-notice { color: #1e40af; background: #eff6ff; border: 1px solid #bfdbfe; }
.theme-dark .auth-account-notice { color: #d1d5db; background: #24262d; border-color: #4b5563; }
.theme-dark .auth-account-notice svg { color: #cabffd; }
form:has([data-auth-captcha]) button[type=submit]:disabled { cursor: not-allowed; opacity: .55; }
.theme-dark .auth-captcha {
    --altcha-color-base: #374151;
    --altcha-color-base-content: #d1d5db;
    --altcha-border-color: #4b5563;
    --altcha-color-neutral: #4b5563;
    --altcha-color-neutral-content: #d1d5db;
    --altcha-checkbox-border-color: #9ca3af;
    --altcha-color-success: #34d399;
    --altcha-color-success-content: #064e3b;
    --altcha-color-error: #f87171;
}
.theme-dark .auth-captcha__error { color: #f87171; }
@media (prefers-reduced-motion: reduce) {
    .auth-captcha { --altcha-transition-duration: 0ms; }
    .auth-captcha altcha-widget::before { animation: none; }
}
