/* „Was ess ma heut?“ – Kreidetafel-Look: Schwarz, Creme, Olivgrün (aus Logo und App-Icon). */
:root {
  --bg: #0c0c0a;
  --card: #15190f;
  --card-2: #1d2216;
  --ink: #f0ecdd;
  --muted: #a9a794;
  --line: #2c3223;
  --brand: #889844;
  --brand-hi: #a4b65a;
  --brand-ink: #0c0c0a;
  --brand-soft: rgba(136, 152, 68, .16);
  --radius: 18px;
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 16' preserveAspectRatio='none'%3E%3Cpath d='M2 10 C50 5 120 3 298 4 L297 8 C230 7 160 9 120 10 C80 11 40 13 5 15 Z' fill='%23889844'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  padding: env(safe-area-inset-top) 0 calc(76px + env(safe-area-inset-bottom));
  min-height: 100vh;
  /* leichte Kreide-Körnung */
  background-image: radial-gradient(rgba(240, 236, 221, .025) 1px, transparent 1px);
  background-size: 3px 3px;
}
button { font: inherit; color: inherit; }
a { color: var(--brand-hi); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
h2, .brush-title {
  font-size: 1.55rem; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .01em;
}
h3 { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-hi); }
p { margin: 0 0 .7em; }
small { color: var(--muted); font-size: .82em; }
b, strong { font-weight: 700; }

main { max-width: 560px; margin: 0 auto; padding: 8px 16px 24px; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; max-width: 560px; margin: 0 auto; padding: 14px 16px 10px; background: var(--bg); }
.top h1 { font-size: 1.15rem; margin: 0; flex: 1; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; }
.back { border: 0; background: none; font-size: 2.1rem; line-height: 1; padding: 0 8px 4px 0; cursor: pointer; color: var(--brand-hi); }

/* Marke oben auf „Heute“ */
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 4px; }
.brandbar img { height: 74px; width: auto; display: block; mix-blend-mode: lighten; }
.date { color: var(--muted); padding: 10px 2px 12px; font-size: .95rem; }
.date .wd { color: var(--ink); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 1.3rem; letter-spacing: .02em; }

.card { background: var(--card); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; border: 1px solid var(--line); }
.card.center, .center { text-align: center; }
.card.done { background: var(--brand-soft); border-color: rgba(136, 152, 68, .35); }
.card.list { padding: 4px 0; }
.big { font-size: 2.6rem; margin-bottom: 6px; }

/* Pinselstrich unter großen Titeln */
.stroke { display: inline; background: var(--brush) no-repeat left bottom / 100% .32em; padding-bottom: .12em; }

.hero { padding: 0; overflow: hidden; cursor: pointer; }
.hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.hero-emoji { font-size: 3.2rem; text-align: center; padding: 16px 0 10px; background: var(--card-2); border-bottom: 1px solid var(--line); }
.swipe .hero-emoji { margin: -18px -18px 14px; border-radius: var(--radius) var(--radius) 0 0; }
.swipe img { width: calc(100% + 36px); margin: -18px -18px 14px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.hero-body { padding: 16px 18px 18px; }
.hero h2 { font-size: 1.42rem; line-height: 1.25; margin-bottom: .5em; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 800; color: var(--brand-hi); margin-bottom: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .9rem; margin: 4px 0 10px; }
.why { font-size: .9rem; color: var(--ink); background: var(--brand-soft); border-left: 3px solid var(--brand); border-radius: 6px; padding: 6px 10px; display: inline-block; }
.link { color: var(--brand-hi); font-weight: 700; font-size: .95rem; display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: .9rem; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row .btn { flex: 1; }

.shop { list-style: none; margin: 0 0 12px; padding: 0; }
.shop li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.shop li:last-child { border-bottom: 0; }
.shop small { white-space: nowrap; color: var(--ink); opacity: .75; }

.btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 0;
  background: var(--brand); color: var(--brand-ink); font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .03em;
  text-decoration: none; cursor: pointer; margin: 8px 0 0; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); font-style: normal; text-transform: none; font-weight: 700; letter-spacing: 0; }
.btn.ghost.sel { border-color: var(--brand); background: var(--brand-soft); }
.btn.small { min-height: 42px; padding: 8px 12px; font-size: .92rem; width: auto; }
.btn.bring { background: var(--brand); }
.text-btn { display: block; margin: 6px auto 0; border: 0; background: none; color: var(--muted); padding: 12px; cursor: pointer; font-size: .98rem; text-decoration: underline; text-underline-offset: 3px; }
.btn:active, .opt:active { transform: scale(.985); }

