:root {
  --anlene-green: #00693e;
  --anlene-green-dark: #00522f;
  --anlene-green-light: #e7f3ed;
  --anlene-red: #d0021b;
  --ink: #1c2b26;
  --muted: #6b7c74;
  --border: #d8e4de;
  /* premium dark theme: deep green/blue depths with gold accents */
  --gold: #d4af5a;
  --gold-light: #f1dc9c;
  --gold-deep: #a97e33;
  --panel: #0e463c;         /* card surface */
  --panel-deep: #0a352e;    /* input surface */
  --bg-deep: #052420;
  --text-light: #f4efe2;
  --text-dim: #bcd0c4;
  --gold-dim: #cfc39a;
  /* avatar size: everything else on a step (card, buttons) is content the
     shopper needs, so the decorative avatar is the one element allowed to
     shrink when the screen is short (overridden per-viewport on phones) */
  --avatar-w: 210px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, #12365e 0%, #0b1f3f 60%, #081733 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--ink);
}

.stage { text-align: center; }

/* ── Phone frame ─────────────────────────────────────────────── */
.phone {
  position: relative;
  width: 390px;
  height: min(760px, calc(100vh - 48px));
  /* client reference: deep royal blue at the top fading into dark green
     toward the bottom, with a soft glow behind the avatar area */
  background:
    radial-gradient(120% 55% at 50% 30%, rgba(35, 80, 130, .28) 0%, rgba(35, 80, 130, 0) 70%),
    /* gold decorative curves: ring behind the avatar + swoosh lines below */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='390' height='760' viewBox='0 0 390 760'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='0'><stop offset='0' stop-color='%23d4af5a' stop-opacity='0'/><stop offset='0.5' stop-color='%23f1dc9c' stop-opacity='0.9'/><stop offset='1' stop-color='%23d4af5a' stop-opacity='0'/></linearGradient></defs><circle cx='195' cy='250' r='148' fill='none' stroke='%23d4af5a' stroke-opacity='0.30' stroke-width='2'/><circle cx='195' cy='250' r='170' fill='none' stroke='%23f1dc9c' stroke-opacity='0.14' stroke-width='1.3'/><path d='M-20 560 C 90 480 250 545 410 430' fill='none' stroke='url(%23g)' stroke-width='3'/><path d='M-20 588 C 100 508 260 570 410 458' fill='none' stroke='url(%23g)' stroke-width='1.5' opacity='0.55'/><circle cx='320' cy='470' r='2.2' fill='%23f1dc9c' fill-opacity='0.8'/><circle cx='72' cy='520' r='1.6' fill='%23f1dc9c' fill-opacity='0.6'/><circle cx='348' cy='210' r='1.8' fill='%23f1dc9c' fill-opacity='0.55'/><circle cx='46' cy='300' r='1.5' fill='%23f1dc9c' fill-opacity='0.5'/></svg>") center / 100% 100% no-repeat,
    linear-gradient(180deg, #0e2159 0%, #0f2c58 30%, #0c4a44 62%, #093a31 82%, #062a24 100%);
  border-radius: 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 0 10px #111a2e;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  text-align: left;
}

.phone-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  min-height: 68px; /* keep the bar height stable with the logo out of flow */
  /* champagne-gold band like the reference design */
  background: linear-gradient(180deg, #f4e3a9 0%, #ddb968 55%, #c69c42 100%);
  border-bottom: 1px solid var(--gold-deep);
  flex: 0 0 auto;
}
/* invisible placeholder where the sidebar burger used to be — keeps the
   original three-slot layout so the logo stays centered */
.phone-header .burger { font-size: 18px; visibility: hidden; }
/* dead-centered in the bar regardless of what sits in the corners;
   the scale enlarges the drawing without affecting the bar's size */
.phone-header .logo {
  height: 48px;
  width: auto;
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1.4);
}
/* compact globe chip; tapping opens a small dropdown */
.lang-switch { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(212, 175, 90, .6);
  background: var(--panel-deep);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
  cursor: pointer;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 175px;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  padding: 6px;
  z-index: 40;
}
.lang-menu.hidden { display: none; }
.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
}
.lang-menu button:hover { background: rgba(212, 175, 90, .18); }
.lang-menu button.active { color: var(--gold-light); font-weight: 700; }

