/* Kochbuch – Stil: altes, handgeschriebenes deutsches Kochbuch */

:root {
  --paper: #f7f1e1;          /* vergilbtes Papier */
  --paper-card: #fbf7ec;     /* Seite / Karteikarte */
  --grid: rgb(120 140 170 / .16); /* feines Karomuster */
  --ink: #2a3a63;            /* Tinte (Füller, königsblau-verblasst) */
  --ink-soft: #5d6a8a;
  --pencil: #7c7468;         /* Bleistift für Nebensachen */
  --margin-red: #c4574a;     /* roter Heftrand */
  --accent: #a6402f;         /* rote Tinte für Hervorhebungen */
  --accent-ink: #fbf7ec;
  --tape: rgb(235 220 170 / .75);
  --danger: #a6402f;
  --ok-bg: #e7ecd6;
  --ok-text: #4a5e2a;
  --err-bg: #f6dcd3;
  --radius: 3px;
  --shadow: 0 1px 1px rgb(80 60 30 / .12), 0 8px 18px -6px rgb(80 60 30 / .22);
  --font-hand: "Kalam", "Comic Sans MS", cursive;
  --font-head: "Caveat", "Kalam", cursive;
  --grid-size: 22px;
  --cloth: #fbf7ef;                 /* Küchentuch: Grundfarbe */
  --check: rgb(196 64 52 / .16);    /* Küchentuch: rote Streifen */
  --weave: rgb(120 60 40 / .035);   /* Küchentuch: Webstruktur */
  --check-size: 56px;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --paper: #26231d;
    --paper-card: #2e2a23;
    --grid: rgb(200 210 230 / .07);
    --cloth: #221e1b;
    --check: rgb(200 80 65 / .16);
    --weave: rgb(255 255 255 / .02);
    --ink: #c9d3ee;
    --ink-soft: #9fa9c4;
    --pencil: #a59c8e;
    --margin-red: #b5645a;
    --accent: #e08a74;
    --accent-ink: #26231d;
    --tape: rgb(120 105 70 / .55);
    --danger: #e08a74;
    --ok-bg: #34391f;
    --ok-text: #c7d6a2;
    --err-bg: #43291f;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }
}
/* dunkel per Schalter */
:root:where([data-theme="dark"]) {
    --paper: #26231d;
    --paper-card: #2e2a23;
    --grid: rgb(200 210 230 / .07);
    --cloth: #221e1b;
    --check: rgb(200 80 65 / .16);
    --weave: rgb(255 255 255 / .02);
    --ink: #c9d3ee;
    --ink-soft: #9fa9c4;
    --pencil: #a59c8e;
    --margin-red: #b5645a;
    --accent: #e08a74;
    --accent-ink: #26231d;
    --tape: rgb(120 105 70 / .55);
    --danger: #e08a74;
    --ok-bg: #34391f;
    --ok-text: #c7d6a2;
    --err-bg: #43291f;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }

*, *::before, *::after { box-sizing: border-box; }

/* Kariertes Küchentuch (Vichy-Karo) mit leichter Webstruktur */
body {
  margin: 0;
  color: var(--ink);
  font: 300 18px/1.65 var(--font-hand);
  background-color: var(--cloth);
  background-image:
    repeating-linear-gradient(0deg, var(--weave) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, var(--weave) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, var(--check) 50%, transparent 50%),
    linear-gradient(0deg, var(--check) 50%, transparent 50%);
  background-size: auto, auto, var(--check-size) var(--check-size), var(--check-size) var(--check-size);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; margin: 0 0 .4em; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 6vw, 3.6rem); }
h2 {
  font-size: 2rem;
  display: inline-block;
  /* mit Lineal unterstrichen */
  background: linear-gradient(var(--accent), var(--accent)) left 92% / 100% 2px no-repeat;
  padding-right: .2em;
}
a { color: var(--accent); }

.container { width: min(960px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--pencil); }

/* Kopf & Fuß */
.site-header { border-bottom: 2px solid var(--margin-red); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(2px); position: sticky; top: 0; z-index: 10; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding-block: 10px; gap: 12px; }
.brand { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; line-height: 1; }
.brand__title { font-family: var(--font-head); font-weight: 700; font-size: 2.4rem; letter-spacing: .01em; }
main.container { padding-block: 36px 48px; }
.site-footer { color: var(--pencil); font-family: var(--font-head); font-size: 1.5rem; text-align: center; padding-block: 24px; border-top: 1px dashed var(--pencil); }

/* Knöpfe – wie mit Tinte umrandet */
.btn {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .25em 1em; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; /* handgezeichnet */
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font: 700 1.05rem var(--font-hand); text-decoration: none; cursor: pointer;
  transition: transform .1s, background .15s;
}
.btn:hover { transform: rotate(-1deg) scale(1.03); background: rgb(42 58 99 / .06); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn--danger { color: var(--danger); border-color: var(--danger); }
.btn--ghost { border-style: dashed; border-color: var(--ink-soft); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: transparent; color: var(--pencil); font: 700 1.5rem var(--font-hand); line-height: 1; cursor: pointer;
}
.icon-btn:hover { color: var(--danger); transform: rotate(10deg); }

/* Karten – wie eingeklebte Seiten mit Klebestreifen */
.card {
  position: relative;
  background: var(--paper-card);
  border: 1px solid rgb(120 100 60 / .18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px 24px;
}
.card::before {
  content: ""; position: absolute; top: -11px; left: 50%; width: 92px; height: 22px;
  transform: translateX(-50%) rotate(-2deg);
  background: var(--tape); box-shadow: 0 1px 2px rgb(0 0 0 / .08);
}

.flash { border-radius: var(--radius); padding: 10px 18px; margin: 0 0 24px; font-family: var(--font-head); font-size: 1.35rem; border-left: 4px solid currentColor; }
.flash ul { margin: .25em 0 0; padding-left: 1.2em; font-family: var(--font-hand); font-size: 1rem; }
.flash p { margin: 0; }
.flash--notice { background: var(--ok-bg); color: var(--ok-text); }
.flash--alert { background: var(--err-bg); color: var(--danger); }

/* Rezeptliste – Karteikarten, leicht schief gelegt */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.page-head p { margin: 0; font-family: var(--font-head); font-size: 1.4rem; }
.recipe-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 30px 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.recipe-grid li:nth-child(3n+1) .recipe-card { transform: rotate(-1.2deg); }
.recipe-grid li:nth-child(3n+2) .recipe-card { transform: rotate(.8deg); }
.recipe-grid li:nth-child(3n) .recipe-card { transform: rotate(-.4deg); }
.recipe-card {
  display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  /* Linien wie auf einer Karteikarte */
  background-image: linear-gradient(transparent 0 calc(100% - 1px), rgb(100 130 180 / .25) calc(100% - 1px));
  background-size: 100% 1.65em;
  background-position: 0 3.2em;
}
.recipe-grid li .recipe-card:hover { transform: rotate(0) translateY(-3px); box-shadow: 0 14px 26px -8px rgb(80 60 30 / .35); }
.recipe-card__title { font-family: var(--font-head); font-size: 2.1rem; margin-bottom: .2em; color: var(--ink); }
.recipe-card__desc { color: var(--ink-soft); margin: 0 0 1em; flex: 1; }
.recipe-card__meta { display: flex; gap: 14px; font-size: .95rem; color: var(--pencil); margin: 0; }
.empty { text-align: center; padding: 48px 24px; }

/* Rezeptdetail – Heftseite mit rotem Rand */
.back-link { display: inline-block; margin-bottom: 16px; color: var(--pencil); text-decoration: none; font-family: var(--font-head); font-size: 1.35rem; }
.back-link:hover { color: var(--accent); }
.recipe__head { margin-bottom: 32px; padding-left: 22px; border-left: 2px solid var(--margin-red); }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; margin: 0 0 12px; }
.pill {
  display: inline-block; color: var(--accent); font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; margin: 0;
  border: 2px solid var(--accent); border-radius: 50% 45% 55% 40% / 60% 50% 50% 45%; padding: 0 .7em; transform: rotate(-3deg);
}
.recipe__body { display: grid; gap: 28px; grid-template-columns: minmax(240px, 1fr) 2fr; align-items: start; }
.ingredient-list { list-style: none; padding: 0; margin: 0; }
.ingredient-list li { display: flex; gap: 12px; padding: 4px 0; border-bottom: 1px solid rgb(100 130 180 / .25); }
.ingredient-list li:last-child { border-bottom: 0; }
.ingredient-list__amount { min-width: 3.8em; flex-shrink: 0; font-weight: 700; color: var(--accent); }
.instructions p:first-child { margin-top: 0; }
.instructions { line-height: 1.8; }
.actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.actions form { margin: 0; }

/* Formular – Felder wie Schreiblinien */
.recipe-form { display: grid; gap: 34px; }
.form-section h2 { margin-bottom: .6em; }
.field { display: grid; gap: 2px; margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field--narrow { max-width: 160px; }
label { font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; color: var(--ink-soft); }
input[type=text], input[type=search], input[type=number], input[type=email], textarea {
  width: 100%; padding: .2em .3em; border-radius: 0;
  border: 0; border-bottom: 1.5px solid var(--ink-soft); background: transparent; color: var(--ink);
  font: 400 1.1rem var(--font-hand);
}
textarea {
  resize: vertical; line-height: 2em; padding-top: 0;
  border: 0;
  background-image: linear-gradient(transparent 0 calc(2em - 1px), rgb(100 130 180 / .35) calc(2em - 1px));
  background-size: 100% 2em;
  background-attachment: local;
}
input::placeholder, textarea::placeholder { color: var(--pencil); opacity: .55; }
input:focus, textarea:focus { outline: none; border-bottom-color: var(--accent); background-color: rgb(166 64 47 / .04); }
.field_with_errors { display: contents; }
.field_with_errors input, .field_with_errors textarea { border-bottom-color: var(--danger); }

.ingredient-head, .ingredient-row { display: grid; grid-template-columns: 90px 100px 1fr 36px; gap: 12px; align-items: end; }
.ingredient-head { font-family: var(--font-head); font-size: 1.2rem; color: var(--pencil); margin-bottom: 2px; }
.ingredient-row { margin-bottom: 6px; }
.ingredient-row[hidden] { display: none; }

@media (max-width: 680px) {
  .recipe__body { grid-template-columns: 1fr; }
  .ingredient-head { display: none; }
  .ingredient-head, .ingredient-row { grid-template-columns: 64px 76px 1fr 32px; }
  .page-head { flex-direction: column; gap: 0; }
  .brand__title { font-size: 1.7rem; }
}

/* Portionen-Rechner */
.servings { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; font-family: var(--font-head); font-size: 1.4rem; color: var(--ink-soft); }
.servings__btn {
  width: 34px; height: 34px; border-radius: 50% 45% 55% 48%; border: 2px solid var(--accent);
  background: transparent; color: var(--accent); font: 700 1.3rem/1 var(--font-hand); cursor: pointer;
}
.servings__btn:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); }
.servings__btn:disabled { opacity: .35; cursor: default; }
.servings__count { min-width: 1.4em; text-align: center; font-size: 1.9rem; font-weight: 700; color: var(--accent); }
.servings__reset { display: none; border: 0; background: none; color: var(--pencil); font: 400 1.05rem var(--font-head); text-decoration: underline; cursor: pointer; padding: 0; }
.is-scaled .servings__reset { display: inline; }

/* Kategorie */
.category-label { margin: 0 0 4px; font-family: var(--font-head); font-size: 1.35rem; color: var(--accent); text-transform: none; }
.recipe-card__category { font-family: var(--font-head); font-size: 1.15rem; color: var(--accent); margin: 0 0 -4px; }

