/* ===========================================================================
   onboarding.css — chrome + step layout, in the light/colourful/playful style.
   Shell uses .print-surface (light paper + subtle grain) from components.css.
   =========================================================================== */

.ob {
  height: 100dvh;                      /* pin the shell: the page itself never scrolls */
  display: grid;
  grid-template-rows: auto 1fr auto;   /* header · stage · footer */
}

/* ---- Header: back · progress · Beten ---- */
.ob-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s5) var(--s5) var(--s2);
}
.ob-back {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  font-size: 22px; line-height: 1;
  transition: transform .1s var(--ease), border-color .15s var(--ease);
}
.ob-back:hover { border-color: var(--coral); }
.ob-back:active { transform: scale(.94); }

.ob-track {
  flex: 1;
  height: 10px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.ob-fill {
  height: 100%; width: 0;
  background: var(--coral);
  border-radius: inherit;
  transition: width .45s var(--ease);
}
.ob-seal { flex: none; width: 38px; }

/* ---- Stage ----
   The ONLY scroller: header/footer stay put and a long step scrolls inside here,
   instead of the whole shell growing and nudging the page a few px (which reads
   as a broken mini-scroll). min-height:0 is what lets the 1fr row actually shrink. */
.ob-stage {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;   /* don't chain the bounce out to the page */
  padding: var(--s4) var(--s5) var(--s2);
  display: flex; flex-direction: column;
}
.ob-stage > * { flex: 1 0 auto; }   /* the step fills the stage; grows if taller */

/* ---- Footer CTA ---- */
.ob-foot {
  padding: var(--s4) var(--s5);
  padding-bottom: max(var(--s4), env(safe-area-inset-bottom));
}

/* ---- Shared step pieces ---- */
.step-kicker {
  font-family: var(--font-he);
  font-size: 13px; letter-spacing: .5px; color: var(--coral);
  font-weight: 700; margin-bottom: var(--s1);
}
.step-title {
  font-family: var(--font-he);
  font-weight: 700; font-size: 32px; line-height: 1.05;
  color: var(--ink); margin-bottom: var(--s3);
}
.step-sub {
  font-family: var(--font-body);
  color: var(--muted); font-size: var(--t-body); line-height: 1.5;
  margin-bottom: var(--s5);
}
.field label { color: var(--muted); }
.honest-note {
  font-family: var(--font-body);
  font-size: var(--t-small); color: var(--muted); margin-top: var(--s2);
}
/* Inline failure under a field — holds its line so nothing jumps when it fills. */
.step-err {
  font-family: var(--font-body); font-size: var(--t-small); font-weight: 500;
  color: var(--coral-d); text-align: center; min-height: 20px;
}

/* ---- Password (signup only — login reuses it, never a code) ---- */
/* direction:ltr is load-bearing. The page is RTL but the field is dir=ltr (passwords
   are), so inset-inline-end on an RTL wrap resolves left while padding-inline-end on
   the LTR input reserves right — the reveal lands on top of the text it's meant to
   sit beside. Pinning the wrap to ltr makes both agree on the far end. */
.input-wrap { position: relative; display: flex; direction: ltr; }
.input-wrap .input { padding-inline-end: 74px; } /* keep text clear of the reveal */
.reveal {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 8px 10px;
  font-family: var(--font-he); font-size: var(--t-small); color: var(--coral);
  border-radius: 10px;
}
.reveal:hover { background: color-mix(in srgb, var(--coral) 10%, transparent); }

/* ---- Email code entry (verify step) ---- */
.code-to { font-family: var(--font-body); font-size: var(--t-small); color: var(--muted); text-align: center; }
.code-to b { color: var(--ink); font-weight: 700; unicode-bidi: isolate; } /* keep the address LTR inside RTL copy */

.code-row { display: flex; gap: 8px; justify-content: center; margin: var(--s4) 0 var(--s2); }
.code-cell {
  flex: 1 1 0; min-width: 0; max-width: 54px; height: 58px;
  font-family: var(--font-body); font-size: 26px; font-weight: 700;
  text-align: center; color: var(--ink);
  background: var(--surface);
  border: 2.5px solid var(--line); border-radius: 14px;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}
.code-cell[data-filled="true"] { border-color: var(--ink); }
.code-cell:focus {
  outline: none; border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 94, .15);
}
.code-row[data-bad="true"] .code-cell { border-color: var(--coral-d); background: var(--field-bad); }
.code-row[data-bad="true"] { animation: code-shake .3s ease; }
@keyframes code-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}

