/* Boxless: one phone-width column, a sticky brand bar, tabs at the bottom.
   Dishes sit on tinted plates, colour-coded by protein, exactly like the printed cards. */
:root {
  --bg: #FFFDFA;
  --surface: #FFFFFF;
  --sunk: #F4F0EA;
  --ink: #1F1A17;
  --body: #3A332E;
  --muted: #6B625C;
  --line: #E8E1D9;
  --accent: #F2A93B;
  --on-accent: #1F1A17;
  --on-tone: #1F1A17;
  --mark-bg: #1F1A17;
  --mark-fg: #F2A93B;
  --badge-bg: #1F1A17;
  --badge-fg: #FFFFFF;
  --chicken: #F2A93B; --chicken-tint: #FDEFD6; --chicken-ink: #8A4E00;
  --beef: #E8603F;    --beef-tint: #FCE4DC;    --beef-ink: #A12E19;
  --pork: #58AC72;    --pork-tint: #E2F2E7;    --pork-ink: #22663B;
  --fish: #3B8FD9;    --fish-tint: #E1EEFB;    --fish-ink: #1D5A93;
  --veg: #8C6BD1;     --veg-tint: #EEE8FA;     --veg-ink: #57399B;
  --alert: #B42A17;   --on-alert: #FFFFFF;     --offer: #A12E19;
  --dock-bg: #1F1A17; --dock-fg: #FFFDFA;      --dock-btn: rgb(255 255 255 / 0.14);
  --glass: rgb(255 253 250 / 0.88);
  --shadow: 0 1px 2px rgb(31 26 23 / 0.05), 0 10px 30px rgb(31 26 23 / 0.08);

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-text: "Figtree", -apple-system, "Segoe UI", system-ui, sans-serif;

  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --nav-h: 64px;
  --bar-top: 0px;
  --bar-pad: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14100D; --surface: #1D1814; --sunk: #28211B; --ink: #F6F0E9; --body: #DDD4CA; --muted: #A99E93; --line: #372E27;
    --mark-bg: #F2A93B; --mark-fg: #1F1A17;
    --chicken-tint: #3A2C17; --chicken-ink: #F7C46F;
    --beef-tint: #3E211A;    --beef-ink: #F6A089;
    --pork-tint: #1C3325;    --pork-ink: #8FD5A5;
    --fish-tint: #16283A;    --fish-ink: #8EC1F0;
    --veg-tint: #261F3A;     --veg-ink: #C4B0F2;
    --alert: #FF8A73; --on-alert: #2A0E08; --offer: #F6A089;
    --dock-bg: #F6F0E9; --dock-fg: #14100D; --dock-btn: rgb(0 0 0 / 0.08);
    --glass: rgb(20 16 13 / 0.86);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14100D; --surface: #1D1814; --sunk: #28211B; --ink: #F6F0E9; --body: #DDD4CA; --muted: #A99E93; --line: #372E27;
  --mark-bg: #F2A93B; --mark-fg: #1F1A17;
  --chicken-tint: #3A2C17; --chicken-ink: #F7C46F;
  --beef-tint: #3E211A;    --beef-ink: #F6A089;
  --pork-tint: #1C3325;    --pork-ink: #8FD5A5;
    --fish-tint: #16283A;    --fish-ink: #8EC1F0;
    --veg-tint: #261F3A;     --veg-ink: #C4B0F2;
  --alert: #FF8A73; --on-alert: #2A0E08; --offer: #F6A089;
  --dock-bg: #F6F0E9; --dock-fg: #14100D; --dock-btn: rgb(0 0 0 / 0.08);
  --glass: rgb(20 16 13 / 0.86);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px rgb(0 0 0 / 0.35);
  color-scheme: dark;
}

