/* ===== Rezepte: Küchen-Klemmbrett (Johann 10.11.2026) =====
   Nur auf Rezeptseiten geladen (werkzeug/rezepte.py). Materialfamilie der Rezepte: Klemmbrett, Karteikarte, Küchenzettel.
   Texte bleiben wortgleich, hier ändert sich nur, wo etwas steht und wie es aussieht. */

/* --- Klemmbrett direkt unter dem Seitenkopf --- */
.klemmbrett { position: relative; margin: 34px 0 30px; padding: 34px clamp(18px, 3vw, 34px) 22px; background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(155, 115, 80, 0.10) 31px 32px), #fffdf6;
  border: 12px solid #a77e58; border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(58, 51, 43, 0.12), 0 1px 0 2px rgba(120, 86, 56, 0.35), 0 30px 44px -30px rgba(40, 34, 27, 0.65);
  background-clip: padding-box; }
.klemmbrett::before { content: ""; position: absolute; inset: -12px; border-radius: 22px; pointer-events: none;
  background: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.07) 0 3px, transparent 3px 9px); mask: linear-gradient(#000 0 0) exclude, linear-gradient(#000 0 0) content-box; -webkit-mask-composite: xor; padding: 12px; }
.klemmbrett .klammer { position: absolute; top: -34px; left: 50%; width: 150px; height: 46px; margin-left: -75px; border-radius: 10px 10px 14px 14px;
  background: linear-gradient(180deg, #e9e6e0 0%, #c8c3ba 45%, #a9a398 100%); box-shadow: 0 6px 10px -4px rgba(40, 34, 27, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.klemmbrett .klammer::before { content: ""; position: absolute; left: 50%; top: 8px; width: 46px; height: 12px; margin-left: -23px; border-radius: 8px; background: #8f897e; box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.35); }
.klemmbrett > .hand { display: block; font-size: 1.6rem; line-height: 1; color: var(--holz-text); margin: 0 0 6px; }
.selbstgemacht .klemmbrett ul.eckdaten { margin: 12px 0 18px; }
.rezeptinfo .portionen { margin-bottom: 4px; }
.rezeptinfo .abhak-hinweis { margin: 0 0 6px; }
.rezeptinfo .knopf.bring { justify-self: start; width: fit-content; }
.klemmbrett .eckdaten li { background: rgba(255, 255, 255, 0.72); }
.klemm-knoepfe { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.klemm-knoepfe .knopf { min-height: 50px; box-sizing: border-box; }
.klemm-knoepfe .knopf.leise, .rezeptseite .knopf.bring, .noch-was .kopfzeile .knopf.leise { border: 1.5px solid var(--oliv); border-radius: 999px; padding: 8px 18px 8px 8px; background: transparent; color: var(--oliv-tief); text-decoration: none; }
.klemm-knoepfe .knopf.leise:hover, .rezeptseite .knopf.bring:hover { background: rgba(97, 107, 72, 0.08); }
.klemm-knoepfe button.knopf { font: inherit; font-weight: 500; font-size: 0.98rem; }
.klemm-knoepfe .knopf.leise .shopsymbol, .rezeptseite .knopf.bring .shopsymbol { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(97, 107, 72, 0.12); line-height: 0; }
.klemm-knoepfe .shopsymbol svg, .rezeptseite .knopf.bring .shopsymbol svg { width: 60%; height: 60%; }
.ohne-werbung { margin: 16px 0 0; font-size: 0.86rem; color: var(--grau); display: flex; align-items: center; gap: 8px; }
.ohne-werbung::before { content: ""; width: 16px; height: 16px; flex: none; background: var(--oliv); -webkit-mask: var(--i-haken) center / contain no-repeat; mask: var(--i-haken) center / contain no-repeat; }

.teilen-menue { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; padding: 10px 0 2px; }
.teilen-menue a, .teilen-menue button { font: inherit; font-size: 0.9rem; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--linie); background: var(--papier); color: var(--tinte); text-decoration: none; cursor: pointer; }
.teilen-menue a:hover, .teilen-menue button:hover { border-color: var(--oliv); color: var(--oliv-tief); }

/* --- Portionen mit Plus und Minus --- */
.portionen { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 22px; padding: 10px 14px; border-radius: 999px; background: rgba(255, 253, 246, 0.9); border: 1px dashed color-mix(in srgb, var(--holz) 55%, transparent); width: fit-content; max-width: 100%; box-sizing: border-box; }
.portionen .hand { font-size: 1.35rem; color: var(--holz-text); line-height: 1; margin-right: 2px; }
.portionen button.minus, .portionen button.plus { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--oliv); background: transparent; color: var(--oliv-tief); font-size: 1.35rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 2px; }
.portionen button.minus:hover:not(:disabled), .portionen button.plus:hover:not(:disabled) { background: var(--oliv); color: var(--papier); }
.portionen button:disabled { opacity: 0.35; cursor: default; }
.portionen output { min-width: 1.6em; text-align: center; font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--tinte); line-height: 1; }
.portionen .einheit { font-size: 0.98rem; color: var(--tinte); margin-right: 4px; }
.portionen.geaendert { border-style: solid; border-color: var(--oliv); }
.portionen .wie-im-rezept { font: inherit; font-size: 0.84rem; background: none; border: 0; padding: 0 2px; color: var(--grau); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.portionen-notiz { margin: -12px 0 18px; font-family: var(--hand); font-size: 1.2rem; line-height: 1.25; color: var(--holz-text); }
.abhak-hinweis { margin: 0 0 22px; font-size: 0.86rem; color: var(--grau); }
.rezeptseite .knopf.bring, .selbstgemacht .knopf.bring { margin-top: 18px; min-height: 48px; box-sizing: border-box; }

/* --- Zutaten zum Abhaken: leerer Kreis, angetippt grün mit Haken --- */
.zutaten ul li[role="checkbox"] { cursor: pointer; transition: color 0.2s ease; -webkit-tap-highlight-color: transparent; }
.zutaten ul li[role="checkbox"]::before { background: transparent; -webkit-mask: none; mask: none; border: 1.5px solid color-mix(in srgb, var(--oliv) 70%, transparent); border-radius: 50%; width: 18px; height: 18px; box-sizing: border-box; top: 0.66em; transition: background 0.2s ease; }
.zutaten ul li[role="checkbox"]::after { content: ""; position: absolute; left: 5px; top: calc(0.66em + 4px); width: 10px; height: 10px; background: var(--papier); -webkit-mask: var(--i-haken) center / contain no-repeat; mask: var(--i-haken) center / contain no-repeat; opacity: 0; transition: opacity 0.2s ease; }
.zutaten ul li.abgehakt { color: var(--grau); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--holz) 70%, transparent); text-decoration-thickness: 1.5px; }
.zutaten ul li.abgehakt::before { background: var(--oliv); border-color: var(--oliv); }
.zutaten ul li.abgehakt::after { opacity: 1; }
.zutaten ul li[role="checkbox"]:focus-visible { outline: 2px solid var(--oliv); outline-offset: 2px; border-radius: 4px; }

