.auth-dialog {
  width: min(480px, calc(100vw - 32px));
  max-width: 480px;
  height: auto;
  min-height: min(480px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  position: fixed;
  inset: 50% 0 auto;
  margin: 0 auto;
  transform: translateY(calc(-50% - 12px));
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: #29394e;
  font-family: Poppins, Aptos, "Segoe UI", sans-serif;
  box-shadow: 0 24px 80px rgb(19 31 48 / 26%);
}
.auth-dialog::backdrop {
  background: rgb(31 43 58 / 48%);
  backdrop-filter: blur(7px);
}
.auth-dialog[open] { animation: auth-dialog-in .18s ease-out; }
@keyframes auth-dialog-in {
  from { opacity: 0; transform: translateY(calc(-50% - 4px)) scale(.99); }
  to { opacity: 1; transform: translateY(calc(-50% - 12px)) scale(1); }
}
.auth-shell {
  position: relative;
  min-height: min(480px, calc(100dvh - 48px));
  padding: 24px 30px;
  border: 1px solid #eadfc9;
  border-radius: 20px;
  background: #fff9ee;
}
.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #eadfc9;
  border-radius: 50%;
  background: #fff;
  color: #34465d;
  font: 400 1.45rem/1 Poppins, Aptos, sans-serif;
  cursor: pointer;
}
.auth-close:hover { background: #f4ead7; }
.auth-kicker {
  margin: 0 42px 7px 0;
  color: #6f9b78;
  font-size: .67rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.auth-title {
  margin: 0;
  color: #34465d;
  font-size: 1.65rem;
  line-height: 1.2;
}
.auth-intro {
  min-height: 2.7em;
  margin: 7px 0 14px;
  color: #647184;
  font-size: .82rem;
  line-height: 1.55;
}
.auth-status {
  margin: 0 0 15px;
  padding: 11px 13px;
  border: 1px solid #bdd2bd;
  border-radius: 10px;
  background: #f1f7f0;
  color: #34465d;
  font-size: .76rem;
  line-height: 1.5;
}
.auth-status[data-error="true"] {
  border-color: #d9858b;
  background: #fff2f2;
  color: #ad4b58;
}
.auth-status[hidden] { display: none !important; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 14px;
  padding: 5px;
  border-radius: 11px;
  background: #f0eadf;
}
.auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #647184;
  font: 600 .79rem Poppins, Aptos, "Segoe UI", sans-serif;
  cursor: pointer;
}
.auth-tabs button[aria-selected="true"] {
  background: #fff;
  color: #34465d;
  box-shadow: 0 2px 8px rgb(41 57 78 / 9%);
}
.auth-view[hidden] { display: none !important; }
.auth-form {
  display: grid;
  gap: 11px;
}
.auth-form[hidden] { display: none !important; }
.auth-field {
  display: grid;
  gap: 6px;
}
.auth-field label {
  color: #34465d;
  font-size: .74rem;
  font-weight: 650;
}
.auth-field input {
  width: 100%;
  height: 45px;
  padding: 0 12px;
  border: 1px solid #dfd3bd;
  border-radius: 9px;
  background: #fff;
  color: #29394e;
  font: 400 .83rem Poppins, Aptos, "Segoe UI", sans-serif;
}
.auth-field input:focus {
  outline: 3px solid rgb(111 155 120 / 22%);
  border-color: #6f9b78;
}
.auth-forgot {
  justify-self: end;
  margin: -3px 0 0;
  color: #6f9b78;
  font-size: .71rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#auth-login-form .auth-field,
#auth-login-form .auth-forgot,
#auth-login-form .auth-submit {
  width: 60%;
  justify-self: center;
}
#auth-login-form .auth-forgot {
  text-align: center;
}
.auth-submit,
.auth-offer-button {
  width: 100%;
  min-height: 46px;
  margin-top: 3px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #6f9b78;
  color: #fff;
  font: 700 .79rem Poppins, Aptos, "Segoe UI", sans-serif;
  cursor: pointer;
}
.auth-submit:hover,
.auth-offer-button:hover { background: #628c6b; }
.auth-submit:disabled,
.auth-social-button:disabled,
.auth-resend:disabled { opacity: .6; cursor: wait; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 9px;
  color: #788391;
  font-size: .68rem;
}
.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: #e6ddcf;
  content: "";
}
.auth-social-list {
  display: grid;
  gap: 8px;
}
.auth-social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #dfd3bd;
  border-radius: 9px;
  background: #fff;
  color: #34465d;
  font: 600 .76rem Poppins, Aptos, "Segoe UI", sans-serif;
  cursor: pointer;
}
.auth-social-button:hover { background: #fbf8f1; }
.auth-google-mark {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  transform: translateY(-2px);
}
.auth-apple-mark {
  display: block;
  width: 25px;
  height: 26px;
  flex: 0 0 auto;
  transform: translateY(-2px);
  fill: currentColor;
}
.auth-choice-copy {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin: 0 0 12px;
  color: #647184;
  font-size: .78rem;
  line-height: 1.5;
  text-align: center;
}
.auth-resend {
  display: block;
  margin: 13px auto 0;
  padding: 3px;
  border: 0;
  background: transparent;
  color: #6f9b78;
  font: 650 .72rem Poppins, Aptos, "Segoe UI", sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.auth-resend[hidden] { display: none !important; }
.auth-footer {
  margin: 17px 0 0;
  color: #788391;
  font-size: .65rem;
  line-height: 1.5;
  text-align: center;
}
@media (max-width: 520px) {
  .auth-dialog { top: 50%; min-height: min(480px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px); }
  .auth-shell { padding: 22px 20px 18px; min-height: min(480px, calc(100dvh - 48px)); }
  #auth-login-form .auth-field,
  #auth-login-form .auth-forgot,
  #auth-login-form .auth-submit { width: min(98.4%, 384px); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-dialog[open] { animation: none; }
}
.auth-choice-copy span { display: block; }
.auth-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.auth-dialog[data-view="signup-choice"] { min-height: 0; }
.auth-dialog[data-view="signup-choice"] .auth-shell { min-height: 0; }
.auth-dialog::-webkit-scrollbar { display: none; }
@media (max-height: 680px) {
  .auth-dialog { top: 50%; min-height: min(480px, calc(100dvh - 48px)); max-height: calc(100dvh - 48px); }
  .auth-shell { min-height: min(480px, calc(100dvh - 48px)); padding-block: 18px; }
  .auth-dialog[data-view="signup-choice"] { min-height: 0; }
  .auth-dialog[data-view="signup-choice"] .auth-shell { min-height: 0; }
  .auth-intro { margin-bottom: 11px; }
  .auth-tabs { margin-bottom: 12px; }
  .auth-divider { margin-block: 10px 8px; }
  .auth-social-button { min-height: 40px; }
}

/* Keep social sign-in ready in markup while the MVP uses email and password. */
.auth-dialog .auth-divider,
.auth-dialog .auth-social-list {
  display: none;
}
