.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
.auth-page {
  width: min(100%, 500px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
  display: grid;
  align-content: center;
  gap: 14px;
}
.auth-card {
  width: 100%;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-card h1,
.auth-card h2 { margin-top: 0; }
.auth-card form { display: grid; gap: 14px; }
.auth-card p { margin: 0; display: grid; gap: 7px; }
.auth-card label { color: var(--muted); font-size: .84rem; font-weight: 700; }
.auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 0 13px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
}
.auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.auth-card input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.auth-card p:has(> input[type="checkbox"]) {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}
.auth-card p:has(> input[type="checkbox"]) > input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
}
.auth-card p:has(> input[type="checkbox"]) > label {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  color: var(--text);
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
}
.auth-card button {
  min-height: 46px;
  justify-self: start;
  border: 0;
  border-radius: 13px;
  padding: 0 17px;
  background: var(--button);
  color: var(--button-text);
  font-weight: 800;
  cursor: pointer;
}
.auth-card form:not(.social-login-form) > button {
  width: 100%;
  justify-self: stretch;
}
.auth-card a { color: var(--text); text-underline-offset: 3px; }
.auth-login-logo {
  display: flex;
  justify-content: center;
  margin: 0 0 24px;
}
.auth-login-logo img {
  width: 112px;
  height: 112px;
  display: block;
  border-radius: 25px;
  box-shadow: 0 18px 40px #0003;
}
.auth-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}
.auth-heading h1 { margin: 0; }
.auth-heading p {
  display: block;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.auth-heading-centered {
  margin-bottom: 26px;
  text-align: center;
}
.auth-heading-centered .auth-kicker { justify-self: center; }
.auth-kicker {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.social-login-form { margin-bottom: 0; }
.auth-card .google-login-button {
  width: 100%;
  min-height: 56px;
  justify-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
}
.auth-card .google-login-button:hover {
  border-color: color-mix(in srgb, var(--text) 28%, var(--border));
}
.google-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  border: 1px solid #dde3ea;
  font: 800 17px/1 Arial, sans-serif;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}
.auth-method-link {
  margin-top: 20px;
  text-align: center;
  font-size: .82rem;
}
.auth-card .auth-method-link a {
  color: var(--muted);
  text-decoration-thickness: 1px;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  font-size: .88rem;
}
.auth-links-single { justify-content: center; }
.messages { list-style: none; padding: 0; margin: 0; }
.messages li {
  margin: 0 0 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
}
.messages li:last-child { margin-bottom: 0; }
.messages .error { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 520px) {
  .auth-page {
    width: 100%;
    padding: max(22px, env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  }
  .auth-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .auth-login-logo { margin-bottom: 26px; }
  .auth-login-logo img {
    width: 104px;
    height: 104px;
    border-radius: 23px;
  }
  .auth-heading { margin-bottom: 24px; }
  .auth-heading-centered { margin-bottom: 28px; }
  .auth-links { flex-direction: column; align-items: center; gap: 9px; }
}
