/* Mealwisely: every color is a token; light and dark both ship. Phone first: a tab bar at the bottom under 760px,
   links in the top bar above it. Nothing scrolls sideways at 360. */
:root {
  --bg: #f6f5f1; --panel: #ffffff; --raised: #fbfaf7; --fg: #1d1f1c; --mute: #62665f; --line: #e3e1da; --soft: #efede7;
  --accent: #2f7d5b; --accent-ink: #ffffff; --accent-soft: #e2f0e8; --warn: #a15c00; --bad: #c4161c; --good: #2f7d5b;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06); --art-l: 86%; --art-c: 45%;
  --radius: 14px; color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) {
  --bg: #121412; --panel: #1b1e1b; --raised: #202420; --fg: #eef0ec; --mute: #a4aaa2; --line: #2c312c; --soft: #252a25;
  --accent: #6cc79c; --accent-ink: #0d1a13; --accent-soft: #1d3329; --warn: #f0b04a; --bad: #ff6b70; --good: #6cc79c;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --art-l: 30%; --art-c: 35%; color-scheme: dark; } }
:root[data-theme=dark] {
  --bg: #121412; --panel: #1b1e1b; --raised: #202420; --fg: #eef0ec; --mute: #a4aaa2; --line: #2c312c; --soft: #252a25;
  --accent: #6cc79c; --accent-ink: #0d1a13; --accent-soft: #1d3329; --warn: #f0b04a; --bad: #ff6b70; --good: #6cc79c;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --art-l: 30%; --art-c: 35%; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (pointer: coarse) { input, select, textarea { font-size: 16px !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
/* Zoomed to 200% on a phone the page is narrower than its least width: it scrolls rather than cutting off. */
@media (max-width: 300px) { body { overflow-x: auto; } }
/* Fingers: every control is at least 44 px tall where the pointer is a finger. */
@media (pointer: coarse) { button, .btn, .chip, select, .stepper button, input[type=checkbox] + span { min-height: 44px; } .icon { min-width: 44px; } }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 26px; letter-spacing: -.01em; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0 0 .8em; }
a { color: var(--accent); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: -999px; top: 0; } .skip:focus { left: 8px; z-index: 50; background: var(--panel); padding: 8px; }
.bar { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--fg); text-decoration: none; }
.logo { width: 28px; height: 28px; display: block; }
.hero-logo { width: 132px; height: 132px; display: block; margin: 0 auto 14px; }
.topnav { display: flex; gap: 2px; margin-left: 18px; }
.topnav[hidden] { display: none; }
.topnav a { padding: 7px 12px; border-radius: 8px; color: var(--mute); text-decoration: none; font-weight: 600; }
.topnav a[aria-current=page] { color: var(--fg); background: var(--soft); }
.grow { flex: 1; }
.sync { font-size: 13px; color: var(--mute); white-space: nowrap; }
.sync.off { color: var(--warn); }
.page { max-width: 1400px; margin: 0 auto; padding: 24px 20px 40px; outline: none; }
.page:focus, .page:focus-visible { outline: none; }
.mute { color: var(--mute); } .small { font-size: 13px; }
button, .btn { font: 600 14px system-ui, sans-serif; border-radius: 10px; padding: 9px 14px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; }
button:hover, .btn:hover { border-color: var(--mute); }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.ghost { background: transparent; border-color: transparent; }
button.icon { padding: 8px; min-width: 40px; }
button.link { background: none; border: 0; color: var(--accent); padding: 4px 2px; min-height: 0; font-weight: 600; }
button.danger { color: var(--bad); }
button:disabled { opacity: .45; cursor: default; }
button.big, .btn.big { padding: 13px 18px; font-size: 16px; border-radius: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=number], textarea, select {
  font: inherit; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 42px; width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 120px; line-height: 1.45; }
