/* Cucina di Casa - Mischia Carnera brand (brand book v1.0, 99. Personal / Carnera Family Brand)
   Layout: one phone-width column for an older cook. Sticky header, fixed 7-tab bar, big touch targets (56px),
   large type. Brand colours only: Tovaglia background, Caffè text (never black), Radicchio = family colour.
   Roles: --pri = Radicchio (brand: buttons, tabs, titles, "do this"), --olive = Vigna (ok / available / done), --frost = Vigna (freezer and other strong fills: Vigna took over from Caffè, 24 Oct 2026), --amber = dark Polenta (use soon),
   --red = Radicchio (missing / blocked / gaps). Fonts: Roboto Slab titles, Montserrat text. */
:root{
  --radicchio:#7B1F3A; --tovaglia:#FAF6EF; --caffe:#2B201C; --polenta:#E7B54A; --vigna:#4D6A3A;
  --logo:var(--radicchio);
  --pri:#7B1F3A; --pri-soft:#F4DEE3; --on-pri:#FFFFFF;
  --bg:#FAF6EF; --surface:#FFFFFF; --sunk:#F3ECE1; --ink:#2B201C; --muted:#6A5850; --line:#E3D7C6;
  --olive:#4D6A3A; --on-olive:#FFFFFF; --olive-soft:#E6ECDD;
  --frost:#4D6A3A; --on-frost:#FFFFFF; --frost-soft:#E6ECDD; --caffe-soft:#EEE6DC;
  --amber:#8A6414; --amber-soft:#F8EBCB;
  --red:#7B1F3A; --red-soft:#F4DEE3;
  --shadow:0 1px 2px rgba(43,32,28,.06),0 4px 14px rgba(43,32,28,.06);
  --f-display:'Roboto Slab','Rockwell',Georgia,serif;
  --f-body:'Montserrat',Arial,'Helvetica Neue',sans-serif;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --logo:var(--polenta);
  --pri:#E7B54A; --pri-soft:#3E3014; --on-pri:#2B201C;
  --bg:#1C1512; --surface:#2B201C; --sunk:#362A25; --ink:#FAF6EF; --muted:#BFAEA3; --line:#46372F;
  --olive:#A9C78F; --on-olive:#14200C; --olive-soft:#2C3A22;
  --frost:#A9C78F; --on-frost:#14200C; --frost-soft:#2C3A22; --caffe-soft:#3D302A;
  --amber:#E7B54A; --amber-soft:#3E3014;
  --red:#E59AAC; --red-soft:#43202A;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 6px 18px rgba(0,0,0,.25);
  color-scheme:dark;
}}
:root[data-theme="dark"]{
  --logo:var(--polenta);
  --pri:#E7B54A; --pri-soft:#3E3014; --on-pri:#2B201C;
  --bg:#1C1512; --surface:#2B201C; --sunk:#362A25; --ink:#FAF6EF; --muted:#BFAEA3; --line:#46372F;
  --olive:#A9C78F; --on-olive:#14200C; --olive-soft:#2C3A22;
  --frost:#A9C78F; --on-frost:#14200C; --frost-soft:#2C3A22; --caffe-soft:#3D302A;
  --amber:#E7B54A; --amber-soft:#3E3014;
  --red:#E59AAC; --red-soft:#43202A;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 6px 18px rgba(0,0,0,.25);
  color-scheme:dark;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:18px;line-height:1.45;margin:0}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--surface)}
