.recovery-dialog {
  box-sizing: border-box;
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: clamp(20px, 5vw, 32px);
  overflow-y: auto;
  border: 1px solid #d9e3eb;
  border-radius: 24px;
  background: #fff;
  color: #132c3d;
  box-shadow: 0 24px 80px #081e3540;
}
.recovery-dialog::backdrop { background: #081e3599; backdrop-filter: blur(3px); }
.recovery-dialog [hidden] { display: none !important; }
.recovery-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recovery-step { color: #087b72; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.recovery-close { width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 50%; background: #eef3f6; color: #304957; font-size: 24px; cursor: pointer; }
.recovery-dialog h2 { margin: 12px 0 8px; font-size: clamp(1.35rem, 5vw, 1.7rem); line-height: 1.2; }
.recovery-dialog p { margin: 8px 0; line-height: 1.5; }
.recovery-recipient { padding: 10px 14px; border-radius: 12px; background: #eef6fa; font-weight: 650; overflow-wrap: anywhere; }
.recovery-dialog form { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.recovery-dialog label { font-weight: 650; }
.recovery-dialog input { box-sizing: border-box; width: 100%; min-width: 0; height: 48px; padding: 10px 14px; border: 1px solid #bacddc; border-radius: 12px; background: #fff; color: inherit; font: inherit; font-size: 16px; }
.recovery-dialog input:focus-visible, .recovery-dialog button:focus-visible { outline: 3px solid #1b9f9470; outline-offset: 3px; }
.recovery-dialog input.recovery-code { height: 62px; text-align: center; font: 700 1.8rem ui-monospace, monospace; letter-spacing: .3em; }
.recovery-dialog small { color: #526879; line-height: 1.45; }
.recovery-dialog .button { box-sizing: border-box; width: 100%; justify-content: center; min-height: 46px; }
.recovery-dialog .button:disabled { opacity: .6; cursor: wait; }
.recovery-status:empty { display: none; }
.recovery-dialog .recovery-status { margin-top: 16px; padding: 12px; border-radius: 12px; background: #edf7f4; color: #165c48; font-size: .95rem; }
.recovery-status[data-error="true"] { background: #fff1f1; color: #a22935; }
.recovery-text-button { display: block; margin: 16px auto 0; padding: 8px; border: 0; background: transparent; color: #29526c; text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; }
#password-request-form[data-code-recovery] button:disabled { opacity: .65; cursor: wait; }
@media (max-height: 640px) { .recovery-dialog { padding: 18px; border-radius: 18px; } .recovery-dialog form { margin-top: 12px; gap: 8px; } }
