:root {
  --bg: #F5F6FA; --surface: #FFFFFF; --ink: #14162B; --ink-2: #4A4F6A; --muted: #5A5F7A; --line: #E4E6EF; --line-2: #D5D8E6;
  --brand: #3440F0; --brand-deep: #1F28B8; --brand-soft: #EEF0FF; --brand-ink: #2530C9;
  --accent: #FF6B1A; --accent-soft: #FFF1E8; --accent-ink: #B83F08;
  --good: #0E9F6E; --good-ink: #0B6B4B; --good-soft: #E6F7EF; --off: #0B7A55;
  --hunger-lo: #0E9F6E; --hunger-mid: #F5B82E; --hunger-hi: #FF6B1A;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Figtree, system-ui, sans-serif; background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); text-decoration: none; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
#app { max-width: 480px; margin: 0 auto; min-height: calc(100vh - 28px); position: relative; padding-bottom: 120px; }

.sim-banner { position: sticky; top: 0; z-index: 30; height: 28px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .04em; display: flex; align-items: center; justify-content: center; gap: 6px; }

.topbar { background: var(--surface); padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--brand); letter-spacing: -.02em; }
.play-tag { font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); padding: 2px 6px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }
.wallet { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 13px; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.saved { display: flex; justify-content: space-between; align-items: center; background: var(--good-soft); color: var(--good-ink); border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 600; }
.saved b { font-family: var(--display); font-size: 16px; }
.back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--ink); background: none; border: 0; }
.title { font-family: var(--display); font-weight: 800; font-size: 20px; }

/* Shopping hunger bar */
.hunger { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.hunger-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.hunger-state { color: var(--muted); font-weight: 600; }
.hunger-track { height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.hunger-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--hunger-lo), var(--hunger-mid) 60%, var(--hunger-hi)); transition: width .45s cubic-bezier(.3,1.4,.5,1); }
.hunger.full { border-color: var(--hunger-hi); background: var(--accent-soft); }
.hunger.full .hunger-state { color: var(--accent-ink); }
.hunger-note { font-size: 12px; color: var(--muted); }
.hunger.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.03); } }

