/* Flat / Single-Accent Redesign — siehe METHODE.md fuer die Herkunft des Style-Guides.
   Abgeloest: Neo-Brutalismus (2px Rahmen + harte Versatz-Schatten, Pink/Gold/Crimson).
   Jetzt: randlos, weiche Schatten statt Rahmen, ein Gruenton als alleiniger Akzent,
   ein einziger Font (Montserrat) fuer Ueberschriften und Fliesstext. */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f7f5f0;             /* Canvas Warm */
  --surface: #ffffff;        /* Pure White -- Karten, Panels */
  --surface-muted: #eae6df;  /* gedeckte Flaeche fuer Chips/Platzhalter/Tinted-Cards */
  --ink: #1a1a1a;             /* Ueberschriften, starker Text */
  --text: #1a1a1a;            /* Fliesstext */
  --muted: #666666;

  --accent: #16a34a;          /* alleiniger Marken-/Interaktionsakzent (Buttons, Links, Gemerkt) */
  --accent-hover: #15803d;
  --accent-soft: #dcfce7;     /* helles Gruen fuer Badge-/Chip-Hintergruende */
  --danger: #cf322f;          /* nur fuer destruktive Aktion (Merkliste entfernen) */

  /* Zusaetzliche Hervorhebungsfarben (Nutzervorgabe) -- bewusst NICHT fuer Gemerkt-Button
     oder Thema-/Filter-Badges verwendet (die bleiben gruen bzw. unveraendert), sondern
     gezielt fuer Zusatzmaterial-Typen (siehe .material-{typ} unten), Auszeichnungen und
     den Video-Player, um dem randlosen Look etwas mehr Farbvielfalt zu geben. */
  --highlight-navy: #020a58;
  --highlight-orange: #f26113;
  --highlight-gold: #ffc61b;
  --highlight-purple: #7209b7;
  --highlight-cyan: #00c9ff;

  /* Emotionen-Farbpalette: eine feste Farbe je Wert aus tags.json (Dimension
     "emotionen" -- Nachfolger der fruehreren, viel breiteren Dimension "thema" seit
     der facettierten Klassifikation, siehe METHODE.md), verwendet sowohl fuer den
     Karten-Sticker als auch fuer die klickbaren Filter-Badges auf der Startseite --
     siehe .sticker-emotionen-* und .filter-badge-emotionen-* weiter unten. Die
     anderen fuenf Facetten (Situationen, Entwicklungsaufgaben, Konflikte,
     Loesungsstrategien, Diagnose) bekommen bewusst keine eigene Farbe je Wert --
     Situationen nutzt den neutralen Badge-Stil, die anderen vier sind ohnehin nicht
     oeffentlich sichtbar (sichtbar: false in tags.json). */
  /* Sieben Grundfarben-Familien (Navy/Rot/Orange/Gold/Gruen/Lila/Cyan, siehe die
     sieben Nutzer-Hervorhebungsfarben oben), je Emotion ein individueller Farbton
     aus der passenden Familie. */
  --c-trauer: #29528e;          /* navy */
  --c-einsamkeit: #1d3a66;      /* navy */
  --c-heimweh: #4169b0;         /* navy */
  --c-angst: #e23670;           /* rot */
  --c-trennungsangst: #d1487e;  /* rot */
  --c-scham: #b23a5a;           /* rot */
  --c-schuldgefuehle: #8f2f4a;  /* rot */
  --c-wut: #ca2216;             /* orange */
  --c-mut: #ec4613;             /* orange */
  --c-ueberforderung: #d9772e;  /* orange */
  --c-enttaeuschung: #e1a52d;   /* gold */
  --c-eifersucht: #c98a1f;      /* gold */
  --c-selbstwert: #558d35;      /* gruen */
  --c-empathie: #3dae6c;        /* gruen */
  --c-neid: #2f7d4f;            /* gruen */
  --c-schuechternheit: #6b3fa0; /* lila */
  --c-unsicherheit: #8c28bd;    /* lila */
  --c-sorge: #2e959e;           /* cyan */

  /* Ruhige, einheitliche Badge-Farbe fuer Zielgruppe/Altersgruppe/Therapieverfahren
     und Verfuegbarkeit -- diese Tags erscheinen nie als Karten-Sticker, deshalb keine
     eigene Farbe je Wert (anders als bei "thema"), bewusst neutral grau/schwarz statt
     im Seitenakzent, damit sie sich klar von den farbigen Thema-Badges abheben. */
  --c-neutral-badge: var(--ink);

  --radius: 12px;      /* Karten, groessere Panels */
  --radius-sm: 8px;    /* Inputs, sekundaere Buttons, kleine Boxen */
  --radius-btn: 4px;   /* primaere Call-to-Action-Buttons */
  --wrap: 1100px;
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-text: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-soft: 0 1px 2px rgba(26, 26, 26, 0.05), 0 6px 16px rgba(26, 26, 26, 0.08);
  --shadow-soft-hover: 0 2px 4px rgba(26, 26, 26, 0.06), 0 14px 28px rgba(26, 26, 26, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-text);
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); letter-spacing: -0.01em; line-height: 1.08; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--surface-muted);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  flex-wrap: wrap;
}
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.brand-sub { font-family: var(--font-text); font-size: 0.85rem; color: var(--muted); }
.site-nav a {
  margin-left: 1.25rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.merkliste-link { position: relative; }
.merkliste-badge {
  display: inline-block;
  min-width: 1.3rem;
  padding: 0 0.3rem;
  margin-left: 0.2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.2rem;
}

/* Intro */
.intro { padding: 2.2rem 0 1.2rem; }
.intro h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.lead { color: var(--text); max-width: 62ch; font-size: 1.02rem; }

/* Situationssuche ("Wonach suchen Sie?") -- Freitext-Einstieg oberhalb des Tag-Filters,
   nutzt intern dieselben Checkboxen/dieselbe anwenden()-Logik wie der Filter selbst. */
.situationssuche {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.situationssuche h2 { margin: 0 0 0.35rem; font-size: 1.3rem; }
.situationssuche-hinweis { margin: 0 0 0.9rem; color: var(--muted); font-size: 0.92rem; }
.situationssuche-eingabe { display: flex; gap: 0.75rem; align-items: flex-start; flex-wrap: wrap; }
.situationssuche-eingabe textarea {
  flex: 1 1 320px;
  min-width: 240px;
  resize: vertical;
  font-family: var(--font-text);
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text);
}
.situationssuche-eingabe textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.situation-chat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.chat-nachricht {
  max-width: 80%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: pre-wrap;
}
.chat-nutzer {
  align-self: flex-end;
  background: var(--ink);
  color: var(--surface);
}
.chat-assistent {
  align-self: flex-start;
  background: var(--surface-muted);
  color: var(--text);
}
.chat-lade {
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 600;
}

/* Katalog layout */
.katalog {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
}

/* Filter */
.filter {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  align-self: start;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.filter-suche { margin-bottom: 1rem; }
.filter-suche label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.filter-suche input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--surface-muted);
}
.filter-suche input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Filtergruppen sind <details>-Elemente: einklappbar ohne eigenes JS (der Browser
   verwaltet das [open]-Attribut), damit die Filteransicht bei vielen Kategorien
   uebersichtlich bleibt. Start-Zustand ist zugeklappt; filter.js oeffnet eine Gruppe
   automatisch, wenn sie ueber einen URL-Hash-Link (#emotionen=angst) vorausgewaehlt wird. */
.filter-gruppe { border: none; margin: 0 0 0.9rem; padding: 0; }
.filter-gruppe summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.2rem 0;
  margin-bottom: 0.5rem;
  cursor: pointer;
  list-style: none;
}
.filter-gruppe summary::-webkit-details-marker { display: none; }
.filter-gruppe summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}
.filter-gruppe[open] summary::after { content: "\2212"; }
.filter-gruppe:not(:last-of-type) { border-bottom: 1px solid var(--surface-muted); padding-bottom: 0.9rem; }

