/* Food Plan — visual limpo: fundo branco, cartões suaves, fotos grandes, uma cor de destaque. */
:root {
  --bg: #ffffff;
  --soft: #f5f5f2;
  --line: #e8e8e3;
  --ink: #17191a;
  --ink-2: #4a4f52;
  --muted: #80868a;
  --brand: #1f6f4a;
  --brand-2: #e6f2ea;
  --warn: #a8641a;
  --warn-bg: #fdf4e7;
  --bad: #c2412d;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 25, .05), 0 8px 24px rgba(20, 30, 25, .06);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .4rem; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 .75rem; }
a { color: var(--brand); text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.stack { display: grid; gap: 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; color: var(--brand); margin: 0 0 .4rem; }
.print-only { display: none; }

/* ---------- topo ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .7rem max(1rem, calc((100vw - 1120px) / 2)); background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.brand img { border-radius: 8px; }
.topbar-hint { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
main { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1rem calc(3rem + var(--safe-b)); }
.narrow { max-width: 600px; margin: 0 auto; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .65rem 1.25rem;
  border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600; cursor: pointer;
  transition: transform .12s, background .15s, opacity .15s; text-decoration: none; }
.btn:hover { background: #2b2f31; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.wide { width: 100%; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- início ---------- */
.welcome { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; padding: 1.5rem 0 2.5rem; }
.welcome h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 34rem; margin-bottom: 1.5rem; }
.facts-row { list-style: none; display: flex; gap: 2rem; padding: 0; margin: 2rem 0 0; }
.facts-row b { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.facts-row span { color: var(--muted); font-size: .85rem; }
.collage { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.collage figure { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 1; background: var(--soft); }
.collage figure:nth-child(1) { grid-row: span 2; aspect-ratio: auto; }
.collage figcaption { position: absolute; left: .7rem; bottom: .7rem; right: .7rem; color: #fff; font-size: .8rem; font-weight: 600;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.collage .ph { width: 100%; height: 100%; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.how div { background: var(--soft); border-radius: var(--r); padding: 1.25rem; }
.how .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; font-weight: 700; font-size: .85rem; margin-bottom: .75rem; }
.how p { color: var(--ink-2); margin: 0; font-size: .95rem; }

/* ---------- fotos ---------- */
.ph { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--soft); }
.ph-fallback { display: grid; place-items: center; color: var(--muted); }
.ph-fallback .i { width: 36%; height: 36%; stroke-width: 1.2; }
.credit { position: absolute; right: .5rem; bottom: .4rem; z-index: 3; font-size: .62rem; color: rgba(255, 255, 255, .85); text-decoration: none;
  max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.credit:hover { text-decoration: underline; }

/* ---------- questionário ---------- */
.quiz { padding-top: .5rem; }
.progress { height: 4px; background: var(--soft); border-radius: 4px; overflow: hidden; margin-bottom: 2rem; }
.progress i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.question h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.question .help { color: var(--muted); }
.question.enter { animation: rise .28s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.options { display: grid; gap: .6rem; margin: 1.5rem 0; }
.options.grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.option { display: flex; align-items: center; justify-content: space-between; gap: .75rem; text-align: left; min-height: 58px; padding: .85rem 1rem;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.option:hover { border-color: #c9cbc4; }
.option .txt b { display: block; font-weight: 600; }
.option small { display: block; color: var(--muted); font-size: .84rem; margin-top: .15rem; line-height: 1.35; }
.option .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #cfd1cb; display: grid; place-items: center; color: transparent; transition: .15s; }
.option.multi .tick { border-radius: 6px; }
.option .tick .i { width: 14px; height: 14px; stroke-width: 2.6; }
.option[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-2); }
.option[aria-pressed="true"] .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
/* slider (dias, variedade, limite) */
.range { margin: 2rem 0 1.5rem; text-align: center; }
.range-val { display: block; font-size: 2.6rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.range-note { color: var(--ink-2); min-height: 1.5em; margin: .2rem 0 1.6rem; }
.range input { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; margin: 0; cursor: pointer;
  background: linear-gradient(to right, var(--brand) var(--p), var(--soft) var(--p)); touch-action: pan-x; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow); }
.range input::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow); }
.range-scale { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: .6rem; }
.rec { margin-top: 1.4rem; display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: .45rem .9rem; font-size: .85rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.rec.on { background: var(--brand-2); border-color: transparent; color: var(--brand); cursor: default; }
.rec .i { width: 15px; height: 15px; stroke-width: 2.4; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 2rem; margin: 2.5rem 0; }
.stepper button { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { border-color: var(--ink); }
.stepper output { font-size: 3rem; font-weight: 700; min-width: 3ch; text-align: center; font-variant-numeric: tabular-nums; }
.quiz-nav { display: flex; justify-content: space-between; gap: .75rem; }

/* ---------- swipe ---------- */
.swipe-head h1 { font-size: 1.6rem; margin-bottom: .2rem; }
.deck { position: relative; height: min(560px, 66vh); margin: 1.25rem auto 1rem; max-width: 400px; }
.deck .under, .deck .top { position: absolute; inset: 0; }
.deck .under { transform: scale(.95) translateY(12px); }
.card { position: relative; height: 100%; border-radius: 24px; overflow: hidden; background: var(--soft); box-shadow: var(--shadow);
  touch-action: pan-y; user-select: none; cursor: grab; text-align: left; }
.card.back { background: var(--soft); box-shadow: none; border: 1px solid var(--line); }
.card .card-img { position: absolute; inset: 0; }
.card .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .78) 100%); }
.card .body { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem 1.4rem 1.6rem; color: #fff; z-index: 2; }
.card .body h2 { font-size: 1.6rem; margin-bottom: .35rem; }
.card .body p { margin: 0 0 .7rem; color: rgba(255, 255, 255, .88); font-size: .95rem; line-height: 1.4; }
.card .eyebrow { color: rgba(255, 255, 255, .8); }
.card .credit { top: .7rem; bottom: auto; }
.card.no-photo .shade { display: none; }
.card.no-photo .body { color: var(--ink); }
.card.no-photo .body p { color: var(--ink-2); }
.card.no-photo .eyebrow { color: var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px;
  background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }
.stamp { position: absolute; top: 1.5rem; z-index: 4; padding: .35rem .9rem; border-radius: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; font-size: .9rem; opacity: 0; border: 2.5px solid; background: rgba(255, 255, 255, .92); }
.stamp.like { left: 1.2rem; color: var(--brand); transform: rotate(-8deg); }
.stamp.nope { right: 1.2rem; color: var(--bad); transform: rotate(8deg); }
.swipe-actions { display: flex; justify-content: center; gap: 1.5rem; }
.round { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow); transition: transform .12s; }
.round:active { transform: scale(.92); }
.round .i { width: 26px; height: 26px; stroke-width: 2.2; }
.round.nope { color: var(--bad); }
.round.like { color: var(--brand); }
.round.like .i { fill: currentColor; }
.swipe-foot { display: flex; align-items: center; gap: 1rem; max-width: 400px; margin: 1.25rem auto 0; }
.swipe-foot .bar { flex: 1; height: 4px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.swipe-foot .bar i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.swipe-foot .link { font-size: .85rem; white-space: nowrap; }

/* ---------- match ---------- */
.match { max-width: 760px; margin: 0 auto; text-align: center; padding-top: 1rem; }
.match h1 { margin-bottom: .5rem; }
.taste { display: grid; gap: .5rem; justify-content: center; margin: 1.25rem 0; }
.taste > div { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; justify-content: center; }
.taste .lbl { font-size: .8rem; color: var(--muted); margin-right: .25rem; }
.chip { font-size: .8rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--line); }
.chip.yes { background: var(--brand-2); border-color: transparent; color: var(--brand); font-weight: 600; }
.chip.no { color: var(--muted); text-decoration: line-through; }
.match-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 2rem 0; text-align: left; }
.match-cards figure { margin: 0; animation: rise .4s ease-out both; }
.match-cards .thumb { aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; }
.match-cards figcaption { padding: .55rem .15rem 0; }
.match-cards figcaption b { display: block; font-size: .95rem; line-height: 1.25; }
.match-cards figcaption small { color: var(--muted); }
.match .btn { max-width: 420px; }

/* ---------- resultado ---------- */
.banner { display: flex; gap: .6rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--r-sm); background: var(--brand-2); color: var(--brand); margin-bottom: 1.25rem; font-size: .92rem; }
.result-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.result-head h1 { margin-bottom: .2rem; }
.result-head p { margin: 0; }
.head-actions { display: flex; gap: .5rem; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: var(--soft); border-radius: var(--r); padding: 1rem 1.1rem; }
.kpi span { display: block; font-size: .8rem; color: var(--muted); }
.kpi b { display: block; font-size: 1.55rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--ink-2); font-size: .8rem; }
.note { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--r-sm); font-size: .9rem; margin: 0 0 1rem; }
.note.ok { background: var(--brand-2); color: var(--brand); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note .i { margin-top: .15rem; }
.adjust { border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 1.25rem; }
.adjust summary { cursor: pointer; padding: .8rem 1rem; font-weight: 600; font-size: .92rem; list-style: none; display: flex; justify-content: space-between; }
.adjust summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.adjust[open] summary::after { content: "−"; }
.controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; padding: 0 1rem 1rem; }
.controls label, .inline { display: grid; gap: .3rem; font-size: .78rem; color: var(--muted); font-weight: 600; }
.inline { display: flex; align-items: center; gap: .6rem; }
select, input[type="number"] { font: inherit; font-size: .95rem; color: var(--ink); padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-height: 42px; width: 100%; }
.inline select { width: auto; }

