/* Essensplan – ruhig, hell/dunkel, Handy einspaltig, iPad zweispaltig */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --line: #e3e1da;
  --text: #1f201d;
  --muted: #6d6e68;
  --accent: #2f7356;
  --accent-ink: #ffffff;
  --accent-soft: #e2eee7;
  --warn: #8f4f15;
  --warn-soft: #f8eadb;
  --danger: #b3412f;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 2px 10px rgb(0 0 0 / .04);
  --tabbar-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151716;
    --surface: #1e211f;
    --surface-2: #272b28;
    --line: #2f3330;
    --text: #ecebe6;
    --muted: #a0a29b;
    --accent: #6cc196;
    --accent-ink: #0f1a14;
    --accent-soft: #1f3329;
    --warn: #e7a35f;
    --warn-soft: #3a2b1c;
    --danger: #ef8a78;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding: var(--safe-t) var(--safe-r) 0 var(--safe-l);
}
a { color: var(--accent); text-decoration: none; -webkit-touch-callout: none; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
code { font-size: .9em; background: var(--surface-2); padding: .05em .35em; border-radius: 5px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px calc(var(--tabbar-h) + var(--safe-b) + var(--dock-h, 0px) + 40px);
}
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.pad { padding: 24px 8px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.row.tight { gap: 4px; flex-wrap: nowrap; }
.count { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 1px 8px; vertical-align: middle; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 550; cursor: pointer;
  transition: background-color .15s, border-color .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); background: transparent; }
.btn.small { min-height: 40px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
.btn.big { min-height: 56px; font-size: 1.1rem; padding: 0 22px; border-radius: 14px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 1.1rem;
}
.icon-btn:disabled { opacity: .3; pointer-events: none; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text);
  font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap;
}
.pill.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill.small { min-height: 36px; font-size: .82rem; padding: 0 10px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: color-mix(in srgb, var(--muted), var(--text) 30%); background: var(--surface-2); border-radius: 99px; padding: 2px 9px; }
.chip svg { width: 14px; height: 14px; }
.chip.accent { background: var(--warn-soft); color: var(--warn); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Kopf / Wochen-Navigation ---------- */
.page-head { padding: 8px 0 14px; }
.weeknav { display: flex; align-items: center; gap: 4px; }
.weeknav-label { flex: 1; text-align: center; display: flex; flex-direction: column; }
.weeknav-label strong { font-size: 1.35rem; letter-spacing: -.01em; }
.weeknav-label span { color: var(--muted); font-size: .9rem; }
.weeknav .pill { margin-left: 4px; }

.banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); margin-bottom: 12px; color: var(--text); }
.banner.warn { background: var(--warn-soft); justify-content: space-between; flex-wrap: wrap; }
.banner.prep { background: var(--warn-soft); }
.banner.prep.inline { margin: 12px 0 0; }
.banner-emoji { font-size: 1.6rem; }

/* ---------- Woche ---------- */
.days { display: grid; gap: 10px; }
.day { position: relative; display: block; width: 100%; padding: 0; text-align: left; font: inherit; color: inherit; overflow: hidden; }
button.day { cursor: pointer; }
.day-link, button.day { display: flex; gap: 14px; padding: 12px; align-items: center; color: inherit; }
.day-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-right: 34px; }
.day-label { display: flex; gap: 8px; align-items: baseline; font-size: .82rem; }
.day-name { font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.day-date { color: var(--muted); }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--shadow); }
.day.today .day-name, .day.today .day-date { color: var(--accent); }
.day.past .thumb { opacity: .55; }
.day.past h3, .day.past .day-label { opacity: .7; }
.day.empty { border-style: dashed; background: transparent; box-shadow: none; }
.day-menu { position: absolute; top: 6px; right: 4px; color: var(--muted); }
.day .muted.clamp { font-size: .92rem; }

.thumb {
  width: 76px; height: 76px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background-size: cover; background-position: center; color: var(--muted);
}
.thumb span { font-size: 2.2rem; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .12)); }
.thumb.small { width: 48px; height: 48px; border-radius: 10px; }
.thumb.small span { font-size: 1.5rem; }
.thumb.ghost { border: 1.5px dashed var(--line); }
.actions-row { margin-top: 16px; justify-content: flex-end; }

