/* Pepe Mercado — onboarding web app (PRD §3.1 / D10)
   Mobile-first (320px–480px), warm palette, ONE accent green (not WhatsApp's #25D366 — Meta brand rules),
   product tiles ≥ 48dp, emoji only as accents, prefers-reduced-motion respected. */

:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --ink: #1e1b16;
  --ink-2: #5c554b;
  --ink-3: #6e675c;
  --line: #e9e2d6;
  --border-ui: #948b7e;
  --accent: #1b8053;
  --accent-ink: #0f5c3a;
  --accent-soft: #e3f3ea;
  --amber: #f6e7b8;
  --amber-ink: #7a5a00;
  --danger: #b4452d;
  --danger-soft: #fbe9e4;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(30, 27, 22, 0.06), 0 8px 24px rgba(30, 27, 22, 0.06);
  --tap: 48px;
  --dur: 220ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.42;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input { font: inherit; color: inherit; max-width: 100%; }
button { cursor: pointer; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.18; letter-spacing: -0.015em; overflow-wrap: break-word; }
p { margin: 0; overflow-wrap: break-word; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 50; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; line-height: 1.4; }
.tiny { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }

/* ---------- header (honest dual counter) ---------- */
.hdr {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 12px; align-items: center;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 10px 14px 8px;
  background: color-mix(in srgb, var(--bg) 94%, white);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 500px) {
  .hdr {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-radius: 0 0 16px 16px;
  }
}
.hdr__back {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1;
  transition: transform 120ms var(--ease), background var(--dur), border-color var(--dur);
}
.hdr__back:hover:not([disabled]) {
  background: color-mix(in srgb, var(--accent-soft) 78%, var(--accent));
  border-color: var(--accent);
}
.hdr__back:active:not([disabled]) {
  transform: scale(0.97);
}
.hdr__back-arr {
  font-size: 15px;
  line-height: 1;
}
.hdr__back[disabled] { opacity: 0.35; cursor: default; }
.hdr__meta { flex: 1; min-width: 0; }
.hdr__row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.hdr__memory { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr__progress { color: var(--ink-2); font-weight: 600; font-size: 13px; white-space: nowrap; flex: none; }
.bar { height: 6px; background: var(--line); border-radius: 999px; margin: 5px 0 4px; overflow: hidden; }
.bar__fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width var(--dur) var(--ease); }
.hdr__items { font-size: 13px; font-weight: 700; color: var(--accent-ink); }