/* Klickbare Filter-Badges (ersetzen die normale Checkbox-Liste in allen Filtergruppen).
   Bei "Emotionen" entspricht die Farbe je Wert der .sticker-emotionen-*-Klasse auf den
   Buchkarten, damit Filter und Vorschau optisch zusammengehören (siehe
   .filter-badge-emotionen-* unten); alle anderen Dimensionen (inkl. "Situationen") nutzen
   die einheitliche .filter-badge-neutral-Farbe, da sie nie als Karten-Sticker erscheinen.
   Unchecked-Zustand mischt die Farbe leicht in die Flaeche (color-mix) statt sie ueber
   einen Rahmen zu zeigen -- randlos, aber weiterhin pro Emotion unterscheidbar. Checkbox
   bleibt technisch vorhanden (nur visuell versteckt, nicht display:none) für
   Tastaturbedienung/Screenreader; filter.js braucht dafür keine Änderung, da es weiter
   auf das <input> reagiert. */
.filter-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-badge { position: relative; cursor: pointer; }
.filter-badge input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.filter-badge span {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--badge-farbe, var(--ink));
  border: 1.5px solid var(--badge-farbe, var(--ink));
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.12s;
}
.filter-badge:hover span { transform: translateY(-1px); }
.filter-badge input:checked + span {
  background: var(--badge-farbe, var(--ink));
  color: #fff;
  border-color: var(--badge-farbe, var(--ink));
}
.filter-badge input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.filter-badge-emotionen-angst { --badge-farbe: var(--c-angst); }
.filter-badge-emotionen-trennungsangst { --badge-farbe: var(--c-trennungsangst); }
.filter-badge-emotionen-scham { --badge-farbe: var(--c-scham); }
.filter-badge-emotionen-schuldgefuehle { --badge-farbe: var(--c-schuldgefuehle); }
.filter-badge-emotionen-wut { --badge-farbe: var(--c-wut); }
.filter-badge-emotionen-mut { --badge-farbe: var(--c-mut); }
.filter-badge-emotionen-ueberforderung { --badge-farbe: var(--c-ueberforderung); }
.filter-badge-emotionen-enttaeuschung { --badge-farbe: var(--c-enttaeuschung); }
.filter-badge-emotionen-eifersucht { --badge-farbe: var(--c-eifersucht); }
.filter-badge-emotionen-selbstwert { --badge-farbe: var(--c-selbstwert); }
.filter-badge-emotionen-empathie { --badge-farbe: var(--c-empathie); }
.filter-badge-emotionen-neid { --badge-farbe: var(--c-neid); }
.filter-badge-emotionen-trauer { --badge-farbe: var(--c-trauer); }
.filter-badge-emotionen-einsamkeit { --badge-farbe: var(--c-einsamkeit); }
.filter-badge-emotionen-heimweh { --badge-farbe: var(--c-heimweh); }
.filter-badge-emotionen-schuechternheit { --badge-farbe: var(--c-schuechternheit); }
.filter-badge-emotionen-unsicherheit { --badge-farbe: var(--c-unsicherheit); }
.filter-badge-emotionen-sorge { --badge-farbe: var(--c-sorge); }
.filter-badge-emotionen-enttaeuschung input:checked + span,
.filter-badge-emotionen-eifersucht input:checked + span { color: var(--ink); }

