/* Hamey – styles
   Layout: one column on phones (max 720 px), sticky header on top, floating tab bar at the bottom; sidebar layout on desktop (>= 1024 px). */
:root {
  /* Main colour; each person picks it in Settings > Vzhled (data-accent on <html>). Everything else stays. */
  --accent: #6b2fe0;
  --bg: #f8f5ff;
  --surface: #ffffff;
  --surface-2: #f1ecfb;
  --ink: #241d3a;
  --muted: #6c6585;
  --line: #e9e3f5;
  --pea: var(--accent);
  --pea-ink: #ffffff;
  --pea-hi: color-mix(in srgb, var(--accent) 35%, #ffffff);
  --pea-soft: color-mix(in srgb, var(--accent) 11%, #ffffff);
  --apricot: #a86a00; --apricot-ink: #7a4d00;
  --apricot-fill: #e0a030;
  --apricot-soft: #fff0c2;
  --berry: #b4314f;
  --berry-soft: #ffe1e8;
  --mint-soft: #d6f0e3;
  --hero: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, #ffffff) 0%, #fdfbff 100%);
  --shadow: 0 1px 2px rgba(36, 29, 58, .04), 0 8px 28px rgba(36, 29, 58, .07);
  --shadow-lg: 0 12px 40px rgba(36, 29, 58, .16);
  --f-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 24px;
  --r-sm: 14px;
  --top-h: 60px;
  color-scheme: light;
}
:root[data-accent="sage"] { --accent: #2f7a4a; }
:root[data-accent="apricot"] { --accent: #c8553d; }
:root[data-accent="midnight"] { --accent: #2f4fd0; }
:root[data-accent="raspberry"] { --accent: #c8486e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120f19; --surface: #1b1725; --surface-2: #251f31; --ink: #efeaf8; --muted: #a49cb6; --line: #2f283c;
    --pea: color-mix(in srgb, var(--accent) 55%, #ffffff); --pea-ink: #140c26;
    --pea-hi: color-mix(in srgb, var(--accent) 40%, #ffffff); --pea-soft: color-mix(in srgb, var(--accent) 24%, #1b1725);
    --apricot: #f2c25a; --apricot-ink: #f2c25a; --apricot-fill: #e0a030; --apricot-soft: #3a2f14; --berry: #f28ba4; --berry-soft: #3d1f29; --mint-soft: #183026;
    --hero: linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, #1b1725) 0%, #1b1725 100%);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120f19; --surface: #1b1725; --surface-2: #251f31; --ink: #efeaf8; --muted: #a49cb6; --line: #2f283c;
  --pea: color-mix(in srgb, var(--accent) 55%, #ffffff); --pea-ink: #140c26;
  --pea-hi: color-mix(in srgb, var(--accent) 40%, #ffffff); --pea-soft: color-mix(in srgb, var(--accent) 24%, #1b1725);
  --apricot: #f2c25a; --apricot-ink: #f2c25a; --apricot-fill: #e0a030; --apricot-soft: #3a2f14; --berry: #f28ba4; --berry-soft: #3d1f29; --mint-soft: #183026;
  --hero: linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, #1b1725) 0%, #1b1725 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--f-body);
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}
body.noscroll { overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
a { color: var(--pea); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; margin: 0; text-wrap: balance; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(1.85rem, 6.5vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 3px solid var(--pea); outline-offset: 2px; border-radius: 8px; }
svg { width: 20px; height: 20px; flex: none; }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.top-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 10px; min-height: var(--top-h); padding-block: 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
.brand { display: flex; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); }
.brand svg.logo { width: 34px; height: 34px; }
.wordmark { font: 800 1.55rem/1 var(--f-display); letter-spacing: -.04em; padding-bottom: 3px; }
.who-top { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 60%; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 600; }
.who-top span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-in > .spacer { margin-left: auto; }
.childsel { margin-left: auto; border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 8px 14px; min-width: 0; font-weight: 600; font-size: .9rem; }

.wrap { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding-block: 18px 28px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap > * { min-width: 0; }

/* page heads */
.hero { display: flex; flex-direction: column; gap: 10px; padding-block: 4px; }
.hero .lead { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.hero-logo svg { width: 72px; height: 72px; filter: drop-shadow(0 8px 20px rgba(47, 122, 74, .25)); }
.hero.onboard { align-items: flex-start; padding-top: 12px; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.page-head { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.muted { color: var(--muted); }
.sm { font-size: .85rem; }
.stats { color: var(--muted); font-variant-numeric: tabular-nums; }
.stats b { color: var(--ink); }
.stats b.al { color: var(--berry); }
.meter { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--pea); border-radius: inherit; transition: width .4s ease; }
.meter.thin { height: 8px; }
.meter.over span { background: var(--apricot-fill); }

/* plan hero card with progress ring */
.hero-card { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--hero); border-radius: 24px; padding: 20px; }
.hero-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: color-mix(in srgb, var(--pea) 9%, transparent); pointer-events: none; }
.hc-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; z-index: 1; }
.hc-sub { color: var(--muted); }
.hc-sub b { color: var(--ink); }
.stat-chips { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; grid-row: 2; position: relative; z-index: 1; }
.ring { grid-column: 2; grid-row: 1; }
.sc { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px 6px 8px; border-radius: 999px; background: var(--surface); font-size: .82rem; color: var(--muted); text-decoration: none; box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
.sc b { color: var(--ink); }
.sc svg { width: 16px; height: 16px; stroke-width: 2.4; }
.sc-ok svg { color: var(--pea); }
.sc-trying svg { color: var(--apricot); }
.sc-reaction svg { color: var(--berry); }
.ring { position: relative; width: 104px; height: 104px; z-index: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: color-mix(in srgb, var(--surface) 70%, transparent); }
.ring-fg { stroke: var(--pea); stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.ring-num b { font: 800 1.35rem/1 var(--f-display); letter-spacing: -.03em; }
.ring-num span { font-size: .72rem; color: var(--muted); margin-top: 2px; }
@media (max-width: 420px) {
  .hero-card { padding: 18px 16px; }
  .ring { width: 88px; height: 88px; }
  .ring-num b { font-size: 1.15rem; }
  .hero-card h1 { font-size: 1.7rem; }
}

/* cards */
.card { background: var(--surface); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); min-width: 0; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.banner { background: var(--apricot-soft); border-radius: var(--r-sm); padding: 12px 14px; font-size: .92rem; }
.banner p { margin: 0 0 8px; } .banner p:last-child { margin: 0; } .card .banner { margin: 0; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tips { margin: 0; padding: 12px 14px 12px 32px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; font-size: .92rem; background: var(--surface-2); border-radius: var(--r-sm); }
.hint { font-size: .86rem; color: var(--muted); }
.warn { background: var(--apricot-soft); border-radius: var(--r-sm); padding: 10px 14px; font-size: .92rem; }
.empty { color: var(--muted); padding: 12px 0; }
.empty-card { align-items: flex-start; }
.disclaimer { font-size: .78rem; color: var(--muted); padding-top: 12px; margin-top: 4px; max-width: 70ch; opacity: .85; }

/* notices: trial and demo */
.trial, .notice { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; background: var(--surface); box-shadow: var(--shadow); border-radius: 16px; padding: 10px 10px 10px 16px; border-left: 4px solid var(--pea); }
.trial > div, .notice > div { display: flex; flex-direction: column; min-width: 0; flex: 1 1 180px; font-size: .92rem; line-height: 1.35; }
.trial span, .notice span { font-size: .84rem; color: var(--muted); }
.trial.expired { border-left-color: var(--apricot-fill); }
.notice.demo { border-left-color: var(--apricot-fill); }
.card .trial { box-shadow: none; background: var(--surface-2); }
.card .notice { box-shadow: none; background: var(--surface-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 9px 18px; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; min-height: 44px; transition: transform .12s ease, background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--pea) 50%, var(--line)); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--pea); border-color: var(--pea); color: var(--pea-ink); box-shadow: 0 4px 14px color-mix(in srgb, var(--pea) 30%, transparent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--berry); }
.btn.sm { padding: 6px 14px; min-height: 36px; font-size: .85rem; }
.btn.lg { min-height: 52px; padding: 12px 24px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.row.stack .btn { flex: 1 1 200px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--pea); font-weight: 600; text-decoration: underline; cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; flex: none; transition: background .15s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.sm { width: 36px; height: 36px; color: var(--muted); }
.icon-btn.sm svg { width: 17px; height: 17px; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* foods: compact rows, status buttons on the right */
.flist { display: flex; flex-direction: column; }
.frow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); position: relative; }
.flist .frow:first-child { border-top: 0; }
.fmain { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-left: 16px; position: relative; }
.fmain::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px dashed var(--muted); opacity: .6; }
.st-ok .fmain::before { background: var(--pea); border: 0; opacity: 1; }
.st-trying .fmain::before { background: var(--apricot-fill); border: 0; opacity: 1; }
.st-reaction .fmain::before { background: var(--berry); border: 0; opacity: 1; }
.fname { font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; line-height: 1.3; }
.fmeta { font-size: .8rem; color: var(--muted); }
.note { grid-column: 1 / -1; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--bg); font-size: .88rem; width: 100%; }
.seg { display: inline-flex; gap: 4px; flex: none; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 12px; height: 40px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .12s; }
.seg button:active { transform: scale(.92); }
.seg button svg { width: 17px; height: 17px; stroke-width: 2.2; }
.seg .s-ok { order: -1; }
.seg .s-ok:hover { border-color: var(--pea); color: var(--pea); }
.seg .s-trying:hover { border-color: var(--apricot-fill); color: var(--apricot); }
.seg .s-reaction:hover { border-color: var(--berry); color: var(--berry); }
.seg .s-ok[aria-pressed="true"] { background: var(--pea); border-color: var(--pea); color: var(--pea-ink); }
.seg .s-trying[aria-pressed="true"] { background: var(--apricot-fill); border-color: var(--apricot-fill); color: #fff; }
.seg .s-reaction[aria-pressed="true"] { background: var(--berry); border-color: var(--berry); color: #fff; }
@media (max-width: 640px) {
  .seg .lbl { display: none; }
  .seg button { width: 40px; padding: 0; justify-content: center; }
}
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .66rem; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; }
.tag svg { width: 12px; height: 12px; }
.tag-al { background: var(--apricot-soft); color: var(--apricot); }
.tag-lock { background: var(--surface-2); }
.cat { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--f-body); font-weight: 700; margin: 14px 0 2px; }
.catgrp { background: var(--surface); border-radius: var(--r); padding: 4px 16px 6px; box-shadow: var(--shadow); margin-bottom: 12px; }
.catgrp > .cat { margin-top: 12px; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 16px 4px; margin-inline: -16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.filters::-webkit-scrollbar { display: none; }
.pill { border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 8px 14px; font-size: .86rem; font-weight: 600; cursor: pointer; white-space: nowrap; min-height: 38px; scroll-snap-align: start; }
.pill span { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 2px; }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.pill[aria-pressed="true"] span { color: inherit; opacity: .7; }
.search { width: 100%; border: 0; box-shadow: var(--shadow); border-radius: 14px; padding: 12px 16px 12px 44px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23879088' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center / 20px; min-height: 48px; }
.search:focus-visible { outline-offset: 0; }
body[data-route="foods"] .filters { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h)); z-index: 6; background: var(--bg); padding-block: 8px; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; position: relative; }
.timeline li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline li:first-child::before { top: 22px; }
.timeline li:last-child::before { bottom: auto; height: 22px; }
.timeline li.past .tl-wk { background: var(--pea-soft); color: var(--pea); }
.timeline li.now { background: var(--pea-soft); border-radius: 16px; padding: 12px 10px; margin-inline: -10px; }
.timeline li.now::before { left: 31px; }
.timeline li.now .tl-wk { background: var(--pea); color: var(--pea-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pea) 22%, transparent); }
.tl-wk { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); align-self: start; }
.tl-wk span { font: 800 1.1rem/1 var(--f-display); color: inherit; font-variant-numeric: tabular-nums; }
.tl-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 2px; }
.tl-date { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .8rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; gap: 4px; }
.chip.st-ok { background: var(--pea-soft); border-color: transparent; color: var(--ink); }
.chip.st-trying { background: var(--apricot-soft); border-color: transparent; }
.chip.st-reaction { background: var(--berry-soft); border-color: transparent; color: var(--berry); font-weight: 600; }
.chip.st-none { border-style: dashed; color: var(--muted); }
.chip.removable button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); display: inline-grid; }
.chip.removable svg { width: 14px; height: 14px; }
.chip.own { background: var(--surface-2); border-style: dashed; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.later { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.later li { display: flex; flex-direction: column; }
.later span { color: var(--muted); font-size: .92rem; }
.later .src { font-size: .78rem; color: var(--muted); }
.rules summary { cursor: pointer; font-weight: 600; color: var(--pea); margin-bottom: 8px; }
.sources { margin: 0; padding-left: 1.1em; font-size: .88rem; display: flex; flex-direction: column; gap: 4px; }

/* forms */
.form label { font-size: .84rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: 5px; }
.form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .form select, .inline input {
  width: 100%; border: 1.5px solid transparent; border-radius: 12px; padding: 10px 14px; background: var(--surface-2); min-height: 48px; transition: border-color .15s, background .15s; }
.form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus, .form select:focus, .inline input:focus { border-color: var(--pea); background: var(--surface); outline: none; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-weight: 700; margin-bottom: 6px; font-size: .95rem; padding: 0; }
.form label.check, label.check { display: flex; align-items: flex-start; line-height: 1.4; gap: 12px; font-size: .95rem; font-weight: 500; color: var(--ink); margin: 0; cursor: pointer; min-height: 36px; }
label.check input { width: 22px; height: 22px; accent-color: var(--pea); flex: none; margin: 0; }
/* the box sits on the first line of the text, also when the text wraps */
label.check > span { padding-top: 1px; }
label.check { padding-block: 7px; }
.check.veg-alt small { display: block; margin-top: 2px; }
label.check.locked { color: var(--muted); cursor: pointer; }
label.check.locked input { pointer-events: none; }
.indent { padding-left: 34px; max-width: 280px; }
.form input[type="date"], .form input[type="time"], .head-row input[type="date"] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; font-variant-numeric: tabular-nums; }
.head-row input[type="date"] { border: 0; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; min-height: 40px; }
input::-webkit-date-and-time-value { text-align: left; }
.grid2 > *, .grid3 > * { min-width: 0; }
.confirm { background: var(--berry-soft); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.btn.danger-fill { background: var(--berry); border-color: var(--berry); color: #fff; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.span3 { grid-column: 1 / -1; }
@media (max-width: 520px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pillr { position: relative; }
.pillr input { position: absolute; opacity: 0; pointer-events: none; }
.pillr span { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: .9rem; cursor: pointer; transition: background .15s, color .15s; }
.pillr input:checked + span { background: var(--pea); color: var(--pea-ink); }
.pillr input:focus-visible + span { outline: 3px solid var(--pea); outline-offset: 2px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input { flex: 1 1 160px; }
.inline input.g { flex: 0 0 84px; }
.picker { position: relative; }
.picklist { display: none; list-style: none; margin: 6px 0 0; padding: 4px; max-height: 240px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); }
.picker.open .picklist { display: block; }
.picklist .pick { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); font: inherit; font-size: .92rem; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.picklist .pick:hover, .picklist .pick:focus-visible { background: var(--pea-soft); }
.picklist .pick-free .pick { color: var(--pea); font-weight: 700; }
.picklist .pick-none { padding: 9px 12px; font-size: .9rem; }
.form .row { margin-top: 4px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form > label { margin-bottom: -6px; }

/* meal plan generator (collapsible card) */
details.gen { padding: 0; gap: 0; }
details.gen > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; border-radius: var(--r); }
details.gen > summary::-webkit-details-marker { display: none; }
details.gen > summary > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
details.gen > summary { color: var(--ink); }
details.gen > summary b { font: 700 1.1rem/1.2 var(--f-display); letter-spacing: -.02em; }
details.gen > summary small { color: var(--muted); font-size: .84rem; }
details.gen > summary > svg { color: var(--muted); transition: transform .2s; }
details.gen[open] > summary > svg { transform: rotate(90deg); }
.gen-ic { width: 42px; height: 42px; border-radius: 14px; background: var(--pea-soft); color: var(--pea); display: grid; place-items: center; flex: none; }
details.gen > .form { padding: 0 18px 18px; }

/* meal plan */
.plan { display: flex; flex-direction: column; gap: 12px; }
.plan .actions { flex-wrap: nowrap; }
.plan .actions .btn { flex: 1 1 0; min-width: 0; padding-inline: 10px; white-space: nowrap; }
.daystrip { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h)); z-index: 6; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 16px; margin-inline: -16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.daystrip::-webkit-scrollbar { display: none; }
.dchip { flex: 1 0 46px; display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 48px; padding: 6px 8px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; line-height: 1.15; }
.dchip span { font-size: .7rem; color: var(--muted); text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.dchip b { font: 700 1.1rem/1.1 var(--f-display); }
.dchip.today { background: var(--pea); color: var(--pea-ink); }
.dchip.today span { color: inherit; opacity: .8; }
.dchip.seen:not(.today) { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); box-shadow: inset 0 0 0 2px var(--accent); }
.dchip.seen.today { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.day { background: var(--surface); border-radius: var(--r); padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); scroll-margin-top: 140px; }
.day.today { box-shadow: 0 0 0 2px var(--pea), var(--shadow); }
.day h3 { text-transform: capitalize; display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.day h3 .tag { text-transform: uppercase; background: var(--pea); color: var(--pea-ink); }
.meal { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); align-items: center; }
.mlabel { font-size: .8rem; font-weight: 700; display: flex; flex-direction: column; }
.mlabel time { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .76rem; }
.mitems { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mitem { display: flex; align-items: center; gap: 8px; }
.mitem .who { flex: none; }
.who { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; }
.who-baby { background: var(--pea-soft); color: var(--pea); }
.who-family { background: var(--apricot-soft); color: var(--apricot); }
.rlink { border: 0; background: none; padding: 4px 0; text-align: left; font-weight: 600; cursor: pointer; color: var(--ink); flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.rlink:hover { color: var(--pea); }

/* shopping list */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li + li { border-top: 1px solid var(--line); }
.checklist label { display: flex; align-items: flex-start; line-height: 1.4; gap: 12px; padding: 11px 0; cursor: pointer; min-height: 48px; }
.checklist input { width: 22px; height: 22px; accent-color: var(--pea); flex: none; margin: 0; }
.checklist .nm { flex: 1; min-width: 0; }
.checklist .amt { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; font-size: .9rem; }
.checklist label.done .nm { text-decoration: line-through; color: var(--muted); }
.card.shop { gap: 0; padding-block: 6px 6px; }
.card.shop .cat { margin-top: 10px; }

/* pricing */
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.price { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.price:first-child { border-color: var(--pea); }
.price .amount { font: 800 1.8rem/1 var(--f-display); letter-spacing: -.03em; }
.price .amount small { font-size: .88rem; color: var(--muted); font-family: var(--f-body); font-weight: 500; letter-spacing: 0; }
.price ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; font-size: .92rem; flex: 1; }
.price .btn { align-self: stretch; }
.pkg-hero { background: var(--pea); color: var(--pea-ink); border-radius: var(--r); padding: 18px 20px; margin: 12px 0 4px; }
.pkg-hero .eyebrow { color: inherit; opacity: .85; margin: 0 0 4px; }
.pkg-hero h3 { font: 800 1.7rem/1.1 var(--f-display); letter-spacing: -.02em; margin: 0 0 6px; }
.pkg-hero p { margin: 0; line-height: 1.45; }
.pay-opts { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.pay-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; width: 100%; min-height: 56px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pay-opt.on { border: 2px solid var(--pea); background: var(--pea-soft); }
.pay-opt > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.pay-opt small { color: var(--muted); font-size: .84rem; }
.tag-save { background: var(--mint-soft); color: var(--ink); }
.pkg-alt { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.pkg-alt-btn { display: flex; flex-direction: column; gap: 2px; min-height: 52px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pkg-alt-btn small { color: var(--muted); font-size: .84rem; }
.who-form .who-opt { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; margin: 0 0 8px; }
.who-form .who-opt.on { border-color: var(--pea); box-shadow: inset 0 0 0 1px var(--pea); background: var(--pea-soft); }
.who-form .who-opt input { width: 22px; height: 22px; accent-color: var(--pea); margin: 0; flex: none; }
.who-form .who-opt span { display: flex; flex-direction: column; gap: 2px; }
.who-form .who-opt small { color: var(--muted); font-size: .88rem; }
.ok-line { color: var(--pea); font-weight: 700; }
.upsell { background: var(--hero); }

/* adults */
.tgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--surface-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.tile b { font: 800 1.35rem/1.1 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tile span { font-size: .78rem; color: var(--muted); }
.nbar { display: flex; flex-direction: column; gap: 4px; }
.nb-top { display: flex; justify-content: space-between; font-size: .85rem; font-variant-numeric: tabular-nums; }
.dlist { list-style: none; margin: 0; padding: 0; }
.dlist li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.dlist li span:first-child { flex: 1; min-width: 0; }
.num { font-variant-numeric: tabular-nums; color: var(--muted); }
.favs, .rlist { list-style: none; margin: 0; padding: 0; }
.favs li, .rlist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.star.on { color: var(--apricot-fill); }
.star.on svg { fill: currentColor; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
#tlist td:not(:first-child), #tlist th:not(:first-child) { text-align: right; }
details summary { cursor: pointer; font-weight: 600; color: var(--pea); }
/* nutrient facts (recipe, diary, food table) and own recipe editor */
details.nutd { margin: 12px 0; }
.nfacts { margin: 0; display: grid; gap: 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
.nfacts div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.nfacts div.sub { padding-left: 14px; color: var(--muted); font-size: .85rem; }
.nfacts dt { margin: 0; } .nfacts dd { margin: 0; font-weight: 600; white-space: nowrap; }
.tdetail td { background: color-mix(in srgb, var(--pea) 5%, transparent); padding: 4px 12px 10px; }
#tlist .tdetail td { text-align: left; }
#tlist .rlink { text-align: left; }
.tsearch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tsearch .search { flex: 1 1 180px; margin: 0; }
.tsearch select { flex: 0 1 auto; width: auto; }
.chk-row { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.irows { display: flex; flex-direction: column; gap: 8px; }
.irow { display: flex; align-items: center; gap: 8px; }
.irow input[name="if"] { flex: 1; min-width: 0; }
.irow .g, .redit .irow .g { width: 76px; max-width: 76px; flex: none; }
.redit .g { max-width: 110px; }
.redit #rsum { margin: 4px 0 6px; }
details[open] summary { margin-bottom: 10px; }
details.gen[open] > summary { margin-bottom: 0; }
.childrow { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.childrow:first-of-type { border-top: 0; }
.addchild { display: flex; flex-direction: column; gap: 10px; border-top: 1px dashed var(--line); padding-top: 12px; align-items: flex-start; }
.addchild .grid3 { width: 100%; }

/* bottom tab bar (floating) */
.tabs { position: fixed; left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 26px; box-shadow: var(--shadow-lg); max-width: 560px; margin: 0 auto; }
.tabs-in { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px 6px; }
.no-baby .tabs a[data-tab="plan"], .tabs a[hidden] { display: none; }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: .74rem; font-weight: 600; color: var(--muted); text-decoration: none; text-align: center; border-radius: 18px; transition: color .15s; }
.tabs a svg { width: 24px; height: 24px; padding: 3px 0; width: 52px; height: 30px; border-radius: 999px; transition: background .2s; }
.tabs a[aria-current="page"] { color: var(--pea); }
.tabs a[aria-current="page"] svg { background: var(--pea-soft); stroke-width: 2.2; }
.tabs a[aria-current="page"] span { font-weight: 800; }

/* modal and print sheet */
.modal, .sheet { position: fixed; inset: 0; z-index: 40; background: rgba(15, 22, 17, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; }
.modal-card { background: var(--surface); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; border-radius: 26px 26px 0 0; padding: 26px 20px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; position: relative; animation: rise .25s ease; }
.modal-card::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { .modal { align-items: center; } .modal-card { border-radius: 26px; } .modal-card::before { display: none; } }
.modal-card h2 { padding-right: 40px; font-size: 1.5rem; }
.modal-card .close { position: absolute; top: 12px; right: 12px; background: var(--surface-2); }
.modal-card h3 { margin-top: 8px; }
.ingr { list-style: none; margin: 0; padding: 0; }
.ingr li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ingr b { font-variant-numeric: tabular-nums; }
.nut { font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.nut-me { color: var(--ink); margin-bottom: 2px; }
.nut-me b { font-weight: 600; }
.modal-card .btn { align-self: flex-start; }
.sheet { align-items: stretch; flex-direction: column; background: var(--surface-2); overflow-y: auto; backdrop-filter: none; }
.sheet-bar { position: sticky; top: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface); border-bottom: 1px solid var(--line);
  padding-block: calc(10px + env(safe-area-inset-top, 0px)) 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.spacer { flex: 1; }
.sheet-doc { background: #fff; color: #1a1a1a; width: min(210mm, calc(100% - 32px)); margin: 16px auto 40px; padding: 14mm 12mm; box-shadow: 0 2px 20px rgba(0,0,0,.12); font-size: 11pt; line-height: 1.4; }
.sheet-doc h1 { font-size: 22pt; color: #23542a; }
.sheet-doc h2 { font-size: 15pt; margin: 18px 0 6px; color: #23542a; }
.sheet-doc h3 { font-size: 11.5pt; margin: 8px 0 4px; }
.sheet-doc .sub { color: #555; margin-bottom: 12px; }
.sheet-doc table { font-size: 9.5pt; }
.sheet-doc th, .sheet-doc td { border: 1px solid #c9d3c6; vertical-align: top; color: #1a1a1a; }
.sheet-doc th { background: #eef3ec; color: #333; }
.sheet-doc td.notes { width: 28%; }
.sheet-doc .pf { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; }
.box { display: inline-block; width: 11px; height: 11px; border: 1.3px solid #333; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.box.on { background: #23542a; border-color: #23542a; }
.sheet-doc ul { padding-left: 1.2em; }
.sheet-doc ul.plain { list-style: none; padding: 0; margin: 0; }
.sheet-doc ul.plain li { padding: 3px 0; border-bottom: 1px dotted #ccc; }
.sheet-doc .cols { columns: 2 200px; column-gap: 24px; }
.sheet-doc .grp { break-inside: avoid; margin-bottom: 10px; }
.sheet-doc .recipes { columns: 2 220px; column-gap: 20px; }
.sheet-doc .rc { break-inside: avoid; margin-bottom: 10px; font-size: 9.5pt; }
.sheet-doc .rc small { color: #777; font-weight: 400; }
.sheet-doc .disc { margin-top: 18px; font-size: 8.5pt; color: #666; border-top: 1px solid #ddd; padding-top: 8px; }
.sheet-doc .copytext { white-space: pre-wrap; font: 11pt/1.5 var(--f-body); user-select: all; }
.sheet-doc .menu td { width: auto; }

.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-size: .9rem; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); text-align: center; box-shadow: var(--shadow-lg); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

@media print {
  body { background: #fff; padding: 0 !important; }
  body::before, .top, .tabs, .wrap, .toast, .modal, .sheet-bar { display: none !important; }
  .sheet { position: static; background: #fff; overflow: visible; display: block; }
  .sheet-doc { box-shadow: none; margin: 0; padding: 0; width: auto; }
  .sheet-doc .pb { break-before: page; }
  .sheet-doc tr { break-inside: avoid; }
  @page { size: A4; margin: 12mm; }
}

/* account and lock */
.auth { gap: 10px; }
.btn.social { justify-content: center; width: 100%; min-height: 52px; font-size: 1rem; }
.btn.social svg { width: 20px; height: 20px; }
.btn.social.apple { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.social.google { background: var(--surface); }
.btn.social.facebook { background: #1877f2; border-color: #1877f2; color: #fff; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin-block: 6px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth .filters { margin-inline: 0; padding-inline: 0; }
.auth .pill { box-shadow: none; background: var(--surface-2); }
.auth .pill[aria-pressed="true"] { background: var(--ink); }
.auth .form { display: flex; flex-direction: column; gap: 8px; }
.auth .form .btn { align-self: stretch; margin-top: 6px; }
.acct { display: flex; align-items: center; gap: 12px; }
.avatar { width: 48px; height: 48px; border-radius: 999px; background: var(--pea-soft); color: var(--pea); display: grid; place-items: center; font: 800 1.4rem/1 var(--f-display); flex: none; }
.avatar.xs { width: 30px; height: 30px; font-size: .9rem; background: var(--pea); color: var(--pea-ink); }
.tag-on { background: var(--pea-soft); color: var(--pea); }
.lock { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: grid; place-items: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.lock-in { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; max-width: 360px; width: 100%; }
.lock-in .hero-logo svg { width: 88px; height: 88px; }
.lock-in .inline { width: 100%; justify-content: center; }

/* trial and purchases */
.trialnote { background: #fff4e5; color: #6b3d0f; border: 1px solid #f0c48f; border-radius: 8px; padding: 8px 10px; font-size: 10pt; margin-bottom: 12px; }
.pillr.locked span { opacity: .55; cursor: not-allowed; }
.pillr.locked svg { width: 14px; height: 14px; }
.lockchip { cursor: pointer; font: inherit; font-size: .8rem; }
.lockchip svg { width: 13px; height: 13px; }
.modal-card.wide { max-width: 780px; }

/* catch-up step for a later start: mark foods already introduced */
.catchup-bar { position: sticky; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 5; display: flex; gap: 8px; padding: 8px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); }
.catchup-bar .btn.primary { flex: 1 1 auto; min-width: 0; }
.catchup-bar .btn:not(.primary) { flex: none; }
.catchup-bar .btn { padding-left: 10px; padding-right: 10px; font-size: 15px; }


/* ---------- layout: phone (default) ---------- */
.side-only { display: none !important; }
.cols, .col-main, .col-side, .masonry { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cols > * > *, .masonry > * { min-width: 0; }
.m-late { order: 1; }
@media (max-width: 1023px) {
  .cols { display: flex; }
  .col-main, .col-side { display: contents; }
  /* on phones the generator comes right after the plan header */
  .menu-cols .gen { order: -1; }
}

/* ---------- layout: desktop ---------- */
@media (min-width: 1024px) {
  body { padding-bottom: 0; padding-left: 260px; }
  .side-only { display: flex !important; }
  .top { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; position: static; }
  .top .brand { display: none; }
  .top-in, .wrap { max-width: 1200px; padding-inline: 40px; }
  .top-in { padding-top: 20px; min-height: 0; }
  .wrap { padding-block: 8px 48px; gap: 20px; }
  .narrow, body[data-route="account"] .wrap > * { width: 100%; max-width: 720px; }
  .narrow { display: flex; flex-direction: column; gap: 16px; }
  .daystrip { display: none; }
  body[data-route="foods"] .filters { position: static; background: none; padding: 2px 0; margin: 0; }

  /* sidebar instead of the bottom tab bar */
  .tabs { inset: 0 auto 0 0; width: 260px; max-width: none; margin: 0; border: 0; border-radius: 0; border-right: 1px solid var(--line); box-shadow: none; background: var(--surface);
    padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; overflow-y: auto; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tabs a.brand { flex-direction: row; align-items: center; gap: 5px; padding: 4px 12px; color: var(--ink); }
  .tabs a.brand svg.logo { width: 38px; height: 38px; padding: 0; border-radius: 0; background: none; }
  .tabs a.brand .wordmark { font-size: 1.7rem; }
  .top .icon-btn[href="#settings"] { display: none; }
  .tabs-in { display: flex; flex-direction: column; gap: 4px; max-width: none; margin: 0; height: 100%; padding: 0; }
  .tabs-in a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; border-radius: 14px; font-size: .97rem; text-align: left; color: var(--ink); }
  .tabs-in a svg, .tabs-in a[aria-current="page"] svg { width: 22px; height: 22px; padding: 0; margin: 0; border-radius: 0; background: none !important; color: inherit; box-shadow: none; }
  .tabs-in a:hover { background: var(--surface-2); }
  .tabs-in a[aria-current="page"] { background: var(--pea-soft); color: var(--pea); }
  .tabs-in a.side-only[data-tab="settings"] { margin-top: auto; }

  /* hero */
  .hero-card { padding: 28px 32px; grid-template-columns: minmax(0, 1fr) auto; }
  .hero-card h1 { font-size: 2.6rem; }
  .ring { width: 132px; height: 132px; }
  .ring-num b { font-size: 1.7rem; }
  .stat-chips { grid-column: 1; margin-top: -6px; }
  .ring { grid-row: 1 / span 2; align-self: center; }

  /* two columns */
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .cols > .col-main { grid-column: 1; grid-row: 1; }
  .cols > .col-side { grid-column: 2; grid-row: 1; }
  .m-late { order: 0; }
  .menu-cols { grid-template-columns: minmax(0, 1fr) 360px; }
  .menu-cols > .col-side { position: sticky; top: 20px; }
  .menu-cols .plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
  .menu-cols .plan > .head-row, .menu-cols .plan > .row { grid-column: 1 / -1; }
  .plan .actions .btn { flex: 0 0 auto; }

  /* cards in two columns (settings, shopping list, family, catch-up) */
  .masonry { display: block; column-count: 2; column-gap: 20px; }
  .masonry > * { break-inside: avoid; margin-bottom: 20px; width: 100%; }
  #flist { column-count: 2; column-gap: 20px; }
  #flist .catgrp { break-inside: avoid; margin-bottom: 20px; }
  #flist .empty { column-span: all; }

  .toast { bottom: 28px; left: calc(50% + 130px); }
  .catchup-bar { bottom: 16px; }
  .filters { flex-wrap: wrap; overflow: visible; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .menu-cols { grid-template-columns: minmax(0, 1fr) 320px; }
  .seg .lbl { display: none; }
  .seg button { width: 40px; padding: 0; justify-content: center; }
}
@media (min-width: 1200px) {
  #flist .seg .lbl { display: none; }
  #flist .seg button { width: 40px; padding: 0; justify-content: center; }
}

/* Recipe catalogue, diet tags and recipe photos */
.tag-diet { background: var(--pea-soft); color: var(--pea); }
.catalog .seg { display: flex; gap: 8px; }
.catalog .seg button, .catalog .seg button.pill { width: auto; flex: 1; padding: 0 14px; justify-content: center; }
.modal-card > .head-row { padding-right: 52px; flex-wrap: wrap; gap: 8px; }
.catalog .filters { margin: 0; padding: 2px 0 4px; flex-wrap: wrap; overflow: visible; }
.catalog .filters.meals .pill { min-height: 34px; padding: 6px 12px; font-size: .82rem; box-shadow: none; background: var(--surface-2); }
.catalog .filters.meals .pill[aria-pressed="true"] { background: var(--ink); }
.catalog .rlist li .rlink { flex: 1; text-align: left; }
.catalog .rlist .muted.sm { font-size: .78rem; text-align: right; }
.catalog h3 .muted { font-weight: 500; font-size: .85rem; }
.linkbtn.back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; }
.linkbtn.back svg { width: 16px; height: 16px; }
.rphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.rphotos figure { margin: 0; position: relative; }
.rthumb { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.rthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rdel { position: absolute; top: 4px; right: 4px; background: var(--surface); }
.rdel.armed { background: var(--apricot); color: #fff; }
.rphoto-big img { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 16px; background: var(--surface-2); }
.photo-add { cursor: pointer; }
.diet { border: 0; padding: 0; margin: 10px 0 0; }
.diet .pills { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.rphotos figcaption { display: flex; align-items: center; gap: 6px; margin-top: 4px; min-width: 0; }
.rphotos figcaption .muted { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.like { display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 4px 10px; min-height: 32px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.like svg { width: 16px; height: 16px; }
.like.on { background: var(--berry-soft); color: var(--berry); }
.like.on svg { fill: currentColor; }
.rphotos { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); counter-increment: rank; }
.rank li::before { content: counter(rank) "."; min-width: 1.8em; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank li .rlink { flex: 1; text-align: left; }
.rank .muted.sm { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.rank .muted.sm svg { width: 13px; height: 13px; }

/* Picking a recipe for one meal of the plan */
.mitem .icon-btn.sm + .icon-btn.sm { margin-left: -4px; }
.catalog.picking .rlist li { flex-wrap: wrap; row-gap: 2px; }
.catalog.picking .rlist li .rlink { flex: 1 1 60%; }
.catalog.picking .rlist .muted.sm { order: 5; flex-basis: 100%; text-align: left; }
.catalog.picking .rlist li.current { background: var(--surface-2); border-radius: 12px; padding-left: 8px; padding-right: 8px; }
.pick-this { margin: 4px 0 12px; }

/* Appearance: main colour picker, credit */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; margin-top: 10px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px 10px; border: 0; border-radius: 18px; background: var(--surface-2); color: var(--ink); font: 600 .85rem/1.2 var(--f-body); cursor: pointer; }
.swatch .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--c); display: grid; place-items: center; color: #fff; }
.swatch .dot svg { width: 18px; height: 18px; opacity: 0; }
.swatch[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--pea); background: var(--pea-soft); }
.swatch[aria-pressed="true"] .dot svg { opacity: 1; }
.credit { display: flex; justify-content: center; padding: 8px 16px 24px; }
.credit a, .about-credit { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; font-weight: 600; text-decoration: none; }
.credit img { height: 16px; width: auto; display: block; }
.about-credit img { height: 22px; width: auto; display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .credit img, :root:not([data-theme="light"]) .about-credit img { filter: invert(1) hue-rotate(180deg); } }
:root[data-theme="dark"] .credit img, :root[data-theme="dark"] .about-credit img { filter: invert(1) hue-rotate(180deg); }

/* ---------- Shared household ---------- */
.hh-members { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.hh-members li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); }
.hh-code { display: grid; gap: 4px; margin: 12px 0; padding: 14px; border-radius: 16px; border: 1px dashed var(--line); }
.hh-code b { font-size: 1.5rem; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.hh-note { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
#household h3 { margin: 16px 0 6px; font-size: 1rem; }
.shop-extra form { margin-bottom: 8px; }
.shop-extra .checklist li { display: flex; align-items: center; gap: 6px; }
.shop-extra .checklist li label { flex: 1; min-width: 0; }
.shop-extra .icon-btn.sm { flex: 0 0 auto; }

/* pull to refresh (installed app) */
#ptr { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 6px); left: 50%; z-index: 60; width: 40px; height: 40px; padding: 9px; border-radius: 50%;
  background: var(--surface); color: var(--pea); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transform: translate(-50%, -50px); display: none; }
#ptr.on { display: block; }
#ptr:not(.on) { transition: transform .2s, opacity .2s; }
#ptr.ready { background: var(--pea); color: var(--pea-ink); }
#ptr.spin svg { animation: ptr-spin .8s linear infinite; }
#ptr svg { width: 22px; height: 22px; display: block; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* menus of household members */
.plan-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.plan-tabs button { height: 38px; font-size: .9rem; font-weight: 700; }
.plan-tabs button.on { background: var(--pea); border-color: var(--pea); color: var(--pea-ink); }

/* baby health */
.hwrap { display: flex; flex-direction: column; gap: 14px; max-width: 720px; padding-bottom: 70px; }
.htoggle { margin: 0; }
.hstrip { display: flex; align-items: center; gap: 6px; }
.hdays { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.hday { border: 0; background: var(--surface); color: var(--ink); border-radius: 14px; padding: 7px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; min-width: 0; }
.hday span:first-child { font-size: .66rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.hday b { font-size: 1rem; line-height: 1.1; }
.hday.today { box-shadow: inset 0 0 0 1.5px var(--pea-hi); }
.hday.on { background: var(--pea); color: var(--pea-ink); }
.hday.on span:first-child { color: inherit; opacity: .85; }
.hday.visit:not(.on) { box-shadow: inset 0 0 0 2px #e0a020; }
.hdots { display: flex; gap: 3px; height: 5px; }
.hdots i, .hlegend i { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.hd-med { background: var(--pea); } .hday.on .hd-med { background: var(--pea-ink); }
.hd-visit { background: #e0a020; } .hd-vacc { background: #2fa36b; } .hd-temp { background: #e0566b; }
.hlegend { display: flex; flex-wrap: wrap; gap: 14px; margin: -6px 4px 0; font-size: .78rem; font-weight: 700; color: var(--muted); }
.hlegend i { width: 7px; height: 7px; margin-right: 5px; }
.hmonth .head-row { align-items: center; }
.hmonth h2 { flex: 1; text-align: center; text-transform: capitalize; font-size: 1.05rem; }
.hgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hgrid .hday { padding: 8px 0 6px; background: none; }
.hgrid .hday.on { background: var(--pea); }
.hwd span { text-align: center; font-size: .7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; padding: 6px 0 2px; }
.hnext { background: var(--pea); color: var(--pea-ink); border-radius: 24px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.hnext .hic { background: rgba(255,255,255,.18); color: inherit; width: 48px; height: 48px; border-radius: 16px; }
.hnext small { display: block; font-size: .72rem; font-weight: 700; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.hnext b { display: block; font-size: 1.1rem; }
.hnext span span { font-size: .85rem; font-weight: 600; opacity: .9; }
.hic { width: 38px; height: 38px; border-radius: 12px; background: var(--pea-soft); color: var(--pea); display: grid; place-items: center; flex: none; }
.hic svg { width: 20px; height: 20px; }
.hic-visit { background: #fff1d6; color: #b07a10; } .hic-vacc { background: #dcf3e7; color: #23794f; } .hic-temp { background: #fde3e7; color: #b8334a; }
.hrow, .hdose { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.hrow:first-of-type, .hdose:first-of-type { border-top: 0; }
.hmain, .hdose > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hmain small, .hdose small { color: var(--muted); font-size: .8rem; font-weight: 600; }
.hright { color: var(--muted); font-size: .8rem; font-weight: 700; white-space: nowrap; display: inline-flex; }
.hright svg { width: 16px; height: 16px; }
.hdose > b { width: 46px; font-size: .9rem; flex: none; }
.hdose input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--pea); flex: none; }
.hdose.done > span b { text-decoration: line-through; color: var(--muted); }
.hrow .confirm { flex-basis: 100%; }
.hrow { flex-wrap: wrap; }
.fab { position: fixed; right: 18px; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); z-index: 15; border: 0; border-radius: 999px; background: var(--pea); color: var(--pea-ink); font: inherit; font-weight: 800; padding: 14px 20px; display: flex; gap: 8px; align-items: center; box-shadow: 0 8px 24px color-mix(in srgb, var(--pea) 35%, transparent); cursor: pointer; }
.fab svg { width: 20px; height: 20px; stroke-width: 2.6; }
@media (min-width: 1024px) { .fab { bottom: 28px; right: 32px; } }
.hchoose { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hchoose .btn { justify-content: flex-start; height: auto; padding: 14px; }
.hf { display: flex; flex-direction: column; gap: 6px; }
.hf > span { font-weight: 700; font-size: .88rem; }
.htimes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.htoggle { align-self: flex-start; }
.seg.plan-tabs button { width: auto; padding: 0 16px; flex: none; }

/* nutrient balance of a menu */
.balance { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 10px; font-size: .82rem; color: var(--muted); }
.balance b { color: var(--ink); }
#tlist .rlink { overflow-wrap: normal; word-break: normal; hyphens: auto; }
#tlist td, #tlist th { padding: 8px 5px; }
#tlist td:first-child { padding-left: 0; }

/* ---------- UX review 2026-10-17: Příkrmy switch, one status button, compact menu, add fields ---------- */
.seg2 { display: flex; background: var(--surface); border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.seg2 a { flex: 1; text-align: center; padding: 10px 0; border-radius: 999px; font-weight: 700; font-size: .92rem; color: var(--ink); text-decoration: none; }
.seg2 a[aria-current="page"] { background: var(--pea); color: var(--pea-ink); }
.stbtn { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 8px 12px; min-height: 38px; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; white-space: nowrap; background: var(--surface-2); color: var(--ink); }
.stbtn svg { width: 16px; height: 16px; stroke-width: 2.6; }
.stbtn.s-ok { background: var(--pea); color: var(--pea-ink); }
.stbtn.s-trying { background: var(--apricot-soft); color: var(--apricot); }
.stbtn.s-reaction { background: color-mix(in srgb, var(--berry) 14%, var(--surface)); color: var(--berry); }
.stchoice { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 2px 16px; }
.stchoice button { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 9px 4px; font: inherit; font-size: .84rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.stchoice button svg { width: 18px; height: 18px; }
.stchoice .s-ok[aria-pressed="true"] { background: var(--pea); border-color: var(--pea); color: var(--pea-ink); }
.stchoice .s-trying[aria-pressed="true"] { background: var(--apricot-fill); border-color: var(--apricot-fill); color: #fff; }
.stchoice .s-reaction[aria-pressed="true"] { background: var(--berry); border-color: var(--berry); color: #fff; }
.stchoice .s-clear { flex: 0 0 auto; justify-content: center; color: var(--muted); padding-inline: 12px; }
.menu-head { gap: 8px; }
.menu-head h1 { flex: 1; }
.icon-btn.boxed { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); }
.icon-btn.boxed.primary { background: var(--pea); color: var(--pea-ink); }
.icon-btn.boxed svg { width: 21px; height: 21px; }
.plan-range { flex-wrap: wrap; align-items: baseline; }
details.balance { font-size: .85rem; color: var(--muted); }
details.balance summary { color: var(--pea); font-weight: 700; font-size: .85rem; }
details.balance p { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 0; }
.meal { display: block; padding: 10px 0 4px; }
.mlabel { display: flex; flex-direction: row; align-items: baseline; gap: 8px; font-size: .9rem; margin-bottom: 2px; }
.mitems { gap: 0; }
.mitem { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0 8px; }
.mitem + .mitem { border-top: 1px dashed var(--line); }
.mitem .rlink { font-size: 1rem; padding: 2px 0; overflow-wrap: normal; hyphens: auto; }
.mitem.baby .rlink { color: var(--pea); }
.mmeta { display: flex; align-items: center; gap: 16px; margin-top: 2px; }
.mmeta > :first-child { margin-right: auto; }
.mmeta .linkbtn { font-size: .84rem; font-weight: 700; color: var(--muted); padding: 6px 0; text-decoration: none; }
.mmeta .linkbtn:hover { color: var(--pea); }
.mitem .icon-btn.sm + .icon-btn.sm { margin-left: 0; }
form.addf { flex-wrap: nowrap; gap: 0; background: var(--surface-2); border-radius: 14px; padding: 4px 4px 4px 0; }
form.addf input { background: transparent; border: 0; box-shadow: none; min-width: 0; }
form.addf input:focus { outline: none; }
form.addf:focus-within { box-shadow: 0 0 0 2px var(--pea); }
.addbtn { flex: none; width: 42px; height: 42px; border: 0; border-radius: 11px; background: var(--pea); color: var(--pea-ink); display: grid; place-items: center; cursor: pointer; }
.addbtn svg { width: 20px; height: 20px; stroke-width: 2.6; }
.actsheet h2 { margin-bottom: 8px; }
.actrow { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: none; padding: 14px 4px; border-top: 1px solid var(--line); font: inherit; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.actrow svg { width: 22px; height: 22px; color: var(--pea); flex: none; }
.actrow span { display: flex; flex-direction: column; }
.actrow small { color: var(--muted); font-size: .84rem; }
@media (max-width: 1023px) {
  .menu-cols .gen.gen-closed { display: none; }
  .credit { display: none; }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); font-size: .86rem; padding: 9px 16px; }
  body[data-route="plan"] .hero-card { margin-top: 2px; }
}
@media (min-width: 1024px) { .seg2 { max-width: 420px; } }
.stbtns { display: flex; align-items: center; gap: 6px; }
.stquick { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--pea); background: var(--surface); color: var(--pea); border-radius: 999px; padding: 7px 12px; min-height: 38px; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.stquick svg { width: 16px; height: 16px; stroke-width: 2.6; }
.stbtn.more { width: 38px; padding: 0; justify-content: center; }
/* touch targets: at least 40 px for small icon buttons and inline text actions */
.icon-btn.sm { width: 40px; height: 40px; }
.mmeta .linkbtn { min-height: 40px; display: inline-flex; align-items: center; }
fieldset.diet .pills { flex-direction: column; align-items: flex-start; gap: 0; }
.card.shop.shop-extra .cat { margin: 2px 0 14px; }
.shop-extra form.addf + .checklist, .shop-extra form.addf + p { margin-top: 10px; }
/* menu rows: who eats it, the dish, and its options behind one button */
.mitem { flex-direction: row; align-items: center; gap: 10px; padding: 6px 0; }
.mitem .rlink { flex: 1 1 auto; }
.mitem > .icon-btn.sm { margin-right: -8px; color: var(--muted); }
.mitem .mempty { flex: 1; font-size: .92rem; }
.mitem > .linkbtn { font-size: .84rem; font-weight: 700; text-decoration: none; }
.avs { display: flex; flex: none; padding-right: 6px; }
.avs .av { margin-right: -6px; box-shadow: 0 0 0 2px var(--surface); }
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .74rem; font-weight: 800; flex: none; }
.av-baby { background: var(--pea-soft); color: var(--pea); }
.av-amber { background: var(--apricot-soft); color: var(--apricot); }
.av-teal { background: var(--mint-soft); color: #1f7a6a; }
.av-coral { background: var(--berry-soft); color: var(--berry); }
.av-blue { background: #e1ecff; color: #2d5bb8; }
.av-rose { background: #fde2f1; color: #a2346f; }
.who-chips .pill { display: inline-flex; align-items: center; gap: 6px; }
.who-chips .pill .av { width: 20px; height: 20px; font-size: .64rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av-teal { color: #7fd8c4; } :root:not([data-theme="light"]) .av-blue { background: #1c2a45; color: #9dbcff; } :root:not([data-theme="light"]) .av-rose { background: #3b1d2e; color: #f3a6cf; } }
:root[data-theme="dark"] .av-teal { color: #7fd8c4; }
:root[data-theme="dark"] .av-blue { background: #1c2a45; color: #9dbcff; }
:root[data-theme="dark"] .av-rose { background: #3b1d2e; color: #f3a6cf; }
/* recipe catalog: the search stays on top while the list scrolls */
.catalog .rsearch-bar { position: sticky; top: -26px; z-index: 3; flex: none; margin: 0 -20px; padding: 8px 20px 10px; background: var(--surface); }
.catalog .rsearch-bar .search { margin: 0; }
/* start screen: sign-in first, try-out without an account below */
.btn.soft { background: var(--pea-soft); color: var(--pea); border-color: transparent; font-weight: 800; }
.start-login { display: flex; flex-direction: column; }
.start-login h2 { margin: 0 0 2px; }
.start-login .hint { text-align: center; margin: 2px 0 0; }
.warn.tryout { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.warn.tryout svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.onboard + .start-login, .start-login + .or { margin-top: 12px; }
.warn.tryout + .btn, .warn.tryout + form { margin-top: 12px; }
/* home: what the full version and the extensions bring */
.upsell h2 { margin: 2px 0 0; }
.upsell .eyebrow { color: var(--pea); }
.upsell .eyebrow.ext-head { color: var(--muted); margin: 14px 0 2px; }
.ticks { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ticks li { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; line-height: 1.35; }
.ticks svg { width: 17px; height: 17px; flex: none; color: var(--pea); margin-top: 1px; }
.ext-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; padding: 10px 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.ext-row > span:nth-child(2) { flex: 1; min-width: 0; line-height: 1.3; }
.ext-row .muted.sm { font-size: .84rem; }
.ext-row small { color: var(--muted); font-weight: 700; }
.ext-row > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.ext-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--pea-soft); color: var(--pea); display: grid; place-items: center; flex: none; }
.ext-ic svg { width: 19px; height: 19px; }
.btn.social.soon, .btn.social.soon:hover { background: var(--surface-2); border-color: var(--line); color: var(--muted); opacity: 1; cursor: default; }
.btn.social.soon svg { filter: grayscale(1); opacity: .5; }
.btn.social.soon small { margin-left: 6px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
/* Fit: body log */
.body-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 6px; }
.body-now .muted { flex-basis: 100%; }
.body-now b { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.body-now b small { font-size: 1rem; }
.body-diff { color: var(--pea); font-weight: 800; font-size: .85rem; }
.body-chart { display: block; width: 100%; height: 120px; margin-top: 8px; overflow: visible; }
.body-chart .area { fill: var(--pea); opacity: .1; }
.body-chart .line { fill: none; stroke: var(--pea); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.body-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 2px; }
.body-empty { margin: 10px 0; }
.body-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.body-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; border-radius: 16px; background: var(--surface-2); padding: 10px 12px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.body-tile[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--pea); background: var(--surface); }
.body-tile span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.body-tile b { font-size: 1.25rem; font-weight: 800; }
.body-tile b small { font-size: .78rem; color: var(--muted); }
.body-tile.static { cursor: default; }
.body-tile .body-diff { font-size: .76rem; }
.body-hist { list-style: none; margin: 10px 0 0; padding: 0; }
.body-hist li { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 2px 0; font-size: .92rem; }
.body-hist li span { flex: 1; color: var(--muted); }
.body-form { display: flex; flex-direction: column; gap: 6px; }
.body-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.body-row label { flex: 1; margin: 0; font-weight: 700; }
.body-row label small { display: block; font-weight: 600; color: var(--muted); font-size: .76rem; }
.unit-in { position: relative; width: 112px; flex: none; }
.unit-in input { width: 100%; padding-right: 38px; }
.unit-in i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .82rem; color: var(--muted); pointer-events: none; }

/* finishing solids and the children overview in Rodina */
.finish-card { box-shadow: inset 0 0 0 2px var(--accent); }
.finish-card .finish-ic { font-size: 1.9rem; margin: 0; }
.finish-card h2 { margin: 4px 0 6px; }
.finish-card .btn { margin-top: 12px; }
.finish-list { list-style: none; padding: 0; margin: 4px 0 8px; }
.finish-list li { display: flex; gap: 10px; padding: 6px 0; line-height: 1.4; }
.finish-list li svg { flex: none; width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.modal-card .btn.soft.block { margin-top: 8px; }
.kid-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.kids-card h2 + .kid-row { border-top: 0; }
.kid-row > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kid-row small { color: var(--muted); font-size: .85rem; }
.kid-row > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.kid-row .avatar { width: 38px; height: 38px; font-size: 1rem; }
.kid-row .avatar.add svg { width: 20px; height: 20px; }

/* ticking off eaten meals (Fit): counted into the intake diary */
.ate-btn { flex: none; width: 30px; height: 30px; margin: 0 2px 0 4px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; position: relative; }
.ate-btn::before { content: ""; position: absolute; inset: -7px; }
.ate-btn svg { width: 16px; height: 16px; stroke-width: 3; }
.ate-btn[aria-pressed="true"] { background: var(--pea); border-color: var(--pea); color: var(--pea-ink); }
.mitem.eaten .rlink { color: var(--muted); }
.day h3 .day-kcal { margin-left: auto; font: 700 .8rem/1.2 var(--f-body, inherit); text-transform: none; color: var(--pea); text-decoration: none; white-space: nowrap; }
/* recipe cover photo above the dish name */
.rphoto-big.cover { margin: 0 0 12px; }
.rphoto-big.cover img { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: 280px; object-fit: cover; }
/* photo moderation for admins */
.mod-list { list-style: none; padding: 0; margin: 0; }
.mod-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.mod-list img { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.mod-list span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mod-list small { color: var(--muted); font-size: .84rem; }
/* "everyone eats the same" and per-member portions */
.check.same-all { background: var(--pea-soft); border-radius: 14px; padding: 10px 12px; margin-bottom: 6px; }
.check.same-all small { display: block; }
.portions { margin: 2px 0 8px; font-size: .9rem; color: var(--muted); }
.portions b { color: var(--ink); }
.por-hint { margin: -4px 0 10px; font-size: .82rem; }
/* regular meals */
.rep-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 800; color: var(--pea); }
.rep-tag svg { width: 14px; height: 14px; stroke-width: 2.4; }
.rep-form fieldset { margin-bottom: 8px; }
.rep-form .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-form .pillr span { padding: 8px 13px; }
.rep-list { list-style: none; padding: 0; margin: 0; }
.rep-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.rep-list li span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rep-list small { color: var(--muted); font-size: .85rem; }
.rlink .rep-tag { display: flex; margin-top: 2px; }
.lockline svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
/* health: tap a check-up or record to see its detail */
button.hnext { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
button.hnext > span:nth-child(2) { flex: 1; min-width: 0; }
button.hnext > svg { width: 20px; height: 20px; opacity: .8; flex: none; }
.hopen { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.hdetail-head { display: flex; gap: 14px; align-items: center; margin: 0 40px 14px 0; }
.hdetail-head small { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hdetail-head h2 { margin: 2px 0 0; }
.hdl { margin: 0 0 18px; }
.hdl > div { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.hdl > div:first-child { border-top: 0; }
.hdl dt { flex: 0 0 38%; color: var(--muted); font-size: .9rem; }
.hdl dd { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.hdetail .row .btn svg { width: 16px; height: 16px; margin-right: 6px; }
/* shopping list: "we have it at home" */
.card.shop .checklist li:has(.homebtn) { display: flex; align-items: center; gap: 6px; }
.card.shop .checklist li:has(.homebtn) label { flex: 1; min-width: 0; }
.homebtn { flex: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px; font: inherit; font-size: .75rem; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.shop-home { background: var(--pea-soft, #f3edff); }
.shop-home .checklist li { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.shop-home .nm { flex: 1; min-width: 0; font-weight: 600; }
.shop-home .home-q { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-weight: 400; }
.shop-home .home-q input { width: 7.5rem; padding: 6px 8px; font: inherit; font-size: 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; }
.shop-home .home-q small { color: var(--muted); font-size: .8rem; }
.shop-home > p { margin: 2px 0 6px; }
.move-line { font-size: .86rem; color: var(--muted); margin: -.2rem 0 .5rem; }
/* deleting a menu */
.actrow.danger, .actrow.danger b { color: var(--berry); }
.pdel-list { display: grid; gap: 2px; margin: 6px 0 4px; }
.pdel-list small { display: block; }
.actrow.danger svg { color: var(--berry); }
.day h3 .day-more { margin-left: auto; text-transform: none; }
.day h3 .day-kcal + .day-more { margin-left: 0; }
/* recipe catalogue on a phone: the status goes under the name so long names never squeeze */
@media (max-width: 639px) {
  .catalog .rlist li { flex-wrap: wrap; row-gap: 2px; }
  .catalog .rlist li .rlink { flex: 1 1 60%; min-width: 0; }
  .catalog .rlist .muted.sm { order: 5; flex-basis: 100%; text-align: left; }
}
/* open sheet: the page underneath does not move, scrolling stays inside the sheet */
body.pinned { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.modal, .modal-card, .sheet { overscroll-behavior: contain; }
.modal { touch-action: pan-y; }
.modal-card::before { width: 44px; height: 5px; top: 9px; }

/* Rodina: avatars in the top bar open the family sheet */
button.who-top { border: 0; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.who-top .faces { display: inline-flex; flex: none; }
.who-top .faces .avatar { margin-right: -8px; box-shadow: 0 0 0 2px var(--surface); }
.who-top .faces .avatar:last-child { margin-right: 4px; }
.who-top .faces .avatar.cur { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--pea); position: relative; z-index: 1; }
.who-top .faces .avatar.more { background: var(--surface-2); color: var(--muted); font-size: .72rem; }
.who-top .faces .avatar.cur + .avatar { margin-left: 2px; }
.famsheet .card { box-shadow: none; border: 1px solid var(--line); }
.kid-row .tag { flex: none; }
.kid-row .tag.soft { background: var(--pea-soft); color: var(--pea); }

/* swipe left on a row to delete */
.sw-on { position: relative; overflow: hidden; }
.sw-on > :not(.sw-del) { transform: translateX(var(--sx, 0px)); }
.sw-anim > :not(.sw-del) { transition: transform .2s ease; }
.sw-del { position: absolute; top: 0; bottom: 0; right: 0; width: calc(var(--sx, 0px) * -1); overflow: hidden; white-space: nowrap; border: 0; padding: 0; background: #d64545; color: #fff; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.sw-anim > .sw-del { transition: width .2s ease; }
.who-top .wk { font-style: normal; }
@media (max-width: 430px) { .who-top .wk { display: none; } }

/* Send the shopping list to a shop's cart */
.cartsheet .btn.block + .btn.block { margin-top: 0; }
.cart-prog { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.cart-prog span { display: block; height: 100%; background: var(--accent); border-radius: 8px; transition: width .3s; }
.cart-prog.busy span { width: 40%; animation: cartbusy 1.1s ease-in-out infinite; }
@keyframes cartbusy { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.cart-line + .cart-line { border-top: 1px solid var(--line); }
.cart-line.off .cl-qty, .cart-line.off select { opacity: .45; }
.cart-line .cl-top { display: flex; gap: 10px; align-items: flex-start; }
.cart-line .cl-top input { margin-top: 3px; }
.cart-line select { min-width: 0; border: 1.5px solid transparent; border-radius: 12px; padding: 8px 12px; background: var(--surface-2); min-height: 44px; text-overflow: ellipsis; }
.cart-line select:focus { border-color: var(--pea); background: var(--surface); outline: none; }
.cartsheet .cart-add { position: sticky; bottom: 0; box-shadow: 0 0 0 10px var(--surface); }
.cart-line p { margin: 0 0 0 30px; overflow-wrap: anywhere; }
.cart-line select, .cl-qty { margin-left: 30px; width: calc(100% - 30px); }
.cl-qty { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl-qty .icon-btn { width: 36px; height: 36px; background: var(--surface-2); font-size: 1.1rem; }
.warn-tag { font-size: .75rem; padding: 2px 8px; border-radius: 10px; background: var(--apricot-soft); color: var(--ink); }

/* Zdraví: my own records are private unless shared */
.hpriv { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; padding: 14px 18px; }
.hpriv p { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .92rem; }
.hpriv p svg { width: 16px; height: 16px; flex: none; }

/* Rodina sheet: child rows open the child's settings */
.kid-row .kid-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; padding: 0; cursor: pointer; }
.kid-row .kid-main > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
button.tag { border: 0; cursor: pointer; font-family: inherit; padding: 6px 10px; }
.childedit .back-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }
.childedit .back-link svg { width: 16px; height: 16px; }
.gen-empty { margin: 4px 0 8px; }
.gen-empty > div { display: flex; flex-direction: column; gap: 2px; }
.gen-empty span { color: var(--muted); font-size: .9rem; }
/* the review sheet must never be wider than the phone: iPhone sizes a select to its longest option */
.cartsheet { overflow-x: hidden; touch-action: pan-y; }
.cart-line, .cart-line .cl-top span { min-width: 0; overflow-wrap: anywhere; }
.cart-line select { max-width: calc(100% - 30px); }
.cartsheet .hint .warn-tag { margin-right: 4px; }
/* delete-whole-menu link at the end of the menu */
.plan-end { display: flex; justify-content: center; padding: 8px 0 24px; }
.plan-end .linkbtn.danger { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--berry); text-decoration: none; font-weight: 700; }
.plan-end .linkbtn.danger svg { width: 16px; height: 16px; }
/* add one meal to chosen days */
.mlabel .madd { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--pea); font-weight: 700; font-size: .82rem; padding: 10px 0 10px 12px; margin-top: -10px; margin-bottom: -10px; cursor: pointer; }
.mlabel .madd svg { width: 15px; height: 15px; }
.addsheet .lbl { margin: 16px 0 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.addsheet .lblrow { margin: 16px 0 6px; align-items: baseline; }
.addsheet .lblrow .lbl { margin: 0; }
.addsheet .lblrow .linkbtn { text-decoration: none; font-weight: 700; font-size: .84rem; min-height: 36px; }
.addsheet .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.addsheet .pill { box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.addsheet .pill[aria-pressed="true"] { background: var(--pea); color: #fff; box-shadow: none; }
.add-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.add-days .dpill { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 14px; min-height: 52px; font-size: 1rem; font-weight: 800; }
.add-days .dpill small { font-size: .7rem; font-weight: 700; opacity: .75; }
.add-days .dpill.today:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 2px var(--pea); }
.add-q { width: 100%; margin-bottom: 6px; }
.add-list { max-height: 260px; overflow-y: auto; border-radius: 14px; }
.add-rec { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 10px 2px; cursor: pointer; color: var(--ink); }
.add-rec:first-child { border-top: 0; }
.add-rec small { color: var(--muted); font-size: .8rem; }
.add-chosen { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; padding: 12px 14px; }
.add-chosen .linkbtn { text-decoration: none; font-weight: 700; flex: none; }
.addsheet .hint { margin-top: 12px; }
.addsheet .btn.block { margin-top: 10px; width: 100%; }
.modal-card .rbtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.modal-card .rbtns .btn svg { width: 16px; height: 16px; }
.addsheet .btn.primary:disabled { background: var(--line); color: var(--muted); box-shadow: none; cursor: default; }
/* baby meals per day in the menu form */
.sub-field { margin: 6px 0 4px 30px; }
.sub-field .lbl { margin: 8px 0 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.sub-field .pills { display: flex; flex-wrap: wrap; gap: 6px; }
/* shopping list for chosen days */
.shop-days { margin: 4px 0 12px; }
.shop-days .head-row { align-items: baseline; }
.shop-days .lbl { margin: 0 0 6px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.shop-days .linkbtn { text-decoration: none; font-weight: 700; font-size: .84rem; min-height: 36px; }
.shop-days .pill { box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.shop-days .pill[aria-pressed="true"] { background: var(--pea); color: var(--pea-ink); box-shadow: none; }
.shop-days .hint { margin-top: 6px; }
/* plant swaps for vegetarians */
.veg-tag { margin-left: 6px; }
.veg-alt-note { margin: 12px 0; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); }
.veg-alt-note summary { display: flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; min-height: 32px; }
.veg-alt-note summary svg { width: 16px; height: 16px; }
.veg-alt-note ul { margin: 6px 0 0; padding-left: 18px; }
.veg-alt-note li { margin: 4px 0; }
.check.veg-alt { margin-top: 6px; }

.sub-field .pillr span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.toast-undo { pointer-events: auto; margin-left: 10px; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; padding: 6px 4px; cursor: pointer; }

/* UX review 2026-10-24: touch targets 44 px, readable status tags, family chip chevron */
.stbtn, .stquick { min-height: 44px; }
.stbtn.more { width: 44px; }
.stbtns { gap: 8px; }
.homebtn { min-height: 44px; }
.ate-btn { width: 40px; height: 40px; }
.ate-btn::before { inset: -4px; }
.tag-al { color: var(--apricot-ink); font-size: .78rem; }
.stbtn.s-trying { color: var(--apricot-ink); }
.hday { min-height: 48px; }
.icon-btn.sm[data-act="hshift"] { width: 44px; height: 44px; }
.htimes { grid-template-columns: repeat(2, 1fr); }
.htimes input { min-width: 0; }
.who-top > span:not(.faces) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-top > svg { width: 16px; height: 16px; flex: none; color: var(--muted); stroke-width: 2.4; }
.toast-undo { min-height: 36px; }

/* Privacy policy and terms */
.legal-links { font-size: .86rem; color: var(--muted); text-align: center; margin: 12px 0 0; }
.legal-links a { color: inherit; text-decoration: underline; }
.card.legal h2 { font-size: 1.05rem; margin-top: 0; }
.card.legal p, .card.legal li { line-height: 1.55; }
.card.legal ul { padding-left: 1.2em; }

/* Příkrmy: today's food on top */
.today-card { border: 2px solid color-mix(in srgb, var(--pea) 30%, transparent); }
.today-card .eyebrow { margin: 0; }
.tc-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tc-name h2 { margin: 2px 0 0; font-size: 1.9rem; letter-spacing: -.03em; }
.tc-days { list-style: none; display: flex; padding: 0; margin: 14px 0 6px; position: relative; }
.tc-days::before { content: ""; position: absolute; left: 16%; right: 16%; top: 14px; height: 2px; background: var(--line); }
.tc-days li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 600; position: relative; text-align: center; }
.tc-days li span { width: 30px; height: 30px; border-radius: 50%; border: 2px dashed var(--line); background: var(--surface); display: grid; place-items: center; box-sizing: border-box; }
.tc-days li.done span { background: var(--pea); border: 0; color: var(--pea-ink); }
.tc-days li.done span svg { width: 16px; height: 16px; }
.tc-days li.now { color: var(--ink); font-weight: 800; }
.tc-days li.now span { border: 3px solid var(--pea); box-shadow: 0 0 0 5px var(--pea-soft); }
.tc-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tc-btns .btn { flex: 1 1 140px; justify-content: center; }

/* Jídelníček: one day at a time on phones */
@media (max-width: 1023px) {
  .plan .day.day-off { display: none; }
  .plan .day-empty { padding: 16px; }
}
@media (min-width: 1024px) { .plan .day-empty { display: none; } }
.dchip.sel:not(.today) { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); box-shadow: inset 0 0 0 2px var(--accent); }
.dchip.sel.today { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.meal.next { background: var(--pea-soft); border-radius: 16px; padding: 8px 10px; margin-inline: -10px; }
.meal.next .mlabel .tag { margin-left: 6px; }
.cart-cta { margin-bottom: 8px; }
.cart-cta span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.cart-cta small { font-weight: 600; font-size: .78rem; opacity: .85; }
@media (max-width: 399px) { .tc-btns .btn { flex-basis: 100%; } }
@media (max-width: 599px) {
  .hero-card { padding: 14px 16px; gap: 10px; border-radius: 20px; }
  .hero-card h1 { font-size: 1.35rem; margin: 2px 0; }
  .hero-card .hc-sub { font-size: .9rem; }
  .hero-card .ring { width: 72px; height: 72px; }
  .hero-card .ring-num b { font-size: 1rem; }
  .hero-card .ring-num span { font-size: .7rem; }
  .hero-card .stat-chips { gap: 6px; }
}
.ext-row.shop-remind { background: var(--surface); border: 0; border-radius: var(--r-sm, 16px); padding: 12px 16px; box-shadow: var(--shadow); margin-top: 4px; }

/* Adding food: "Přidat jídlo" sheet, barcode scan, product card */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.addtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.addtile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 112px; padding: 14px; border: 0; border-radius: 20px; background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.addtile svg { width: 26px; height: 26px; margin-bottom: 4px; }
.addtile b { font-size: 1rem; }
.addtile span { font-size: .84rem; color: var(--muted); }
.addtile.ai { background: var(--pea-soft); }
.addtile.ai svg { color: var(--pea); }
.addtile.wide { grid-column: 1 / -1; min-height: 64px; flex-direction: row; align-items: center; gap: 12px; }
.addtile.wide svg { margin: 0; }
.addtile:focus-visible { outline: 3px solid var(--pea); outline-offset: 2px; }
.scanbox { position: relative; border-radius: 20px; overflow: hidden; background: #120f19; aspect-ratio: 4 / 3; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanline { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: var(--pea-hi); box-shadow: 0 0 12px var(--pea-hi); }
.ptable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ptable caption { text-align: left; font-weight: 700; padding-bottom: 4px; }
.ptable th { text-align: left; font-weight: 500; padding: 5px 0; border-bottom: 1px solid var(--line); }
.ptable td { text-align: right; font-weight: 600; padding: 5px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }

/* ---------- AI: photos, AI recipes, AI menu, settings ---------- */
.addtile.wide > span { display: flex; flex-direction: column; gap: 2px; }
.addtile.wide > span > span { font-size: .84rem; color: var(--muted); }
.ai-left { display: block; margin-top: 2px; font-weight: 700; color: var(--pea); }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; margin: 0 52px 8px 0; padding: 4px 12px; border-radius: 999px; background: var(--apricot-soft); color: var(--apricot-ink); font-size: .84rem; font-weight: 700; }
.ai-badge svg { width: 16px; height: 16px; }
.dish-title { width: 100%; margin: 0 48px 6px 0; padding: 6px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: 800 1.3rem/1.3 var(--f-display); }
.dlist2 { list-style: none; margin: 8px 0; padding: 4px 14px; border-radius: 20px; background: var(--surface-2); }
.drow { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: 0; }
.drow > span:first-child { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drow b { overflow-wrap: anywhere; }
.drow small { color: var(--muted); }
.drow .num { width: 64px; text-align: center; font-weight: 800; }
.drow .icon-btn.boxed { flex: 0 0 auto; font-size: 1.2rem; font-weight: 700; }
.drow.miss b { color: var(--apricot-ink); font-weight: 700; }
.drow.miss input { width: 100%; }
.ntiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0; padding: 12px 8px; border-radius: 20px; background: var(--surface-2); text-align: center; }
.ntiles b { display: block; font-size: 1.05rem; }
.ntiles span { font-size: .75rem; color: var(--muted); }
.dish-to { margin-top: 8px; }
.dish .add-days { margin: 4px 0 8px; }
.hint.center { text-align: center; }
.ai-wait { display: flex; align-items: center; gap: 12px; min-height: 80px; }
.spin { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--pea-soft); border-top-color: var(--pea); animation: ai-spin .9s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.ai-list { margin: 0 0 12px; padding-left: 20px; }
.ai-list li { margin-bottom: 6px; }
.ai-plan { margin: 12px 0; padding: 14px 16px; border: 2px solid transparent; border-radius: 20px; background: var(--surface-2); }
.ai-plan.on { border-color: var(--pea); }
.ai-plan h3 { margin: 0 0 4px; }
.ai-plan .seg { display: flex; gap: 8px; margin-bottom: 8px; }
.ai-usage ul { list-style: none; margin: 4px 0; padding: 0; }
.ai-usage li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
.note-box { margin: 12px 0 0; padding: 12px 14px; border-radius: 16px; background: var(--pea-soft); font-size: .88rem; }
.ai-res { display: grid; gap: 10px; margin: 14px 0; }
.ai-card { padding: 14px 16px; border-radius: 20px; background: var(--surface-2); }
.ai-card h3 { margin: 0 0 4px; overflow-wrap: anywhere; }
.ai-card p { margin: 0 0 8px; }
.ainote { display: block; margin-top: 2px; font-size: .8rem; font-weight: 500; color: var(--muted); }
.ai-gen { margin: 12px 0; padding: 12px 14px; border: 0; border-radius: 18px; background: var(--pea-soft); }
.ai-gen svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; color: var(--pea); }
.ai-gen textarea { width: 100%; }
.ai-row { margin: 8px 0; }
.ai-row svg { width: 18px; height: 18px; }
.ai-adm small { display: block; }
.ai-plan input:not([type="radio"]), .ai-gen textarea, .drow.miss input { background: var(--surface); }
textarea { font: inherit; color: inherit; font-size: max(16px, 1rem); }
.addtile { position: relative; }
.addtile.wide > span { font-size: 1rem; color: var(--ink); }
.ai-tag { position: absolute; top: 10px; right: 12px; padding: 1px 8px; border-radius: 999px; background: var(--pea); color: var(--pea-ink); font: 800 .72rem/1.4 var(--f-body); font-style: normal; }
label.addtile:focus-within, label.btn:focus-within { outline: 3px solid var(--pea); outline-offset: 2px; }
.drow .icon-btn.boxed { width: 44px; height: 44px; }
.drow.miss input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; }
.dish form.addf input[name="food"] { min-width: 0; flex: 1 1 auto; }

/* "Add to home screen" card (browser only), above the tab bar; on a wide screen in the corner */
.install { position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  background: var(--surface); border-radius: 22px; padding: 16px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .25s; }
.install.on { opacity: 1; transform: none; }
.install-top { display: flex; gap: 12px; align-items: flex-start; }
.install-top img { flex: none; border-radius: 10px; }
.install-top b { font-size: 1rem; }
.install-top p { margin: 4px 0 0; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.install-btns { display: flex; gap: 8px; margin-top: 14px; }
.install-btns .btn { margin: 0; }
.install-btns .primary { flex: 1; }
.install-steps { list-style: none; counter-reset: st; margin: 8px 0 16px; padding: 0; }
.install-steps li { counter-increment: st; display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.install-steps li::before { content: counter(st); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--pea-soft); color: var(--pea); font-weight: 800; display: grid; place-items: center; }
.install-steps li span { flex: 1; }
.install-steps svg { flex: none; width: 24px; height: 24px; color: var(--pea); }
@media (min-width: 1024px) { .install { left: auto; right: 24px; bottom: 24px; width: 380px; } }
@media (prefers-reduced-motion: reduce) { .install { transition: none; } }

/* Language (js/i18n.js): row in Settings, button on the welcome screen, choice in a sheet */
.langrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.langrow b { flex: 1; font-weight: 700; }
.langrow svg { width: 20px; height: 20px; flex: none; color: var(--pea); }
.langrow svg:last-child { color: var(--muted); }
.btn.langbtn { margin-top: 14px; align-self: center; min-height: 44px; }
.langbtn svg { width: 17px; height: 17px; }
.langopt { justify-content: space-between; min-height: 56px; }
.langopt .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; flex: none; }
.langopt[aria-checked="true"] .radio { border: 7px solid var(--pea); }

/* Fit overview: today's rings, extra nutrients, 7/30 day trend, month calendar, own goals */
:root { --m-fat: #c98a0c; --m-carb: #1f9488; }
:root[data-theme="dark"] { --m-fat: #e8b445; --m-carb: #4cc3b5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --m-fat: #e8b445; --m-carb: #4cc3b5; } }
.fit-today { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px 0 4px; }
.fit-today svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.fit-today circle { fill: none; stroke-width: 12; }
.fr-bg { stroke: var(--surface-2); }
.fr-fg { stroke: var(--pea); stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.fr-fg.over { stroke: var(--apricot-fill); }
.mring .fr-fg.over2 { stroke: var(--berry); }
.kring { position: relative; width: 10.5rem; height: 10.5rem; }
.kr-num { position: absolute; inset: 14%; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.kr-num b { font: 800 clamp(1.4rem, 8vw, 2.1rem)/1.05 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kr-num span { font-size: .8rem; color: var(--muted); }
.kr-line { margin: 0; font-size: .92rem; text-align: center; font-variant-numeric: tabular-nums; }
.mrings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.mring { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.mr-svg { width: 3.75rem; height: 3.75rem; margin-bottom: 4px; }
.mring circle { stroke-width: 14; }
.mring b { font-size: .82rem; }
.mring span { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.m-f .fr-fg { stroke: var(--m-fat); }
.m-c .fr-fg { stroke: var(--m-carb); }
.fit-extra { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.fit-extra h3 { font-size: 1rem; }
.fit-extra .linkbtn { min-height: 44px; }
.fit-extra .hint { margin: 0; }
.meter.lim span { background: var(--pea-hi); }
.over-note { font-size: .8rem; color: var(--apricot-ink); }
.seg-period { display: flex; gap: 6px; margin: 10px 0 4px; }
.seg-period .pill { min-height: 44px; }
.targets .head-row .btn.sm { min-height: 44px; }
#diary { scroll-margin-top: calc(var(--top-h) + 16px); }
.goals-form .pillr span { min-height: 44px; }
.goals-form [aria-invalid="true"] { border-color: var(--berry) !important; }
.trend .head-row select { width: auto; max-width: 60%; }
.wbars { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; height: 150px; margin-top: 22px; border-bottom: 1px solid var(--line); }
.wb { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.wb-bar { display: block; width: 100%; max-width: 36px; border-radius: 8px 8px 3px 3px; background: var(--pea-hi); }
.wb-bar.now { background: var(--pea); }
.wb-bar.over { background: var(--apricot-fill); }
.wb-goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--ink); pointer-events: none; z-index: 1; }
.wb-goal span { position: absolute; right: 0; bottom: 2px; font-size: .72rem; font-style: normal; color: var(--ink); background: var(--surface); padding: 0 4px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.wb-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; text-align: center; font-size: .75rem; color: var(--muted); margin-top: 4px; }
.wb-days .now { color: var(--ink); font-weight: 700; }
.trend-chart { display: block; width: 100%; height: 150px; margin-top: 16px; overflow: visible; }
.trend-chart .band { fill: var(--pea); opacity: .12; }
.trend-chart .goal { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 4; }
.trend-chart .line { fill: none; stroke: var(--pea); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav .icon-btn[disabled] { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-top: 6px; }
.cal-head span { text-align: center; font-size: .75rem; color: var(--muted); }
.cd { height: 44px; border-radius: 10px; border: 0; display: flex; align-items: center; justify-content: center; font: 600 .85rem var(--f-body); font-variant-numeric: tabular-nums; color: var(--ink); background: var(--surface-2); padding: 0; cursor: pointer; }
.cd.ok { background: var(--pea); color: var(--pea-ink); }
.cd.under { background: color-mix(in srgb, var(--pea) 45%, var(--surface)); }
.cd.over { background: var(--apricot-fill); color: #241d3a; }
.cd.none { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.cd.today { background: var(--surface); box-shadow: inset 0 0 0 2px var(--pea); }
.cd.sel { outline: 2px solid var(--ink); outline-offset: 1px; }
.cd.future { background: none; color: var(--muted); opacity: .5; cursor: default; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; margin-top: 10px; }
.cal-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--surface-2); }
.cal-legend .ok::before { background: var(--pea); }
.cal-legend .under::before { background: color-mix(in srgb, var(--pea) 45%, var(--surface)); }
.cal-sum { margin: 10px 0 0; font-size: .88rem; font-variant-numeric: tabular-nums; }
.cal-legend .none::before { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.cal-legend .over::before { background: var(--apricot-fill); }
.goals-form h3 { font-size: 1rem; margin-top: 8px; }
.goal-fields { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.goal-fields .wide { grid-column: 1 / -1; }
.goal-fields[disabled] input { opacity: .6; }
.goal-fields label, .g-own label { display: block; }
.goal-own { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.goal-own:not(:has(.g-own:not([hidden]))) { display: none; }

/* CAPTCHA challenge (Turnstile), shown only when needed */
.captcha { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1000; max-width: calc(100vw - 32px); }
.captcha:empty { display: none; }

/* Fit: own activities */
.acts-day { margin: 6px 0; }
.acts-day li.off span:first-child { color: var(--muted); text-decoration: line-through; }
.acts-day .linkbtn { min-height: 44px; padding: 0 4px; }
.act-form fieldset { border: 0; padding: 0; margin: 0; }
.act-form legend { font-weight: 600; margin-bottom: 6px; }
.act-form .pillr span { min-height: 44px; }