/* ---------- layout ---------- */
.main {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 14px 14px 110px;
}
.screen {
  width: 100%;
  min-width: 0;
  animation: slide-in var(--dur) var(--ease);
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.stack > * + * { margin-top: 14px; }
.card {
  width: 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.h1 { font-size: clamp(24px, 6.5vw, 30px); font-weight: 800; }
.h2 { font-size: clamp(20px, 5.4vw, 23px); font-weight: 800; }
.h3 { font-size: clamp(17px, 4.6vw, 19px); font-weight: 800; }
.lead { font-size: 15.5px; color: var(--ink-2); line-height: 1.45; }

/* ---------- buttons ---------- */
.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 16px; width: 100%;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 16px; line-height: 1.25; text-align: center;
  text-decoration: none;
  transition: transform 120ms var(--ease), background var(--dur);
}
.btn:hover, .btn:focus, a.btn:hover, a.btn:focus { text-decoration: none; }
.btn:active { transform: scale(0.985); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); }
.btn--secondary { background: var(--surface); border-color: var(--border-ui); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--accent-ink); min-height: 44px; font-size: 14.5px; padding: 8px 12px; }
.btn[disabled] { opacity: 0.5; cursor: default; transform: none; }
.btn--wa { background: var(--accent); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .btn { width: auto; flex: 1 1 140px; }

/* ---------- inputs ---------- */
.field { display: block; width: 100%; }
.field__label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.input {
  width: 100%; min-height: 54px; padding: 0 14px;
  border: 2px solid var(--border-ui); border-radius: var(--radius-s); background: var(--surface);
  font-size: 20px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums;
}
.input--text { font-size: 16px; letter-spacing: normal; }
.input:focus { border-color: var(--accent); outline: none; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.err { display: block; color: var(--danger); font-size: 13.5px; margin-top: 6px; }
.help { display: block; color: var(--ink-3); font-size: 13px; margin-top: 4px; line-height: 1.35; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }

/* ---------- store chips (Stage 1) ---------- */
.stores {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  width: 100%;
}
.store {
  min-width: 0;
  width: 100%;
  display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; text-align: center;
  min-height: 108px; padding: 14px 12px; border-radius: var(--radius-s);
  border: 2px solid var(--border-ui); background: var(--surface);
  transition: border-color var(--dur), background var(--dur), transform 120ms var(--ease);
}
.store:active { transform: scale(0.985); }
.store[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.store[disabled] { opacity: 0.55; cursor: default; }
.store__name { font-weight: 800; font-size: 14.5px; line-height: 1.2; width: 100%; overflow-wrap: break-word; color: var(--ink); }
.store__logo {
  width: 100%; height: 48px; border-radius: 10px;
  padding: 6px 10px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-weight: 900; color: #fff; font-size: 13px; flex: none;
  border: 1px solid var(--line); background: #fff;
  box-shadow: 0 1px 3px rgba(30, 27, 22, 0.06);
}
.store__logo svg, .store__logo img {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  min-width: 0; min-height: 0; display: block; object-fit: contain;
}
.store-suggest-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; padding-top: 2px;
}
.seg {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  padding: 4px;
  background: var(--line);
  border-radius: 14px;
  width: 100%;
}
.seg__opt {
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  color: var(--ink-2);
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
}
.seg__opt[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg__opt[disabled] { opacity: 0.4; cursor: default; }
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tap);
  padding: 4px 0;
}
.switch__text { min-width: 0; flex: 1; }
.switch__title { display: block; font-weight: 700; font-size: 15px; line-height: 1.25; }
.switch input {
  width: 44px; height: 26px; appearance: none;
  background: var(--line); border-radius: 999px;
  position: relative; transition: background var(--dur); flex: none;
}
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform var(--dur) var(--ease);
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.trust { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.logos { display: flex; gap: 8px; flex-wrap: wrap; }
.logo-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.logo-pill__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.logo-pill--suggest {
  border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-ink);
  cursor: pointer;
  transition: transform 120ms var(--ease), background var(--dur);
}
.logo-pill--suggest:hover { background: color-mix(in srgb, var(--accent-soft) 80%, var(--accent)); }
.logo-pill--suggest:active { transform: scale(0.97); }

/* ---------- Brand (design/brand/README.md) ---------- */
.welcome-brand { display: flex; align-items: center; min-height: 36px; }
.brand-logo { display: block; height: 34px; width: auto; }          /* compact lockup: mark + wordmark */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand-anchor { width: 28px; height: 28px; display: grid; place-items: center; flex: none; }
.brand-anchor svg { width: 28px; height: 28px; }
.rg__brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rg__logo { display: block; height: 18px; width: auto; }

/* ---------- Welcome / How Pepe Works (Screen 0.0) ---------- */
.welcome-steps {
  display: grid;
  gap: 10px;
}
.welcome-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  background: var(--bg);
  border: 1px solid var(--line);
}
.welcome-step__ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 19px;
  flex: none;
}
.welcome-step__body { min-width: 0; flex: 1; }
.welcome-step__title {
  display: block;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  color: var(--ink);
}
.welcome-step__sub {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.3;
  margin-top: 2px;
}

/* ---------- Memória da Casa Intro & Context Banner (Stage 2–3) ---------- */
.mem-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  width: fit-content;
  max-width: 100%;
}

.mem-intro {
  background: linear-gradient(165deg, #ffffff 0%, #f3faf6 100%);
  border: 1.5px solid color-mix(in srgb, var(--accent) 28%, var(--line));
}
.wa-demo {
  background: #efeae2;
  border: 1px solid #dfd8cc;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wa-bubble {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.32;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.wa-bubble--user {
  align-self: flex-end;
  background: #d9fdd3;
  color: #111b21;
  border-top-right-radius: 3px;
}
.wa-bubble--pepe {
  align-self: flex-start;
  background: #ffffff;
  color: #111b21;
  border-top-left-radius: 3px;
}
.wa-bubble__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-ink);
  margin-bottom: 2px;
}
.mem-bullets {
  display: grid;
  gap: 6px;
  padding: 2px 2px;
}
.mem-bullet {
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 600;
  line-height: 1.35;
}

