/* Our Kitchen — duck-egg kitchen tiles, deep teal and a marigold warmth.
   Big type and big targets throughout: built for older eyes and thumbs. */
:root{
  --bg:#EDF3F1; --surface:#FFFFFF; --sunk:#F4F8F6; --ink:#13302A; --muted:#4D625B; --line:#D0DDD8;
  --teal:#1D6B5B; --teal-ink:#FFFFFF; --teal-soft:#D6EAE3;
  --sun:#E9A631; --sun-soft:#FCEBC8; --sun-ink:#5A3A00;
  --green:#2E7D32; --green-bg:#E2F1E3; --amber:#A35F00; --amber-bg:#FBEBD5; --red:#B3261E; --red-bg:#F8E0DE;
  --shadow:0 1px 2px rgba(19,48,42,.06),0 6px 18px rgba(19,48,42,.06);
  --t-fish:#D8E9F5; --t-chicken:#FBE7C8; --t-egg:#FFF1BF; --t-pot:#F6DCCF; --t-soup:#F3E3C6; --t-sausage:#F5D6CF;
  --t-roast:#EADAC7; --t-bowl:#E6E9D2; --t-toast:#F2E1C3; --t-plate:#E2E6E4;
  --font-body:"Atkinson Hyperlegible",Verdana,system-ui,sans-serif;
  --font-head:"Nunito","Trebuchet MS",system-ui,sans-serif;
  --r:18px;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root{
  --bg:#0E1916; --surface:#16231F; --sunk:#1B2B26; --ink:#EEF5F2; --muted:#AFC2BB; --line:#2B3C36;
  --teal:#6FC7B1; --teal-ink:#0B1612; --teal-soft:#1D3A33;
  --sun:#F2BB55; --sun-soft:#3A2C10; --sun-ink:#FBE3B0;
  --green:#82C985; --green-bg:#1B321F; --amber:#F2B45C; --amber-bg:#3A2913; --red:#F28B82; --red-bg:#3D1B19;
  --shadow:none;
  --t-fish:#1E3442; --t-chicken:#3A2D17; --t-egg:#3A3415; --t-pot:#3A2620; --t-soup:#382C17; --t-sausage:#3C221D;
  --t-roast:#33291D; --t-bowl:#2C2F1E; --t-toast:#372B19; --t-plate:#26302C;
  color-scheme:dark}}

*{box-sizing:border-box}
html{font-size:20px;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font-body);line-height:1.5}
h1,h2,h3{font-family:var(--font-head);font-weight:800;line-height:1.15;margin:0;text-wrap:balance;letter-spacing:-.01em}
h1{font-size:1.75rem} h2{font-size:1.3rem} h3{font-size:1.08rem}
p{margin:0}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid var(--sun);outline-offset:2px}
[hidden]{display:none!important}
img{max-width:100%}

.wrap{max-width:640px;margin:0 auto;display:flex;flex-direction:column;gap:18px;
  padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));
  padding-top:calc(16px + env(safe-area-inset-top,0px));padding-bottom:calc(110px + env(safe-area-inset-bottom,0px))}

/* header */
.head{display:flex;align-items:flex-start;gap:12px}
.head .grow{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.eyebrow{font-size:.78rem;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:700}
.iconbtn{width:56px;height:56px;flex:none;border-radius:50%;border:2px solid var(--line);background:var(--surface);display:grid;place-items:center;color:var(--ink)}
.iconbtn svg{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sync{display:inline-flex;align-items:center;gap:6px;font-size:.78rem;color:var(--muted)}
.sync::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--green)}
.sync.off::before{background:var(--amber)}

/* cards */
.card{background:var(--surface);border-radius:var(--r);padding:18px;display:flex;flex-direction:column;gap:14px;box-shadow:var(--shadow);border:1px solid var(--line);min-width:0}
.card.flat{box-shadow:none}
.muted{color:var(--muted)}
.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.grow{flex:1;min-width:0}
.stack{display:flex;flex-direction:column;gap:10px}
.small{font-size:.88rem}

