/* Gestaltung wie in der iPhone-App: Petrolblau und Hummerrot vom App-Icon, Titel in Serifenschrift.
   "Gotham": Schwarz und Signalgelb, Titel rund und dick. */

:root {
  --bg: #f4f2ee;
  --card: #ffffff;
  --text: #16191c;
  --muted: #6b7279;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #136a85;
  --on-accent: #ffffff;
  --lobster: #d23a2e;
  --hero-top: #14688a;
  --hero-bottom: #0a2e42;
  --hero-ink: #ffffff;
  --vegan: #c48f00;
  --veggie: #22903a;
  --field: #efece6;
  --title-font: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --title-weight: 600;
  --radius: 14px;
  --tabbar-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1117;
    --card: #161e26;
    --text: #eef1f3;
    --muted: #8d98a2;
    --line: rgba(255, 255, 255, 0.09);
    --accent: #62bcd6;
    --on-accent: #06222f;
    --lobster: #ff6f61;
    --vegan: #f0b52a;
    --veggie: #4cc565;
    --field: #1f2932;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1117;
  --card: #161e26;
  --text: #eef1f3;
  --muted: #8d98a2;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #62bcd6;
  --on-accent: #06222f;
  --lobster: #ff6f61;
  --vegan: #f0b52a;
  --veggie: #4cc565;
  --field: #1f2932;
  color-scheme: dark;
}
:root[data-theme="gotham"] {
  --bg: #000000;
  --card: #15151a;
  --text: #f5f5f0;
  --muted: #9a9a92;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #ffd60a;
  --on-accent: #15151a;
  --lobster: #ff5a4f;
  --hero-top: #ffe04a;
  --hero-bottom: #f2a900;
  --hero-ink: #111116;
  --vegan: #ffd60a;
  --veggie: #5bd46f;
  --field: #22222a;
  --title-font: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --title-weight: 800;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: 0.35; cursor: default; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--title-font); font-weight: var(--title-weight); margin: 0; }
h2 { font-size: 1.25rem; margin: 26px 0 10px; }
h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-family: inherit; font-weight: 600; margin: 20px 4px 6px; }
.muted { color: var(--muted); }
.loading { padding: 40vh 0; text-align: center; color: var(--muted); }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.big { width: 54px; height: 54px; stroke-width: 1.2; color: var(--muted); }
.icon.tiny { width: 12px; height: 12px; }

/* Kopfzeile */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(var(--safe-t) + 10px) 16px 6px;
  max-width: 760px; margin: 0 auto;
}
.bar h1 { font-size: 2rem; }
.bar h1.small { font-size: 1.05rem; font-family: inherit; font-weight: 600; }
.bar.sticky { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); max-width: none; }
.actions { display: flex; gap: 6px; align-items: center; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--accent); flex: none; }
.iconbtn:active { background: var(--line); }
.iconbtn.accent { background: var(--accent); color: var(--on-accent); }
.iconbtn.small { width: 36px; height: 36px; }
.iconbtn.muted { color: var(--muted); }
.iconbtn.on { color: var(--accent); }
.iconbtn.on .icon, .iconbtn.fav.on .icon { fill: currentColor; }
.iconbtn.fav.on { color: var(--lobster); }
.textbtn { color: var(--accent); padding: 8px 4px; }
.textbtn.strong { font-weight: 600; }

.page { max-width: 760px; margin: 0 auto; padding: 4px 16px calc(var(--tabbar-h) + var(--safe-b) + 28px); }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 16px; border-radius: 12px; font-weight: 600; background: var(--field); color: var(--text); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.ghost { background: var(--field); color: var(--accent); }
.btn.danger { background: none; color: var(--lobster); }
.btn.small { padding: 7px 12px; font-size: 0.92rem; }
.btn.big { padding: 15px 22px; font-size: 1.1rem; flex: 1; }
.btn.wide { width: 100%; margin-top: 28px; }
.btn .icon { width: 18px; height: 18px; }