/* Zutaten-Filter */
.pantry { margin-bottom: 22px; padding-top: 22px; }
.pantry::before { display: none; }
.pantry__label { display: block; font-size: 1.6rem; color: var(--ink); margin-bottom: 4px; }
.pantry__row { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.pantry__input { flex: 1; min-width: 220px; font-size: 1.2rem !important; }
.pantry__hint { margin: 10px 0 0; color: var(--ink-soft); font-size: .95rem; }
.pantry__hint a { margin-left: 8px; }
.recipe-card__match { margin: 0 0 .6em; color: var(--ok-text); font-weight: 700; }

/* Kategorie-Auswahl */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.chip {
  font-family: var(--font-head); font-size: 1.3rem; text-decoration: none; color: var(--ink-soft);
  padding: 0 .75em; border: 1.5px solid transparent; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}
.chip:hover { border-color: var(--ink-soft); }
.chip.is-active { color: var(--accent); border-color: var(--accent); font-weight: 700; }
.chip__count { font-size: .9rem; color: var(--pencil); }

.field-row { display: flex; gap: 28px; flex-wrap: wrap; }
.field-row .field--narrow { max-width: 200px; }
select { font: 400 1.1rem var(--font-hand); color: var(--ink); background: transparent; border: 0; border-bottom: 1.5px solid var(--ink-soft); padding: .2em 0; }

/* Kopf-Aktionen */
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.site-footer__link { display: block; margin-top: 6px; font-size: 1.1rem; color: var(--pencil); }

/* Rezept vom Foto */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.photo-form { max-width: 620px; }
.photo-drop {
  display: grid; place-items: center; min-height: 260px; cursor: pointer;
  border: 2.5px dashed var(--ink-soft); border-radius: 12px 18px 10px 20px / 18px 10px 20px 12px;
  background: rgb(42 58 99 / .03); transition: background .15s, border-color .15s; overflow: hidden; position: relative;
}
.photo-drop:hover { background: rgb(166 64 47 / .05); border-color: var(--accent); }
.photo-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.photo-drop__text { font-family: var(--font-head); font-size: 1.8rem; color: var(--ink-soft); text-align: center; display: grid; gap: 4px; }
.photo-drop__icon { font-size: 2.6rem; }
.photo-drop__preview { max-width: 100%; max-height: 480px; display: block; transform: rotate(-1deg); box-shadow: var(--shadow); }
.photo-drop.is-reading .photo-drop__preview { animation: reading 1.6s ease-in-out infinite; }
@keyframes reading { 50% { opacity: .55; } }
.photo-form__wait { margin: 10px 0 0; }
.import-notes { margin-bottom: 26px; background: #fff6d8; }
.import-notes ul { margin: 6px 0 0; padding-left: 1.2em; }
.import-hint { margin-top: -8px; font-size: 1.05rem; }
.settings-card { max-width: 640px; }
.settings-card__status { color: var(--ok-text); font-weight: 700; }
input[type=password] { width: 100%; padding: .2em .3em; border: 0; border-bottom: 1.5px solid var(--ink-soft); background: transparent; color: var(--ink); font: 400 1.1rem var(--font-hand); }
input[type=password]:focus { outline: none; border-bottom-color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .import-notes { background: #3a3420; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .import-notes { background: #3a3420; }

/* Rezeptbilder – wie eingeklebte Aquarelle */
.recipe-card__image {
  display: block; width: calc(100% + 12px); margin: -12px -6px 14px; aspect-ratio: 4 / 3; object-fit: cover;
  border: 6px solid #fffdf6; box-shadow: 0 1px 4px rgb(80 60 30 / .25);
}
.recipe__top { display: grid; grid-template-columns: 1fr minmax(200px, 300px); gap: 32px; align-items: start; margin-bottom: 32px; }
.recipe__top .recipe__head { margin-bottom: 0; }
.recipe__image { margin: 0; position: relative; transform: rotate(2deg); }
.recipe__image img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 10px solid #fffdf6; box-shadow: var(--shadow); }
.recipe__image::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; z-index: 1;
  transform: translateX(-50%) rotate(-4deg); background: var(--tape);
}
@media (max-width: 680px) {
  .recipe__top { grid-template-columns: 1fr; }
  .recipe__image { max-width: 280px; }
}

/* Texte direkt auf dem Tuch bekommen ein Stück Papier unterlegt */
main > h1, main > .lead, main > .back-link, .recipe > .back-link, .recipe__head, .plan-head {
  background: var(--paper-card); box-shadow: var(--shadow); border-radius: var(--radius);
}
main > h1 { display: inline-block; padding: 6px 18px 2px; transform: rotate(-.6deg); }
main > .lead { padding: 10px 18px; }
main > .back-link, .recipe > .back-link { padding: 2px 12px; }
.recipe__head { padding: 18px 22px 16px 26px; }

/* Gezeichnete Symbole im Kopf */
.icon { width: 30px; height: 30px; display: block; }
.icon-link {
  display: grid; place-items: center; width: 50px; height: 50px; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  transition: transform .12s, background .15s;
}
.icon-link:hover { transform: rotate(-4deg) scale(1.05); background: rgb(42 58 99 / .06); }
.icon-link--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.icon-link--accent:hover { background: var(--accent); filter: brightness(1.08); }
.header-actions { align-items: center; }
.photo-drop__icon .icon { width: 64px; height: 64px; margin: 0 auto 4px; }

/* Rezept übernehmen: Foto und Link nebeneinander */
.import-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; align-items: start; margin-top: 22px; }
.import-grid .photo-form { max-width: none; }
.dish-card { max-width: 640px; }
.dish-card__seen { font-size: 1.2rem; margin-top: 0; }
.dish-card__question { font-family: var(--font-head); font-size: 1.7rem; line-height: 1.25; color: var(--accent); }

/* Einplanen auf der Rezeptseite */
.plan-it { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.plan-it__icon { color: var(--accent); }
.plan-it__icon .icon { width: 28px; height: 28px; }
.plan-it__label { font-size: 1.3rem; }

/* Wochenplan */
.plan-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 20px; padding: 14px 22px; margin-bottom: 26px; }
.plan-head h1 { margin: 0; }
.plan-nav { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1.45rem; }
.plan-nav__arrow { text-decoration: none; font-size: 1.6rem; padding: 0 .3em; }
.plan-nav__today { font-size: 1.1rem; color: var(--pencil); }
.plan-week { list-style: none; padding: 0; margin: 0; display: grid; gap: 26px 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.plan-day { display: flex; flex-direction: column; gap: 8px; padding: 22px 18px 16px; }
.plan-day:nth-child(odd) { transform: rotate(-.6deg); }
.plan-day:nth-child(even) { transform: rotate(.5deg); }
.plan-day.is-today { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.plan-day.is-past { opacity: .7; }
.plan-day__name { margin: 0; display: flex; justify-content: space-between; align-items: baseline; background: none; }
.plan-day__date { font-size: 1.15rem; color: var(--pencil); }
.plan-day__empty { margin: 0; font-size: .95rem; }
.plan-day__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-entry { display: flex; align-items: center; gap: 6px; }
.plan-entry form { margin: 0; }
.plan-entry__link { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; line-height: 1.25; }
.plan-entry__link:hover { color: var(--accent); }
.plan-entry__image { width: 46px; height: 46px; object-fit: cover; border: 3px solid #fffdf6; box-shadow: 0 1px 3px rgb(80 60 30 / .3); flex-shrink: 0; }
.plan-add { margin-top: auto; padding-top: 6px; }
.plan-add select { width: 100%; font-size: 1rem; color: var(--pencil); cursor: pointer; }

/* „Meintest du …?“ bei Tippfehlern */
.pantry__suggestion { margin: 12px 0 0; font-family: var(--font-head); font-size: 1.5rem; color: var(--ink); line-height: 1.3; }
.pantry__suggestion a { color: var(--accent); }
.pantry__suggestion-sub { display: block; font-family: var(--font-hand); font-size: .95rem; color: var(--ink-soft); }

/* Frag dein Kochbuch – Chat */
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.chat-head h1 { margin: 0; display: inline-block; background: var(--paper-card); box-shadow: var(--shadow); padding: 6px 18px 2px; transform: rotate(-.6deg); }
.chat-head form { margin: 0; }
.chat-head .btn--ghost { background: var(--paper-card); }
.chat { display: grid; gap: 18px; }
.chat__intro p:first-child { margin-top: 0; font-size: 1.15rem; }
.chat__examples { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chat__examples form { margin: 0; }
.chat__example {
  font: 400 1rem var(--font-hand); color: var(--ink); cursor: pointer; text-align: left;
  background: rgb(42 58 99 / .05); border: 1.5px dashed var(--ink-soft); border-radius: 14px 18px 12px 20px; padding: 6px 12px;
}
.chat__example:hover { border-color: var(--accent); color: var(--accent); }
.chat__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.chat-msg { display: grid; gap: 8px; }
.chat-msg__bubble { max-width: 85%; padding: 10px 16px; border-radius: 18px 22px 16px 20px / 20px 16px 22px 18px; line-height: 1.55; }
.chat-msg__bubble p { margin: 0 0 .5em; }
.chat-msg__bubble p:last-child { margin-bottom: 0; }
.chat-msg__bubble ul { margin: .2em 0 .5em; padding-left: 1.2em; }
.chat-msg--user { justify-items: end; }
.chat-msg--user .chat-msg__bubble { background: var(--accent); color: var(--accent-ink); transform: rotate(.4deg); }
.chat-msg--assistant .chat-msg__bubble { background: rgb(42 58 99 / .06); border: 1.5px solid rgb(42 58 99 / .15); transform: rotate(-.3deg); }
.chat-msg__recipes { display: flex; flex-wrap: wrap; gap: 10px; }
.chat-recipe {
  display: grid; width: 120px; gap: 4px; text-decoration: none; color: var(--ink); font-size: .9rem; line-height: 1.2;
  background: #fffdf6; padding: 5px 5px 8px; box-shadow: 0 1px 4px rgb(80 60 30 / .25); transition: transform .15s;
}
.chat-recipe:nth-child(odd) { transform: rotate(-2deg); }
.chat-recipe:nth-child(even) { transform: rotate(1.5deg); }
.chat-recipe:hover { transform: rotate(0) scale(1.04); color: var(--accent); }
.chat-recipe img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.chat__form { display: flex; gap: 12px; align-items: end; border-top: 1px dashed var(--pencil); padding-top: 14px; }
.chat__form textarea { flex: 1; }

/* Gekocht-Haken im Wochenplan */
.cook-check { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; flex-shrink: 0; color: var(--ink-soft); }
.cook-check svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cook-check__box { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.cook-check__tick { fill: none; stroke: var(--ok-text); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round;
                    stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .3s ease-out; }
.cook-check:hover .cook-check__box { stroke: var(--accent); }
.is-cooked .cook-check__tick { stroke-dashoffset: 0; }
.is-cooked .plan-entry__link span { text-decoration: line-through; text-decoration-color: rgb(74 94 42 / .6); text-decoration-thickness: 2px; }
.plan-entry > form { margin: 0; }

/* Lieblingsrezept-Stern */
.fav-star { color: #e6a417; margin-left: .25em; font-size: .85em; display: inline-block; transform: rotate(-8deg); text-shadow: 0 1px 0 rgb(120 80 0 / .25); }

/* Statistik */
.stats-year { font-size: 1.35rem; text-decoration: none; color: var(--ink-soft); padding: 0 .4em; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; border: 1.5px solid transparent; }
.stats-year.is-active { color: var(--accent); border-color: var(--accent); font-weight: 700; }
.stats-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px; margin-bottom: 26px; }
.stat-tile { display: grid; gap: 2px; padding-top: 24px; }
.stat-tile__value { font-family: var(--font-head); font-size: 3.4rem; line-height: 1; color: var(--ink); font-weight: 700; }
.stat-tile__value--text { font-size: 1.9rem; line-height: 1.1; }
.stat-tile__label { color: var(--ink-soft); font-size: 1rem; }
.stats-section { margin-bottom: 26px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 22px; }
.stats-note { margin: 14px 0 0; font-size: .95rem; color: var(--ink-soft); }

.top-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.top-bar { display: grid; grid-template-columns: minmax(140px, 1.1fr) 2fr 3em; align-items: center; gap: 12px; }
.top-bar__name { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; line-height: 1.2; }
.top-bar__name:hover { color: var(--accent); }
.top-bar__name img { width: 34px; height: 34px; object-fit: cover; border: 2px solid #fffdf6; box-shadow: 0 1px 3px rgb(80 60 30 / .3); flex-shrink: 0; }
.top-bar__track { display: block; height: 14px; }
.top-bar__fill { position: relative; display: block; height: 100%; min-width: 6px; background: var(--accent); border-radius: 0 4px 4px 0; }
.top-bar__value { font-family: var(--font-head); font-size: 1.4rem; color: var(--ink); text-align: right; }

.month-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; height: 190px; align-items: end; padding-top: 18px; border-bottom: 1.5px solid var(--ink-soft); }
.month-chart__col { position: relative; display: grid; grid-template-rows: 18px 1fr; height: 100%; align-items: end; justify-items: center; outline: none; }
.month-chart__bar { width: min(26px, 70%); min-height: 0; background: var(--accent); border-radius: 4px 4px 0 0; align-self: end; }
.month-chart__value { font-family: var(--font-head); font-size: 1.2rem; color: var(--ink); align-self: end; }
.month-chart__label { position: absolute; bottom: -26px; font-family: var(--font-head); font-size: 1.1rem; color: var(--ink-soft); }
.month-chart + table + * , .month-chart { margin-bottom: 30px; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid rgb(100 130 180 / .25); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list__value { font-family: var(--font-head); font-size: 1.3rem; }

/* Hover-Tooltip für Balken */
[data-tip] { cursor: default; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  white-space: nowrap; background: var(--ink); color: var(--paper-card); font: 400 .9rem var(--font-hand);
  padding: 3px 10px; border-radius: 8px; pointer-events: none; z-index: 5;
}
.month-chart__col[data-tip]:hover::after { bottom: auto; top: -10px; }
.top-bar:hover .top-bar__fill { filter: brightness(1.12); }

/* Einkaufsliste */
.shop-button .icon { width: 22px; height: 22px; }
.shop-card { margin-bottom: 26px; }
.shop-card__hint { margin-top: -6px; }
.shop-list { list-style: none; margin: 0 0 8px; padding: 0; }
.shop-list li { border-bottom: 1px solid rgb(100 130 180 / .25); }
.shop-list li:last-child { border-bottom: 0; }
.shop-item { display: grid; grid-template-columns: 26px 6.5em 1fr; grid-template-areas: "box amount name" ". . for"; align-items: center; column-gap: 10px; padding: 6px 0; cursor: pointer; font-weight: 400; font-family: var(--font-hand); font-size: 1.05rem; color: var(--ink); }
.shop-item__box { grid-area: box; width: 20px; height: 20px; accent-color: var(--ok-text); cursor: pointer; }
.shop-item__amount { grid-area: amount; font-weight: 700; color: var(--accent); }
.shop-item__name { grid-area: name; }
.shop-item__for { grid-area: for; font-size: .82rem; color: var(--pencil); line-height: 1.2; }
.shop-item:has(.shop-item__box:checked) .shop-item__name, .shop-item:has(.shop-item__box:checked) .shop-item__amount { opacity: .45; text-decoration: line-through; }
.shop-buy { display: grid; grid-template-columns: 26px 6.5em 1fr; grid-template-areas: "box amount name"; align-items: center; column-gap: 10px; padding: 8px 0; cursor: pointer; outline: none; font-size: 1.15rem; }
.shop-buy:focus-visible { background: rgb(166 64 47 / .06); }
.shop-buy__box { grid-area: box; width: 20px; height: 20px; border: 2px solid var(--ink-soft); border-radius: 4px 6px 4px 5px; position: relative; }
.shop-buy.is-done .shop-buy__box::after { content: "✓"; position: absolute; inset: -9px 0 0 2px; color: var(--ok-text); font-size: 1.5rem; font-weight: 700; }
.shop-buy.is-done .shop-item__name, .shop-buy.is-done .shop-item__amount { opacity: .4; text-decoration: line-through; }
.shop-card__count { font-family: var(--font-head); font-size: 1.4rem; color: var(--ink-soft); margin: 6px 0 0; }
.shop-recipes .cat-list li { gap: 12px; }

@media print {
  .site-header, .site-footer, .back-link, .actions, .plan-head .plan-nav, .shop-card__hint, .shop-card__count { display: none !important; }
  body { background: #fff; }
  .card, .plan-head { box-shadow: none; border: 0; }
  .card::before { display: none; }
}

/* Hinzufügen-Menü im Kopf */
.add-menu { position: relative; }
.add-menu__button[aria-expanded="true"] .icon { transform: rotate(45deg); }
.add-menu__button .icon { transition: transform .2s; }
.add-menu__panel {
  position: absolute; right: -6px; top: calc(100% + 12px); z-index: 30; width: 300px;
  background: var(--paper-card); border: 1px solid rgb(120 100 60 / .2); border-radius: 6px;
  box-shadow: 0 14px 34px -10px rgb(80 60 30 / .45); padding: 16px 12px 10px; transform-origin: top right;
  animation: menu-in .18s ease-out;
}
.add-menu__panel::before { /* Klebestreifen */
  content: ""; position: absolute; top: -10px; left: 50%; width: 80px; height: 20px; transform: translateX(-50%) rotate(-3deg); background: var(--tape);
}
.add-menu__panel::after { /* kleine Spitze zum Knopf */
  content: ""; position: absolute; top: -7px; right: 22px; width: 12px; height: 12px; background: var(--paper-card);
  border-left: 1px solid rgb(120 100 60 / .2); border-top: 1px solid rgb(120 100 60 / .2); transform: rotate(45deg);
}
.add-menu__title { margin: 0 6px 6px; font-family: var(--font-head); font-size: 1.35rem; color: var(--pencil); }
.add-menu__item {
  display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px 14px 9px 13px;
  color: var(--ink); text-decoration: none; transition: background .15s, transform .15s;
}
.add-menu__item:hover, .add-menu__item:focus-visible { background: rgb(166 64 47 / .07); transform: translateX(3px); outline: none; }
.add-menu__item strong { display: block; font-family: var(--font-head); font-size: 1.45rem; line-height: 1.05; }
.add-menu__item small { display: block; font-size: .85rem; color: var(--ink-soft); line-height: 1.25; }
.add-menu__icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50% 46% 52% 48%; }
.add-menu__icon .icon { width: 26px; height: 26px; }
.add-menu__icon--write { background: #fde3d6; color: var(--accent); }
.add-menu__icon--photo { background: #e2e8f6; color: var(--ink); }
.add-menu__icon--link { background: #e4efd9; color: var(--ok-text); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .add-menu__icon--write { background: #4a2d24; }
  :where(:root:not([data-theme="light"])) .add-menu__icon--photo { background: #2c3247; }
  :where(:root:not([data-theme="light"])) .add-menu__icon--link { background: #2e3a26; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .add-menu__icon--write { background: #4a2d24; }
  :where(:root[data-theme="dark"]) .add-menu__icon--photo { background: #2c3247; }
  :where(:root[data-theme="dark"]) .add-menu__icon--link { background: #2e3a26; }
.import-grid--single { grid-template-columns: minmax(0, 620px); }

/* Kategorien als Karteikarten-Reiter */
.chips {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 3px;
  margin: 0 0 30px; padding: 0 10px; position: relative;
  border-bottom: 6px solid var(--paper-card);            /* Oberkante der Karteikarten */
  filter: drop-shadow(0 2px 2px rgb(80 60 30 / .18));
}
.chip {
  --tab: #fbe3d5;
  position: relative; display: inline-flex; align-items: baseline; gap: 6px;
  padding: 5px 16px 3px; margin-bottom: -1px;
  font-family: var(--font-head); font-size: 1.35rem; line-height: 1.2; text-decoration: none; color: var(--ink);
  background: var(--tab); border: 0; border-radius: 12px 14px 0 0 / 14px 12px 0 0;
  box-shadow: inset 0 -6px 8px -6px rgb(80 60 30 / .25);   /* liegt etwas hinter der Karte */
  transform: translateY(5px); transition: transform .15s, background .15s;
}
.chip:nth-child(6n+2) { --tab: #e3ebf7; }
.chip:nth-child(6n+3) { --tab: #e6f0d8; }
.chip:nth-child(6n+4) { --tab: #f7e6c4; }
.chip:nth-child(6n+5) { --tab: #ece0f2; }
.chip:nth-child(6n+6) { --tab: #f9dfe4; }
.chip:nth-child(odd) { rotate: -.6deg; }
.chip:nth-child(even) { rotate: .5deg; }
.chip:hover { transform: translateY(1px); }
.chip.is-active {
  z-index: 1; transform: translateY(0); padding-top: 8px; padding-bottom: 6px;
  background: var(--paper-card); color: var(--accent); font-weight: 700; box-shadow: none; rotate: 0deg;
}
.chip__count { font-family: var(--font-hand); font-size: .8rem; color: var(--ink-soft); }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .chip { --tab: #4a3a32; color: var(--ink); }
  :where(:root:not([data-theme="light"])) .chip:nth-child(6n+2) { --tab: #343a4d; }
  :where(:root:not([data-theme="light"])) .chip:nth-child(6n+3) { --tab: #36412e; }
  :where(:root:not([data-theme="light"])) .chip:nth-child(6n+4) { --tab: #4a4130; }
  :where(:root:not([data-theme="light"])) .chip:nth-child(6n+5) { --tab: #403548; }
  :where(:root:not([data-theme="light"])) .chip:nth-child(6n+6) { --tab: #4a3238; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .chip { --tab: #4a3a32; color: var(--ink); }
  :where(:root[data-theme="dark"]) .chip:nth-child(6n+2) { --tab: #343a4d; }
  :where(:root[data-theme="dark"]) .chip:nth-child(6n+3) { --tab: #36412e; }
  :where(:root[data-theme="dark"]) .chip:nth-child(6n+4) { --tab: #4a4130; }
  :where(:root[data-theme="dark"]) .chip:nth-child(6n+5) { --tab: #403548; }
  :where(:root[data-theme="dark"]) .chip:nth-child(6n+6) { --tab: #4a3238; }
/* Reiter in einer Reihe, bei Platzmangel seitlich wischbar */
.chips { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding-top: 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 4px 12px 3px; font-size: 1.22rem; white-space: nowrap; }
.chip.is-active { padding-top: 7px; padding-bottom: 5px; }

/* Mini-Kalender „Wann kochst du das?“ auf der Rezeptseite */
.plan-strip { margin-bottom: 28px; padding-bottom: 18px; }
.plan-strip__head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; }
.plan-strip__head h2 { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.plan-strip__icon { color: var(--accent); display: inline-flex; }
.plan-strip__icon .icon { width: 28px; height: 28px; }
.plan-strip__link { font-family: var(--font-head); font-size: 1.25rem; color: var(--ink-soft); }
.plan-strip__days { list-style: none; margin: 0; padding: 4px 2px 6px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.plan-strip__days li { flex-shrink: 0; }
.plan-strip__days li.is-weekstart { margin-left: 10px; padding-left: 14px; border-left: 1.5px dashed var(--pencil); }
.plan-strip__days form { margin: 0; }
.plan-day-btn {
  display: grid; justify-items: center; gap: 0; width: 62px; padding: 6px 0 5px; cursor: pointer;
  background: #fffdf6; color: var(--ink); border: 1.5px solid rgb(42 58 99 / .25);
  border-radius: 10px 12px 9px 11px / 11px 9px 12px 10px; box-shadow: 0 2px 0 rgb(42 58 99 / .12);
  font-family: var(--font-hand); transition: transform .12s, border-color .12s, background .12s;
}
.plan-day-btn:hover:not(:disabled) { transform: translateY(-3px) rotate(-2deg); border-color: var(--accent); background: #fff3ee; }
.plan-day-btn__name { font-family: var(--font-head); font-size: 1.05rem; line-height: 1; color: var(--ink-soft); }
.plan-day-btn__date { font-family: var(--font-head); font-size: 1.9rem; line-height: 1.05; font-weight: 700; }
.plan-day-btn__month { font-size: .75rem; color: var(--pencil); line-height: 1; }
.plan-day-btn.is-weekend { background: #fdf3f3; }
.plan-day-btn.is-planned { background: var(--ok-bg); border-color: var(--ok-text); color: var(--ok-text); cursor: default; box-shadow: none; }
.plan-day-btn.is-planned .plan-day-btn__month { color: var(--ok-text); font-size: 1rem; font-weight: 700; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .plan-day-btn { background: var(--paper-card); }
  :where(:root:not([data-theme="light"])) .plan-day-btn.is-weekend { background: #352c2a; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .plan-day-btn { background: var(--paper-card); }
  :where(:root[data-theme="dark"]) .plan-day-btn.is-weekend { background: #352c2a; }

/* Rezept teilen */
.share-box { margin-top: 28px; }
.share-box h2 { display: inline-flex; align-items: center; gap: 8px; }
.share-box__hint { margin-top: -4px; }
.share-box__link { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin: 8px 0 14px; }
.share-box__link input { flex: 1; min-width: 220px; font-size: .95rem !important; color: var(--ink-soft) !important; }
.share-box__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.share-box__note { margin: 16px 0 0; padding: 10px 14px; background: #fff6d8; border-radius: 8px; font-size: .95rem; }
.share-box__reset { margin-top: 12px; border: 0; background: none; padding: 0; font: 400 .9rem var(--font-hand); color: var(--pencil); text-decoration: underline; cursor: pointer; }
.share-box form { margin: 0; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .share-box__note { background: #3a3420; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .share-box__note { background: #3a3420; }
.shared-page .site-header { position: static; }
.shared-actions { justify-content: center; }
@media print {
  .share-box, .plan-strip, .servings__btn, .servings__reset, .shared-actions { display: none !important; }
}

/* Speiseplan (A4 quer) */
.menu-toolbar { gap: 10px 22px; }
.menu-toolbar__buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.menu-stage { position: relative; width: 100%; overflow: hidden; margin-bottom: 20px; }
.menu-sheet {
  position: relative; width: 1123px; height: 794px; transform-origin: top left; flex-shrink: 0;
  background: #fffaf0; color: #2a3a63; padding: 26px; box-shadow: 0 10px 30px -8px rgb(80 60 30 / .4);
  /* rot-weiß kariertes Küchentuch als Rand */
  background-image:
    linear-gradient(90deg, rgb(196 64 52 / .22) 50%, transparent 50%),
    linear-gradient(0deg, rgb(196 64 52 / .22) 50%, transparent 50%);
  background-size: 28px 28px; background-color: #fffaf3;
}
.menu-sheet__inner {
  height: 100%; display: flex; flex-direction: column; background: #fffaf0; border-radius: 6px;
  padding: 26px 34px 18px; box-shadow: 0 0 0 2px rgb(196 64 52 / .35), inset 0 0 0 6px #fffaf0, inset 0 0 0 7.5px rgb(42 58 99 / .25);
}
.menu-sheet__head { text-align: center; margin-bottom: 18px; }
.menu-sheet__kicker { margin: 0; font-family: "Caveat", cursive; font-size: 24px; color: #a6402f; }
.menu-sheet__title { margin: 0; font-family: "Caveat", cursive; font-size: 68px; line-height: 1; font-weight: 700; color: #2a3a63; background: none; padding: 0; }
.menu-sheet__dates { margin: 4px 0 0; font-family: "Kalam", cursive; font-size: 18px; color: #6a5a5a; }
.menu-week { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.menu-day {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 14px 8px 12px; border-radius: 14px 18px 12px 16px / 16px 12px 18px 14px; background: #fdf3e6;
  border: 1.5px dashed rgb(42 58 99 / .25);
}
.menu-day--1, .menu-day--4 { background: #eef2fa; }
.menu-day--2, .menu-day--6 { background: #f0f6e8; }
.menu-day--3 { background: #fbeef2; }
.menu-day--5 { background: #fdf6dc; }
.menu-day__name { font-family: "Caveat", cursive; font-size: 30px; font-weight: 700; line-height: 1; color: #2a3a63; }
.menu-day__date { font-family: "Kalam", cursive; font-size: 14px; color: #8a7a7a; margin-top: -4px; }
.menu-dish { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 6px; }
.menu-dish__image { width: 112px; height: 112px; object-fit: cover; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 2px 6px rgb(80 60 30 / .3); }
.menu-dish__title { font-family: "Kalam", cursive; font-size: 17px; line-height: 1.2; color: #2a3a63; font-weight: 400; }
.menu-dish__more { font-family: "Kalam", cursive; font-size: 13px; color: #8a7a7a; }
.menu-day__free { margin: auto 0; font-family: "Caveat", cursive; font-size: 24px; color: #a69a9a; display: grid; gap: 2px; }
.menu-day__free-icon { font-size: 34px; color: #e9a5a5; line-height: 1; }
.menu-sheet__foot { text-align: center; margin-top: 12px; font-family: "Caveat", cursive; font-size: 30px; color: #a6402f; }

@media print {
  @page { size: A4 landscape; margin: 0; }
  body.menu-print, body { background: #fff !important; }
  .menu-toolbar, .back-link { display: none !important; }
  .menu-stage { height: auto !important; overflow: visible; }
  .menu-sheet { position: static; transform: none !important; box-shadow: none; width: 297mm; height: 209mm; }
}

/* Kategorien im Rezeptformular (mehrere wählbar) */
.category-pick { border: 0; padding: 0; margin: 0 0 4px; }
.category-pick legend { font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; color: var(--ink-soft); padding: 0; margin-bottom: 6px; }
.category-pick legend .muted { font-weight: 400; font-size: 1.1rem; }
.category-pick__list { display: flex; flex-wrap: wrap; gap: 8px; }
.category-pick__item {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: 400 1.05rem var(--font-hand); color: var(--ink);
  padding: 3px 12px 3px 8px; border: 1.5px dashed rgb(42 58 99 / .3); border-radius: 14px 18px 12px 16px; background: #fffdf6;
  transition: background .12s, border-color .12s;
}
.category-pick__item:hover { border-color: var(--accent); }
.category-pick__box { accent-color: var(--accent); width: 16px; height: 16px; }
.category-pick__item:has(.category-pick__box:checked) { background: #fde3d6; border-style: solid; border-color: var(--accent); }
.category-pick__new { display: flex; align-items: end; gap: 10px; margin-top: 12px; max-width: 360px; }
.category-pick__new-label { font-size: 1.15rem; white-space: nowrap; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .category-pick__item { background: var(--paper-card); }
  :where(:root:not([data-theme="light"])) .category-pick__item:has(.category-pick__box:checked) { background: #4a2d24; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .category-pick__item { background: var(--paper-card); }
  :where(:root[data-theme="dark"]) .category-pick__item:has(.category-pick__box:checked) { background: #4a2d24; }

/* „+“-Reiter zum Verwalten der Kategorien */
.chip--add { --tab: #fffdf6; color: var(--accent); font-weight: 700; padding-left: 12px; padding-right: 12px; }

/* Kategorien verwalten */
.cat-manage { max-width: 680px; }
.cat-new { display: flex; gap: 12px; align-items: end; margin-bottom: 18px; }
.cat-new input { flex: 1; font-size: 1.15rem !important; }
.cat-rows { list-style: none; margin: 0; padding: 0; }
.cat-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgb(100 130 180 / .25); }
.cat-row:last-child { border-bottom: 0; }
.cat-row form { margin: 0; }
.cat-row__move { display: flex; gap: 2px; }
.cat-row__arrow { width: 28px; height: 28px; border: 0; background: none; color: var(--ink-soft); font-size: 1.1rem; cursor: pointer; border-radius: 50%; }
.cat-row__arrow:hover:not(:disabled) { background: rgb(42 58 99 / .08); color: var(--accent); }
.cat-row__arrow:disabled { opacity: .25; cursor: default; }
.cat-row__form { display: flex; gap: 8px; align-items: end; }
.cat-row__form input { font-family: var(--font-head) !important; font-size: 1.45rem !important; border-bottom-color: transparent !important; }
.cat-row__form input:focus { border-bottom-color: var(--accent) !important; }
.cat-row__save { padding: .1em .8em; font-size: .9rem; opacity: 0; transition: opacity .15s; }
.cat-row__form:focus-within .cat-row__save { opacity: 1; }
.cat-row__count { font-size: .9rem; color: var(--pencil); white-space: nowrap; text-decoration: none; }
.cat-row__count:hover { color: var(--accent); }
.import-category select { width: 100%; }

/* Beispieldaten in der Statistik */
.demo-box { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; margin: -8px 0 26px; padding: 10px 16px; background: var(--paper-card); border: 1.5px dashed var(--ink-soft); border-radius: 12px 16px 10px 14px; font-size: 1rem; }
.demo-box form { margin: 0; }
.demo-box--on { background: #fff6d8; border-color: #d9a520; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .demo-box--on { background: #3a3420; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .demo-box--on { background: #3a3420; }

/* Zeitangaben */
.recipe-times { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 4px 0 0; }
.recipe-times div { display: grid; }
.recipe-times dt { font-size: .85rem; color: var(--ink-soft); }
.recipe-times dd { margin: 0; font-family: var(--font-head); font-size: 1.55rem; line-height: 1.1; color: var(--ink); }
.recipe-times__total dd { color: var(--accent); font-weight: 700; }
.time-fields { gap: 18px 28px; align-items: end; }
.time-fields .field--narrow { max-width: 150px; }
.time-fields { flex-wrap: wrap; }
.time-fields__label { font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; color: var(--ink-soft); }
.time-fields__value { font-family: var(--font-head); font-size: 1.6rem; color: var(--accent); font-weight: 700; padding-bottom: 2px; }

/* Lieblingsrezepte: Kopf mit Knopf */
.fav-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 18px; flex-wrap: wrap; margin-bottom: 10px; }
.fav-head h2 { margin: 0; }
.booklet-preview-title { margin: 30px 0 14px; display: inline-block; background: var(--paper-card); padding: 4px 16px; box-shadow: var(--shadow); }

/* Rezeptheft (A4 hoch, 794 × 1123 px pro Seite) */
.booklet-stage { position: relative; width: 100%; overflow: hidden; margin-bottom: 26px; }
.booklet { width: 794px; transform-origin: top left; display: grid; gap: 18px; }
.pdf-page {
  width: 794px; height: 1123px; overflow: hidden; position: relative; box-sizing: border-box;
  background: #fffaf0; color: #2a3a63; box-shadow: 0 8px 24px -8px rgb(80 60 30 / .4);

}
.booklet.is-exporting { gap: 0; }
.booklet.is-exporting .pdf-page { box-shadow: none;
}
.booklet-cover {
  padding: 28px;
  background-image: linear-gradient(90deg, rgb(196 64 52 / .22) 50%, transparent 50%), linear-gradient(0deg, rgb(196 64 52 / .22) 50%, transparent 50%);
  background-size: 28px 28px; background-color: #fffaf3;
}
.booklet-cover__inner { height: 100%; background: #fffaf0; border-radius: 6px; padding: 60px 50px 30px; text-align: center; display: flex; flex-direction: column; box-shadow: 0 0 0 2px rgb(196 64 52 / .35); }
.booklet-cover__kicker { margin: 0; font-family: "Caveat", cursive; font-size: 28px; color: #a6402f; }
.booklet-cover__title { margin: 4px 0 6px; font-family: "Caveat", cursive; font-size: 76px; line-height: 1; font-weight: 700; color: #2a3a63; background: none; padding: 0; }
.booklet-cover__sub { margin: 0 0 34px; font-family: "Kalam", cursive; font-size: 19px; color: #6a5a5a; }
.booklet-cover__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 18px; flex: 1; align-content: start; }
.booklet-cover__grid li { display: grid; justify-items: center; gap: 6px; }
.booklet-cover__grid img { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 2px 6px rgb(80 60 30 / .3); }
.booklet-cover__grid span { font-family: "Kalam", cursive; font-size: 16px; line-height: 1.2; }
.booklet-cover__foot { margin: 0; font-family: "Caveat", cursive; font-size: 32px; color: #a6402f; }
.booklet-recipe { padding: 54px 58px; display: flex; flex-direction: column; gap: 26px; border-left: 10px solid rgb(196 64 52 / .35); }
.booklet-recipe__head { display: grid; grid-template-columns: 1fr 210px; gap: 24px; align-items: center; }
.booklet-recipe__cat { margin: 0; font-family: "Caveat", cursive; font-size: 22px; color: #a6402f; }
.booklet-recipe__title { margin: 0; font-family: "Caveat", cursive; font-size: 54px; line-height: 1.02; font-weight: 700; }
.booklet-recipe__title a { color: inherit; text-decoration: none; }
.booklet-recipe__meta { margin: 10px 0 0; font-family: "Kalam", cursive; font-size: 15px; color: #6a5a5a; display: grid; gap: 2px; }
.booklet-recipe__image { width: 210px; height: 210px; object-fit: cover; border: 8px solid #fff; box-shadow: 0 3px 10px rgb(80 60 30 / .3); transform: rotate(2deg); }
.booklet-recipe__body { display: grid; grid-template-columns: 250px 1fr; gap: 34px; flex: 1; min-height: 0; }
.booklet-recipe h4 { margin: 0 0 8px; font-family: "Caveat", cursive; font-size: 30px; font-weight: 700; border-bottom: 2px solid #a6402f; display: inline-block; }
.booklet-recipe__ingredients ul { list-style: none; margin: 0; padding: 0; font-family: "Kalam", cursive; font-size: 15px; line-height: 1.5; }
.booklet-recipe__ingredients li { padding: 3px 0; border-bottom: 1px dashed rgb(42 58 99 / .2); }
.booklet-recipe__ingredients strong { color: #a6402f; font-weight: 700; }
.booklet-recipe__steps { font-family: "Kalam", cursive; font-size: 15.5px; line-height: 1.65; }
.booklet-recipe__steps p { margin: 0 0 .7em; }
@media print {
  .booklet { transform: none !important; gap: 0; }
  .booklet-stage { height: auto !important; overflow: visible; }
  .pdf-page { box-shadow: none; }
  .share-box, .booklet-preview-title, .plan-head { display: none !important; }
}

/* Nährwerte */
.nutrition-card { margin-top: 28px; }
.nutrition-card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.nutrition-card__head h2 { margin: 0; }
.nutrition-card__per { font-family: var(--font-hand); font-size: 1rem; font-weight: 400; }
.nutrition-card__body { display: grid; grid-template-columns: auto 1fr; gap: 14px 34px; align-items: center; }
.nutrition-kcal { font-family: var(--font-head); color: var(--ink); white-space: nowrap; }
.nutrition-kcal__value { font-size: 3.6rem; font-weight: 700; line-height: 1; }
.nutrition-kcal__unit { font-size: 1.6rem; color: var(--ink-soft); }
.nutrition-extra { margin: 8px 0 0; font-size: .95rem; color: var(--ink-soft); }
.nutrition-note { margin: 14px 0 0; font-size: .85rem; color: var(--pencil); }
@media (max-width: 680px) { .nutrition-card__body { grid-template-columns: 1fr; } }


/* Makronährstoffe */
.macro-split { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.macro-split__part { position: relative; display: block; height: 100%; }
.macro--carbs_g { background: #d9a520; }
.macro--protein_g { background: #2a3a63; }
.macro--fat_g { background: #a6402f; }
.macro-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.macro-list li { display: grid; grid-template-columns: 14px 1fr auto 3.5em; align-items: center; gap: 8px; }
.macro-dot { width: 12px; height: 12px; border-radius: 3px; display: block; }
.macro-list__value { font-family: var(--font-head); font-size: 1.35rem; color: var(--ink); }
.macro-list__share { text-align: right; color: var(--ink-soft); font-size: .9rem; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .macro--protein_g { background: #8ea3d8; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .macro--protein_g { background: #8ea3d8; }
.week-nutrition { margin: 0 0 28px; }
.week-nutrition__sub { margin: 6px 0 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.4; }
.plan-day__kcal { font-family: var(--font-hand); font-size: .8rem; color: var(--pencil); margin-left: auto; padding-left: 8px; }
.plan-day__name { gap: 4px; }


/* Karteikasten: Reiter + aufgeschlagene Karte darunter */
.tab-box { margin-bottom: 30px; filter: drop-shadow(0 6px 14px rgb(80 60 30 / .22)); }
.tab-box .chips { border-bottom: 0; filter: none; margin: 0; padding: 10px 14px 0; position: relative; z-index: 1; }
.tab-box .chip { margin-bottom: 0; transform: translateY(3px); box-shadow: inset 0 -8px 8px -7px rgb(80 60 30 / .3); }
.tab-box .chip.is-active {
  transform: none; background: var(--paper-card); box-shadow: none; padding-top: 9px; padding-bottom: 7px; margin-bottom: -1px;
}
.tab-box .chip.is-active::after { /* nahtloser Übergang Reiter → Karte */
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 6px; background: var(--paper-card);
}
.tab-card {
  position: relative; background: var(--paper-card); border-radius: 6px 10px 8px 10px; padding: 34px 26px 26px;
  border: 1px solid rgb(120 100 60 / .12);
  background-image: linear-gradient(transparent 0 calc(100% - 1px), rgb(196 64 52 / .18) calc(100% - 1px));
  background-size: 100% 2.2em; background-position: 0 1.4em; /* feine Linien wie auf einer Karteikarte */
}
.tab-card::before { /* roter Randstrich der Karteikarte */
  content: ""; position: absolute; top: 18px; left: 0; right: 0; height: 2px; background: rgb(196 64 52 / .45);
}
.tab-card .recipe-card { background-color: #fffdf6; }
.tab-card .empty { text-align: center; padding: 30px 10px; }
.tab-card__more { text-align: center; margin-top: 26px; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .tab-card .recipe-card { background-color: #332e27; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .tab-card .recipe-card { background-color: #332e27; }
@media (max-width: 680px) { .tab-card { padding: 30px 14px 18px; } }

/* Reiterfarben: der aufgeschlagene Reiter färbt seine Karteikarte mit */
:root {
  --tab-0: #fbe3d5; --tab-1: #e3ebf7; --tab-2: #e6f0d8; --tab-3: #f7e6c4; --tab-4: #ece0f2; --tab-5: #f9dfe4;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --tab-0: #4a3a32; --tab-1: #343a4d; --tab-2: #36412e; --tab-3: #4a4130; --tab-4: #403548; --tab-5: #4a3238; }
}
/* dunkel per Schalter */
:root:where([data-theme="dark"]) { --tab-0: #4a3a32; --tab-1: #343a4d; --tab-2: #36412e; --tab-3: #4a4130; --tab-4: #403548; --tab-5: #4a3238; }
.chip.tab-color-0, .tab-box.tab-color-0 { --tab: var(--tab-0); }
.chip.tab-color-1, .tab-box.tab-color-1 { --tab: var(--tab-1); }
.chip.tab-color-2, .tab-box.tab-color-2 { --tab: var(--tab-2); }
.chip.tab-color-3, .tab-box.tab-color-3 { --tab: var(--tab-3); }
.chip.tab-color-4, .tab-box.tab-color-4 { --tab: var(--tab-4); }
.chip.tab-color-5, .tab-box.tab-color-5 { --tab: var(--tab-5); }
.tab-box { --card-color: var(--tab, var(--paper-card)); }
.tab-box .chip.is-active { background: var(--tab); }
.tab-box .chip.is-active::after { background: var(--tab); }
.tab-box .tab-card { background-color: var(--card-color); }
.tab-box .chip.is-active { color: var(--accent); }

/* Nährwert-Ampel als Stempel */
.tl-stamp { display: inline-flex; }
.tl-stamp__ring {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 16px 4px 12px;
  border: 2.5px solid currentColor; border-radius: 999px; outline: 1.5px dashed currentColor; outline-offset: 3px;
  transform: rotate(-6deg); font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; line-height: 1.1; white-space: nowrap;
  mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgb(0 0 0 / .78) 100%); /* leicht ungleichmäßige Stempelfarbe */
}
.tl-stamp__icon { width: 27px; height: 27px; flex-shrink: 0; }
.tl-stamp--green { color: #3f8d3a; }
.tl-stamp--yellow { color: #b07d06; }
.tl-stamp--red { color: #c24a3a; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .tl-stamp--green { color: #8fd17f; }
  :where(:root:not([data-theme="light"])) .tl-stamp--yellow { color: #f0c64a; }
  :where(:root:not([data-theme="light"])) .tl-stamp--red { color: #f08a7a; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .tl-stamp--green { color: #8fd17f; }
  :where(:root[data-theme="dark"]) .tl-stamp--yellow { color: #f0c64a; }
  :where(:root[data-theme="dark"]) .tl-stamp--red { color: #f08a7a; }

/* Bild im Rezeptformular */
.image-field__row { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.image-field__preview { margin: 0; width: 170px; height: 170px; flex-shrink: 0; display: grid; place-items: center; background: #fffdf6; border: 6px solid #fffdf6; box-shadow: 0 2px 8px rgb(80 60 30 / .25); transform: rotate(-2deg); }
.image-field__preview img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.image-field__empty { font-size: .85rem; color: var(--pencil); text-align: center; padding: 10px; }
.image-field__actions { display: grid; gap: 10px; justify-items: start; flex: 1; min-width: 220px; }
.image-field__pick { cursor: pointer; }
.image-field__pick .icon { width: 22px; height: 22px; }
.image-field__hint { margin: 0; font-size: .9rem; }
.image-field__remove { display: inline-flex; gap: 8px; align-items: center; font: 400 1rem var(--font-hand); color: var(--danger); cursor: pointer; }

/* Quelle */
.source-box { margin-top: 28px; }
.source-box__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.source-box__head h2 { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.source-box__edit { border: 0; background: none; font: 400 1rem var(--font-hand); color: var(--pencil); text-decoration: underline; cursor: pointer; }
.source-box__hint { margin-top: 0; }
.source-box__fields { display: flex; gap: 0 22px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 18px; }
.source-box__fields .field { align-content: start; margin-bottom: 0; }
.source-box__fields .field:first-child { flex: 1; min-width: 220px; }
.source-box__fields .field--narrow { max-width: 120px; }
.source-box form[hidden] { display: none; }
.source-book { display: flex; align-items: center; gap: 14px; margin: 4px 0; font-size: 1.15rem; }
.source-book strong { font-family: var(--font-head); font-size: 1.5rem; }
.source-book__spine { /* kleiner Buchrücken */
  width: 16px; height: 44px; flex-shrink: 0; border-radius: 2px 4px 4px 2px; background: linear-gradient(90deg, #8a3a2c, #b5503e 40%, #8a3a2c);
  box-shadow: inset 0 6px 0 -3px #e9c46a, inset 0 -6px 0 -3px #e9c46a, 1px 1px 2px rgb(0 0 0 / .25); transform: rotate(-4deg);
}
.source-book__page { display: inline-block; padding: 0 .5em; border-radius: 4px; background: #fff6d8; font-weight: 700; }
.source-web { margin: 4px 0; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .source-book__page { background: #3a3420; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .source-book__page { background: #3a3420; }
.brand__sub { font-family: var(--font-head); font-size: 1.1rem; color: var(--pencil); margin-top: 2px; }

/* Am häufigsten verbraucht */
.stats-intro { margin-top: -4px; }
.groceries__name { display: grid; gap: 0; }
.groceries__name small { font-size: .8rem; color: var(--pencil); line-height: 1.2; }
.groceries__fill { background: #4f7a3a; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .groceries__fill { background: #8fbf6f; }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .groceries__fill { background: #8fbf6f; }



/* ===== Kopfleiste: beim Runterscrollen bleiben nur die Knöpfe als schwebendes Etikett ===== */
:root { --strudel-blue: #2f5aa8; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --strudel-blue: #8fb0ef; }
}
/* dunkel per Schalter */
:root:where([data-theme="dark"]) { --strudel-blue: #8fb0ef; }
.site-header { background: none; border-bottom: 0; backdrop-filter: none; position: sticky; top: 0; z-index: 20; }
.site-header__bg {
  position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(3px);
  border-bottom: 2px solid var(--margin-red); box-shadow: 0 2px 10px rgb(80 60 30 / .12);
  transition: transform .5s cubic-bezier(.6, 0, .35, 1), opacity .35s ease .05s;
}
.brand { transition: transform .45s cubic-bezier(.6, 0, .35, 1), opacity .3s ease; }
.brand__title { color: var(--strudel-blue); }

.header-actions { position: relative; transition: transform .45s cubic-bezier(.34, 1.4, .64, 1), padding .35s, background-color .3s, box-shadow .35s; transform-origin: top right; border-radius: 14px 18px 12px 16px; }
.header-actions::before { /* Klebestreifen, nur im Etikett sichtbar */
  content: ""; position: absolute; top: -9px; left: 50%; width: 54px; height: 16px; background: var(--tape);
  transform: translateX(-50%) rotate(-4deg) scaleX(0); transition: transform .3s ease .25s; pointer-events: none;
}

.site-header.is-compact { pointer-events: none; }
.site-header.is-compact .header-actions { pointer-events: auto; }
.site-header.is-compact .site-header__bg { transform: translateY(-105%); opacity: 0; }
.site-header.is-compact .brand { transform: translateY(-120%); opacity: 0; }
.site-header.is-compact .header-actions {
  background-color: var(--paper-card); padding: 7px 9px; transform: scale(.84) translateY(4px) rotate(1.5deg);
  box-shadow: 0 8px 18px -6px rgb(80 60 30 / .45); transition-delay: .15s;
}
.site-header.is-compact .header-actions::before { transform: translateX(-50%) rotate(-4deg) scaleX(1); }

.site-header.is-instant *, .site-header.is-instant *::before { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .site-header *, .site-header *::before { transition-duration: .01s !important; transition-delay: 0s !important; }
}

/* „Guten Appetit“ am Seitenende */
.site-footer { font-family: "Dancing Script", var(--font-head); font-weight: 700; font-size: 2.1rem; color: var(--strudel-blue); letter-spacing: .01em; }

/* Einkaufsliste: eigene Sachen */
.shop-buy--extra { grid-template-columns: 26px 6.5em 1fr 36px; grid-template-areas: "box amount name remove"; }
.shop-buy--extra form { grid-area: remove; margin: 0; }
.shop-item__amount--own { font-family: var(--font-head); font-weight: 400; font-size: 1rem; color: var(--pencil); }
.shop-add { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--pencil); }
.shop-add__label { display: block; font-size: 1.35rem; margin-bottom: 4px; }
.shop-add__row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.shop-add__row input { flex: 1; min-width: 200px; }
.shop-add__row .btn { flex: none; }

/* =====================================================================
   MODERNER LOOK (angelehnt an Café-Speisekarte): Senfgelb, Anthrazit,
   kräftige runde Schrift, dicke Konturen, Punkte als Deko.
   Diese Schicht überschreibt den alten Kochbuch-Stil.
   ===================================================================== */
:root {
  --yellow: #f2d77a;
  --yellow-soft: #f8e8ad;
  --cream: #fdf6dc;
  --charcoal: #3f3f3f;
  --charcoal-soft: #5f5d55;
  --line: 2.5px;

  --paper: var(--yellow);
  --paper-card: var(--cream);
  --cloth: var(--yellow);
  --check: transparent;
  --weave: transparent;
  --ink: var(--charcoal);
  --ink-soft: var(--charcoal-soft);
  --pencil: #7c765f;
  --margin-red: var(--charcoal);
  --accent: var(--charcoal);
  --accent-ink: var(--yellow);
  --danger: #b4432f;
  --tape: transparent;
  --radius: 22px;
  --shadow: none;
  --font-head: "Rubik", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-hand: "Inter", system-ui, -apple-system, sans-serif;
  --strudel-blue: #2f5aa8;
  --tab-0: #f6c9a8; --tab-1: #bcd3e6; --tab-2: #cddfb4; --tab-3: var(--cream); --tab-4: #dccbe8; --tab-5: #f3c6c6;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --yellow: #2c2b27; --yellow-soft: #36342e; --cream: #3a3830; --charcoal: #f2d77a; --charcoal-soft: #e5cf86;
    --pencil: #b9ab7d; --accent-ink: #2c2b27; --strudel-blue: #9fb9ef;
    --tab-0: #5a4436; --tab-1: #3c4a58; --tab-2: #45503a; --tab-3: #3a3830; --tab-4: #4a3f55; --tab-5: #563c3c;
  }
}
/* dunkel per Schalter */
:root:where([data-theme="dark"]) {
    --yellow: #2c2b27; --yellow-soft: #36342e; --cream: #3a3830; --charcoal: #f2d77a; --charcoal-soft: #e5cf86;
    --pencil: #b9ab7d; --accent-ink: #2c2b27; --strudel-blue: #9fb9ef;
    --tab-0: #5a4436; --tab-1: #3c4a58; --tab-2: #45503a; --tab-3: #3a3830; --tab-4: #4a3f55; --tab-5: #563c3c;
  }

/* Grundfläche: flaches Senfgelb */
body {
  background: var(--yellow);
  font: 400 16px/1.6 var(--font-hand); color: var(--ink);
}
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); letter-spacing: -.01em; }
h1 { font-weight: 900; text-transform: uppercase; font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: .92; }
h2 { font-weight: 800; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .02em; background: none; padding: 0; }
a { color: var(--ink); }

/* Alles Verspielte des alten Stils aus */
.card::before, .recipe__image::before, .add-menu__panel::before, .header-actions::before { display: none !important; }
.recipe-grid li .recipe-card, .plan-day, .recipe__image, main > h1, .chat-head h1, .chip, .tl-stamp__ring,
.chat-msg__bubble, .chat-recipe, .recipe-card__image, .image-field__preview, .booklet-recipe__image { transform: none !important; rotate: 0deg !important; }
.recipe-card, .tab-card, textarea { background-image: none !important; }
main > h1, main > .lead, main > .back-link, .recipe > .back-link, .recipe__head, .plan-head, .chat-head h1, .booklet-preview-title {
  background: none; box-shadow: none; padding-left: 0; padding-right: 0;
}
.recipe__head { border-left: 0; }

/* Karten: Creme mit dicker Kontur, runde Ecken */
.card { background: var(--cream); border: var(--line) solid var(--ink); border-radius: var(--radius); box-shadow: none; padding: 24px; }
.flash { border-radius: 16px; border: var(--line) solid var(--ink); font-family: var(--font-hand); font-size: 1rem; font-weight: 600; }
.flash--notice { background: var(--cream); color: var(--ink); }
.flash--alert { background: #f6d0c5; color: #7a2516; }

/* Kopfleiste */
.site-header__bg { background: var(--yellow); border-bottom: var(--line) solid var(--ink); box-shadow: none; backdrop-filter: none; }
.brand__title { font-family: var(--font-head); font-weight: 900; text-transform: uppercase; font-size: 1.9rem; letter-spacing: -.01em; color: var(--ink); }
.icon-link { border: var(--line) solid var(--ink); border-radius: 50%; background: var(--cream); color: var(--ink); width: 48px; height: 48px; }
.icon-link:hover { transform: translateY(-2px); background: var(--yellow-soft); }
.icon-link--accent { background: var(--ink); color: var(--yellow); }
.icon-link--accent:hover { background: var(--ink); filter: none; }
.site-header.is-compact .header-actions { background: var(--cream); border: var(--line) solid var(--ink); border-radius: 999px; box-shadow: none; transform: scale(.86) translateY(6px); }
.add-menu__panel { background: var(--cream); border: var(--line) solid var(--ink); border-radius: 22px; box-shadow: 0 10px 0 -2px rgb(0 0 0 / .08); }
.add-menu__panel::after { background: var(--cream); border-color: var(--ink); border-width: var(--line); }
.add-menu__title { font-family: var(--font-hand); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.add-menu__item strong { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; }
.add-menu__icon { border: var(--line) solid var(--ink); border-radius: 50%; background: var(--yellow) !important; color: var(--ink) !important; }

/* Knöpfe: Anthrazit-Pillen */
.btn {
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .03em;
  border: var(--line) solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); padding: .55em 1.2em;
}
.btn:hover { transform: translateY(-2px); background: var(--yellow-soft); }
.btn--primary { background: var(--ink); color: var(--yellow); }
.btn--primary:hover { background: var(--ink); filter: none; }
.btn--ghost { border-style: solid; }
.btn--danger { color: var(--danger); border-color: var(--danger); }

/* Formulare */
label, .category-pick legend, .time-fields__label, .shop-add__label, .pantry__label { font-family: var(--font-head); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink); }
input[type=text], input[type=search], input[type=number], input[type=password], input[type=email], textarea, select {
  font: 500 1rem var(--font-hand) !important; color: var(--ink) !important;
  background: #fffbea !important; border: var(--line) solid var(--ink) !important; border-radius: 14px !important; padding: .6em .8em !important;
}
input:focus, textarea:focus, select:focus { outline: 3px solid var(--ink); outline-offset: 2px; }
.category-pick__item { border: var(--line) solid var(--ink); border-radius: 999px; background: var(--cream); font-family: var(--font-hand); font-weight: 500; }
.category-pick__item:has(.category-pick__box:checked) { background: var(--ink); color: var(--yellow); }
.ingredient-head { font-family: var(--font-head); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }

/* „Frag dein Kochbuch“ */
.pantry__label { font-size: 1rem; }

/* Karteikasten-Reiter → moderne Pillen-Reiter, Karte mit Kontur */
.tab-box { filter: none; }
.chips { padding: 0 6px; gap: 6px; }
.tab-box .chip, .chip {
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .03em;
  border: var(--line) solid var(--ink); border-bottom: 0; border-radius: 16px 16px 0 0; padding: 8px 16px 6px;
  box-shadow: none; transform: none; color: var(--ink);
}
.tab-box .chip.is-active { padding-top: 12px; color: var(--ink); }
.tab-box .chip.is-active::after { left: 0; right: 0; bottom: -4px; height: 6px; }
.tab-card { border: var(--line) solid var(--ink); border-radius: 0 24px 24px 24px; padding: 26px 22px 22px; margin-top: -1px; }
.tab-card::before { display: none; }
.chip--add { background: var(--ink) !important; color: var(--yellow) !important; }

/* Rezeptkarten: Bild oben, Kontur, Titel fett */
.tab-card .recipe-card, .recipe-card { background: var(--cream); border: var(--line) solid var(--ink); border-radius: 20px; padding: 12px 14px 16px; overflow: hidden; }
.recipe-card:hover { transform: translateY(-4px) !important; box-shadow: 0 8px 0 -2px var(--ink); }
.recipe-card__image { width: calc(100% + 28px); margin: -12px -14px 14px; border: 0; border-bottom: var(--line) solid var(--ink); box-shadow: none; aspect-ratio: 4 / 3; }
.recipe-card__title { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; line-height: 1.15; background: none; text-transform: none; }
.recipe-card__meta { font-size: .85rem; color: var(--ink-soft); }
.recipe-grid { gap: 18px; }

/* Rezeptseite */
.recipe__head h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.category-label { font-family: var(--font-head); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.recipe__image img { border: var(--line) solid var(--ink); border-radius: 28px; box-shadow: none; }
.recipe-times dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.recipe-times dd { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; }
.recipe-times__total dd { color: var(--ink); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.servings { font-family: var(--font-hand); font-size: 1rem; }
.servings__btn { border: var(--line) solid var(--ink); color: var(--ink); border-radius: 50%; font-family: var(--font-head); }
.servings__btn:hover:not(:disabled) { background: var(--ink); color: var(--yellow); }
.servings__count { font-family: var(--font-head); font-weight: 900; color: var(--ink); }
.instructions { font-size: 1rem; line-height: 1.7; }

/* Zutaten wie auf einer Speisekarte: Name ........ Menge */
.ingredient-list li { display: flex; align-items: baseline; gap: 8px; border-bottom: 0; padding: 5px 0; }
.ingredient-list li > span:last-child { order: 1; font-weight: 600; text-transform: uppercase; font-size: .88rem; letter-spacing: .03em; }
.ingredient-list li::after { content: ""; order: 2; flex: 1; border-bottom: 2.5px dotted var(--ink); transform: translateY(-4px); min-width: 16px; }
.ingredient-list__amount { order: 3; min-width: 0 !important; color: var(--ink) !important; font-family: var(--font-head); font-weight: 800; white-space: nowrap; }

/* Kalender-Leiste, Nährwerte, Quelle, Teilen */
.plan-day-btn { background: var(--cream); border: var(--line) solid var(--ink); border-radius: 16px; box-shadow: none; font-family: var(--font-hand); }
.plan-day-btn:hover:not(:disabled) { background: var(--ink); color: var(--yellow); transform: translateY(-3px); }
.plan-day-btn:hover:not(:disabled) .plan-day-btn__name, .plan-day-btn:hover:not(:disabled) .plan-day-btn__month { color: var(--yellow); }
.plan-day-btn__date { font-family: var(--font-head); font-weight: 900; }
.plan-day-btn__name { font-family: var(--font-head); font-weight: 700; font-size: .8rem; text-transform: uppercase; }
.plan-day-btn.is-weekend { background: var(--yellow-soft); }
.plan-day-btn.is-planned { background: var(--ink); color: var(--yellow); border-color: var(--ink); }
.plan-day-btn.is-planned .plan-day-btn__month, .plan-day-btn.is-planned .plan-day-btn__name { color: var(--yellow); }
.plan-strip__icon, .plan-it__icon { color: var(--ink); }
.nutrition-kcal__value { font-family: var(--font-head); font-weight: 900; }
.nutrition-kcal__unit { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.macro-list__value { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; }
.macro--carbs_g { background: #e0a83a; } .macro--protein_g { background: var(--charcoal); } .macro--fat_g { background: #c4643f; }
.tl-stamp__ring { transform: none; outline: 0; mask-image: none; font-family: var(--font-head); font-weight: 800; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; border-width: var(--line); padding: 5px 14px 5px 10px; background: var(--cream); }
.source-book strong { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; }
.source-book__spine { background: var(--ink); box-shadow: none; transform: none; border-radius: 3px; }
.source-book__page { background: var(--yellow); border: 2px solid var(--ink); }
.share-box__note { background: var(--yellow-soft); border: 2px dashed var(--ink); }

/* Wochenplan, Statistik, Einkaufsliste */
.plan-day { border-radius: 22px; }
.plan-day.is-today { outline: 0; background: var(--yellow-soft); border-width: 3.5px; }
.plan-day__name { font-family: var(--font-head); font-weight: 800; text-transform: uppercase; font-size: 1.1rem; }
.plan-entry__image { border: 2px solid var(--ink); border-radius: 50%; box-shadow: none; }
.stat-tile__value { font-family: var(--font-head); font-weight: 900; }
.top-bar__fill, .month-chart__bar { background: var(--ink); }
.groceries__fill { background: #c4643f; }
.top-bar__value, .month-chart__value, .month-chart__label, .cat-list__value { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.top-bar__name img { border: 2px solid var(--ink); border-radius: 50%; box-shadow: none; }
.stats-year.is-active { color: var(--yellow); background: var(--ink); border-color: var(--ink); border-radius: 999px; }
.shop-item__amount { color: var(--ink); font-family: var(--font-head); font-weight: 800; }
.shop-buy__box { border: var(--line) solid var(--ink); border-radius: 6px; }
.demo-box { border: var(--line) dashed var(--ink); background: var(--cream); border-radius: 18px; }
.demo-box--on { background: var(--yellow-soft); }

/* Chat */
.chat-msg--user .chat-msg__bubble { background: var(--ink); color: var(--yellow); border-radius: 20px 20px 4px 20px; }
.chat-msg--assistant .chat-msg__bubble { background: var(--cream); border: var(--line) solid var(--ink); border-radius: 20px 20px 20px 4px; }
.chat-recipe { border: var(--line) solid var(--ink); border-radius: 16px; padding: 4px 4px 8px; box-shadow: none; }
.chat-recipe img { border-radius: 12px; }
.chat__example { border: var(--line) solid var(--ink); border-radius: 999px; background: var(--cream); font-family: var(--font-hand); }

/* Seitenende */
.site-footer { border-top: var(--line) solid var(--ink); }
body { background-image: none; }

/* ===== Moderner Look für Speiseplan-PDF und Rezeptheft (immer hell, feste Farben) ===== */
.menu-sheet, .pdf-page { --y: #f2d77a; --ys: #f8e8ad; --c: #fdf6dc; --k: #3f3f3f; --ks: #5f5d55; }

/* Speiseplan (A4 quer) */
.menu-sheet { background: var(--y); background-image: none; padding: 30px; color: var(--k); box-shadow: 0 10px 30px -8px rgb(0 0 0 / .3); }
.menu-sheet__inner { background: transparent; box-shadow: none; padding: 10px 14px 6px; position: relative; }
.menu-sheet__head { text-align: left; display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.menu-sheet__kicker { order: 2; font-family: "Inter", sans-serif; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ks); }
.menu-sheet__title { font-family: "Rubik", sans-serif; font-weight: 900; font-size: 88px; line-height: .85; text-transform: uppercase; letter-spacing: -.02em; color: var(--k); }
.menu-sheet__dates { order: 3; font-family: "Inter", sans-serif; font-size: 15px; font-weight: 600; color: var(--k); margin: 0; }
.menu-day { background: var(--c) !important; border: 3px solid var(--k); border-radius: 22px; padding: 14px 8px; }
.menu-day__name { font-family: "Rubik", sans-serif; font-weight: 800; font-size: 19px; text-transform: uppercase; color: var(--k); }
.menu-day__date { font-family: "Inter", sans-serif; font-size: 12px; font-weight: 600; color: var(--ks); margin-top: 2px; }
.menu-dish__image { border: 3px solid var(--k); box-shadow: none; width: 104px; height: 104px; }
.menu-dish__title { font-family: "Inter", sans-serif; font-weight: 700; font-size: 14px; color: var(--k); }
.menu-dish__more { font-family: "Inter", sans-serif; }
.menu-day__free { font-family: "Inter", sans-serif; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ks); }
.menu-day__free-icon { color: var(--k); font-size: 26px; }
.menu-sheet__foot { font-family: "Rubik", sans-serif; font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: .08em; color: var(--k); margin-top: 16px; }

/* Rezeptheft (A4 hoch) */
.pdf-page { background: var(--y); color: var(--k); box-shadow: 0 8px 24px -8px rgb(0 0 0 / .3); }
.booklet-cover { background: var(--y); background-image: none; padding: 46px; }
.booklet-cover__inner { background: transparent; box-shadow: none; text-align: left; padding: 10px 6px; position: relative; }
.booklet-cover__kicker { font-family: "Inter", sans-serif; font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .12em; color: var(--ks); }
.booklet-cover__title { font-family: "Rubik", sans-serif; font-weight: 900; font-size: 92px; line-height: .86; text-transform: uppercase; letter-spacing: -.02em; color: var(--k); margin: 10px 0 14px; }
.booklet-cover__sub { font-family: "Inter", sans-serif; font-weight: 600; font-size: 17px; color: var(--k); margin-bottom: 30px; }
.booklet-cover__grid img { border: 3px solid var(--k); box-shadow: none; width: 136px; height: 136px; }
.booklet-cover__grid span { font-family: "Inter", sans-serif; font-weight: 700; font-size: 14px; color: var(--k); }
.booklet-cover__foot { font-family: "Rubik", sans-serif; font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: .08em; color: var(--k); }
.booklet-recipe { border-left: 0; padding: 52px 54px; }
.booklet-recipe__cat { font-family: "Inter", sans-serif; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--ks); }
.booklet-recipe__title { font-family: "Rubik", sans-serif; font-weight: 900; font-size: 50px; line-height: .95; text-transform: uppercase; letter-spacing: -.01em; color: var(--k); }
.booklet-recipe__meta { font-family: "Inter", sans-serif; font-size: 13px; font-weight: 600; color: var(--ks); }
.booklet-recipe__image { border: 3px solid var(--k); border-radius: 26px; box-shadow: none; transform: none; }
.booklet-recipe h4 { font-family: "Rubik", sans-serif; font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 3px solid var(--k); color: var(--k); }
.booklet-recipe__ingredients ul, .booklet-recipe__steps { font-family: "Inter", sans-serif; font-size: 14px; color: var(--k); }
.booklet-recipe__ingredients li { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 6px; align-items: baseline; border-bottom: 0; text-transform: uppercase; font-size: 12.5px; font-weight: 600; letter-spacing: .03em; }
.booklet-recipe__ingredients li strong { color: var(--k); font-family: "Rubik", sans-serif; font-weight: 800; text-transform: none; margin-left: auto; order: -1; }
.booklet-recipe__ingredients li::before { content: ""; flex: 1; border-bottom: 2.5px dotted var(--k); transform: translateY(-3px); order: 0; }
.booklet-recipe__body { background: var(--c); border: 3px solid var(--k); border-radius: 26px; padding: 26px; }
.booklet-recipe__ingredients li { display: flex; flex-direction: row; justify-content: flex-start; gap: 6px; }
.booklet-recipe__ingredients li::before { content: none; }
.booklet-recipe__ingredients li strong { margin-left: 0; order: 0; white-space: nowrap; }
.bi-dots { flex: 1; min-width: 10px; border-bottom: 2.5px dotted #3f3f3f; transform: translateY(-3px); }
.shared-page .brand { display: flex; align-items: baseline; gap: 12px; }
.brand__sub { font-family: var(--font-hand); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.booklet-cover__title { font-size: 66px; overflow-wrap: anywhere; }
main.container { padding-bottom: 60px; }

/* Reiter + Karte aus einem Guss: aktiver Reiter überdeckt die Kartenkante, kein Eckstück links */
.tab-box .chips { position: relative; z-index: 2; padding: 0 0 3px 0; margin-bottom: -3px; overflow-y: hidden; }
.tab-box .chip.is-active { margin-bottom: 0; }
.tab-box .chip.is-active::after { left: 0; right: 0; bottom: -3px; height: 3px; background: var(--tab); }
.tab-box .chip:first-child.is-active::after { left: 0; }
.tab-card { margin-top: 0; border-top-left-radius: 0; position: relative; z-index: 1; }
/* Reiter enden vor der runden Ecke rechts oben – sonst sitzt der letzte Reiter schief auf der Rundung */
.tab-box .chips { margin-right: 24px; }
.tab-box .chips { --fade-left: 0px; --fade-right: 0px;
  mask-image: linear-gradient(to right, transparent, #000 var(--fade-left), #000 calc(100% - var(--fade-right)), transparent); }
.tab-box .chips.is-more-left { --fade-left: 36px; }
.tab-box .chips.is-more-right { --fade-right: 48px; }
/* Speiseplan: alle sieben Spalten gleich breit */
.menu-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.menu-day { min-width: 0; }
.menu-day__name { font-size: 16px; letter-spacing: 0; }
.menu-dish__title { overflow-wrap: anywhere; hyphens: auto; }

/* ===== Erweiterte Farbpalette zu Senfgelb & Anthrazit ===== */
:root {
  --coral: #ef8a6f; --teal: #4c9a92; --teal-soft: #9ecfc8; --blush: #f4b6b0; --sky: #a9cbe3; --sage: #b5cf9b; --lilac: #c9b6e4;
  /* Reiterfarben: alle kräftig – nie Creme/Weiß, sonst verschwindet der Reiter in der Karte */
  --tab-0: var(--blush); --tab-1: var(--sky); --tab-2: var(--sage); --tab-3: var(--coral); --tab-4: var(--teal-soft); --tab-5: var(--lilac);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --coral: #c96a52; --teal: #5fb0a7; --teal-soft: #2f5a55; --blush: #6e4744; --sky: #3b5468; --sage: #4a5c3c; --lilac: #4f4466; }
}
/* dunkel per Schalter */
:root:where([data-theme="dark"]) { --coral: #c96a52; --teal: #5fb0a7; --teal-soft: #2f5a55; --blush: #6e4744; --sky: #3b5468; --sage: #4a5c3c; --lilac: #4f4466; }

/* Hinweise, Hover, Akzente */
.flash--notice { background: var(--sage); }
.recipe-card:hover { box-shadow: 0 8px 0 -2px var(--coral); }
.btn:hover { background: var(--blush); }
.btn--primary:hover { background: var(--teal); color: #fff; border-color: var(--ink); }
.icon-link:hover { background: var(--blush); }
.add-menu__icon--write { background: var(--coral) !important; }
.add-menu__icon--photo { background: var(--sky) !important; }
.add-menu__icon--link { background: var(--sage) !important; }
.chip--add { background: var(--teal) !important; color: #fff !important; }

/* Rezeptseite */
.servings__btn:hover:not(:disabled) { background: var(--coral); color: var(--ink); }
.plan-day-btn:hover:not(:disabled) { background: var(--coral); color: var(--ink); }
.plan-day-btn:hover:not(:disabled) .plan-day-btn__name, .plan-day-btn:hover:not(:disabled) .plan-day-btn__month { color: var(--ink); }
.plan-day-btn.is-planned { background: var(--teal); color: #fff; }
.plan-day-btn.is-weekend { background: var(--blush); }
.macro--carbs_g { background: #e0b23a; } .macro--protein_g { background: var(--teal); } .macro--fat_g { background: var(--coral); }
.tl-stamp--green { color: #3f7d4f; } .tl-stamp--yellow { color: #a37506; } .tl-stamp--red { color: #c9553a; }
.source-book__spine { background: var(--coral); border: 2px solid var(--ink); }
.source-book__page { background: var(--sky); }

/* Wochenplan */
.plan-day.is-today { background: var(--blush); }
.cook-check__tick { stroke: var(--teal); }
.shop-button .icon { color: inherit; }

/* Statistik: bunte Kacheln und Balken */
.stats-tiles .stat-tile:nth-child(1) { background: var(--coral); }
.stats-tiles .stat-tile:nth-child(2) { background: var(--sky); }
.stats-tiles .stat-tile:nth-child(3) { background: var(--sage); }
.top-bar__fill { background: var(--coral); }
.month-chart__bar { background: var(--teal); }
.groceries__fill { background: var(--teal); }
.stats-year.is-active { background: var(--teal); border-color: var(--ink); color: #fff; }

/* Chat */
.chat-msg--user .chat-msg__bubble { background: var(--teal); color: #fff; }
.chat__example:hover { background: var(--blush); }

/* Einkaufsliste */
.shop-buy.is-done .shop-buy__box::after { color: var(--teal); }
.shop-item__amount--own { color: var(--teal); }
.stat-tile { min-width: 0; }
.stat-tile__value--text { font-size: 1.5rem; line-height: 1.1; overflow-wrap: anywhere; hyphens: auto; }

/* ===== Kopfleiste: Trennlinie rollt sich von links nach rechts auf ===== */
.site-header__bg { border-bottom: 0 !important; }
.site-header.is-compact .site-header__bg, .site-header.is-compact .brand { transform: none; opacity: 1; transition: none; }
.line-roll { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
.line-roll__path { fill: none; stroke: var(--ink); stroke-width: 2.5px; stroke-linecap: round; stroke-linejoin: round; }
.brand__letter { display: inline-block; position: relative; will-change: transform; }
.header-actions { z-index: 3; }
.header-actions.is-popped { animation: bubble-pop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bubble-pop {
  0% { scale: 1; } 30% { scale: 1.12; } 60% { scale: .96; } 100% { scale: 1; }
}
.line-roll__core { fill: var(--cream); }

/* Rezept als PDF: die A4-Seite liegt unsichtbar außerhalb des Bildschirms */
.booklet-stage--offscreen { position: fixed; left: -10000px; top: 0; width: 794px; margin: 0; pointer-events: none; }
/* Lange Rezeptnamen im Heft/PDF umbrechen, Bild bleibt ganz */
.booklet-recipe__head > div { flex: 1; min-width: 0; }
.booklet-recipe__title { hyphens: auto; overflow-wrap: break-word; }
.booklet-recipe__image { flex-shrink: 0; }

/* Nährwerte auf der Rezeptseite: kompakter Kasten */
.nutrition-card { padding: 16px 22px; }
.nutrition-card__head { margin-bottom: 10px; }
.nutrition-card__head h2 { font-size: 1.15rem; }
.nutrition-card .tl-stamp__ring { font-size: .78rem; padding: 3px 11px 3px 8px; }
.nutrition-card .tl-stamp__icon { width: 20px; height: 20px; }
.nutrition-card__body { gap: 8px 26px; }
.nutrition-card .nutrition-kcal__value { font-size: 2.3rem; }
.nutrition-card .nutrition-kcal__unit { font-size: .95rem; }
.nutrition-card .macro-split { height: 8px; margin-bottom: 8px; }
.nutrition-card .macro-list { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.nutrition-card .macro-list li { display: flex; gap: 6px; font-size: .9rem; }
.nutrition-card .macro-list__value { font-size: .9rem; }
.nutrition-card .macro-list__share { display: none; }
.nutrition-card .macro-dot { width: 10px; height: 10px; }
.nutrition-card .nutrition-extra { margin-top: 4px; font-size: .82rem; }
.nutrition-card .nutrition-note { margin-top: 8px; font-size: .78rem; }
@media (max-width: 680px) { .nutrition-card__body { grid-template-columns: 1fr; } }
.recipe__body + .plan-strip { margin-top: 28px; }
.plan-strip + .nutrition-card { margin-top: 0; }

/* Bilder im Formular: Titelbild + „Bild malen“, darunter weitere Fotos */
.image-field__main { display: grid; gap: 12px; justify-items: center; }
.image-field__label { margin: 0; font-family: var(--font-head); font-weight: 800; text-transform: uppercase; font-size: .85rem; letter-spacing: .04em; }
.image-field__label .muted { text-transform: none; font-family: var(--font-body, inherit); font-weight: 400; letter-spacing: 0; }
.image-more { margin-top: 24px; padding-top: 20px; border-top: 2px dashed var(--ink); display: grid; gap: 12px; }
.image-more__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.image-more__item, .image-more__add { position: relative; width: 112px; }
.image-more__item img { display: block; width: 112px; height: 112px; object-fit: cover; border: var(--line) solid var(--ink); border-radius: 18px; transition: opacity .2s; }
.image-more__item.is-removed img { opacity: .3; }
.image-more__remove { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 6px; font-size: .8rem; color: var(--danger); cursor: pointer; }
.image-more__new { position: absolute; top: 6px; left: 6px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 99px; padding: 0 8px; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.image-more__pick { width: 112px; height: 112px; display: grid; place-content: center; text-align: center; gap: 2px; border: var(--line) dashed var(--ink); border-radius: 18px; font-size: .82rem; font-weight: 700; cursor: pointer; }
.image-more__pick span { font-size: 1.8rem; line-height: 1; }
.image-more__pick:hover { background: var(--yellow); }

/* Bilder-Karussell auf der Rezeptseite */
.carousel { position: relative; min-width: 0; width: 100%; }
.carousel__track { width: 100%; min-width: 0; }
.carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border: var(--line) solid var(--ink); border-radius: 28px; aspect-ratio: 1; }
.carousel__track::-webkit-scrollbar { display: none; }
.recipe__image.carousel img.carousel__slide { flex: 0 0 100%; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; scroll-snap-align: center; border: 0; border-radius: 0; }
.carousel__arrow { position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; display: grid; place-items: center; padding: 0 0 3px; border: var(--line) solid var(--ink); border-radius: 50%; background: var(--cream); color: var(--ink); font: 800 1.6rem/1 var(--font-head); cursor: pointer; opacity: .92; }
.carousel__arrow:hover { background: var(--yellow); opacity: 1; }
.carousel__arrow--prev { left: 10px; }
.carousel__arrow--next { right: 10px; }
.carousel__dots { position: absolute; left: 50%; bottom: 12px; translate: -50% 0; display: flex; gap: 6px; padding: 5px 8px; border-radius: 99px; background: var(--cream); border: 2px solid var(--ink); }
.carousel__dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: transparent; cursor: pointer; }
.carousel__dot[aria-current="true"] { background: var(--ink); }

/* Quelle kurz unter den Zeitangaben */
.recipe-source { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: .95rem; color: var(--ink-soft); }
.recipe-source strong { color: var(--ink); }
.recipe-source__icon { display: inline-grid; width: 20px; height: 20px; }
.recipe-source__icon svg { width: 100%; height: 100%; }
.recipe-source a { color: inherit; }
.recipe__head { min-width: 0; }
.recipe__head h1 { overflow-wrap: break-word; hyphens: auto; }

/* Wochenplan: Einkaufsliste und Speiseplan-PDF nebeneinander, Nährwerte unter den Tagen */
.plan-head__buttons { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.week-nutrition { margin: 28px 0 0; }

/* ===== Runder Nährwert-Stempel: Klick öffnet die Nährwert-Karte als Popup ===== */
.round-stamp { --c: #3f7d4f; position: relative; display: grid; place-items: center; width: 128px; height: 128px; padding: 0; border: 0; border-radius: 50%;
  background: var(--cream); color: var(--c); cursor: pointer; rotate: -10deg; box-shadow: 0 0 0 var(--line) var(--ink);
  transition: rotate .25s cubic-bezier(.3, 1.6, .5, 1), scale .25s cubic-bezier(.3, 1.6, .5, 1); }
.round-stamp--yellow { --c: #a37506; }
.round-stamp--red { --c: #c9553a; }
.round-stamp:hover, .round-stamp:focus-visible { rotate: 0deg; scale: 1.06; }
.round-stamp__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.round-stamp__outer, .round-stamp__inner { fill: none; stroke: currentColor; stroke-width: 2.2; }
.round-stamp__inner { stroke-dasharray: 2.4 3; }
.round-stamp__text { fill: currentColor; font: 800 10px var(--font-head); letter-spacing: .04em; }
.round-stamp__icon { position: relative; width: 44px; height: 44px; }
.round-stamp__inner { fill: color-mix(in srgb, currentColor 10%, transparent); }

.recipe__media { position: relative; min-width: 0; }
.recipe__title-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.recipe__title-row h1 { min-width: 0; flex: 0 1 auto; margin-bottom: 0; }
.recipe__stamp { flex-shrink: 0; }
.recipe__media > .recipe__stamp { position: absolute; left: -34px; top: -30px; z-index: 3; }
.recipe__stamp .round-stamp { width: 96px; height: 96px; }
.recipe__stamp .round-stamp__icon { width: 34px; height: 34px; }
.plan-head__title { position: relative; }
/* Stempel schwebt frei rechts neben Titel und Wochenauswahl – nimmt keinen Platz weg */
.plan-head { position: relative; }
.plan-head__title { position: static; }
/* Stempel rechts oben im Kopf – überdeckt weder Titel noch Wochenauswahl */
.plan-head__stamp { position: absolute; right: 0; top: -6px; z-index: 2; rotate: 6deg; }
@media (max-width: 560px) {
  .plan-head { position: relative; }
  .plan-head__title { position: static; }
  .plan-head__stamp { left: auto; top: auto; right: -8px; bottom: 30px; }
  .plan-head .plan-head__stamp .round-stamp { width: 78px; height: 78px; }
  .plan-head__stamp .round-stamp__icon { width: 30px; height: 30px; }
}
.plan-head__stamp .round-stamp { width: 112px; height: 112px; }

.nutri-dialog { width: min(640px, calc(100vw - 32px)); padding: 0; border: 0; background: transparent; overflow: visible; }
.nutri-dialog::backdrop { background: rgb(40 36 30 / .45); backdrop-filter: blur(2px); }
.nutri-dialog[open] { animation: nutri-pop .3s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes nutri-pop { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
.nutri-dialog .nutrition-card { margin: 0; padding-right: 56px; }
.nutri-dialog__close { position: absolute; top: 12px; right: 12px; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; padding: 0 0 2px;
  border: var(--line) solid var(--ink); border-radius: 50%; background: var(--yellow); color: var(--ink); font: 800 1.4rem/1 var(--font-head); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .round-stamp, .nutri-dialog[open] { transition: none; animation: none; } }

/* Übers Jahr: Zahl steht immer direkt über dem Balken, kein Hover */
.month-chart__col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.month-chart__bar { height: calc((100% - 24px) * var(--h, 0)); align-self: center; }
.month-chart__value { align-self: center; line-height: 1; min-height: 1em; }

/* Wochenplan-Tag: Wochentag links, Datum immer rechts, kcal darunter */
.plan-day__name { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 10px; }
.plan-day__date { grid-column: 2; grid-row: 1; }
.plan-day__kcal { grid-column: 1 / -1; grid-row: 2; margin: 2px 0 0; padding: 0; font-family: var(--font-body, inherit); font-weight: 600; text-transform: none; }

/* „Frag dein Kochbuch“: oben genauso viel Luft wie seitlich und unten */
.pantry__label { line-height: 1; margin: -2px 0 12px; }

/* Zurück-Link immer in eigener Zeile über der Überschrift */
main > .back-link { display: table; }

/* Wochenplan: Rezept suchen statt Auswahlliste */
.plan-add { position: relative; }
.plan-add__search { width: 100%; font-size: 1rem; }
.plan-add__results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 6px;
  background: var(--cream); border: var(--line) solid var(--ink); border-radius: 18px; box-shadow: 0 10px 24px rgb(40 36 30 / .18); max-height: 320px; overflow-y: auto; }
.plan-add__hit { display: grid; gap: 0; padding: 7px 12px; border-radius: 12px; cursor: pointer; line-height: 1.25; }
.plan-add__hit small { color: var(--pencil); font-size: .78rem; }
.plan-add__hit[aria-selected="true"], .plan-add__hit:hover { background: var(--yellow); }
.plan-add__none { padding: 8px 12px; color: var(--pencil); font-size: .9rem; }
.plan-day:focus-within { z-index: 5; position: relative; }
input[type=search] { -webkit-appearance: none; appearance: none; }
.plan-add__search::placeholder { color: var(--pencil); }

/* Frag dein Kochbuch: Eingabe oben, darunter Frage und Antwort */
.chat .chat__form { border-top: 0; padding-top: 0; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px dashed var(--pencil); }

/* Zuletzt gekocht (unter Zeiten und Quelle) */
.last-cooked { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: .95rem; color: var(--ink-soft); }
.last-cooked strong { color: var(--ink); }
.last-cooked__icon { display: inline-grid; width: 20px; height: 20px; }
.last-cooked__icon svg { width: 100%; height: 100%; }
.last-cooked--recent strong { color: #b4492f; }

/* Rezeptkopf aufgeteilt: Titel oben, Zeiten + Info-Kärtchen unten bündig mit dem Bild */
.recipe__top { align-items: stretch; }
.recipe__head { display: flex; flex-direction: column; }
.recipe__facts { margin-top: auto; padding-top: 22px; display: grid; gap: 14px; }
.recipe__facts .recipe-times { margin: 0; padding-bottom: 14px; border-bottom: 2px dashed var(--ink); flex-wrap: nowrap; gap: 12px 26px; }
.recipe__facts .recipe-times dt { white-space: nowrap; }
.recipe__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.recipe__chips { gap: 8px; }
.recipe__chips .recipe-source, .recipe__chips .last-cooked { margin: 0; padding: 5px 12px 5px 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); font-size: .85rem; line-height: 1.3; }
.recipe__chips .last-cooked { white-space: nowrap; }

/* Formular: „Gesamt“ sitzt wie ein Feld in derselben Reihe (nur zum Ablesen) */
.time-fields { align-items: start; }
.time-fields__total { display: grid; gap: 2px; }
.time-fields .time-fields__value { display: flex; align-items: center; box-sizing: border-box; min-height: 44px; padding: .6em .8em; font: 800 1rem var(--font-head); color: var(--ink);
  border: var(--line) dashed var(--ink); border-radius: 14px; background: transparent; }
.image-field__buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* „Zuletzt gekocht“ springt zum Einplanen */
a.last-cooked { color: var(--ink-soft); text-decoration: none; width: fit-content; }
a.last-cooked:hover { background: var(--yellow); }
#einplanen { scroll-margin-top: 90px; }

/* Rezept vom Foto: Fotos als Kacheln, „+“ für weitere Seiten, Knopf unter der Box */
.photo-drop[hidden], .photo-tiles[hidden], .photo-tiles__add[hidden] { display: none; }
.photo-form .actions { margin-top: 18px; }
.photo-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.photo-tiles__photo, .photo-tiles__add { position: relative; aspect-ratio: 3 / 4; }
.photo-tiles__photo img { width: 100%; height: 100%; object-fit: cover; display: block; border: var(--line) solid var(--ink); border-radius: 18px; }
.photo-tiles.is-reading .photo-tiles__photo img { animation: reading 1.6s ease-in-out infinite; }
.photo-tiles__remove { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0 0 2px;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--cream); color: var(--ink); font: 800 1.1rem/1 var(--font-head); cursor: pointer; }
.photo-tiles__pick { height: 100%; display: grid; place-content: center; gap: 4px; text-align: center; cursor: pointer;
  border: 2.5px dashed var(--ink-soft); border-radius: 18px; font-family: var(--font-head); font-weight: 800; font-size: .95rem; color: var(--ink-soft); text-transform: uppercase; }
.photo-tiles__pick span { font-size: 2.6rem; line-height: 1; }
.photo-tiles__pick:hover { background: var(--yellow); color: var(--ink); }

/* Kategorien: runder Kreis statt eckiger Haken-Box; ausgewählt = gefüllter Kreis mit Haken */
.category-pick__box { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 18px; height: 18px; margin: 0; border: 2px solid currentColor; border-radius: 50%;
  background: transparent; display: inline-grid; place-content: center; cursor: pointer; }
.category-pick__box::after { content: ""; width: 8px; height: 4px; margin-top: -2px; border: solid var(--ink); border-width: 0 0 2px 2px; rotate: -45deg; opacity: 0; }
.category-pick__box:checked { background: var(--yellow); border-color: var(--yellow); }
.category-pick__box:checked::after { opacity: 1; }
.category-pick__box:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Hinweise nach dem Auslesen: Warndreieck statt Überschrift, knapp */
.import-notes { display: flex; gap: 14px; align-items: flex-start; padding: 16px 22px; background: var(--cream); }
.import-notes__icon { flex-shrink: 0; width: 30px; height: 30px; color: var(--ink); }
.import-notes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; align-self: center; }

/* Titelbild-Vorschau im Formular im Stil der übrigen Seite: dicke Linie, runde Ecken, ohne Fotorahmen */
.image-field__preview { border: var(--line) solid var(--ink); border-radius: 22px; background: #fffbea; box-shadow: none; overflow: hidden; padding: 0; }
.image-field__preview img { border-radius: 0; }
.image-field__preview:has(.image-field__empty:not([hidden])) { border-style: dashed; }
.image-field__empty { font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--ink-soft); padding: 16px; line-height: 1.35; }

/* Bilder-Bereich einheitlich: alle Kacheln gleich groß, Beschriftung jeweils rechts daneben */
.image-field__preview { width: 150px; height: 150px; }
.image-more { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 22px; padding-top: 22px; border-top: 2px dashed var(--ink); align-items: center; }
.image-more__list { flex: 0 1 auto; }
.image-more__item, .image-more__add { width: 150px; }
.image-more__item img { width: 150px; height: 150px; border-radius: 22px; }
.image-more__pick { width: 150px; height: 150px; border-radius: 22px; }
.image-more__pick span[aria-hidden] { font-size: 3rem; }
.image-field__actions { align-self: center; }

/* Zutaten ohne Menge: keine Punktlinie */
.ingredient-list li:has(.ingredient-list__amount:empty)::after { visibility: hidden; }
.booklet-recipe__ingredients li:has(strong:empty) .bi-dots { visibility: hidden; }

/* Statistik-Kacheln: Zahlen und Rezeptname gleich groß, passend zur Kachelbreite, ohne Silbentrennung */
.stats-tiles .stat-tile { align-content: start; }
.stats-tiles .stat-tile__value, .stats-tiles .stat-tile__value--text { font-size: 2.4rem; line-height: 1.05; hyphens: manual; overflow-wrap: normal; }
.stats-tiles .stat-tile__label { margin-top: 6px; }
.stats-tiles { grid-template-columns: 1fr 1fr 1.6fr; }
@media (max-width: 560px) { .stats-tiles { grid-template-columns: 1fr 1fr; } .stats-tiles .stat-tile:nth-child(3) { grid-column: 1 / -1; } }
.booklet-recipe__source { font-style: italic; }

/* Zutaten-Abschnitte (z. B. „Teig“, „Glasur“) */
.ingredient-section { display: grid; grid-template-columns: 1fr 36px; gap: 12px; align-items: center; margin: 16px 0 8px; }
.ingredient-section:first-child { margin-top: 0; }
.ingredient-section input.ingredient-section__name { font-family: var(--font-head) !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: .04em;
  background: var(--yellow) !important; }
.ingredient-section__name::placeholder { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* Abschnitte in der Zutatenliste und Zwischenüberschriften in der Zubereitung */
.ingredient-list li.ingredient-list__section { display: block; margin-top: 14px; padding: 4px 0 2px; border-bottom: 2px solid var(--ink);
  font-family: var(--font-head); font-weight: 800; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.ingredient-list li.ingredient-list__section:first-child { margin-top: 0; }
.ingredient-list li.ingredient-list__section::after { display: none; }
.booklet-recipe__ingredients li.booklet-recipe__section { display: block; margin-top: 10px; padding-bottom: 2px; border-bottom: 1.5px solid currentColor;
  font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 12px; }
.instructions__step { margin: 18px 0 4px; font-family: var(--font-head); font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.instructions .instructions__step:first-child, .booklet-recipe__steps h4 + .instructions__step { margin-top: 0; }
.booklet-recipe__steps .instructions__step { font-size: 12px; margin: 10px 0 2px; }
/* Lange Zutatennamen umbrechen statt über den Rand ragen */
.ingredient-list li > span:last-child { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }

/* Wochenplan: Ziehen & Ablegen */
.plan-day__list { min-height: 44px; border-radius: 14px; }
.plan-day__list:not(:has(li))::before { content: attr(data-empty-text); display: block; padding: 10px 2px; color: var(--pencil); }
.plan-entry { cursor: grab; }
.plan-entry.is-chosen { cursor: grabbing; }
.plan-entry.is-ghost { opacity: .35; background: var(--yellow); border-radius: 14px; }
.plan-entry.is-dragging { background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 10px 24px rgb(40 36 30 / .2); }

/* ===== Baby-Markierung: Fläschchen neben dem Titel ===== */
.baby-badge {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 1.35em; height: 1.35em; margin-left: .3em; border: 2px solid var(--ink); border-radius: 50%;
  background: var(--sky); color: var(--ink); line-height: 0;
}
.baby-badge .icon { width: 72%; height: 72%; }
h1 .baby-badge { width: .95em; height: .95em; border-width: 3px; margin-left: .25em; }

/* Filter „Nur für Babys“ über den Reitern */
.baby-filter { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.baby-filter__toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px 5px 6px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); color: var(--ink);
  font-family: var(--font-hand); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.baby-filter__toggle { transition: transform .12s, box-shadow .12s; }
.baby-filter__toggle:hover { transform: translateY(-2px); box-shadow: 0 3px 0 var(--ink); }
.baby-filter__toggle.is-on { background: var(--ink); color: var(--yellow); }
.baby-filter__icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--sky); color: var(--ink); line-height: 0; }
.baby-filter__icon .icon { width: 17px; height: 17px; }
.baby-filter__x { font-size: 1.1em; line-height: 1; margin-left: 2px; }

/* ===== Bewertung mit Koch-Sternen (Rosetten) ===== */
.icon--rosette { fill: none; }
:root { --rosette: #c8402e; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --rosette: #e0705c; }
}
/* dunkel per Schalter */
:root:where([data-theme="dark"]) { --rosette: #e0705c; }
.rating { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 3px 10px 3px 12px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); font-size: .85rem; line-height: 1.3; }
.rating__label { color: var(--ink-soft); }
.rating__marks { display: inline-flex; gap: 1px; }
.rating__mark { display: inline-flex; padding: 2px; border: 0; background: none; color: var(--ink); cursor: pointer; line-height: 0; border-radius: 50%; }
.rating__mark .icon { width: 25px; height: 25px; }
.rating__mark.is-on .icon--rosette path { fill: var(--rosette); }
/* Vorschau beim Drüberfahren: dieser und alle davor */
.rating__marks:hover .rating__mark .icon--rosette path { fill: none; }
.rating__marks:hover .rating__mark:has(~ .rating__mark:hover) .icon--rosette path,
.rating__marks:hover .rating__mark:hover .icon--rosette path { fill: var(--blush); }
.rating__mark:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

.rating-badge { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--ink); }
.rating-badge .icon { width: 15px; height: 15px; }
.rating-badge .icon--rosette path { fill: var(--rosette); }

.baby-filter { gap: 8px; flex-wrap: wrap; }
.baby-filter__icon--top { background: var(--rosette); color: var(--cream); }
.baby-filter__icon--top .icon--rosette path { fill: var(--cream); stroke: var(--cream); }

/* Formular: Schalter „Für Babys geeignet“ unter dem Titel */
.baby-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 18px;
  padding: 6px 8px 6px 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream);
  cursor: pointer; font-size: .95rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.baby-switch__icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--sky); line-height: 0; }
.baby-switch__icon .icon { width: 20px; height: 20px; }
.baby-switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.baby-switch__track { position: relative; width: 42px; height: 24px; margin-left: 6px; border: 2px solid var(--ink);
  border-radius: 999px; background: var(--paper-card); transition: background .15s; }
.baby-switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--ink); transition: transform .15s; }
.baby-switch__input:checked + .baby-switch__track { background: var(--sky); }
.baby-switch__input:checked + .baby-switch__track::after { transform: translateX(18px); }
.baby-switch__input:focus-visible + .baby-switch__track { outline: 2px solid var(--ink); outline-offset: 2px; }
.baby-switch:has(.baby-switch__input:checked) { background: #e3eff8; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .baby-switch:has(.baby-switch__input:checked) { background: var(--sky); }
}
/* dunkel per Schalter */
:where(:root[data-theme="dark"]) .baby-switch:has(.baby-switch__input:checked) { background: var(--sky); }

/* Formular: Zeiten in einer Zeile, Gesamt mit Uhr */
.time-fields { flex-wrap: nowrap; gap: 14px; margin-top: 4px; }
.time-fields > .field { flex: 1 1 0; min-width: 0; max-width: 180px; }
.time-fields__clock { display: inline-flex; margin-right: 6px; line-height: 0; }
.time-fields__clock .icon { width: 18px; height: 18px; }
.baby-switch { margin: 0 0 18px; }
@media (max-width: 560px) {
  .time-fields { gap: 8px; }
  .time-fields > .field { flex: 0 0 88px; max-width: none; }
  .time-fields > .field input { width: 100%; }
  .time-fields > .time-fields__total { flex: 1 1 auto; min-width: 0; }
  .time-fields label, .time-fields .time-fields__label { font-size: .62rem; letter-spacing: .01em; white-space: nowrap; }
  .time-fields .time-fields__value { white-space: nowrap; font-size: .85rem; padding: .6em .55em; }
  .time-fields__clock { margin-right: 4px; }
  .time-fields__clock .icon { width: 15px; height: 15px; }
}

/* ===== Hell/Dunkel-Schalter unten ===== */
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
.site-footer { display: flex; justify-content: center; padding: 40px 16px 48px; }
.theme-switch { display: inline-flex; gap: 4px; padding: 4px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-card); }
.theme-switch__btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; transition: background .15s, color .15s; }
.theme-switch__btn .icon { width: 22px; height: 22px; }
.theme-switch__btn:hover { transform: translateY(-1px); }
.theme-switch__btn[aria-pressed="true"] { background: var(--ink); color: var(--paper-card); }
.theme-switch__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Herz hinter „Strudel“: kleiner Aufkleber, leicht schräg, schlägt beim Drüberfahren */
.brand__heart { width: .92em; height: .87em; margin-left: .14em; vertical-align: -.04em; rotate: -12deg; }
.brand__heart svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(2px 2px 0 var(--ink)); }
.brand__heart-shape { fill: var(--coral); stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; }
.brand__heart-shine { fill: none; stroke: #fff6e0; stroke-width: 2.4; stroke-linecap: round; opacity: .85; }
@keyframes heart-beat { 0%, 100% { scale: 1; } 30% { scale: 1.18; } 55% { scale: .96; } 75% { scale: 1.08; } }
.brand:hover .brand__heart svg { animation: heart-beat .7s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .brand:hover .brand__heart svg { animation: none; } }

/* ===== Nährwert-Stempel als Siegel: gewellter Rand, zarter Farbton der Stufe ===== */
.round-stamp { background: transparent; box-shadow: none; }
.round-stamp__seal { fill: color-mix(in srgb, var(--c) 16%, #fffaf0); stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.round-stamp__outer { fill: none; stroke-width: 2.4; }
.round-stamp__outer2 { fill: none; stroke: currentColor; stroke-width: 1; }
.round-stamp__inner { stroke-dasharray: 2.4 3; stroke-width: 1.4; fill: color-mix(in srgb, var(--c) 10%, #fffaf0); }
.round-stamp__text { font-weight: 900; font-size: 8.6px; letter-spacing: .06em; }
.round-stamp { filter: drop-shadow(2px 3px 0 color-mix(in srgb, var(--ink) 22%, transparent)); }
/* Ohne Hintergrund: gelbe Stempelfarbe dunkler, damit sie auf Senfgelb lesbar bleibt */
.round-stamp--yellow { --c: #7f5a00; }
.round-stamp__icon { scale: .86; }

/* Buchtitel in der Quelle: Link zur Buchseite */
.recipe-source .book-link { color: inherit; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.recipe-source .book-link:hover { color: var(--coral); }

/* Buchseite: alle Rezepte aus einem Kochbuch */
.book-head { display: flex; align-items: center; gap: 18px; margin: 10px 0 26px; }
.book-head__icon { flex-shrink: 0; display: grid; place-items: center; width: 64px; height: 64px; border: 2px solid var(--ink); border-radius: 50%; background: var(--cream); color: var(--ink); }
.book-head__icon .icon { width: 32px; height: 32px; }
.book-head__title { margin: 2px 0 4px; overflow-wrap: anywhere; hyphens: auto; }
.book-head__meta { margin: 0; }
.recipe-card { position: relative; }
.recipe-card__page { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--cream); color: var(--ink); font: 800 .75rem var(--font-head); letter-spacing: .04em; text-transform: uppercase; }

/* Blättern im Buch auf der Rezeptseite */
.book-nav { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); font-size: .85rem; }
.book-nav a { padding: 3px 10px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.book-nav a:hover { background: var(--yellow); }
.book-nav__all { border-inline: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 0 !important; }

/* Vorschaukarten: Bildfläche IMMER quadratisch (feste Kartengröße).
   Passt ein Bild nicht ins Quadrat, wird es nur hineingezoomt (cover) – nie verzerrt, nie andere Kartengröße. */
.recipe-card__image { display: block; aspect-ratio: 1 / 1; height: auto; object-fit: cover; object-position: center; }
.recipe-card__image--empty { display: grid; place-items: center; box-sizing: border-box; background: color-mix(in srgb, var(--ink) 6%, var(--cream)); color: color-mix(in srgb, var(--ink) 35%, transparent); }
.recipe-card__image--empty .icon { width: 30%; height: 30%; }

/* Eigene Rückfrage (statt Browser-Fenster) */
.confirm-dialog { width: min(420px, calc(100vw - 32px)); padding: 24px; border: var(--line) solid var(--ink); border-radius: 22px;
  background: var(--paper-card); color: var(--ink); box-shadow: 4px 5px 0 var(--ink); }
.confirm-dialog::backdrop { background: rgb(40 36 30 / .45); backdrop-filter: blur(2px); }
.confirm-dialog[open] { animation: nutri-pop .25s cubic-bezier(.3, 1.5, .5, 1); }
.confirm-dialog__text { margin: 0 0 20px; font-size: 1.05rem; line-height: 1.45; }
.confirm-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* Anmelden / Passwort ändern */
.auth { max-width: 420px; margin: 24px auto; }
.auth h1 { margin-top: 0; }
.site-footer { flex-direction: column; align-items: center; gap: 16px; }

/* Admin */
.admin-stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-stat { flex: 1 1 160px; font-family: var(--font-hand); font-size: 1.1rem; }
.admin-stat strong { display: block; font-family: var(--font-head); font-size: 2.4rem; line-height: 1.1; }
.admin-db { margin-bottom: 24px; overflow-x: auto; }
.admin-db h2 { margin-top: 0; }
.admin-db__file { margin: 0 0 12px; font-family: var(--font-hand); color: var(--ink-soft); word-break: break-all; }
.admin-db__tables { width: 100%; border-collapse: collapse; font-family: var(--font-hand); }
.admin-db__tables th, .admin-db__tables td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--ink-soft); }
.admin-db__tables td:last-child, .admin-db__tables th:last-child { text-align: right; }
.auth__switch { margin: 18px 0 0; font-family: var(--font-hand); }

/* Kopf: Pfeil klappt weitere Knöpfe nach links auf – sie legen sich über den Schriftzug, ohne die Zeile umzubrechen */
.header-actions { flex-wrap: nowrap; }
.more-items { position: absolute; right: calc(100% - 4px); top: 0; bottom: 0; display: flex; align-items: center; gap: 10px;
  padding: 0 10px 0 16px; background: var(--yellow); border-radius: 999px; }
.more-items[hidden] { display: none; }
.site-header.is-compact .more-items { background: var(--paper-card); }
.more-toggle .icon { transition: transform .2s; }
.more-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.more-items > * { animation: menu-in .18s ease-out; }
.profile-menu__email { display: flex; align-items: center; gap: 8px; margin: 0 6px 8px; font-family: var(--font-hand); font-size: .9rem; overflow-wrap: anywhere; }
.profile-menu__logout { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.add-menu form { margin: 0; }

/* Kleines Profilbild (Anfangsbuchstabe) */
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: var(--avatar); color: var(--ink);
  border: 2px solid var(--ink); font-family: var(--font-head); font-weight: 800; line-height: 1; vertical-align: middle; }
.avatar--small { width: 26px; height: 26px; font-size: .8rem; }
.avatar--medium { width: 34px; height: 34px; font-size: 1rem; margin-right: 8px; }
.recipe-card { position: relative; }
.recipe-card > .avatar { position: absolute; top: 10px; left: 10px; z-index: 2; }
.recipe__author-note { display: flex; align-items: center; gap: 8px; }

/* Haushalt */
.household { margin-bottom: 20px; }
.household h2 { margin-top: 0; }
.household__members { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.household__members li { display: flex; align-items: center; gap: 8px; font-family: var(--font-hand); overflow-wrap: anywhere; }
.household__choice { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.household__choice form { margin: 0; }
/* Konto-Menü auf dem Handy: volle Breite statt links abgeschnitten */
@media (max-width: 680px) {
  .profile-menu .add-menu__panel { position: fixed; top: 74px; left: 16px; right: 16px; width: auto; }
  .profile-menu .add-menu__panel::after { display: none; }
}

/* Admin: Feedback als To-do-Liste */
.todo { margin-bottom: 24px; }
.todo__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.todo__head h2 { margin: 0; }
.todo__count { font-family: var(--font-head); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em;
  background: var(--ink); color: var(--yellow); border-radius: 999px; padding: 4px 12px; }
.todo__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.todo__item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: var(--line) solid var(--ink); border-radius: 16px; background: #fffbea; }
.todo__form { margin: 0; }
.todo__check { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border: var(--line) solid var(--ink); border-radius: 9px;
  background: var(--cream); color: var(--ink); font: 800 1.1rem var(--font-head); cursor: pointer; transition: transform .12s, background .15s; }
.todo__check:hover { transform: scale(1.08); background: var(--sage, #B5CF9B); }
.todo__body { min-width: 0; flex: 1; }
.todo__message { margin: 3px 0 6px; font-family: var(--font-hand); font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.todo__meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-family: var(--font-hand); font-size: .85rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.todo__file { color: var(--ink); }
.todo__item.is-done { opacity: .55; background: transparent; }
.todo__item.is-done .todo__check { background: var(--ink); color: var(--yellow); }
.todo__item.is-done .todo__message { text-decoration: line-through; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) .todo__item:not(.is-done) { background: var(--cream); } }
:where(:root[data-theme="dark"]) .todo__item:not(.is-done) { background: var(--cream); }

/* Feedback-Knopf: immer unten rechts */
.feedback-fab { position: fixed; right: 16px; bottom: 16px; z-index: 40; background: var(--blush, #F4B6B0) !important;
  box-shadow: 0 6px 0 -1px rgb(0 0 0 / .15); }
.feedback-fab:hover { transform: translateY(-2px) rotate(-4deg); }
@media print { .feedback-fab { display: none !important; } }
.todo__new { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.todo__new input[type=text] { flex: 1; min-width: 0; }
.todo__attach { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border: var(--line) solid var(--ink); border-radius: 50%;
  background: var(--cream); cursor: pointer; font-size: 1.1rem; text-transform: none; letter-spacing: 0; }
.todo__add { width: 42px; height: 42px; flex-shrink: 0; border: var(--line) solid var(--ink); border-radius: 50%; background: var(--ink); color: var(--yellow);
  font: 800 1.3rem var(--font-head); cursor: pointer; }
.todo__add:hover { transform: scale(1.06); }