.tabs { display: flex; gap: .25rem; background: var(--soft); padding: .3rem; border-radius: 999px; margin-bottom: 1.25rem; position: sticky; top: 64px; z-index: 10; }
.tabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: .45rem; border: 0; background: transparent; padding: .6rem .8rem; border-radius: 999px;
  font-weight: 600; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem; }
.panel > h3 { margin-bottom: .3rem; }

/* cardápio */
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; }
.day h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .5rem; }
.meal { display: block; width: 100%; text-align: left; padding: 0; margin-bottom: .6rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; transition: box-shadow .15s; }
.meal:hover { box-shadow: var(--shadow); }
.meal .thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.meal-txt { padding: .65rem .8rem .8rem; }
.meal-txt small { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; }
.meal-txt b { display: block; font-size: .95rem; line-height: 1.25; margin: .1rem 0 .4rem; }
.store { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; color: var(--ink-2); padding: .15rem .5rem; border-radius: 999px; background: var(--soft); }
.store .i { width: 13px; height: 13px; }
.store.freezer { color: #2b5f87; background: #eaf2f8; }
.store.fresh { color: var(--warn); background: var(--warn-bg); }
.legend { line-height: 2; }

/* compras */
.shop-head { display: grid; gap: 1rem; }
.seg { display: flex; background: var(--soft); border-radius: 999px; padding: .25rem; gap: .2rem; flex-wrap: wrap; }
.seg button { flex: 1; border: 0; background: transparent; padding: .55rem .8rem; border-radius: 999px; font-weight: 600; font-size: .86rem; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button[aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.shop-total { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.shop-total b { display: block; font-size: 2rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.shop-total .save { display: block; color: var(--brand); font-weight: 600; }
.shop-head p { margin: 0; }
.age.old { color: var(--warn); font-weight: 600; }
.age.est { color: var(--warn); }
.market-h { display: flex; align-items: center; gap: .55rem; margin: 0 0 .5rem; }
.market-h i { width: 12px; height: 12px; border-radius: 50%; }
.market-h span { margin-left: auto; font-size: .95rem; color: var(--ink-2); }
.shop-group h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.1rem 0 .2rem; }
.shop-group:first-child h4 { margin-top: .3rem; }
.shop-item { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.shop-group .shop-item:last-child { border-bottom: 0; }
.check { position: relative; width: 26px; height: 26px; margin-top: .05rem; cursor: pointer; }
.check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.check span { position: absolute; inset: 0; border: 1.5px solid #c9cbc4; border-radius: 8px; display: grid; place-items: center; color: transparent; transition: .15s; pointer-events: none; }
.check span .i { width: 16px; height: 16px; stroke-width: 2.6; }
.check input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.what b { font-weight: 600; }
.what .qty { color: var(--muted); font-size: .88rem; }
.prod { font-size: .84rem; color: var(--ink-2); margin-top: .15rem; }
.est { display: inline-block; font-size: .7rem; font-weight: 600; color: var(--warn); background: var(--warn-bg); border-radius: 6px; padding: 0 .35rem; }
.alts { font-size: .82rem; margin-top: .3rem; }
.alts summary { cursor: pointer; color: var(--muted); }
.alts ul { margin: .3rem 0 0; padding-left: 1rem; }
.alts li span { color: var(--muted); }
.side { display: grid; justify-items: end; gap: .3rem; }
.price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.have { border: 1px solid var(--line); background: #fff; border-radius: 999px; font-size: .72rem; padding: .2rem .6rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.have.on { background: var(--brand-2); color: var(--brand); border-color: transparent; font-weight: 600; }
.shop-item.done .what b, .shop-item.done .qty { text-decoration: line-through; color: var(--muted); }
.shop-item.owned { opacity: .55; }
.compare { display: grid; gap: .55rem; margin-top: .6rem; }
.bar { display: grid; grid-template-columns: 7.5rem 1fr 5rem; gap: .7rem; align-items: center; font-size: .9rem; }
.bar i { height: 10px; background: var(--soft); border-radius: 10px; overflow: hidden; }
.bar b { display: block; height: 100%; border-radius: 10px; opacity: .85; }
.bar span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.bar.current { font-weight: 700; }

/* modo mercado */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(15, 20, 18, .45); }
.market-mode { width: 100%; max-width: 640px; height: 100%; max-height: 100%; margin: 0 auto; border-radius: 0; display: flex; flex-direction: column; }
.market-mode[open] { display: flex; }
.mm-head { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.mm-head > div { flex: 1; }
.mm-head small { display: block; color: var(--muted); }
.mm-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.mm-bar { height: 4px; background: var(--soft); }
.mm-bar i { display: block; height: 100%; background: var(--brand); transition: width .25s; width: 0; }
.mm-body { overflow-y: auto; padding: .5rem 1.1rem calc(2rem + var(--safe-b)); flex: 1; }
.mm-body .market-h { margin-top: 1.2rem; }
.mm-body .shop-item { padding: 1rem 0; font-size: 1.05rem; }
.mm-body .check { width: 34px; height: 34px; }
.mm-body .check span { border-radius: 10px; }
.mm-body .check span .i { width: 20px; height: 20px; }
.mm-body .shop-item.done { opacity: .5; }

/* preparo */
.timeline { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.timeline > li { position: relative; padding: 0 0 1.4rem 2.6rem; counter-increment: s; }
.timeline > li::before { content: counter(s); position: absolute; left: 0; top: -.1rem; width: 28px; height: 28px; border-radius: 50%; background: var(--soft);
  display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
.timeline > li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: 4px; width: 1px; background: var(--line); }
.timeline h4 { font-size: 1rem; margin-bottom: .35rem; }
.timeline ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); }
.timeline ul li { margin: .2rem 0; }

/* receitas */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; }
.rcard { cursor: pointer; border-radius: var(--r); overflow: hidden; background: #fff; border: 1px solid var(--line); transition: box-shadow .15s, transform .15s; }
.rcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.rcard-img { aspect-ratio: 4 / 3; overflow: hidden; }
.rcard-body { padding: .9rem 1rem 1rem; }
.rcard-body .eyebrow { margin-bottom: .25rem; }
.rcard h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.rcard .meta { color: var(--muted); font-size: .84rem; margin: 0; display: flex; align-items: center; gap: .3rem; }

.sheet { width: min(720px, 100%); max-height: 92vh; border-radius: 24px; overflow-y: auto; padding: 0; }
.sheet .close { position: absolute; top: .8rem; right: .8rem; z-index: 5; background: rgba(255, 255, 255, .92); border: 0; }
.pantry .shop-group h4 { display: none; }
.recipe-hero { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); }
.recipe-body { padding: 1.5rem 1.5rem .5rem; }
.recipe-body h2 { font-size: 1.8rem; }
.recipe-body h4 { margin-top: 1.6rem; font-size: 1.05rem; }
.facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin: 1.2rem 0 .5rem; }
.facts div { background: var(--soft); border-radius: var(--r-sm); padding: .65rem .6rem; text-align: center; }
.facts span { display: block; font-size: .72rem; color: var(--muted); }
.facts b { font-size: .95rem; }
.ings { list-style: none; padding: 0; margin: 0; }
.ings li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.ings b { font-weight: 600; white-space: nowrap; }
.steps { padding: 0; margin: 0; list-style: none; counter-reset: st; }
.steps li { counter-increment: st; position: relative; padding: 0 0 1rem 2.4rem; color: var(--ink-2); }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 700; display: grid; place-items: center; }
.tip { background: var(--brand-2); color: #1b4d35; border-radius: var(--r-sm); padding: .85rem 1rem; margin: .5rem 0 1rem; font-size: .92rem; }
.tip b { margin-right: .3rem; }
.sheet-actions { padding: 0 1.5rem 1.5rem; }

.empty { padding: 3rem 0; }

#toast { position: fixed; left: 50%; bottom: calc(1.5rem + var(--safe-b)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: .7rem 1.1rem;
  border-radius: 999px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- celular ---------- */
@media (max-width: 760px) {
  main { padding: 1rem 1rem calc(6rem + var(--safe-b)); }
  .welcome { grid-template-columns: 1fr; gap: 1.5rem; padding-top: .5rem; }
  .collage { order: -1; grid-template-columns: 1.4fr 1fr; }
  .facts-row { gap: 1.5rem; margin-top: 1.5rem; }
  .how { grid-template-columns: 1fr; }
  /* botões principais fixos no rodapé, ao alcance do polegar */
  .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: .6rem; align-items: center; justify-content: center;
    padding: .7rem 1rem calc(.7rem + var(--safe-b)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); margin: 0; }
  .dock .btn { flex: 1; }
  .quiz-nav.dock .btn.ghost { flex: 0 0 auto; }
  .swipe-actions.dock { gap: 2.5rem; padding-top: .6rem; }
  .swipe-actions.dock .round { width: 58px; height: 58px; box-shadow: none; }
  .swipe-foot { margin-top: .6rem; }
  .options.grid { grid-template-columns: 1fr 1fr; }
  .deck { height: calc(100dvh - 290px - var(--safe-b)); min-height: 360px; margin-top: .8rem; }
  .swipe-head h1 { font-size: 1.3rem; }
  .swipe-head p { display: none; }
  .result-head { align-items: flex-start; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .kpis { gap: .5rem; }
  .kpi { padding: .8rem; }
  .kpi b { font-size: 1.2rem; }
  /* abas viram barra de navegação embaixo */
  .tabs { position: fixed; top: auto; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: .35rem .5rem calc(.35rem + var(--safe-b)); z-index: 30; }
  .tabs button { flex-direction: column; gap: .15rem; font-size: .7rem; padding: .4rem 0; border-radius: 12px; }
  .tabs button .i { width: 22px; height: 22px; }
  .tabs button[aria-selected="true"] { box-shadow: none; color: var(--brand); background: transparent; }
  .panel { padding: 1rem; border-radius: var(--r-sm); }
  .days { grid-template-columns: 1fr; }
  .meal { display: grid; grid-template-columns: 96px 1fr; }
  .meal .thumb { aspect-ratio: auto; height: 100%; min-height: 84px; }
  .day { margin-bottom: .3rem; }
  .bar { grid-template-columns: 5.5rem 1fr 4.5rem; }
  .sheet { width: 100%; max-width: 100%; max-height: 94vh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .recipe-body { padding: 1.2rem 1.1rem .5rem; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .recipe-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .rcard h3 { font-size: .95rem; }
  #toast { bottom: calc(5.5rem + var(--safe-b)); }
}
@media (max-width: 380px) { .recipe-grid { grid-template-columns: 1fr; } .seg button { font-size: .78rem; } }

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

/* ---------- impressão ---------- */
@media print {
  .topbar, .no-print, .tabs, .credit, .have, .recipe-grid, #toast, .banner { display: none !important; }
  [data-panel] { display: block !important; margin-bottom: 1.5rem; }
  .print-only { display: block; }
  .print-only .recipe { break-inside: avoid; margin-bottom: 1rem; }
  .print-only .recipe-hero { display: none; }
  main { padding: 0; }
  .panel, .kpi { border: 1px solid #ddd; }
  .meal .thumb { display: none; }
}