.chips { display: flex; gap: 8px; padding: 14px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.chip { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13px; border: 1px solid var(--line); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }

.deal { margin: 12px 16px 0; background: var(--brand); border-radius: 22px; padding: 18px; color: #fff; display: flex; gap: 8px; }
.deal .tag { align-self: flex-start; background: var(--accent); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 4px 8px; border-radius: 8px; }
.deal h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.1; }
.deal .art { width: 120px; height: 120px; background: #4B56FF; border-radius: 20px; flex-shrink: 0; align-self: center; display: flex; align-items: center; justify-content: center; }
.deal .art svg { width: 104px; height: 104px; }
.timer { display: flex; gap: 4px; align-items: center; font-weight: 800; }
.timer span { background: #fff; color: var(--ink); width: 34px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }

.section-h { display: flex; justify-content: space-between; align-items: baseline; padding: 20px 16px 10px; font-family: var(--display); font-weight: 800; font-size: 19px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0 12px; }
.card { background: var(--surface); border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); box-shadow: 0 4px 14px rgba(20,22,43,.06); border: 1px solid var(--line); }
.card .pic { height: 170px; border-radius: 12px; display: flex; align-items: center; justify-content: center; position: relative; }
.card .pic svg { width: 120px; height: 120px; }
.left { position: absolute; top: 10px; left: 10px; background: #fff; color: var(--accent-ink); font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 6px; }
.brand { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pname { font-size: 15px; font-weight: 600; line-height: 1.25; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price b { font-weight: 800; font-size: 18px; }
.price s { font-size: 13px; color: #6B7090; }
.price i { font-style: normal; font-size: 13px; font-weight: 800; color: var(--off); }
.stars { font-size: 13px; color: var(--ink-2); }
.stars b { color: var(--ink); }
.card .quick { margin-top: 4px; height: 40px; border: 0; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; }
.card .quick:disabled { background: var(--line); color: var(--muted); }

.hero-pic { margin: 12px 16px 0; height: 300px; border-radius: 24px; display: flex; align-items: center; justify-content: center; position: relative; }
.hero-pic svg { width: 210px; height: 210px; }
.pad { padding: 16px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.pad h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.15; }
.rating { display: inline-flex; align-items: center; gap: 4px; background: var(--good); color: #fff; font-weight: 700; padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.big-price b { font-family: var(--display); font-size: 28px; }
.variants { display: flex; gap: 8px; flex-wrap: wrap; }
.variant { min-height: 40px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line-2); font-weight: 600; }
.variant.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.review .row { font-size: 13px; }
.fomo { margin: 14px 16px 0; background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.fomo .av { width: 30px; height: 30px; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.dock-inner { max-width: 448px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.dock .sum { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); font-weight: 600; }
.dock .sum b { font-family: var(--display); font-size: 20px; color: var(--ink); }
.btn { flex-grow: 1; min-height: 56px; border: 0; border-radius: 18px; background: var(--brand); color: #fff; font-family: var(--display); font-weight: 800; font-size: 18px; box-shadow: 0 6px 0 var(--brand-deep); display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s, box-shadow .08s; text-align: center; padding: 0 16px; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--brand-deep); }
.btn:disabled { background: #B9BCDA; box-shadow: 0 6px 0 #9A9EC2; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-2); box-shadow: none; font-family: inherit; font-weight: 700; font-size: 15px; min-height: 50px; }
.btn.orange { background: var(--accent); box-shadow: 0 6px 0 #C24E0C; }
.btn.orange:disabled { background: #F4C3A6; box-shadow: 0 6px 0 #E0A583; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 72px; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs-inner { max-width: 480px; margin: 0 auto; height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.tab.on { color: var(--brand); font-weight: 800; }

.box { margin: 12px 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.box h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 16px; }
.line { display: flex; gap: 12px; }
.line .thumb { width: 80px; height: 80px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.line .thumb svg { width: 64px; height: 64px; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: 12px; }
.qty button { width: 42px; height: 38px; border: 0; background: transparent; font-size: 20px; font-weight: 700; color: var(--ink); }
.qty button.plus { color: var(--brand); }
.qty button:disabled { color: #B9BCDA; }
.qty span { width: 26px; text-align: center; font-weight: 800; }
.link { background: none; border: 0; color: var(--muted); font-weight: 700; font-size: 13px; padding: 10px 4px; }
.kv { display: flex; justify-content: space-between; }
.kv span:first-child { color: var(--ink-2); }
.green { color: var(--off); font-weight: 700; }
.hr { height: 1px; background: var(--line); }
.callout { margin: 12px 16px 0; background: var(--good-soft); color: var(--good-ink); border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.empty { text-align: center; padding: 60px 24px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.field div { background: #F1F2F7; border-radius: 12px; padding: 12px; font-size: 15px; color: var(--ink); font-weight: 600; display: flex; justify-content: space-between; }
.coin-opt { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 12px; font-weight: 600; background: var(--surface); width: 100%; text-align: left; }
.coin-opt.on { border-color: var(--brand); background: var(--brand-soft); }

/* Consent gate */
.gate { margin-bottom: -120px; min-height: calc(100vh - 28px); background: var(--brand); display: flex; flex-direction: column; justify-content: flex-end; }
.gate .sheet-body { background: var(--surface); border-radius: 30px 30px 0 0; padding: 24px 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.gate h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.1; }
.point { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.point .ic { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.check { display: flex; gap: 12px; align-items: center; background: var(--bg); border-radius: 14px; padding: 12px 14px; font-size: 15px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--brand); }

/* Result screens */
.center { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 24px 0; text-align: center; }
.tick { width: 84px; height: 84px; border-radius: 999px; background: var(--good); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px #D5F3E6; animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(0); } }
.hero-h { margin: 8px 0 0; font-family: var(--display); font-weight: 800; font-size: 28px; }
.saved-card { margin: 18px 16px 0; background: var(--good); color: #fff; border-radius: 22px; padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.saved-card b { font-family: var(--display); font-size: 44px; line-height: 1; }
.receipt { position: relative; overflow: hidden; border-style: dashed; border-color: #B9BCDA; }
.watermark { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform: rotate(-14deg); font-family: var(--display); font-weight: 800; font-size: 44px; letter-spacing: .1em; color: rgba(52,64,240,.12); pointer-events: none; }
.stack { margin: 20px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.spinner { width: 72px; height: 72px; border-radius: 999px; border: 7px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.map { margin: 12px 16px 0; height: 260px; border-radius: 22px; background: #E8F0E2; position: relative; overflow: hidden; }
.map svg { width: 100%; height: 100%; }
.steps { display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 12px; align-items: center; font-weight: 600; color: var(--muted); }
.step .dot { width: 22px; height: 22px; border-radius: 999px; border: 3px solid var(--line-2); flex-shrink: 0; }
.step.done { color: var(--ink); }
.step.done .dot { background: var(--good); border-color: var(--good); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.stat b { font-family: var(--display); font-size: 22px; color: var(--ink); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { padding: 8px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 700; color: var(--muted); }
.badge.got { background: #FFF6DA; color: #7A5210; }

/* Bottom sheets */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(20,22,43,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 480px; background: var(--surface); border-radius: 26px 26px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; animation: up .28s cubic-bezier(.3,1.2,.5,1); max-height: 92vh; overflow-y: auto; }
@keyframes up { from { transform: translateY(100%); } }
.sheet h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.15; }
.sheet p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.plan { border: 2px solid var(--line-2); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); text-align: left; width: 100%; }
.plan.on { border-color: var(--brand); background: var(--brand-soft); }
.plan .row b { font-family: var(--display); font-size: 20px; }
.plan ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.honest { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 12px; padding: 10px 12px; }

.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(20,22,43,.25); animation: fade .2s; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .8; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Consent question: "No" is the obvious choice; "Yes" sits inside the sentence so it has to be read to be found. */
.ask { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ask legend { padding: 0; font-weight: 800; font-size: 16px; line-height: 1.35; margin-bottom: 4px; }
.ask-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.yes-inline { white-space: nowrap; color: var(--ink-2); cursor: pointer; }
.yes-inline input { width: 14px; height: 14px; margin: 0 3px 0 0; vertical-align: -2px; accent-color: var(--brand); }
.yes-inline:has(input:checked) { color: var(--brand-ink); font-weight: 700; }
.no-big { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 0 16px; border-radius: 16px; border: 2px solid var(--ink); background: var(--surface); font-weight: 800; font-size: 17px; cursor: pointer; }
.no-big input { width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
.no-big:has(input:checked) { background: var(--ink); color: #fff; }

/* Product photos (from img/). Fill the tile; the tinted background shows while loading. */
.photo { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.card .pic, .hero-pic, .line .thumb, .deal .art { overflow: hidden; }

/* "FAKE-" item codes and the Faketailer seller line */
.fake-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.fake-meta b, .fake-code { color: var(--accent-ink); font-weight: 700; }
.fake-code { font-size: 11px; letter-spacing: .02em; }

.wins { margin: 16px 16px 0; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.wins span { background: var(--good-soft); color: var(--good-ink); font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px; }

/* Placeholder until a product photo is added */
.ph-icon { font-size: 64px; line-height: 1; }
.hero-pic .ph-icon { font-size: 120px; }
.line .thumb .ph-icon { font-size: 36px; }