/* Suche und Chips */
.search {
  width: 100%; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--field); margin: 6px 0 10px;
  font-size: 16px; outline: none;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0 0 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 6px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: 0.9rem; position: relative;
}
.chip .icon { width: 15px; height: 15px; }
.chip small { color: var(--muted); }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.chip.on small { color: inherit; opacity: 0.75; }
.chip.on.fav { background: var(--lobster); color: #fff; }
.chip.on.fav .icon { fill: currentColor; }
.chip.select select { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; }
.chip.select::after { content: "▾"; font-size: 0.75rem; color: var(--muted); }
.chip-input { border: 1px dashed var(--line); border-radius: 999px; padding: 6px 12px; background: transparent; min-width: 150px; font-size: 16px; outline: none; }
.suggestions .chip { background: transparent; color: var(--muted); }

/* Rezeptliste */
.recipes { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.recipe { display: flex; align-items: center; padding-right: 6px; border-bottom: 1px solid var(--line); }
.recipe:last-child { border-bottom: 0; }
.recipe .row { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 10px 4px 10px 12px; color: inherit; }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--field); }
.thumb.ph { display: grid; place-items: center; font-family: var(--title-font); font-size: 1.5rem; color: var(--accent); }
.recipe .text { min-width: 0; }
.name { font-weight: 600; line-height: 1.25; }
.name.vegan, .title.vegan, a.vegan { color: var(--vegan); }
.name.veggie, .title.veggie, a.veggie { color: var(--veggie); }
.sub { font-size: 0.85rem; color: var(--muted); }
.tags { font-size: 0.78rem; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags.big { font-size: 0.9rem; white-space: normal; margin: 6px 0; }
.empty { text-align: center; padding: 50px 16px; color: var(--muted); }
.empty h2 { color: var(--text); margin-top: 10px; }

/* Rezept */
.detail .hero-img { width: calc(100% + 32px); margin: 0 -16px 12px; max-height: 340px; object-fit: cover; display: block; }
@media (min-width: 760px) { .detail .hero-img { width: 100%; margin: 0 0 12px; border-radius: var(--radius); } }
.title { font-size: 1.9rem; line-height: 1.15; margin: 4px 0; }
.nutri { margin: 4px 0 0; font-weight: 600; }
.card { background: var(--card); border-radius: var(--radius); padding: 4px 14px; }
.card.hero {
  background: linear-gradient(160deg, var(--hero-top), var(--hero-bottom));
  color: var(--hero-ink); padding: 14px; margin-top: 16px;
}
.hero .stepbtn { background: color-mix(in srgb, var(--hero-ink) 18%, transparent); color: var(--hero-ink); }
.hero-actions { display: flex; gap: 8px; margin-top: 12px; }
.hero-actions .btn { flex: 1; }
.hero .btn.primary { background: var(--hero-ink); color: var(--hero-bottom); }
.hero .btn.ghost { background: color-mix(in srgb, var(--hero-ink) 18%, transparent); color: var(--hero-ink); }
.hero-note { margin: 8px 0 0; font-size: 0.82rem; opacity: 0.8; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.stepper .controls { display: flex; align-items: center; gap: 12px; }
.stepper b { min-width: 2ch; text-align: center; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.stepbtn { width: 36px; height: 36px; border-radius: 50%; background: var(--field); color: var(--accent); font-size: 1.3rem; line-height: 1; }
.ingredients { list-style: none; margin: 0; padding: 4px 14px; }
.ingredients li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ingredients li:last-child { border-bottom: 0; }
.ingredients .amt { min-width: 80px; font-weight: 600; font-variant-numeric: tabular-nums; }
.footnote { font-size: 0.82rem; color: var(--muted); margin: 6px 4px; }
.steps { padding-left: 0; list-style: none; counter-reset: s; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 40px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
}
.nutrition { width: 100%; border-collapse: collapse; padding: 0; }
.nutrition td { padding: 8px 14px; border-bottom: 1px solid var(--line); }
.nutrition tr:last-child td { border-bottom: 0; }
.nutrition td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.notes { white-space: pre-wrap; padding: 12px 14px; }
.source { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; }
.source .icon { width: 18px; height: 18px; }
.cooked { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-top: 22px; color: var(--muted); }

/* Kochmodus */
body.cooking { background: var(--bg); }
.cook { min-height: 100dvh; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; }
.cook-title { flex: 1; min-width: 0; text-align: center; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-ings { padding: 0 16px; }
.cook-ings .ingredients { background: var(--card); border-radius: var(--radius); }
.cook-ings h3 { margin-top: 6px; }
.cook-progress { display: flex; gap: 4px; padding: 10px 16px; }
.cook-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.cook-progress span.done { background: var(--accent); }
.cook-step { flex: 1; padding: 20px 22px; }
.cook-num { color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; }
.cook-step p { font-size: clamp(1.35rem, 5.2vw, 2rem); line-height: 1.4; margin: 12px 0; }
.cook-nav { display: flex; gap: 10px; padding: 12px 16px calc(var(--safe-b) + 14px); }

/* Editor */
.info { background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 10px 12px; border-radius: 12px; font-size: 0.9rem; }
.field { display: block; margin: 10px 0; }
.field > span { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); margin: 0 4px 4px; }
.field > span .icon { width: 16px; height: 16px; }
.field input, .field textarea, .ing-row input, .step-row textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 16px; outline: none;
}
.field input:focus, .field textarea:focus, .ing-row input:focus, .step-row textarea:focus { border-color: var(--accent); }
.ing-row { display: grid; grid-template-columns: 64px 76px 1fr 36px; gap: 6px; align-items: center; margin-bottom: 6px; }
.ing-row input { padding: 9px 8px; }
.step-row { display: grid; grid-template-columns: 22px 1fr 36px; gap: 6px; align-items: start; margin-bottom: 6px; }
.step-row .num { padding-top: 10px; color: var(--muted); font-weight: 600; text-align: right; }
.step-row textarea { resize: vertical; }
.nut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.nut-grid .field { margin: 4px 0; }
.image-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.image-pick img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }

/* Einkauf */
.basket { list-style: none; padding: 4px 14px; margin: 0; }
.basket li { border-bottom: 1px solid var(--line); padding: 6px 0; }
.basket li:last-child { border-bottom: 0; }
.basket .brow { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.basket .brow a { font-weight: 600; color: var(--text); }
.basket .brow a.vegan { color: var(--vegan); }
.basket .brow a.veggie { color: var(--veggie); }
.basket .stepper { padding: 2px 0; font-size: 0.9rem; color: var(--muted); }
.list-head { display: flex; align-items: baseline; justify-content: space-between; }
.items { list-style: none; padding: 0 6px 0 0; margin: 0; }
.item { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .check { flex: 1; display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 10px 6px 10px 14px; min-width: 0; }
.item .circle { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--muted); flex: none; display: grid; place-items: center; margin-top: 1px; }
.item .circle .icon { width: 16px; height: 16px; stroke-width: 3; }
.item.done .circle { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.item .text { display: flex; flex-direction: column; min-width: 0; }
.item small { color: var(--muted); font-size: 0.78rem; }
.item.done .iname { text-decoration: line-through; color: var(--muted); }
.pantry { margin-top: 24px; padding: 12px 14px; }
.pantry summary { cursor: pointer; font-weight: 600; }
.pantry ul { list-style: none; padding: 0; margin: 8px 0 0; }
.pantry li { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 4px 0; }

/* Mehr */
.card.list { padding: 0 14px; }
.li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.li:last-child { border-bottom: 0; }
.li.clickable { color: var(--accent); cursor: pointer; }
.segmented { display: flex; background: var(--field); padding: 3px; border-radius: 11px; }
.segmented button { flex: 1; padding: 8px 4px; border-radius: 9px; font-size: 0.9rem; }
.segmented button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); font-weight: 600; }

/* Rezeptkarten und PDF-Import */
.info.warn { background: color-mix(in srgb, var(--lobster) 14%, transparent); }
.tools { font-size: 0.9rem; }
.steps li p { margin: 2px 0 6px; }
.step-title { display: block; margin-bottom: 2px; }
.steps p.tip, .cook-step p.tip { color: var(--muted); font-style: italic; }
.nutrition tr.head td { font-size: 0.78rem; color: var(--muted); }
.nutrition.three td:nth-child(2) { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.cook-h { font-size: 1.6rem; margin: 10px 0 4px; }
.cook-step p b { color: var(--accent); }
.wide-pdf { width: 100%; margin: 4px 0 6px; }
.progress { height: 6px; border-radius: 3px; background: var(--field); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.progress-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: none) { .desktop-only { display: none; } }


/* Anzeige der Original-PDFs */
body.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; }
.viewer-bar { display: flex; align-items: center; gap: 4px; padding: calc(var(--safe-t) + 6px) 8px 6px; border-bottom: 1px solid var(--line); }
.viewer-title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-tools { display: flex; align-items: center; gap: 2px; }
.viewer-tools .iconbtn.small { font-size: 1.3rem; }
.pageno { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.pageno input { width: 3.6em; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); text-align: center; font-size: 16px; }
.viewer-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--safe-b); }
.viewer-msg { text-align: center; color: var(--muted); padding: 30vh 20px; }
.pages { width: 100%; max-width: 1000px; margin: 0 auto; padding: 8px; box-sizing: border-box; }
.pdf-page { position: relative; width: 100%; background: #fff; margin-bottom: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15); }
.pdf-page canvas { display: block; width: 100%; height: 100%; }
.page-n { position: absolute; inset: 0; display: grid; place-items: center; color: #aaa; }

/* Tab-Leiste */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center;
  padding-bottom: var(--safe-b); height: calc(var(--tabbar-h) + var(--safe-b));
  background: color-mix(in srgb, var(--card) 85%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab { flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 0.7rem; position: relative; }
.tab.active { color: var(--accent); }
.tab .icon { width: 24px; height: 24px; }
.badge { position: absolute; top: 5px; left: calc(50% + 6px); background: var(--lobster); color: #fff; border-radius: 999px; font-size: 0.65rem; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; }

/* Blätter (Dialoge) */
dialog.sheet {
  border: 0; padding: 0; width: 100%; max-width: 560px; margin: auto auto 0; border-radius: 18px 18px 0 0;
  background: var(--bg); color: var(--text); max-height: 92dvh;
}
@media (min-width: 600px) { dialog.sheet { margin: auto; border-radius: 18px; } }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.4); }
.sheet-body { padding: 18px 16px calc(var(--safe-b) + 16px); }
.sheet-body h2 { margin-top: 0; }
.sheet-actions { display: flex; gap: 8px; margin-top: 10px; }
.sheet-actions .btn { flex: 1; padding: 11px 8px; }
.sheet-body.menu { display: flex; flex-direction: column; gap: 2px; }
.menuitem { padding: 14px; text-align: left; border-radius: 10px; background: var(--card); }
.menuitem.danger { color: var(--lobster); }
.menuitem.muted { text-align: center; margin-top: 6px; }
.error { color: var(--lobster); font-size: 0.9rem; }

/* Anmelden */
.login { max-width: 360px; margin: 0 auto; padding: 18vh 24px 0; text-align: center; }
.login-icon { width: 84px; height: 84px; border-radius: 20px; }
.login h1 { font-size: 2.2rem; margin: 10px 0; }
.login p { color: var(--muted); }
.login input { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 16px; margin-top: 12px; }
.login .btn.wide { margin-top: 12px; }

/* Meldungen */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 0.9rem;
  opacity: 0; transition: 0.25s; z-index: 50; pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
#syncbadge {
  position: fixed; top: calc(var(--safe-t) + 6px); left: 50%; transform: translateX(-50%); z-index: 20;
  background: var(--lobster); color: #fff; font-size: 0.75rem; padding: 3px 10px; border-radius: 999px;
}

/* Anmelden: Reiter "Neues Konto / Ich habe ein Konto" */
.login .login-tabs { margin-top: 16px; }
.login { padding-top: 10vh; }

/* Gruppen */
.card.group { padding: 12px 14px; margin-bottom: 10px; }
.card.group.active { box-shadow: inset 3px 0 0 var(--accent); }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.group p { margin: 4px 0 10px; font-size: 0.9rem; }
.group-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.field select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 16px; }

