body.is-auth {
  --font: Outfit, Inter, "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --auth-text: var(--text);
  --auth-muted: var(--muted);
  --auth-label: var(--muted);
  --auth-line: var(--line);
  --auth-btn: var(--accent);
  --auth-btn-hover: var(--accent-hover);
  --btn-radius: 12px;
  --field-radius: 8px;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  font-synthesis: none;
  font-feature-settings: "kern" 1;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-auth a,
body.is-auth button,
body.is-auth input,
body.is-auth select,
body.is-auth textarea {
  font-family: inherit;
}

body.is-auth .site-nav-inner.legal-top {
  justify-content: center;
}

body.is-auth .legal-switch a {
  font-size: 14px;
  letter-spacing: inherit;
}

.auth-page {
  position: relative;
  z-index: 1;
  width: var(--site-col);
  margin: 0 auto;
  padding: 8px 0 64px;
}

.auth-mark {
  display: grid;
  place-items: center;
  width: fit-content;
  margin: 0 auto 18px;
  color: inherit;
  text-decoration: none;
  border-radius: 18px;
}

.auth-mark:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.auth-mark .hero-badge {
  width: 68px;
  height: 74px;
  color: var(--ok);
  filter: drop-shadow(0 0 14px rgba(58, 214, 122, 0.32));
}

.auth-mark .hero-badge svg {
  display: block;
  width: 68px;
  height: 74px;
}

@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .auth-mark .hero-badge {
    filter: none;
  }
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px 28px 28px;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.auth-title {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--heading, var(--auth-text));
}

.auth-lead {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--auth-muted);
  font-variant-numeric: tabular-nums;
}

.auth-vault-banner {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--ok) 26%, var(--line));
  background: color-mix(in srgb, var(--ok) 9%, var(--surface));
  border-radius: 14px;
}

.auth-vault-banner[hidden] {
  display: none;
}

.auth-vault-banner-icon {
  display: grid;
  place-items: center;
  margin-top: 1px;
  color: var(--ok);
}

.auth-vault-banner p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--auth-text);
}

.auth-page .web-form {
  margin-top: 18px;
  display: grid;
  gap: 22px;
}

.auth-sso {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.auth-sso[hidden] {
  display: none;
}

.auth-sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--auth-text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.auth-sso-btn:hover {
  background: var(--surface-2, var(--bg));
  border-color: var(--muted);
}

.auth-sso-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.auth-sso-icon {
  flex: 0 0 auto;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-or[hidden] {
  display: none;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-or span {
  line-height: 1;
}

#authPasswordPanel,
#authCodePanel {
  display: grid;
  gap: 14px;
}

.auth-page .field {
  gap: 0;
}

.auth-input {
  position: relative;
  min-width: 0;
  width: 100%;
}

.auth-input label {
  position: absolute;
  left: 16px;
  top: 50%;
  z-index: 1;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  transform-origin: left center;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: inherit;
  line-height: 1.2;
  color: var(--auth-label);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.15s ease, font-size 0.15s ease, top 0.15s ease, color 0.15s ease;
}

.auth-input:has(.auth-reveal) label {
  max-width: calc(100% - 48px);
}

.auth-input:has(.auth-reveal) input {
  padding-right: 40px;
}

.auth-input:focus-within label,
.auth-page .auth-input input:not(:placeholder-shown) + label,
.auth-page .auth-input input:-webkit-autofill + label {
  top: 5px;
  transform: none;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
}

.auth-reveal {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  transform: translateY(-50%);
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 6px;
}

.auth-reveal:hover,
.auth-reveal[aria-pressed="true"] {
  color: var(--auth-text);
}

.auth-reveal:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-reveal svg {
  fill: none;
  stroke: currentColor;
}

.auth-otp-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--auth-muted);
}

.auth-otp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 4px 0 0;
}

.auth-text-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.auth-text-btn:hover {
  color: var(--accent-hover);
}

.auth-text-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.auth-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#otp {
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.auth-page input[type="email"],
.auth-page input[type="password"],
.auth-page input[type="text"],
.auth-page input[type="tel"] {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 20px 16px 6px;
  font-size: 17px;
  color: var(--auth-text);
}

.auth-page .auth-input input::placeholder {
  color: transparent;
}

.auth-page .auth-input input:focus::placeholder {
  color: var(--muted);
}

.auth-page input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-page .legal-agree {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.auth-page .btn-primary {
  width: 100%;
  height: auto;
  min-height: 44px;
  margin-top: 4px;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: inherit;
  color: #fff;
  background-color: var(--accent);
  background-image: var(--accent-grad);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.auth-page .btn-primary:hover {
  background-color: var(--accent);
  background-image: var(--accent-grad);
  filter: brightness(1.05);
}

.auth-page .btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.auth-page .btn-primary:disabled {
  opacity: 0.55;
  cursor: default;
  filter: none;
}

.auth-page .status.error {
  color: var(--danger);
  font-size: 13px;
}

.auth-email-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--auth-text);
}

.auth-email-chip[hidden] {
  display: none;
}

.auth-help {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}

.auth-help[hidden] {
  display: none;
}

.auth-reset-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--auth-muted);
}

.auth-reset-note[hidden],
#authConfirmWrap[hidden],
#authAgreeWrap[hidden],
#authEmailPanel[hidden],
#authPhonePanel[hidden],
#authPasswordPanel[hidden],
#authCodePanel[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .auth-page {
    padding-top: 4px;
  }

  .auth-mark {
    margin-bottom: 14px;
  }

  .auth-card {
    padding: 24px 20px 28px;
    border-radius: 14px;
  }

  .auth-page .web-form {
    margin-top: 22px;
    gap: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-input label {
    transition: none;
  }
}
