/* Liquid glass in de stijl van slim-home.nl, maar licht genoeg voor een telefoon:
   blur alleen op tabbalk, pop-ups en melding; geen bewegende wolken; geen animaties op hele blokken. */
:root {
  --bg: #f7f6f3; --bg2: #eeecea; --ink: #1a1917; --ink2: #6b6860; --ink3: #9c9a94;
  --accent: #2d5be3; --accent2: #7c6cf6; --teal: #17b8a6; --accent-soft: rgba(45,91,227,.1);
  --red: #d9344a; --red-soft: rgba(217,52,74,.1); --amber: #b26a00; --amber-soft: rgba(245,166,35,.18);
  --glass: rgba(255,255,255,.72); --glass-strong: rgba(255,255,255,.88); --glass-border: rgba(255,255,255,.85);
  --glass-shadow: 0 6px 24px rgba(31,35,45,.07), inset 0 1px 0 rgba(255,255,255,.9);
  --hair: rgba(26,25,23,.08); --dish: #fffefc;
  --btn: #1a1917; --on-btn: #fff; --btn-shadow: 0 6px 20px rgba(26,25,23,.2);
  --ah: #2d8cf0; --jumbo: #f5b800; --lidl: #2d5be3;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --serif: "DM Serif Display", "Iowan Old Style", Georgia, serif; --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --blob1: rgba(124,108,246,.24); --blob2: rgba(45,91,227,.15); --blob3: rgba(23,184,166,.18); --blob4: rgba(255,170,120,.18);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101012; --bg2: #18181b; --ink: #f4f3f0; --ink2: #a8a59e; --ink3: #77746e;
    --accent: #7d9bff; --accent2: #a597ff; --teal: #3fd6c3; --accent-soft: rgba(125,155,255,.16);
    --red: #ff7185; --red-soft: rgba(255,113,133,.16); --amber: #ffbe5c; --amber-soft: rgba(255,190,92,.16);
    --glass: rgba(38,38,44,.78); --glass-strong: rgba(38,38,44,.92); --glass-border: rgba(255,255,255,.09);
    --glass-shadow: 0 6px 24px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06);
    --hair: rgba(255,255,255,.09); --dish: #1e1e24; --btn: #f4f3f0; --on-btn: #101012; --btn-shadow: 0 6px 24px rgba(0,0,0,.5);
    --blob1: rgba(124,108,246,.2); --blob2: rgba(45,91,227,.18); --blob3: rgba(23,184,166,.12); --blob4: rgba(255,140,100,.08);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; touch-action: manipulation; }
button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: pointer; }
/* vaste pastelwolken: puur een achtergrond, geen blur-filter en geen animatie */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 40% at 10% 0%, var(--blob1), transparent 70%), radial-gradient(50% 35% at 100% 12%, var(--blob2), transparent 70%),
              radial-gradient(60% 40% at 90% 100%, var(--blob3), transparent 70%), radial-gradient(50% 35% at 0% 90%, var(--blob4), transparent 70%); }

