/* FitChef — tokens */
:root {
  --paper: #f3f0e8;
  --surface: #fbfaf6;
  --surface-2: #efebe1;
  --ink: #15241f;
  --ink-2: #4b5b55;
  --ink-3: #6f7c76;
  --line: #dcd6c8;
  --line-2: #e8e3d7;
  --leaf: #1f5e46;
  --leaf-700: #174a37;
  --leaf-50: #e3ede6;
  --lime: #c8e66b;
  --lime-ink: #273a07;
  --amber: #b7791a;
  --clay: #b05436;
  --danger: #a8402a;

  --t-cafe-da-manha: #eadcc2;
  --t-almoco: #d5e3cc;
  --t-jantar: #d2d8e2;
  --t-lanche: #f0d7c2;
  --t-pre-treino: #e4e6b9;
  --t-pos-treino: #cce2db;
  --t-sobremesa: #f0d6dc;
  --t-outras: #e2ddd0;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow-1: 0 1px 0 rgba(21, 36, 31, .04), 0 1px 2px rgba(21, 36, 31, .06);
  --shadow-2: 0 2px 4px rgba(21, 36, 31, .05), 0 12px 28px -10px rgba(21, 36, 31, .22);
  --shadow-3: 0 24px 60px -20px rgba(21, 36, 31, .45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--lime); color: var(--lime-ink); }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; border-radius: 6px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tnum { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__inner { max-width: 1240px; margin: 0 auto; padding: 12px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand__mark { width: 34px; height: 34px; border-radius: 10px; background: var(--leaf); display: grid; place-items: center; }
.brand__mark svg { width: 26px; height: 26px; fill: none; stroke: var(--lime); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand__name { font: 750 20px/1 var(--font-display); letter-spacing: -0.03em; }

.cart-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 8px 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-1);
  font-weight: 600; font-size: 15px;
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cart-btn:hover { border-color: var(--leaf); box-shadow: var(--shadow-2); }
.cart-btn__count {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--ink); color: var(--surface); font-size: 13px; font-variant-numeric: tabular-nums;
}
.cart-btn.has-items .cart-btn__count { background: var(--lime); color: var(--lime-ink); }
.cart-btn.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ---------- intro ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.intro { padding: clamp(24px, 6vw, 64px) 0 clamp(18px, 3vw, 28px); max-width: 760px; }
.intro h1 { font-size: clamp(34px, 6.2vw, 62px); line-height: 1.02; font-weight: 750; letter-spacing: -0.035em; }
.intro__lede { color: var(--ink-2); font-size: clamp(16px, 1.8vw, 18px); max-width: 58ch; margin: 14px 0 24px; }
.search { position: relative; max-width: 560px; }
.search input {
  width: 100%; height: 54px; padding: 0 52px 0 48px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow-1);
  font-size: 16px; caret-color: var(--leaf);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search input::placeholder { color: var(--ink-3); }
.search input:hover { border-color: #c9c2b1; }
.search input:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 4px var(--leaf-50); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search__ic { position: absolute; left: 16px; top: 17px; color: var(--ink-3); }
.search__kbd { position: absolute; right: 14px; top: 15px; font: 500 12px/22px var(--font-body); min-width: 24px; text-align: center; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; color: var(--ink-3); background: var(--paper); }
.search input:focus ~ .search__kbd, .search input:not(:placeholder-shown) ~ .search__kbd { display: none; }

/* ---------- filtros ---------- */
.toolbar { position: sticky; top: var(--topbar-h, 68px); z-index: 10; background: var(--paper); padding: 10px 0 12px; margin: 0 calc(var(--pad) * -1); padding-inline: var(--pad); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.chip .ic { width: 18px; height: 18px; }
.chip__n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip[aria-checked="true"] .chip__n { color: #b9c4bf; }
.chip--all { padding-left: 14px; }
.toolbar__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.result-count { margin: 0; color: var(--ink-2); font-size: 14px; }
.result-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.sort select {
  height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5b55' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 16px;
  appearance: none; color: var(--ink); font-weight: 500;
}
.sort select:hover { border-color: var(--ink-3); }

/* ---------- grade ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(14px, 2vw, 22px); padding: 8px 0 56px; }
.skeleton { height: 380px; border-radius: var(--r-lg); background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line); }
.card:focus-within { border-color: var(--line); }

.media {
  position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden;
  background-color: var(--tint, var(--t-outras));
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1.2px);
  background-size: 14px 14px;
}
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media__ic { width: 34%; max-width: 110px; aspect-ratio: 1; color: color-mix(in srgb, var(--ink) 72%, var(--tint)); fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
.card:hover .media__ic { transform: rotate(-4deg) scale(1.04); }
.media__time, .media__incart {
  position: absolute; top: 12px; display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.media__time { left: 12px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink); }
.media__time .ic { width: 15px; height: 15px; }
.media__incart { right: 12px; background: var(--leaf); color: var(--surface); }
.media__incart .ic { width: 15px; height: 15px; stroke-width: 2.4; }

.card__body { padding: 16px 18px 6px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cat { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 0; }
.cat::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: color-mix(in srgb, var(--tint) 55%, var(--ink) 45%); }
.card h3 { font-size: 20px; line-height: 1.18; font-weight: 650; }
.card__open { all: unset; cursor: pointer; }
.card__open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-lg); }
.card__open:focus-visible { outline: none; }
.card__open:focus-visible::after { outline: 3px solid var(--leaf); outline-offset: -3px; }
.card__open:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--leaf); }

.facts { display: flex; gap: 6px 16px; flex-wrap: wrap; margin: 2px 0 0; padding: 0; }
.facts div { display: flex; align-items: baseline; gap: 5px; }
.facts dt { order: 2; font-size: 13px; color: var(--ink-3); }
.facts dd { margin: 0; font: 650 17px/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.facts .is-prot dd { color: var(--leaf); }

.card__actions { position: relative; z-index: 2; padding: 12px 18px 18px; display: grid; gap: 10px; }
.mult { display: flex; align-items: center; gap: 8px; }
.mult__label { font-size: 13px; color: var(--ink-3); margin-right: auto; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); }
.seg button {
  min-width: 40px; height: 32px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums;
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.seg button:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 13px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.15; text-align: center;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--leaf); color: var(--surface); }
.btn--primary:hover { background: var(--leaf-700); }
.btn--soft { background: var(--leaf-50); color: var(--leaf-700); }
.btn--soft:hover { background: #d4e4d9; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn--text { background: transparent; color: var(--danger); padding: 0 12px; }
.btn--text:hover { background: #f3e3dc; }
.btn.is-done { background: var(--ink); }
.btn .ic { width: 19px; height: 19px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.empty { text-align: center; padding: 48px 16px 80px; max-width: 460px; margin: 0 auto; }
.empty__title { font: 650 22px/1.2 var(--font-display); margin: 0 0 6px; }
.empty__text { color: var(--ink-2); margin: 0 0 18px; }

.foot { max-width: 1240px; margin: 0 auto; padding: 24px var(--pad) 48px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }
.foot p { margin: 0; max-width: 75ch; }
.foot__src { color: var(--ink-3); }

/* ---------- dialogs base ---------- */
dialog { padding: 0; border: 0; color: var(--ink); background: var(--surface); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(16, 28, 24, .42); backdrop-filter: blur(2px); }
dialog[open] { animation: sheetIn .45s var(--ease); }
dialog[open]::backdrop { animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes sheetIn { from { transform: translateY(24px); opacity: 0; } }
body.no-scroll { overflow: hidden; }

.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); transition: border-color .2s var(--ease), background .2s var(--ease); flex: none; }
.icon-btn:hover { border-color: var(--ink-3); background: var(--paper); }
.icon-btn--sm { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn--sm .ic { width: 17px; height: 17px; }

/* ---------- receita ---------- */
.recipe { width: min(1040px, 100vw - 32px); max-height: min(880px, 100dvh - 32px); border-radius: 26px; box-shadow: var(--shadow-3); overflow: hidden; }
.recipe__wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); max-height: inherit; }
.recipe__main { overflow-y: auto; max-height: min(880px, 100dvh - 32px); padding-bottom: 24px; overscroll-behavior: contain; }
.recipe__side { overflow-y: auto; max-height: min(880px, 100dvh - 32px); background: var(--paper); padding: 28px 28px 32px; border-left: 1px solid var(--line-2); overscroll-behavior: contain; }
.recipe .media { aspect-ratio: 16 / 8; }
.recipe .media__ic { width: 22%; }
.recipe__close { position: absolute; top: 14px; right: 14px; z-index: 3; background: color-mix(in srgb, var(--surface) 92%, transparent); }
.recipe__head { padding: 22px 28px 0; display: grid; gap: 10px; }
.recipe__head h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.08; font-weight: 750; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-2); font-size: 14px; margin: 0; padding: 0; list-style: none; }
.meta li { display: inline-flex; align-items: center; gap: 6px; }
.meta .ic { width: 17px; height: 17px; color: var(--ink-3); }

