:root {
  --paper: #f5f2ed;
  --surface: #ffffff;
  --soft: #ebe8e2;
  --ink: #1a1a1a;
  --muted: #8c8980;
  --line: #d1cfc7;
  --gold: #c4a484;
  --teal: #0c8b75;
  --danger: #b42318;
  --success: #13795b;
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(circle at 85% 10%, rgba(196, 164, 132, .16), transparent 28rem),
    var(--paper);
}

button, input { font: inherit; }

.auth-shell {
  width: min(520px, calc(100% - 32px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 32px 0;
  display: flex;
  align-items: center;
}

.story {
  display: none;
}

.story::after { display: none; }

.brand {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--ink);
  font-family: "Syne", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  text-decoration: none;
}

.brand span { color: var(--gold); }

.story-copy { max-width: 620px; }

.eyebrow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--gold);
}

.story h1,
.story h2 {
  max-width: 620px;
  margin: 0;
  color: var(--ink);
  font-family: "Syne", sans-serif;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.story-copy > p:last-of-type {
  max-width: 540px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.65;
}

.trust-list { display: none; }

.auth-card {
  width: 100%;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(26, 26, 26, .10);
}

.mobile-brand { display: inline-block; margin-bottom: 26px; }

.auth-card h1,
.auth-card h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Syne", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.05;
}

.subtitle {
  margin: 10px 0 22px;
  color: var(--muted);
  line-height: 1.55;
}

.step-indicator {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

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

.step-summary {
  margin: 0 0 16px;
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: .86rem;
}

.step-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

label:not(.consent) {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 800;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--soft);
  color: var(--ink);
}

input:focus {
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(196, 164, 132, .24);
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 72px; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}

.hint {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.4;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

.consent input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--ink);
}

.consent a,
.text-link {
  color: var(--ink);
  font-weight: 800;
}

.primary-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(26, 26, 26, .18);
}

.primary-btn:hover:not(:disabled) { background: #333333; }
.primary-btn:disabled { cursor: wait; opacity: .62; }

.auth-actions {
  display: grid;
  grid-template-columns: minmax(92px, .34fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.auth-actions .primary-btn { margin-top: 0; }

.secondary-btn {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.secondary-btn:hover { border-color: var(--ink); background: var(--soft); }

.auth-support {
  margin: 18px 0 0;
  text-align: center;
  font-size: .84rem;
}

.notice {
  display: none;
  margin: 0 0 16px;
  padding: 11px 12px;
  border: 1px solid;
  border-radius: 8px;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.45;
}

.notice.show { display: block; }
.notice.error { border-color: rgba(180, 35, 24, .24); background: #fff0f0; color: var(--danger); }
.notice.success { border-color: rgba(19, 121, 91, .22); background: #edf9f4; color: var(--success); }

.footer-link {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

.back-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover,
.links a:hover { color: var(--teal); }

.center-card { text-align: center; }
.mail-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 12px;
  background: var(--soft);
  display: grid;
  place-items: center;
  font-size: 1.7rem;
}

.email-value { font-weight: 900; word-break: break-word; }

@media (max-width: 820px) {
  .auth-shell {
    width: min(560px, calc(100% - 28px));
    padding: 24px 0;
  }
}

@media (max-width: 480px) {
  .auth-shell {
    width: 100%;
    min-height: 100svh;
    padding: 0;
  }

  .auth-card {
    min-height: 100svh;
    padding: 26px 20px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
