/* =========================================================
   Nestaura | signup.css
   Minimalist redesign. Theme: white + #004d40, brass used sparingly.
   Desktop: split dialog (steps on the left, form on the right).
   Mobile: full-screen sheet with a tappable step strip.
   ========================================================= */

:root {
  --teal: #004d40;
  --teal-700: #003b31;
  --teal-50: #eef5f3;
  --brass: #a97c43;
  --brass-50: #f7f0e4;
  --ink: #14211e;
  --muted: #5d6b67;
  --line: #dfe7e4;
  --line-strong: #c5d1cd;
  --bg: #f6f9f8;
  --white: #ffffff;
  --danger: #b3261e;
  --danger-50: #fdf1f0;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.modal-open, html.modal-open body { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
a { color: var(--teal); }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================================================
   Landing
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 249, 248, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding-top: env(safe-area-inset-top);
}
.topbar-in {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  max-width: 1120px; margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 32px);
}
.back {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px 8px 6px; margin-left: -6px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.9rem;
  transition: color 0.15s, background 0.15s;
}
.back svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.back:hover { color: var(--teal); background: var(--teal-50); }
.brand { display: block; line-height: 0; }
.brand img { height: 30px; display: block; }
.topbar-signin {
  justify-self: end;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--white);
  color: var(--teal); font-weight: 600; font-size: 0.9rem; text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.topbar-signin:hover { border-color: var(--teal); background: var(--teal-50); }

.landing {
  max-width: 880px; margin: 0 auto;
  padding: clamp(20px, 6vh, 64px) clamp(16px, 4vw, 32px) 56px;
}
.intro { text-align: center; margin-bottom: clamp(28px, 5vh, 44px); }
.intro h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  line-height: 1.1; letter-spacing: -0.02em; color: var(--teal);
}
.intro p { margin: 14px auto 0; max-width: 46ch; color: var(--muted); font-size: 1.0625rem; }

