body:has(.account-modal[open]) { overflow: hidden; }
.account-modal { width: min(400px, calc(100% - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 24px; border: 1px solid var(--step-background, #EAF1FB); border-radius: 16px; background: var(--background, #F7F5F0); color: var(--ink, #20242B); font-family: Manrope, Arial, sans-serif; box-shadow: 0 24px 80px rgb(17 31 56 / 19%); overflow-y: auto; }
.account-modal::backdrop { background: rgb(17 31 56 / 54%); }
.account-modal [hidden] { display: none !important; }
.account-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.account-modal-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; text-decoration: none; color: var(--navy, #111F38); }
.account-modal-brand { min-width: 0; }
.account-modal-brand img { display: block; width: 210px; max-width: 100%; height: auto; }
.account-modal svg { width: 24px; height: 24px; flex-shrink: 0; }
.account-modal-brand svg, .account-modal-close svg, .account-submit svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-modal-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 6px; border: 0; border-radius: 6px; color: var(--ink, #20242B); background: transparent; cursor: pointer; }
.account-modal-close:hover { background: var(--step-background, #EAF1FB); }
.account-modal h2 { font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: -1.2px; }
.account-modal-subtitle { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted, #555F6D); }
.account-modal-providers { display: grid; gap: 10px; margin-top: 18px; }
.account-provider { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 16px; border: 1px solid color-mix(in srgb, var(--muted, #555F6D) 45%, white); border-radius: 8px; background: var(--card-background, #FFFFFF); color: var(--ink, #20242B); font: inherit; font-weight: 700; cursor: pointer; }
.account-provider:hover { background: var(--step-background, #EAF1FB); }
.account-divider { display: flex; align-items: center; gap: 16px; margin: 16px 0; color: var(--muted, #555F6D); font-size: 15px; }
.account-divider::before, .account-divider::after { content: ""; height: 1px; flex: 1; background: color-mix(in srgb, var(--muted, #555F6D) 25%, white); }
.account-modal form[data-account-form] { display: grid; gap: 14px; margin-top: 16px; }
.account-divider + form[data-account-form] { margin-top: 0; }
.account-field { display: grid; gap: 6px; }
.account-field label { font-size: 15px; font-weight: 700; }
.account-field input { width: 100%; min-width: 0; height: 44px; border: 1px solid color-mix(in srgb, var(--muted, #555F6D) 45%, white); border-radius: 8px; padding: 10px 14px; background: var(--card-background, #FFFFFF); color: var(--ink, #20242B); font: inherit; font-size: 16px; }
.account-field input::placeholder { color: var(--muted, #555F6D); opacity: 1; }
.account-submit { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; margin-top: 4px; border: 0; border-radius: 8px; background: var(--navy, #111F38); color: var(--background, #F7F5F0); font: inherit; font-weight: 700; cursor: pointer; }
.account-submit:hover { background: var(--navy-light, #20314B); }
.account-submit:disabled { opacity: .65; cursor: wait; }
.account-switch { margin-top: 20px; text-align: center; color: var(--muted, #555F6D); font-size: 15px; }
.account-switch a, .account-forgot { color: var(--blue, #2458DA); text-underline-offset: 2px; }
.account-modal-error { margin-block: 16px; padding: 12px; border-radius: 6px; background: var(--step-background, #EAF1FB); color: var(--ink, #20242B); font-size: 14px; }
.account-modal :focus-visible { outline: 3px solid var(--blue, #2458DA); outline-offset: 3px; }
.account-loading { padding: 32px 0; color: var(--muted, #555F6D); }
@media (max-width: 600px) {
  .account-modal { padding: 24px; max-height: calc(100dvh - 24px); border-radius: 16px; }
  .account-modal-header { margin-bottom: 20px; }
  .account-modal-brand { font-size: 18px; }
  .account-modal h2 { font-size: 28px; }
  .account-modal-subtitle { font-size: 14px; }
}

.account-result { color: var(--muted, #555F6D); }
.account-result strong { overflow-wrap: anywhere; }
.account-result a { color: #2458DA; text-decoration: underline; }
.account-result .auth-provider { min-height: 44px; border: 0; border-radius: 6px; padding: 10px 16px; background: #111F38; color: #F7F5F0; font: inherit; cursor: pointer; }
.account-modal button:disabled { opacity: .6; cursor: wait; }
.account-modal-countdown { color: var(--muted, #555F6D); font-size: 14px; }

.account-modal-header { position: sticky; top: 0; z-index: 1; background: var(--background, #F7F5F0); }
.account-result { display: grid; gap: 12px; margin-top: 12px; }
.account-modal .account-result form[data-account-form] { margin-top: 0; }
.account-modal [data-auth-announcement]:not(:empty) { margin-top: 12px; }
.account-modal [data-auth-recovery-at]:empty { position: absolute; }