/* Tagebuch */
.segmented.subnav { margin: 4px 0 14px; }
.segmented a { flex: 1; text-align: center; padding: 8px 4px; border-radius: 9px; font-size: 0.9rem; color: var(--text); }
.segmented a.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); font-weight: 600; }
.daynav { display: flex; align-items: center; justify-content: space-between; }
.dayname { font-family: var(--title-font); font-weight: var(--title-weight); font-size: 1.25rem; }
.iconbtn.flip .icon { transform: scaleX(-1); }
.diary-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 6px; }
.diary-hero .macro, .diary-hero .hero-note { grid-column: 1 / -1; }
.kcal-big b, .kcal-left b { display: block; font-family: var(--title-font); font-size: 2.2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kcal-big span, .kcal-left span { font-size: 0.82rem; opacity: 0.85; }
.kcal-left { text-align: right; }
.kcal-left.over b { color: #ffb4ab; }
.hero-link { color: var(--hero-ink); text-decoration: underline; align-self: center; justify-self: end; font-size: 0.9rem; }
.macro-head { display: flex; justify-content: space-between; font-size: 0.82rem; opacity: 0.9; }
.macro-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--hero-ink) 20%, transparent); overflow: hidden; margin-top: 3px; }
.macro-bar span { display: block; height: 100%; background: var(--hero-ink); border-radius: 3px; }
.macro-bar span.over { background: #ffb4ab; }
.slot-head { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.slot-head h3 { flex: 1; margin: 0 4px; }
.entries { list-style: none; padding: 0; margin: 6px 0 0; }
.entries li { border-bottom: 1px solid var(--line); }
.entries li:last-child { border-bottom: 0; }
.entry { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; text-align: left; }
.entry .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entry small { color: var(--muted); font-size: 0.78rem; }
.entry .kc { font-weight: 600; font-variant-numeric: tabular-nums; }
.searchrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.searchrow input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 16px; min-width: 0; }
.pick { list-style: none; padding: 0; margin: 0; background: var(--card); border-radius: 12px; overflow: hidden; }
.pick li { border-bottom: 1px solid var(--line); }
.pick li:last-child { border-bottom: 0; }
.pick button { width: 100%; text-align: left; padding: 10px 12px; display: flex; }
.pick .text { display: flex; flex-direction: column; min-width: 0; }
.pick small { color: var(--muted); font-size: 0.78rem; }
.quicklinks { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.sheet-body { max-height: 88dvh; overflow: auto; }
.sheet-body .segmented { margin: 8px 0; }
.calc { font-size: 0.9rem; color: var(--muted); }
.scanner { width: 100%; border-radius: 12px; background: #000; max-height: 45vh; object-fit: cover; }

/* Gewicht */
.segmented.ranges { margin: 12px 0 8px; }
.chart-card { padding: 10px; }
.chart { width: 100%; height: auto; display: block; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.chart .dot { fill: var(--lobster); }
.chart .grid { stroke: var(--line); }
.chart .axis { font-size: 10px; fill: var(--muted); }
.chart-empty { padding: 20px 6px; text-align: center; }

/* Ziele */
.goals-form, .guide-form, .guide-result { padding: 10px 14px; }
.guide-result p { margin: 6px 0; }
.big-goal b { font-family: var(--title-font); font-size: 1.5rem; }
.linkbox { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 14px; margin: 6px 0 4px; }

/* Kochmodus: Timer und Zutaten je Schritt */
.timer-btn { margin: 4px 6px 4px 0; }
.timer-btn .icon { width: 18px; height: 18px; }
.step-ings { margin-top: 16px; padding: 4px 0; }
.step-ings h3 { margin: 8px 14px 0; }
.step-ings .ingredients li { font-size: 1.05rem; }
.timerbar { display: flex; flex-direction: column; gap: 6px; padding: 4px 16px; }
.timer { display: grid; grid-template-columns: 1fr 36px; align-items: center; background: var(--card); border-radius: 12px; padding: 6px 4px 6px 12px; position: relative; overflow: hidden; }
.timer-main { display: flex; align-items: baseline; gap: 10px; text-align: left; }
.timer-main b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.timer-main small { color: var(--muted); }
.tbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.tbar span { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }
.timer.soon .tbar span, .timer.soon b { color: var(--lobster); background: var(--lobster); }
.timer.soon b { background: none; }
.timer.done { background: color-mix(in srgb, var(--lobster) 18%, var(--card)); }
.timer.done b { color: var(--lobster); }
.cook-nav .btn.big { flex: 1; }

/* Statistik */
.stat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tile { padding: 12px 14px; display: flex; flex-direction: column; }
.tile b { font-family: var(--title-font); font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 0.85rem; }
.bars { padding: 8px 14px; }
.barrow { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 26px; gap: 10px; align-items: center; padding: 6px 0; color: var(--text); }
.bname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.92rem; }
.bbar { height: 8px; background: var(--field); border-radius: 4px; overflow: hidden; }
.bbar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.barrow b { text-align: right; font-variant-numeric: tabular-nums; }
.entry.static { cursor: default; }
.tagrow { display: flex; align-items: center; padding-right: 6px; }
.tagrow .entry:disabled { opacity: 1; cursor: default; }

/* Tagebuch: Plus in "Häufig" und "Zuletzt" */
.pick li.with-plus { display: flex; align-items: center; }
.pick li.with-plus > button:first-child { flex: 1; min-width: 0; }
.pick .quickplus { width: 44px; flex: none; justify-content: center; color: var(--accent); }
.pick .quickplus.added { color: var(--veggie); }
