/**
 * Kochbuch – Rezepte & Wochenplan
 * Farben lassen sich in der CSS-Datei deines Styles überschreiben, z. B.
 * :root { --kb-akzent: #2f7d4f; }
 *
 * @copyright (c) 2026 Maggan22
 * @license GNU General Public License, version 2 (GPL-2.0-only)
 */

:root {
	--kb-akzent: #c4553b;
	--kb-akzent-dunkel: #9c3f2a;
	--kb-akzent-hell: rgba(196, 85, 59, 0.1);
	--kb-gruen: #3e8a4f;
	--kb-gruen-hell: rgba(62, 138, 79, 0.12);
	--kb-gelb: #d39b1e;
	--kb-warn: #b3261e;
	--kb-warn-hell: rgba(179, 38, 30, 0.08);
	--kb-text: inherit;
	--kb-leise: rgba(0, 0, 0, 0.55);
	--kb-linie: rgba(0, 0, 0, 0.12);
	--kb-flaeche: rgba(255, 255, 255, 0.85);
	--kb-flaeche-2: rgba(0, 0, 0, 0.035);
	--kb-schatten: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.06);
	--kb-radius: 10px;
	--kb-radius-klein: 6px;
}

.kb, .kb * { box-sizing: border-box; }

.kb {
	font-size: 1.1em;
	line-height: 1.5;
	margin-bottom: 20px;
}

