.recovery-dialog {
    width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
    margin: auto; padding: 28px; border: 1px solid #e5e7eb; border-radius: 20px;
    background: #fff; color: #111827; box-shadow: 0 24px 80px #11182726; overflow-y: auto;
}
.recovery-dialog::backdrop { background: #11182773; }
#errorAlert.is-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
#errorAlert.is-success > i { display: none; }
.recovery-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recovery-heading h2 { font-size: 22px; font-weight: 650; }
.recovery-heading button { border: 0; background: transparent; color: #6b7280; width: 36px; height: 36px; font-size: 28px; cursor: pointer; }
.recovery-intro { margin: 8px 0 20px; font-size: 14px; color: #6b7280; line-height: 1.6; }
.recovery-dialog label { display: block; font-size: 14px; font-weight: 500; margin: 16px 0 8px; }
.recovery-dialog input { box-sizing: border-box; width: 100%; min-width: 0; height: 46px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 9px; font: inherit; font-size: 16px; background: #fff; color: #111827; }
.recovery-dialog input:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.recovery-code-row { display: flex; gap: 10px; }
.recovery-code-row input { flex: 1; }
.recovery-code-row button { flex: 0 0 auto; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 9px; background: #f9fafb; color: #111827; font: inherit; font-size: 14px; cursor: pointer; }
.recovery-message { min-height: 24px; margin: 14px 0; font-size: 13px; line-height: 1.6; color: #4b5563; overflow-wrap: anywhere; }
.recovery-message.is-error { color: #b91c1c; }
.recovery-primary { width: 100%; min-height: 46px; border: none; border-radius: 9px; background: #111827; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.recovery-back { display: block; margin: 14px auto 0; border: 0; background: transparent; color: #4b5563; font: inherit; font-size: 14px; cursor: pointer; }
.recovery-dialog button:disabled { opacity: .55; cursor: default; }
@media (max-width: 768px) {
    .recovery-dialog {
        box-sizing: border-box;
        position: fixed;
        top: calc(var(--login-viewport-top, 0px) + env(safe-area-inset-top, 0px));
        bottom: calc(100% - var(--login-viewport-top, 0px) - var(--login-viewport-height, 100dvh) + env(safe-area-inset-bottom, 0px));
        max-height: calc(var(--login-viewport-height, 100dvh) - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        scroll-padding-block: 16px;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }
}
@media (max-width: 400px) { .recovery-dialog { padding: 20px; } }