/* --- Schritte wie im Kochbuch: zwei breite Spalten, dunklere und größere Schrift --- */
.rezeptseite ol.schrittkarten { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 34px); }
.rezeptseite .schrittkarten > li { padding: 12px 12px 22px; }
.rezeptseite .schrittkarten .rezeptbild img { aspect-ratio: 16 / 10; }
.rezeptseite .schrittkarten h3 { font-size: 1.55rem; margin: 6px 10px 0; }
.rezeptseite .schrittkarten p { font-size: 1.04rem; line-height: 1.65; color: var(--tinte); margin: 0 10px; }
.rezeptseite .schrittkarten .kniff { margin: 10px 10px 0; transform: rotate(-0.7deg); }
.rezeptseite .schrittkarten > li:nth-child(even) .kniff { transform: rotate(0.6deg); }
.rezeptseite .schrittkarten .kniff p { font-size: 0.98rem; margin: 0; }

/* --- „Damit koche ich“ als Küchenleiste: kleine Fotos am Haken, Name und Knopf --- */
.produkte.kuechenleiste { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; position: relative; padding-top: 22px; margin-top: 10px; }
.produkte.kuechenleiste::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; border-radius: 6px; background: linear-gradient(180deg, #c9c4bb, #a29c91); box-shadow: 0 3px 6px -3px rgba(40, 34, 27, 0.5); }
.kuechenleiste .produkt { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; position: relative; overflow: visible; }
.kuechenleiste .produkt::before { content: ""; position: absolute; top: -20px; left: 67px; width: 2px; height: 22px; background: #a29c91; }
.kuechenleiste .foto { position: relative; width: 112px; height: 112px; aspect-ratio: auto; margin: 0; border-radius: 10px; overflow: visible; background: none; }
.kuechenleiste .foto > img:not(.zuhause-marke) { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.kuechenleiste .foto .zuhause-marke { position: absolute; z-index: 2; left: -10px; top: -10px; width: 50px; height: auto; }
.kuechenleiste .inhalt { padding: 0; display: grid; gap: 10px; justify-items: start; }
.kuechenleiste .produkt :is(.inhalt > p, .grund, .rubrikname, .zumratgeber, .band, .neu) { display: none !important; }
.kuechenleiste .produkt h3 { font-size: 1.15rem; margin: 0; line-height: 1.2; }
.kuechenleiste .produkt .knopf { width: auto !important; height: 42px !important; min-height: 0 !important; font-size: 0.86rem !important; margin: 0 !important; }

/* --- Ende mit Appetit: drei Rezepte --- */
.noch-was { margin: 44px 0 10px; }
.noch-was .kopfzeile { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--linie); padding-bottom: 14px; }
.noch-was .kopfzeile .hand { font-size: 1.5rem; color: var(--holz-text); }
.noch-was .kopfzeile h2 { margin: 0; }
.noch-was .kopfzeile .knopf.leise { padding: 10px 20px; }
.rezeptseite ul.dazukacheln.drei, .selbstgemacht ul.dazukacheln.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; margin-top: 22px; }

/* --- Kacheln: gleich hoch, mit Zeit und Portionen --- */
ul.dazukacheln { align-items: stretch; }
ul.dazukacheln > li { display: flex; }
ul.dazukacheln > li[hidden], ul.dazukacheln[hidden], .karteikasten-reiter ~ [hidden] { display: none !important; }
ul.dazukacheln > li > a { flex: 1; align-content: start; }
.kachel-info { margin: 0 8px; display: flex; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--grau); }
.kachel-info::before { content: ""; width: 14px; height: 14px; flex: none; background: var(--holz); -webkit-mask: var(--i-uhr) center / contain no-repeat; mask: var(--i-uhr) center / contain no-repeat; }