label.field { display: block; margin: 0 0 12px; } label.field > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.stack > * + * { margin-top: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 18px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head h1 { margin: 0; }
.err { color: var(--bad); min-height: 1.5em; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font: 600 13px system-ui, sans-serif; color: var(--fg); min-height: 34px; cursor: pointer; }
.chip[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--fg); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--soft); color: var(--mute); font-size: 12px; font-weight: 600; }
/* recipe art: a soft color by cuisine and a big food mark, so every card has a picture without photos */
.art { --h: 140; position: relative; background: linear-gradient(135deg, hsl(var(--h) var(--art-c) var(--art-l)), hsl(calc(var(--h) + 35) var(--art-c) calc(var(--art-l) - 8%))); display: grid; place-items: center; overflow: hidden; }
a:has(> .art) { text-decoration: none; display: block; }
.art.photo { background: var(--soft); }
.art.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meal .art.photo { height: 100%; }
.art span { font-size: 52px; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.art.sm span { font-size: 30px; }
.art.lg span { font-size: 84px; }
/* recipe grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.rcard { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; text-decoration: none; color: inherit; position: relative; }
.rcard .art { aspect-ratio: 16 / 10; }
.rcard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rcard h2.cardtitle { font-size: 15px; margin: 0; }
.rcard .meta { font-size: 13px; color: var(--mute); }
.rcard .add { position: absolute; top: 10px; right: 10px; min-height: 36px; padding: 6px 12px; border-radius: 99px; box-shadow: var(--shadow); }
.rcard .add.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.rcard .fav { position: absolute; top: 12px; left: 12px; font-size: 18px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .search { flex: 1 1 240px; }
.filters select { width: auto; flex: 0 1 auto; }
.fridge { padding: 10px 16px; margin: 0 0 14px; }
.fridge summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.fridge[open] summary { margin-bottom: 4px; }
.count { margin: 0 0 12px; font-size: 14px; color: var(--mute); }
/* plan */
.week { display: flex; align-items: center; gap: 4px; }
.week b { min-width: 124px; text-align: center; }
.meals { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.meal { display: grid; grid-template-columns: 112px 1fr; overflow: hidden; }
.meal .art { min-height: 132px; }
.meal .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.meal h2.cardtitle { margin: 0; font-size: 15px; } .meal h2.cardtitle a { color: var(--fg); text-decoration: none; }
.meal.done .art { opacity: .55; }
.meal select.day { width: auto; min-height: 32px; padding: 2px 8px; font-size: 13px; }
.meal .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.meal .acts button { min-height: 36px; padding: 6px 11px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { border: 0; border-radius: 0; min-height: 34px; min-width: 36px; padding: 4px; }
.stepper output { min-width: 82px; text-align: center; font-weight: 600; font-size: 14px; }
.empty { text-align: center; padding: 48px 20px; }
.empty .art { width: 120px; height: 120px; border-radius: 28px; margin: 0 auto 18px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; margin-top: 18px; text-decoration: none; color: var(--fg); }
.cta b { font-size: 17px; }
/* recipe page */
.recipe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-areas: "art main" "nut main"; grid-template-rows: auto 1fr; gap: 22px 28px; align-items: start; }
.r-art { grid-area: art; } .r-main { grid-area: main; } .r-nut { grid-area: nut; }
.recipe .art { border-radius: var(--radius); aspect-ratio: 4 / 3; }
.facts { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 14px; }
.facts div { display: flex; flex-direction: column; } .facts b { font-size: 17px; } .facts span { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.ings { list-style: none; padding: 0; margin: 0; }
.ings li { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ings li:last-child { border-bottom: 0; }
.ings .amt { font-weight: 700; text-align: right; }
.shoplinks li.sent a::after { content: " ✓"; color: var(--good); }
.shoplinks li.sent a { color: var(--mute, inherit); }
.contains { margin: 8px 0 0; font-size: 14px; }
.banner.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--panel)); color: var(--fg); }
.lhint { color: var(--fg); }
.ings .hint { display: block; font-size: 12.5px; }
.ings.swappable li { grid-template-columns: 84px 1fr auto; align-items: start; }
.swapbtn { padding: 4px 10px; min-height: 32px; font-size: 13px; }
.swapnote { color: var(--accent); font-weight: 600; }
.swappanel { grid-column: 1 / -1; margin: 4px 0 0; }
.swappanel .chip[aria-pressed=true] { outline: 2px solid var(--accent); }
.swapnotes { margin: 8px 0 0; padding-left: 18px; }
.swapwhere { border: 0; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.swapwhere legend { padding: 0; margin-bottom: 4px; }
.steps { padding-left: 0; list-style: none; counter-reset: s; margin: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 0; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--fg); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.nut { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nut div { background: var(--soft); border-radius: 10px; padding: 8px 10px; } .nut b { display: block; font-size: 16px; } .nut span { font-size: 12px; color: var(--mute); }
.section { margin-top: 22px; }
/* grocery list */
.listwrap { max-width: 760px; }
.progress { height: 6px; background: var(--soft); border-radius: 9px; overflow: hidden; margin: 6px 0 16px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 9px; transition: width .2s; }
.aisle { margin-bottom: 14px; overflow: hidden; }
.aisle h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); padding: 12px 16px 4px; margin: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border-top: 1px solid var(--line); min-height: 56px; }
.item:first-of-type { border-top: 0; }
.item label { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.item input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.item .what { min-width: 0; } .item .what b { font-weight: 600; } .item .what small { display: block; color: var(--mute); font-size: 12.5px; overflow-wrap: anywhere; }
.item.done .what { text-decoration: line-through; color: var(--mute); }
.item button { min-height: 34px; padding: 4px 10px; font-size: 13px; }
.shoplinks { margin: 12px 0 0; padding: 0; list-style: none; columns: 2 220px; }
.shoplinks li { padding: 6px 0; break-inside: avoid; }
.shoplinks a { font-weight: 600; }
.addline { display: flex; gap: 8px; margin-bottom: 14px; }
/* cooking mode */
.cook { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; }
.cook .cookhead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.cook .cookhead h2 { margin: 0; font-size: 16px; flex: 1; min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dots { display: flex; gap: 5px; padding: 10px 16px 0; flex-wrap: wrap; } .dots i { width: 22px; height: 5px; border-radius: 4px; background: var(--line); } .dots i.on { background: var(--accent); }
.cook .stepbody { flex: 1; overflow-y: auto; padding: 18px 20px; max-width: 820px; width: 100%; margin: 0 auto; }
.cook .num { color: var(--mute); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.cook .text { font-size: clamp(21px, 3.2vw, 30px); line-height: 1.4; margin: 8px 0 18px; }
.cook .need { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px; }
.cook footer { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
.cook footer button { flex: 1; min-height: 54px; font-size: 17px; }
.timers { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.timerbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 16px 0; }
.timer { display: inline-flex; gap: 8px; align-items: center; padding: 6px 8px 6px 14px; border-radius: 99px; background: var(--accent-soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.ring { background: var(--warn); color: var(--panel); }
.timer button { min-height: 30px; padding: 2px 10px; border-radius: 99px; font-size: 13px; }
/* setup and settings */
.narrow { max-width: 640px; margin: 0 auto; }
.welcome-foot { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); margin-top: 6px; justify-content: space-between; }
.choice { display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; }
.opt input { accent-color: var(--accent); width: 20px; height: 20px; flex: none; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt small { display: block; color: var(--mute); }
.settings { display: grid; gap: 16px; max-width: 760px; }
.settings h2 { margin-bottom: 4px; }
.settings li, .settings .chip { overflow-wrap: anywhere; min-width: 0; }
.people { list-style: none; padding: 0; margin: 8px 0; } .people li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.order li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.order { list-style: none; padding: 0; margin: 0; } .order li span { flex: 1; } .order button { min-height: 32px; min-width: 36px; padding: 2px; }
.tabsel { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.tabsel button { border: 0; background: none; min-height: 36px; } .tabsel button[aria-pressed=true] { background: var(--panel); box-shadow: var(--shadow); }
.banner { padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
/* menu, toasts, dialogs */
.menu-list { position: absolute; right: 20px; top: 56px; z-index: 30; display: flex; flex-direction: column; min-width: 220px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.menu-list[hidden] { display: none; }
.menu-list > button, .menu-list .smcp-inline { text-align: left; justify-content: flex-start; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font: 500 14px system-ui, sans-serif; color: var(--fg); width: 100%; }
.menu-list > button:hover { background: var(--soft); }
.who { padding: 6px 10px; font-size: 13px; color: var(--mute); overflow-wrap: anywhere; }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--fg); color: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast span { flex: 1; } .toast button { background: transparent; color: var(--bg); border-color: transparent; min-height: 34px; text-decoration: underline; }
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--fg); max-width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.35); }
.tabs { display: none; }
.badge { position: absolute; top: 2px; left: 52%; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center; }
@media (max-width: 900px) { .recipe { grid-template-columns: 1fr; grid-template-areas: "art" "main" "nut"; } .recipe .art { aspect-ratio: 16 / 8; } }
@media (max-width: 760px) {
  .topnav { display: none; }
  .tabs:not([hidden]) { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabs a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; color: var(--mute); text-decoration: none; font-size: 11.5px; font-weight: 600; }
  .tabs a[aria-current=page] { color: var(--accent); }
  body:has(.tabs:not([hidden])) .page { padding-bottom: 96px; }
  body:has(.tabs:not([hidden])) .toasts { bottom: 84px; }
  .bar { padding: 10px 12px; } .page { padding: 16px 14px 40px; }
  h1 { font-size: 22px; }
  .meals { grid-template-columns: 1fr; }
  .meal { grid-template-columns: 92px 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rcard .body { padding: 10px; } .rcard h2.cardtitle { font-size: 14px; }
  .rcard .add { top: 6px; right: 6px; padding: 4px 10px; min-height: 32px; font-size: 13px; }
  .filters .search { flex-basis: 100%; }
  .menu-list { right: 12px; }
  .ings li { grid-template-columns: 70px 1fr; }
}
@media (max-width: 380px) { .meal { grid-template-columns: 76px 1fr; } .stepper output { min-width: 70px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.warnline { color: var(--warn); font-weight: 600; margin: 2px 0 4px; }

/* Round 5 look: notes in a swap read as one line; buttons keep their words on one line; the chosen way to add is
   clear in dark too; list actions share one look with a visible on state; Remove looks tappable; settings centred. */
.ings .swapnotes li { display: list-item; padding: 2px 0; border: 0; }
.addline button, .tabsel button { white-space: nowrap; }
.tabsel button[aria-pressed=true] { outline: 2px solid var(--accent); outline-offset: -2px; }
.listacts button { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 5px 12px; font: 600 13px system-ui, sans-serif; min-height: 34px; color: var(--fg); }
.listacts button[aria-pressed=true], .listacts button[aria-expanded=true] { background: var(--accent-soft); border-color: var(--accent); }
.meal .acts button.ghost { border-color: var(--line); }
.settings { margin: 0 auto; }
.hint { margin: -6px 0 12px; }

/* Round 6 look: amounts sit at the card edge; a recipe's marks are their own labelled row; the dinner card's actions
   stay on one row; the email box gets the whole width on a phone; the Settings heading sits over its column. */
.ings .amt { text-align: left; }
.marks { margin-top: 8px; }
.meal .acts { flex-wrap: wrap; } .meal .acts button { padding: 6px 9px; }
.settingshead { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 480px) { #maillink { flex-direction: column; } #maillink button { width: 100%; } }

/* Round 7: a dinner card's buttons keep their words on one line. */
.meal .acts button { white-space: nowrap; }

/* Round 13: each Shop online item is a whole-row target a finger can hit on a phone; */
/* On a touch screen each Shop online item is its own row: the link is a 44px target, its amount sits right under it,
   and a hairline closes the row, so an amount never reads as the next item's. */
@media (pointer: coarse) {
  .shoplinks li { padding: 0 0 8px; border-bottom: 1px solid var(--line); }
  .shoplinks a { display: flex; align-items: center; min-height: 44px; }
  .shoplinks li > span { display: block; margin-top: -8px; }
}

/* Round 14: on a touch screen every control is a finger's size (this comes last, so it wins over every rule above). */
@media (pointer: coarse) {
  button, .btn, .chip, select, button.icon, button.link, .meal .acts button, .meal select.day, .stepper button,
  .swapbtn, .item button, .order button, .rcard .add, .listacts button, .tabsel button, .toast button, .fridge summary { min-height: 44px; }
  .icon, .stepper button, .order button { min-width: 44px; }
  .ings.swappable li { align-items: center; }
}
/* The nutrition card stays beside the steps on a desk, so the left side is never left empty. */
@media (min-width: 901px) { .r-nut { position: sticky; top: 72px; } }
/* Dinner cards are wide enough for Cook, Swap and Remove on one row. */
.meals { grid-template-columns: repeat(auto-fill, minmax(352px, 1fr)); }
@media (max-width: 760px) { .meals { grid-template-columns: 1fr; } }
/* The List tab's count sits beside its icon, not on it. */
.badge { left: calc(50% + 10px); top: 0; }
/* What's new scrolls inside, with its heading in view. */
#whatsnew[open] { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
#whatsnew-body { overflow: auto; flex: 1; min-height: 0; }

/* Round 15: radios and tick boxes are drawn with the tokens, so an unticked one reads empty in dark as in light (an
   accent dot or tick when chosen); the sign-in email box has its label; a phone's recipe filters sit tighter. */
.opt input, .swapwhere input[type=radio], input[type=checkbox] { appearance: none; -webkit-appearance: none; margin: 0; flex: none; display: inline-grid; place-items: center; background: var(--panel); border: 2px solid var(--mute); cursor: pointer; }
.opt input, .swapwhere input[type=radio] { width: 20px; height: 20px; border-radius: 50%; }
.swapwhere input[type=radio] { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.opt input::before, .swapwhere input[type=radio]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); }
.opt input:checked, .swapwhere input[type=radio]:checked { border-color: var(--accent); }
.opt input:checked::before, .swapwhere input[type=radio]:checked::before { transform: scale(1); }
input[type=checkbox] { width: 22px; height: 22px; border-radius: 6px; }
input[type=checkbox]::before { content: ""; width: 11px; height: 6px; border-left: 2.5px solid var(--accent-ink); border-bottom: 2.5px solid var(--accent-ink); transform: translateY(-1px) rotate(-45deg) scale(0); }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); }
.item input[type=checkbox] { accent-color: auto; }
#maillink { align-items: flex-end; }
#theme svg[hidden] { display: none; }
button.link.small { font-size: 13px; }
@media (max-width: 760px) {
  .filters { gap: 6px; margin-bottom: 10px; }
  .filters select { flex: 1 1 auto; padding-left: 10px; padding-right: 10px; }
  .filters .chips { display: contents; }
  .fridge { margin-bottom: 10px; padding: 6px 14px; }
  .count { margin-bottom: 8px; }
  .head { margin-bottom: 12px; }
}
