#authGate [hidden] { display:none !important; }
/* Scroll the page rather than nesting a scroll area inside the login card. */
#authGate {
  height:100dvh;
  padding:24px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
  padding-top:max(24px, env(safe-area-inset-top));
  padding-bottom:max(24px, env(safe-area-inset-bottom));
  align-items:start;
  overscroll-behavior-y:contain;
}
#authGate .auth-card { margin-block:auto; max-height:none; overflow:visible; padding:28px; }
#authGate .auth-card { width:min(100%,440px); border-radius:16px; box-shadow:0 8px 24px rgba(20,44,80,.06); }
#authGate .auth-brand { margin-bottom:20px; }
#authGate .auth-mark { flex-shrink:0; }
#authGate .auth-mark { border:0; border-radius:0; background:transparent; }
#authGate h1 { font-size:28px; line-height:1.25; }
#authGate h1 + p { margin:8px 0 20px; font-size:14px; line-height:1.5; color:#687d99; }
#authGate .auth-form { gap:10px; }
#authGate .auth-form input:not([type="checkbox"]) {
  display:block; box-sizing:border-box; width:100%; max-width:100%; min-width:0; min-height:48px; margin:0; font-size:16px; background:#fff; scroll-margin-block:24px;
}
#authGate .auth-form input:is(#registerCode,#recoveryCode,#emailLoginCode) {
  width:100%; min-width:0; max-width:100%; height:56px; padding:10px 14px;
  border:1px solid #d5deeb; border-radius:10px; background:#f8faff;
  color:#203653; text-align:center; font-size:22px; font-weight:700;
  letter-spacing:.38em; font-variant-numeric:tabular-nums;
}
#authGate .auth-form input:is(#registerCode,#recoveryCode,#emailLoginCode):focus { border-color:#1769c2; outline:3px solid #dceaff; }
#authGate .auth-form label { font-size:14px; }
.auth-password-field { position:relative; }
#authGate .auth-password-field input { padding-right:74px; }
.auth-password-toggle {
  position:absolute; right:4px; top:3px; min-width:62px; min-height:44px;
  border:0; border-radius:8px; background:transparent;
  color:#1769c2; font:inherit; font-size:14px; font-weight:800; cursor:pointer;
}
#authGate .remember-check { min-height:44px; cursor:pointer; }
#authGate .remember-check input { width:20px; height:20px; accent-color:#1769c2; }
#authGate .auth-submit { min-height:52px; font-size:16px; }
#authGate .auth-submit:disabled { opacity:.65; cursor:wait; }
#authGate .auth-error:empty { display:none; }
#authGate .auth-error { line-height:1.5; overflow-wrap:anywhere; }
#authGate .auth-note { font-size:12px; overflow-wrap:anywhere; }
#authGate .auth-note:empty { display:none; }
#authGate .auth-links { gap:2px 14px; margin-top:12px; }
#authGate .auth-secondary { min-height:40px; margin-top:4px; font-size:13px; padding:7px 0; }
#authGate button:focus-visible { outline:3px solid #9bc5fb; outline-offset:3px; }
@media (max-width:480px) {
  #authGate .auth-card { padding:24px 20px; border-radius:20px; }
}
@media (max-height:600px) {
  #authGate { padding-top:12px; padding-bottom:12px; }
  #authGate .auth-card { margin-block:0; }
}