.note { background: var(--card-2); border-left: 3px solid var(--brand); border-radius: 8px; padding: 10px 12px; font-size: .92rem; }
.note.warn { border-left-color: var(--ink); }
.note.ok { background: var(--brand-soft); }
.small { font-size: .85rem; color: var(--muted); }

/* Bottom-Sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--card); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; max-height: 86vh; overflow: auto; animation: up .18s ease-out; }
.sheet h3 { font-size: 1.15rem; color: var(--ink); font-style: italic; letter-spacing: .02em; margin-bottom: 14px; }
@keyframes up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.opt { display: flex; gap: 12px; width: 100%; text-align: left; align-items: center; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 8px; cursor: pointer; }
.opt b { display: block; }
.opt small { display: block; }
.ico { font-size: 1.4rem; width: 32px; text-align: center; }
.check { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.check:last-child { border-bottom: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); }

/* Rezept */
.rimg { width: 100%; border-radius: var(--radius); aspect-ratio: 16/9; object-fit: cover; margin-bottom: 12px; }
.lead { color: var(--muted); }
.recipe h2 { font-size: 1.55rem; line-height: 1.25; }
.recipe h3 { margin-top: 18px; }
.ings { list-style: none; padding: 0; margin: 0 0 18px; }
.ings li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.ings .amt { min-width: 84px; font-weight: 800; color: var(--brand-hi); }
.ings .pantry { color: var(--muted); }
.steps { padding-left: 1.4em; margin: 0 0 12px; }
.steps li { padding: 6px 0 10px; cursor: pointer; }
.steps li::marker { color: var(--brand-hi); font-weight: 900; }
.steps li.done { color: var(--muted); text-decoration: line-through; }
.recipe.cook { font-size: 1.15em; }
.recipe.cook .steps li { padding: 10px 0 14px; }
.rate { margin-top: 6px; }

/* Vorrat */
.stock { list-style: none; padding: 0; margin: 0; }
.stock li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.stock li b, .stock li small { display: block; }
.stock li.urgent { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.stock li.soon small { color: var(--brand-hi); }
.stock .btn { margin: 0; flex: none; }

/* Einstellungen */
.item { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 18px; cursor: pointer; text-decoration: none; color: var(--ink); }
.item:last-child { border-bottom: 0; }
.item b, .item small { display: block; }
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.hist li > span:first-child { min-width: 92px; color: var(--muted); }

.pref { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.pref:last-child { border-bottom: 0; }
.pref > span { flex: 1 1 140px; font-size: .95rem; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.seg button { border: 0; background: none; padding: 6px 9px; font-size: .8rem; border-radius: 8px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--card-2); color: var(--ink); font-weight: 700; }
.seg button.on.never { background: var(--ink); color: var(--bg); text-decoration: line-through; }
.seg button.on.rare { background: var(--brand-soft); color: var(--brand-hi); }
.seg button.on.like { background: var(--brand); color: var(--brand-ink); }

.swipe { text-align: center; }
.swipe-btns .btn { font-size: .95rem; padding: 10px 6px; }

/* Einrichtung */
.wizard ol { padding-left: 1.3em; }
.wizard .logo-sm { width: 220px; max-width: 70%; display: block; margin: 0 auto 10px; mix-blend-mode: lighten; }
.steps-dots { display: flex; gap: 5px; }
.steps-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.steps-dots i.on { background: var(--brand); }
.wiz-nav { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); }
.wiz-nav > span { flex: 1; }

/* Login */
.login { text-align: center; padding-top: 9vh; }
.login .logo { width: 100%; max-width: 380px; display: block; margin: 0 auto 6px; mix-blend-mode: lighten; }
.login .lead { color: var(--ink); opacity: .85; }
.login form { text-align: left; margin: 22px 0 10px; }
.login label { font-size: .9rem; color: var(--muted); }
.login input { width: 100%; font: inherit; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); margin-top: 6px; }
.login input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Navigation */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; background: rgba(12, 12, 10, .96); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(8px); }
.tabbar button { flex: 1; border: 0; background: none; padding: 8px 0 9px; font-size: .72rem; color: var(--muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.tabbar button span { font-size: 1.3rem; filter: grayscale(1) brightness(1.6); opacity: .7; }
.tabbar button.on { color: var(--brand-hi); }
.tabbar button.on span { filter: none; opacity: 1; }

.boot { display: flex; justify-content: center; padding: 30vh 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(12, 12, 10, .6); }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 12px; font-size: .92rem; font-weight: 700; max-width: calc(100% - 32px); text-align: center; }
