:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #09090b;
  --surface: #18181b;
  --surface-muted: #27272a;
  --text: #fafafa;
  --muted: #a1a1aa;
  --border: rgba(244, 244, 245, .14);
  --purple: #7c3aed;
  --pink: #db2777;
  --orange: #ea580c;
  --green: #34d399;
  --red: #f87171;
  --focus: #60a5fa;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-width: 320px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 50% -10%, rgba(124, 58, 237, .23), transparent 34rem), linear-gradient(180deg, #111016, var(--bg) 58%, #0f1115);
  color: var(--text);
}
button, input, select { font: inherit; }
a { color: inherit; }
h1, h2 { text-wrap: balance; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.registration-shell { width: min(720px, 100%); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) clamp(12px, 4vw, 24px) max(42px, env(safe-area-inset-bottom)); }
.registration-header { display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: start; gap: 14px; margin: 4px 0 14px; }
.registration-header h1 { margin: 1px 0 5px; font-size: clamp(27px, 6vw, 38px); letter-spacing: -.04em; }
.registration-header p:last-child { margin: 0; color: var(--muted); line-height: 1.45; text-wrap: pretty; }
.back-link { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid var(--border); border-radius: 999px; background: rgba(24,24,27,.94); text-decoration: none; font-size: 30px; transition: transform 150ms ease-out, background-color 150ms ease-out; }
.eyebrow { margin: 0; color: var(--orange); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }

.availability-card, .registration-card { border: 1px solid var(--border); border-radius: 24px; background: rgba(24,24,27,.96); box-shadow: 0 24px 64px rgba(0,0,0,.38); }
.availability-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px 14px; margin-bottom: 14px; padding: 14px 16px; border-radius: 18px; }
.availability-card h2 { margin: 2px 0 0; font-size: clamp(18px, 4vw, 21px); }
.availability-message { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.badge { padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 850; text-transform: capitalize; }
.badge.open { background: rgba(52,211,153,.16); color: var(--green); }
.badge.closed { background: rgba(248,113,113,.16); color: var(--red); }
.badge.pending { background: rgba(251,191,36,.16); color: #fbbf24; }
.registration-card { padding: clamp(18px, 4vw, 26px); }
.registration-card h2 { margin: 0 0 7px; font-size: clamp(23px, 5vw, 28px); }
.signup-entry { margin-bottom: 16px; }
.signup-entry .primary-button { display: block; margin-top: 14px; text-align: center; text-decoration: none; }
.help, .privacy-note { color: var(--muted); line-height: 1.5; }
.help, .privacy-note, .availability-message, .field small, .check span { text-wrap: pretty; }
.help { margin: 0 0 14px; }
.privacy-note { margin: 0; font-size: 12px; }
.stepper { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 20px; }
.stepper[data-identity-stepper="signin"] { grid-template-columns: repeat(2,1fr); }
.stepper span { display: flex; min-width: 0; height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 0 9px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-weight: 900; }
.stepper strong { font-size: 13px; }
.stepper small { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.stepper span.active { background: color-mix(in srgb,var(--purple) 36%,var(--surface-muted)); color: #fff; }
.stepper span[aria-current="step"] { background: var(--purple); box-shadow: inset 0 0 0 1px color-mix(in srgb,#fff 18%,transparent); }
.field { display: grid; gap: 7px; margin: 13px 0; }
.field > span, .delivery-options legend { font-size: 13px; font-weight: 800; }
.field em { color: var(--muted); font-style: normal; font-weight: 500; }
.field small { color: var(--muted); line-height: 1.4; }
.field input, .field select, .code-row input { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--text); border: 1px solid var(--border); border-radius: 13px; outline: 0; background: var(--surface-muted); }
.field input:focus, .field select:focus, .code-row input:focus, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb,var(--focus) 75%,transparent); outline-offset: 2px; }
.phone-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 12px; }
.phone-grid .field { align-content: start; }
.invitation-disclosure { margin: 14px 0; padding: 0 14px; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb,var(--surface-muted) 42%,transparent); }
.invitation-disclosure summary { display: flex; min-height: 44px; align-items: center; cursor: pointer; font-size: 13px; font-weight: 800; }
.invitation-disclosure summary::after { content: '+'; margin-left: auto; color: var(--muted); font-size: 20px; font-weight: 500; }
.invitation-disclosure[open] summary::after { content: '−'; }
.invitation-disclosure[open] summary { border-bottom: 1px solid var(--border); }
.invitation-disclosure .field { margin-bottom: 14px; }
.delivery-options { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 14px 0; padding: 14px; border: 1px solid var(--border); border-radius: 15px; }
.delivery-options legend { padding: 0 7px; }
.delivery-options label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.delivery-options input, .check input { width: 20px; height: 20px; accent-color: var(--purple); }
.channel-note { margin: 13px 0; color: var(--muted); font-size: 14px; }
.check { display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: start; gap: 10px; margin: 14px 0; color: var(--muted); line-height: 1.5; }
.check input { margin: 2px 0 0; }
.check a { color: #c4b5fd; }
.primary-button { width: 100%; min-height: 50px; padding: 12px 18px; border: 0; border-radius: 15px; background: linear-gradient(135deg,var(--purple),var(--pink)); color: #fff; box-shadow: 0 14px 30px rgba(124,58,237,.22); font-weight: 900; cursor: pointer; transition: transform 150ms ease-out, box-shadow 150ms ease-out; }
button:disabled { cursor: not-allowed; opacity: .52; }
.verification-card { margin: 14px 0; padding: 15px; border: 1px solid var(--border); border-radius: 17px; background: color-mix(in srgb,var(--surface-muted) 74%,transparent); }
.verification-card > div:first-child { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.verification-card > div:first-child > div { display: grid; gap: 2px; }
.verification-card > div:first-child small { color: var(--muted); font-size: 12px; font-weight: 500; }
.verification-card > div:first-child span { color: var(--muted); font-size: 13px; }
.verification-card > div:first-child span[data-kind="pending"], .verification-status[data-kind="pending"] { color: #fbbf24; }
.verification-card > div:first-child span[data-kind="success"], .verification-status[data-kind="success"] { color: var(--green); font-weight: 800; }
.verification-card > div:first-child span[data-kind="error"], .verification-status[data-kind="error"] { color: var(--red); font-weight: 800; }
.verification-status { margin: 0 0 14px; color: var(--muted); line-height: 1.45; text-wrap: pretty; }
.code-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.code-row input { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.code-row button, .link-button { min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-muted); color: var(--text); font-weight: 800; cursor: pointer; transition: transform 150ms ease-out, background-color 150ms ease-out; }
.code-row button { padding: 0 16px; }
.link-button { margin-top: 9px; padding: 8px 12px; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.form-status { min-height: 24px; margin: 15px 0 0; color: var(--muted); line-height: 1.45; }
.form-status:empty { min-height: 0; margin-top: 0; }
.form-status[data-kind="error"] { color: var(--red); }
.form-status[data-kind="success"] { color: var(--green); }
.registration-footer { display: grid; gap: 8px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--border); }
.identity-mode-prompt { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.identity-mode-prompt a { color: #c4b5fd; font-weight: 800; }
.recovery-link { display: inline-flex; width: fit-content; min-height: 44px; align-items: center; color: #c4b5fd; font-size: 13px; font-weight: 750; }
.back-link:active, .primary-button:active, .code-row button:active, .link-button:active { transform: scale(.96); }
button:disabled:active { transform: none; }

@media (max-width: 560px) {
  .phone-grid { grid-template-columns: 1fr; gap: 0; }
  .stepper { gap: 6px; }
  .stepper span { gap: 5px; padding: 0 6px; }
  .verification-card > div:first-child { display: grid; gap: 6px; }
  .verification-card > div:first-child span { line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