.roles { display: grid; gap: 16px; }
@media (min-width: 720px) { .roles { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (max-width: 520px) {
  .back span { display: none; }
  .back { padding: 8px; margin-left: -8px; }
  .role-card { padding: 22px 20px; gap: 10px; }
  .rc-needs { padding-top: 14px; gap: 6px; }
}

.role-card {
  appearance: none; -webkit-appearance: none; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.role-card:hover { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.rc-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: grid; place-items: center; background: var(--teal-50); color: var(--teal);
}
.rc-icon svg { width: 22px; height: 22px; }
.rc-title {
  display: block; margin-top: 4px;
  font-family: var(--font-display); font-weight: 500; font-size: 1.5rem;
  line-height: 1.2; letter-spacing: -0.01em; color: var(--teal);
}
.rc-desc { display: block; color: var(--muted); font-size: 0.9375rem; }
.rc-needs {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 0.875rem;
}
.rc-needs span { display: flex; gap: 10px; align-items: baseline; }
.rc-needs span::before {
  content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%;
  background: var(--brass); transform: translateY(-2px);
}
.rc-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: auto; padding-top: 10px;
}
.rc-cta { font-weight: 600; color: var(--teal); text-underline-offset: 4px; }
.role-card:hover .rc-cta { text-decoration: underline; }
.rc-steps { font-size: 0.8125rem; color: var(--muted); }

.have-account { margin-top: 28px; text-align: center; color: var(--muted); }
.have-account a { font-weight: 600; text-underline-offset: 3px; }
.fine-print {
  margin: 14px auto 0; max-width: 52ch; text-align: center;
  font-size: 0.8125rem; color: var(--muted);
}
.fine-print a { color: inherit; text-underline-offset: 2px; }

/* =========================================================
   Dialog shell
   ========================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(6, 32, 27, 0.5);
}
.dialog {
  position: relative;
  display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  width: min(940px, 100%); height: 700px; max-height: 100%;
  background: var(--white); border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 70px -20px rgba(0, 30, 25, 0.45);
  animation: rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

.close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.close:hover { background: var(--teal-50); color: var(--ink); }
.close svg { width: 18px; height: 18px; }

/* ---------- Side rail: role switch + steps ---------- */
.side {
  display: flex; flex-direction: column; gap: 28px;
  min-height: 0; overflow-y: auto;
  padding: 28px 24px; background: var(--bg); border-right: 1px solid var(--line);
}
.side-brand { display: block; line-height: 0; }
.side-brand img { height: 28px; display: block; }

.role-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px;
  background: #e8eeec; border-radius: var(--r-sm);
}
.role-switch button {
  height: 34px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  font-size: 0.875rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.role-switch button:hover { color: var(--ink); }
.role-switch button[aria-checked="true"] {
  background: var(--white); color: var(--teal); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.stepper { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.stepper li { position: relative; }
.stepper li:not(:last-child)::before {
  content: ''; position: absolute; left: 15px; top: 40px; bottom: -2px; width: 1px;
  background: var(--line-strong);
}
.stepper li.done:not(:last-child)::before { background: var(--teal); }

.step {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 6px 8px 16px 0; border: 0; background: none; text-align: left; cursor: pointer;
}
.step-dot {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--muted);
  font-size: 0.8125rem; font-weight: 600;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.step-dot svg { width: 14px; height: 14px; }
.step-dot .tick { display: none; }
.step-text { display: block; min-width: 0; padding-top: 4px; }
.step-name { display: block; font-size: 0.9375rem; font-weight: 600; color: var(--muted); line-height: 1.3; }
.step-hint { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--muted); line-height: 1.35; }
.step:hover .step-name { color: var(--ink); }

.stepper li.current .step-dot { background: var(--teal); border-color: var(--teal); color: var(--white); }
.stepper li.current .step-name { color: var(--ink); }
.stepper li.done .step-dot { background: var(--teal-50); border-color: var(--teal); color: var(--teal); }
.stepper li.done .step-dot .num { display: none; }
.stepper li.done .step-dot .tick { display: block; }
.stepper li.done .step-name { color: var(--ink); }
.stepper li.current.done .step-dot { background: var(--teal); color: var(--white); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.side-hint { font-size: 0.8125rem; color: var(--muted); }
.side-signin { font-size: 0.875rem; color: var(--muted); }
.side-signin a { font-weight: 600; text-underline-offset: 3px; }

.dialog.finished .role-switch, .dialog.finished .side-hint { display: none; }
.dialog.finished .step { pointer-events: none; }

/* ---------- Main column ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main > form { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 56px clamp(20px, 4vw, 48px) 32px;
}
.scroll-in { max-width: 560px; margin: 0 auto; }

.step-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 24px; margin-bottom: 10px; font-size: 0.8125rem; color: var(--muted);
}
.step-note.is-preview {
  padding: 2px 10px; border-radius: 999px; background: var(--brass-50); color: #7b5a2e; font-weight: 600;
}
.step-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); line-height: 1.2; letter-spacing: -0.015em;
  color: var(--teal);
}
.step-title:focus { outline: none; }
.step-sub { margin-top: 8px; max-width: 46ch; color: var(--muted); font-size: 0.9375rem; }

.pane { margin-top: 24px; animation: fade 0.22s ease; }

/* ---------- Choice cards ---------- */
.choices { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
@media (min-width: 560px) { .choices { grid-template-columns: 1fr 1fr; } }

.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-body {
  display: flex; flex-direction: column; gap: 4px; height: 100%;
  padding: 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.choice:hover .choice-body { border-color: var(--line-strong); }
.choice input:checked + .choice-body {
  border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); background: var(--teal-50);
}
.choice input:focus-visible + .choice-body { outline: 2px solid var(--teal); outline-offset: 2px; }
.choice-title { padding-right: 30px; font-weight: 600; font-size: 1rem; color: var(--ink); }
.choice-desc { font-size: 0.875rem; color: var(--muted); }
.choice-lines {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 10px; font-size: 0.8125rem; color: var(--muted);
}
.choice-lines b { color: var(--ink); font-weight: 600; }
.choice-check {
  position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; pointer-events: none;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--white);
  transition: background 0.15s, border-color 0.15s;
}
.choice-check svg { width: 11px; height: 11px; opacity: 0; }
.choice input:checked ~ .choice-check { background: var(--teal); border-color: var(--teal); }
.choice input:checked ~ .choice-check svg { opacity: 1; }

/* ---------- Preview (requirements before a type is chosen) ---------- */
.pv-list { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); overflow: hidden; }
.pv { padding: 14px 16px; }
.pv + .pv { border-top: 1px solid var(--line); }
.pv h4 { font-size: 0.9375rem; font-weight: 600; }
.pv p { margin-top: 2px; font-size: 0.875rem; color: var(--muted); }
.pv p b { color: var(--ink); font-weight: 600; }
.link-btn {
  margin-top: 16px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- Fields ---------- */
.grid { display: grid; gap: 18px; }
@media (min-width: 560px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid > .wide { grid-column: 1 / -1; }
}
.field { min-width: 0; }
.field > label:not(.check):not(.drop), .field > .label {
  display: block; margin-bottom: 6px; font-size: 0.875rem; font-weight: 600; color: var(--ink);
}
.opt { margin-left: 6px; font-size: 0.8125rem; font-weight: 500; color: var(--muted); }

.input {
  display: block; width: 100%; height: 48px; padding: 0 14px;
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  appearance: none; -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #9aa7a3; }
.input:hover { border-color: #a9b8b3; }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 77, 64, 0.14); }
.field.invalid .input { border-color: var(--danger); }
.field.invalid .input:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.14); }

.err { margin-top: 6px; font-size: 0.8125rem; color: var(--danger); }
.err:empty { display: none; }
.hint { margin-top: 6px; font-size: 0.8125rem; color: var(--muted); }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.toggle {
  position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; border-radius: 8px;
  display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer;
}
.toggle:hover { color: var(--teal); background: var(--teal-50); }
.toggle svg { width: 20px; height: 20px; }
.toggle .eye-off { display: none; }
.toggle[aria-pressed="true"] .eye { display: none; }
.toggle[aria-pressed="true"] .eye-off { display: block; }

.rules {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px;
  font-size: 0.8125rem; color: var(--muted);
}
.rules li { display: flex; align-items: center; gap: 8px; transition: color 0.15s; }
.rules li::before {
  content: ''; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--white) center / 8px no-repeat;
  transition: background-color 0.15s, border-color 0.15s;
}
.rules li.met { color: var(--teal); }
.rules li.met::before {
  background-color: var(--teal); border-color: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}

/* ---------- Documents ---------- */
.docs { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.docs-head h3 { font-size: 1rem; font-weight: 600; }
.docs-head p { margin-top: 2px; font-size: 0.875rem; color: var(--muted); }

.drop {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; cursor: pointer;
  background: var(--white); border: 1px dashed var(--line-strong); border-radius: var(--r-md);
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.dragover { border-color: var(--teal); background: var(--teal-50); }
.drop:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-icon {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--teal-50); color: var(--teal);
}
.drop-icon svg { width: 20px; height: 20px; }
.drop-text { display: flex; flex-direction: column; min-width: 0; font-size: 0.9375rem; }
.drop-text strong { font-weight: 600; }
.drop-text .drag { display: none; }
@media (hover: hover) and (pointer: fine) { .drop-text .drag { display: inline; } }
.drop-text small { font-size: 0.8125rem; color: var(--muted); }

.file {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px;
  background: var(--white); border: 1px solid var(--teal); border-radius: var(--r-md);
}
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; font-weight: 500; }
.file-size { flex: none; font-size: 0.8125rem; color: var(--muted); }
.file-remove {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer;
}
.file-remove:hover { background: var(--teal-50); color: var(--ink); }
.file-remove svg { width: 16px; height: 16px; }

/* ---------- Consents ---------- */
.consents { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 12px; margin: 0; font-size: 0.9375rem; font-weight: 400; cursor: pointer; }
.check input {
  flex: none; width: 20px; height: 20px; margin: 1px 0 0; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background: var(--white) center / 12px no-repeat;
  border: 1px solid var(--line-strong); border-radius: 6px;
  transition: background-color 0.15s, border-color 0.15s;
}
.check input:checked {
  background-color: var(--teal); border-color: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}
.field.invalid .check input { border-color: var(--danger); }
.check a { font-weight: 600; text-underline-offset: 2px; }

.hp { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer + alert ---------- */
.alert {
  margin: 0 clamp(20px, 4vw, 48px) 12px; padding: 12px 14px;
  background: var(--danger-50); color: var(--danger);
  border: 1px solid #f0c9c6; border-radius: var(--r-sm); font-size: 0.875rem;
}
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px clamp(20px, 4vw, 48px); padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: var(--white); border-top: 1px solid var(--line);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px; border-radius: var(--r-sm);
  font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn-primary { margin-left: auto; background: var(--teal); border: 1px solid var(--teal); color: var(--white); min-width: 168px; }
.btn-primary:hover { background: var(--teal-700); border-color: var(--teal-700); }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); background: var(--teal-50); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.loading::before {
  content: ''; width: 16px; height: 16px; margin-right: 10px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: var(--white);
  animation: spin 0.7s linear infinite;
}

/* ---------- Success ---------- */
.success { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(20px, 4vw, 48px); }
.success-in { max-width: 460px; margin: 0 auto; width: 100%; }
.success-mark {
  width: 56px; height: 56px; border-radius: 50%; margin-bottom: 20px;
  display: grid; place-items: center; background: var(--teal-50); color: var(--teal);
}
.success-mark svg { width: 26px; height: 26px; }
.success h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.9rem; line-height: 1.2; letter-spacing: -0.015em; color: var(--teal); }
.success p { margin-top: 10px; color: var(--muted); }
.success p strong { color: var(--ink); font-weight: 600; word-break: break-all; }
.success .btn { margin-top: 24px; }

/* =========================================================
   Mobile / tablet: full-screen sheet
   ========================================================= */
@media (max-width: 859px) {
  .overlay { padding: 0; align-items: stretch; }
  .dialog {
    display: flex; flex-direction: column;
    width: 100%; height: 100%; max-height: none; border-radius: 0; box-shadow: none;
    animation: sheet 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  @keyframes sheet { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

  .close { top: calc(8px + env(safe-area-inset-top)); right: 10px; }

  .side {
    flex: none; overflow: visible;
    display: grid; grid-template-columns: 1fr auto;
    grid-template-areas: "role signin" "steps steps";
    align-items: center; gap: 12px 8px;
    padding: 10px 16px 0; padding-top: calc(10px + env(safe-area-inset-top));
    background: var(--white); border-right: 0; border-bottom: 1px solid var(--line);
  }
  .side-brand, .side-hint { display: none; }
  .role-switch { grid-area: role; justify-self: start; }
  .side-foot { display: contents; }
  .side-signin { grid-area: signin; margin-right: 44px; font-size: 0.9375rem; white-space: nowrap; }
  .side-signin .long { display: none; }

  .stepper {
    grid-area: steps; flex-direction: row; gap: 8px;
    margin: 0 -16px; padding: 0 16px 12px; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .stepper::-webkit-scrollbar { display: none; }
  .stepper li { flex: none; }
  .stepper li:not(:last-child)::before { display: none; }
  .step {
    align-items: center; gap: 8px; width: auto; padding: 5px 14px 5px 5px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  }
  .step-dot { width: 26px; height: 26px; font-size: 0.75rem; }
  .step-text { padding-top: 0; }
  .step-name { font-size: 0.875rem; white-space: nowrap; }
  .step-hint { display: none; }
  .stepper li.current .step { border-color: var(--teal); background: var(--teal-50); }

  .main { flex: 1; }
  .scroll { padding: 24px 20px 28px; }
}

@media (max-width: 420px) {
  .rules { grid-template-columns: 1fr; }
  .foot { gap: 10px; }
  .foot .btn-primary { flex: 1; min-width: 0; }
  .foot .btn-ghost { padding: 0 18px; }
}

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