/* ---------------------------------------------------------------- tokens */

:root {
  --bg: #F5F1EA;
  --surface: #FFFFFF;
  --surface-2: #FAF7F2;
  --ink: #1E1C19;
  --ink-2: #4A453E;
  --muted: #8C857A;
  --line: #ECE6DC;
  --line-2: #DCD4C6;
  --accent: #2F6B4F;
  --accent-ink: #FFFFFF;
  --accent-soft: #E2EEE6;
  --warn: #D9822B;
  --warn-soft: #FCEBD6;
  --danger: #C8473D;

  --p-rd: #2A8089;
  --p-rd-soft: #DDEFF0;
  --p-mel: #D6577A;
  --p-mel-soft: #FBE4EA;
  --p-rv: #6B5BDB;
  --p-rv-soft: #E9E6FB;

  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 1px 2px rgba(40, 32, 20, .04), 0 8px 28px rgba(40, 32, 20, .06);
  --shadow-lg: 0 -8px 40px rgba(40, 32, 20, .16);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  --gutter: clamp(16px, 4vw, 32px);
  --tabbar-h: 74px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161513; --surface: #201E1B; --surface-2: #26241F; --ink: #F3EFE8; --ink-2: #CFC8BC;
    --muted: #958D80; --line: #2F2C27; --line-2: #3D3933; --accent: #6FBF94; --accent-ink: #10231A;
    --accent-soft: #1F3329; --warn: #F0A257; --warn-soft: #3A2A18;
    --p-rd: #4FB3BC; --p-rd-soft: #193436; --p-mel: #EE7F9C; --p-mel-soft: #3A1F28; --p-rv: #9B8EF0; --p-rv-soft: #26213F;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

.p-rd { --c: var(--p-rd); --c-soft: var(--p-rd-soft); }
.p-mel { --c: var(--p-mel); --c-soft: var(--p-mel-soft); }
.p-rv { --c: var(--p-rv); --c-soft: var(--p-rv-soft); }

/* ---------------------------------------------------------------- basis */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; touch-action: manipulation; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

.main {
  max-width: 780px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 24px) var(--gutter) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.boot { font-size: 48px; text-align: center; margin-top: 30vh; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .7; } }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); font-weight: 500; }