.resend {
  display: block; width: 100%; margin-top: var(--s2);
  background: none; border: none; padding: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: var(--t-small);
  color: var(--coral); text-decoration: underline; text-underline-offset: 3px;
  transition: color .12s var(--ease);
}
.resend:hover:not(:disabled) { color: var(--coral-d); }
.resend:disabled { color: var(--muted); text-decoration: none; cursor: default; }

/* Prototype-only: no mailer yet, so the mock verifier shows its code. Dashed =
   scaffolding, reads as temporary. Goes away with core/verifier.js's mock. */
.dev-hint {
  font-family: var(--font-body); font-size: 12.5px; text-align: center;
  color: var(--muted); background: var(--surface-2);
  border: 1px dashed var(--line); border-radius: 10px;
  padding: 9px; margin-top: var(--s5);
}
.dev-hint b { font-weight: 700; font-size: 14px; color: var(--ink); letter-spacing: 2px; unicode-bidi: isolate; }

/* ---- Consent + 18+ gate (after email) ---- */
.consent-list { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s4); }
.consent-row {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: start;
  background: #fff; border: 2.5px solid var(--line); border-radius: 16px;
  padding: 15px 16px;
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.consent-row:active { transform: scale(.995); }
.consent-row .cbox {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  border: 2.5px solid var(--line); display: grid; place-items: center;
  margin-top: 1px;
  transition: background .12s var(--ease), border-color .12s var(--ease);
}
.consent-row[aria-checked="true"] { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 7%, #fff); }
.consent-row[aria-checked="true"] .cbox { background: var(--teal); border-color: var(--teal); }
.consent-row[aria-checked="true"] .cbox::after {
  content: ""; width: 7px; height: 12px; margin-top: -3px;
  border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.consent-label { font-family: var(--font-body); font-size: 15.5px; color: var(--ink); line-height: 1.45; }
.consent-link { color: var(--coral); font-weight: 700; text-decoration: underline; }

/* ---- Big selectable choice cards (bond, etc.) ---- */
.choice-list { display: flex; flex-direction: column; gap: var(--s3); }
.choice {
  text-align: start; width: 100%;
  background: #fff;
  border: 2.5px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s5);
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow-card);
  transition: border-color .15s var(--ease), transform .1s var(--ease);
}
.choice:active { transform: scale(.99); }
.choice .choice-top { display: flex; align-items: center; justify-content: space-between; }
.choice h3 { font-family: var(--font-he); font-weight: 700; font-size: 26px; color: var(--ink); }
.choice p  { color: var(--muted); font-size: var(--t-body); }
.choice .mark {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2.5px solid var(--line); display: grid; place-items: center;
}
.choice[aria-pressed="true"] { border-color: var(--sel, var(--coral)); }
.choice[aria-pressed="true"] .mark { border-color: var(--sel, var(--coral)); background: var(--sel, var(--coral)); }
.choice[aria-pressed="true"] .mark::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; }

/* ---- Rows / option pills ---- */
.row { display: flex; gap: var(--s3); }
.row .field { flex: 1; }
.quip { font-family: var(--font-he); font-size: 14px; color: var(--coral); margin-top: 6px; min-height: 18px; }

.q-block { margin-bottom: var(--s5); }
.q-label { font-family: var(--font-he); font-weight: 700; font-size: 13px; color: var(--coral); margin-bottom: 10px; }
.opts { display: flex; flex-wrap: wrap; gap: 9px; }
.opt {
  padding: 11px 18px; border-radius: var(--r-pill);
  background: #fff; border: 2px solid var(--line);
  color: var(--ink); font-family: var(--font-body); font-weight: 600; font-size: 15.5px;
  transition: transform .1s var(--ease), background .12s var(--ease), border-color .12s var(--ease);
}
.opt:active { transform: scale(.95); }
.opt[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; }