[hidden]{display:none!important}
.wrap{max-width:600px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
h1,h2,h3{font-family:var(--f-display);text-wrap:balance;margin:0}
h1{font-size:1.75rem;line-height:1.15;font-weight:800}
h2{font-size:1.35rem}
.h-sm{font-family:var(--f-body);font-size:.8rem;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:700;margin:4px 0 8px}
p{margin:0}
.muted{color:var(--muted)}
.small{font-size:.88rem}
.stack{display:flex;flex-direction:column;gap:12px}
.row2{display:flex;gap:8px;flex-wrap:wrap}
.row2 > *{flex:1 1 140px}

/* header */
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:5;background:var(--surface);border-bottom:1px solid var(--line)}
.top .wrap{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:10px}
.brandbox{min-width:0}
.brand{font-family:var(--f-display);font-weight:800;font-size:1.3rem;color:var(--pri);line-height:1.1}
.datel{color:var(--muted);font-size:.9rem;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.sync{font-size:.75rem;font-weight:700;padding:1px 8px;border-radius:999px;background:var(--sunk);color:var(--muted)}
.sync[data-s="saving"]{background:var(--frost-soft);color:var(--frost)}
.sync[data-s="error"]{background:var(--red-soft);color:var(--red)}
.sync[data-s="demo"]{background:var(--amber-soft);color:var(--amber)}
.sync:empty{display:none}
.icon-btn{appearance:none;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);width:48px;height:48px;border-radius:6px;display:grid;place-items:center;cursor:pointer;flex:none}
.icon-btn svg{width:24px;height:24px}
.icon-btn[aria-pressed="true"]{background:var(--pri-soft);color:var(--pri);border-color:transparent}

main.wrap{padding-block:18px 140px;display:flex;flex-direction:column;gap:22px}

/* tabs */
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:6;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom,0px);padding-left:max(4px,env(safe-area-inset-left,0px));padding-right:max(4px,env(safe-area-inset-right,0px))}
.tabs .in{max-width:600px;margin:0 auto;display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.tab{appearance:none;border:0;background:none;color:var(--muted);font:inherit;font-size:.7rem;display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 0 10px;min-height:64px;cursor:pointer;min-width:0}
.tab .ico{display:grid;place-items:center;width:46px;height:30px;border-radius:999px}
.tab svg{width:23px;height:23px}
.tab[aria-current="page"]{color:var(--pri);font-weight:700}
.tab[aria-current="page"] .ico{background:var(--pri-soft)}
:focus-visible{outline:3px solid var(--frost);outline-offset:2px}

/* buttons */
.btn{appearance:none;font:inherit;font-weight:700;min-height:56px;padding:12px 18px;border-radius:6px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-align:center;line-height:1.2}
.btn.primary{background:var(--pri);border-color:var(--pri);color:var(--on-pri)}
.btn.frost{background:var(--frost);border-color:var(--frost);color:var(--on-frost)}
.btn.frost-soft{background:var(--frost-soft);border-color:transparent;color:var(--frost)}
.btn.danger{color:var(--red);border-color:var(--red-soft)}
.btn.ghost{background:transparent}
.btn.block{width:100%}
.btn.sm{min-height:46px;padding:8px 14px;font-size:.95rem}
.btn[disabled]{opacity:.45;cursor:default}
.link{appearance:none;border:0;background:none;padding:2px 0;font:inherit;color:var(--pri);text-decoration:underline;text-underline-offset:3px;cursor:pointer;text-align:left}
.link.strong{font-weight:700;color:var(--ink);text-decoration-color:var(--line)}

/* forms */
.field{display:flex;flex-direction:column;gap:6px}
.field > span{font-weight:700;font-size:.95rem}
.input,.textarea,.search{font:inherit;font-size:1.05rem;width:100%;min-height:54px;border-radius:6px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);padding:10px 14px}
.textarea{min-height:150px;line-height:1.5;resize:vertical}
.input:focus,.textarea:focus,.search:focus,.qbox:focus-within{outline:3px solid var(--frost);outline-offset:1px}
.opts{display:flex;flex-wrap:wrap;gap:6px}
.opt{appearance:none;font:inherit;font-size:.95rem;font-weight:700;min-height:46px;padding:8px 14px;border-radius:999px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer}
.opt[aria-pressed="true"]{background:var(--pri);border-color:var(--pri);color:var(--on-pri)}

