/* Scoped semantic colors prevent saved theme choices from reducing auth contrast. */
body #hostAuth {
  --auth-surface: #ffffff;
  --auth-text: #30233e;
  --auth-muted: #62546f;
  --auth-soft: #f1ebf8;
  --auth-line: #cbbddc;
  --auth-accent: #6530a7;
  color: var(--auth-text) !important;
  color-scheme: light;
}
body.dark #hostAuth {
  --auth-surface: #241c2e;
  --auth-text: #f5efff;
  --auth-muted: #d0c3df;
  --auth-soft: #342741;
  --auth-line: #78658d;
  --auth-accent: #d4b5ff;
  background: #18131f !important;
  color-scheme: dark;
}
body #hostAuth .host-auth-shell,
body #hostAuth .host-auth-form {
  background: var(--auth-surface) !important;
  color: var(--auth-text) !important;
}
body #hostAuth .host-auth-hero {
  background: var(--auth-soft) !important;
  color: var(--auth-text) !important;
}
body #hostAuth h1,
body #hostAuth h2,
body #hostAuth label,
body #hostAuth .host-auth-brand {
  color: var(--auth-text) !important;
  -webkit-text-fill-color: currentColor;
}
body #hostAuth .host-auth-hero p,
body #hostAuth .host-auth-hero li,
body #hostAuth .host-auth-form > p,
body #hostAuth .password-hint {
  color: var(--auth-muted) !important;
}
body #hostAuth .host-auth-tabs {
  background: var(--auth-soft) !important;
}
body #hostAuth .host-auth-tabs button {
  color: var(--auth-muted) !important;
  min-height: 44px;
}
body #hostAuth .host-auth-tabs button.on {
  background: var(--auth-surface) !important;
  color: var(--auth-text) !important;
}
body #hostAuth input {
  background: var(--auth-surface) !important;
  color: var(--auth-text) !important;
  -webkit-text-fill-color: var(--auth-text) !important;
  border-color: var(--auth-line) !important;
}
body #hostAuth input::placeholder {
  color: var(--auth-muted) !important;
  opacity: 1;
}
body #hostAuth input:-webkit-autofill {
  box-shadow: 0 0 0 1000px var(--auth-surface) inset !important;
}
body #hostAuth .host-auth-link,
body #hostAuth .account-password button {
  color: var(--auth-accent) !important;
  min-height: 44px;
}
body #hostAuth .host-auth-submit {
  background: #6530a7 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  min-height: 48px;
}
body #hostAuth .host-auth-submit:hover {
  background: #512486 !important;
}
body #hostAuth .host-auth-message {
  color: #b42336 !important;
}
body.dark #hostAuth .host-auth-message {
  color: #ffabb5 !important;
}
body #hostAuth button:focus-visible,
body #hostAuth input:focus-visible {
  outline: 3px solid var(--auth-accent);
  outline-offset: 3px;
}
body #hostAuth button:disabled,
.account-dialog button:disabled {
  opacity: 0.65;
  cursor: wait;
}
body .email-badge.unverified {
  color: #a51d31;
  background: #ffe8ec;
}
body.dark .email-badge.unverified {
  color: #ffb7c1;
  background: #4c202b;
}
body #compactProfile.needs-verification:after {
  background: #d22f48;
}
.account-dialog {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.account-dialog > header {
  position: sticky;
  top: 0;
  background: var(--p, #fff);
  z-index: 1;
}
.account-dialog > header button {
  min-width: 44px;
  min-height: 44px;
  flex: none;
}
.account-dialog h2 {
  overflow-wrap: anywhere;
}
.account-dialog .btn {
  min-height: 44px;
  white-space: normal;
}
.account-dialog [role="status"]:empty {
  display: none;
}
.account-dialog input:focus-visible {
  outline: 3px solid #8051c9;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  body #hostAuth {
    padding: 0;
  }
  body #hostAuth .host-auth-shell {
    border-radius: 0;
  }
  body #hostAuth .host-auth-form {
    padding: 32px 24px;
    min-width: 0;
  }
  .account-dialog h2 {
    font-size: 21px;
  }
}
/* Legacy auth rules also qualify these elements with .host-auth-form. */
body #hostAuth .host-auth-form h2,
body #hostAuth .host-auth-form label,
body #hostAuth .host-auth-form .pocket-auth-brand,
body #hostAuth .host-auth-form .pocket-auth-brand strong {
  color:var(--auth-text)!important;
  -webkit-text-fill-color:var(--auth-text)!important;
}