/* ---- Discovery preferences step (age sliders + city chips) ---- */
.pref-rangerow { margin-bottom: 16px; }
.pref-rangehead {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--muted);
  margin-bottom: 4px;
}
.pref-rangeval { font-family: var(--font-he); font-weight: 700; font-size: 17px; color: var(--ink); }
.pref-range { width: 100%; accent-color: var(--coral); height: 22px; cursor: pointer; }
.city-grid { gap: 9px; }

/* ---- Energy "?" info popup (shared) ---- */
.epop-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(44,42,56,.5);
  display: grid; place-items: center; padding: var(--s5);
  animation: fade-up .2s var(--ease);
}
.epop {
  background: var(--paper); border-radius: 22px;
  padding: var(--s5); max-width: 320px; width: 100%;
  box-shadow: var(--shadow-pop); text-align: center;
}
.epop .bar { width: 48px; height: 8px; border-radius: 99px; background: var(--ec, var(--coral)); margin: 0 auto var(--s3); }
.epop-art { width: 110px; margin: 0 auto var(--s2); }
.epop-art svg { width: 100%; }
.epop h3 { font-family: var(--font-he); font-weight: 700; font-size: 28px; color: var(--ink); margin-bottom: 6px; }
.epop p  { color: var(--muted); font-size: 16px; line-height: 1.5; margin-bottom: var(--s4); }

/* ---- Beten cast (energy intro) ---- */
.beten-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-bottom: var(--s4); }
.beten-card {
  background: #fff; border: 2.5px solid var(--line); border-radius: 20px;
  padding: var(--s3) var(--s2) 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: var(--shadow-card);
  transition: transform .1s var(--ease), border-color .12s var(--ease);
}
.beten-card:active { transform: scale(.97); }
.beten-card:hover { border-color: var(--ec, var(--coral)); }
.beten-card[aria-pressed="true"] { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,107,94,.18), var(--shadow-card); }
/* At the pick cap: still readable, visibly not tappable — better than a tap that
   silently does nothing. */
.beten-card.is-full { opacity: .45; }
.opt.is-full { opacity: .45; }
.beten-art { width: 82px; }
.beten-art svg { width: 100%; display: block; }
.beten-name { font-family: var(--font-he); font-weight: 700; font-size: 21px; color: var(--ink); }
.beten-hint { font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--coral); }
/* A card label that's a sentence, not a word (the דתל״ש option). Shrunk + centred so
   it wraps inside the card instead of stretching the whole grid row. */
.beten-name.is-long { font-size: 15px; line-height: 1.25; text-align: center; }

/* Respectful opt-out — quiet by default, never competes with the real choices.
   Also the axis's "לנקות הכל": both are the same quiet, undo-shaped action. */
.decline-pill {
  display: block; width: 100%; margin-top: 6px;
  background: none; border: none; padding: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
  transition: color .12s var(--ease);
}
.decline-pill:hover { color: var(--ink); }
.decline-pill[aria-pressed="true"] { color: var(--coral); text-decoration: none; }
.step-ack {
  font-family: var(--font-body); font-size: 14px; line-height: 1.45;
  color: var(--teal); text-align: center; margin-top: 8px;
}

/* ---- "What isn't for you" (§5.5b) — the SAME cards as §5, crossed out ----
   Inverted from the identity grid on purpose: cards start on and you remove. The
   colour lives in what you KEPT, so the screen reads as an open set you narrowed
   rather than a list of groups you rejected. */
.avoid-set { margin-bottom: var(--s5); }
.avoid-set .pick-count { margin-bottom: 10px; }

.beten-grid.is-avoid .beten-card { position: relative; }
/* Pressed means CANCELLED here, so the identity grid's coral "chosen" ring must not
   leak in — it would read as the exact opposite of what happened. */