/* today */
.banner{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--pri-soft);border-radius:6px;padding:14px 16px}
.banner.frost{background:var(--frost-soft)}
.meal{display:flex;flex-direction:column;gap:10px}
.meal-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.dish{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:18px;box-shadow:none;display:flex;flex-direction:column;gap:10px}
.dish.done{box-shadow:none;background:var(--sunk);border-color:transparent}
.eyebrow{font-size:.78rem;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:700}
.dish h3{font-size:1.65rem;line-height:1.15}
.with{font-family:var(--f-display);font-size:1.1rem;color:var(--muted);margin-top:-4px}
.chips{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:0;margin:0}
.chip{font-size:.84rem;padding:4px 10px;border-radius:999px;background:var(--sunk);color:var(--ink);line-height:1.3}
.chip.plan{background:var(--pri);color:var(--on-pri);font-weight:700}
.chip.diet{background:var(--olive-soft);color:var(--olive);font-weight:700}
.chip.frost{background:var(--frost-soft);color:var(--frost)}
.chip.warn,.chip.gift{background:var(--amber-soft);color:var(--amber)}
.chip.bad{background:var(--red-soft);color:var(--red);font-weight:700}
.ing{list-style:none;padding:0;margin:0;border-top:1px solid var(--line)}
.ing li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed var(--line)}
.ing li > span:first-child{min-width:0}
.st{font-size:.8rem;font-weight:700;padding:2px 8px;border-radius:999px;white-space:nowrap}
.st.ok{color:var(--olive);background:var(--olive-soft)}
.st.frost{color:var(--frost);background:var(--frost-soft)}
.st.warn{color:var(--amber);background:var(--amber-soft)}
.st.bad{color:var(--red);background:var(--red-soft)}
.actions{display:grid;grid-template-columns:1.4fr 1fr;gap:8px}
.alts{display:flex;gap:8px;flex-wrap:wrap}
.alts .btn{flex:1 1 auto}
.others{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline}
.ok-pill{font-size:.85rem;font-weight:700;color:var(--olive);background:var(--olive-soft);padding:3px 10px;border-radius:999px;white-space:nowrap}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:16px 18px}
.panel ul{margin:6px 0 10px;padding-left:20px;display:flex;flex-direction:column;gap:8px}
.note{background:var(--sunk);border-radius:6px;padding:10px 12px;font-size:.92rem;color:var(--muted)}
.note.bad{background:var(--red-soft);color:var(--red)}
.empty{background:var(--surface);border:1.5px dashed var(--line);border-radius:6px;padding:18px;display:flex;flex-direction:column;gap:12px}

/* cycle */
.cycle{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:.85rem}
.cycle span{padding:4px 10px;border-radius:999px;background:var(--sunk);color:var(--muted);font-weight:700}
.cycle span.done{background:var(--olive-soft);color:var(--olive)}
.cycle span.now{background:var(--pri);color:var(--on-pri)}
.cycle i{color:var(--muted);font-style:normal}

/* lists */
.list{background:var(--surface);border:1px solid var(--line);border-radius:6px;overflow:hidden}
.rowi{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-top:1px solid var(--line)}
button.rowi{appearance:none;width:100%;background:none;border-left:0;border-right:0;border-bottom:0;font:inherit;color:inherit;text-align:left;cursor:pointer}
.list > :first-child{border-top:0}
.nm{font-weight:700}
.meta{color:var(--muted);font-size:.88rem}
.qty{font-variant-numeric:tabular-nums;font-weight:700;font-size:1.1rem;white-space:nowrap}
.info{min-width:0;display:flex;flex-direction:column;gap:3px}
.chev{color:var(--muted);font-size:1.3rem;flex:none}

/* freezer */
.freezer-head{background:var(--frost-soft);color:var(--frost);border-radius:6px;padding:16px 18px;display:flex;flex-direction:column;gap:4px}
.freezer-head h1{color:var(--frost)}
.frow{display:grid;grid-template-columns:1fr auto;gap:10px 12px;padding:14px 16px;border-top:1px solid var(--line);align-items:center}
.frow .qty{font-size:1.3rem;color:var(--frost)}
.frow .acts{grid-column:1/-1;display:grid;grid-template-columns:2fr 1fr;gap:8px}
.moves{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px;font-size:.92rem}
.moves b{font-variant-numeric:tabular-nums}