/* ---------- Deck (Stage 2–3): THE component ---------- */
.deck__title { font-size: clamp(19px, 5vw, 22px); font-weight: 800; }
.deck__size { font-weight: 600; color: var(--ink-2); font-size: 14.5px; white-space: nowrap; }
.deck__prompt { color: var(--ink-2); margin-top: 4px; font-size: 14.5px; }
.size-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.size-pills__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin-right: 2px;
}
.pill--size {
  min-height: 34px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 800;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
  width: 100%;
}
.tile {
  min-width: 0;
  width: 100%;
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px;
  min-height: 146px; padding: 12px 10px; border-radius: var(--radius);
  border: 2px solid var(--border-ui); background: var(--surface); text-align: center;
  transition: border-color 120ms, background 120ms, transform 120ms var(--ease);
}
.tile:active { transform: scale(0.98); }
.tile[aria-pressed="true"], .tile.is-picked { border-color: var(--accent); background: var(--accent-soft); }
.tile--cheapest { background: var(--amber); border-color: color-mix(in srgb, var(--amber) 70%, var(--amber-ink)); }
.tile--cheapest.is-picked { border-color: var(--amber-ink); }
.tile--option {
  min-height: 138px;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  background: var(--opt-bg, var(--surface));
  border-color: var(--opt-border, var(--border-ui));
}
.tile--option:hover {
  border-color: var(--opt-ink, var(--accent));
}
.tile--option[aria-pressed="true"],
.tile--option.is-picked {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent);
}
.tile__opt-ico {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--opt-badge, var(--accent-soft));
  border: 1px solid color-mix(in srgb, var(--opt-border, var(--line)) 75%, white);
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  flex: none;
  box-shadow: 0 2px 6px rgba(30, 27, 22, 0.06);
}
.tile--option .tile__sub {
  display: inline-block;
  width: auto;
  max-width: 100%;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--opt-badge, var(--line)) 65%, white);
  color: var(--opt-ink, var(--ink-2));
  font-weight: 700;
  font-size: 11.5px;
}
.tile__img {
  width: 72px; height: 72px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 900; font-size: 20px; color: #fff; letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--c1, #c9b9a0), var(--c2, #8d7a5e));
  overflow: hidden;
  flex: none;
}
.tile__img--photo {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 4px;
}
.tile__img img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; background: #fff; display: block; }
.tile__label { font-weight: 800; font-size: 15px; line-height: 1.2; width: 100%; overflow-wrap: break-word; }
.tile__sub { font-size: 11.5px; color: var(--ink-2); line-height: 1.25; width: 100%; overflow-wrap: break-word; }
.tile__check {
  position: absolute; top: -8px; right: -8px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--accent); color: #fff;
  display: none; place-items: center; font-size: 13px;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.tile.is-picked .tile__check { display: grid; }