.phone-screen {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: transparent;
  /* never let a classic scrollbar steal layout width: a longer language (BM)
     overflowing would otherwise re-wrap all the text narrower, and the
     narrower layout can stay overflowed after switching back — a bistable
     layout flip. Scrolling still works by touch/wheel. */
  scrollbar-width: none;
}
.phone-screen::-webkit-scrollbar { display: none; }

/* ── Shared screen elements ──────────────────────────────────── */
.step-tag {
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--anlene-green);
  background: var(--anlene-green-light);
  border-radius: 14px;
  padding: 3px 12px;
  margin-bottom: 12px;
}

/* negative margin tucks the info card up against the avatar (no gap).
   Avatar PNGs are pre-cut to transparency, so they sit directly on the
   dark background. */
.avatar {
  display: flex;
  justify-content: center;
  margin-bottom: -8px;
  position: relative;
}
.avatar .avatar-img {
  width: var(--avatar-w);
  height: auto;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, .32)) drop-shadow(0 6px 16px rgba(0, 0, 0, .4));
}
/* brand imagery is not interactive: blocks right-click save, long-press
   save/copy and dragging on the avatar, product shots and logos */
.avatar .avatar-img,
.card .product-img,
.phone-header .logo {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* the rest-pose PNG has more whitespace around the character, so it renders
   wider to make the character match the size on the other steps */
.avatar .avatar-img.avatar-rest { width: calc(var(--avatar-w) * 1.24); }
.avatar .badge {
  position: absolute; right: calc(50% - var(--avatar-w) / 2); top: 6px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--anlene-green-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}
.avatar .badge svg { width: 23px; height: 23px; display: block; }

.card {
  background: linear-gradient(180deg, #10493e 0%, var(--panel-deep) 100%);
  border: 1.5px solid var(--gold);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  color: var(--text-light);
  box-shadow: 0 0 22px rgba(255, 255, 255, .15), 0 8px 22px rgba(0, 0, 0, .35);
  /* paint above the avatar so the image tucks BEHIND the box */
  position: relative;
  z-index: 1;
}
.card h2 { font-size: 18px; color: var(--text-light); line-height: 1.45; font-weight: 700; }
.card h2.welcome-text { color: var(--text-light); }
/* step 1: taller welcome box, text centered in it */
.card.welcome-card { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card .source { display: block; margin-top: 10px; font-size: 11px; color: var(--gold-dim); }
.card ul.benefits { list-style: none; margin-top: 12px; text-align: left; display: inline-block; }
/* flex rows give a hanging indent: wrapped lines stay level with the text,
   never sliding under the check circle */
.card ul.benefits li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; margin: 6px 0; font-weight: 600; text-align: left; color: var(--text-light); }
.card ul.benefits li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #0a352e;
  font-size: 12px;
  font-weight: 800;
  margin-top: 1px;
}

/* steps 2/3: tall card, text centered in the space, source floating above the bottom */
.card.grow { flex: 1; display: flex; flex-direction: column; padding-bottom: 30px; }
.card.grow .card-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
/* risk-signs list: the block sits centered, the lines inside align left */
.card .card-body ul.benefits { display: inline-block; text-align: left; margin-top: 4px; margin-bottom: -6px; }
.card.grow .source { padding-top: 20px; font-size: 13px; line-height: 1.6; }
.fact-lead { font-size: 15px; font-weight: 700; color: var(--text-light); margin-bottom: 10px; }
.card h2.fact-main { font-size: 19px; line-height: 1.6; color: var(--gold-light); }

/* step 4: everything left-aligned; pack shot floats at the middle-right of the box */
.card.product-card { text-align: left; padding: 14px 138px 14px 18px; }
/* the pitch heading: 16px wherever there is room (the hard line breaks in
   the copy were authored for 16px); short phones override this to 14px
   below, where the longer BM copy would otherwise push the step into
   scrolling */
.card .product-pitch { font-size: 16px; line-height: 1.4; }
.card .product-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 6px; text-align: left; }
.card .product-info { flex: 1; min-width: 0; }
.card .product-info ul.benefits { margin-top: 4px; display: block; }
.card .product-info ul.benefits li { margin: 4px 0; }
.card .product-img {
  position: absolute;
  right: 2px;
  top: 8px;
  bottom: 8px;
  height: calc(100% - 16px); /* fill the card's height, small breathing room */
  width: auto;
  max-width: 132px;
  object-fit: contain;
}
/* the wellness (Total+) product image is a different shape and sits too far
   right with the shared position, so nudge it left */
.card .product-img-wellness { right: 14px; }