/* buttons */
.btn{min-height:58px;padding:10px 20px;border-radius:14px;border:2px solid var(--teal);background:var(--surface);color:var(--teal);font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;text-align:center}
.btn.primary{background:var(--teal);color:var(--teal-ink)}
.btn.sun{background:var(--sun);border-color:var(--sun);color:#2A1A00}
.btn.wide{width:100%}
.btn.done{background:var(--green-bg);border-color:var(--green);color:var(--green)}
.btn.quiet{border-color:var(--line);color:var(--ink)}
.btn:disabled{opacity:.6;cursor:default}
.btn svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px;background:var(--sunk);padding:5px;border-radius:16px;border:1px solid var(--line)}
.seg button{min-height:50px;font-size:.92rem;padding:0 6px;border:0;border-radius:12px;background:none;font-weight:700;color:var(--muted)}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--teal);box-shadow:var(--shadow)}

/* salt */
.salt{display:inline-flex;align-items:center;gap:7px;font-size:.8rem;font-weight:700;padding:4px 11px;border-radius:999px;white-space:nowrap}
.salt::before{content:"";width:12px;height:12px;border-radius:50%;background:currentColor}
.s-g{color:var(--green);background:var(--green-bg)} .s-a{color:var(--amber);background:var(--amber-bg)} .s-r{color:var(--red);background:var(--red-bg)} .s-u{color:var(--muted);background:var(--sunk)}
.salt.big{font-size:1.15rem;padding:8px 18px} .salt.big::before{width:20px;height:20px}