/* week */
.meters{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
.meter{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.meter .ml{font-size:.85rem;font-weight:700}
.meter .mv{font-family:var(--f-display);font-size:1.6rem;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.1}
.meter .mv span{font-size:1rem;color:var(--muted)}
.meter .ms{font-size:.78rem;color:var(--muted)}
.meter.good .mv{color:var(--olive)}
.meter.warn .mv{color:var(--amber)}
.segs{display:flex;gap:3px;margin-top:4px}
.segs i{flex:1;height:6px;border-radius:3px;background:var(--sunk)}
.segs i.on{background:var(--olive)}
.segs i.over{background:var(--red)}
.day{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:12px 16px}
.day.is-today{border:2px solid var(--pri)}
.day.is-past{background:transparent}
.day h3{font-size:1.15rem;display:flex;gap:8px;align-items:baseline;margin-bottom:4px}
.day h3 .muted{font-family:var(--f-body);font-size:.88rem;font-weight:400}
.slot{display:grid;grid-template-columns:64px 1fr auto;gap:10px;align-items:center;padding:9px 0;border-top:1px dashed var(--line)}
.slot-m{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:700}
.slot-r{min-width:0;display:flex;flex-direction:column;gap:2px}
.tg{display:inline-block;font-size:.72rem;font-weight:700;padding:1px 7px;border-radius:999px;margin-right:4px;background:var(--sunk);color:var(--muted)}
.tg.legumi,.tg.formaggio{background:var(--olive-soft);color:var(--olive)}
.tg.pesce{background:var(--caffe-soft);color:var(--ink)}

/* check */
.crow{padding:14px 16px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:10px}
.crow.s-ok{background:color-mix(in srgb,var(--olive-soft) 55%,transparent)}
.crow.s-gone{background:color-mix(in srgb,var(--red-soft) 65%,transparent)}
.seg{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.seg .btn{min-height:50px;padding:6px 8px;font-size:.95rem}
.seg .btn[aria-pressed="true"].b-ok{background:var(--olive);border-color:var(--olive);color:var(--on-olive)}
.seg .btn[aria-pressed="true"].b-gone{background:var(--red);border-color:var(--red);color:var(--surface)}
.seg .btn[aria-pressed="true"].b-qty{background:var(--amber);border-color:var(--amber);color:var(--surface)}
.dock{position:sticky;bottom:calc(76px + env(safe-area-inset-bottom,0px));display:flex;gap:8px;background:var(--bg);padding-block:10px;z-index:3}
.dock .btn{flex:1}
.dock .btn.primary{flex:2}

/* quantity control */
.stepper{display:flex;align-items:center;gap:8px}
.stepper > .btn{width:56px;height:56px;padding:0;font-size:1.6rem;flex:none}
.qbox{display:flex;align-items:center;gap:6px;min-height:56px;border:1.5px solid var(--line);border-radius:6px;padding:0 12px;background:var(--surface);flex:1;min-width:0;max-width:220px}
.qin{font:inherit;font-size:1.35rem;font-weight:700;font-variant-numeric:tabular-nums;width:100%;min-width:0;border:0;background:transparent;color:var(--ink);text-align:right;padding:0}
.qin:focus{outline:none}
.qbox span{color:var(--muted);font-weight:700;white-space:nowrap}
.quick{display:flex;gap:6px;flex-wrap:wrap}
.quick .btn{min-height:44px;padding:6px 14px;font-size:.95rem}

/* shopping */
.srow{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:12px 16px;border-top:1px solid var(--line);align-items:start}
.cbox{appearance:none;width:46px;height:46px;border-radius:6px;border:2px solid var(--line);background:var(--surface);color:var(--on-olive);font:inherit;font-size:1.4rem;font-weight:700;cursor:pointer;display:grid;place-items:center}
.cbox[aria-pressed="true"]{background:var(--pri);border-color:var(--pri)}
.srow.ck .nm{text-decoration:line-through;text-decoration-color:var(--muted)}
.sbody{min-width:0;display:flex;flex-direction:column;gap:3px}
.bought{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.cat-h{padding:10px 16px 6px;font-size:.78rem;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:700;background:var(--sunk)}
.list > .cat-h + *{border-top:0}
.toggle2{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.toggle2 .btn[aria-pressed="true"]{background:var(--frost);border-color:var(--frost);color:var(--on-frost)}
.toggle2.olive .btn[aria-pressed="true"]{background:var(--pri);border-color:var(--pri);color:var(--on-pri)}

/* recipe editor */
.edrow{display:grid;grid-template-columns:1fr auto;gap:8px 10px;align-items:center;padding:12px 14px;border-top:1px solid var(--line)}
.edrow .stepper{grid-column:1/-1}
.x{appearance:none;border:1.5px solid var(--line);background:var(--surface);color:var(--red);border-radius:6px;min-height:44px;padding:0 12px;font:inherit;font-weight:700;cursor:pointer}

/* sheet */
.backdrop{position:fixed;inset:0;background:rgba(43,32,28,.5);z-index:19}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:20;max-height:92vh;overflow-y:auto;background:var(--surface);border-radius:6px 22px 0 0;box-shadow:0 -8px 30px rgba(0,0,0,.2);padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
.sheet .wrap{display:flex;flex-direction:column;gap:12px}
.sheet-bar{display:flex;justify-content:flex-end;padding-top:10px}
.sheet-title{font-size:1.6rem}
.steps{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:8px}
.plist{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.pick{appearance:none;font:inherit;font-weight:700;font-size:.98rem;min-height:56px;padding:8px 12px;border-radius:6px;border:1.5px solid var(--line);background:var(--bg);color:var(--ink);cursor:pointer;text-align:left}
.pick small{display:block;font-weight:400;color:var(--muted);font-size:.8rem}
.pick.new{border-style:dashed;color:var(--pri)}
.fzrow{border:1.5px solid var(--frost-soft);border-radius:6px;padding:12px;display:flex;flex-direction:column;gap:10px}

/* settings */
.rule{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:14px 16px;display:flex;flex-direction:column;gap:6px}
.rule ul{margin:0;padding-left:20px}
.howto ol{padding-left:22px;margin:0;display:flex;flex-direction:column;gap:10px}

/* settings button with label */
.set-btn{width:auto;padding:0 12px;gap:8px;display:flex;align-items:center;font:inherit;font-weight:700;font-size:.9rem}
@media (max-width:520px){.set-btn span{display:none}.set-btn{width:48px;padding:0}}
.tab{line-height:1.15;text-align:center}

/* big two-way choice (freezer add / remove) */
.bigchoice{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.btn.big{min-height:84px;font-size:1.15rem;border-radius:6px;flex-direction:column;gap:2px}
.btn.big small{font-weight:400;font-size:.82rem;opacity:.9}
.bigchoice .btn.ghost{background:var(--surface)}

/* group buttons (frutta & verdura / carne & pesce / dispensa) */
.groupbtns{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.gbtn{appearance:none;font:inherit;font-weight:700;font-size:1rem;line-height:1.2;min-height:76px;padding:10px 8px;border-radius:6px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}
.gbtn small{font-weight:400;font-size:.8rem;color:var(--muted)}
.gbtn[aria-pressed="true"]{background:var(--pri);border-color:var(--pri);color:var(--on-pri)}
.gbtn[aria-pressed="true"] small{color:var(--on-olive);opacity:.85}

/* compact freezer row: name | amount | Prendo */
.frow2{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:12px 14px;border-top:1px solid var(--line)}
.frow2 .nmbtn{appearance:none;border:0;background:none;padding:0;font:inherit;color:inherit;text-align:left;cursor:pointer;min-width:0;display:flex;flex-direction:column;gap:4px}
.frow2 .nm{font-size:1.15rem;line-height:1.2}
.frow2 .qty{font-size:1.15rem;color:var(--frost);text-align:center;min-width:72px}
.frow2 .btn{min-height:52px;padding:8px 16px}
.filters{display:flex;gap:6px;flex-wrap:wrap}
.soon{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.soon .chip{cursor:pointer;border:0;font:inherit;font-size:.88rem}
.hb{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--line)}
.select{appearance:auto}
.subcat{padding:8px 16px 4px;font-size:.75rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:700}

/* people per meal, freezer block hints, photos */
.people{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.stepper.sm{gap:6px}
.stepper.sm .btn{width:44px;height:44px;min-height:44px;padding:0;font-size:1.3rem}
.stepper.sm strong{min-width:30px;text-align:center;font-size:1.25rem;font-variant-numeric:tabular-nums}
.hint{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:var(--frost-soft);color:var(--ink);border-radius:6px;padding:8px 12px;font-size:.92rem;margin:0}
.frow2 .qty small{display:block;font-size:.75rem;color:var(--muted);font-weight:400}
.thumbs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.thumb{display:flex;flex-direction:column;gap:6px}
.thumb img{width:100%;max-width:100%;aspect-ratio:1;object-fit:cover;border-radius:6px}
label.btn{cursor:pointer}

/* login */
.login{max-width:420px;margin:6vh auto 0;display:flex;flex-direction:column;gap:16px}

.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(92px + env(safe-area-inset-bottom,0px));z-index:30;background:var(--ink);color:var(--bg);padding:12px 18px;border-radius:6px;font-weight:700;max-width:calc(100% - 32px);text-align:center;box-shadow:none}
@media (prefers-reduced-motion: no-preference){
  .sheet:not([hidden]){animation:up .22s ease-out}
  @keyframes up{from{transform:translateY(30px);opacity:.6}to{transform:none;opacity:1}}
}

/* Settimana: people per meal, Cambia / Scelgo io, what is missing */
.slot{align-items:start}
.slot-m{padding-top:4px}
.slot-b{display:flex;flex-direction:column;gap:6px}
.slot-b .btn{min-height:42px;padding:6px 12px;font-size:.88rem}
.pp{display:flex;align-items:center;gap:8px;margin-top:6px;flex-wrap:wrap}
.pp .stepper.sm .btn{width:38px;height:38px;min-height:38px;font-size:1.15rem}
.chips.miss{margin-top:4px}
.chips.miss .chip{font-size:.8rem;border-radius:6px}
.inlist{font-weight:400;opacity:.85}
@media (max-width:520px){.slot{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px}.slot-m{grid-column:1/-1;padding-top:0}}

/* Freezer "Pianificato" */
.plan-r{padding:8px 14px 0;font-size:1.02rem}
.frow2 .nmbtn .meta{font-size:.84rem}

/* Ricette: rows with two buttons, Attive / Archiviate */
.rrow{display:flex;flex-direction:column;gap:10px;padding:14px 16px;border-top:1px solid var(--line)}
.rrow-b{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.rrow-b .btn{min-height:44px;font-size:.92rem}
.rtabs{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.rtabs .opt{min-height:50px;border-radius:6px}
.rtabs .opt small{font-weight:400;opacity:.85;margin-left:4px}

/* Ricette di stagione */
.tick{appearance:none;width:100%;display:flex;align-items:center;gap:12px;padding:12px 16px;border:0;border-top:1px solid var(--line);background:none;font:inherit;color:inherit;text-align:left;cursor:pointer;min-height:56px}
.list > .tick:first-child{border-top:0}
.tick .cb{flex:none;width:34px;height:34px;border-radius:6px;border:2px solid var(--line);display:grid;place-items:center;font-weight:700;font-size:1.1rem;color:var(--on-frost)}
.tick[aria-pressed="true"] .cb{background:var(--frost);border-color:var(--frost)}
.tick .nm{flex:1}
.addrow{display:grid;grid-template-columns:1fr auto;gap:8px}
.actions2{display:grid;grid-template-columns:1fr 1.4fr;gap:8px}
.link.center{align-self:center}

/* Impostazioni: habits, one per day and meal */
.hbgrid{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:6px;overflow:hidden}
.hbday{display:grid;grid-template-columns:96px 1fr 1fr;gap:8px;align-items:center;padding:8px 12px;border-top:1px solid var(--line)}
.hbday:first-child{border-top:0}
.hbbtn{appearance:none;font:inherit;text-align:left;cursor:pointer;min-height:52px;padding:6px 10px;border-radius:6px;border:1.5px solid var(--line);background:var(--surface);color:var(--muted);display:flex;flex-direction:column;justify-content:center;line-height:1.2}
.hbbtn small{font-size:.72rem;letter-spacing:.06em;text-transform:uppercase}
.hbbtn span{font-weight:700}
.hbbtn.on{background:var(--frost-soft);border-color:var(--frost);color:var(--ink)}
@media (max-width:420px){.hbday{grid-template-columns:1fr 1fr}.hbday strong{grid-column:1/-1}}

/* Guida: pictures first, real-looking buttons, details folded */
.gico{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;border-radius:50%;background:var(--frost-soft);color:var(--frost)}
.gico svg{width:24px;height:24px}
.gico.lg{width:56px;height:56px;background:var(--frost);color:var(--on-frost)}
.gico.lg svg{width:30px;height:30px}
.gico.sm{width:26px;height:26px;vertical-align:middle;margin-right:2px}
.gico.sm svg{width:16px;height:16px}
.gwhen{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:var(--frost);font-weight:700}
.gloop{display:grid;grid-template-columns:1fr auto 1fr auto 1fr auto 1fr;align-items:start;gap:2px;background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:16px 10px 12px}
.gloop .gl{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
.gloop .gl strong{font-family:var(--f-display);font-size:.98rem}
.gloop .gico.lg{width:50px;height:50px}
.gloop .gico.lg svg{width:26px;height:26px}
.gloop .gl small{color:var(--muted);font-size:.78rem;line-height:1.2}
.gloop > i{font-style:normal;color:var(--frost);font-size:1.5rem;font-weight:700;padding-top:10px}
.gloop-f{grid-column:1/-1;text-align:center;color:var(--muted);font-size:.85rem;margin-top:6px}
.gtiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.gtile{appearance:none;font:inherit;color:inherit;text-align:left;cursor:pointer;background:var(--surface);border:1.5px solid var(--line);border-top:4px solid var(--frost);border-radius:6px;padding:14px;display:flex;flex-direction:column;gap:6px;min-height:150px}
.gtile strong{font-size:1.05rem;line-height:1.2}
.gtile .gto{margin-top:auto;color:var(--pri);font-weight:700;font-size:.85rem}
.gtile:hover{border-color:var(--frost)}
.gtiles > .gtile:last-child:nth-child(odd){grid-column:1/-1;min-height:0}
.kb{display:inline-block;font-weight:700;font-size:.82rem;line-height:1.2;padding:3px 9px;margin:2px 0;border-radius:6px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);white-space:nowrap}
.kb.pri{background:var(--pri);border-color:var(--pri);color:var(--on-pri)}
.kb.grn{background:var(--frost);border-color:var(--frost);color:var(--on-frost)}
.kb.ko{color:var(--red);border-color:var(--red-soft)}
.kb.amb{color:var(--amber);border-color:var(--amber-soft)}
.kb.chk{border-width:2px;width:24px;height:24px;padding:0;text-align:center;line-height:20px;vertical-align:middle}
.timeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.tl{display:grid;grid-template-columns:44px 1fr;gap:12px;position:relative;padding-bottom:16px}
.tl:not(:last-child)::before{content:"";position:absolute;left:21px;top:44px;bottom:0;width:2px;background:var(--frost-soft)}
.tln{width:44px;height:44px;border-radius:50%;background:var(--frost);color:var(--on-frost);display:grid;place-items:center;font-family:var(--f-display);font-weight:800;font-size:1.2rem;z-index:1}
.tlb{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:12px 14px;display:flex;flex-direction:column;gap:6px}
.tlb strong{font-size:1.05rem}
.tlb .small{line-height:1.9}
.gday{display:flex;flex-direction:column;gap:10px}
.gcard{display:grid;grid-template-columns:44px 1fr;gap:12px;align-items:start;background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:14px}
.gcard > div{display:flex;flex-direction:column;gap:4px;min-width:0}
.gcard strong{font-size:1.05rem}
.gcard .small{line-height:1.9}
.gmore summary{cursor:pointer;color:var(--pri);font-weight:700;font-size:.85rem;padding:4px 0;list-style:none}
.gmore summary::before{content:"+ "}
.gmore[open] summary::before{content:"− "}
.gmore summary::-webkit-details-marker{display:none}
.gmore > div{color:var(--muted);padding-top:2px}
.gtwo{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:520px){.gtwo{grid-template-columns:1fr}}
.gbox{border-radius:6px;padding:14px;display:flex;flex-direction:column;gap:8px}
.gbox-h{display:flex;align-items:center;gap:10px;font-size:1.1rem}
.gbox ul{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:.92rem}
.gbox.must{background:var(--surface);border:2px solid var(--frost)}
.gbox.easy{background:var(--frost-soft)}
.gbox.easy .gico{background:var(--surface)}
.gvid{background:var(--surface);border:2px solid var(--frost);border-radius:6px;padding:14px;display:flex;flex-direction:column;gap:12px}
.gvid-h{display:grid;grid-template-columns:56px 1fr;gap:12px;align-items:center}
.gvid-h > div{display:flex;flex-direction:column;gap:2px;min-width:0}
.gvid-h strong{font-family:var(--f-display);font-size:1.25rem}
.gvid-box{background:#1C1512;border-radius:6px;display:flex;justify-content:center;overflow:hidden}
.gvid-box video{display:block;height:40vh;max-height:440px;max-width:100%;aspect-ratio:390/844;background:#1C1512}
.gvid-b{display:flex;gap:8px;align-items:center}
.gvid-b .btn.primary{flex:1}
.gvid-b .btn[aria-pressed="true"]{background:var(--frost-soft);border-color:var(--frost);color:var(--frost)}
.gchaps{display:flex;flex-direction:column;margin-top:6px;border:1px solid var(--line);border-radius:6px;overflow:hidden}
.gch{appearance:none;font:inherit;color:var(--ink);background:var(--surface);border:0;border-top:1px solid var(--line);display:grid;grid-template-columns:28px 1fr auto;gap:10px;align-items:center;text-align:left;padding:11px 12px;cursor:pointer}
.gch:first-child{border-top:0}
.gch .n{width:26px;height:26px;border-radius:50%;background:var(--frost-soft);color:var(--frost);display:grid;place-items:center;font-weight:700;font-size:.8rem}
.gch .nm{font-weight:600;font-size:.95rem}
.gch .t{color:var(--muted);font-size:.85rem;font-variant-numeric:tabular-nums}
.gchap > .small{color:inherit}
.gfaq details{border-top:1px solid var(--line);padding:0 16px}
.gfaq details:first-child{border-top:0}
.gfaq summary{cursor:pointer;font-weight:700;padding:14px 0;list-style:none;display:flex;justify-content:space-between;gap:10px}
.gfaq summary::after{content:"›";color:var(--muted);transition:transform .15s}
.gfaq details[open] summary::after{transform:rotate(90deg)}
.gfaq summary::-webkit-details-marker{display:none}
.gfaq details p{padding:0 0 14px;color:var(--muted)}
.edrow .dest{grid-column:1/-1}
