.account-auth {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--canvas);
}

.account-auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 8px clamp(14px, 4vw, 48px);
  color: var(--ink);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.account-auth-header .brand { padding-inline: 2px; color: inherit; }
.account-auth-header .account-auth-back { min-height: 42px; padding-inline: 12px; }

.account-auth-stage {
  display: grid;
  flex: 1;
  justify-items: center;
  align-items: start;
  padding: clamp(34px, 9vh, 92px) 20px 48px;
}

.account-auth-panel {
  width: min(100%, 438px);
  padding: clamp(24px, 5vw, 38px);
  border-radius: 14px;
  box-shadow: 0 1px 2px #6b665f0a, 0 14px 38px -26px #6b665f38;
}

.account-auth-intro { margin-bottom: 25px; }
.account-auth-intro h1 { margin-top: 15px; font-size: clamp(28px, 5.5vw, 34px); letter-spacing: -.045em; }
.account-auth-intro p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.account-auth-intro strong { color: var(--ink); font-weight: 650; }

.account-auth-lock {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
  color: var(--accent);
}
.account-auth-lock svg { stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; fill: none; }

.account-auth-form { display: grid; gap: 15px; }
.auth-field { gap: 6px; }
.auth-field input { min-height: 46px; padding: 10px 12px; font-size: 16px; }
.auth-field input[aria-invalid="true"] { border-color: #ad454e; }
.auth-optional { margin-inline-start: 3px; color: var(--muted); font-size: 12px; font-weight: 480; }
.auth-password-field { position: relative; }
.auth-password-field input { padding-inline-end: 48px; }
.auth-password-field .auth-password-toggle {
  top: 3px;
  inset-inline-end: 4px;
  width: 42px;
  height: 42px;
  min-height: 0;
  padding: 0;
  color: var(--muted);
}
.auth-password-field .auth-password-toggle:hover { color: var(--accent); }
.auth-password-toggle svg { width: 18px; height: 18px; }
#account-auth-code { font-variant-numeric: tabular-nums; letter-spacing: .24em; }

.auth-error, .auth-notice {
  margin: 0;
  border: 1px solid #f0d8d8;
  border-radius: 8px;
  background: #fcf0ef;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.5;
}
.auth-notice { background: var(--soft); border-color: var(--line); color: var(--accent-hover); }
.auth-submit, .auth-alternative-button { width: 100%; min-height: 46px; white-space: normal; text-align: center; }
.auth-submit { margin-top: 3px; padding-inline: 36px; box-shadow: 0 1px 2px #b16a4b32; }
.auth-submit svg { position: absolute; inset-block-start: 50%; inset-inline-end: 14px; transform: translateY(-50%); }
.auth-submit[aria-busy="true"] { opacity: .78; }
.auth-code-actions { display: flex; justify-content: space-between; gap: 6px; }
.auth-code-actions .button { min-height: 44px; padding-inline: 3px; }

.auth-alternatives { display: grid; gap: 8px; margin-top: 14px; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-mode-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.auth-mode-footer .button { min-height: 44px; padding-inline: 7px; }

@media (max-width: 480px) {
  .account-auth { background: var(--surface); }
  .account-auth-header { min-height: 57px; }
  .account-auth-header .account-auth-back { font-size: 13px; padding-inline: 8px; }
  .account-auth-stage { padding: 34px clamp(18px, 6vw, 31px) 42px; }
  .account-auth-panel { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
}
