body.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-canvas);
}
.login-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--sp-6);
}
.login-card {
  width: min(100%, 28rem);
  padding: var(--sp-8) var(--sp-7);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-raised);
}
.login-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--sp-6);
  text-decoration: none;
}
.login-brand img {
  width: auto;
  height: 25px;
}
.login-card h1 {
  margin-bottom: var(--sp-2);
  font-size: var(--text-xl);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-align: center;
}
.login-card p.lede {
  margin-bottom: var(--sp-6);
  font-size: var(--text-base);
  line-height: 1.55;
  text-align: center;
  text-wrap: pretty;
}
.login-card p.lede strong {
  color: var(--text-primary);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.login-card form {
  display: grid;
  gap: var(--sp-2);
}
.login-card .field-label {
  margin-bottom: 0;
}
.login-card form .btn {
  margin-top: var(--sp-2);
}
.email-hint {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.45;
}
.email-hint[hidden] {
  display: none;
}
.email-hint .link-btn {
  overflow-wrap: anywhere;
}
.login-card .btn {
  width: 100%;
}
.login-note {
  margin-top: var(--sp-4);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  line-height: 1.55;
  text-align: center;
}
.login-note a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.login-note a:hover {
  color: var(--text-primary);
}
.login-state {
  display: none;
}
.login-state.active {
  display: block;
}
.sent-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto var(--sp-4);
  color: var(--info-text);
  background: var(--info-fill);
  border-radius: var(--radius-pill);
  place-items: center;
}
.error-banner {
  display: none;
  margin-bottom: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  color: var(--important-text);
  background: var(--important-fill);
  border-radius: var(--radius-control);
  font-size: var(--text-sm);
  line-height: 1.45;
}
.error-banner.active {
  display: block;
}
.dev-link-box {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  background: var(--surface-raised);
  border-radius: var(--radius-control);
  font-size: var(--text-xs);
  line-height: 1.5;
}
.dev-link-box a {
  color: var(--primary-text);
}
.consent-check {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.45;
  cursor: pointer;
}
.consent-check input {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
}
.consent-check a {
  color: var(--primary-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.resend-row {
  margin-top: var(--sp-5);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-align: center;
}
.resend-row + .login-note {
  margin-top: var(--sp-2);
}
.link-btn {
  padding: 0;
  color: var(--primary-text);
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: var(--text-sm);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:disabled {
  color: var(--text-tertiary);
  cursor: default;
  text-decoration: none;
}
.link-btn--quiet {
  color: var(--text-secondary);
  font-size: var(--text-xs);
}
.link-btn--quiet:hover {
  color: var(--text-primary);
}
.btn.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: auth-spin 700ms linear infinite;
}
.code-form {
  margin-top: var(--sp-2);
}
.code-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.otp {
  position: relative;
  display: grid;
  place-items: center;
}
.otp-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  color: transparent;
  background: transparent;
  border: 0;
  outline: 0;
  caret-color: transparent;
  font: 16px/1 var(--font-mono);
  letter-spacing: -0.5em;
  -webkit-text-fill-color: transparent;
  cursor: text;
}
.otp-input::selection {
  background: transparent;
}
.otp-input:focus {
  box-shadow: none;
}
.otp-input:-webkit-autofill {
  -webkit-text-fill-color: transparent;
  transition: background-color 99999s;
}
.otp-input[readonly] {
  cursor: default;
}
.otp-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 52px)) var(--sp-1) repeat(3, minmax(0, 52px));
  gap: var(--sp-2);
  justify-content: center;
  width: 100%;
}
.otp-cell:nth-child(4) {
  grid-column: 5;
}
.otp-digit {
  display: inline-block;
}
.otp-cell {
  position: relative;
  display: grid;
  aspect-ratio: 5 / 6;
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  font-size: var(--text-2xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  place-items: center;
  transition:
    border-color 180ms var(--ease-out-expo),
    background-color 180ms var(--ease-out-expo),
    color 180ms var(--ease-out-expo),
    box-shadow 180ms var(--ease-out-expo);
}
.otp-cell.is-filled {
  border-color: var(--primary-line);
}
.otp-cell.is-active {
  border-color: var(--border-focus);
  box-shadow: var(--focus-ring);
}
.otp-cell.is-active:not(.is-filled)::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 42%;
  background: var(--primary);
  border-radius: 1px;
}
.otp.is-busy .otp-cell {
  border-color: transparent;
  box-shadow: none;
  background: var(--info-fill);
}
.otp.is-ok .otp-cell {
  color: var(--success-text);
  background: var(--success-fill);
  border-color: transparent;
  box-shadow: none;
}
.otp.is-bad .otp-cell {
  color: var(--important-text);
  background: var(--important-fill);
  border-color: transparent;
  box-shadow: none;
}
.otp-orbit,
.otp-hub,
.otp-badge,
.otp-spark {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
}
.otp-hub {
  width: 8px;
  height: 8px;
  margin: -4px;
  background: var(--info-solid);
  border-radius: 50%;
  opacity: 0;
  scale: 0;
}
.otp.is-orbit .otp-hub {
  opacity: 1;
  scale: 1;
}
.otp.is-ok .otp-hub {
  background: var(--success-solid);
}
.otp.is-done .otp-hub {
  opacity: 0;
  scale: 0;
}
.otp-badge {
  display: grid;
  width: 60px;
  height: 60px;
  margin: -30px;
  color: var(--success-text);
  background: var(--success-fill);
  border-radius: var(--r-lg);
  opacity: 0;
  scale: 0.4;
  place-items: center;
}
.otp-badge path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}
.otp.is-done .otp-badge {
  opacity: 1;
  scale: 1;
}
.otp.is-done .otp-badge path {
  stroke-dashoffset: 0;
}
.otp-spark {
  width: 6px;
  height: 6px;
  margin: -3px;
  background: var(--success-solid);
  border-radius: 50%;
}
.otp-spark:nth-child(3n) {
  background: var(--primary);
}
.otp-spark:nth-child(4n) {
  width: 4px;
  height: 4px;
  margin: -2px;
}
.otp-status {
  min-height: 2.9em;
  margin: var(--sp-3) 0 0;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  line-height: 1.45;
  text-align: center;
  text-wrap: pretty;
}
.otp-status[data-tone=busy] {
  color: var(--info-text);
}
.otp-status[data-tone=ok] {
  color: var(--success-text);
  font-weight: 560;
}
.otp-status[data-tone=bad] {
  color: var(--important-text);
  font-weight: 560;
}
.state-sent-done .resend-row,
.state-sent-done .resend-row + .login-note,
.state-sent-done #dev-link-wrap {
  visibility: hidden;
  opacity: 0;
}
@keyframes otp-caret {
  50% {
    opacity: 0;
  }
}
@keyframes auth-spin {
  to {
    rotate: 360deg;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .login-state.active > * {
    animation: auth-rise 560ms var(--ease-out-expo) both;
  }
  .login-state.active > :nth-child(2) {
    animation-delay: 50ms;
  }
  .login-state.active > :nth-child(3) {
    animation-delay: 100ms;
  }
  .login-state.active > :nth-child(4) {
    animation-delay: 150ms;
  }
  .login-state.active > :nth-child(5) {
    animation-delay: 200ms;
  }
  .login-state.active > :nth-child(n+6) {
    animation-delay: 250ms;
  }
  .login-state.active .sent-icon {
    animation: auth-icon-in 700ms cubic-bezier(.34, 1.56, .64, 1) both;
  }
  .error-banner.active {
    animation: auth-banner-in 420ms var(--ease-out-expo) both;
  }
  .otp {
    transition: height 460ms var(--ease-out-expo);
  }
  .otp-cell.is-active:not(.is-filled)::after {
    animation: otp-caret 1.1s steps(1) infinite;
  }
  .otp-cell.is-pop {
    animation: otp-bump 300ms var(--ease-out-expo);
  }
  .otp-cell.is-pop .otp-digit {
    animation: otp-digit-in 380ms cubic-bezier(.34, 1.56, .64, 1);
  }
  .otp-cell.is-pop::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    border: 1.5px solid var(--primary);
    border-radius: inherit;
    animation: otp-ripple 520ms var(--ease-out-expo) forwards;
    pointer-events: none;
  }
  .otp-cell.is-out .otp-digit {
    animation: otp-digit-out 160ms ease-in forwards;
  }
  .otp-hub {
    transition:
      opacity 240ms,
      scale 420ms cubic-bezier(.34, 1.56, .64, 1),
      background-color 200ms;
  }
  .otp-badge {
    transition: opacity 200ms, scale 620ms cubic-bezier(.34, 1.56, .64, 1);
  }
  .otp-badge path {
    transition: stroke-dashoffset 460ms var(--ease-out-expo) 240ms;
  }
  .resend-row,
  .resend-row + .login-note,
  #dev-link-wrap {
    transition: opacity 260ms, visibility 260ms;
  }
}
@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes auth-icon-in {
  0% {
    opacity: 0;
    transform: scale(.4) rotate(-12deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes auth-banner-in {
  0% {
    opacity: 0;
    transform: translateY(-6px);
  }
  40% {
    opacity: 1;
    transform: translateX(-4px);
  }
  60% {
    transform: translateX(3px);
  }
  80% {
    transform: translateX(-1px);
  }
  100% {
    transform: none;
  }
}
@keyframes otp-bump {
  40% {
    transform: translateY(-3px) scale(1.06);
  }
}
@keyframes otp-digit-in {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(45%) scale(.4);
  }
}
@keyframes otp-digit-out {
  to {
    opacity: 0;
    filter: blur(3px);
    transform: translateY(30%) scale(.5);
  }
}
@keyframes otp-ripple {
  from {
    opacity: .55;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.32);
  }
}
@media (max-width: 480px) {
  .login-wrap {
    align-items: start;
    padding: var(--sp-4);
  }
  .login-card {
    margin-top: var(--sp-8);
    padding: var(--sp-6) var(--sp-5);
  }
  .otp-cells {
    gap: 6px;
  }
  .otp-cell {
    font-size: var(--text-xl);
  }
}