.macros { margin: 20px 28px 0; padding: 16px; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line-2); }
.macros__grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 8px; }
.macro { display: grid; gap: 2px; }
.macro__v { font: 700 24px/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.macro__v small { font: 500 13px var(--font-body); color: var(--ink-3); margin-left: 2px; }
.macro__l { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.macro__l i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.macros__bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; margin-top: 14px; gap: 2px; background: var(--line-2); }
.macros__bar span { background: var(--c); }
.macros__note { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); }

.block { padding: 24px 28px 0; }
.block__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.block h3 { font-size: 19px; font-weight: 650; }
.yield { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 0; }
.ings { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.ings li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.ings .q { color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ings .q.is-free { color: var(--ink-3); font-style: italic; }
.recipe__cta { position: sticky; bottom: 0; padding: 16px 28px 0; background: linear-gradient(to top, var(--surface) 75%, transparent); }
.recipe__cta .btn { width: 100%; min-height: 54px; font-size: 16px; }
.recipe__hint { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); text-align: center; }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 4px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 10px 0; line-height: 1.55; max-width: 62ch; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font: 650 14px/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--leaf); }
.side__title { font-size: 19px; font-weight: 650; margin-bottom: 8px; }
.side__src { margin-top: 18px; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.side__src a { color: var(--leaf); text-underline-offset: 3px; }

/* ---------- carrinho ---------- */
.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(460px, 100vw);
  display: none; flex-direction: column; box-shadow: var(--shadow-3);
  border-radius: 24px 0 0 24px;
}
.drawer[open] { display: flex; animation: drawerIn .45s var(--ease); }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
.drawer__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 22px 14px; }
.drawer__head h2 { font-size: 26px; font-weight: 750; }
.drawer__sub { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.drawer__recipes { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 22px 14px; border-bottom: 1px solid var(--line-2); }
.drawer__recipes:empty { display: none; }
.rchip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--leaf-50); color: var(--leaf-700); font-size: 13px; font-weight: 600; max-width: 100%; }
.rchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rchip b { font-variant-numeric: tabular-nums; font-weight: 700; }
.rchip button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: inherit; display: grid; place-items: center; flex: none; }
.rchip button:hover { background: #cfe0d4; }
.rchip .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.drawer__body { flex: 1; overflow-y: auto; padding: 6px 22px 20px; overscroll-behavior: contain; }
.drawer__foot { display: grid; grid-template-columns: 1.2fr 1fr auto auto; gap: 8px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: var(--surface); }

.aisle { margin-top: 16px; }
.aisle__title { font: 600 13px/1 var(--font-body); color: var(--ink-3); margin: 0 0 4px; display: flex; justify-content: space-between; }
.aisle__title span { font-variant-numeric: tabular-nums; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.item:last-child { border-bottom: 0; }
.have { position: relative; width: 26px; height: 26px; flex: none; }
.have input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.have span { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid #bdb6a6; display: grid; place-items: center; transition: background .15s var(--ease), border-color .15s var(--ease); background: var(--surface); }
.have span .ic { width: 16px; height: 16px; stroke-width: 2.6; opacity: 0; color: var(--surface); transition: opacity .15s; }
.have input:hover + span { border-color: var(--leaf); }
.have input:checked + span { background: var(--leaf); border-color: var(--leaf); }
.have input:checked + span .ic { opacity: 1; }
.have input:focus-visible + span { outline: 3px solid var(--leaf); outline-offset: 2px; }
.item__name { min-width: 0; }
.item__name strong { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.item__name small { display: block; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; height: 36px; background: var(--surface); }
.qty button { width: 30px; height: 34px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-2); border-radius: 10px; }
.qty button:hover { color: var(--ink); background: var(--paper); }
.qty button .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.qty label { display: inline-flex; align-items: baseline; gap: 3px; padding: 0 2px; }
.qty input { width: 4.2ch; border: 0; background: transparent; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; padding: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; }
.qty:focus-within { border-color: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-50); }
.qty__u { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; max-width: 9ch; overflow: hidden; text-overflow: ellipsis; }
.free { font-size: 13px; color: var(--ink-3); font-style: italic; padding: 0 8px; }
.del { width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); display: grid; place-items: center; }
.del:hover { color: var(--danger); background: #f3e3dc; }
.del .ic { width: 18px; height: 18px; }
.item.is-have .item__name strong { text-decoration: line-through; text-decoration-color: var(--ink-3); color: var(--ink-3); }
.item.is-have .qty { opacity: .5; }

.have-group { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 6px; }
.have-group summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.have-group summary::-webkit-details-marker { display: none; }
.have-group summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s var(--ease); }
.have-group[open] summary::after { transform: rotate(-135deg); }

.cart-empty { text-align: center; padding: 48px 12px; color: var(--ink-2); }
.cart-empty svg { width: 52px; height: 52px; color: var(--line); stroke-width: 1.4; }
.cart-empty h3 { font-size: 20px; margin: 12px 0 6px; color: var(--ink); }
.cart-empty p { margin: 0 auto 18px; max-width: 34ch; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 24px);
  padding: 12px 12px 12px 18px; border-radius: 16px;
  background: var(--ink); color: var(--surface); box-shadow: var(--shadow-3); font-size: 14.5px;
  animation: toastIn .4s var(--ease);
}
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }
.toast__action { border: 0; background: var(--lime); color: var(--lime-ink); font-weight: 700; font-size: 14px; height: 34px; padding: 0 12px; border-radius: 10px; white-space: nowrap; }
.toast__action:hover { background: #d6ef86; }
.toast__action:focus-visible { outline-color: var(--lime); }

/* ---------- responsivo ---------- */
@media (max-width: 860px) {
  .recipe { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .recipe__wrap { display: block; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  .recipe__main, .recipe__side { max-height: none; overflow: visible; }
  .recipe__side { border-left: 0; border-top: 1px solid var(--line-2); padding: 24px 20px 40px; }
  .recipe__head, .block { padding-left: 20px; padding-right: 20px; }
  .macros { margin-left: 20px; margin-right: 20px; }
  .recipe__cta { padding-left: 20px; padding-right: 20px; padding-bottom: 12px; }
  .recipe .media { aspect-ratio: 16 / 9; }
  dialog.recipe[open] { animation: sheetUp .45s var(--ease); }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
}
@media (max-width: 560px) {
  .cart-btn__label { display: none; }
  .cart-btn { padding-left: 12px; }
  .drawer { width: 100vw; border-radius: 0; }
  .drawer__head, .drawer__body, .drawer__recipes { padding-left: 16px; padding-right: 16px; }
  .drawer__foot { grid-template-columns: 1.3fr 1fr 1fr; padding-left: 16px; padding-right: 16px; }
  .drawer__foot .btn--text { grid-column: 1 / -1; min-height: 38px; }
  .macros__grid { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .item { grid-template-columns: auto 1fr auto; }
  .item .del { grid-row: 1; grid-column: 3; }
  .item .qty, .item .free { grid-column: 2 / 4; justify-self: start; }
  .sort span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .chip[aria-checked="true"], .seg button[aria-checked="true"] { outline: 2px solid CanvasText; }
}

[hidden] { display: none !important; }
.recipe .media__incart { top: auto; bottom: 12px; left: 12px; right: auto; }
.toast__action--alt { background: transparent; color: var(--lime); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lime) 60%, transparent); }
.toast__action--alt:hover { background: rgba(200, 230, 107, .12); }
.calc { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.calc summary { cursor: pointer; color: var(--leaf); font-weight: 600; width: fit-content; }
.calc summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.calc ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 3px; }

/* refinamentos pós-revisão visual */
.card .media { aspect-ratio: 2 / 1; }
.media__ic { width: 26%; max-width: 84px; }
@media (hover: none) {
  .btn--text:hover, .btn--soft:hover, .chip:hover, .del:hover { background: inherit; }
  .card:hover { transform: none; }
}
@media (max-width: 560px) {
  .item { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; }
  .item .qty, .item .free { grid-column: auto; justify-self: end; }
  .item .del { grid-row: auto; grid-column: auto; width: 30px; }
  .qty button { width: 28px; }
  .recipe__cta .btn { font-size: 15px; padding: 0 12px; }
  .card .media { aspect-ratio: 16 / 7; }
}
@media (max-width: 360px) {
  .item { grid-template-columns: auto 1fr auto; }
  .item .del { grid-row: 1; grid-column: 3; }
  .item .qty, .item .free { grid-column: 2 / 4; justify-self: start; }
}
.qty__u { min-width: 2.4ch; }

/* ================= v2 ================= */
.topbar__inner { display: grid; grid-template-columns: auto 1fr auto; }
.tabs { justify-self: center; display: inline-flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14.5px; transition: background .2s var(--ease), color .2s var(--ease); white-space: nowrap; }
.tab:hover { color: var(--ink); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.tab[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.tab__n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 12px; background: var(--line-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tab.has-items .tab__n { background: var(--leaf); color: var(--surface); }
.card.no-anim { animation: none; }

/* pessoas */
.people { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.people__b { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 11px; color: var(--ink-2); }
.people__b:hover:not([disabled]) { color: var(--ink); background: var(--paper); }
.people__b[disabled] { opacity: .35; cursor: not-allowed; }
.people__b .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.people__v { min-width: 84px; text-align: center; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.people__v b { color: var(--ink); font-size: 15px; font-weight: 700; }
.people--sm { height: 30px; border-radius: 10px; margin-top: 6px; }
.people--sm .people__b { width: 28px; height: 28px; }
.people--sm .people__v { min-width: 72px; font-size: 12.5px; }
.people--sm .people__v b { font-size: 13.5px; }
.mult { flex-wrap: wrap; row-gap: 6px; }
.sort--people .ic { width: 17px; height: 17px; color: var(--ink-3); }
.toolbar__row { flex-wrap: wrap; }
.toolbar__row .result-count { margin-right: auto; }

.serve { padding-top: 22px; }
.serve__txt { margin: 0 0 10px; font-weight: 600; font-size: 15px; }
.serve__ctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.recipe__more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.recipe__more .btn { min-height: 44px; }
.daypick { margin-top: 10px; padding: 12px; border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line-2); }
.daypick__t { margin: 0 0 8px; font-size: 13.5px; color: var(--ink-2); }
.daypick__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dayb { display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: 13px; transition: border-color .2s var(--ease), background .2s var(--ease); }
.dayb b { font-weight: 650; }
.dayb span { font-size: 12px; color: var(--ink-3); height: 16px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.dayb span .ic { width: 14px; height: 14px; stroke-width: 2.6; color: var(--leaf); }
.dayb:hover { border-color: var(--leaf); }
.dayb.is-has { background: var(--leaf-50); border-color: #bcd3c5; }
.btn--sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn--sm .ic { width: 17px; height: 17px; }
.btn.is-busy { opacity: .6; cursor: progress; }
.more { display: flex; justify-content: center; padding: 0 0 48px; }

/* cardápio */
.menu-head { padding: clamp(24px, 5vw, 52px) 0 22px; display: grid; gap: 16px; }
.menu-head h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.04; font-weight: 750; letter-spacing: -0.035em; }
.menu-head .intro__lede { margin: 10px 0 0; }
.menu-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; padding-bottom: 56px; align-items: start; }
.day { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: 16px; display: grid; gap: 10px; }
.day.is-empty { background: color-mix(in srgb, var(--surface) 55%, var(--paper)); box-shadow: none; border-style: dashed; border-color: var(--line); }
.day__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.day__head h2 { font-size: 21px; font-weight: 700; }
.day__tot { margin: 0; font-size: 13px; color: var(--ink-2); }
.day__tot span { color: var(--ink-3); }
.mitems { list-style: none; margin: 0; padding: 0; display: grid; }
.mitem { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line-2); }
.mitem__ic { width: 34px; height: 34px; border-radius: 10px; background: var(--tint); display: grid; place-items: center; color: color-mix(in srgb, var(--ink) 75%, var(--tint)); flex: none; }
.mitem__ic .ic { width: 19px; height: 19px; stroke-width: 1.6; }
.mitem__main { min-width: 0; }
.mitem__name { all: unset; cursor: pointer; display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.mitem__name:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--leaf); }
.mitem__name:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; border-radius: 4px; }
.mitem__main small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.day__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 4px; }
.day.is-empty .day__foot { grid-template-columns: 1fr; }
.day.is-empty [data-daycart] { display: none; }

/* seletor de receitas */
.picker { width: min(620px, 100vw - 32px); max-height: min(760px, 100dvh - 32px); border-radius: 24px; box-shadow: var(--shadow-3); display: none; flex-direction: column; overflow: hidden; }
.picker[open] { display: flex; }
.picker__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 20px 12px; }
.picker__head h2 { font-size: 24px; font-weight: 750; }
.picker__search { margin: 0 20px 10px; max-width: none; }
.picker__list { list-style: none; margin: 0; padding: 0 12px 16px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.pick { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 8px; border-radius: 14px; }
.pick:hover { background: var(--paper); }
.pick:focus-visible { outline: 3px solid var(--leaf); outline-offset: -3px; }
.pick__main strong { display: block; font-weight: 600; font-size: 15px; }
.pick__main small { display: block; color: var(--ink-3); font-size: 12.5px; }
.pick__add { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--leaf); gap: 0; }
.pick__add .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.pick.is-has .pick__add { background: var(--leaf-50); border-color: #bcd3c5; display: inline-flex; width: auto; min-width: 34px; padding: 0 6px; }
.pick__more { padding: 12px 8px; color: var(--ink-3); font-size: 13.5px; text-align: center; }

#printArea { display: none; }

@media (max-width: 860px) {
  .picker { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
}
@media (max-width: 560px) {
  .topbar__inner { grid-template-columns: 1fr auto; row-gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; display: grid; grid-template-columns: 1fr 1fr; }
  .tab { justify-content: center; }
  .daypick__grid { grid-template-columns: repeat(4, 1fr); }
  .recipe__more { grid-template-columns: 1fr; }
  .menu-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .menu-actions .btn--primary { grid-column: 1 / -1; }
  .drawer__foot .btn--text { grid-column: 1 / -1; }
  .sort--people select { max-width: 170px; }
}

/* impressão (fallback do PDF): só a área de impressão */
@media print {
  @page { size: A4; margin: 16mm; }
  body.printing > *:not(#printArea) { display: none !important; }
  body.printing #printArea { display: block !important; }
  .pr { font: 11pt/1.45 var(--font-body); color: #15241f; }
  .pr h1 { font: 700 22pt/1.1 var(--font-display); margin: 0 0 6pt; }
  .pr h2 { font: 650 13pt var(--font-display); margin: 14pt 0 4pt; color: #1f5e46; break-after: avoid; }
  .pr li { margin: 2pt 0; break-inside: avoid; }
  .pr__brand { font-weight: 700; color: #1f5e46; margin: 0 0 10pt; }
  .pr__meta, .pr__foot { color: #4b5b55; font-size: 9.5pt; }
  .pr__check { list-style: "☐  "; }
  .pr__ficha { break-before: page; page-break-before: always; }
}

/* ajustes pós-revisão v2 */
.toast { width: max-content; max-width: min(620px, calc(100vw - 24px)); }
.day__foot { grid-template-columns: 1fr; }
.day__foot [data-pickday] { border-style: dashed; color: var(--ink-2); }
@media (max-width: 560px) {
  .menu-actions { grid-template-columns: 1fr; }
  .toast { left: 12px; right: 12px; width: auto; transform: none; max-width: none; }
  @keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
}
.rchip b { white-space: nowrap; }
.drawer__recipes { max-height: 112px; overflow-y: auto; }
@media (max-width: 560px) { .hide-sm { display: none; } .drawer__recipes { max-height: 84px; } }
