html:has(body.is-auth),
body.is-auth {
  min-height: 100%;
  min-height: 100dvh;
  height: auto;
  background: var(--bg);
  color: var(--text);
}

body.is-auth {
  --auth-text: var(--text);
  --auth-muted: var(--muted);
  --auth-label: var(--muted);
  --auth-line: var(--line);
  --auth-field: var(--surface-2);
  --auth-btn: var(--accent);
  --auth-btn-hover: var(--accent-hover);
  --auth-badge-w: 68px;
  --auth-badge-h: 74px;
  --auth-badge-gap: 12px;
  --btn-radius: 8px;
  --field-radius: 8px;
  overflow-x: hidden;
  overflow-y: auto;
}

body.is-web.is-auth .settings-curve {
  display: block;
  z-index: 0;
  height: var(--curve-size);
}

.auth-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: visible;
  background: transparent;
}

.auth-page-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.auth-page-art::before,
.auth-page-art::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.auth-page-art::before {
  top: 0;
  right: 0;
  bottom: 0;
  width: 48px;
  background: linear-gradient(to left, var(--bg) 0%, color-mix(in srgb, var(--bg) 60%, transparent) 42%, transparent);
}

.auth-page-art::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 60%, transparent) 42%, transparent);
}

.auth-page-art img {
  position: absolute;
  right: -2%;
  bottom: -4%;
  width: 48vw;
  max-width: 920px;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
  background: none;
  image-rendering: auto;
}

html[data-theme="light"] .auth-page-art img {
  filter: drop-shadow(0 18px 36px rgba(15, 23, 42, 0.12));
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .auth-page-art img {
    filter: drop-shadow(0 18px 36px rgba(15, 23, 42, 0.12));
  }
}

.auth-hero-mark {
  position: absolute;
  z-index: 3;
  top: calc(var(--curve-dip) - var(--auth-badge-h) - var(--auth-badge-gap));
  left: 0;
  right: 0;
  width: var(--auth-badge-w);
  margin: 0 auto;
  display: block;
  line-height: 0;
  text-decoration: none;
  border-radius: 18px;
}

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

.auth-hero-mark .hero-badge,
.auth-hero-mark .hero-badge svg {
  width: var(--auth-badge-w);
  height: var(--auth-badge-h);
}

.auth-hero-mark .hero-badge {
  filter: drop-shadow(0 0 16px rgba(58, 214, 122, 0.4));
}

.auth-page-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(1440px, 100%);
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
  align-items: center;
  box-sizing: border-box;
  padding: calc(var(--curve-dip) + 8px) clamp(16px, 4vw, 48px) 32px;
  overflow-x: hidden;
}

.auth-divider {
  display: none;
}

.auth-col-form {
  box-sizing: border-box;
  max-width: min(448px, 100%);
  width: 100%;
  min-width: 0;
  height: fit-content;
  justify-self: center;
  align-self: center;
  padding: 24px 0 48px;
  margin: 0 auto;
}

.auth-page .web-form,
.auth-page .field,
.auth-lead,
.auth-legal,
.auth-title,
.auth-switch,
.auth-copy {
  max-width: 100%;
  min-width: 0;
}

.auth-col-quotes {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 394px;
  min-width: 0;
  height: fit-content;
  justify-self: start;
  align-self: center;
  padding: 36px 0 36px 40px;
  margin: 0;
  border-left: 1px solid var(--line);
}

.auth-title {
  margin: 0;
  font-size: clamp(26px, 5vw, 32px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--auth-text);
  overflow-wrap: break-word;
}

.auth-lead {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--auth-muted);
  overflow-wrap: break-word;
}

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

.auth-page .field label,
.auth-page .auth-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-label);
  margin-bottom: 6px;
}

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

.auth-input input {
  padding-right: 40px;
}

.auth-lock {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  background: none;
}

.auth-lock svg,
.auth-lock svg rect {
  fill: none;
  stroke: currentColor;
}

.auth-page input[type="email"],
.auth-page input[type="password"],
.auth-page input[type="text"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 0 40px 0 12px;
  font-size: 16px;
  color: var(--auth-text);
  box-shadow: var(--shadow);
}

.auth-page input::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 .btn,
.auth-page .btn-primary {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  border-radius: 8px;
  background: var(--auth-btn);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 650;
  touch-action: manipulation;
}

.auth-page .btn-primary:hover {
  background: var(--auth-btn-hover);
}

.auth-legal {
  margin: 24px 0 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  color: var(--auth-muted);
  overflow-wrap: break-word;
}

.auth-legal a {
  color: var(--auth-text);
  text-decoration: underline;
}

.auth-switch {
  margin: 32px 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--auth-muted);
}

.auth-switch a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--auth-text);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

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

.auth-copy {
  margin: 28px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.auth-copy p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.auth-quotes {
  display: grid;
  width: 100%;
}

.auth-quote {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
  pointer-events: none;
}

.auth-quote.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease, visibility 0s;
}

.auth-quote p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--auth-muted);
  font-family: inherit;
  overflow-wrap: break-word;
}

.auth-quote .auth-quote-name {
  margin-top: 28px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-text);
}

.auth-quote .auth-quote-meta {
  margin-top: 4px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: var(--auth-muted);
}

.auth-quote-dots {
  display: flex;
  gap: 8px;
  margin-top: 28px;
}

.auth-quote-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 40%, transparent);
  cursor: pointer;
  transition: background 0.18s ease;
}

.auth-quote-dot.is-active {
  background: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .auth-quote,
  .auth-quote.is-active,
  .auth-quote-dot {
    transition: none;
  }
}

@media (max-width: 1099px) {
  .auth-page-art {
    display: none;
  }

  .auth-page-inner {
    display: block;
    width: 100%;
    max-width: 100%;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  .auth-divider,
  .auth-col-quotes {
    display: none;
  }

  .auth-col-form {
    display: block;
    width: auto;
    max-width: 448px;
    margin: 0 auto;
    padding: 20px 0 40px;
  }

  .auth-lead,
  .auth-legal,
  .auth-title,
  .auth-switch,
  .auth-copy,
  .auth-page .web-form,
  .auth-page .field,
  .auth-input,
  .auth-page input,
  .auth-page .btn {
    white-space: normal;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  body.is-auth {
    --auth-badge-w: 56px;
    --auth-badge-h: 61px;
    --auth-badge-gap: 10px;
  }

  .auth-page-inner {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .auth-lead,
  .auth-legal {
    font-size: 14px;
  }

  .auth-col-form {
    padding: 12px 0 32px;
  }

  .auth-page .web-form {
    margin-top: 24px;
    gap: 14px;
  }

  .auth-switch {
    margin-top: 24px;
  }
}

@media (max-height: 560px) {
  body.is-auth {
    --auth-badge-w: 48px;
    --auth-badge-h: 52px;
    --auth-badge-gap: 8px;
  }

  .auth-title {
    font-size: 24px;
  }

  .auth-page-inner {
    align-items: start;
    padding-top: calc(var(--curve-dip) + 4px);
  }

  .auth-col-form {
    padding-top: 8px;
    padding-bottom: 24px;
  }

  .auth-page .web-form {
    margin-top: 16px;
    gap: 12px;
  }

  .auth-legal {
    margin-top: 16px;
  }

  .auth-col-quotes {
    display: none;
  }
}