.sub { color: var(--muted); font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
.empty-note { color: var(--muted); padding: 12px 4px; font-size: 15px; }

/* ---------------------------------------------------------------- koppen */

.home-head, .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 4px 4px 4px; }
.home-head h1, .page-head h1 { font: 600 clamp(30px, 6vw, 42px)/1.05 var(--display); letter-spacing: -.01em; margin-top: 4px; }
.home-tools, .head-actions { display: flex; align-items: center; gap: 8px; }
.clock { font: 500 clamp(28px, 5vw, 40px)/1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ---------------------------------------------------------------- knoppen */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line-2); font-weight: 600; font-size: 15px;
  transition: transform .15s ease, background .2s;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.big { height: 52px; padding: 0 28px; font-size: 16px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn.armed { background: var(--danger); color: #fff; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2); flex: none;
  transition: transform .15s ease, background .2s, color .2s;
  font-size: 22px; font-weight: 500;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.ghost { background: transparent; border-color: transparent; }
.icon-btn.small { width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); }
.icon-btn.small .ic { width: 16px; height: 16px; }
.icon-btn.filled { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.icon-btn.danger { color: var(--danger); }
.icon-btn.armed { background: var(--danger); color: #fff; border-color: var(--danger); }
.pill-btn {
  height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1.5px solid var(--line-2); color: var(--ink-2);
}
.pill-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.link-btn { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.link-btn .ic { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- kaarten */

.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; display: block; width: 100%;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 8px; }
.card-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip-btn { background: var(--c-soft); padding: 5px 11px 5px 9px; border-radius: 999px; color: var(--ink); }
.legend { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--c); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .02em;
}
.avatar.lg { width: 52px; height: 52px; font-size: 16px; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge.hot { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.soft { color: var(--muted); }

/* ---------------------------------------------------------------- overzicht */

.tonight {
  display: flex; align-items: center; gap: 18px; width: 100%;
  padding: 22px; border-radius: 28px;
  background: linear-gradient(135deg, var(--c-soft), var(--surface) 75%);
  box-shadow: var(--shadow); border: 1.5px solid color-mix(in srgb, var(--c) 18%, transparent);
  transition: transform .2s ease;
}
.tonight:active { transform: scale(.985); }
.tonight-emoji { font-size: 56px; line-height: 1; width: 80px; height: 80px; display: grid; place-items: center; background: var(--surface); border-radius: 24px; flex: none; box-shadow: var(--shadow); }
.tonight-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tonight-body strong { font: 600 clamp(22px, 4.4vw, 30px)/1.15 var(--display); }
.tonight-hint { font-size: 14px; color: var(--muted); }

.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.strip-day {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px;
  border-radius: 18px; background: var(--surface-2); border: 1.5px solid transparent; min-width: 0;
  position: relative; transition: transform .15s;
}
.strip-day:active { transform: scale(.95); }
.strip-day.today { background: var(--c-soft); border-color: var(--c); }
.strip-day.past { opacity: .5; }
.sd-name { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.strip-day.today .sd-name { color: var(--c); }
.sd-emoji { font-size: 28px; line-height: 1.1; height: 32px; display: grid; place-items: center; }
.sd-empty { font-size: 22px; color: var(--line-2); font-weight: 400; }
.sd-title { font-size: 12px; line-height: 1.25; font-weight: 600; text-align: center; width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 30px; color: var(--ink-2); }
.sd-cook { width: 22px; height: 4px; border-radius: 4px; background: var(--c); }

.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.person-card {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--c-soft);
  transition: transform .15s;
}
.person-card:active { transform: scale(.97); }
.pc-ring { position: relative; width: 52px; height: 52px; flex: none; }
.pc-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.ring { width: 52px; height: 52px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring-bg { stroke: color-mix(in srgb, var(--c) 18%, transparent); }
.ring-fg { stroke: var(--c); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.3, 1.4, .5, 1); }
.pc-text { display: flex; flex-direction: column; min-width: 0; }
.pc-text b { font-size: 16px; }
.pc-text span { font-size: 13px; color: var(--ink-2); }

.shop-teaser { display: flex; align-items: center; gap: 16px; }
.shop-teaser > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.shop-teaser strong { font-size: 18px; }
.shop-teaser-icon { font-size: 30px; width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); display: grid; place-items: center; }

/* ---------------------------------------------------------------- weeknavigatie & segmenten */

.weeknav { display: flex; align-items: center; gap: 10px; }
.weeknav-label { flex: 1; display: flex; flex-direction: column; align-items: center; }
.weeknav-label b { font-size: 17px; }
.weeknav-label span { font-size: 14px; color: var(--muted); }

.segs { display: flex; gap: 6px; padding: 5px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: none; }
.segs::-webkit-scrollbar { display: none; }
.segs.two .seg { flex: 1; }
.seg {
  flex: 1 0 auto; height: 42px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); white-space: nowrap;
  transition: background .2s, color .2s;
}
.seg.on { background: var(--c, var(--ink)); color: var(--surface); }
.seg-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 12px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.seg.on .seg-count { background: color-mix(in srgb, var(--surface) 22%, transparent); color: var(--surface); }

/* ---------------------------------------------------------------- maaltijden */

.meals { display: flex; flex-direction: column; gap: 10px; }
.divider { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; padding: 10px 6px 0; }
.meal-row {
  display: grid; grid-template-columns: minmax(118px, 30%) 1fr; gap: 14px; align-items: center;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 14px 18px;
  border-left: 5px solid var(--c);
}
.meal-row.today { box-shadow: 0 0 0 2px var(--c), var(--shadow); }
.mr-day { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.mr-day b { font-size: 17px; }
.mr-day > span { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.mr-main {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: var(--surface-2);
  min-height: 72px; transition: transform .15s, background .2s;
}
.mr-main:active { transform: scale(.98); }
.mr-main.empty { border: 2px dashed var(--line-2); background: transparent; color: var(--muted); }
.mr-emoji { font-size: 34px; width: 44px; display: grid; place-items: center; flex: none; }
.mr-text { display: flex; flex-direction: column; min-width: 0; }
.mr-text b { font-size: 17px; line-height: 1.25; }
.mr-text span { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- afvinken */

.tasks { display: flex; flex-direction: column; }
.task {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 6px; width: 100%;
  border-top: 1px solid var(--line); cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: opacity .3s;
}
.tasks .task:first-child, .cat h3 + .task { border-top: 0; }
.task.shop { --c: var(--accent); }
.check {
  width: 34px; height: 34px; border-radius: 50%; flex: none; position: relative;
  border: 2.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center;
  transition: background .25s ease, border-color .25s ease, transform .15s ease;
}
.task:active .check { transform: scale(.88); }
.check svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .3s ease .08s; }
.task.done .check { background: var(--c); border-color: var(--c); }
.task.done .check path { stroke-dashoffset: 0; }
.check.pop { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

.t-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.t-title {
  font-size: 17px; font-weight: 600; align-self: flex-start;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 0 2px;
  transition: background-size .35s ease, color .3s ease;
}
.task.done .t-title { background-size: 100% 2px; color: var(--muted); }
.t-sub { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.t-meta { font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.task.done .t-meta { color: var(--muted); }
.t-actions { display: flex; gap: 6px; }
.task.off-week .t-title { color: var(--muted); }

.person-section { border-top: 5px solid var(--c); }
.ps-head { display: flex; align-items: center; gap: 12px; }
.ps-title { flex: 1; display: flex; flex-direction: column; }
.ps-title b { font-size: 19px; }
.ps-title span { font-size: 14px; color: var(--muted); }
.all-done { font-size: 14px; font-weight: 700; color: var(--c); background: var(--c-soft); padding: 6px 12px; border-radius: 999px; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.pbar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin: 14px 0 6px; }
.pbar i { display: block; height: 100%; border-radius: 8px; background: var(--c, var(--accent)); transition: width .6s cubic-bezier(.3, 1.3, .5, 1); }

/* ---------------------------------------------------------------- boodschappen */

.list-card { padding-top: 16px; }
.list-progress { display: flex; flex-direction: column; }
.list-progress b { font: 600 24px/1 var(--display); }
.list-progress .pbar { margin: 10px 0 4px; }
.covers { font-size: 14px; color: var(--ink-2); padding: 6px 0 4px; }
.in-pantry { font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0 0; }
.cat { margin-top: 18px; }
.cat h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 6px 4px; }
.cat.warn h3 { color: var(--warn); }
.cat.warn .task { --c: var(--warn); }

.mini-chip {
  height: 34px; padding: 0 13px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface-2); border: 1.5px solid var(--line); color: var(--ink-2); white-space: nowrap;
}
.mini-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mini-chip.low { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.mini-chip.taken { opacity: .55; }
.day-chips .mini-chip[class*="p-"] { border-color: color-mix(in srgb, var(--c) 40%, transparent); }

.add-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.add-row input, .add-row textarea {
  flex: 1; min-width: 0; height: 48px; padding: 12px 16px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--surface-2); outline: none; resize: none; font-size: 16px;
}
.add-row input:focus, .add-row textarea:focus { border-color: var(--ink-2); }

.pantry-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pantry-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 12px; border-radius: 999px;
  background: var(--surface-2); border: 1.5px solid var(--line); font-weight: 600; font-size: 15px;
  transition: background .2s, color .2s, transform .15s;
}
.pantry-chip:active { transform: scale(.94); }
.pantry-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.pantry-chip.low { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.pantry-chip.low .dot { background: var(--warn); }
.pantry-chip .x { display: grid; place-items: center; color: var(--danger); }
.pantry-chip .x .ic { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- recepten */

.search {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); color: var(--muted);
}
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; color: var(--ink); }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.recipe-card {
  display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); min-height: 150px; transition: transform .15s;
}
.recipe-card:active { transform: scale(.97); }
.rc-emoji { font-size: 40px; line-height: 1; margin-bottom: auto; padding-bottom: 14px; }
.recipe-card b { font-size: 17px; line-height: 1.25; }
.recipe-card .muted { font-size: 13px; }

/* ---------------------------------------------------------------- sheets */

.sheet-root { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-root.open { pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 16, 10, .32); opacity: 0; transition: opacity .28s ease; }
.sheet {
  position: absolute; left: 50%; bottom: 0; width: min(680px, 100%); max-height: 92vh; max-height: 92dvh;
  transform: translate(-50%, 104%); transition: transform .32s cubic-bezier(.2, .9, .3, 1);
  background: var(--surface); border-radius: 30px 30px 0 0; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.sheet-root.show .sheet-backdrop { opacity: 1; }
.sheet-root.show .sheet { transform: translate(-50%, 0); }
.sheet-grip { width: 44px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 10px auto 0; flex: none; }
.sheet-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 10px var(--gutter) calc(env(safe-area-inset-bottom) + 24px); display: flex; flex-direction: column; gap: 16px;
}
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 6px; }
.sheet-head h2 { font: 600 26px/1.15 var(--display); }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; }
.foot-right { display: flex; gap: 8px; }


.picker-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; }
.picker-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; min-height: 58px; background: var(--surface-2); transition: background .15s, transform .15s; }
.picker-item:active { transform: scale(.98); }
.picker-item.on { background: var(--accent-soft); }
.picker-item b { flex: 1; font-size: 16px; }
.pi-emoji { font-size: 28px; width: 38px; text-align: center; }
.quick-meals { display: flex; flex-wrap: wrap; gap: 8px; }