.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
/* one solid gold, no gradient shine or glow, per client feedback */
.btn-primary {
  background: var(--gold);
  color: #0a352e;
}
/* inverted per client feedback: solid gold with dark green text, matching
   .btn-primary (border kept so the button height doesn't shift) */
.btn-outline { background: var(--gold); color: #0a352e; border: 2px solid var(--gold); }
.btn-ghost { background: none; color: var(--text-dim); font-weight: 500; font-size: 13px; }
.btn-video svg { margin-left: 4px; }
/* step 5: "Skip and claim voucher" rendered as a link below the Send button */
.link-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--gold-light);
  text-decoration: underline;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 10px 4px;
  margin: 2px 0 -10px; /* sink the input stack lower without scrolling */
  cursor: pointer;
  text-align: center;
}

/* landing page: "Already claimed your voucher?" + retrieve shortcut under the
   Start button, matching the client design (bold white line, gold link) */
.retrieve-block { text-align: center; margin-top: 28px; }
.retrieve-q { color: #fff; font-weight: 700; font-size: 14px; }
.retrieve-link {
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px 2px;
  text-decoration: underline;
}

.spacer { flex: 1; }

/* ── POSM screen ─────────────────────────────────────────────── */
.posm {
  background: linear-gradient(180deg, #fff, #f2f8f5);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-align: center;
  padding: 26px 20px;
  margin: auto 0;
}
.posm h1 { font-size: 26px; margin: 12px 0 4px; color: var(--ink); }
.posm h1 .off { color: var(--anlene-green); font-size: 34px; display: block; }
.posm p { font-size: 12px; color: var(--muted); }
.posm .qr-box { margin: 16px auto 8px; width: 150px; height: 150px; display: flex; align-items: center; justify-content: center; }
.posm .qr-box canvas { border: 6px solid #fff; box-shadow: 0 2px 12px rgba(0,0,0,.12); border-radius: 8px; }
.posm .scan-hint { font-size: 12px; color: var(--anlene-green); font-weight: 700; }

/* ── Chat ────────────────────────────────────────────────────── */
.chat-area { flex: 1; overflow-y: auto; padding: 4px 0 10px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; margin-bottom: 8px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.msg.user { background: var(--anlene-green); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.msg.bot  { background: var(--panel); border: 1px solid rgba(212, 175, 90, .5); color: var(--text-light); border-bottom-left-radius: 4px; }
.msg.bot.thinking { color: var(--text-dim); font-style: italic; }

/* one rounded box with the mic/send button inside, like the client design */
.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  border: 1px solid var(--gold);
  border-radius: 16px;
  background: var(--panel-deep);
  padding: 5px 6px 5px 14px;
}
.chat-input:focus-within { border-color: var(--gold-light); }
.chat-input input {
  flex: 1;
  border: none;
  padding: 8px 0;
  font-size: 13.5px;
  outline: none;
  background: none;
  color: var(--text-light);
}
.chat-input input::placeholder { color: #93a89b; }
.chat-input button {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--gold);
  color: #0a352e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.chat-input button.mic.recording { background: var(--anlene-red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }

/* ── Form ────────────────────────────────────────────────────── */
#confettiCanvas { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.form-card {
  background: linear-gradient(180deg, #10493e 0%, var(--panel-deep) 100%);
  border: 1.5px solid var(--gold);
  border-radius: 16px;
  padding: 18px;
  color: var(--text-light);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}
/* step 6: the card rides up over the avatar so only head + shoulders show
   (compensated for the -8px avatar margin so the shoulder cut stays put;
   proportional to the avatar size so the cut holds when the avatar shrinks) */
.form-card.overlap { position: relative; z-index: 2; margin-top: calc(var(--avatar-w) * -0.414); }
.form-card h2 { font-size: 18px; text-align: center; color: var(--gold-light); margin-bottom: 6px; }
.form-card p { font-size: 13.5px; font-weight: 700; text-align: center; color: var(--text-light); line-height: 1.6; margin-bottom: 14px; }
.form-card .hl { color: var(--gold-light); }
/* icon sits inside the rounded field; the field name is the placeholder */
.field { margin-bottom: 10px; }
.field.icon-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(212, 175, 90, .55);
  border-radius: 12px;
  background: rgba(5, 32, 27, .55);
  padding: 0 12px;
}
.field.icon-field:focus-within { border-color: var(--gold-light); }
.field.icon-field .field-icon { flex: 0 0 auto; color: var(--gold); }
.field.icon-field input, .field.icon-field select {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  padding: 12px 0;
  font-size: 13.5px;
  color: var(--text-light);
}
.field.icon-field input::placeholder { color: #93a89b; }
.field.icon-field select option { background: var(--panel-deep); color: var(--text-light); }
/* step 9 — Find My Voucher: fixed +60 country prefix inside the phone field,
   and the "no screenshot needed" info note under the card */
.mobile-prefix {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-light);
  padding-right: 10px;
  border-right: 1px solid rgba(212, 175, 90, .55);
}
/* the country-code digits are an input (editable, max 3) sized to its
   content via an inline ch width; the extra specificity outranks
   .field.icon-field input's flex:1 full-width rule */
.field.icon-field .mobile-prefix input {
  flex: 0 0 auto;
  min-width: 1ch;
  padding: 12px 0 12px 1px;
  font-weight: 700;
}
.retrieve-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 8px 0;
  color: var(--text-light);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
}
.retrieve-note svg { flex: 0 0 16px; margin-top: 1px; color: #7fb8ff; }

.consent { display: flex; gap: 8px; font-size: 11.5px; color: var(--text-dim); margin: 12px 0 4px; align-items: flex-start; }
.consent a { color: var(--gold-light); text-decoration: underline; }
.form-error { color: #ff9b9b; font-size: 12px; text-align: center; margin-top: 6px; min-height: 16px; }

/* ── SMS OTP verification ────────────────────────────────────── */
.otp-lock { text-align: center; font-size: 34px; margin-bottom: 8px; }
.otp-row { display: flex; gap: 9px; justify-content: center; margin: 14px 0 12px; }
.otp-box {
  width: 44px; height: 56px;
  border: 1px solid rgba(212, 175, 90, .55); border-radius: 11px;
  text-align: center; font-size: 24px; font-weight: 700;
  color: var(--text-light); font-family: Consolas, monospace;
  outline: none; background: rgba(5, 32, 27, .55);
}
.otp-box:focus { border-color: var(--gold-light); box-shadow: 0 0 0 3px rgba(212, 175, 90, .25); }
.otp-box:not(:placeholder-shown) { border-color: var(--gold-light); color: var(--gold-light); }
/* delivery-wait reminder between the code boxes and the resend line */
.otp-wait { text-align: center; font-size: 12.5px; color: var(--gold-light); line-height: 1.55; margin: 0 0 8px; }
.otp-resend { text-align: center; font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.otp-resend a { color: var(--gold-light); font-weight: 700; text-decoration: none; }
.otp-resend a.disabled { color: var(--text-dim); font-weight: 500; pointer-events: none; }

/* ── Voucher ─────────────────────────────────────────────────── */
.voucher { text-align: center; margin: auto 0; }
.voucher h2 { color: var(--gold-light); margin: 10px 0 4px; }
.voucher .here { font-size: 15px; font-weight: 700; color: var(--text-light); line-height: 1.6; }
.voucher .here .big { color: var(--gold-light); font-size: 20px; font-weight: 800; }
.voucher .qr-wrap { display: inline-block; margin: 14px auto 4px; padding: 10px; border: 2px solid var(--gold); border-radius: 14px; background: #fff; }
/* barcode is wider than a QR — let it scale to fit the white wrap instead of overflowing */
.voucher .qr-wrap.barcode { width: 86%; max-width: 320px; }
.voucher .qr-wrap.barcode svg { display: block; width: 100%; height: auto; }
/* dark pill behind the code so it stays readable over the gold background
   lines; block + fit-content + auto margin centres it on its own line below the QR */
.voucher .code { display: block; width: fit-content; margin: 10px auto 0; font-family: Consolas, monospace; font-weight: 700; font-size: 14px; letter-spacing: 1px; color: var(--gold-light); background: rgba(5, 32, 27, .8); padding: 5px 14px; border-radius: 8px; }
.voucher .valid-until { font-size: 12px; color: var(--gold-dim); margin-top: 4px; }
.voucher .note { font-size: 14px; font-weight: 700; color: var(--text-light); margin-top: 6px; line-height: 1.5; }
.voucher .divider { border-top: 1px solid rgba(212, 175, 90, .45); margin: 14px 24px 0; }
.voucher .contact { font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-top: 12px; line-height: 1.6; }
.voucher .legal-links { font-size: 12px; font-weight: 600; margin-top: 12px; }
.voucher .legal-links a { color: var(--text-dim); text-decoration: underline; }
.voucher .legal-links .sep { margin: 0 8px; color: var(--text-dim); }

/* ── Responsive: real phones get the full screen ─────────────── */
@media (max-width: 520px) {
  /* lock page scrolling on phones: no rubber-band bounce, no pull-to-refresh,
     no scrolling past the app - inner areas (chat) still scroll themselves */
  html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    /* match the bottom of the phone gradient so any area the browser exposes
       outside the app (safe-area, chrome show/hide gap) blends seamlessly */
    background: #062a24;
  }
  body { padding: 0; }
  .stage { width: 100%; height: 100%; }
  .phone {
    width: 100%;
    height: 100vh;  /* fallback */
    height: 100dvh; /* tracks mobile browser chrome show/hide */
    border-radius: 0;
    box-shadow: none;
    /* keep content clear of notches / home indicator */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    /* every step is designed to fit a 760px-tall frame; on shorter screens
       give back the missing height by shrinking the avatar 1:1 (it's square),
       so the buttons at the bottom stay on screen without scrolling.
       NOTE: custom properties can't use the usual duplicate-declaration unit
       fallback (the last one always wins at parse time), hence @supports */
    --avatar-w: clamp(140px, calc(210px - (760px - 100vh)), 210px);
  }
  @supports (height: 100dvh) {
    .phone { --avatar-w: clamp(140px, calc(210px - (760px - 100dvh)), 210px); }
  }
  /* tall phones: the grow cards (steps 2/3) otherwise fill ALL the leftover
     height and look bloated — cap them and keep the buttons pinned at the
     bottom by pushing the first button down instead. The card keeps its own
     10px bottom margin because margin-top:auto collapses to 0 on screens the
     content exactly fills — without it the card sits flush on the button */
  .card.grow { max-height: 400px; margin-bottom: 10px; }
  .card.grow + .btn { margin-top: auto; }
  /* step 4: the pack shot hugged the card's right edge, far away from the
     narrow (hard-wrapped) pitch text. The gap is the viewport-width surplus
     (the text column is fixed by its hard line breaks while the card widens
     with the screen), so pull the shot left by ~that surplus — this keeps a
     steady ~20px visual gap from ~390px phones up to the 520px cutoff */
  .card .product-img { right: clamp(6px, calc((100vw - 386px) * 0.9), 48px); }
  /* the intro-video modal title (default h3 ~18.7px) reads small on a
     phone-width modal box — bump it a notch */
  #videoModal .modal-box h3 { font-size: 21px; }
}

/* inputs under 16px make iOS/Android auto-zoom on focus (and stay zoomed);
   16px disables that behaviour entirely. NOT width-gated: this used to live
   in the max-width:520px block above, which left landscape phones and wide
   devices (CSS width > 520px) zooming again — a real phone is a touch device
   at any orientation. The icon-field selectors outrank .field.icon-field
   input's 13.5px */
.chat-input input,
.field input,
.field select,
.field.icon-field input,
.field.icon-field select { font-size: 16px; }

/* tall phones only: let the product box breathe a little more (the pack shot
   scales with the card height, so the box reads less empty); short screens
   keep the compact no-scroll height */
@media (max-width: 520px) and (min-height: 740px) {
  .card.product-card { min-height: 300px; }
}
/* short phones: compact pitch so the 8-line BM copy still fits without
   scrolling (the avatar is already at its 140px floor below ~690px tall,
   so there is no other height left to give back) */
@media (max-width: 520px) and (max-height: 699px) {
  .card .product-pitch { font-size: 14px; line-height: 1.35; }
}

/* narrow phones: the step-4 pack-shot column steals too much width, which
   wraps the pitch text into a tall column and pushes the buttons off short
   screens — shrink the pack shot so the text wraps less and the card stays
   short enough to fit */
@media (max-width: 374px) {
  .card.product-card { padding-right: 106px; }
  .card .product-img { max-width: 98px; }
  .card .product-img-wellness { right: 8px; }
}

/* ── busy lock: while STT/chat/TTS runs, no buttons are usable ── */
.phone-screen.busy .btn,
.phone-screen.busy [data-journey],
.phone-screen.busy .chat-input .send,
.phone-screen.busy .chat-input .mic:not(.recording),
.phone-screen.busy .posm .qr-box {
  opacity: .45;
  pointer-events: none;
  cursor: wait;
}
.phone-screen.busy .chat-input input { pointer-events: none; opacity: .5; }
.phone-screen.busy .otp-box { pointer-events: none; opacity: .5; }

/* ── idle session-ended overlay ──────────────────────────────── */
.session-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 31, 24, .78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 24px;
}
.session-box {
  background: linear-gradient(180deg, #10493e 0%, var(--panel-deep) 100%);
  border: 1.5px solid var(--gold);
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
  width: 100%;
}
.session-box .session-icon { color: var(--gold-light); margin-bottom: 8px; }
.session-box h2 { color: var(--gold-light); font-size: 20px; margin-bottom: 8px; }
.session-box p { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; margin-bottom: 16px; }

/* ── voice failure toast ─────────────────────────────────────── */
.voice-note {
  position: absolute;
  left: 50%;
  /* high enough to clear the landing page's Start button + retrieve block
     (and the step buttons elsewhere) instead of covering them */
  bottom: 190px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(28, 43, 38, .92);
  color: #fff;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 18px;
  max-width: 85%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 30;
}
.voice-note.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Disclaimer button (secondary, inside the welcome card) ────── */
.disclaimer-btn {
  align-self: center;
  display: inline-block;
  margin: 10px auto 0;
  padding: 4px 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Modal ───────────────────────────────────────────────────── */
/* backdrop fades; box scales+slides in. Uses opacity/visibility (not display)
   so the same .hidden toggle animates both open and close. */
.modal {
  position: fixed; inset: 0; background: rgba(8, 20, 40, .8);
  display: flex; align-items: center; justify-content: center; z-index: 40;
  opacity: 1; visibility: visible;
  transition: opacity .25s ease, visibility 0s;
}
.modal.hidden {
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility 0s .25s; /* delay hide until fade-out done */
}
.modal-box {
  background: #fff; border-radius: 16px; padding: 20px; width: min(680px, 92vw); position: relative;
  transform: translateY(0) scale(1); opacity: 1;
  transition: transform .3s cubic-bezier(.2, .85, .25, 1), opacity .28s ease;
}
.modal.hidden .modal-box { transform: translateY(16px) scale(.95); opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .modal, .modal-box { transition-duration: 0s; }
}
.modal-box h3 { margin-bottom: 12px; color: var(--anlene-green); }
.modal-box video, .modal-box iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 10px; background: #000; }
.modal-close { position: absolute; top: 10px; right: 14px; border: none; background: none; font-size: 26px; cursor: pointer; color: var(--muted); }
.legal-content { max-height: 60vh; overflow-y: auto; font-size: 13.5px; line-height: 1.7; color: #333; text-align: left; white-space: normal; }
/* legal popup: title stays, content scrolls within the header→link span */
#legalModal .modal-box {
  display: flex; flex-direction: column; overflow: hidden;
  background: rgba(255, 255, 255, .75); /* slightly see-through */
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); /* keep text crisp */
}
#legalModal .legal-content { max-height: none; flex: 1 1 auto; min-height: 0; }
/* force an always-visible scrollbar so mobile shoppers can tell it scrolls
   (mobile overlay scrollbars auto-hide otherwise) */
.legal-content { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.35) transparent; padding-right: 6px; }
.legal-content::-webkit-scrollbar { -webkit-appearance: none; width: 7px; }
.legal-content::-webkit-scrollbar-thumb { background: rgba(0,0,0,.35); border-radius: 4px; }
.legal-content::-webkit-scrollbar-track { background: rgba(0,0,0,.06); border-radius: 4px; }

/* repeat-claim confirmation dialog (reuses .session-overlay/.session-box) */
.repeat-box .repeat-actions { display: flex; gap: 10px; justify-content: center; }
.repeat-box .repeat-actions .btn { flex: 0 1 auto; min-width: 96px; padding: 9px 20px; font-size: 13.5px; margin: 0; }
.repeat-box .repeat-actions .btn-ghost { color: var(--text-dim); border: 1px solid rgba(255,255,255,.35); border-radius: 12px; }
.repeat-box .repeat-valid { font-size: 12.5px; color: var(--gold-light); margin-bottom: 16px; }

/* cross-outlet hard block (reuses .session-overlay/.session-box) — single button */
.other-outlet-box .other-outlet-actions { display: flex; justify-content: center; }
.other-outlet-box .other-outlet-actions .btn { flex: 0 1 auto; min-width: 96px; padding: 9px 20px; font-size: 13.5px; margin: 0; }