.tone-chicken { --tint: var(--chicken-tint); --tone: var(--chicken); --tone-ink: var(--chicken-ink); }
.tone-beef    { --tint: var(--beef-tint);    --tone: var(--beef);    --tone-ink: var(--beef-ink); }
.tone-pork    { --tint: var(--pork-tint);    --tone: var(--pork);    --tone-ink: var(--pork-ink); }
.tone-fish    { --tint: var(--fish-tint);    --tone: var(--fish);    --tone-ink: var(--fish-ink); }
.tone-veg     { --tint: var(--veg-tint);     --tone: var(--veg);     --tone-ink: var(--veg-ink); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); color: var(--ink); letter-spacing: -0.015em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong, b { font-weight: 800; color: var(--ink); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: 640px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

/* ------------------------------------------------------------ brand bar */
.bar {
  position: sticky; top: var(--bar-top); z-index: 20;
  padding-top: var(--bar-pad);
  background: var(--bg);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.bar.scrolled { border-bottom-color: var(--line); }
.bar-in { height: 58px; display: flex; align-items: center; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; }
.mark { width: 32px; height: 32px; border-radius: 10px; background: var(--mark-bg); color: var(--mark-fg); display: grid; place-items: center; flex: none; }
.wordmark { font: 800 22px/1 var(--font-display); letter-spacing: -0.035em; }
.plan-name { margin-left: auto; font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.back {
  width: 44px; height: 44px; border-radius: 22px; flex: none;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: var(--sunk); color: var(--ink);
}

/* ------------------------------------------------------------ main + tabs */
main { display: block; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 36px); min-height: 70vh; }
.has-timers main { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 120px); }
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.tabs-in { max-width: 640px; margin: 0 auto; height: var(--nav-h); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em; color: var(--muted); }
.tab-ic { width: 52px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background-color 0.2s, color 0.2s; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] .tab-ic { background: var(--accent); color: var(--on-accent); }
.is-cook .bar, .is-cook .tabs { display: none; }

/* ------------------------------------------------------------ type helpers */
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.date-line { margin: 14px 0 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 34px 0 12px; }
.section-head h2, .page-head h1 { font-size: 30px; line-height: 1.05; font-weight: 800; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 18px; }
.page-head .eyebrow { margin-bottom: 6px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 26px; border: 0; cursor: pointer;
  font-weight: 800; font-size: 17px; line-height: 1; white-space: nowrap;
  transition: transform 0.12s, background-color 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-ghost { background: var(--sunk); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn[disabled] { opacity: 0.35; cursor: default; transform: none; }
.link-btn { border: 0; background: none; padding: 10px 0; min-height: 44px; font-weight: 800; font-size: 15px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 24px; background: var(--sunk); }
.seg-btn {
  position: relative; width: 44px; height: 40px; border-radius: 20px; border: 0; cursor: pointer;
  background: transparent; color: var(--muted);
  font: 800 17px/1 var(--font-display); font-variant-numeric: tabular-nums;
}
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg-dot { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 4px; background: var(--accent); }

/* ------------------------------------------------------------ plan: tonight */
.tonight {
  display: flex; flex-direction: column; border-radius: 30px; overflow: hidden;
  background: var(--tint);
}
.tonight-art { display: grid; place-items: center; padding: 18px 18px 0; }
.tonight-art img { width: min(78%, 330px); aspect-ratio: 1; height: auto; }
.tonight-body { display: flex; flex-direction: column; gap: 8px; padding: 6px 22px 22px; }
.tonight-body .eyebrow { color: var(--tone-ink); }
.tonight-body h1 { font-size: clamp(30px, 8.6vw, 42px); line-height: 1.02; font-weight: 800; letter-spacing: -0.025em; }
.tonight-meta { color: var(--body); font-size: 16px; }
.tonight-body .btn { align-self: flex-start; margin-top: 8px; }

.off { border-radius: 30px; background: var(--sunk); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.off-head { display: flex; align-items: center; gap: 14px; }
.off-ic { width: 56px; height: 56px; border-radius: 28px; flex: none; display: grid; place-items: center; background: var(--surface); color: var(--ink); }
.off-head h1 { font-size: clamp(28px, 8vw, 36px); line-height: 1.04; font-weight: 800; }
.off-head p { color: var(--body); }

.mini { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 22px; background: var(--surface); }
.mini .thumb { width: 72px; height: 72px; }
.mini .thumb img { width: 64px; height: 64px; }
.mini-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mini-main .eyebrow { color: var(--tone-ink); font-size: 12px; }
.mini-title { font: 800 20px/1.15 var(--font-display); letter-spacing: -0.015em; }
.mini-meta { font-size: 14.5px; color: var(--muted); }
.chev { color: var(--muted); flex: none; }

.note { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--sunk); font-size: 15.5px; line-height: 1.45; color: var(--body); }
.note svg { flex: none; margin-top: 1px; color: var(--ink); }
.tonight + .note, .tonight-wrap .note { margin-top: 12px; }

.shopcard {
  margin: 14px 0; display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 12px 14px 12px 12px; border-radius: 22px;
  background: var(--surface); border: 1.5px solid var(--line);
}
.shopcard-ic { width: 48px; height: 48px; border-radius: 24px; flex: none; display: grid; place-items: center; background: var(--sunk); color: var(--ink); }
.shopcard-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shopcard-title { font: 700 18px/1.2 var(--font-display); letter-spacing: -0.01em; }
.shopcard-meta { font-size: 14.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ plan: week list */
.shop-link {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; border-radius: 18px;
  background: var(--sunk); font-size: 15.5px; color: var(--body);
}
.shop-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.shop-link-text b { font-size: 17px; font-variant-numeric: tabular-nums; }
.shop-link-text span { font-size: 14.5px; color: var(--muted); }
.shop-link > svg:first-child { color: var(--ink); flex: none; }

.days { margin-top: 6px; }
.day { display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 10px 4px; border-top: 1px solid var(--line); }
.days li:first-child .day { border-top-color: transparent; }
.day-code { width: 44px; flex: none; display: flex; flex-direction: column; gap: 4px; font: 800 18px/1 var(--font-display); letter-spacing: 0.01em; }
.day-code small { font: 800 10.5px/1 var(--font-text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); border-radius: 6px; padding: 3px 4px; align-self: flex-start; }
.thumb { width: 58px; height: 58px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; flex: none; }
.thumb img { width: 52px; height: 52px; }
.thumb-off { background: transparent; border: 2px dashed var(--line); color: var(--muted); }
.day-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.day-title { font: 700 18px/1.2 var(--font-display); letter-spacing: -0.01em; }
.day-meta { font-size: 14.5px; color: var(--muted); }
.day-off .day-code, .day-off .day-title { color: var(--muted); }
.day.is-today { background: var(--sunk); border-radius: 20px; border-top-color: transparent; padding-left: 10px; padding-right: 10px; }
.days li:has(.is-today) + li .day { border-top-color: transparent; }
.day-code small.today-tag { background: var(--ink); color: var(--bg); }

.setting { margin-top: 34px; padding: 18px; border-radius: 22px; border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.setting h2 { font-size: 19px; font-weight: 800; }
.setting p { color: var(--body); font-size: 15.5px; }
.setting-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.setting-form label { font-size: 14px; font-weight: 800; }
.setting-form input {
  min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: 600 17px var(--font-text); max-width: 100%;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------ shop */
.shop-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.shop-total .big { font: 800 48px/1 var(--font-display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.shop-total .plus { color: var(--muted); font-weight: 700; }
.progress { margin-top: 16px; height: 10px; border-radius: 5px; background: var(--sunk); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 5px; transition: width 0.3s; }
.progress-label { margin-top: 8px; font-size: 14.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.group { margin-top: 26px; }
.group h2, .panel h2, .recipe h2 { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.group h2 { padding-bottom: 6px; border-bottom: 2px solid var(--ink); }

.check-row { position: relative; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-row input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cbox {
  width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--ink); flex: none;
  display: grid; place-items: center; color: transparent; transition: background-color 0.15s, color 0.15s;
}
.check-row input:checked + .cbox { background: var(--ink); color: var(--bg); }
.check-row input:focus-visible + .cbox { outline: 3px solid var(--accent); outline-offset: 2px; }
.check-row .item { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.check-row .name { font-weight: 700; line-height: 1.3; }
.check-row .pack { font-size: 14px; color: var(--muted); }
.check-row input:checked ~ .item .name { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.price { flex: none; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.price small { font-size: 12px; font-weight: 800; color: var(--offer); white-space: nowrap; }
.till { font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap; }

.panel { margin-top: 26px; padding: 18px; border-radius: 22px; background: var(--sunk); display: flex; flex-direction: column; gap: 6px; }
.panel p { color: var(--body); font-size: 15.5px; }
.panel .check-row { min-height: 52px; border-bottom-color: var(--line); align-items: flex-start; }
.panel .check-row .cbox { margin-top: 1px; width: 24px; height: 24px; border-radius: 7px; }
.panel .check-row .name { font-weight: 600; font-size: 15.5px; color: var(--body); }
.panel li:last-child .check-row { border-bottom: 0; }
.home-note { margin-top: 18px; }

.reset { margin-top: 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reset p { font-weight: 700; }
.sources { margin-top: 18px; font-size: 14.5px; color: var(--muted); }
.sources summary { min-height: 44px; display: flex; align-items: center; font-weight: 800; color: var(--ink); cursor: pointer; }
.sources p { margin-bottom: 10px; }
.sources ul { display: flex; flex-direction: column; gap: 6px; }
.sources a { text-decoration: underline; text-underline-offset: 3px; color: var(--body); }

/* ------------------------------------------------------------ recipes grid */
.chips { display: flex; gap: 8px; margin: 0 calc(-1 * var(--gutter-r)) 18px 0; padding-right: var(--gutter-r); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn {
  flex: none; min-height: 42px; padding: 0 15px; border-radius: 21px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; gap: 8px;
}
.chip-btn i { width: 10px; height: 10px; border-radius: 5px; background: var(--tone); }
.chip-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rcard { display: flex; flex-direction: column; gap: 8px; }
.rcard-art { aspect-ratio: 1; max-width: 100%; border-radius: 24px; background: var(--tint); display: grid; place-items: center; padding: 10px; transition: transform 0.15s; }
.rcard:active .rcard-art { transform: scale(0.98); }
.rcard-title { font: 700 17px/1.2 var(--font-display); letter-spacing: -0.01em; }
.rcard-meta { font-size: 13.5px; color: var(--muted); }

/* ------------------------------------------------------------ recipe */
.hero { position: relative; margin-top: 6px; border-radius: 30px; background: var(--tint); display: grid; place-items: center; padding: 22px 0; }
.hero img { width: min(76%, 360px); aspect-ratio: 1; height: auto; }
.time-badge {
  position: absolute; left: 16px; bottom: 16px; width: 80px; height: 80px; border-radius: 50%;
  background: var(--badge-bg); color: var(--badge-fg); border: 4px solid var(--tone);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-display);
}
.time-badge b { font-size: 30px; line-height: 0.95; font-weight: 800; color: var(--badge-fg); }
.time-badge span { font: 800 11px/1.2 var(--font-text); letter-spacing: 0.14em; }
.hero-chip { position: absolute; top: 16px; right: 16px; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.recipe-head { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.recipe-head .eyebrow { color: var(--tone-ink); }
.recipe-head h1 { font-size: clamp(32px, 9vw, 44px); line-height: 1.02; font-weight: 800; letter-spacing: -0.025em; }
.lede { font-size: 17.5px; color: var(--body); }

.stats { margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.stat { display: flex; align-items: center; gap: 10px; padding: 12px 6px; min-width: 0; }
.stat:nth-child(odd) { border-right: 1px solid var(--line); }
.stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.stat svg { color: var(--tone-ink); flex: none; }
.stat dt { font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat dd { margin: 0; font-weight: 800; font-size: 15.5px; line-height: 1.25; }
@media (min-width: 540px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat:nth-child(-n+2) { border-bottom: 0; }
  .stat:not(:last-child) { border-right: 1px solid var(--line); }
}

.recipe section { margin-top: 30px; }
.recipe h2 svg { color: var(--tone-ink); }
.recipe .note { margin-top: 18px; }
.ing .check-row { min-height: 54px; }
.ing .cbox { border-radius: 50%; }
.qty { width: 84px; flex: none; font-weight: 800; color: var(--tone-ink); line-height: 1.3; }
.ing .item-note { font-size: 14px; color: var(--muted); }
.cupboard { padding: 18px; border-radius: 22px; background: var(--sunk); }
.cupboard .sub { color: var(--muted); font-size: 14.5px; margin: 2px 0 6px; }
.cupboard .check-row { border-bottom-color: var(--line); }
.cupboard li:last-child .check-row { border-bottom: 0; }
.kit { margin-top: 18px; display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; color: var(--body); }
.kit svg { color: var(--tone-ink); flex: none; margin-top: 2px; }

.steps { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.step { border: 1.5px solid var(--line); border-radius: 22px; padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.step-head { display: flex; align-items: center; gap: 12px; }
.num { width: 34px; height: 34px; border-radius: 17px; flex: none; display: grid; place-items: center; background: var(--tone); color: var(--on-tone); font: 800 17px/1 var(--font-display); }
.step h3 { flex: 1; min-width: 0; font-size: 19px; font-weight: 700; line-height: 1.2; }
.step-ic { color: var(--tone-ink); flex: none; }
.step p { color: var(--body); font-size: 16.5px; }
.time-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 16px; background: var(--sunk); font-size: 14px; font-weight: 800; color: var(--ink); }
.timer-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 9px;
  min-height: 46px; padding: 0 16px 0 12px; border-radius: 23px; border: 0; cursor: pointer;
  background: var(--tint); color: var(--ink); font-size: 15px; font-weight: 800; text-align: left;
}
.timer-btn svg { color: var(--tone-ink); flex: none; }
.timer-btn .tb-text { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; }
.timer-btn .tb-sub { font-size: 13px; font-weight: 600; color: var(--body); }
.timer-btn.running { background: var(--ink); color: var(--bg); cursor: default; }
.timer-btn.running svg, .timer-btn.running .tb-sub { color: var(--bg); }
.tip { margin-top: 26px; display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 20px; background: var(--tint); font-size: 16px; line-height: 1.45; }
.tip svg { color: var(--tone-ink); flex: none; margin-top: 1px; }
.cta { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px); z-index: 10; margin-top: 26px; display: flex; }
.has-timers .cta { position: static; }
.cta .btn { flex: 1; min-height: 58px; font-size: 18px; box-shadow: var(--shadow); }
.foot-note { margin-top: 18px; font-size: 13.5px; color: var(--muted); }

/* ------------------------------------------------------------ cook mode */
.cook {
  position: fixed; inset: 0; z-index: 40; background: var(--bg);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cook-top { display: flex; align-items: center; gap: 12px; min-height: 64px; width: 100%; max-width: 640px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.cook-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cook-title span:first-child { font: 800 16px/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-count { font-size: 13.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.cook-progress { display: flex; gap: 6px; width: 100%; max-width: 640px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.cook-progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.cook-progress span.on { background: var(--tone); }
.cook-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cook-inner { padding-top: 28px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 16px; }
.cook-ic { width: 76px; height: 76px; border-radius: 38px; background: var(--tint); color: var(--tone-ink); display: grid; place-items: center; }
.cook-step-no { color: var(--tone-ink); }
.cook h2 { font-size: clamp(30px, 8.4vw, 40px); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.cook-text { font-size: clamp(21px, 5.6vw, 24px); line-height: 1.5; color: var(--body); }
.cook .timer-btn { min-height: 60px; padding: 0 22px 0 16px; border-radius: 30px; font-size: 18px; }
.cook .time-chip { font-size: 16px; padding: 8px 14px 8px 11px; }
.cook .tip { margin-top: 8px; }
.awake { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.cook-nav { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; width: 100%; max-width: 640px; margin: 0 auto; padding: 12px var(--gutter-r) 12px var(--gutter-l); border-top: 1px solid var(--line); }
.cook-nav .btn { min-height: 60px; padding: 0 18px; }
.cook-nav .btn-ghost { padding: 0; }

/* ------------------------------------------------------------ timer dock */
.dock {
  position: fixed; left: 0; right: 0; z-index: 35; pointer-events: none;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 10px);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.is-cook .dock { z-index: 45; bottom: calc(85px + env(safe-area-inset-bottom, 0px)); }
.dock-in { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.tmr {
  pointer-events: auto; display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 16px; border-radius: 22px;
  background: var(--dock-bg); color: var(--dock-fg); box-shadow: var(--shadow);
}
.tmr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--dock-fg); }
.tmr-label { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmr-dish { font-size: 12.5px; font-weight: 600; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmr-time { font: 800 24px/1 var(--font-display); font-variant-numeric: tabular-nums; padding: 0 4px; }
.tmr-btn { width: 44px; height: 44px; border-radius: 22px; border: 0; cursor: pointer; flex: none; display: grid; place-items: center; background: var(--dock-btn); color: var(--dock-fg); font-weight: 800; font-size: 15px; }
.tmr.done { background: var(--alert); color: var(--on-alert); animation: ring 1s ease-in-out infinite; }
.tmr.done .tmr-main, .tmr.done .tmr-btn { color: var(--on-alert); }
@keyframes ring { 50% { transform: translateY(-3px); } }

/* ------------------------------------------------------------ states */
.loading { padding-top: 30vh; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); font-weight: 700; }
.loading .mark { width: 56px; height: 56px; border-radius: 16px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.error { padding-top: 22vh; display: flex; flex-direction: column; gap: 10px; }
.error h1 { font-size: 28px; }

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

/* ---------------------------------------------------------------- Boxless engine views */
body.no-tabs main { padding-bottom: 40px; }
.start .hello { margin: 18px 0 8px; display: flex; flex-direction: column; gap: 12px; }
.hello-mark { width: 60px; height: 60px; border-radius: 30px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.hello h1 { font-size: clamp(32px, 9.5vw, 44px); line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; }
.start-h { font-size: 22px; font-weight: 800; margin: 26px 0 10px; }
.presets { display: flex; flex-direction: column; gap: 10px; }
.preset {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); font: inherit; cursor: pointer;
}
.preset:active { transform: scale(0.99); }
.preset[disabled] { cursor: progress; }
.preset-ic { width: 48px; height: 48px; border-radius: 24px; flex: none; display: grid; place-items: center; background: var(--sunk); }
.preset-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.preset-name { font: 800 19px/1.15 var(--font-display); letter-spacing: -0.015em; }
.preset-who { font-size: 14px; font-weight: 700; color: var(--muted); }
.preset-blurb { font-size: 14.5px; color: var(--body); line-height: 1.35; }
.preset-price { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font-variant-numeric: tabular-nums; }
.preset-price b { font: 800 21px/1 var(--font-display); }
.preset-price b.pending { color: var(--line); }
.preset-price small { font-size: 12.5px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.start .note { margin-top: 16px; }
.start .foot-note { margin-top: 18px; }

.section-sub { font-size: 14px; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.inline-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 12px; background: var(--sunk); color: var(--ink); }
.day-li { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); }
.days li.day-li:first-child { border-top-color: transparent; }
.day-li .day { flex: 1; min-width: 0; border-top: 0; }
.day-li:has(.is-today) { background: var(--sunk); border-radius: 20px; border-top-color: transparent; }
.day-li:has(.is-today) + .day-li { border-top-color: transparent; }
.day-li .day.is-today { background: none; }
.swap-btn { width: 44px; height: 44px; flex: none; border-radius: 22px; display: grid; place-items: center; background: var(--sunk); color: var(--ink); margin-right: 4px; }
.day-li:has(.is-today) .swap-btn { background: var(--surface); }

.box-panel { margin-top: 34px; gap: 10px; }
.box-panel h2 svg { color: var(--ink); }
.box-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0; }
.box-stats div { background: var(--surface); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.box-stats dt { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.box-stats dd { margin: 2px 0 0; font: 800 20px/1.1 var(--font-display); font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.box-stats dd small { font: 700 12.5px/1.3 var(--font-text); color: var(--muted); }
.box-stats dd.ok { color: var(--pork-ink); }
.box-stats dd.over { color: var(--beef-ink); }
.box-actions { flex-wrap: wrap; gap: 8px; }
.box-actions .btn { gap: 8px; flex: 1 1 150px; }
.box-panel .small { font-size: 14.5px; }
.box-panel .link-btn { align-self: flex-start; }

.swaps { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.swap-opt { width: 100%; text-align: left; border: 1.5px solid var(--line); font: inherit; color: var(--ink); cursor: pointer; }
.swap-opt .thumb { background: var(--tint); }
.delta { flex: none; font-size: 13px; font-weight: 800; padding: 6px 10px; border-radius: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta.save { background: var(--pork-tint); color: var(--pork-ink); }
.delta.more { background: var(--sunk); color: var(--body); }
.delta.same { background: var(--sunk); color: var(--muted); }
.keep-btn { margin-top: 18px; width: 100%; }

.shop-sub { margin-top: 4px; font-size: 15px; font-weight: 700; color: var(--muted); }
.check-row .uses { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.grid-h { font-size: 21px; font-weight: 800; margin: 22px 0 12px; }
.plan-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.family-link { margin-top: 18px; }