.cook-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cook-option { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; border-radius: 22px; background: var(--surface-2); border: 2px solid transparent; }
.cook-option.on { background: var(--c-soft); border-color: var(--c); }
.cook-option .muted { font-size: 12px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.field input, .field textarea, .editor-top input {
  width: 100%; padding: 13px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface-2);
  outline: none; font-size: 16px;
}
.field input:focus, .field textarea:focus { border-color: var(--ink-2); }
.field .segs { box-shadow: none; background: var(--surface-2); }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line); font-size: 16px; }
.ing-list li:first-child { border-top: 0; }
.notes { background: var(--surface-2); border-radius: 16px; padding: 14px 16px; font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.plan-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--accent-soft); }
.plan-week { display: flex; flex-direction: column; gap: 6px; }
.plan-week .muted { font-size: 13px; }

.editor-top { display: flex; gap: 12px; align-items: flex-end; }
.editor-top .grow { flex: 1; }
.emoji-input { width: 64px !important; height: 52px; text-align: center; font-size: 28px !important; padding: 0 !important; }
.emoji-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-top: -6px; }
.emoji-btn { font-size: 24px; width: 42px; height: 42px; border-radius: 12px; flex: none; }
.emoji-btn:active { background: var(--surface-2); }
.ing-row { display: grid; grid-template-columns: 1fr 170px 34px; gap: 6px; align-items: center; margin-bottom: 6px; }
.ing-row input, .ing-row select {
  min-width: 0; height: 44px; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 15px; outline: none;
}
.ing-row select { appearance: none; -webkit-appearance: none; font-size: 13px; color: var(--ink-2); }

