/* Kochkladde: Basis */
[hidden] { display: none !important; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; }
img { max-width: 100%; }

/* Layout: schmale Kopfzeile mit Suche, darunter Filterleiste und ein Kachelraster; Details öffnen als Blatt über der Liste */
:root {
  --bg: #f4f6f2;
  --surface: #ffffff;
  --fg: #1c2620;
  --muted: #5d6a62;
  --line: #d9dfd6;
  --accent: #d2402a;
  --accent-fg: #ffffff;
  --leaf: #2f6b4a;
  --leaf-soft: #dcebe1;
  --tile-l: 82%;
  --tile-s: 48%;
  --tile-fg: #1c2620;
  --shadow: 0 1px 2px rgba(28,38,32,.06), 0 6px 18px rgba(28,38,32,.06);
  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121915; --surface: #1a231e; --fg: #e8eee9; --muted: #9bab9f; --line: #2c3a32;
    --accent: #ee6a53; --accent-fg: #1a0c08; --leaf: #7fc99e; --leaf-soft: #223a2d;
    --tile-l: 30%; --tile-s: 38%; --tile-fg: #f0f5f1;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121915; --surface: #1a231e; --fg: #e8eee9; --muted: #9bab9f; --line: #2c3a32;
  --accent: #ee6a53; --accent-fg: #1a0c08; --leaf: #7fc99e; --leaf-soft: #223a2d;
  --tile-l: 30%; --tile-s: 38%; --tile-fg: #f0f5f1;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  padding-block: 20px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

header { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-start; gap: 12px 28px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 6vw, 3rem); line-height: 1; letter-spacing: -0.03em; margin: 0; }
h1 span { color: var(--accent); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 4px; }
.tab { border: 0; background: transparent; border-radius: 999px; padding: 8px 16px; white-space: nowrap; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.tab[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.tab .n { font-variant-numeric: tabular-nums; font-size: .8rem; background: var(--leaf-soft); color: var(--leaf); border-radius: 999px; padding: 0 8px; min-width: 22px; text-align: center; }
.tab[aria-selected="true"] .n { background: var(--accent); color: var(--accent-fg); }

.search { position: relative; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 16px 0 46px; font-size: 1.05rem; }
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

.filters { display: flex; flex-direction: column; gap: 10px; }
.fhint { margin: 0; font-size: .85rem; color: var(--muted); max-width: 70ch; }
.frow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flabel { flex-basis: 100%; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-weight: 500; font-size: .92rem; }
.chip[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.chip[data-state="can"] { border-color: var(--leaf); }
.chip[data-state="no"] { border-style: dashed; background: transparent; color: var(--muted); opacity: .6; cursor: not-allowed; }
:root[data-theme="dark"] .chip[aria-pressed="true"] { color: #0d1711; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-pressed="true"] { color: #0d1711; } }
.count { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); min-width: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.tile { position: relative; height: 112px; background: hsl(var(--h) var(--tile-s) var(--tile-l)); color: var(--tile-fg); padding: 14px; display: flex; align-items: flex-end; }
.tile .cat { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.tile .big { position: absolute; right: 14px; bottom: -14px; font-family: var(--font-display); font-weight: 800; font-size: 6.5rem; line-height: 1; opacity: .22; pointer-events: none; }
.save { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); color: var(--fg); display: grid; place-items: center; box-shadow: var(--shadow); }
.save svg { fill: none; stroke: currentColor; stroke-width: 2; }
.save[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
.save[aria-pressed="true"] svg { fill: currentColor; }
.cbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h2 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
.card h2 button { all: unset; cursor: pointer; display: block; }
.card h2 button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { font-size: .75rem; font-weight: 600; background: var(--leaf-soft); color: var(--leaf); border-radius: 6px; padding: 2px 8px; }

.empty { border: 1.5px dashed var(--line); border-radius: 14px; padding: 40px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--fg); font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 4px; }

/* Detailblatt */
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgba(10,16,12,.55); display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.sheet { background: var(--surface); width: 100%; max-width: 1040px; border-radius: 16px; overflow: hidden; margin-block: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.sheet .tile { height: 140px; }
.close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow); }
.sheet .save { right: 58px; }
.sbody { padding: 24px 32px 32px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 560px) { .sbody { padding: 20px 18px 28px; } }
.sbody h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.7rem, 5vw, 2.2rem); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.sbody p.lead { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; }
@media (max-width: 560px) { .cols { grid-template-columns: minmax(0, 1fr); } }
h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.step-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.step-row h3 { margin: 0; }
.portion { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.portion button { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg); line-height: 1; font-size: 1.1rem; }
ul.ing { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
ul.ing li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
ul.ing .a { min-width: 4.2em; font-weight: 600; font-variant-numeric: tabular-nums; }
ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
ol.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

.macro-row{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 4px}.macro-row span{background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:9px 12px;font-size:.9rem}.macro-row b{font-variant-numeric:tabular-nums}.macro-note{font-size:.78rem;color:var(--muted);margin:4px 0 18px}

/* Gericht zusammenstellen */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel h3 { margin: 0; }
.steps-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.stepbtn { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stepbtn .lbl { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stepbtn .val { font-weight: 600; overflow-wrap: anywhere; }
.stepbtn .val.unset { color: var(--muted); font-weight: 400; }
.stepbtn[aria-current="step"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.opt { text-align: left; border: 1.5px solid var(--line); background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.opt[aria-pressed="true"] { border-color: var(--leaf); background: var(--leaf-soft); }
.opt .n { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
.opt .meta { font-size: .85rem; }
.opt .tags { margin-top: 0; }
.menu-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.menu-head h3 { margin: 0; }
.sum { margin: 0; color: var(--muted); font-size: .92rem; }
.dishes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; align-items: start; }
.dish h2 { margin: 2px 0 6px; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
.dish .tags { margin: 0; }
.dish h3 { margin: 0 0 8px; }
.dish-portions { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.dish-portions .portion button { cursor:pointer; }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); margin-right: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.group { display: flex; flex-direction: column; gap: 8px; }
.sub { font-size: .9rem; color: var(--muted); }
.stepbtn.add { border-style: dashed; background: transparent; }
.stepbtn.add .val { color: var(--accent); }
.step-row .actions { justify-content: flex-end; }

@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .15s ease, box-shadow .15s ease; }
  .card:hover { transform: translateY(-2px); }
}

/* Filter: Zustände und Legende */
.fmode { font-weight: 500; letter-spacing: 0; text-transform: none; }
.chip.reset { border-color: var(--accent); color: var(--accent); }
.count { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.more { display: flex; justify-content: center; }
.recent { margin-top: 30px; }
.recent[hidden] { display: none; }
.rhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rhead h2 { margin: 0; font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -0.01em; }
.rhead .rn { color: var(--muted); font-size: .92rem; }
.rhead .grow { flex: 1; }
.rarrows { display: flex; gap: 6px; }
.rarrow { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 3px; }
.rarrow:hover:not(:disabled) { border-color: var(--leaf); color: var(--leaf); }
.rarrow:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rarrow:disabled { opacity: .35; cursor: not-allowed; }
.rrow { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 6px 2px 16px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.rrow .card { flex: 0 0 240px; scroll-snap-align: start; }
@media (max-width: 760px) { .rrow .card { flex-basis: min(72vw, 280px); } .rhead .rn { flex-basis: 100%; order: 3; } }

/* Fotos */
.tile.has-img { background: var(--leaf-soft); color: #fff; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 60%); pointer-events: none; }
.tile.has-img .big { display: none; }
.tile .cat { position: relative; z-index: 1; }
.save, .close { z-index: 2; }
.sheet .tile.has-img { height: clamp(260px, 62vw, 420px); padding: 0; overflow: hidden; background: transparent; color: var(--ink, inherit); }
.sheet .tile.has-img .bgimg { display: none; }
.sheet .tile.has-img .fgimg { object-fit: cover; object-position: center 45%;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%); }
.sheet .tile.has-img::after { display: none; }
.sheet .tile.has-img .cat { position: absolute; left: 14px; top: 12px; bottom: auto; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.65); }

.loading { color: var(--muted); padding: 24px 0; }
.mini-search { width: 100%; height: 42px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); padding: 0 14px; }
.mini-search:focus { border-color: var(--accent); outline: none; }

/* Rechtliches: Fußzeile und Textseiten */
.legal-footer { display: flex; flex-wrap: wrap; gap: 6px 20px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.legal-footer a { color: inherit; text-decoration: none; padding: 4px 0; }
.legal-footer a:hover { color: var(--fg); text-decoration: underline; }
.doc-head { align-items: center; }
.back { color: var(--muted); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--fg); text-decoration: underline; }
.doc { max-width: 72ch; display: flex; flex-direction: column; gap: 4px; }
.doc h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin-bottom: 8px; }
.doc h2 { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.01em; margin: 20px 0 2px; }
.doc p, .doc li { margin: 6px 0; }
.doc ul { padding-left: 1.2em; margin: 6px 0; }
.doc a { color: var(--accent); }
.doc .stand { color: var(--muted); font-size: .9rem; margin-top: 20px; }
mark.todo { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; padding: 0 4px; border-radius: 4px; }

/* Eigene Rezepte: Button, Formular */
header { row-gap: 10px; }
.add-btn { margin-left: auto; }
@media (max-width: 640px) { .add-btn { margin-left: 0; } }
.btn { border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-fg); padding: 10px 18px; font-weight: 600; }
.btn:hover { filter: brightness(1.06); }
.tag.own { background: var(--accent); color: var(--accent-fg); }
.own-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.danger { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.form-bg { z-index: 30; }
.formsheet { max-width: 640px; display: flex; flex-direction: column; }
.fhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.fhead h2 { margin: 0; font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -0.01em; }
.close.inline { position: static; flex: none; box-shadow: none; border: 1.5px solid var(--line); }
.fbody { padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.ffoot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface); position: sticky; bottom: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field legend, .field summary { font-weight: 600; font-size: .92rem; padding: 0; }
.field summary { cursor: pointer; }
.field input[type="text"], .field input[type="number"], .field input[type="email"], .field input[type="password"], .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px 12px; font: inherit; color: inherit; }
.field textarea { resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fgrid.four { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--surface); cursor: pointer; font-weight: 500; }
.choice:has(input:checked) { border-color: var(--leaf); background: var(--leaf-soft); }
.choice input { accent-color: var(--leaf); }
.hint { margin: 0; font-size: .82rem; color: var(--muted); }
.errors { border: 1.5px solid var(--accent); border-radius: 10px; padding: 10px 14px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.errors ul { margin: 6px 0 0; padding-left: 1.2em; }
code { background: var(--leaf-soft); border-radius: 4px; padding: 0 4px; font-size: .9em; }

/* Variante, Bewertung, Foto */
.variant-btn { margin-top: 14px; border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent); font-weight: 600; border-radius: 999px; padding: 9px 16px; font-size: .95rem; }
.variant-btn.on { background: var(--accent); color: var(--accent-fg); }
.tag.variant { border-color: var(--accent); color: var(--accent); }
.score { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--surface); color: var(--fg); border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: .85rem; box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
.score small { font-weight: 500; color: var(--muted); margin-left: 1px; }
.rate-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.rate-in input[type=range] { flex: 1 1 160px; min-width: 120px; accent-color: var(--accent); }
.rate-in input[type=range].norate { opacity: .5; }
.rate-in input[type=number] { width: 4.5em; padding: 7px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); font: inherit; text-align: center; }
.close { color: var(--fg); }

/* dezente Schnellknöpfe, Kommentare */
.quick { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; margin: 8px 0 0 -8px; }
.ghost { border: 0; background: transparent; color: var(--muted); font-size: .84rem; padding: 5px 8px; border-radius: 999px; }
.ghost:hover, .ghost:focus-visible { background: var(--bg); color: var(--fg); text-decoration: underline; }
.ghost b { font-variant-numeric: tabular-nums; color: var(--fg); }
.quick .fhint { margin: 0 0 0 4px; }
.rate { margin-top: 6px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.rate .fhint { margin: 4px 0 0; }
.comments { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.comments h3 { margin: 0; }
.cn { font-weight: 500; color: var(--muted); font-size: .9em; }
.clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.clist li { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.chead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; }
.chead span { color: var(--muted); }
.chead .ghost { margin-left: auto; padding: 2px 8px; }
.clist p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cform { display: flex; flex-direction: column; gap: 8px; }
.cform textarea, .cform input[type=text] { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); font: inherit; }
.crow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.crow input[type=text] { flex: 1 1 180px; width: auto; }
.btn.small { padding: 8px 16px; font-size: .92rem; }
.cmsg { margin: 0; color: var(--accent); font-size: .88rem; }
.cmsg:empty { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Konto */
#authBg { z-index: 30; }
.authsheet { max-width: 460px; }
.acc-btn { background: var(--surface); color: var(--fg); border: 1.5px solid var(--line); max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-btn + .acc-btn { margin-left: 0; }
.arow { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-left: -8px; }
.okmsg { margin: 0; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--leaf); background: var(--leaf-soft); }
.consent { align-items: flex-start; font-size: .88rem; }
.consent a { color: var(--accent); }
#toast { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; max-width: min(92vw, 560px); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .9rem; box-shadow: var(--shadow); }

/* Kontaktseite */
.contact { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.contact .hint { font-size: .8rem; color: var(--muted); align-self: flex-end; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Veröffentlichung und Nutzerfotos */
.pubrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: .88rem; }
.pubstate { color: var(--muted); }
.pubstate.s-neu { color: var(--accent); font-weight: 600; }
.pubstate.s-freigegeben { color: var(--leaf); font-weight: 600; }
.cphotos { display: flex; flex-wrap: wrap; gap: 10px; }
.cphotos figure { margin: 0; }
.cphotos img { height: 130px; width: auto; max-width: 100%; border-radius: 10px; display: block; }
.gthumb { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 10px; display: block; }
.gthumb:hover img, .gthumb:focus-visible img { filter: brightness(.92); }
.gthumb:focus-visible, .myphotos img:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.myphotos img { cursor: zoom-in; }
.cphotos figcaption { font-size: .78rem; color: var(--muted); margin-top: 3px; }

/* ---------- Administration ---------- */
.admin { max-width: 900px; }
.admin .mode { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.admin .summary { font-size: 1.05rem; margin: 0 0 14px; }
.admin .tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.admin .n.hot { background: var(--accent); color: var(--accent-fg); }
.afilter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.alist { display: flex; flex-direction: column; gap: 12px; }
.aitem { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--card, transparent); }
.aitem.is-new { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.ahead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.ahead b { color: var(--fg); }
.ahead .grow { flex: 1; }
.badge { font-size: .72rem; font-weight: 700; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--muted); }
.badge.b-neu { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.badge.b-abgelehnt { border-color: var(--fg); color: var(--fg); }
.badge.b-admin { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.badge.b-banned { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.aitem.is-banned { border-color: var(--accent); }
.aitem .ahead .badge { white-space: nowrap; }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.atext { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
.reported { color: var(--accent); font-weight: 600; margin: 0 0 8px; font-size: .9rem; }
.aphoto img { max-width: 100%; max-height: 360px; border-radius: 10px; display: block; margin-bottom: 10px; }
.aact { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.anote { flex: 1 1 220px; min-width: 0; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: transparent; color: var(--fg); font: inherit; }
.aitem .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; }
.aitem details { margin: 6px 0; }
.aitem summary { cursor: pointer; font-weight: 600; }
.gate { display: flex; flex-direction: column; gap: 14px; max-width: 380px; }

.legal-footer .adminlink { opacity: .6; font-size: .85em; }
.msgmeta { font-size: .9rem; color: var(--muted); margin: 0 0 8px; overflow-wrap: anywhere; }
.msgmeta a { color: inherit; }

.quick { margin-left: 0; gap: 8px; }
.ghost.lift { border: 1.5px solid var(--line); color: var(--fg); font-weight: 600; font-size: .9rem; padding: 6px 14px; }
.ghost.lift:hover, .ghost.lift:focus-visible { border-color: var(--accent); color: var(--accent); background: transparent; text-decoration: none; }

.stack-f { display: flex; flex-direction: column; gap: 10px; }
.stack-f[hidden] { display: none; }

/* Suchzeile: Suche halb so breit, rechts Zutaten ein-/ausschließen */
.searchrow { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.searchrow .search { flex: 0 1 calc(50% - 6px); min-width: 260px; }
.ingbox { flex: 1 1 280px; display: flex; gap: 10px; min-width: 0; }
.ingf { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ingf span { font-size: .78rem; font-weight: 600; color: var(--muted); }
.ingf input { width: 100%; height: 52px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 12px; font-size: .95rem; color: var(--fg); }
.ingf input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.ingtags { display: flex; gap: 6px; flex-wrap: wrap; }
.ingtags:empty { display: none; }
.itag { border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 4px 12px; font-size: .88rem; cursor: pointer; }
.itag.inc { border-color: var(--accent); }
.itag.exc { text-decoration: line-through; text-decoration-thickness: 1px; }
.itag:hover { background: var(--bg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .searchrow .search { flex-basis: 100%; } }

/* Kopfleiste und Suchzeile bleiben beim Scrollen stehen */
.wrap > header { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 10px 0 8px; margin-top: -10px; }
#listView .searchrow { position: sticky; top: var(--hh, 0px); z-index: 19; background: var(--bg); padding: 6px 0 10px; box-shadow: 0 8px 8px -8px color-mix(in srgb, var(--fg) 25%, transparent); }
@media (max-width: 640px) { #listView .searchrow { position: static; box-shadow: none; } }

/* Zutaten-Zeilen im Formular */
.ingrows { display: flex; flex-direction: column; gap: 8px; }
.ingrow { display: grid; grid-template-columns: 78px 130px minmax(0, 1fr) minmax(0, 1.2fr) 34px; gap: 6px; align-items: center; }
.ingrow input { width: 100%; min-width: 0; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); font: inherit; font-size: .92rem; }
.ingrow input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.ingrow .ir-x { padding: 4px 0; font-size: 1.2rem; line-height: 1; }
.inote { color: var(--muted); }
@media (max-width: 640px) {
  .ingrow { grid-template-columns: 70px minmax(0, 1fr) 34px; }
  .ingrow .ir-n, .ingrow .ir-d { grid-column: 1 / 3; }
  .ingrow .ir-x { grid-column: 3; grid-row: 1; }
}

.editform { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.editform input, .editform textarea { font: inherit; }
.editform .fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.editform .field input[type="text"], .editform .field input[type="number"], .editform .field textarea { width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); }

/* Logo als Link, Zufallsvorschläge */
.logo { color: inherit; text-decoration: none; }
.logo:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.rand-btn { margin-left: auto; background: transparent; color: var(--fg); border: 1.5px solid var(--fg); }
.rand-btn:hover, .rand-btn:focus-visible { background: var(--fg); color: var(--bg); }
.rand-btn + .add-btn { margin-left: 0; }

.hbtns { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hbtns .btn { margin-left: 0; }
.wrap > header { gap: 10px 18px; align-items: center; }
.wrap > header h1 { font-size: clamp(1.8rem, 5vw, 2.3rem); }
.hbtns .btn { padding: 9px 14px; font-size: .92rem; }
.wrap > header .tab { padding-left: 14px; padding-right: 14px; }
.wrap > header { column-gap: 12px; }
.hbtns { gap: 8px; flex-wrap: nowrap; }
.hbtns .btn { white-space: nowrap; }
.chip small{font-size:.8em;opacity:.75;font-weight:400;margin-left:4px}

/* Backen */
.timebox { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.timebox > div { background: var(--leaf-soft); color: var(--fg); border-radius: 12px; padding: 8px 14px; display: flex; flex-direction: column; min-width: 96px; }
.timebox > div span { font-size: .75rem; color: var(--muted); }
.timebox > div b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.timebox > .total { background: var(--fg); color: var(--bg); }
.timebox > .total span { color: inherit; opacity: .75; }
#bakeView .panel { display: flex; flex-direction: column; gap: 14px; }

/* Kopfleiste: Tabs und Knöpfe passen auf großen Bildschirmen in eine Zeile */
.wrap > header { column-gap: 10px; }
.wrap > header .tab { padding: 8px 11px; font-size: .9rem; gap: 6px; }
.hbtns { gap: 6px; }
.hbtns .btn { padding: 8px 12px; font-size: .88rem; }
@media (min-width: 1340px) { .wrap > header { flex-wrap: nowrap; } .tabs { flex-wrap: nowrap; } }

/* Einzelseiten der Rezepte (rezept/*.html) und Rezeptliste */
.rpage { display: flex; flex-direction: column; gap: 18px; max-width: 820px; width: 100%; }
.crumbs { font-size: .85rem; color: var(--muted); }
.crumbs a, .rmore a { color: inherit; }
.rtitle { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.1; margin: 4px 0; }
.rcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; margin-top: 8px; }
@media (max-width: 700px) { .rcols { grid-template-columns: 1fr; } }
.rpage h2 { font-size: 1.15rem; margin: 0 0 8px; } .rpage h2 small { font-weight: 400; color: var(--muted); }
.rcta .btn { display: inline-block; text-decoration: none; }
.rmore ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.rmore small { color: var(--muted); }
.wrap > header a.tab { text-decoration: none; }

.admbadge { display: inline-block; min-width: 1.5em; padding: 0 .45em; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-size: .78rem; font-weight: 700; line-height: 1.5em; text-align: center; }
.admbadge.zero { background: var(--leaf-soft); color: var(--fg); }
.admlink { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; color: var(--fg); text-decoration: none; margin: 4px 0 8px; }
.admlink:hover, .admlink:focus-visible { border-color: var(--accent); }
.admlink .admbadge { font-size: 1rem; min-width: 2em; line-height: 2em; }
.pairs { display: flex; flex-direction: column; gap: 10px; }
.pairs h3 { margin: 0; }
.pairs .opt { cursor: pointer; }
.dietnote { font-size: .85rem; color: var(--leaf); background: var(--leaf-soft); border-radius: 999px; padding: 3px 12px; }

.dietnotes { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.dietnote { display: inline-flex; align-items: center; gap: 6px; }
.dietnote .x { border: 0; background: transparent; color: inherit; font-size: 1.15rem; line-height: 1; padding: 0 2px; cursor: pointer; border-radius: 50%; }
.dietnote .x:hover, .dietnote .x:focus-visible { background: rgba(0,0,0,.12); }
button.dietnote.off { border: 1.5px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .85rem; }
.avoidrow { display: flex; gap: 8px; }
.avoidrow input { flex: 1; min-width: 0; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; }



.sortsel { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; }
.sortsel select { padding: 6px 28px 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); font: inherit; font-size: .88rem; }

.benefits { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; }
.benefits li::marker { color: var(--accent); }

.aibox { border: 1.5px dashed var(--line); border-radius: 12px; padding: 10px 14px; }
.aibox summary { cursor: pointer; font-weight: 600; }
.aihint { margin: 0 0 6px; }
.ainote { border: 1.5px solid var(--leaf); background: var(--leaf-soft); border-radius: 12px; padding: 10px 14px; }
.ainote ul { margin: 6px 0 0; padding-left: 1.2em; }
.ainote-h { margin: 8px 0 0; font-weight: 600; font-size: .92em; }

/* Administration: Vorschläge der KI zu einem Rezept */
.aireview { margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.aireview .rvhead { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.rv { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.rv.done { opacity: .65; }
.rv .rvt { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rv .rvstate { font-size: .85rem; color: var(--muted); }
.rv .rvdiff { margin: 4px 0; }
.rv del { color: var(--muted); text-decoration: line-through; }
.rv ins { text-decoration: none; background: var(--leaf-soft); border-radius: 4px; padding: 0 3px; }
.rv .rvwhy { margin: 2px 0 0; font-size: .92rem; color: var(--muted); }
#siteFind input { width: 100%; max-width: 420px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: var(--bg); color: var(--fg); }
.legal-footer .ver { opacity: .55; font-size: .75em; white-space: nowrap; }

/* Formular: Prüfung mit KI, Vorschläge einzeln annehmen */
.aibar { border: 1.5px solid var(--leaf); background: var(--leaf-soft); border-radius: 12px; padding: 12px 14px; }
.aibar .aireview { margin-top: 10px; }
.ai-set { outline: 2px solid var(--leaf); outline-offset: 3px; border-radius: 8px; background: var(--leaf-soft); }

/* Rezept-Formular: so breit wie das Rezeptfenster, Name/Autor nebeneinander, Kategorien aufklappbar */
#recipeForm.formsheet { max-width: 1040px; }
.fgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .fgrid.two { grid-template-columns: 1fr; } }
.catbox > summary { font-size: 1.05rem; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 16px; margin: 10px 0; align-items: start; }
.catgrid .field { margin: 0; }
.catbox details { margin-top: 10px; }

.ingmode { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ingmode label { margin: 0; }
.ingmode .seg { display: inline-flex; gap: 6px; }
#f-ing-free { width: 100%; }

/* Bilder im Formular und eigene weitere Fotos am Rezept */
.pcount { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: 6px; }
.pgrid { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 10px; }
.pgrid:empty { display: none; }
.pth { position: relative; margin: 0; width: 150px; }
.pth img { width: 150px; height: 112px; object-fit: cover; border-radius: 10px; display: block; background: var(--line); }
.pth figcaption { font-size: .8rem; color: var(--muted); margin-top: 4px; min-height: 30px; }
.pth figcaption .chip { padding: 3px 10px; font-size: .8rem; }
.pdel { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: var(--surface); line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.myphotos { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.myphotos img { height: 90px; width: auto; border-radius: 8px; display: block; }
.resetrow { margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); }

.rphotos { margin: 12px 0; }
.rph-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.rph-list figure { margin: 0; max-width: 220px; }
.rph-list img { max-width: 100%; max-height: 150px; border-radius: 10px; display: block; margin-bottom: 6px; }
.rph-list figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.sheetfoot{margin:22px 0 4px;padding-top:12px;border-top:1px solid var(--line);font-size:.78rem;color:var(--muted)}.sheetfoot a{color:inherit;text-decoration:underline}

/* Suchfeld: × zum Leeren, nur sichtbar wenn etwas eingetragen ist (ohne Platzhalter) */
.search input#q{padding-right:48px}
.search input#q::-webkit-search-cancel-button,.search input#q::-webkit-search-decoration{-webkit-appearance:none;appearance:none}
.qclear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:36px;height:36px;border:0;border-radius:50%;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.qclear:hover{background:var(--bg);color:var(--text,inherit)}
.qclear:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.search input#q:placeholder-shown~.qclear{display:none}

/* Vegetarisch / vegan umbauen */
.altbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip.on { background: var(--leaf); border-color: var(--leaf); color: #fff; }
:root[data-theme="dark"] .chip.on { color: #0d1711; }
.altnote { margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
ul.ing li.alt .altc { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
ul.ing li.alt select { max-width: 100%; font: inherit; padding: 5px 8px; border: 1.5px solid var(--leaf); border-radius: 8px; background: var(--surface); color: inherit; }
.althint { font-size: .85rem; }

/* Handy: Kopfzeile und Sortierung dürfen umbrechen, nichts läuft über den Rand */
@media (max-width: 640px) {
  .hbtns { margin-left: 0; flex-wrap: wrap; width: 100%; }
  .hbtns .btn { flex: 1 1 auto; text-align: center; padding: 9px 12px; }
  .sortsel { margin-left: 0; flex-wrap: wrap; max-width: 100%; }
  .sortsel select { max-width: 100%; }
  .tabs { width: 100%; }
  .tab { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 640px) {
  .tabs { display: grid; grid-template-columns: 1fr 1fr; border-radius: 22px; }
  .tab { white-space: nowrap; padding: 9px 8px; }
}
@media (max-width: 640px) {
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap > header .tab, .tab { padding: 9px 6px; font-size: .88rem; white-space: normal; text-align: center; gap: 6px; }
}

.hbtns .btn.acc-btn { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; margin-left: 0; max-width: none; overflow: visible; }
.acc-btn .accico { display: block; }
.acc-btn .acctxt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.acc-btn .admbadge { position: absolute; top: -4px; right: -4px; }
@media (max-width: 640px) {
  /* Konto als Symbol oben rechts */
  .wrap > header { position: sticky; }
  .hbtns .btn.acc-btn { position: absolute; top: 6px; right: 0; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
  .acc-btn .accico { display: block; }
  .acc-btn .acctxt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .acc-btn .admbadge { position: absolute; top: -4px; right: -4px; }
}


/* Handy: kompakte Kopfzeile. Suche und Filter hinter Symbolen, Kopfzeile scrollt mit dem Finger weg und wieder herein */
.mbar { display: none; }
@media (max-width: 640px) {
  .wrap > header { flex-wrap: wrap; align-items: center; row-gap: 8px; will-change: transform; }
  .mbar { display: flex; gap: 6px; margin-left: auto; margin-right: 48px; }
  .mbtn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: inherit; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
  .mbtn[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
  .mbtn .mdot { display: none; position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
  .mbtn.has .mdot { display: block; }
  .mbtn[aria-expanded="true"] .mdot { background: #fff; border-color: var(--accent); }
  .hbtns { display: contents; }
  body:not(.mfil) .wrap > header .tabs,
  body:not(.mfil) .hbtns .rand-btn,
  body:not(.mfil) .hbtns .add-btn,
  body:not(.mfil) #filters { display: none; }
  body:not(.msea) #listView .searchrow,
  body:not(.msea) #listView #ingTags:empty { display: none; }
  body.mfil .hbtns { display: flex; width: 100%; }
  body.mfil .hbtns .acc-btn { position: absolute; }
  .wrap > header h1 { margin: 0; }
}


/* Wochenplan */
.save.plan { right: 58px; display: grid; place-items: center; padding: 0; line-height: 0; }
.sheet .save.plan { right: 106px; }
.sheet .save.share { right: 154px; }
.save.share svg { fill: none; stroke: currentColor; stroke-width: 2; }
.save.plan[aria-pressed="true"] { background: var(--leaf); color: #fff; }
:root[data-theme="dark"] .save.plan[aria-pressed="true"] { color: #0d1711; }
.save.plan svg { fill: none; stroke: currentColor; stroke-width: 2; }
.plan { display: flex; flex-direction: column; gap: 22px; }
.plan h2, .plan h3, .plan h4 { margin: 0; }
.plan-head { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: flex-end; }
.plan-head h2 { font-family: var(--font-display); font-size: 1.7rem; }
.plan-head .fhint { margin-top: 4px; }
.plan-ctl { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.inl { display: inline-block; vertical-align: -4px; }
.pn { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 14px; font-weight: 600; }
.pn span { color: var(--muted); font-weight: 500; }
.pn button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--leaf-soft); color: var(--leaf); font-size: 1.2rem; line-height: 1; }
.pn button:disabled { opacity: .4; }
.pn b { min-width: 1.4ch; text-align: center; font-variant-numeric: tabular-nums; }
.pool { background: var(--surface); border: 1.5px dashed var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pool h3 { font-size: 1.05rem; display: flex; gap: 8px; align-items: center; }
.pool h3 .n { font-size: .8rem; background: var(--leaf-soft); color: var(--leaf); border-radius: 999px; padding: 0 8px; }
.pool.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.pool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.psearch { position: relative; max-width: 460px; }
.psearch input { width: 100%; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); padding: 0 14px; font-size: 1rem; }
.psearch input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.pres { position: absolute; z-index: 15; left: 0; right: 0; top: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.pres button, .pmrow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 12px; color: inherit; }
.pres button:hover, .pmrow:hover { background: var(--leaf-soft); }
.pres .plus { margin-left: auto; font-size: 1.4rem; color: var(--leaf); }
.pt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pt b, .plink { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt small { color: var(--muted); font-size: .78rem; }
.plink { border: 0; background: transparent; padding: 0; text-align: left; color: inherit; font-size: .95rem; }
.plink:hover { text-decoration: underline; }
.pth { flex: none; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: hsl(var(--h) var(--tile-s) var(--tile-l)); color: var(--tile-fg); display: grid; place-items: center; font-weight: 800; position: relative; }
.pth img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pi, .pe { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 6px 6px 6px 4px; user-select: none; -webkit-user-select: none; cursor: grab; }
.pi:hover, .pe:hover { border-color: var(--leaf); }
.pe { background: var(--leaf-soft); border-color: transparent; padding: 5px 4px 5px 2px; }
.pe .pt small { font-size: .72rem; }
.pe .plink { font-size: .86rem; white-space: normal; line-height: 1.2; }
.grip { flex: none; display: grid; place-items: center; width: 22px; align-self: stretch; color: var(--muted); touch-action: none; cursor: grab; }
.pbtn { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.pbtn:hover { background: var(--bg); color: var(--fg); }
.pe .pbtn { width: 28px; height: 28px; }
.pi.dragging, .pe.dragging { opacity: .35; }
.dragghost { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; box-shadow: 0 14px 30px rgba(0,0,0,.3); opacity: .96; border-radius: 12px; transform-origin: 0 0; }
.dragghost .pbtn { display: none; }
body.dnd, body.dnd * { cursor: grabbing !important; }
.pcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: start; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.day h3 { font-family: var(--font-display); font-size: 1rem; padding: 2px 2px 4px; }
.slot { border: 1.5px dashed var(--line); border-radius: 10px; padding: 4px 6px 6px; min-height: 52px; display: flex; flex-direction: column; gap: 4px; transition: background .1s, border-color .1s; }
.slot.has { border-style: solid; border-color: var(--line); }
.slot.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.sh { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sadd { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--leaf-soft); color: var(--leaf); font-size: 1.1rem; line-height: 1; }
.dsum { font-size: .8rem; font-weight: 600; padding: 4px 2px 0; border-top: 1px solid var(--line); margin-top: 2px; }
.dsum .muted { font-weight: 400; color: var(--muted); }
.psum { display: flex; flex-direction: column; gap: 16px; }
.psum-head h2 { font-family: var(--font-display); font-size: 1.5rem; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pcard h3 { font-size: 1.1rem; } .pcard h3 small { font-weight: 400; color: var(--muted); font-size: .8rem; margin-left: 6px; }
.pcard-h { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.pbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.sl-grid { columns: 280px; column-gap: 28px; }
.sl-g { break-inside: avoid; margin-bottom: 14px; }
.sl-g h4 { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.sl { list-style: none; margin: 0; padding: 0; }
.sl label { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.sl input { accent-color: var(--leaf); width: 18px; height: 18px; align-self: center; flex: none; }
.sl-a { min-width: 6.5ch; font-weight: 600; font-variant-numeric: tabular-nums; }
.sl input:checked ~ span { text-decoration: line-through; color: var(--muted); }
.sl-spice { margin: 0; font-size: .9rem; color: var(--muted); }
.ntab { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ntab th, .ntab td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ntab thead th { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.ntab th:first-child, .ntab td:first-child { text-align: left; }
.ntab tbody th { font-weight: 600; }
.ntab td:nth-child(2) { position: relative; min-width: 110px; }
.ntab tr.empty td { color: var(--muted); text-align: left; }
.ntab tfoot th, .ntab tfoot td { font-weight: 700; border-bottom: 0; }
.kbar { height: 6px; border-radius: 3px; background: var(--leaf-soft); margin-bottom: 3px; overflow: hidden; }
.kbar i { display: block; height: 100%; background: var(--leaf); }
.ptiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.pt1 { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.pt1 span { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pt1 b { font-family: var(--font-display); font-size: 1.7rem; }
.pt1 small { color: var(--muted); font-size: .8rem; }
.pt1.bio { background: var(--leaf-soft); border-color: transparent; }
.pmodal { max-width: 460px; } .pmodal .sbody { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.pmodal .field { display: flex; flex-direction: column; gap: 4px; } .pmodal select { font: inherit; padding: 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: inherit; }
.pmlist { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; }
.pmsearch input { width: 100%; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 14px 0 46px; font-size: 1rem; }
@media (max-width: 1100px) { .pcal { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pcal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pool-list { grid-template-columns: 1fr; } .plan-head { align-items: flex-start; } .pool { position: static !important; order: -1; max-height: none !important; box-shadow: none !important; } .plan { display: flex; } .pweeks { order: 0; } .plan-head { order: -2; } }
@media (max-width: 480px) { .pcal { grid-template-columns: 1fr; } }
@media print {
  .wrap > header, .plan-head, .pool, .pcal, .pweek-h, .pearlier, .pmore, .pweek:not(:has(.psum)), .pcard:not(:first-of-type), .psum-head, .pbtns, #toast, .legal-footer, #listView { display: none !important; }
  #planView, .psum, .pcard { display: block !important; border: 0; padding: 0; }
  .sl-grid { columns: 2; }
}
.price-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 4px; }
.price-row span { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: .9rem; display: flex; flex-direction: column; gap: 1px; min-width: 120px; }
.price-row small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.price-row b { font-variant-numeric: tabular-nums; }
.price-row i { font-style: normal; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .price-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .price-row span { min-width: 0; padding: 8px; } }

/* Wochenplan als Kalender: Wochen untereinander, Ablage unten fixiert */
.pweeks { display: flex; flex-direction: column; gap: 26px; }
.pweek { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 90px; }
.pweek-h { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.pweek.cur .pweek-h { border-bottom-color: var(--accent); }
.pweek-h h2 { font-family: var(--font-display); font-size: 1.35rem; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.pweek-h h2 small { font-family: inherit; font-size: .9rem; font-weight: 500; color: var(--muted); }
.pweek-h .n { font-size: .75rem; background: var(--leaf-soft); color: var(--leaf); border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.tbadge { font-family: inherit; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: var(--accent-fg); border-radius: 999px; padding: 2px 8px; align-self: center; }
.tbadge.soft { background: var(--leaf-soft); color: var(--leaf); }
.day h3 { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.day h3 .dn { font-weight: 800; }
.day h3 .dd { font-weight: 500; color: var(--muted); font-size: .92rem; }
.day h3 .mon { font-size: .8rem; }
.day h3 .tbadge { margin-left: auto; font-size: .6rem; padding: 1px 6px; }
.day.today { border: 2px solid var(--accent); }
.day.past:not(.today) { opacity: .72; }
.pearlier, .pmore { align-self: center; }
.pmore { display: flex; justify-content: center; padding: 6px 0 2px; }
.pool { position: sticky; bottom: 10px; z-index: 12; max-height: 42vh; overflow-y: auto; box-shadow: 0 -4px 22px rgba(0,0,0,.14); border-style: solid; }
.pool .pbody { display: flex; flex-direction: column; gap: 12px; }
.pool.shut .pbody { display: none; }
.pool .ptog { all: unset; cursor: pointer; display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 1.05rem; width: 100%; }
.pool .ptog:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.pool .ptog .car { margin-left: auto; color: var(--muted); }
.pool .pres { z-index: 16; }
.pool .psearch .pres { top: auto; bottom: 48px; }
.pweek .psum { margin-top: 6px; }
@media (max-width: 760px) { .pweek-h h2 { font-size: 1.15rem; } .pool .psearch .pres { top: 48px; bottom: auto; } }
.pe .plink { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.2; }
.pe .pt { min-width: 0; }
@media (min-width: 761px) {
  .pool { max-height: none; overflow: visible; padding: 10px 14px 12px; gap: 8px; }
  .pool .pbody { flex-direction: row; align-items: flex-start; gap: 14px; }
  .pool .psearch { flex: 0 0 250px; }
  .pool .pool-list { flex: 1; min-width: 0; display: flex; overflow-x: auto; padding-bottom: 4px; }
  .pool .pi { flex: 0 0 236px; }
  .pool .pool-list > .fhint { align-self: center; }
  .pool > .chip { align-self: flex-start; }
  .pool .pbody > .chip { flex: none; }
}
@media (hover: hover) and (pointer: fine) { .pcal .pe .grip { display: none; } .pcal .pe { padding-left: 8px; } }
.pe .plink { overflow-wrap: break-word; hyphens: auto; }

/* Kopfleiste am Computer: Logo und Knöpfe oben, die Tabs eine Zeile darunter; engere Abstände */
@media (min-width: 641px) {
  .wrap > header { flex-wrap: wrap !important; row-gap: 8px; padding: 6px 0 6px; margin-top: -6px; }
  .wrap > header .hbtns { order: 1; }
  .wrap > header::after { content: ''; order: 2; flex-basis: 100%; height: 0; }
  .wrap > header .tabs { order: 3; flex-wrap: wrap; }
  .wrap > header h1 { order: 0; }
  .wrap { gap: 12px; }
  .stack { gap: 12px; }
  .filters { gap: 6px; }
  #listView .searchrow { padding: 2px 0 6px; }
}
@media (max-width: 640px) { .wrap { gap: 14px; } .stack { gap: 14px; } }
.altsteps { background: var(--leaf-soft); border-radius: 12px; padding: 10px 14px; margin: 4px 0 12px; font-size: .9rem; }
.altsteps ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* Zutatenfelder: Beschriftung als Platzhalter in der Zeile, alles enger */
.ingf span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.searchrow { align-items: center; gap: 8px; }
.search input, .ingf input { height: 46px; }
.ingbox { gap: 8px; }
.ingf input::placeholder { color: var(--muted); }
.flabel { flex-basis: auto; min-width: 8.5em; margin-right: 2px; }
.filters .frow { gap: 6px; }
.filters .chip { padding: 4px 12px; font-size: .88rem; }
@media (min-width: 641px) { .filters { gap: 4px; } #listView { gap: 8px; } .count { margin-top: 2px; } }
@media (max-width: 640px) { .flabel { flex-basis: 100%; } }
@media (min-width: 641px) { .flabel { min-width: 7.4em; font-size: .68rem; letter-spacing: .05em; } .filters .chip { padding: 4px 10px; } }
.plink.nolink { cursor: grab; }
.plink.nolink:hover { text-decoration: none; }
.pool .phead { display: flex; align-items: center; gap: 8px; }
.pool .phead h3 { flex: 1; }
.pool .psrch.on { background: var(--leaf-soft); color: var(--leaf); }
.pmh { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }
.pmh:first-child { margin-top: 0; }
.menu-head .on-plan { background: var(--leaf); border-color: var(--leaf); color: #fff; }
:root[data-theme="dark"] .menu-head .on-plan { color: #0d1711; }
.plink.nolink { display: block; max-width: 100%; }
@media (min-width: 761px) { .pool .pi { min-width: 0; max-width: 236px; } }

/* Foto-Großansicht */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,12,10,.92); display: grid; place-items: center; padding: 16px; animation: lbin .15s ease; }
@keyframes lbin { from { opacity: 0; } }
.lightbox figure { margin: 0; max-width: min(96vw, 1200px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-width: 100%; max-height: 82vh; max-height: 82dvh; border-radius: 10px; display: block; object-fit: contain; background: #111; }
.lightbox figcaption { color: #eee; font-size: .9rem; text-align: center; }
.lightbox figcaption span { color: #aaa; margin-left: 8px; font-variant-numeric: tabular-nums; }
.lb-x, .lb-n { position: absolute; border: 0; border-radius: 50%; width: 46px; height: 46px; background: rgba(255,255,255,.16); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-x:hover, .lb-n:hover, .lb-x:focus-visible, .lb-n:focus-visible { background: rgba(255,255,255,.32); outline: 2px solid #fff; }
.lb-x { top: 14px; right: 14px; font-size: 1.1rem; }
.lb-n { top: 50%; transform: translateY(-50%); font-size: 2rem; padding-bottom: 4px; }
.lb-p { left: 12px; } .lb-f { right: 12px; }
@media (max-width: 640px) { .lb-n { top: auto; bottom: 18px; transform: none; } .lb-p { left: 22%; } .lb-f { right: 22%; } .lightbox img { max-height: 74dvh; } }

/* Wochenplan am Handy: vergangene Tage der aktuellen Woche ausblenden, die Übersicht direkt unter den Knopf */
@media (max-width: 760px) {
  .pweek.cur .day.past { display: none; }
}
.pweek .pweek-h { order: 0; } .pweek .psum { order: 1; margin-top: 0; } .pweek .pcal { order: 2; }
.bringrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.bringbtn { display: inline-flex; align-items: center; gap: 8px; background: #2a6a4b; color: #fff; border: 0; border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.bringbtn:hover { filter: brightness(1.1); }

/* Nährwerte pro Tag am Handy: je Tag ein Block, Werte mit Beschriftung zweispaltig */
@media (max-width: 640px) {
  .ntab thead { position: absolute; left: -9999px; }
  .ntab, .ntab tbody, .ntab tfoot { display: block; }
  .ntab tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
  .ntab tfoot tr { border-bottom: 0; }
  .ntab th, .ntab td { border: 0; padding: 0; }
  .ntab tbody th, .ntab tfoot th { grid-column: 1 / -1; text-align: left; margin-bottom: 4px; }
  .ntab td { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; min-width: 0 !important; white-space: nowrap; }
  .ntab td::before { content: attr(data-label); color: var(--muted); font-size: .82rem; white-space: normal; }
  .ntab td:nth-child(2) { grid-column: 1 / -1; display: block; position: static; text-align: left; }
  .ntab td:nth-child(2)::before { content: none; }
  .ntab td:nth-child(2) b::after { content: ' kcal'; font-weight: 400; color: var(--muted); }
  .ntab tr.empty td { grid-column: 1 / -1; display: block; text-align: left; }
  .ntab tr.empty td::before { content: none; }
}
@media (max-width: 640px) {
  .ntab tr.empty { grid-template-columns: auto 1fr; gap: 0 12px; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; align-items: baseline; }
  .ntab tr.empty th { grid-column: auto; margin: 0; }
  .ntab tr.empty td { grid-column: auto; padding: 0; }
}

/* Nur am Handy */
.mobonly { display: none; }
@media (max-width: 760px) { .mobonly { display: flex; } }

/* Passwort zurückgesetzt: Bestätigungsfenster */
.pw-ok { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .5); }
.pw-ok[hidden] { display: none; }
.pw-ok-box { background: var(--surface, #fff); color: var(--fg); border-radius: 18px; padding: 28px 24px; max-width: 400px; width: 100%; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pw-ok-box h2 { margin: 0; font-size: 1.25rem; }
.pw-ok-box p { margin: 0; }
.pw-ok-icon { width: 56px; height: 56px; border-radius: 50%; background: #2a6a4b; color: #fff; display: flex; align-items: center; justify-content: center; }
.pw-ok-box .btn { color: #fff; text-decoration: none; display: inline-block; padding: 12px 22px; }

/* Webansicht: Kopfzeile verschwindet beim Runterscrollen und rollt beim Hochscrollen wieder herein */
@media (min-width: 641px) {
  .wrap > header { transition: transform .25s ease; }
  #listView .searchrow { transition: top .25s ease; }
  body.hdr-off .wrap > header { transform: translateY(calc(-100% - 12px)); }
  body.hdr-off #listView .searchrow { top: 0; }
}
@media (prefers-reduced-motion: reduce) { .wrap > header, #listView .searchrow { transition: none; } }
.linkbtn { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 8px; font: inherit; opacity: .8; }

/* Passt gut dazu: Gruppen mit Begründung */
.pairs .pgroup { display: flex; flex-direction: column; gap: 8px; }
.pairs .pgroup h4 { margin: 6px 0 0; font-size: .95rem; color: var(--muted, #5b665f); font-weight: 700; }
.opt .why { font-size: .8rem; color: var(--leaf, #2f6b2a); font-weight: 600; }
.pairs .frow { margin: 2px 0 4px; }
.pairs .chip small { opacity: .7; margin-left: 2px; }

.similar{margin:22px 0 4px;padding-top:12px;border-top:1px solid var(--line)}.similar h3{margin:0 0 4px}.similar .opts{margin-top:8px}
.similar .simgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,170px),1fr));gap:12px;margin-top:8px}
.simcard{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;background:var(--surface);color:var(--fg);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.simcard:focus-visible{outline:2px solid var(--leaf,#2a6a4b);outline-offset:2px}
.simcard .tile{height:104px;border-radius:0}
.simcard .n{padding:10px 12px 12px;font-weight:600;line-height:1.25}
.simcard .tile{height:auto;aspect-ratio:4/3}.simcard .tile .cat{display:none}
.micro-toggle{align-self:center}
.micro{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:10px 22px;margin:8px 0 4px}
.micro table{border-collapse:collapse;width:100%;font-size:.88rem}
.micro caption{text-align:left;font-weight:700;margin:6px 0 2px}
.micro thead{position:absolute;left:-9999px}
.micro th[scope=row]{text-align:left;font-weight:500;padding:5px 8px 5px 0}
.micro td{padding:5px 0;font-variant-numeric:tabular-nums;white-space:nowrap}
.micro tr{border-bottom:1px solid var(--line)}
.micro td.pct{text-align:right;color:var(--muted);display:flex;align-items:center;gap:8px;justify-content:flex-end}
.micro .bar{display:inline-block;width:54px;height:6px;border-radius:3px;background:var(--line);overflow:hidden}
.micro .bar i{display:block;height:100%;background:var(--leaf,#2a6a4b)}
.micro .macro-note{grid-column:1/-1;margin:2px 0 8px}
.assess{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:12px;margin:12px 0 4px}
.acard{background:var(--bg);border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.acard h4{margin:0 0 6px;font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.acard p{margin:4px 0;font-size:.9rem;line-height:1.4}.acard .verdict{display:flex;align-items:center;gap:10px;font-size:1rem}
.meter{display:inline-flex;gap:3px}.meter i{width:14px;height:8px;border-radius:3px;background:var(--line)}.meter i.on{background:var(--leaf,#2a6a4b)}
.atags{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.atags li{font-size:.8rem;padding:3px 9px;border-radius:999px;border:1px solid var(--line)}
.atags .pl::before{content:"+ ";color:var(--leaf,#2a6a4b);font-weight:700}.atags .mi::before{content:"– ";color:#b3402a;font-weight:700}
.assess .macro-note{grid-column:1/-1;margin:0 0 10px}
/* Rezeptansicht: weniger freie Fläche */
.assess{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:8px 0 2px}
@media (max-width:720px){.assess{grid-template-columns:1fr}}
.macro-row{margin:12px 0 2px}.assess .macro-note,.macro-note{margin:2px 0 8px}
.atips{margin-top:10px;padding-top:8px;border-top:1px dashed var(--line);font-size:.86rem}
.atips ul{margin:4px 0 0;padding-left:18px}.atips li{margin:4px 0;line-height:1.4}
.acard p.fhint{margin:6px 0 0}
.atips{grid-column:1/-1;margin:0;padding:10px 14px;border:1px solid var(--line);border-radius:14px;background:var(--bg)}
.atips ul{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:2px 28px;margin:6px 0 0;padding-left:18px;justify-content:start}.atips li{margin:4px 0}
.sheet .macro-note{margin:4px 0 10px}
.sheet .macro-note{margin:2px 0 6px!important}.sheet .assess{margin-bottom:0}
.satleg{margin-top:8px;font-size:.84rem}.satleg summary{cursor:pointer;color:var(--muted);text-decoration:underline}
.satleg ul{margin:4px 0;padding-left:18px}.satleg p{margin:4px 0}
.gallery .gal{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.gallery .gthumb{position:relative;aspect-ratio:4/3;overflow:hidden;border-radius:12px;background:var(--line)}
.gallery .gthumb img{width:100%;height:100%;object-fit:cover;border-radius:0;display:block;transition:transform .2s}
.gallery .gthumb:hover img{transform:scale(1.04)}
.gallery .gthumb span{position:absolute;left:0;right:0;bottom:0;padding:14px 8px 6px;font-size:.75rem;color:#fff;text-align:left;background:linear-gradient(to top,rgba(0,0,0,.6),transparent);pointer-events:none}
.gallery .galfoot{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:10px}

.ibtn{margin-left:auto;flex:none;width:22px;height:22px;border-radius:50%;border:1.5px solid var(--muted);background:none;color:var(--muted);font:italic 700 .8rem/1 Georgia,serif;cursor:pointer;padding:0}.ibtn:hover,.ibtn[aria-expanded=true]{background:var(--leaf,#2a6a4b);border-color:var(--leaf,#2a6a4b);color:#fff}.itext[hidden]{display:none}

.altgo{display:inline-grid;place-items:center;width:20px;height:20px;margin-left:4px;vertical-align:baseline;border-radius:50%;border:1px solid var(--leaf,#2a6a4b);background:none;color:var(--leaf,#2a6a4b);font:600 .8rem/1 inherit;cursor:pointer;padding:0}.altgo:hover{background:var(--leaf,#2a6a4b);color:#fff}
.swapbox{margin:18px 0 0;padding:14px 16px;border:1px solid var(--line,#d9ded8);border-radius:14px;background:var(--soft,#f3f5f1)}.swapbox h3{margin:0 0 8px}.swapbox h4{margin:14px 0 6px}
.swapcols{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px 24px}.swapcols ul{margin:4px 0 0;padding-left:18px}.swapcols li{margin:3px 0}
.swapgood b::before{content:"✓ ";color:#2a6a4b}.swapbad b::before{content:"✕ ";color:#a3412a}
.swapvars{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:10px 24px}.swapvars p{margin:2px 0 0}

.altmake{margin:8px 0 0;font-size:.9rem}.altlink{border:1px solid var(--leaf,#2a6a4b);background:none;color:var(--leaf,#2a6a4b);border-radius:999px;padding:2px 10px;margin:2px 4px 2px 0;font:inherit;font-size:.85rem;cursor:pointer}.altlink:hover{background:var(--leaf,#2a6a4b);color:#fff}
.altc .altgo{margin-left:6px}
@media (min-width:700px){#filters .frow:first-child{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding-bottom:2px}#filters .frow:first-child>*{flex:none;white-space:nowrap}#filters .frow:first-child{gap:4px}#filters .frow:first-child .chip{padding:5px 8px;font-size:.82rem}}

.swapuse{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:6px}.swapuse li{display:flex;gap:10px;align-items:baseline}.swapuse .ub{flex:none;min-width:8.5em;text-align:center;font-size:.78rem;font-weight:600;padding:2px 8px;border-radius:999px;border:1px solid}
.swapuse .u-gut .ub{color:#1f6b45;background:#e3f3ea;border-color:#b6dcc6}.swapuse .u-bedingt .ub{color:#7a5a00;background:#fbf1d3;border-color:#ecd68a}.swapuse .u-nein .ub{color:#9a3a22;background:#fbe6df;border-color:#efbfb0}
@media (max-width:520px){.swapuse li{flex-direction:column;gap:2px}.swapuse .ub{min-width:0;align-self:flex-start}}

.altgo{display:inline-grid;place-items:center;width:22px;height:22px;margin-left:6px;vertical-align:-5px;border-radius:50%;border:1.5px solid #2a6a4b;background:#fff;color:#2a6a4b;cursor:pointer;padding:0;transition:background .15s,color .15s,transform .15s}
.altgo svg{transition:transform .15s}.altgo:hover,.altgo:focus-visible{background:#2a6a4b;color:#fff;transform:scale(1.08)}.altgo:hover svg,.altgo:focus-visible svg{transform:translateX(1px)}

.backbtn{position:absolute;top:10px;left:10px;z-index:2;height:40px;padding:0 14px 0 11px;border-radius:999px;border:0;background:var(--surface);color:var(--fg);display:inline-flex;align-items:center;gap:6px;font:600 .9rem/1 inherit;box-shadow:var(--shadow);cursor:pointer}.backbtn:hover{background:#fff}

/* Touch: größere Tippflächen (Handy/Tablet) */
@media (pointer: coarse) {
  .sadd { min-width: 40px; min-height: 40px; }
  .ptog { min-height: 44px; }
  .legal-footer a { padding: 12px 0; }
  .legal-footer { gap: 0 20px; }
  .pn button { min-width: 40px; min-height: 40px; }
}

/* Zusammen kochen */
.coop { display: grid; gap: 10px; }
.coop-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.coop-row > span:first-child { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.coop-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.coop-search { display: flex; gap: 8px; margin-top: 4px; }
.coop-search input { flex: 1; min-width: 0; height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); padding: 0 14px; font: inherit; color: inherit; }
.coop-search input:focus { border-color: var(--accent); outline: none; }
.coop-res { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.coop-res li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.chip.danger { border-color: #c0392b; color: #c0392b; }
.okmsg { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--leaf-soft); }
.tag.partner { border-color: var(--leaf); color: var(--leaf); }
.coopby { margin: 6px 0; font-size: .9rem; color: var(--leaf); }
.pe.partner { background: transparent; border: 1px dashed var(--line); cursor: default; }
.pe.partner small { opacity: .8; }
.pparts { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.pparts .plink { font-size: .8rem; text-decoration: underline; width: auto; }

/* Rezept per Link übernehmen */
.urlbar { display: flex; flex-direction: column; gap: 10px; }
.urlbar > .btn { align-self: flex-start; }
.urlbar .ainote { margin: 0; background: var(--surface); }
.fmain[hidden], #f-urlpanel[hidden] { display: none; }
.fmain { display: flex; flex-direction: column; gap: 16px; }
.srcnote { margin: 6px 0 0; font-size: .9em; color: var(--muted); }
.srcnote a { color: inherit; text-decoration: underline; }

/* Kategorie-Zeile: bei vielen Kategorien umbrechen statt seitlich scrollen */
@media (min-width:700px){#filters .frow:first-child{flex-wrap:wrap;overflow:visible;gap:6px;padding-bottom:0}#filters .frow:first-child>*{flex:0 1 auto;white-space:normal}#filters .frow:first-child .flabel{flex-basis:100%}#filters .frow:first-child .chip{padding:4px 10px;font-size:.88rem}}

.fhead { flex-wrap: wrap; }
.fhead .urlchip { margin-left: auto; }
.urlbar[hidden] { display: none; }
@media (max-width: 520px) { .urlmore { display: none; } .fhead h2 { font-size: 1.2rem; } }
.sheet .tile.has-img + .sbody { margin-top: clamp(-84px, -14vw, -48px); position: relative; z-index: 1; padding-top: 0; }
.sheet .tile.has-img + .sbody h2 { text-shadow: 0 0 14px var(--bg, #fff), 0 0 6px var(--bg, #fff); }

.tlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.tlist li { line-height: 1.4; }
.tlist a { font-weight: 600; color: inherit; }
.tlist small, .tlist span { color: var(--muted); }
.tlist span { font-size: .92rem; }
.zfacts { display: grid; gap: 8px; margin: 0; padding: 14px 16px; border: 1px solid var(--line, #ddd); border-radius: 14px; }
.zfacts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 10px; }
.zfacts dt { font-weight: 600; } .zfacts dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .zfacts div { grid-template-columns: 1fr; gap: 0; } }
.rcta small { color: var(--muted); margin-left: 8px; }
