/* Public shell — sign-up, referral, logins.
   Mobile-first: one 460px column, centred on desktop with a soft device edge. */

.screen {
  max-width: 460px;
  margin-inline: auto;
  min-height: 100vh;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

@media (min-width: 620px) {
  body { background: radial-gradient(120% 80% at 50% 0%, #fff 0%, var(--mist) 45%, var(--mist-2) 100%); padding-block: 28px; }
  .screen {
    min-height: auto;
    border-radius: 30px;
    box-shadow: var(--lift-2);
    border: 1px solid var(--line);
  }
}

/* ---------- the saturated field ---------- */
.field {
  position: relative;
  padding: 16px 22px 24px;
  color: #fff;
  background: var(--field-pink);
  overflow: hidden;
}
.field--green { background: var(--field-green); }
.field--blue { background: var(--field-blue); }
.field--short { padding-bottom: 22px; }

/* bubbles in the field: structural drift, not stickers */
.field::before,
.field::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}
.field::before { width: 230px; height: 230px; right: -78px; top: -96px; }
.field::after { width: 130px; height: 130px; left: -52px; bottom: -58px; background: rgba(255, 255, 255, 0.12); }

.field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.logo { height: 26px; width: auto; opacity: 0.96; }
.field-top .wordmark {
  font-family: var(--display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.field-body { position: relative; z-index: 1; padding-top: 18px; }

.figure {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--fs-figure);
  line-height: 0.92;
  letter-spacing: -0.045em;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.figure .unit { font-size: 0.42em; font-weight: 700; letter-spacing: -0.02em; transform: translateY(-0.12em); }

.field-body h1 {
  font-size: var(--fs-h1);
  margin-top: 6px;
  max-width: 14ch;
}
.field-body .lede {
  margin-top: 10px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  max-width: 34ch;
}

/* who invited you */
.invited {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--r-pill);
  backdrop-filter: blur(6px);
}
.invited .avatar {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  color: var(--pink-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
}
.invited .who { font-size: var(--fs-sm); line-height: 1.35; }
.invited .who strong { font-weight: 600; }
.invited .who span { display: block; font-size: var(--fs-xs); color: rgba(255, 255, 255, 0.85); }

/* ---------- the sheet that rises over the field ---------- */
.sheet {
  position: relative;
  z-index: 2;
  margin-top: -22px;
  background: var(--paper);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 24px 22px 30px;
}
.sheet h2 { font-size: var(--fs-h2); }
.sheet + .sheet { margin-top: 0; border-radius: 0; padding-top: 0; }

.sheet-note {
  margin-top: 6px;
  font-size: var(--fs-sm);
  color: var(--ink-3);
}

/* ---------- forms ---------- */
.form { margin-top: 16px; display: grid; gap: 12px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.f label,
.legend {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.f input[type="text"],
.f input[type="tel"],
.f input[type="email"],
.f input[type="password"],
.f select,
.f textarea {
  width: 100%;
  min-height: var(--tap);
  font: 500 1rem/1.4 var(--ui);
  color: var(--ink);
  background: var(--mist);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.f textarea { min-height: 88px; resize: vertical; }
.f input::placeholder, .f textarea::placeholder { color: #9aa0bd; }
.f input:hover, .f select:hover, .f textarea:hover { border-color: #cfd4e6; }
.f input:focus, .f select:focus, .f textarea:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--pink-1);
  box-shadow: 0 2px 6px rgba(255, 46, 134, 0.1), 0 10px 24px rgba(255, 46, 134, 0.14);
}
.f .hint { margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.f.is-error input { border-color: var(--alarm); background: var(--alarm-wash); }
.f .error {
  margin-top: 6px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--alarm);
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

/* salon search */
.search { position: relative; }
.search-results {
  position: absolute;
  z-index: 5;
  inset-inline: 0;
  top: calc(100% + 6px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--lift-2);
  overflow: hidden;
  display: none;
}
.search.is-open .search-results { display: block; }
.search-results button {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  font: 500 0.9375rem/1.3 var(--ui);
  color: var(--ink);
  cursor: pointer;
  min-height: var(--tap);
}
.search-results button:last-child { border-bottom: 0; }
.search-results button:hover,
.search-results button:focus-visible { background: var(--pink-wash); }
.search-results .sub { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); }
.search-results .add { color: var(--pink-ink); font-weight: 600; }

.picked {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  background: var(--green-wash);
  border: 1.5px solid #bdead6;
  border-radius: var(--r-md);
  min-height: var(--tap);
}
.picked.is-shown { display: flex; }
.picked .name { font-weight: 600; font-size: 0.9375rem; }
.picked .sub { font-size: var(--fs-xs); color: var(--green-ink); }
.picked .change {
  margin-left: auto;
  background: none;
  border: 0;
  font: 600 var(--fs-xs)/1 var(--ui);
  color: var(--green-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 10px;
}

/* consent */
.consent.is-error { border-color: var(--alarm); background: var(--alarm-wash); }
.consent-error {
  margin-top: 6px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--alarm);
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: var(--mist);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
}
.consent input[type="checkbox"] {
  width: 22px; height: 22px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--pink-1);
}
.consent label { font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-2); }
.consent a { color: var(--pink-ink); text-underline-offset: 3px; }

/* ---------- shared salon account ---------- */
.account-choice { border: 0; margin: 0; padding: 0; min-inline-size: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.account-choice legend { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.account-choice label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 48px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--mist);
  cursor: pointer;
}
.account-choice label:has(input:checked) { border-color: var(--pink-1); background: var(--pink-wash); }
.account-choice label:has(input:focus-visible) { outline: 2px solid var(--pink-1); outline-offset: 2px; }
.account-choice input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--pink-1); }
.account-choice strong { display: block; font-size: var(--fs-sm); color: var(--ink); }
.account-choice span span { display: block; margin-top: 2px; font-size: var(--fs-xs); line-height: 1.4; color: var(--ink-3); }
.salon-fields { display: grid; gap: 12px; }
.salon-fields[hidden] { display: none; }
@media (max-width: 360px) { .account-choice { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--r-pill);
  font: 600 1.0625rem/1 var(--ui);
  text-decoration: none;
  color: #fff;
  background: var(--field-pink);
  box-shadow: var(--lift-pink);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(255, 46, 134, 0.26), 0 26px 52px rgba(255, 46, 134, 0.24); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn[disabled] {
  /* in-flight only — the gate is validation, never a dead button */
  filter: saturate(0.85);
  opacity: 0.85;
  cursor: progress;
  transform: none;
}
.btn--blue { background: var(--field-blue); box-shadow: var(--lift-blue); }
.btn--blue:hover { box-shadow: 0 10px 20px rgba(47, 107, 255, 0.24), 0 26px 52px rgba(47, 107, 255, 0.22); }
.btn--ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--mist); box-shadow: var(--lift-1); transform: none; }
.btn .spinner { display: none; }
.btn.is-loading .spinner { display: block; animation: spin 0.8s linear infinite; }
.btn.is-loading .label { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

.linkbtn {
  background: none;
  border: 0;
  font: 600 var(--fs-sm)/1 var(--ui);
  color: var(--blue-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  padding: 12px 4px;
  min-height: var(--tap);
}

/* ---------- bubbles that carry figures ---------- */
.bubbles { display: grid; gap: 14px; margin-top: 22px; }

.bubble {
  border-radius: var(--r-bubble);
  padding: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  align-content: start;
}
.bubble--green { background: var(--field-green); box-shadow: var(--lift-green); }
.bubble--blue { background: var(--field-blue); box-shadow: var(--lift-blue); }
.bubble--quiet {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: var(--lift-1);
}
.bubble::after {
  content: "";
  position: absolute;
  width: 150px; height: 150px;
  right: -46px; bottom: -70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}
.bubble--quiet::after { background: var(--mist); }
.bubble h3 { font-size: var(--fs-h3); position: relative; z-index: 1; }
.bubble p { font-size: var(--fs-sm); line-height: 1.5; position: relative; z-index: 1; }
.bubble .big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 0.95;
  letter-spacing: -0.04em;
  position: relative;
  z-index: 1;
}

/* points ladder — a real table of real figures */
.ladder { margin-top: 6px; position: relative; z-index: 1; display: grid; gap: 1px; }
.ladder div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-size: var(--fs-sm);
}
.ladder div:first-child { border-top: 0; }
.ladder .pts { font-family: var(--display); font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em; white-space: nowrap; }
.bubble--quiet .ladder div { border-color: var(--line); }

/* ---------- how it works: a real sequence ---------- */
.steps { margin-top: 22px; display: grid; gap: 18px; counter-reset: step; }
.step { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start; }
.step .mark {
  counter-increment: step;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pink-wash);
  color: var(--pink-ink);
}
.step:nth-child(2) .mark { background: var(--green-wash); color: var(--green-ink); }
.step:nth-child(3) .mark { background: var(--blue-wash); color: var(--blue-ink); }
.step .mark svg { width: 22px; height: 22px; }
.step h3 { font-size: var(--fs-h3); }
.step h3::before { content: counter(step) ". "; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.step p { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 3px; }

/* ---------- placeholder imagery, always marked ---------- */
.placeholder {
  border-radius: var(--r-md);
  border: 1.5px dashed #c9cee2;
  background:
    repeating-linear-gradient(135deg, var(--mist) 0 10px, var(--mist-2) 10px 20px);
  color: var(--ink-3);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  min-height: 132px;
  font-size: var(--fs-xs);
  line-height: 1.4;
}
.placeholder strong { display: block; font-weight: 600; color: var(--ink-2); font-size: var(--fs-sm); }

/* ---------- PIN ---------- */
.pin {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 20px;
}
.pin input {
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 56px;
  text-align: center;
  font: 700 1.5rem/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--mist);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 0;
  transition: transform 0.22s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.pin input:focus { outline: none; border-color: var(--blue-1); background: var(--paper); box-shadow: 0 2px 6px rgba(47, 107, 255, 0.12), 0 10px 24px rgba(47, 107, 255, 0.16); }
.pin input.is-filled { background: var(--blue-wash); border-color: #b9d0ff; animation: pop 0.34s var(--ease); }
@keyframes pop { 0% { transform: scale(0.86); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ---------- success ---------- */
.seal {
  width: 92px; height: 92px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--field-green);
  box-shadow: var(--lift-green);
  display: grid;
  place-items: center;
  color: #fff;
}
.seal svg { width: 44px; height: 44px; }

.codecard {
  margin-top: 20px;
  border-radius: var(--r-bubble);
  background: var(--field-pink);
  box-shadow: var(--lift-pink);
  color: #fff;
  padding: 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.codecard::after {
  content: "";
  position: absolute;
  width: 190px; height: 190px;
  left: -70px; top: -90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.codecard .code {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}
.codecard .qr {
  width: 128px; height: 128px;
  margin: 14px auto 0;
  background: #fff;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  padding: 8px;
}
.codecard p { font-size: var(--fs-sm); position: relative; z-index: 1; }

/* ---------- footers, legal ---------- */
.footer {
  padding: 22px;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--ink-3);
  background: var(--mist);
  border-top: 1px solid var(--line);
}
.footer a { color: var(--ink-2); text-underline-offset: 3px; }
.footer .sep { opacity: 0.5; padding-inline: 6px; }

.legal { margin-top: 14px; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.5; }

/* ---------- mockup chrome (not part of the product) ---------- */
.mockbar {
  max-width: 460px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 var(--fs-xs)/1 var(--ui);
  color: var(--ink-3);
}
.mockbar a { color: var(--ink-2); text-decoration: none; }
.mockbar a:hover { color: var(--pink-1); }
.mockbar .tag {
  margin-left: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 5px 10px;
}
@media (max-width: 619px) { .mockbar { display: none; } }

/* the QR is a real inline SVG carrying its own dimensions; let the box win */
.codecard .qr svg, .qrbox svg { width: 100%; height: auto; display: block; }