.settings { display: flex; flex-direction: column; gap: 4px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; border-top: 1px solid var(--line); width: 100%; }
.setting:first-child { border-top: 0; }
.setting > span:first-child { display: flex; flex-direction: column; font-weight: 600; }
.setting small { font-size: 13px; color: var(--muted); font-weight: 500; }
.switch { width: 52px; height: 32px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(20px); }

/* ---------------------------------------------------------------- login */

.login { min-height: 70vh; display: grid; place-items: center; }
.login-card { width: min(420px, 100%); background: var(--surface); border-radius: 30px; box-shadow: var(--shadow); padding: 32px 28px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.login-logo { font-size: 52px; }
.login-card h1 { font: 600 34px/1.1 var(--display); }
.login-card p { color: var(--muted); }
.login-card form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.login-card input { height: 52px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 17px; outline: none; text-align: center; }
.pw-field { position: relative; }
.pw-field input { width: 100%; padding: 0 56px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); }
.pw-toggle[aria-pressed="true"] { color: var(--ink); }
.form-error { color: var(--danger) !important; font-size: 14px; min-height: 20px; }

/* ---------------------------------------------------------------- tabbar */

.tabbar {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 12px); transform: translateX(-50%);
  width: min(620px, calc(100% - 24px)); height: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-radius: 28px; box-shadow: 0 10px 40px rgba(40, 32, 20, .14), 0 0 0 1px var(--line); z-index: 40;
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 22px;
  color: var(--muted); font-size: 11.5px; font-weight: 600; transition: background .2s, color .2s;
}
.tabbar svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* ---------------------------------------------------------------- toast & effecten */

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + var(--tabbar-h) + 26px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: opacity .25s, transform .3s cubic-bezier(.3, 1.4, .5, 1); white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.spark { position: absolute; width: 7px; height: 7px; border-radius: 50%; margin: -3.5px 0 0 -3.5px; animation: spark .6s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes spark { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.confetti { position: absolute; top: -20px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--drift), 110vh) rotate(var(--rot)); } }

/* ---------------------------------------------------------------- telefoon */

@media (max-width: 600px) {
  .people { grid-template-columns: 1fr; }
  .strip { gap: 5px; }
  .strip-day { padding: 10px 2px 8px; border-radius: 14px; }
  .sd-title { display: none; }
  .sd-emoji { font-size: 24px; }
  .tonight { padding: 16px; gap: 14px; }
  .tonight-emoji { width: 64px; height: 64px; font-size: 42px; border-radius: 20px; }
  .tonight .avatar { display: none; }
  .meal-row { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .mr-day { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .mr-day > span { margin: 0; flex: 1; }
  .ing-row { grid-template-columns: 1fr 130px 34px; }
  .recipe-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .recipe-card { min-height: 130px; padding: 16px; }
  .tabbar span { font-size: 10.5px; }
  .clock { display: none; }
  .head-actions .btn { padding: 0 14px; }
}