/* meal art */
.art{flex:none;width:64px;height:64px;border-radius:20px;display:grid;place-items:center;color:var(--ink)}
.art svg{width:36px;height:36px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.art.lg{width:96px;height:96px;border-radius:28px} .art.lg svg{width:54px;height:54px}
.art.sm{width:48px;height:48px;border-radius:14px} .art.sm svg{width:28px;height:28px}
.t-fish{background:var(--t-fish)} .t-chicken{background:var(--t-chicken)} .t-egg{background:var(--t-egg)} .t-pot{background:var(--t-pot)}
.t-soup{background:var(--t-soup)} .t-sausage{background:var(--t-sausage)} .t-roast{background:var(--t-roast)} .t-bowl{background:var(--t-bowl)}
.t-toast{background:var(--t-toast)} .t-plate{background:var(--t-plate)}

/* today */
.hero{background:var(--surface);border-radius:24px;border:1px solid var(--line);box-shadow:var(--shadow);overflow:hidden}
.hero-top{background:var(--teal);color:var(--teal-ink);padding:16px 18px;display:flex;justify-content:space-between;align-items:center;gap:10px}
.hero-top .eyebrow{color:inherit;opacity:.9}
.hero-body{padding:18px;display:flex;flex-direction:column;gap:14px}
.hero-meal{display:flex;gap:16px;align-items:center}
.hero-meal h2{font-size:1.55rem}
.tip{background:var(--sun-soft);color:var(--sun-ink);border-radius:14px;padding:12px 14px;font-size:.95rem}
.tip b{font-weight:700}
.btnrow{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mini{display:flex;align-items:center;gap:14px;padding:12px 0;border-top:1px solid var(--line)}
.mini:first-of-type{border-top:0;padding-top:0}
.mini .name{font-weight:700;font-size:1.05rem}
.tick{width:58px;height:58px;flex:none;border-radius:50%;border:2px solid var(--line);background:var(--surface);display:grid;place-items:center;color:var(--muted)}
.tick svg{width:28px;height:28px;stroke:currentColor;fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.tick[aria-pressed="true"]{background:var(--green);border-color:var(--green);color:#fff}

/* drinks */
.drink{display:grid;grid-template-columns:1fr auto auto auto;align-items:center;gap:10px}
.count{font-family:var(--font-head);font-size:1.8rem;font-weight:900;min-width:2.2ch;text-align:center;font-variant-numeric:tabular-nums}
.round{width:58px;height:58px;border-radius:50%;border:2px solid var(--teal);background:var(--surface);color:var(--teal);font-size:1.7rem;font-weight:700;line-height:1}
.round.plus{background:var(--teal);color:var(--teal-ink)}
.cups{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.cup{width:16px;height:20px;border:2px solid var(--teal);border-radius:3px 3px 7px 7px}
.cup.full{background:var(--teal)}

.fbtn{display:flex;gap:14px;align-items:center;text-align:left;width:100%;background:var(--sun-soft);color:var(--sun-ink);border:2px solid var(--sun);border-radius:var(--r);padding:16px}
.fbtn .grow b{display:block;font-family:var(--font-head);font-size:1.15rem}
.fbtn svg{width:34px;height:34px;flex:none;stroke:currentColor;fill:none;stroke-width:2}

/* notes */
.note{border-left:5px solid var(--amber);background:var(--amber-bg);padding:10px 14px;border-radius:8px;font-size:.95rem}
.goodnote{border-left:5px solid var(--green);background:var(--green-bg);padding:10px 14px;border-radius:8px;font-size:.95rem}
.err{border-left:5px solid var(--red);background:var(--red-bg);padding:10px 14px;border-radius:8px}

/* week */
.day{display:flex;flex-direction:column;gap:8px;padding:14px 0;border-top:1px solid var(--line)}
.day:first-of-type{border-top:0;padding-top:0}
.day-head{display:flex;justify-content:space-between;align-items:center}
.today-tag{font-size:.78rem;background:var(--sun);color:#2A1A00;padding:3px 12px;border-radius:999px;font-weight:700}
.slot{display:flex;gap:12px;align-items:center;width:100%;text-align:left;background:var(--sunk);border:1px solid var(--line);border-radius:14px;padding:8px 12px;min-height:64px}
.slot .lbl{font-size:.74rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:700;display:block}
.slot .nm{font-weight:700}

/* ideas */
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{min-height:50px;padding:6px 16px;border-radius:999px;border:2px solid var(--line);background:var(--surface);font-weight:700}
.chip[aria-pressed="true"]{border-color:var(--teal);background:var(--teal-soft);color:var(--teal)}
.idea{display:flex;flex-direction:column;gap:12px;padding:16px 0;border-top:1px solid var(--line)}
.idea:first-child{border-top:0;padding-top:0}
.ing{font-size:.92rem;color:var(--muted)}
.field{min-height:58px;border:2px solid var(--line);border-radius:14px;padding:10px 14px;background:var(--surface);width:100%}
textarea.field{min-height:140px;resize:vertical}
.thinking{display:flex;align-items:center;gap:12px;font-weight:700;color:var(--teal)}
.spinner{width:26px;height:26px;border-radius:50%;border:4px solid var(--teal-soft);border-top-color:var(--teal);animation:spin 1s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}

/* check */
.result{display:flex;flex-direction:column;gap:12px}
.prod{display:flex;gap:14px;align-items:center}
.prod img{width:72px;height:72px;object-fit:contain;border-radius:12px;background:#fff;border:1px solid var(--line);flex:none}
.warn{display:flex;gap:10px;align-items:flex-start;color:var(--red);font-weight:700}
.okline{display:flex;gap:10px;align-items:flex-start;color:var(--green);font-weight:700}
.verdict-big{display:flex;align-items:center;gap:14px;padding:14px;border-radius:16px}
.verdict-big b{font-family:var(--font-head);font-size:1.35rem;display:block}
.vb-true{background:var(--green-bg);color:var(--green)} .vb-partly{background:var(--amber-bg);color:var(--amber)} .vb-false{background:var(--red-bg);color:var(--red)} .vb-unclear{background:var(--sunk);color:var(--muted)}
.vmark{width:52px;height:52px;flex:none;border-radius:50%;background:currentColor;display:grid;place-items:center}
.vmark svg{width:30px;height:30px;stroke:var(--surface);fill:none;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
details.myth{border:1px solid var(--line);border-radius:14px;background:var(--surface)}
details.myth summary{list-style:none;padding:14px 16px;min-height:58px;display:flex;gap:10px;align-items:center;cursor:pointer;font-weight:700}
details.myth summary::-webkit-details-marker{display:none}
details.myth .body{padding:0 16px 16px;display:flex;flex-direction:column;gap:6px}
.vt{font-size:.78rem;font-weight:700;padding:3px 10px;border-radius:999px;white-space:nowrap}
.vt-true{color:var(--green);background:var(--green-bg)} .vt-partly{color:var(--amber);background:var(--amber-bg)} .vt-false{color:var(--red);background:var(--red-bg)}
.rule{display:grid;grid-template-columns:2.3rem 1fr;gap:12px;align-items:start}
.rule .n{width:2.3rem;height:2.3rem;border-radius:50%;background:var(--teal);color:var(--teal-ink);font-weight:700;display:grid;place-items:center;font-family:var(--font-head)}
.preview{max-height:200px;width:auto;border-radius:12px;align-self:flex-start;border:1px solid var(--line)}

/* shopping */
.aisle h3{color:var(--teal)}
.item{display:flex;gap:14px;align-items:flex-start;padding:12px 0;border-top:1px solid var(--line);cursor:pointer}
.item input{width:32px;height:32px;flex:none;accent-color:var(--teal);margin:2px 0 0}
.item.got .iname{text-decoration:line-through;color:var(--muted)}
.swap{display:block;font-size:.88rem;color:var(--amber);font-weight:700}
.addrow{display:flex;gap:10px}

/* tabs */
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:20;background:var(--surface);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);
  padding-bottom:env(safe-area-inset-bottom,0px);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
.tabs button{background:none;border:0;min-height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:.74rem;font-weight:700;color:var(--muted);position:relative}
.tabs svg{width:28px;height:28px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tabs button[aria-selected="true"]{color:var(--teal)}
.tabs button[aria-selected="true"]::after{content:"";position:absolute;top:0;left:25%;right:25%;height:4px;border-radius:0 0 4px 4px;background:var(--teal)}

/* sheets & overlays */
.sheet-bg{position:fixed;inset:0;background:rgba(10,25,20,.5);z-index:40;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--surface);width:100%;max-width:640px;max-height:88%;overflow:auto;border-radius:24px 24px 0 0;display:flex;flex-direction:column;gap:12px;
  padding:20px max(16px,env(safe-area-inset-right,0px)) calc(20px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}
.pick{display:flex;gap:12px;align-items:center;width:100%;text-align:left;min-height:64px;padding:8px 12px;border:2px solid var(--line);border-radius:14px;background:var(--sunk);font-weight:700}
.pick.cur{border-color:var(--teal)}
.pick .grow{display:flex;flex-direction:column}

/* cooking mode */
.cook{position:fixed;inset:0;z-index:50;background:var(--bg);display:flex;flex-direction:column;
  padding:calc(12px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}
.cook-in{max-width:640px;width:100%;margin:0 auto;display:flex;flex-direction:column;gap:16px;flex:1;min-height:0}
.cook-top{display:flex;align-items:center;gap:12px}
.progress{display:flex;gap:6px}
.progress span{flex:1;height:8px;border-radius:4px;background:var(--line)}
.progress span.on{background:var(--teal)}
.step{flex:1;overflow:auto;display:flex;flex-direction:column;gap:20px;justify-content:center}
.step-n{font-family:var(--font-head);font-weight:900;color:var(--teal);font-size:1rem;letter-spacing:.06em;text-transform:uppercase}
.step-t{font-size:1.6rem;line-height:1.35;font-weight:700}
.cook-nav{display:grid;grid-template-columns:1fr 2fr;gap:10px}
.timer-big{font-family:var(--font-head);font-weight:900;font-size:2.6rem;font-variant-numeric:tabular-nums}

.timer-bar{position:fixed;left:0;right:0;top:0;z-index:60;display:flex;gap:8px;justify-content:center;flex-wrap:wrap;
  padding:calc(8px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 8px max(12px,env(safe-area-inset-left,0px));pointer-events:none}
.tchip{pointer-events:auto;display:flex;align-items:center;gap:10px;background:var(--ink);color:var(--bg);border-radius:999px;padding:8px 8px 8px 16px;font-weight:700;box-shadow:0 6px 20px rgba(0,0,0,.25)}
.tchip .tt{font-variant-numeric:tabular-nums;font-family:var(--font-head);font-size:1.1rem}
.tchip button{border:0;border-radius:999px;background:var(--bg);color:var(--ink);min-height:40px;padding:0 14px;font-weight:700}
.tchip.ring{background:var(--sun);color:#2A1A00;animation:pulse 1s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(1.04)}}

/* scanner */
.scanner{position:fixed;inset:0;z-index:55;background:#000;display:flex;flex-direction:column}
.scanner video{flex:1;width:100%;object-fit:cover;min-height:0}
.scanner .frame{position:absolute;left:10%;right:10%;top:35%;height:22%;border:4px solid var(--sun);border-radius:18px;box-shadow:0 0 0 2000px rgba(0,0,0,.35)}
.scanner .bar{position:absolute;left:0;right:0;bottom:0;padding:16px max(16px,env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;gap:10px;background:linear-gradient(transparent,rgba(0,0,0,.8))}
.scanner .msg{color:#fff;font-weight:700;text-align:center;font-size:1.1rem}

/* welcome */
.welcome{min-height:70vh;display:flex;flex-direction:column;justify-content:center;gap:20px}
.welcome .logo{width:96px;height:96px;border-radius:28px;background:var(--teal);display:grid;place-items:center}
.welcome .logo svg{width:58px;height:58px;stroke:#fff;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
label.lab{font-weight:700;display:flex;flex-direction:column;gap:6px}
.code{font-family:var(--font-head);font-weight:900;font-size:1.6rem;letter-spacing:.08em}

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

/* printing */
.print-area{display:none}
@media print{
  @page{size:A4;margin:14mm}
  body{background:#fff;color:#000}
  #app,.tabs,.timer-bar,.sheet-bg,.cook,.scanner{display:none!important}
  .print-area{display:block;font-family:var(--font-body);font-size:12pt;color:#000}
  .print-area h1{font-size:22pt;margin:0 0 8pt}
  .print-area h2{font-size:14pt;margin:12pt 0 4pt}
  .print-area table{width:100%;border-collapse:collapse}
  .print-area th,.print-area td{border:1px solid #555;padding:6pt;text-align:left;vertical-align:top}
  .print-area th{background:#e8efec}
  .pbox{display:inline-block;width:12pt;height:12pt;border:1.5pt solid #000;margin-right:6pt;vertical-align:-2pt}
  .pcols{columns:2;column-gap:18pt}
  .pcols div{break-inside:avoid}
  .pfoot{margin-top:12pt;font-size:10.5pt}
}

.has-timers .wrap{padding-top:calc(80px + env(safe-area-inset-top,0px))}
.has-timers .cook{padding-top:calc(78px + env(safe-area-inset-top,0px))}

.whotag{display:table;margin-top:4px;font-size:.8rem;font-weight:700;padding:2px 10px;border-radius:999px;background:var(--teal-soft);color:var(--teal)}
.whotag.add{background:var(--sun-soft);color:var(--sun-ink)}
.avatar{width:46px;height:46px;flex:none;border-radius:50%;background:var(--teal-soft);color:var(--teal);display:grid;place-items:center;font-family:var(--font-head);font-weight:900;font-size:1.2rem}