.kb a { text-decoration: none; }
.kb a:hover { text-decoration: underline; }
.kb h2, .kb h3, .kb h4 { font-family: inherit; border: 0; margin: 0 0 0.5em; text-transform: none; }
.kb h2 { font-size: 1.6em; line-height: 1.25; }
.kb h3 { font-size: 1.25em; }
.kb h4 { font-size: 1.05em; }
.kb p { margin: 0 0 0.75em; }
.kb-leise { color: var(--kb-leise); font-size: 0.92em; }
.kb-versteckt { display: none !important; }
.kb-nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Reiter ---------- */
.kb-reiter {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 16px;
	padding: 0 0 8px;
	border-bottom: 2px solid var(--kb-linie);
	list-style: none;
}
.kb-reiter li { margin: 0; }
.kb-reiter a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border-radius: 999px;
	font-weight: bold;
	white-space: nowrap;
}
.kb-reiter a:hover { background: var(--kb-akzent-hell); text-decoration: none; }
.kb-reiter a.kb-an { background: var(--kb-akzent); color: #fff; }
.kb-reiter .kb-reiter-neu { margin-left: auto; }

/* ---------- Knöpfe ---------- */
.kb .kb-knopf, .kb button.kb-knopf, .kb input.kb-knopf {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid var(--kb-linie);
	border-radius: var(--kb-radius-klein);
	background: var(--kb-flaeche);
	color: inherit;
	font: inherit;
	font-weight: bold;
	font-size: 0.95em;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	min-height: 38px;
	white-space: nowrap;
}
.kb .kb-knopf:hover { border-color: var(--kb-akzent); text-decoration: none; }
.kb .kb-knopf-haupt { background: var(--kb-akzent); border-color: var(--kb-akzent); color: #fff; }
.kb .kb-knopf-haupt:hover { background: var(--kb-akzent-dunkel); color: #fff; }
.kb .kb-knopf-klein { padding: 4px 9px; min-height: 30px; font-size: 0.85em; }
.kb .kb-knopf-text { border: 0; background: none; padding: 4px 6px; min-height: 0; font-weight: normal; color: inherit; }
.kb .kb-knopf-text:hover { color: var(--kb-akzent); }
.kb .kb-knopf[disabled] { opacity: 0.5; cursor: default; }
.kb .kb-knopf-warn { color: var(--kb-warn); }
.kb-knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Formulare ---------- */
.kb input[type="text"], .kb input[type="search"], .kb input[type="url"], .kb input[type="number"], .kb input[type="date"],
.kb select, .kb textarea {
	font: inherit;
	font-size: 1em;
	padding: 7px 10px;
	border: 1px solid var(--kb-linie);
	border-radius: var(--kb-radius-klein);
	background: var(--kb-flaeche);
	color: inherit;
	max-width: 100%;
	min-height: 38px;
}
.kb textarea { width: 100%; min-height: 120px; line-height: 1.5; resize: vertical; }
.kb input:focus, .kb select:focus, .kb textarea:focus { outline: 2px solid var(--kb-akzent); outline-offset: 1px; }
.kb .kb-breit { width: 100%; }
.kb .kb-zahl { width: 6em; }
.kb label { cursor: pointer; }
.kb-feld { margin-bottom: 16px; }
.kb-feld > label, .kb-feld > .kb-feldname { display: block; font-weight: bold; margin-bottom: 4px; }
.kb-feld .kb-erkl { display: block; color: var(--kb-leise); font-size: 0.88em; margin-top: 3px; }
.kb-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--kb-linie); border-radius: 999px; background: var(--kb-flaeche); font-size: 0.92em; cursor: pointer; user-select: none; }
.kb-chip input { margin: 0; }
.kb-chip:has(input:checked) { background: var(--kb-akzent-hell); border-color: var(--kb-akzent); }
.kb-fehler { padding: 10px 14px; border-radius: var(--kb-radius-klein); background: var(--kb-warn-hell); color: var(--kb-warn); border: 1px solid rgba(179, 38, 30, 0.3); margin-bottom: 14px; }
.kb-hinweis { padding: 10px 14px; border-radius: var(--kb-radius-klein); background: var(--kb-flaeche-2); border-left: 4px solid var(--kb-gelb); margin-bottom: 14px; font-size: 0.95em; }
.kb-erfolg { border-left-color: var(--kb-gruen); }

/* ---------- Kasten ---------- */
.kb-kasten {
	background: var(--kb-flaeche);
	border: 1px solid var(--kb-linie);
	border-radius: var(--kb-radius);
	padding: 16px;
	margin-bottom: 16px;
}
.kb-kasten > h3:first-child { margin-top: 0; }
.kb details.kb-kasten > summary { cursor: pointer; font-weight: bold; font-size: 1.05em; }
.kb details.kb-kasten[open] > summary { margin-bottom: 12px; }

/* ---------- Suche & Filter ---------- */
.kb-suchleiste { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.kb-suchleiste input[type="search"] { flex: 1 1 260px; }
.kb-kategorien { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.kb-kategorien a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--kb-linie); background: var(--kb-flaeche); font-size: 0.92em; }
.kb-kategorien a.kb-an { background: var(--kb-akzent); border-color: var(--kb-akzent); color: #fff; }
.kb-kategorien a:hover { text-decoration: none; border-color: var(--kb-akzent); }
.kb-filter { margin-bottom: 14px; }
.kb-filter .kb-filterzeile { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 10px; align-items: center; }
.kb-filter .kb-filtername { font-weight: bold; min-width: 6em; }
.kb-ergebniskopf { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }

/* ---------- Karten ---------- */
.kb-karten {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 16px;
}
.kb-karte {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--kb-flaeche);
	border: 1px solid var(--kb-linie);
	border-radius: var(--kb-radius);
	overflow: hidden;
	box-shadow: var(--kb-schatten);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kb-karte:hover { transform: translateY(-2px); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14); }
.kb-karte-bild { display: block; aspect-ratio: 4 / 3; background: var(--kb-akzent-hell) center / cover no-repeat; position: relative; }
.kb-karte-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kb-karte-bild .kb-ohne-bild { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 3em; color: var(--kb-akzent); opacity: 0.5; }
.kb-karte-inhalt { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.kb-karte-titel { font-weight: bold; font-size: 1.05em; line-height: 1.3; }
.kb-karte-titel a { color: inherit; }
.kb-karte-titel a::after { content: ""; position: absolute; inset: 0; }
.kb-karte-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--kb-leise); font-size: 0.86em; }
.kb-karte-meta i { margin-right: 3px; }
.kb-karte-unten { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.kb-karte .kb-warnung-klein { position: relative; z-index: 1; }
.kb-ecke { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 1; }
.kb-karte-treffer { font-size: 0.86em; }
.kb-karte-treffer strong { color: var(--kb-gruen); }

/* Abzeichen */
.kb-abz {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.78em;
	font-weight: bold;
	line-height: 1.4;
	background: var(--kb-flaeche-2);
	border: 1px solid var(--kb-linie);
	white-space: nowrap;
}
.kb-abz-vegan, .kb-abz-vegetarisch { background: var(--kb-gruen-hell); border-color: rgba(62, 138, 79, 0.35); color: #2b6a3a; }
.kb-abz-saison { background: rgba(211, 155, 30, 0.15); border-color: rgba(211, 155, 30, 0.4); color: #8a6206; }
.kb-abz-rdw { background: var(--kb-akzent); border-color: var(--kb-akzent); color: #fff; }
.kb-abz-entwurf { background: #555; color: #fff; border-color: #555; }
.kb-abz-warn { background: var(--kb-warn-hell); border-color: rgba(179, 38, 30, 0.35); color: var(--kb-warn); }
.kb-abz-allergen { background: transparent; }
.kb-abz-allergen.kb-meins { background: var(--kb-warn-hell); border-color: var(--kb-warn); color: var(--kb-warn); }

/* Sterne */
.kb-sterne { position: relative; display: inline-block; font-size: 1em; line-height: 1; letter-spacing: 1px; color: rgba(0, 0, 0, 0.18); white-space: nowrap; vertical-align: -1px; }
.kb-sterne::before { content: "★★★★★"; }
.kb-sterne span { position: absolute; top: 0; left: 0; overflow: hidden; color: var(--kb-gelb); }
.kb-sterne span::before { content: "★★★★★"; }
.kb-sterne-wahl { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.kb-sterne-wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kb-sterne-wahl label { font-size: 1.8em; line-height: 1; color: rgba(0, 0, 0, 0.18); cursor: pointer; padding: 0 1px; }
.kb-sterne-wahl label:hover, .kb-sterne-wahl label:hover ~ label,
.kb-sterne-wahl input:checked ~ label { color: var(--kb-gelb); }
.kb-sterne-wahl input:focus-visible + label { outline: 2px solid var(--kb-akzent); }

/* ---------- Aktionen (Rezept der Woche, Kochrunde) ---------- */
.kb-aktionen { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kb-aktion {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 14px;
	align-items: center;
	padding: 12px;
	border-radius: var(--kb-radius);
	background: linear-gradient(135deg, var(--kb-akzent-hell), transparent 70%);
	border: 1px solid var(--kb-akzent);
}
.kb-aktion-bild { aspect-ratio: 4 / 3; border-radius: var(--kb-radius-klein); background: var(--kb-akzent-hell) center / cover; display: block; }
.kb-aktion-typ { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75em; font-weight: bold; color: var(--kb-akzent); }
.kb-aktion h3 { margin: 2px 0 4px; }

/* ---------- Rezeptseite ---------- */
.kb-rezept-kopf { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; margin-bottom: 20px; align-items: start; }
.kb-rezept-kopf-ohne-bild { grid-template-columns: minmax(0, 1fr); }
.kb-rezept-bild { border-radius: var(--kb-radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--kb-akzent-hell); box-shadow: var(--kb-schatten); }
.kb-rezept-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kb-rezept-bild .kb-ohne-bild { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 5em; color: var(--kb-akzent); opacity: 0.4; }
.kb-rezept-titel { font-size: 1.9em; line-height: 1.2; margin: 0 0 6px; }
.kb-rezept-zeile { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 10px; color: var(--kb-leise); }
.kb-zeiten { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 12px 0; }
.kb-zeit { padding: 8px 10px; border-radius: var(--kb-radius-klein); background: var(--kb-flaeche-2); text-align: center; }
.kb-zeit span { display: block; font-size: 0.78em; color: var(--kb-leise); text-transform: uppercase; letter-spacing: 0.03em; }
.kb-zeit strong { font-size: 1.05em; }
.kb-aktionsleiste { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.kb-warnungen { padding: 10px 14px; border-radius: var(--kb-radius-klein); background: var(--kb-warn-hell); border-left: 4px solid var(--kb-warn); color: var(--kb-warn); font-weight: bold; margin: 10px 0; }
.kb-rezept-haupt { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.kb-zutaten-kasten { position: sticky; top: 10px; }
.kb-portionen { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.kb-portionen input { width: 3.2em; min-height: 38px; box-sizing: border-box; padding: 4px; text-align: center; font-weight: bold; font-size: 1.1em; }
.kb-portionen .kb-knopf { width: 38px; padding: 0; font-size: 1.2em; }
.kb-zutatenliste { list-style: none; margin: 0 0 10px; padding: 0; }
.kb-zutatenliste li { display: grid; grid-template-columns: 22px 6.5em 1fr; gap: 6px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--kb-linie); }
.kb-zutatenliste li:last-child { border-bottom: 0; }
.kb-zutatenliste .kb-menge { font-weight: bold; text-align: right; white-space: nowrap; }
.kb-zutatenliste input[type="checkbox"] { margin: 0; }
.kb-zutatenliste li.kb-hab-ich .kb-zname, .kb-zutatenliste li.kb-hab-ich .kb-menge { text-decoration: line-through; opacity: 0.5; }
.kb-zutatenliste .kb-znotiz { color: var(--kb-leise); font-size: 0.9em; }
.kb-zutatenliste .kb-zwarn { color: var(--kb-warn); font-size: 0.85em; font-weight: bold; display: block; }
.kb-zutatenliste .kb-zvorrat { color: var(--kb-gruen); font-size: 0.85em; }
.kb-gruppenname { font-weight: bold; margin: 12px 0 2px; text-transform: uppercase; font-size: 0.82em; letter-spacing: 0.05em; color: var(--kb-akzent); }
.kb-schritte { list-style: none; counter-reset: kbschritt; margin: 0; padding: 0; }
.kb-schritte li { counter-increment: kbschritt; position: relative; padding: 4px 0 14px 46px; min-height: 36px; }
.kb-schritte li::before {
	content: counter(kbschritt);
	position: absolute; left: 0; top: 0;
	width: 32px; height: 32px; border-radius: 50%;
	background: var(--kb-akzent); color: #fff; font-weight: bold;
	display: flex; align-items: center; justify-content: center;
}
.kb-schritte li.kb-erledigt { opacity: 0.45; }
.kb-schritte li.kb-erledigt::before { content: "✓"; background: var(--kb-gruen); }
.kb-timer-knopf { display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--kb-akzent); color: var(--kb-akzent); background: transparent; font: inherit; font-size: 0.9em; cursor: pointer; }
.kb-timer-knopf:hover { background: var(--kb-akzent-hell); }
.kb-naehrwerte { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.kb-naehrwerte div { background: var(--kb-flaeche-2); border-radius: var(--kb-radius-klein); padding: 6px 4px; }
.kb-naehrwerte strong { display: block; font-size: 1.1em; }
.kb-naehrwerte span { font-size: 0.78em; color: var(--kb-leise); }
.kb-liste-einfach { list-style: none; margin: 0; padding: 0; }
.kb-liste-einfach li { padding: 4px 0; }
.kb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-tags a { font-size: 0.86em; padding: 2px 9px; border-radius: 999px; background: var(--kb-flaeche-2); }

/* Ausklapp-Menüs (Merken, Planen) */
.kb-klapp { position: relative; display: inline-block; }
.kb-klapp-inhalt {
	display: none;
	position: absolute;
	z-index: 50;
	top: calc(100% + 6px);
	left: 0;
	min-width: 260px;
	padding: 12px;
	border: 1px solid var(--kb-linie);
	border-radius: var(--kb-radius);
	background: #fff;
	color: #333;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.kb-klapp.kb-offen .kb-klapp-inhalt { display: block; }
.kb-klapp-inhalt label { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.kb-klapp-inhalt .kb-feld { margin-bottom: 10px; }
.kb-klapp-inhalt select, .kb-klapp-inhalt input[type="text"], .kb-klapp-inhalt input[type="number"] { width: 100%; }

/* Nachgekocht */
.kb-nk-liste { list-style: none; margin: 0; padding: 0; }
.kb-nk { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--kb-linie); }
.kb-nk:last-child { border-bottom: 0; }
.kb-nk-avatar img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.kb-nk-avatar .kb-avatar-leer { width: 48px; height: 48px; border-radius: 50%; background: var(--kb-akzent-hell); display: flex; align-items: center; justify-content: center; color: var(--kb-akzent); font-size: 1.4em; }
.kb-nk-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.kb-nk-bild img { max-width: 240px; width: 100%; border-radius: var(--kb-radius-klein); margin-top: 8px; display: block; }
.kb-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 14px; }
.kb-fotos a { display: block; aspect-ratio: 4 / 3; border-radius: var(--kb-radius-klein); overflow: hidden; }
.kb-fotos img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Formular ---------- */
.kb-formular { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; }
.kb-formular .kb-ganz { grid-column: 1 / -1; }
.kb-formular textarea[name="zutaten"], .kb-formular textarea[name="schritte"] { min-height: 260px; font-family: inherit; }
.kb-vorschau table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.kb-vorschau th, .kb-vorschau td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--kb-linie); vertical-align: top; }
.kb-vorschau tr.kb-v-neu td, .kb-vorschau tr.kb-v-kopf td, .kb-vorschau tr.kb-v-offen td { background: rgba(211, 155, 30, 0.1); }
.kb-vorschau .kb-v-gruppe td { font-weight: bold; color: var(--kb-akzent); background: transparent; }
.kb-bildvorschau img { max-width: 220px; border-radius: var(--kb-radius-klein); display: block; margin-bottom: 6px; }

/* ---------- Wochenplan ---------- */
.kb-plan-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.kb-plan-kopf h2 { margin: 0; }
.kb-plan { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.kb-tag { background: var(--kb-flaeche); border: 1px solid var(--kb-linie); border-radius: var(--kb-radius); padding: 8px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.kb-tag.kb-heute { border: 2px solid var(--kb-akzent); }
.kb-tag.kb-vorbei { opacity: 0.7; }
.kb-tag-kopf { display: flex; justify-content: space-between; align-items: baseline; font-weight: bold; }
.kb-tag-kopf small { font-weight: normal; color: var(--kb-leise); }
.kb-mahlzeit { border-top: 1px dashed var(--kb-linie); padding-top: 5px; min-height: 44px; border-radius: 4px; }
.kb-mahlzeit.kb-ziel { background: var(--kb-akzent-hell); outline: 2px dashed var(--kb-akzent); }
.kb-mahlzeit-name { font-size: 0.72em; text-transform: uppercase; letter-spacing: 0.05em; color: var(--kb-leise); display: flex; justify-content: space-between; align-items: center; }
.kb-mahlzeit-name button { border: 0; background: none; color: var(--kb-akzent); font-size: 1.3em; line-height: 1; padding: 0 2px; cursor: pointer; }
.kb-eintrag { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 6px; align-items: center; padding: 4px; margin-top: 4px; border-radius: var(--kb-radius-klein); background: var(--kb-flaeche-2); font-size: 0.88em; line-height: 1.25; cursor: grab; }
.kb-eintrag.kb-ohne-bild-eintrag { grid-template-columns: 1fr; }
.kb-eintrag-bild { width: 38px; height: 38px; border-radius: 4px; background: var(--kb-akzent-hell) center / cover; }
.kb-eintrag a { color: inherit; font-weight: bold; word-break: break-word; }
.kb-eintrag .kb-eintrag-info { color: var(--kb-leise); font-size: 0.9em; }
.kb-eintrag.kb-gekocht { opacity: 0.55; }
.kb-eintrag.kb-gekocht a { text-decoration: line-through; }
.kb-eintrag.kb-rest { border-left: 3px solid var(--kb-gelb); }
.kb-eintrag .kb-eintrag-menue { position: absolute; top: 2px; right: 2px; border: 0; background: none; cursor: pointer; color: var(--kb-leise); padding: 2px 5px; }
.kb-eintrag .kb-eintrag-warn { color: var(--kb-warn); font-weight: bold; }
.kb-plan-werkzeuge { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* Dialoge */
.kb-dialog {
	border: 0;
	border-radius: var(--kb-radius);
	padding: 0;
	max-width: min(520px, calc(100vw - 24px));
	width: 100%;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
	background: #fff;
	color: #333;
}
.kb-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.kb-dialog-kopf { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.kb-dialog-kopf h3 { margin: 0; }
.kb-dialog-inhalt { padding: 16px; }
.kb-dialog-zu { border: 0; background: none; font-size: 1.5em; cursor: pointer; line-height: 1; color: inherit; }
.kb-vorschlaege { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--kb-linie); border-radius: var(--kb-radius-klein); max-height: 220px; overflow-y: auto; }
.kb-vorschlaege:empty { display: none; }
.kb-vorschlaege li { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--kb-linie); }
.kb-vorschlaege li:last-child { border-bottom: 0; }
.kb-vorschlaege li:hover, .kb-vorschlaege li.kb-aktiv { background: var(--kb-akzent-hell); }
.kb-vorschlaege small { color: var(--kb-leise); }

/* ---------- Einkaufsliste ---------- */
.kb-liste-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.kb-einkauf { list-style: none; margin: 0 0 6px; padding: 0; }
.kb-einkauf li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--kb-linie); }
.kb-einkauf li:last-child { border-bottom: 0; }
.kb-einkauf label { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.kb-einkauf input[type="checkbox"] { width: 22px; height: 22px; flex: none; accent-color: var(--kb-gruen); }
.kb-einkauf .kb-posten-menge { font-weight: bold; min-width: 5.5em; white-space: nowrap; }
.kb-einkauf .kb-posten-name { flex: 1; min-width: 0; }
.kb-einkauf .kb-posten-herkunft { display: block; font-size: 0.8em; color: var(--kb-leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-einkauf li.kb-abgehakt .kb-posten-name, .kb-einkauf li.kb-abgehakt .kb-posten-menge { text-decoration: line-through; opacity: 0.5; }
.kb-einkauf .kb-weg { border: 0; background: none; color: var(--kb-leise); cursor: pointer; font-size: 1.1em; padding: 4px 8px; }
.kb-einkauf .kb-weg:hover { color: var(--kb-warn); }
.kb-abteilung { margin: 14px 0 2px; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.05em; color: var(--kb-akzent); font-weight: bold; }
.kb-fortschritt { height: 8px; border-radius: 999px; background: var(--kb-flaeche-2); overflow: hidden; margin: 6px 0 12px; }
.kb-fortschritt span { display: block; height: 100%; background: var(--kb-gruen); transition: width 0.3s ease; }
.kb-teilen-link { display: flex; gap: 6px; }
.kb-teilen-link input { flex: 1; min-width: 0; font-size: 0.85em; }

/* ---------- Saison ---------- */
.kb-monate { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-bottom: 16px; }
.kb-monate a { text-align: center; padding: 8px 2px; border-radius: var(--kb-radius-klein); background: var(--kb-flaeche-2); font-size: 0.85em; font-weight: bold; overflow: hidden; text-overflow: ellipsis; }
.kb-monate a.kb-an { background: var(--kb-akzent); color: #fff; }
.kb-monate a.kb-jetzt { box-shadow: inset 0 -3px 0 var(--kb-gelb); }
.kb-saison-gruppen { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kb-saison-gruppen ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 12px; }
.kb-saison-gruppen li { padding: 2px 0; break-inside: avoid; }

/* ---------- Sammlungen ---------- */
.kb-sammlungen { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kb-sammlung { display: block; border: 1px solid var(--kb-linie); border-radius: var(--kb-radius); overflow: hidden; background: var(--kb-flaeche); box-shadow: var(--kb-schatten); color: inherit; }
.kb-sammlung:hover { text-decoration: none; transform: translateY(-2px); }
.kb-sammlung-bilder { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 4 / 3; background: var(--kb-akzent-hell); }
.kb-sammlung-bilder span { background: center / cover; }
.kb-sammlung-bilder .kb-ohne-bild { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; font-size: 2.5em; color: var(--kb-akzent); opacity: 0.5; }
.kb-sammlung-name { padding: 8px 12px; font-weight: bold; display: flex; justify-content: space-between; gap: 6px; }

/* ---------- Kochmodus ---------- */
.kb-kochmodus {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: #fffdf8;
	color: #222;
	display: flex;
	flex-direction: column;
	font-size: 1.35rem;
	line-height: 1.55;
}
.kb-kochmodus[hidden] { display: none; }
.kb-km-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.kb-km-kopf strong { font-size: 1.1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-km-inhalt { flex: 1; overflow-y: auto; padding: 24px clamp(18px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; }
.kb-km-schritt { font-size: clamp(1.3rem, 3.2vw, 2rem); max-width: 50em; margin: 0 auto; }
.kb-km-nr { color: #c4553b; font-weight: bold; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; text-align: center; margin-bottom: 14px; }
.kb-km-fuss { display: flex; gap: 12px; padding: 14px 18px; border-top: 1px solid rgba(0, 0, 0, 0.1); }
.kb-km-fuss button { flex: 1; min-height: 64px; font-size: 1.15rem; }
.kb-km-zutaten { max-width: 40em; margin: 0 auto; font-size: 1.1rem; }
.kb-km-zutaten[hidden] { display: none; }
.kb-km-timer { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 0 18px 10px; }
.kb-km-timer:empty { display: none; }
.kb-laufender-timer { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #c4553b; color: #fff; font-weight: bold; font-variant-numeric: tabular-nums; }
.kb-laufender-timer.kb-fertig { background: #3e8a4f; animation: kb-blinken 0.8s infinite alternate; }
.kb-laufender-timer button { border: 0; background: rgba(255, 255, 255, 0.25); color: #fff; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; line-height: 1; }
@keyframes kb-blinken { to { opacity: 0.55; } }
.kb-timer-leiste { position: fixed; right: 12px; bottom: 12px; z-index: 9000; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* Meldung unten */
.kb-toast {
	position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(20px);
	z-index: 10001; background: #333; color: #fff; padding: 10px 18px; border-radius: 999px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3); opacity: 0; transition: all 0.25s ease; pointer-events: none;
	max-width: calc(100vw - 32px); text-align: center;
}
.kb-toast.kb-sichtbar { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.kb-toast a { color: #ffd5c8; font-weight: bold; margin-left: 8px; }

.kb-leer { text-align: center; padding: 30px 10px; color: var(--kb-leise); }
.kb-leer i { font-size: 2.5em; display: block; margin-bottom: 10px; color: var(--kb-akzent); opacity: 0.6; }
.kb-seiten { margin: 10px 0 0; }
.kb-zwei { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 20px; align-items: start; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 1100px) {
	.kb-plan { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.kb-rezept-kopf, .kb-rezept-haupt, .kb-liste-layout, .kb-zwei { grid-template-columns: 1fr; }
	.kb-zutaten-kasten { position: static; }
	.kb-formular { grid-template-columns: 1fr; }
	.kb-plan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kb-monate { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 560px) {
	.kb { font-size: 1.05em; }
	.kb-karten { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.kb-karte-inhalt { padding: 8px; }
	.kb-plan { grid-template-columns: 1fr; }
	/* Leere Mahlzeiten auf dem Handy nur eine Zeile hoch */
	.kb-mahlzeit { min-height: 0; padding-bottom: 3px; }
	.kb-mahlzeit:has(.kb-eintrag) { min-height: 44px; }
	.kb-tag { gap: 3px; }
	.kb-aktion { grid-template-columns: 1fr; }
	.kb-reiter a span { display: none; }
	.kb-reiter a { padding: 8px 11px; }
	.kb-reiter .kb-reiter-neu span { display: inline; }
	.kb-rezept-titel { font-size: 1.5em; }
	.kb-monate { grid-template-columns: repeat(4, 1fr); }
	.kb-saison-gruppen ul { columns: 1; }
	.kb-naehrwerte { grid-template-columns: repeat(2, 1fr); }
	.kb-zutatenliste li { grid-template-columns: 22px 5.5em 1fr; }
	.kb-klapp-inhalt { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; min-width: 0; }
}

/* ---------- Dunkle Styles ---------- */
@media (prefers-color-scheme: dark) {
	.kb-dunkel-auto { --kb-flaeche: rgba(255, 255, 255, 0.06); }
}

/* ---------- Druck ---------- */
.kb-druck { max-width: 760px; margin: 0 auto; padding: 20px; font-family: Georgia, "Times New Roman", serif; color: #000; background: #fff; font-size: 12pt; line-height: 1.45; }
.kb-druck h1 { font-size: 22pt; margin: 0 0 4px; }
.kb-druck .kb-druck-meta { color: #444; margin-bottom: 12px; font-size: 10pt; }
.kb-druck .kb-druck-spalten { display: grid; grid-template-columns: 34% 1fr; gap: 24px; }
.kb-druck img { max-width: 100%; max-height: 220px; object-fit: cover; display: block; margin: 10px 0; }
.kb-druck ul { padding-left: 1.1em; margin: 0 0 8px; }
.kb-druck ol { padding-left: 1.4em; }
.kb-druck ol li { margin-bottom: 8px; }
.kb-druck .kb-druck-fuss { margin-top: 18px; padding-top: 6px; border-top: 1px solid #999; font-size: 9pt; color: #555; }
.kb-druck .kb-druck-knoepfe { margin-bottom: 16px; font-family: sans-serif; }
@media print {
	.kb-druck .kb-druck-knoepfe { display: none; }
	.kb-druck { padding: 0; }
	@page { margin: 15mm; }
}

/* Reaktionen (Extension „Reaktionen“) */
.kb-reaktionen { margin: 10px 0; }
.kb-nk .kb-reaktionen { margin: 6px 0 0; }