.pills { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.pill {
  min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-ui);
  background: var(--surface); font-weight: 600; font-size: 14px;
}
.pill[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { min-height: 46px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--border-ui); background: var(--surface); font-weight: 700; font-size: 15px; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.chip--more { border-style: dashed; color: var(--accent-ink); background: transparent; font-size: 14px; }
.auto-items { background: var(--amber); border: 1px solid #e9d79a; border-radius: var(--radius-s); padding: 10px 12px; }
.auto-items .help { color: var(--amber-ink); opacity: 0.85; }
.other { margin-top: 12px; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.powerup {
  margin-top: 14px; padding: 12px 14px;
  border-radius: var(--radius-s); background: var(--surface); border: 1px dashed #cfc6b6;
}
.powerup__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.powerup__head strong { font-size: 14.5px; flex: 1 1 170px; }
.powerup__body { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.powerup .btn { width: auto; min-height: 38px; padding: 6px 14px; font-size: 13.5px; flex: none; }

/* ---------- reveal ---------- */
.rg {
  background: linear-gradient(160deg, #ffffff, #f3f8f4);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}
.rg-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.rg-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 11px 12px;
  min-width: 0;
}
.rg-stat__val {
  font-weight: 800;
  font-size: 16.5px;
  line-height: 1.2;
  color: var(--ink);
}
.rg-stat__sub {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 3px;
  line-height: 1.25;
}
.rg-price {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 11px 12px;
}
.rg__ico { font-size: 20px; line-height: 1.1; flex: none; }
.rg__main { font-weight: 800; font-size: 15px; line-height: 1.28; }
.rg__sub { font-size: 12.5px; color: var(--accent-ink); font-weight: 700; margin-top: 4px; line-height: 1.3; }
.rg__tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--amber); color: var(--amber-ink); margin-left: 6px; vertical-align: middle; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.how-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 10px 8px;
  text-align: center;
  min-width: 0;
}
.how-item__ico {
  font-size: 20px;
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}
.how-item__title {
  display: block;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  color: var(--ink);
}
.how-item__sub {
  display: block;
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.25;
  margin-top: 3px;
}
@media (max-width: 340px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-item { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; }
  .how-item__ico { margin-bottom: 0; }
}

/* ---------- handoff ---------- */
.wa-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.wa-card-av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.wa-card-av svg { width: 24px; height: 24px; }
.wa-card-meta { min-width: 0; flex: 1; }
.wa-card-meta strong { display: block; font-size: 15.5px; font-weight: 800; line-height: 1.2; }
.wa-card-meta span { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.wa-composer {
  background: #efeae2;
  border: 1px solid #dfd8cc;
  border-radius: 14px;
  padding: 10px 12px;
}
.wa-composer__label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.wa-composer__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border-radius: 20px;
  padding: 8px 10px 8px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.wa-composer__text {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: #111b21;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.wa-composer__code {
  display: inline-block;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  margin-left: 4px;
}
.wa-composer__send {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex: none;
}
.wait {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 14px;
}
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.connected { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 15px; }
.qr { display: grid; place-items: center; padding: 16px; background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-s); margin: 4px auto; width: fit-content; }
.qr svg, .qr canvas, .qr img { width: 168px; height: 168px; display: block; }
.qr-url {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
}
.proto { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--amber); color: var(--amber-ink); }

/* ---------- toast / sheet ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow);
  z-index: 30;
  animation: toast-in var(--dur) var(--ease);
}
#toast-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translateX(-50%); } }
.toast__btn { background: transparent; border: 0; color: #ffd27a; font-weight: 800; min-height: 28px; padding: 0 4px; flex: none; }
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(30, 27, 22, 0.45); }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 86dvh; overflow: auto;
  background: var(--surface); border-radius: 22px 22px 0 0; padding: 10px 16px calc(22px + env(safe-area-inset-bottom));
  animation: sheet-in var(--dur) var(--ease);
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 14px; }
.sheet__title { font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.list { display: grid; gap: 8px; }
.list__item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); font-size: 14px; }
.list__item.is-removed { opacity: 0.45; text-decoration: line-through; }
.list__item .btn { width: auto; min-height: 36px; padding: 0 12px; font-size: 13px; flex: none; }

/* ---------- debug drawer (hallway tests) — positioned bottom-right so it never overlaps header ---------- */
.debug-toggle {
  position: fixed;
  right: 12px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 38;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  opacity: 0.75;
  font-size: 15px;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: var(--shadow);
}
.debug-toggle:hover { opacity: 1; }
.debug { position: fixed; right: 0; top: 0; bottom: 0; width: min(92vw, 360px); z-index: 36; background: var(--surface); border-left: 1px solid var(--line); padding: 12px 12px 64px; overflow: auto; font-size: 12px; box-shadow: var(--shadow); }
.debug__head { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; }
.debug__actions { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.debug__btn { min-height: 28px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); font-size: 11.5px; font-weight: 600; }
.debug__btn--close { font-weight: 800; padding: 0 10px; background: var(--surface); }
.debug ol { margin: 0; padding-left: 18px; }
.debug li { margin: 4px 0; font-family: ui-monospace, Menlo, monospace; word-break: break-all; }

/* ---------- compact mobile (< 360px, e.g. iPhone SE / small Android) ---------- */
@media (max-width: 359px) {
  .main { padding: 12px 10px 100px; }
  .card { padding: 13px; }
  .stores, .grid { gap: 8px; }
  .tile { min-height: 134px; padding: 10px 8px; }
  .tile__img { width: 60px; height: 60px; }
  .tile__label { font-size: 14px; }
  .seg__opt { font-size: 13px; padding: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (min-width: 480px) {
  .main { padding-top: 24px; }
}