/* Einheitliche, ruhige Badges fuer Zielgruppe/Situationen/Altersgruppe/Therapieverfahren --
   gleicher Klick-/Umschalt-Mechanismus wie .filter-badge-emotionen-*, aber alle in
   derselben Akzentfarbe statt je Wert eine eigene Farbe. */
.filter-badge-neutral { --badge-farbe: var(--c-neutral-badge); }
.btn-reset {
  width: 100%;
  padding: 0.55rem;
  border: none;
  background: var(--surface-muted);
  color: var(--ink);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.82rem;
  transition: background 0.12s, color 0.12s;
}
.btn-reset:hover { background: var(--accent-soft); color: var(--accent-hover); }

/* Ergebnisse */
.ergebnis-zahl { color: var(--text); margin: 0 0 1.25rem; font-size: 1.5rem; font-weight: 700; }
.buch-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.4rem;
}
.buch-karte {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: visible;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}
.buch-karte:hover { box-shadow: var(--shadow-soft-hover); transform: translateY(-2px); }
.buch-karte a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* füllt überschüssige Höhe, damit Preis+Merkliste-Button in jeder Karte
                   einer Reihe auf gleicher Höhe ganz unten landen, unabhängig davon wie
                   viele Zeilen Titel/Tags in dieser Karte einnehmen */
}
.karte-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--surface-muted);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  overflow: hidden;
}
.karte-cover img { width: 100%; height: 100%; object-fit: contain; }
.karte-body { padding: 0.8rem 0.85rem 0.4rem; }
.karte-titel { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin: 0 0 0.25rem; display: block; }
.karte-autor { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.5rem; display: block; }
.karte-grund { color: var(--muted); font-size: 0.78rem; font-style: italic; margin: 0 0 0.5rem; display: block; }
.karte-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.karte-tag {
  font-size: 0.7rem;
  background: var(--surface-muted);
  color: var(--ink);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

/* Preisschild (Buchpreisbindung macht den Preis stabil, siehe METHODE.md) */
.preis-schild {
  display: inline-block;
  margin: 0 0.85rem 0.7rem;
  background: var(--surface-muted);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
}
.preis-schild-gross { margin: 0.9rem 0 0; font-size: 1.1rem; padding: 0.3rem 0.8rem; }
.mk-kauf-gruppe h3 .preis-schild { margin: 0 0 0 0.5rem; font-size: 0.78rem; vertical-align: middle; }
.mk-kauf-liste li span { color: var(--muted); font-size: 0.85rem; }

/* Sticker-Badge (erstes/wichtigstes Tag einer Karte) -- flache Themenfarb-Pille,
   keine Rotation/Schatten mehr (war Teil des fruoeheren Scrapbook-Looks). */
.sticker {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Je Thema-Wert eine feste Sticker-Farbe (siehe --c-* Variablen oben). Fallback
   für Karten ohne Thema-Tag (z.B. reine Fachbücher) bleibt der Standard-Akzent von
   .sticker. Textfarbe je nach Helligkeit der Hintergrundfarbe: helle Töne (Sucht,
   Selbstwert) bekommen dunklen statt weißen Text für ausreichenden Kontrast. */
.sticker-emotionen-angst { background: var(--c-angst); }
.sticker-emotionen-trennungsangst { background: var(--c-trennungsangst); }
.sticker-emotionen-scham { background: var(--c-scham); }
.sticker-emotionen-schuldgefuehle { background: var(--c-schuldgefuehle); }
.sticker-emotionen-wut { background: var(--c-wut); }
.sticker-emotionen-mut { background: var(--c-mut); }
.sticker-emotionen-ueberforderung { background: var(--c-ueberforderung); }
.sticker-emotionen-enttaeuschung { background: var(--c-enttaeuschung); color: var(--ink); }
.sticker-emotionen-eifersucht { background: var(--c-eifersucht); color: var(--ink); }
.sticker-emotionen-selbstwert { background: var(--c-selbstwert); }
.sticker-emotionen-empathie { background: var(--c-empathie); }
.sticker-emotionen-neid { background: var(--c-neid); }
.sticker-emotionen-trauer { background: var(--c-trauer); }
.sticker-emotionen-einsamkeit { background: var(--c-einsamkeit); }
.sticker-emotionen-heimweh { background: var(--c-heimweh); }
.sticker-emotionen-schuechternheit { background: var(--c-schuechternheit); }
.sticker-emotionen-unsicherheit { background: var(--c-unsicherheit); }
.sticker-emotionen-sorge { background: var(--c-sorge); }

.badge-vergriffen {
  display: inline-block;
  background: var(--surface-muted);
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}
.badge-vergriffen-karte {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.mehr-laden-zeile { text-align: center; margin: 2.2rem 0 0; }
.btn-mehr {
  padding: 0.7rem 1.6rem;
  border: none;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-radius: var(--radius-btn);
  cursor: pointer;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: background 0.12s, color 0.12s;
}
.btn-mehr:hover { background: var(--accent); color: #fff; }
.keine-treffer { color: var(--muted); padding: 2rem 0; }

.btn-merken {
  display: block;
  width: calc(100% - 1.7rem);
  margin: 0.6rem 0.85rem 0.85rem;
  padding: 0.4rem 0.6rem;
  border: none;
  background: var(--surface-muted);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.btn-merken:hover { background: var(--accent-soft); color: var(--accent-hover); }
.btn-merken.ist-gemerkt { background: var(--accent); color: #fff; }
.btn-merken-gross { width: auto; margin: 0; padding: 0.6rem 1.2rem; font-size: 0.85rem; }

/* Buch-Detail */
.zurueck {
  display: inline-block;
  margin: 1.5rem 0 1rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
}
.buch-kopf { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; }
.buch-cover {
  position: relative;
  background: var(--surface-muted);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.buch-cover img {
  width: 100%;
  display: block;
}
.cover-platzhalter {
  aspect-ratio: 3 / 4;
  background: var(--surface-muted);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.buch-meta h1 { margin: 0 0 0.3rem; font-size: 1.9rem; font-weight: 800; text-transform: uppercase; }
.untertitel { color: var(--text); font-size: 1.05rem; margin: 0 0 0.75rem; font-family: var(--font-text); }
.autor { font-weight: 600; margin: 0 0 0.25rem; }
.altersangabe {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.mitwirkende { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.25rem; }
.verlag { color: var(--muted); font-size: 0.9rem; }
.isbn { font-variant-numeric: tabular-nums; }

.auszeichnungen { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.auszeichnung {
  background: var(--highlight-gold);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.kauf { margin-top: 1.5rem; }
.kauf-titel {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}
.kauf-ausgabe { margin-bottom: 0.9rem; }
.kauf-ausgabe-kopf { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.ausgabe-format {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--muted);
}
.kauf-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.btn-kauf {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.btn-kauf:hover { background: var(--accent-hover); }
.btn-kauf-disabled,
.btn-kauf-disabled:hover {
  background: var(--surface-muted);
  color: var(--muted);
  cursor: not-allowed;
}
.kauf-ausgabe-vergriffen { opacity: 0.85; }
.kauf-hinweis { font-size: 0.8rem; color: var(--muted); margin: 0.6rem 0 0; }
.verwandte-buecher { font-size: 0.9rem; color: var(--muted); margin: 0.8rem 0 0; }
.verwandte-buecher a { color: var(--accent); font-weight: 600; }

.buch-abschnitt { margin-top: 2.2rem; }
.buch-abschnitt h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  font-weight: 700;
  border-bottom: 1px solid var(--surface-muted);
  padding-bottom: 0.5rem;
}

.biblio-liste {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1rem;
  row-gap: 0.5rem;
  margin: 0;
}
.biblio-liste dt {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.biblio-liste dd { margin: 0; }
.biblio-liste .auszeichnungen { margin-top: 0; }

.tag-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-chip {
  background: var(--surface-muted);
  color: var(--ink);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.12s, color 0.12s;
}
.tag-chip:hover { background: var(--accent-soft); color: var(--accent-hover); }
/* Schlagworte aus intern gefuehrten Facetten (sichtbar: false in tags.json, z.B.
   "Situationen") haben keine Filter-Gruppe zum Verlinken -- als reiner Text statt als
   Link, damit nicht faelschlich Klickbarkeit suggeriert wird. */
.tag-chip-statisch { color: var(--muted); cursor: default; }
.tag-chip-statisch:hover { background: var(--surface-muted); color: var(--muted); }

.rezension {
  margin: 0 0 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);
}
.rezension p { margin: 0 0 0.4rem; }
.rezension cite { font-size: 0.85rem; color: var(--muted); font-style: normal; }
.rezension .zitat { font-style: italic; }

.material-liste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.material {
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);
}
.material-kopf { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.material-kopf a { font-weight: 700; }
.material-beschreibung { margin: 0.4rem 0 0; color: var(--text); font-size: 0.9rem; }
.material-typ {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: color-mix(in srgb, var(--typ-farbe, var(--muted)) 15%, var(--surface));
  color: var(--typ-farbe, var(--ink));
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}
/* Je Zusatzmaterial-Typ eine eigene Hervorhebungsfarbe (siehe .material-{typ}-Klasse,
   von templates/buch.html aus buch.zusatzmaterial[].typ generiert). */
.material-leseprobe { --typ-farbe: var(--highlight-cyan); }
.material-arbeitsblatt { --typ-farbe: var(--highlight-orange); }
.material-video { --typ-farbe: var(--highlight-purple); }
.material-podcast { --typ-farbe: var(--highlight-navy); }
.material-unterrichtsmaterial { --typ-farbe: var(--highlight-gold); }

/* Video-Vorschau + Lightbox */
.video-thumb {
  display: block;
  position: relative;
  margin-top: 0.7rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  max-width: 320px;
  background: var(--ink);
}
.video-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.85; }
.video-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  background: var(--highlight-purple);
  border-radius: 50%;
}
.video-play::before {
  content: "";
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
.video-lightbox {
  position: fixed; inset: 0;
  background: rgba(26, 26, 26, 0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 5vh 5vw;
  z-index: 100;
}
.video-lightbox-inner {
  position: relative;
  width: min(900px, 90vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.video-lightbox-inner iframe { width: 100%; height: 100%; border: 0; }
.video-lightbox-close {
  position: absolute;
  top: -14px; right: -14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--highlight-purple);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

/* Merkliste */
.mk-kopf .lead { max-width: 70ch; }
.mk-liste { list-style: none; margin: 1.5rem 0; padding: 0; }
.mk-zeile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--surface-muted);
}
.mk-cover {
  flex: none;
  width: 48px;
  height: 64px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mk-cover img { width: 100%; height: 100%; object-fit: contain; }
.mk-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mk-titel { font-family: var(--font-display); font-weight: 700; text-decoration: none; color: inherit; }
.mk-autor { color: var(--muted); font-size: 0.85rem; }
.mk-zeile .preis-schild { flex: none; margin: 0; }
.mk-zeile .badge-vergriffen { flex: none; }
.mk-entfernen {
  flex: none;
  border: none;
  background: transparent;
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.mk-entfernen:hover { background: var(--danger); color: #fff; }

.mk-kauf-gruppe {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.2rem;
}
.mk-kauf-gruppe h3 { margin: 0 0 0.6rem; font-size: 1.05rem; text-transform: uppercase; }
.mk-kauf-liste { margin: 0 0 0.8rem; padding-left: 1.2rem; }
.mk-kauf-liste li { margin-bottom: 0.2rem; }
.btn-alle-oeffnen {
  padding: 0.65rem 1.3rem;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-btn);
  cursor: pointer;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.82rem;
  transition: background 0.15s;
}
.btn-alle-oeffnen:hover { background: var(--accent-hover); }
.mk-kauf-hinweis { font-size: 0.8rem; color: var(--muted); margin: 0.6rem 0 0; }

/* Mobile Sticky-Buy-Bar */
.sticky-kauf {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--surface);
  border-top: 1px solid var(--surface-muted);
  box-shadow: 0 -2px 12px rgba(26, 26, 26, 0.08);
  padding: 0.7rem 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.sticky-kauf-info { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.sticky-kauf-titel {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sticky-kauf .preis-schild { flex: none; margin: 0; font-size: 0.78rem; padding: 0.1rem 0.5rem; }
.sticky-kauf .btn-kauf { flex: none; padding: 0.55rem 1rem; font-size: 0.8rem; }

/* Statische Seiten */
.statische-seite { max-width: 70ch; padding: 1.5rem 0 3rem; }
.statische-seite h1 { font-size: 1.7rem; text-transform: uppercase; }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--surface-muted);
  margin-top: 2rem;
  padding: 1.5rem 0;
}
.affiliate-hinweis { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.75rem; }
.footer-nav a { margin-right: 1.25rem; font-size: 0.85rem; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 800px) {
  .katalog { grid-template-columns: 1fr; }
  .filter { position: static; max-height: none; }
  .buch-kopf { grid-template-columns: 1fr; }
  .buch-cover { max-width: 220px; }
}
@media (max-width: 700px) {
  .sticky-kauf { display: flex; }
  .buch-detail .kauf { padding-bottom: 4.5rem; }
}