.empty-state { padding: 32px 20px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.empty-state p { max-width: 420px; color: var(--muted); }
.big-emoji { font-size: 3rem; }

/* ---------- Rezept ---------- */
.recipe { margin: -12px -16px 0; }
.hero { position: relative; }
.hero-img { height: 190px; display: grid; place-items: center; background-size: cover; background-position: center; }
.hero-img span { font-size: 5.5rem; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .15)); }
.hero-back { position: absolute; top: 10px; left: 10px; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.recipe-head { padding: 18px 16px 6px; display: grid; gap: 10px; }
.recipe-head h1 { font-size: 1.75rem; }
.eyebrow { font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.lead { color: var(--muted); font-size: 1.05rem; }
.recipe-head .row { margin-top: 6px; }
.recipe-body { padding: 10px 16px; display: grid; gap: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }

.ings { padding: 16px; align-self: start; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.stepper .icon-btn { width: 44px; height: 44px; }
.stepper-val { min-width: 104px; text-align: center; font-size: .95rem; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li + li { border-top: 1px solid var(--line); }
.checklist label { display: flex; gap: 12px; align-items: center; padding: 10px 2px; cursor: pointer; }
.checklist input { position: absolute; opacity: 0; pointer-events: none; }
.box { width: 22px; height: 22px; flex: none; border: 1.8px solid color-mix(in srgb, var(--muted) 60%, transparent); border-radius: 7px; display: grid; place-items: center; color: transparent; transition: background-color .15s, border-color .15s; }
.box svg { width: 15px; height: 15px; stroke-width: 2.6; }
.checklist input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.checklist label.done .box, .shop-item.checked .box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.checklist .q { min-width: 70px; font-weight: 650; font-variant-numeric: tabular-nums; }
.checklist label.done .q, .checklist label.done .n { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }

.steps h2 { margin: 4px 0 10px; }
.steps ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.step { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-num { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.step-body { flex: 1; display: grid; gap: 6px; }
.step-body p { font-size: 1.02rem; }
.ing-ref { font-weight: 650; }
.note { padding: 14px 16px; margin-top: 12px; background: var(--accent-soft); border-color: transparent; }
.note strong { color: var(--accent); }

/* Timer */
.timer { display: inline-flex; align-items: center; gap: 4px; justify-self: start; }
.timer-main {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px;
  border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums;
}
.timer-main svg { width: 18px; height: 18px; }
.timer-main .tl { font-weight: 500; color: var(--muted); font-size: .88rem; }
.timer-main.run { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.timer-main.pause { border-style: dashed; }
.timer-main.done { background: var(--warn); color: #fff; border-color: var(--warn); animation: pulse 1s ease-in-out infinite; }
.timer-main.done .tl { color: #fff; }
.timer-reset { width: 44px; height: 44px; color: var(--muted); }
@keyframes pulse { 50% { transform: scale(1.05); } }
.timer.big .timer-main { min-height: 64px; font-size: 1.6rem; padding: 0 24px 0 18px; }
.timer.big .timer-main svg { width: 26px; height: 26px; }

/* ---------- Kochmodus ---------- */
body.cooking .tabbar, body.cooking #main { display: none; }
#cook { position: fixed; inset: 0; background: var(--bg); z-index: 30; overflow-y: auto; overscroll-behavior: contain; }
.cook-wrap {
  min-height: 100%; max-width: 900px; margin: 0 auto; display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + 16px) calc(var(--safe-b) + 16px) calc(var(--safe-l) + 16px);
}
.cook-head { display: flex; align-items: center; gap: 8px; }
.cook-title { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wake { font-size: .78rem; color: var(--muted); }
.wake.on { color: var(--accent); }
.cook-progress { display: flex; gap: 4px; margin: 10px 0 8px; }
.cook-progress span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.cook-progress span.on { background: var(--accent); }
.cook-slide { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 20px 4px; }
.cook-kicker { font-size: .9rem; font-weight: 650; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.cook-slide h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
.cook-text { font-size: clamp(1.25rem, min(3.6vw, 4.2vh), 2rem); line-height: 1.45; }
.cook-text.small { font-size: 1.2rem; color: var(--muted); }
.cook-ings { list-style: none; padding: 0; margin: 0; font-size: clamp(1.15rem, 3vw, 1.5rem); columns: 2 260px; column-gap: 32px; }
.cook-ings li { padding: 6px 0; break-inside: avoid; border-bottom: 1px solid var(--line); }
.cook-ings .q { font-weight: 700; }
.cook-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 calc(var(--safe-b) + 4px); margin-bottom: calc(-1 * var(--safe-b) - 16px); }
.cook-slide .btn.big { align-self: flex-start; }

/* ---------- Rezept-Pool ---------- */
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; min-height: 44px; font: inherit; color: var(--text); outline: none; box-shadow: none; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tagbar { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.pool { display: grid; gap: 10px; margin-top: 12px; }
.recipe-card { display: flex; gap: 14px; padding: 12px; color: inherit; align-items: center; }
.rc-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.rc-body .muted { font-size: .92rem; }

/* ---------- Editor ---------- */
.editor .page-head { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: calc(var(--safe-t) + 8px); margin-top: calc(-1 * var(--safe-t)); flex-wrap: nowrap; }
.editor .page-head h1 { font-size: 1.2rem; flex: 1; text-align: center; }
.editor-grid { display: grid; gap: 12px; }
.editor-grid > .card { padding: 16px; display: grid; gap: 12px; }
.field { display: grid; gap: 4px; }
.field > span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }
.field-row .grow { flex: 3; }
.emoji-field { max-width: 80px; }
.emoji-field input { text-align: center; font-size: 1.4rem; }
.timer-field { max-width: 110px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hint { font-size: .85rem; color: var(--muted); }
.step-edit { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.step-edit + .step-edit { margin-top: 10px; }
#steps-edit { display: grid; }
.ing-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.photo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Einkauf ---------- */
.shop-top { padding: 14px; display: grid; gap: 12px; margin-bottom: 12px; }
.progress { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.progress div { height: 100%; background: var(--accent); transition: width .3s; }
.add-item { display: flex; gap: 6px; }
.add-item input { flex: 1; min-width: 0; }
.add-item select { flex: 0 0 auto; width: 118px; padding-right: 4px; }
.add-item .btn { padding: 0 12px; }
.shop-sections { display: grid; gap: 12px; }
.shop-sec { padding: 12px 8px 6px 14px; }
.shop-sec h2 { font-size: 1rem; display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.shop-sec ul { list-style: none; margin: 0; padding: 0; }
.shop-item { display: flex; align-items: center; border-top: 1px solid var(--line); }
.shop-item:first-child { border-top: 0; }
.shop-toggle { flex: 1; display: flex; gap: 12px; align-items: center; padding: 10px 0; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.si-text { display: grid; }
.si-meta { font-size: .84rem; color: var(--muted); }
.shop-item .icon-btn { color: var(--muted); }
.shop-item.checked .si-name { color: var(--muted); text-decoration: line-through; }
.shop-item.checked { opacity: .7; }

/* ---------- Mehr ---------- */
.more-grid { display: grid; gap: 12px; }
.more-grid > .card { padding: 16px; display: grid; gap: 10px; align-content: start; }
.more-grid > .card > .btn { justify-self: start; }
.more-grid form.row { flex-wrap: nowrap; }
.more-grid form.row input { flex: 1; min-width: 0; }
.status-line { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--accent); }
.dot.offline, .dot.syncing { background: var(--warn); }
.dot.auth, .dot.error { background: var(--danger); }
.staples { list-style: none; padding: 0; margin: 0; }
.staples li { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); min-height: 44px; }
.staples li:first-child { border-top: 0; }
.staples li span:first-child { flex: 1; }

/* ---------- Tab-Leiste ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a { position: relative; flex: 1; max-width: 160px; height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .72rem; font-weight: 550; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--accent); }
.tab-dot { position: absolute; top: 9px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; display: none; }
.tab-dot.warn { display: block; background: var(--warn); }
.tab-dot.bad { display: block; background: var(--danger); }

/* ---------- Timer-Leiste ---------- */
#dock {
  position: fixed; z-index: 25; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
  width: min(560px, calc(100% - 20px)); display: grid; gap: 6px;
}
body.cooking #dock { bottom: calc(var(--safe-b) + 92px); z-index: 35; }
body.cooking.has-dock .cook-slide { padding-bottom: 90px; }
.dock-item {
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; border-radius: 14px;
  background: var(--text); color: var(--bg); box-shadow: 0 6px 20px rgb(0 0 0 / .18);
}
.dock-item .icon-btn { color: var(--bg); width: 44px; height: 44px; }
.dock-item .btn.small { min-height: 40px; }
.dock-label { flex: 1; min-width: 0; color: inherit; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.dock-item.done { background: var(--warn); color: #fff; animation: pulse 1s ease-in-out infinite; }
.dock-item.pause .dock-time { opacity: .6; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--dock-h, 0px) + 14px); width: max-content; animation: rise .2s ease-out;
  max-width: calc(100% - 24px); display: flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--bg); padding: 10px 10px 10px 16px; border-radius: 14px; box-shadow: 0 6px 20px rgb(0 0 0 / .2);
}
#toast .btn { background: transparent; color: var(--bg); border-color: rgb(127 127 127 / .5); }

/* ---------- Sheet ---------- */
#sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / .35); animation: fade .2s; cursor: pointer; }
.sheet {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(560px, 100%); max-height: 86vh; max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(var(--safe-b) + 18px); display: grid; gap: 12px;
  animation: up .22s ease-out;
}
.sheet-grip { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 4px; }
.sheet-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sheet-btn { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 50px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--surface-2); font: inherit; color: var(--text); cursor: pointer; text-align: left; list-style: none; }
.sheet-btn::-webkit-details-marker { display: none; }
.sheet-btn.danger { color: var(--danger); }
.sheet-details .row { padding: 10px 4px 0; }
.picker-list, .plan-days { display: grid; gap: 4px; max-height: 46vh; max-height: 46dvh; overflow-y: auto; overscroll-behavior: contain; }
.picker-item { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.picker-item > span { display: grid; }
.plan-days .picker-item { justify-content: space-between; min-height: 48px; border-bottom: 1px solid var(--line); border-radius: 0; }
.pd-day strong { display: inline-block; min-width: 28px; }
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } }
body.cooking #toast { bottom: calc(var(--safe-b) + 96px + var(--dock-h, 0px)); }
@media (orientation: landscape) and (max-height: 500px) {
  .cook-slide { justify-content: flex-start; padding: 8px 4px; gap: 10px; }
  .cook-slide h2 { font-size: 1.5rem; }
  .cook-progress { margin: 6px 0 4px; }
  body.cooking #dock { bottom: calc(var(--safe-b) + 76px); }
}
@media (max-width: 360px) {
  .add-item { flex-wrap: wrap; }
  .add-item input { flex-basis: 100%; }
  .add-item select { flex: 1; width: auto; }
  .shop-top .row.tight { flex-wrap: wrap; }
}
.shop-item .pill.small { flex: none; margin-left: 4px; }
#toast { max-width: min(560px, calc(100% - 24px)); }

/* ---------- Größere Bildschirme (iPad) ---------- */
/* ---------- Ergänzungen ---------- */
@media (hover: hover) {
  .btn:hover { border-color: color-mix(in srgb, var(--line), var(--text) 15%); }
  .icon-btn:hover { background: var(--surface-2); }
  .dock-item .icon-btn:hover { background: rgb(127 127 127 / .2); }
  .picker-item:hover { background: var(--surface-2); }
}
.icon-btn:active, .picker-item:active, .sheet-btn:active { background: var(--surface-2); }
body.sheet-open { overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.weeknav .rel { font-weight: 500; color: var(--muted); font-size: 1rem; }
.lunch { font-size: .84rem; color: var(--accent); }
.day-note { display: flex; gap: 6px; align-items: flex-start; font-size: .9rem; color: var(--text); }
.day-note svg { width: 16px; height: 16px; margin-top: 3px; color: var(--muted); }
.day.out { background: var(--surface); }
.day.out h3 { color: var(--muted); }
.hero-fav { position: absolute; top: 10px; right: 10px; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-fav.on, .btn.on { color: #a86f00; }
.btn.on svg .fill, .hero-fav.on .fill { fill: #d99a00; }
.fav-mark { color: #a86f00; }
@media (prefers-color-scheme: dark) { .hero-fav.on, .btn.on, .fav-mark { color: #f0b429; } }
.import-cta { padding: 14px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; background: var(--accent-soft); border-color: transparent; }
table.ing-preview { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.ing-preview td { padding: 5px 6px; border-top: 1px solid var(--line); vertical-align: top; }
table.ing-preview td:first-child { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; width: 1%; }
table.ing-preview td:last-child { text-align: right; font-size: .8rem; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.stack { display: grid; gap: 10px; }
.field-error { color: var(--danger); font-size: .88rem; min-height: 1px; }
.field-error:empty { display: none; }
.out-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.out-row > .muted { width: 100%; }
.swap-list { display: grid; gap: 2px; padding: 6px 0 0; }
.swap-list .picker-item { justify-content: space-between; min-height: 46px; }
.switch { margin-left: auto; width: 42px; height: 26px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background-color .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s; }
.sheet-btn.on .switch { background: var(--accent); }
.sheet-btn.on .switch::after { transform: translateX(16px); }
.sheet-btn > span:not(.switch) { flex: 1; }
.sheet-top { position: relative; min-height: 20px; }
.sheet-x { position: absolute; right: -8px; top: -4px; color: var(--muted); }
.sheet h2 { padding-right: 36px; }
.toast-x { color: var(--bg); width: 40px; height: 40px; }
.small-banner { padding: 8px 12px; font-size: .88rem; }
.shop-sec.pantry { background: var(--surface-2); box-shadow: none; }
details.shop-sec summary { list-style: none; cursor: pointer; }
details.shop-sec summary::-webkit-details-marker { display: none; }
details.pantry summary h2 svg { margin-left: auto; margin-right: 6px; color: var(--muted); transition: transform .15s; }
details.pantry[open] summary h2 svg { transform: rotate(180deg); }
details.pantry:not([open]) { padding-bottom: 10px; }
details.stocked summary h2 { color: var(--muted); }
details.stocked .shop-item { padding: 6px 6px 6px 0; gap: 8px; min-height: 48px; }
details.stocked .si-text { flex: 1; }
.order-list { list-style: none; padding: 0; margin: 0; counter-reset: o; }
.order-list li { display: flex; align-items: center; gap: 2px; border-top: 1px solid var(--line); min-height: 46px; counter-increment: o; }
.order-list li:first-child { border-top: 0; }
.order-list li span { flex: 1; }
.order-list li span::before { content: counter(o) ". "; color: var(--muted); }
.week-emojis { font-size: 1.1rem; letter-spacing: 2px; white-space: nowrap; }
.wake.off { line-height: 1.3; }
.sheet-ings { columns: 1; font-size: 1.15rem; }
/* Bildschirmtastatur offen: Leisten nicht über das Eingabefeld schieben */
@media (max-width: 719px) {
  body:has(input:focus:not([type=checkbox]), textarea:focus, select:focus) .tabbar,
  body:has(input:focus:not([type=checkbox]), textarea:focus, select:focus) #dock { display: none; }
}
@media (prefers-color-scheme: dark) {
  .timer-main.done, .dock-item.done, .timer-main.done .tl { color: #1a1208; }
}

@media (min-width: 720px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .days { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pool { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .shop-sections { display: block; columns: 2 340px; column-gap: 12px; }
  .shop-sec { break-inside: avoid; margin-bottom: 12px; }
  .more-grid { grid-template-columns: 1fr 1fr; }
  .recipe { margin: -12px -24px 0; }
  .hero-img { height: 300px; }
  .recipe-head, .recipe-body { padding-left: 24px; padding-right: 24px; }
  .recipe-body { grid-template-columns: minmax(280px, 1fr) 1.5fr; align-items: start; gap: 28px; }
  .ings { position: sticky; top: 12px; max-height: calc(100dvh - var(--tabbar-h) - var(--safe-b) - 24px); overflow-y: auto; overscroll-behavior: contain; }
  .editor-grid { grid-template-columns: 1fr 1fr; }
  .editor-grid .steps-edit { grid-column: 1 / -1; }
  .thumb { width: 88px; height: 88px; }
}
@media (min-width: 1000px) {
  .hero { max-width: 1120px; margin: 0 auto; }
  .hero-img { border-radius: 0 0 var(--radius) var(--radius); }
}
@media (prefers-color-scheme: dark) {
  .thumb:not(.has-img):not(.ghost), .hero-img:not(.has-img) { filter: brightness(.78) saturate(.85); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