.beten-grid.is-avoid .beten-card[aria-pressed="true"] {
  border-color: var(--line); box-shadow: var(--shadow-card);
  background: color-mix(in srgb, var(--ink) 4%, #fff);
}
.beten-card .card-x {
  position: absolute; inset-block-start: 7px; inset-inline-end: 9px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  background: var(--coral); color: #fff;
  opacity: 0; transform: scale(.5);
  transition: opacity .14s var(--ease), transform .14s var(--ease);
}
.beten-card.is-cancelled .card-x { opacity: 1; transform: scale(1); }
.beten-card.is-cancelled .beten-art { opacity: .3; filter: grayscale(1); }
.beten-card.is-cancelled .beten-name { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }

/* ---- Energy tiles (picker) ---- */
.pick-count { font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--muted); margin-bottom: var(--s4); }
.pick-count b { color: var(--coral); }
.cat { margin-bottom: var(--s4); }
.cat-h { font-family: var(--font-he); font-weight: 700; font-size: 14px; color: var(--ink); opacity: .55; margin-bottom: 8px; }
.etile {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: start;
  background: #fff; border: 2.5px solid var(--line); border-radius: 16px;
  padding: 11px 13px; margin-bottom: 8px;
  transition: background .12s var(--ease), border-color .12s var(--ease), transform .1s var(--ease);
}
.etile:active { transform: scale(.99); }
.etile-bar { flex: none; width: 7px; align-self: stretch; min-height: 38px; border-radius: 4px; background: var(--ec); }
.etile-text { flex: 1; display: flex; flex-direction: column; }
.etile-name { font-family: var(--font-he); font-weight: 700; font-size: 21px; color: var(--ink); line-height: 1; }
.etile-vibe { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.etile-check {
  flex: none; width: 27px; height: 27px; border-radius: 50%;
  border: 2.5px solid var(--line); display: grid; place-items: center;
  color: #fff; font-family: var(--font-he); font-weight: 700; font-size: 13px;
}
.etile[aria-pressed="true"] { border-color: var(--ec); background: color-mix(in srgb, var(--ec) 12%, #fff); }
.etile[aria-pressed="true"] .etile-check { background: var(--ec); border-color: var(--ec); }

/* ---- Energy visual quiz (one picture-question per screen) ---- */
.quiz { text-align: center; }
.quiz .step-title { font-size: 30px; margin: 6px 0 var(--s5); }
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qopt {
  background: #fff; border: 3px solid var(--line); border-radius: 22px;
  padding: 20px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: var(--shadow-card);
  transition: transform .1s var(--ease), border-color .12s var(--ease), background .12s var(--ease);
}
.qopt:active { transform: scale(.96); }
.qopt[aria-pressed="true"] { border-color: var(--qc); background: color-mix(in srgb, var(--qc) 12%, #fff); }
.qopt .emoji { font-size: 44px; line-height: 1; }
.qopt .ql { font-family: var(--font-he); font-weight: 700; font-size: 17px; color: var(--ink); }

/* ---- Energy swipe deck ----
   Sized to the stage, never to a magic number: the deck takes the height left
   over after the title/count/controls, so the step fits on a short phone without
   scrolling and doesn't leave a hole on a tall one. The card follows the deck. */
.swipe { text-align: center; display: flex; flex-direction: column; min-height: 0; }
.swipe > :not(.deck) { flex: none; }
.swipe-title { font-size: 26px; margin-bottom: 4px; }
.swipe-cat { font-family: var(--font-body); font-weight: 800; font-size: 23px; color: var(--coral); margin-bottom: var(--s3); min-height: 28px; letter-spacing: -.3px; }
.deck {
  position: relative; display: grid; place-items: center;
  flex: 1 1 auto; min-height: 232px;   /* floor: below this the stage scrolls instead */
  margin-bottom: var(--s2);
}
.scard {
  /* Height comes from the deck; the ratio keeps the card portrait on every screen
     instead of squashing toward square on a short one. The two caps are a matched
     pair: 380 * 28/34 = 313, which stays under max-width on every phone width, so
     the width cap never binds and never breaks the ratio. Move one, move both. */
  position: absolute; height: min(100%, 380px); aspect-ratio: 28 / 34;
  width: auto; max-width: 92%; border-radius: 28px;
  background: var(--c); color: #fff; box-shadow: 0 14px 34px rgba(44,42,56,.2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  cursor: grab; touch-action: none; will-change: transform; user-select: none;
}
.scard.back { transform: scale(.93) translateY(14px); filter: brightness(.97); }
/* proportional, not fixed: the card is now screen-sized, so a px width would leave
   Beten stranded in a void on a big card and crowd a small one. 42% ≈ the old 110px
   at the old card width, and holds that composition at every size. */
.scard-beten { width: 42%; }
.scard-beten svg { width: 100%; }
.scard h2 { font-family: var(--font-he); font-weight: 700; font-size: 30px; text-align: center; padding: 0 20px; line-height: 1.1; }
.stamp { position: absolute; top: 22px; font-family: var(--font-he); font-weight: 800; font-size: 26px;
  padding: 5px 14px; border: 4px solid #fff; border-radius: 12px; opacity: 0; }
.stamp.yes { inset-inline-start: 18px; transform: rotate(-12deg); }
.stamp.no  { inset-inline-end: 18px; transform: rotate(12deg); }
.stamp.super { top: 14px; left: 50%; transform: translateX(-50%) rotate(-4deg); border-color: #fff; }
.swipe-done { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.swipe-done .scard-beten { width: 90px; }
.swipe-done p { font-family: var(--font-he); font-weight: 700; font-size: 22px; color: var(--ink); }

.swipe-count { font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--muted); margin: 6px 0; }
.swipe-count b { color: var(--coral); }
.swipe-ctrl { display: flex; justify-content: center; gap: 22px; padding-bottom: 4px; }
.cbtn { width: 50px; height: 50px; border-radius: 50%; border: none; background: #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,.12); font-size: 21px; cursor: pointer; display: grid; place-items: center; transition: transform .1s; }
.cbtn:active { transform: translateY(2px); }
.cbtn.no { color: #9A9AA6; } .cbtn.yes { color: var(--coral); }
/* super stays the biggest of the three — it's the rarer, louder call */
.cbtn.super {
  width: 60px; height: 60px; font-size: 28px; color: #fff;
  background: var(--yellow); box-shadow: 0 5px 0 var(--yellow-d);
  align-self: center;
}
.cbtn.super:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--yellow-d); }

/* ---- Energy picker: side category rail + chips body (legacy) ---- */
.energy-layout { display: flex; gap: 12px; align-items: flex-start; }
.cat-rail {
  flex: none; width: 116px; display: flex; flex-direction: column; gap: 8px;
  max-height: 64dvh; overflow-y: auto; padding-bottom: 4px;
}
.cat-railbtn {
  position: relative; text-align: start; padding: 11px 12px; border-radius: 14px;
  background: #fff; border: 2px solid var(--line);
  font-family: var(--font-he); font-weight: 700; font-size: 14px; line-height: 1.12; color: var(--ink);
  transition: background .12s var(--ease), border-color .12s var(--ease), transform .1s var(--ease);
}
.cat-railbtn:active { transform: scale(.97); }
.cat-railbtn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat-railbtn .cnt {
  display: none; position: absolute; inset-inline-start: 8px; top: 8px;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px;
  background: var(--coral); color: #fff; font-size: 11px; align-items: center; justify-content: center;
}
.cat-railbtn .cnt.show { display: inline-flex; }
.cat-body { flex: 1; min-width: 0; }
.cat-body .pick-count { margin-bottom: var(--s3); }

/* ---- Energy picker chips (legacy per-category screen) ---- */
.cat-screen {
  min-height: calc(100dvh - 210px);
  display: flex; flex-direction: column; justify-content: center;
  text-align: center;
}
.cat-screen .step-kicker { font-size: 14px; }
.cat-screen .step-title { font-size: 38px; margin-bottom: 4px; }
.cat-screen .pick-count { margin-bottom: var(--s5); }

.echips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.echip {
  padding: 14px 22px; border-radius: var(--r-pill);
  border: 2.5px solid color-mix(in srgb, var(--ec) 45%, #fff);
  background: color-mix(in srgb, var(--ec) 16%, #fff);
  color: var(--ink); font-family: var(--font-he); font-size: 20px; line-height: 1.05;
  display: inline-flex; align-items: center; gap: 9px;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--ec) 30%, #fff);
  transition: transform .1s var(--ease), background .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease), box-shadow .1s var(--ease);
}
.echip:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--ec) 30%, #fff); }
.echip[aria-pressed="true"] { background: var(--ec); border-color: var(--ec); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--ec) 55%, #000); }
.echip .num {
  display: none; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255,255,255,.32); color: #fff; font-size: 12px; font-weight: 700;
  align-items: center; justify-content: center;
}
.echip[aria-pressed="true"] .num { display: inline-flex; }

.vibe { text-align: center; min-height: calc(100dvh - 210px); display: flex; flex-direction: column; justify-content: center; }
.vibe-type { font-family: var(--font-he); font-weight: 700; font-size: 42px; line-height: 1; margin: 4px 0 6px; }

/* energy mix flask + legend (short reveal) — כימיה made literal */
.flask-hero { display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin: var(--s4) auto var(--s4); }
.flask-hero .flask { width: 150px; }
.flask-hero .flask svg { width: 100%; display: block; }
.flask-hero .flask-beten { width: 88px; margin-bottom: 8px; }
.flask-hero .flask-beten svg { width: 100%; display: block; }
@keyframes flask-bubble { 0% { transform: translateY(6px); opacity: 0; } 50% { opacity: .55; } 100% { transform: translateY(-12px); opacity: 0; } }
.flask-bubbles circle { transform-box: fill-box; transform-origin: center; animation: flask-bubble 3s ease-in-out infinite; }
.flask-bubbles circle:nth-child(2) { animation-delay: .7s; }
.flask-bubbles circle:nth-child(3) { animation-delay: 1.4s; }
.flask-bubbles circle:nth-child(4) { animation-delay: 2.1s; }
@media (prefers-reduced-motion: reduce) { .flask-bubbles circle { animation: none; } }

.loved-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; max-width: 320px; margin: var(--s3) auto 0; }
.loved-chip { font-family: var(--font-he); font-weight: 700; font-size: 14px; padding: 7px 13px; border-radius: var(--r-pill); background: #fff; border: 2px solid var(--line); color: var(--ink); }
.loved-chip.is-super { border-color: var(--coral); color: var(--coral); }

.mix-legend { display: flex; flex-direction: column; gap: 9px; max-width: 280px; margin: 0 auto; text-align: start; }
.leg { display: flex; align-items: center; gap: 10px; }
.leg-dot { flex: none; width: 14px; height: 14px; border-radius: 5px; }
.leg-name { flex: 1; font-family: var(--font-he); font-weight: 700; font-size: 17px; color: var(--ink); }
.leg-pct { font-family: var(--font-he); font-weight: 700; font-size: 15px; color: var(--muted); }

.mixbars { display: flex; flex-direction: column; gap: 12px; margin: var(--s5) 0; text-align: start; }
.mixbar-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.mixbar-name { font-family: var(--font-he); font-weight: 700; font-size: 18px; color: var(--ink); }
.mixbar-pct { font-family: var(--font-he); font-weight: 700; font-size: 15px; color: var(--muted); }
.mixbar-track { height: 14px; background: var(--line); border-radius: var(--r-pill); overflow: hidden; }
.mixbar-fill { height: 100%; border-radius: var(--r-pill); transition: width .6s var(--ease); }

.vibe-chips { justify-content: center; }
.vibe-chips .echip { font-size: 15px; padding: 8px 13px; box-shadow: none; }

/* ---- Mix pie + tune rows (step 6) ---- */
.pie-wrap { display: flex; justify-content: center; margin-bottom: var(--s4); }
.tune-row { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.tune-dot { flex: none; width: 16px; height: 16px; border-radius: 5px; background: var(--ec); }
.tune-row .name { flex: none; width: 84px; font-weight: 600; color: var(--ink); }
.tune-row input[type=range] { flex: 1; }

/* ---- Love language — many Beten cards, capped multi (step 8) ---- */
.love-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.love-card {
  background: #fff; border: 2.5px solid var(--line); border-radius: 20px;
  padding: 10px 8px 9px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  box-shadow: var(--shadow-card); text-align: center;
  transition: transform .12s var(--ease), border-color .14s var(--ease), background .14s var(--ease), opacity .12s var(--ease);
}
.love-card:active { transform: scale(.97); }
.love-card:disabled { opacity: .4; }
.love-card[aria-pressed="true"] { border-color: var(--lc); background: color-mix(in srgb, var(--lc) 9%, #fff); transform: rotate(-1.2deg); }
.love-beten { width: 60px; }
.love-beten svg { width: 100%; display: block; }
.love-label { font-family: var(--font-he); font-weight: 700; font-size: 15.5px; color: var(--ink); line-height: 1.15; min-height: 36px; display: grid; place-items: center; }

/* ---- Flags — red (pick 1) + green (pick a few), one screen (step 9) ---- */
.flag-grid { gap: 9px; margin-bottom: var(--s5); }
.flag-h { margin-top: var(--s2); display: flex; align-items: center; gap: 7px; }
.flag-h::before { content: ""; width: 12px; height: 14px; flex: none; display: inline-block; clip-path: polygon(0 0, 100% 24%, 0 48%); }
.flag-h.red   { color: var(--coral); } .flag-h.red::before   { background: var(--coral); }
.flag-h.green { color: var(--green); } .flag-h.green::before { background: var(--green); }
.opt.flag-red,
.opt.flag-green { display: inline-flex; align-items: center; }
.opt.flag-red[aria-pressed="true"]   { background: var(--coral); border-color: var(--coral); color: #fff; }
.opt.flag-green[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

/* ---- Icks: Beten persona cards (step 9) ---- */
.pick-count .c-ick { color: var(--coral); }
.pick-count .c-click { color: var(--teal); }
.persona-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.persona {
  background: #fff; border: 2.5px solid var(--line); border-radius: 20px;
  padding: 12px 10px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: var(--shadow-card);
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.persona-beten { width: 84px; }
.persona-beten svg { width: 100%; display: block; }
.persona-name { font-family: var(--font-he); font-weight: 700; font-size: 17px; color: var(--ink); text-align: center; line-height: 1.1; min-height: 38px; display: grid; place-items: center; }
.persona-acts { display: flex; gap: 10px; }
.pa {
  width: 42px; height: 42px; border-radius: 50%; border: 2.5px solid var(--line);
  background: #fff; font-size: 18px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; color: var(--muted);
  transition: transform .1s var(--ease), background .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease);
}
.pa:active { transform: scale(.9); }
.pa:disabled { opacity: .35; cursor: default; }
.pa-ick:hover  { border-color: var(--coral); color: var(--coral); }
.pa-click:hover { border-color: var(--teal); color: var(--teal); }
/* selected states colour the whole card + the chosen button */
.persona[data-state="ick"]   { border-color: var(--coral); background: color-mix(in srgb, var(--coral) 8%, #fff); }
.persona[data-state="ick"]   .pa-ick   { background: var(--coral); border-color: var(--coral); color: #fff; }
.persona[data-state="click"] { border-color: var(--teal);  background: color-mix(in srgb, var(--teal) 9%, #fff); }
.persona[data-state="click"] .pa-click { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---- Photos — persona-tied upload grid (last step before ready) ---- */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: var(--s4); }
.photo-tile {
  position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden;
  border: 2.5px dashed color-mix(in srgb, var(--pc) 55%, var(--line));
  background: #fff center / cover no-repeat; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .12s var(--ease), border-color .14s var(--ease);
}
.photo-tile:active { transform: scale(.97); }
.photo-tile.is-filled { border-style: solid; border-color: var(--pc); }
.photo-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 8px 6px; text-align: center; pointer-events: none;
}
.photo-beten { width: 46px; opacity: .9; }
.photo-beten svg { width: 100%; display: block; }
.photo-prompt {
  font-family: var(--font-he); font-weight: 700; font-size: 12px; line-height: 1.15;
  color: color-mix(in srgb, var(--pc) 70%, var(--ink));
}
.photo-plus { font-family: var(--font-he); font-weight: 700; font-size: 18px; color: var(--pc); }
.photo-tile.is-filled .photo-empty { display: none; }
/* remove button — only meaningful on a filled tile */
.photo-x {
  position: absolute; top: 6px; inset-inline-end: 6px; width: 24px; height: 24px;
  border: none; border-radius: 50%; background: rgba(44,42,56,.62); color: #fff;
  font-size: 12px; line-height: 1; display: none; place-items: center; cursor: pointer;
}
.photo-tile.is-filled .photo-x { display: grid; }
.photo-tag {
  position: absolute; bottom: 6px; inset-inline-start: 6px;
  font-family: var(--font-he); font-weight: 700; font-size: 11px; color: #fff;
  background: var(--coral); border-radius: var(--r-pill); padding: 3px 9px;
}

/* The on-device check takes a beat the first time (core/nsfw.js loads ~3.9 MB once, on
   this screen only). A tile that sits there doing nothing reads as a broken app, so it
   says it is working — without saying what it is doing to the photo. */
.photo-tile.is-busy { pointer-events: none; }
.photo-tile.is-busy::after {
  content: ''; position: absolute; inset: 0; z-index: 3;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
}
.photo-tile.is-busy::before {
  content: ''; position: absolute; z-index: 4; top: 50%; inset-inline-start: 50%;
  width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--pc) 28%, transparent);
  border-top-color: var(--pc);
  animation: photo-spin .8s linear infinite;
}
@keyframes photo-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .photo-tile.is-busy::before { animation: none; }
}

/* The "that photo didn't land" line. Byte-for-byte the same rule as .pm-err in app.css
   (the in-app photo editor, mission U) — onboarding.html does not load app.css, so it has
   to be stated here as well. If one changes, change both. */
.pm-err {
  font-family: var(--font-body); font-weight: 600; font-size: 12.5px;
  color: var(--coral-d); margin-top: 8px;
}
.pm-err:not(.is-on) { display: none; }

/* ---- Ready / profile summary (step 9) ---- */
.ready-card {
  background: #fff; border: 2.5px solid var(--line); border-radius: var(--r-card);
  box-shadow: var(--shadow-card); padding: var(--s5) var(--s4) var(--s5);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
}
.ready-seal { width: 96px; margin-bottom: 2px; }
.ready-badge {
  font-family: var(--font-body); font-weight: 700; font-size: 12.5px; color: var(--teal);
  background: color-mix(in srgb, var(--teal) 14%, #fff); border-radius: var(--r-pill);
  padding: 5px 12px;
}
.ready-name { font-family: var(--font-he); font-weight: 700; font-size: 28px; color: var(--ink); line-height: 1.1; margin-top: 6px; }
.ready-facts { font-family: var(--font-body); font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.ready-bond {
  font-family: var(--font-he); font-weight: 700; font-size: 15px; color: #fff;
  background: var(--bc, var(--coral)); border-radius: var(--r-pill); padding: 6px 16px; margin-top: 8px;
}
.ready-type { font-family: var(--font-he); font-weight: 700; font-size: 24px; margin-top: 12px; }
.ready-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 8px; }
.ready-chip {
  font-family: var(--font-he); font-weight: 700; font-size: 14px; color: var(--ink);
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-pill); padding: 5px 12px;
}

/* ---- Range input ---- */
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px; border-radius: var(--r-pill);
  background: #fff; border: 2px solid var(--line); outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--coral); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer;
}
input[type=range]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--coral); border: 3px solid #fff; cursor: pointer;
}
