:root {
  --bg: #f3f5f0; --card: #ffffff; --sub: #f7f8f4; --text: #111827; --muted: #6b7280;
  --accent: #15803d; --accent-soft: #dcfce7; --border: #e5e7eb; --danger: #dc2626; --warn: #d97706;
}
body.dark {
  --bg: #0b1120; --card: #151e32; --sub: #1e293b; --text: #f3f4f6; --muted: #94a3b8;
  --accent: #22c55e; --accent-soft: #14532d; --border: #283548; --danger: #ef4444; --warn: #f59e0b;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); margin: 0; padding-bottom: 84px;
}
header.topbar {
  position: sticky; top: 0; z-index: 40; background: var(--card); border-bottom: 1px solid var(--border);
  padding: 12px 14px; display: flex; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: var(--accent); }
.brand img { width: 28px; height: 28px; }
.card {
  background: var(--card); border-radius: 18px; padding: 15px; margin: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05); border: 1px solid var(--border);
}
.item-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--sub); border-radius: 12px; padding: 9px 10px; margin: 7px 0;
}
.item-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.thumb {
  width: 50px; height: 50px; border-radius: 10px; object-fit: contain;
  background: #fff; padding: 3px; flex-shrink: 0; border: 1px solid var(--border);
}
.rec-img { width: 100%; height: 195px; object-fit: cover; border-radius: 14px; }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.badge.deal { background: #fef3c7; color: #b45309; }
.macro-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  background: var(--sub); border-radius: 12px; padding: 10px 6px; margin: 10px 0; text-align: center;
}
.macro-grid small { color: var(--muted); font-size: 11px; display: block; }
.macro-grid b { font-size: 14px; }
input, select, button {
  width: 100%; padding: 10px 12px; margin: 4px 0; border-radius: 11px; font-size: 14px;
  border: 1px solid var(--border); background: var(--sub); color: var(--text);
}
button {
  background: var(--accent); color: #fff; border: none; font-weight: 700; cursor: pointer;
}
button.sec { background: var(--sub); color: var(--text); border: 1px solid var(--border); }
button.del { background: var(--danger); color: #fff; width: auto; padding: 7px 10px; font-size: 12px; }
button.sm { width: auto; padding: 7px 11px; font-size: 12px; white-space: nowrap; }
.row { display: flex; gap: 8px; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bar-bg { background: var(--border); border-radius: 99px; height: 10px; overflow: hidden; margin: 6px 0; }
.bar-fill { background: var(--accent); height: 100%; transition: width .3s; }
.bar-fill.over { background: var(--danger); }
.checked { opacity: .55; text-decoration: line-through; }
.hidden { display: none !important; }
nav.bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: var(--card);
  border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 6px 2px;
}
nav.bottom button {
  width: auto; margin: 0; padding: 6px 6px; background: transparent; color: var(--muted);
  font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 10px;
}
nav.bottom button.active { color: var(--accent); background: var(--accent-soft); }
/* Kochmodus Overlay */
#cookModal {
  position: fixed; inset: 0; z-index: 100; background: var(--bg); padding: 16px; overflow-y: auto;
}
.toast {
  position: fixed; bottom: 82px; left: 50%; transform: translateX(-50%); z-index: 120;
  background: #111827; color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 13px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
#qrReader { width: 100%; border-radius: 12px; overflow: hidden; margin: 8px 0; }