/* kop */
#top { text-align: center; max-width: 680px; margin: 0 auto; padding: calc(22px + env(safe-area-inset-top, 0px)) 22px 4px; position: relative; }
#top .sub { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); padding: 6px 13px; border-radius: 999px; }
#top .sub::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 { font: 400 38px/1.08 var(--serif); letter-spacing: -.01em; margin: 14px 0 0; }
h1 em { font-style: italic; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.badge { position: absolute; right: 22px; top: calc(24px + env(safe-area-inset-top, 0px)); font-size: 11.5px; font-weight: 600; background: var(--amber-soft); color: var(--amber); padding: 5px 12px; border-radius: 999px; }
main { max-width: 680px; margin: 0 auto; padding: 4px 16px calc(150px + var(--safe-b)); }
#view.enter { animation: fadein .25s ease-out; }
@keyframes fadein { from { opacity: 0; } }

/* zwevende tabbalk (enige vaste glazen element met blur) */
nav { position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); width: min(calc(100% - 24px), 430px); display: flex; padding: 5px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: 0 8px 30px rgba(31,35,45,.16); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); z-index: 30; }
nav .slider { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 24px; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 4px 14px rgba(45,91,227,.35); transition: transform .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1); z-index: 0; pointer-events: none; }
nav button { position: relative; z-index: 1; flex: 1; min-height: 52px; border: 0; background: none; color: var(--ink2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 0; font-size: 10.5px; font-weight: 600; border-radius: 24px; }
nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
nav button span { pointer-events: none; }
nav button.active { color: #fff; }
.count { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--red); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; pointer-events: none; }

/* oppervlakken: doorschijnend wit met rand en hoogtelicht (geen backdrop-blur: te zwaar voor telefoons) */
.group, .note { background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); border-radius: 22px; }
.group { overflow: hidden; margin-bottom: 4px; }
h2 { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--ink2); margin: 28px 8px 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
h2::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); flex: none; }
.step { margin: 30px 6px 12px; text-align: center; }
.step .row1 { display: flex; align-items: center; justify-content: center; gap: 10px; }
.step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); flex: none; }
.step .tt { font: 400 21px/1.1 var(--serif); }
.step .hint { color: var(--ink2); font-size: 13.5px; margin: 5px 0 0; }
.cell { display: flex; align-items: center; gap: 14px; padding: 13px 18px; min-height: 56px; }
.cell + .cell { border-top: 1px solid var(--hair); }
.cell .grow { flex: 1; min-width: 0; }
.cell .t { font-weight: 500; }
.cell .s { color: var(--ink2); font-size: 13.5px; }
.cell .lead { width: 58px; height: 58px; border-radius: 16px; background: var(--bg2) center/cover; flex: none; display: grid; place-items: center; font-size: 26px; box-shadow: inset 0 0 0 1px var(--hair); }
.cell input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink3); flex: none; display: grid; place-items: center; background: transparent; margin: 0; }
.cell input[type=checkbox]:checked { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; }
.cell input[type=checkbox]:checked::after { content: "✓"; color: #fff; font-size: 15px; font-weight: 700; }
.cell.done .t { text-decoration: line-through; color: var(--ink3); }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 10px 12px; border-radius: 12px; }
.link:active { background: var(--accent-soft); }
.x { border: 1px solid var(--glass-border); background: var(--glass-strong); color: var(--ink2); width: 40px; height: 40px; border-radius: 50%; font-size: 15px; flex: none; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.x:active { background: var(--accent-soft); }
.logo { width: 24px; height: 24px; border-radius: 7px; flex: none; object-fit: contain; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.ah { background: var(--ah); } .dot.jumbo { background: var(--jumbo); } .dot.lidl { background: var(--lidl); } .dot.overig, .dot.handmatig, .dot.foto { background: var(--ink3); }
.muted { color: var(--ink2); font-size: 14px; }
.tag { font-size: 11.5px; font-weight: 600; color: var(--amber); background: var(--amber-soft); border-radius: 999px; padding: 2px 9px; margin-left: 8px; }
.soon { color: var(--red); font-weight: 600; }
.note { padding: 14px 18px; font-size: 14px; color: var(--ink2); margin: 14px 0; }
.warn { background: var(--amber-soft); color: var(--amber); border-radius: 18px; padding: 13px 18px; font-size: 14px; margin: 12px 0; }
.err { background: var(--red-soft); color: var(--red); border-radius: 18px; padding: 13px 18px; font-size: 14px; margin: 12px 0; }
.empty { text-align: center; padding: 70px 24px; color: var(--ink2); }
.empty .big { font-size: 54px; margin-bottom: 10px; }
.loading { text-align: center; padding: 80px 0; color: var(--ink2); }

/* toggles: grote, makkelijke tikvlakken */
.stores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.store { border: 2px solid transparent; background: var(--glass); box-shadow: var(--glass-shadow); border-radius: 20px; min-height: 84px; padding: 14px 6px; font-weight: 600; font-size: 14.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; }
.store .logo { width: 44px; height: 44px; border-radius: 12px; }
.store.on { background: var(--glass-strong); border-color: var(--accent); box-shadow: 0 6px 20px rgba(45,91,227,.18); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { border: 1px solid var(--glass-border); background: var(--glass); box-shadow: 0 2px 8px rgba(31,35,45,.05), inset 0 1px 0 rgba(255,255,255,.8); border-radius: 999px; padding: 0 17px; min-height: 46px; font-size: 15.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.chip .e { font-size: 18px; line-height: 1; }
.chip:active { opacity: .7; }
.chip.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border-color: transparent; font-weight: 600; box-shadow: 0 6px 16px rgba(45,91,227,.3); }
.disclosure { margin-top: 26px; text-align: center; }
.disclosure input { text-align: left; }
.disclosure summary { color: var(--ink2); font-size: 14.5px; padding: 10px; list-style: none; cursor: pointer; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: "＋  "; color: var(--accent); }
.disclosure[open] summary::before { content: "－  "; }
input[type=text] { width: 100%; min-height: 50px; padding: 0 18px; border-radius: 18px; border: 1px solid var(--glass-border); background: var(--glass-strong); color: var(--ink); box-shadow: var(--glass-shadow); outline: none; margin-top: 8px; font-size: 16px; }
input[type=text]:focus { box-shadow: 0 0 0 2px var(--accent); }

/* knoppen */
.btn { border: 0; background: var(--btn); color: var(--on-btn); font-weight: 600; font-size: 16px; min-height: 54px; padding: 0 26px; border-radius: 999px; width: 100%; box-shadow: var(--btn-shadow); }
.btn:active { opacity: .85; }
.btn:disabled { opacity: .55; }
.btn.small { width: auto; min-height: 46px; padding: 0 22px; font-size: 14.5px; }
.btn.tinted { background: var(--glass-strong); color: var(--ink); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }
.cta { position: fixed; left: 0; right: 0; bottom: calc(82px + var(--safe-b)); padding: 0 16px; z-index: 25; pointer-events: none; }
.cta .inner { max-width: 430px; margin: 0 auto; pointer-events: auto; }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: s .7s linear infinite; vertical-align: -3px; margin-right: 9px; }
@keyframes s { to { transform: rotate(360deg); } }

/* swipen */
.deck { position: relative; height: 560px; height: calc(100vh - 340px); height: calc(100svh - 340px); min-height: 430px; max-height: 620px; margin-top: 14px; }
.dish { position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: var(--dish); border: 1px solid var(--glass-border); border-radius: 30px; overflow: hidden; box-shadow: 0 2px 6px rgba(31,35,45,.06), 0 18px 44px rgba(31,35,45,.16); display: flex; flex-direction: column; touch-action: pan-y; -webkit-user-select: none; user-select: none; transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.dish.back { transform: scale(.95) translateY(14px); pointer-events: none; }
.dish.drag { transition: none; cursor: grabbing; }
.hero { position: relative; flex: 0 0 42%; margin: 8px 8px 0; border-radius: 24px; background: linear-gradient(135deg, var(--accent-soft), rgba(124,108,246,.14)) center/cover; display: grid; place-items: center; font-size: 66px; overflow: hidden; }
.hero.shimmer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); animation: sh 1.5s infinite; }
@keyframes sh { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hero .credit { position: absolute; right: 12px; bottom: 8px; font-size: 10px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.dish .body { padding: 16px 22px 24px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; }
.dish h3 { margin: 0 0 8px; font: 400 26px/1.12 var(--serif); letter-spacing: -.01em; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pill { font-size: 12.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 12px; }
.why { background: linear-gradient(135deg, var(--accent-soft), rgba(23,184,166,.12)); border-radius: 18px; padding: 11px 15px; font-size: 14.5px; font-weight: 500; margin: 14px 0; }
.ing { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ing span { font-size: 13.5px; padding: 5px 12px; border-radius: 999px; background: var(--bg2); }
.ing span.bonus { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.ing span.have { opacity: .45; text-decoration: line-through; }
.stamp { position: absolute; top: 24px; z-index: 3; padding: 5px 16px; border: 3.5px solid; border-radius: 16px; font: 400 28px/1.1 var(--serif); letter-spacing: .04em; opacity: 0; background: rgba(255,255,255,.8); pointer-events: none; }
.stamp.yes { right: 22px; color: #0f9d8d; border-color: #0f9d8d; transform: rotate(9deg); }
.stamp.no { left: 22px; color: var(--red); border-color: var(--red); transform: rotate(-9deg); }
.actions { display: flex; justify-content: center; gap: 30px; margin-top: 20px; }
.round { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--glass-border); background: var(--glass-strong); box-shadow: 0 8px 22px rgba(31,35,45,.14); font-size: 28px; }
.round:active { opacity: .7; }
.round.no { color: var(--red); } .round.yes { color: var(--teal); }

/* pop-up en melding (kleine oppervlakken, blur is hier goedkoop) */
.scrim { position: fixed; inset: 0; background: rgba(20,20,25,.35); z-index: 40; }
.sheet { position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 41; background: var(--glass-strong); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 30px; box-shadow: 0 20px 60px rgba(0,0,0,.25); padding: 12px 24px 24px; max-width: 640px; margin: 0 auto; max-height: 80vh; overflow: auto; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--hair); margin: 0 auto 16px; }
.sheet h3 { margin: 0 0 12px; font: 400 26px/1.1 var(--serif); }
.sheet .r { margin: 10px 0; }
#toast { position: fixed; bottom: calc(92px + var(--safe-b)); left: 50%; transform: translateX(-50%); background: var(--glass-strong); border: 1px solid var(--glass-border); color: var(--ink); padding: 12px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 500; z-index: 50; width: max-content; max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(31,35,45,.2); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation: none !important; transition-duration: .01ms !important; } }

/* inklapbare voorraad-secties */
.acc-wrap { margin-bottom: 12px; }
.acc { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--glass-border); background: var(--glass); box-shadow: var(--glass-shadow); border-radius: 22px; padding: 12px 16px; min-height: 64px; }
.acc:active { opacity: .8; }
.acc-e { font-size: 26px; width: 34px; text-align: center; flex: none; }
.acc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acc-n { font-weight: 600; font-size: 16.5px; }
.acc-p { color: var(--ink2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-c { background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; border-radius: 999px; padding: 2px 10px; flex: none; }
.chev { font-size: 24px; color: var(--ink3); transition: transform .25s; flex: none; line-height: 1; }
.acc.open .chev { transform: rotate(90deg); }
.acc.open { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.acc-body { margin-top: 6px; }

/* swipescherm: binnen het scherm passen zodat de pagina zelf niet scrolt (scrollen kan wel in het recept) */
body.on-swipe main { padding-bottom: calc(100px + var(--safe-b)); }
body.on-swipe .deck { height: calc(100vh - 372px); height: calc(100svh - 372px); min-height: 340px; max-height: 620px; }