/* --- Karteikasten mit Reitern auf der Übersicht --- */
.karteikasten-reiter { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0 6px; border-bottom: 2px solid color-mix(in srgb, var(--holz) 45%, transparent); }
.karteikasten-reiter button { font: inherit; font-size: 0.95rem; padding: 10px 18px 9px; margin-bottom: -2px; cursor: pointer; color: var(--grau);
  background: color-mix(in srgb, var(--sand) 70%, var(--papier)); border: 2px solid transparent; border-bottom: 0; border-radius: 14px 14px 0 0; transition: background 0.2s ease, color 0.2s ease; }
.karteikasten-reiter button:hover { color: var(--tinte); background: var(--sand); }
.karteikasten-reiter button.aktiv { background: var(--papier); color: var(--tinte); font-weight: 500; border-color: color-mix(in srgb, var(--holz) 45%, transparent); }
.karteikasten-reiter + ul.dazukacheln { margin-top: 26px; }

/* --- Kochmodus --- */
.km-offen, .km-offen body { overflow: hidden; }
.kochmodus { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; background: #fffdf6; color: var(--tinte); padding: max(14px, env(safe-area-inset-top)) clamp(16px, 5vw, 60px) max(14px, env(safe-area-inset-bottom)); }
.kochmodus[hidden] { display: none; }
.km-kopf { display: flex; align-items: center; gap: 12px; font-size: 0.92rem; color: var(--grau); }
.km-nr { font-family: var(--hand); font-size: 1.5rem; color: var(--holz-text); }
.km-wach { display: none; margin-left: auto; padding: 4px 12px; border-radius: 999px; background: rgba(97, 107, 72, 0.12); color: var(--oliv-tief); font-size: 0.82rem; }
.kochmodus.wach .km-wach { display: inline-block; }
.km-zu { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--linie); background: var(--papier); font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--tinte); }
.kochmodus.wach .km-zu { margin-left: 0; }
.km-balken { height: 4px; border-radius: 4px; background: var(--sand); margin: 10px 0 14px; overflow: hidden; }
.km-balken i { display: block; height: 100%; background: var(--oliv); transition: width 0.3s ease; }
.km-titel { font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.1; margin: 0 0 12px; }
.km-inhalt { overflow-y: auto; -webkit-overflow-scrolling: touch; max-width: 820px; width: 100%; }
.km-inhalt figure { margin: 0 0 16px; }
.km-inhalt img { width: 100%; max-height: 42vh; object-fit: cover; border-radius: 14px; display: block; }
.km-inhalt p { font-size: clamp(1.1rem, 2.6vw, 1.3rem); line-height: 1.6; margin: 0 0 14px; }
.km-inhalt .kniff { background: #fff8e8; border-radius: 6px; padding: 14px 16px; box-shadow: 0 10px 20px -16px rgba(40, 34, 27, 0.5); }
.km-inhalt .kniff .hand { font-size: 1.4rem; color: var(--holz-text); display: block; }
.km-inhalt .kniff p { font-size: 1.08rem; margin: 4px 0 0; }
.km-inhalt .zutaten { box-shadow: none; padding: 6px 0; background: none; }
.km-inhalt .zutaten ul { list-style: none; padding: 0; margin: 0; max-width: 640px; }
.km-inhalt .zutaten::before { display: none; }
.km-inhalt .zutaten li { font-size: 1.15rem; }
.km-fuss { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; padding-top: 14px; }
.km-fuss button { font: inherit; font-size: 1.1rem; font-weight: 500; min-height: 58px; border-radius: 999px; cursor: pointer; }
.km-zurueck { background: transparent; border: 1.5px solid var(--oliv); color: var(--oliv-tief); }
.km-zurueck:disabled { opacity: 0.35; cursor: default; }
.km-weiter { background: var(--oliv); border: 0; color: var(--papier); }

/* --- Handy --- */
@media (max-width: 860px) {
  .rezeptseite ul.dazukacheln.drei, .selbstgemacht ul.dazukacheln.drei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .klemmbrett { border-width: 9px; padding: 30px 14px 18px; margin-top: 30px; }
  .klemmbrett .klammer { width: 116px; margin-left: -58px; height: 40px; top: -30px; }
  .selbstgemacht .klemmbrett ul.eckdaten { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .klemmbrett .eckdaten li { padding: 12px 8px 12px 46px; font-size: 0.82rem; align-content: center; }
  .klemmbrett .eckdaten li::before { left: 8px; width: 30px; height: 30px; margin-top: -15px; }
  .klemmbrett .eckdaten li::after { left: 15px; width: 16px; height: 16px; margin-top: -8px; }
  .klemmbrett .eckdaten strong { font-size: 1.05rem; }
  .klemm-knoepfe { display: grid; grid-template-columns: 1fr 1fr; }
  .klemm-knoepfe > :first-child { grid-column: 1 / -1; justify-content: center; }
  .klemm-knoepfe > .teilen { order: 2; }
  .klemm-knoepfe > a[href$=".pdf"] { order: 3; grid-column: 1 / -1; }
  .klemm-knoepfe > .teilen-menue { order: 4; }
  .klemm-knoepfe .knopf { font-size: 0.88rem !important; padding-right: 10px !important; gap: 8px; }
  .teilen-menue { grid-column: 1 / -1; }
  .rezeptseite ol.schrittkarten { grid-template-columns: 1fr; }
  .rezeptseite .schrittkarten p { font-size: 1rem; }
  .produkte.kuechenleiste { grid-template-columns: 1fr; }
  .kuechenleiste .produkt { grid-template-columns: 88px minmax(0, 1fr); }
  .kuechenleiste .foto { width: 88px; height: 88px; }
  .kuechenleiste .produkt::before { left: 55px; }
  .portionen { border-radius: 18px; }
  /* Handy: Reiter nur seitlich wischen, nie hoch und runter schwimmen */
  .karteikasten-reiter { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none;
    padding: 3px 6px 0; border-bottom: 0; box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--holz) 45%, transparent); }
  .karteikasten-reiter::-webkit-scrollbar { display: none; }
  .karteikasten-reiter button { flex: none; margin-bottom: 0; padding: 9px 14px 8px; font-size: 0.9rem;
    box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--holz) 45%, transparent); }
  .karteikasten-reiter button.aktiv { box-shadow: none; }
  .km-fuss { grid-template-columns: 1fr 1.6fr; }
}
@media (prefers-reduced-motion: reduce) { .km-balken i, .zutaten ul li[role="checkbox"]::before { transition: none; } }
@media print {
  .klemm-knoepfe, .ohne-werbung, .portionen, .portionen-notiz, .abhak-hinweis, .knopf.bring, .noch-was, .kuechenleiste, .kochmodus { display: none !important; }
}
.rezeptinfo:has(.portionen) { gap: 14px; }
@media (max-width: 640px) {
  .rezeptseite ul.dazukacheln.alle, .selbstgemacht ul.dazukacheln.alle { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  ul.dazukacheln.alle strong { font-size: 1.05rem; }
  ul.dazukacheln.alle .hand { font-size: 1.05rem; }
  .kachel-info { font-size: 0.76rem; align-items: flex-start; }
  .kachel-info::before { margin-top: 2px; }
}
