/*
 * Ludwig — Konzept E: „Fragendrescher“
 * ------------------------------------------------------------------
 * Vereint das Beste aus A–D. Erbt B's warmes Papier/Tinte + Fraunces,
 * aber aufgeräumter und eine Spur moderner: hellere Fläche, ein
 * einziger warmer Akzent (Terrakotta/Rost), großzügiger Weißraum,
 * weiche moderne Rundungen statt Feuilleton-Haarlinien. Keine
 * Zeitungs-Metaphorik, keine funktionslose Deko.
 *
 * Dieses Blatt kleidet alle drei E-Seiten (Startseite, alle.html,
 * bilder.html) und die Präsentations-Bühne (.e-buehne) ein.
 * Baut auf shared/ludwig-core.css (Reset + --lm-*-Tokens) auf und
 * definiert hier eigene :root-Tokens.
 */

:root {
  /* --- Papier & Tinte (heller/klarer als B) --- */
  --paper:        #f7f3ea;   /* warme, aufgehellte Grundfläche */
  --paper-raised: #fffdf8;   /* Karten / erhöhte Flächen */
  --paper-sunk:   #efe8d9;   /* zart vertieft (Chips inaktiv) */

  --ink:        #211c14;     /* Tinte */
  --ink-soft:   #4f4739;     /* Sekundärtext (AA) */
  --ink-faint:  #776d5b;     /* Meta/klein (AA ~4.9:1) */

  --line:       #e6ddcb;     /* zarte Linie */
  --line-strong:#d3c8b1;     /* kräftigere Linie */

  /* --- Bleistift-Zierelemente (handgezeichnete Inline-SVG-Striche) --- */
  --graphite: #5b5142;
  /* leicht wackelige Graphit-Linie, in der Breite streckbar (Unterstreichungen/Kopf-Linie) */
  --pencil-line: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'><path d='M3,7 C40,3 70,10 100,6 130,3 165,9 197,5' fill='none' stroke='%235b5142' stroke-width='2' stroke-linecap='round' opacity='0.6'/></svg>");
  /* kurzer handgezeichneter Strich (Label-Tick) — Graphit */
  --pencil-tick: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 12'><path d='M2,8 C9,4 15,10 22,6 27,4 31,7 32,6' fill='none' stroke='%235b5142' stroke-width='2.6' stroke-linecap='round' opacity='0.85'/></svg>");
  /* handgezeichneter Haken (aktive Chips) — Graphit */
  --pencil-check: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><path d='M6,21 C9,25 13,30 17,35 C24,24 32,12 38,4' fill='none' stroke='%235b5142' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.9'/></svg>");
  /* handgezeichneter Pfeil „hier ziehen“ — Graphit */
  --pencil-arrow: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 80'><path d='M92,66 C70,74 40,66 16,40' fill='none' stroke='%235b5142' stroke-width='2.6' stroke-linecap='round'/><path d='M8,44 L14,26 L30,34' fill='none' stroke='%235b5142' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  /* leicht wackeliger, handgezeichneter Rahmen (Fragen-Karten) — Graphit */
  --pencil-frame: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 150' preserveAspectRatio='none'><path d='M9,11 C70,6 140,12 232,7 C236,45 229,95 234,143 C160,148 80,142 8,146 C12,100 5,52 9,11' fill='none' stroke='%235b5142' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' opacity='0.45'/></svg>");

  /* --- Der eine Akzent: warmer Rost/Terrakotta --- */
  --accent:        #bb4a2c;  /* großflächig/dekorativ (Drop-Cap, Punkte) */
  --accent-strong: #9a3a20;  /* Akzenttext auf Papier (AA ~5.4:1) */
  --accent-tint:   rgba(187, 74, 44, 0.10);
  --accent-tint-2: rgba(187, 74, 44, 0.16);

  /* --- Bühne (dunkel, warm) --- */
  --stage-bg:   #17130d;
  --stage-fg:   #f6f0e4;
  --stage-dim:  rgba(246, 240, 228, 0.76);  /* Sekundärtext auf der Bühne — genug Kontrast auch über hellen Bildern */
  --stage-line: rgba(246, 240, 228, 0.16);
  --stage-panel:#211a11;

  /* --- Schrift-Rollen --- */
  --serif:   var(--lm-font-serif);    /* Fraunces — Display, Fragen */
  --sans:    var(--lm-font-sans);     /* Inter — UI, Meta, Buttons */
  --grotesk: var(--lm-font-grotesk);  /* Space Grotesk — Labels, Zahlen */

  --wrap: 68rem;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 9px;

  --shadow-sm: 0 1px 2px rgba(33, 28, 20, 0.05);
  --shadow-md: 0 14px 34px -20px rgba(33, 28, 20, 0.32);
  --shadow-lg: 0 30px 70px -30px rgba(33, 28, 20, 0.45);
}

/* ---------- Grundfläche ---------- */

body {
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 80% at 100% -10%, rgba(187, 74, 44, 0.05), transparent 55%),
    radial-gradient(110% 70% at -10% 110%, rgba(120, 92, 40, 0.045), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.18vw, 1.06rem);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 5vw, 2.75rem);
}

/* ---------- Skip-Link ---------- */

.skip-link {
  position: absolute;
  left: var(--lm-space-3);
  top: -4rem;
  z-index: 1100;
  background: var(--ink);
  color: var(--paper);
  padding: var(--lm-space-2) var(--lm-space-4);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--lm-space-3); }

/* ---------- kleines Label (Space Grotesk, tracked) ---------- */

.eyebrow {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-strong);
  /* handgezeichnete Bleistift-Unterstreichung */
  padding-bottom: 0.5em;
  background: var(--pencil-line) no-repeat left bottom / 100% 0.5em;
}

/* =====================================================================
   Kompakter Kopf
   ===================================================================== */

.site-head {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: clamp(1rem, 2.5vw, 1.5rem);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: clamp(0.8rem, 2.5vw, 1.2rem);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}
.back-link:hover { color: var(--accent-strong); transform: translateX(-2px); }
.site-head__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem clamp(1rem, 3vw, 1.6rem);
}
.site-head__title {
  font-family: var(--serif);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--ink);
}
/* roter Marken-Punkt — konsequent in Überschriften und Fußzeile */
.site-head__dot { color: var(--accent); }
.site-head__purpose {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
  line-height: 1.35;
  color: var(--ink-soft);
  max-width: 34ch;
}

/* handgezeichnete Bleistift-Linie unter dem Kopf */
.site-head__rule {
  height: 11px;
  border: 0;
  margin-top: clamp(0.9rem, 2.5vw, 1.35rem);
  background: var(--pencil-line) no-repeat left center / 100% 11px;
}

/* =====================================================================
   Frage des Tages
   ===================================================================== */

/* =====================================================================
   Zwei gleichwertige Panels: Frage des Tages + Zieh eine Frage
   ===================================================================== */
.panels {
  margin-top: clamp(1.5rem, 4vw, 2.4rem);
  display: grid;
  gap: clamp(1.1rem, 3vw, 2rem);
  align-items: stretch;
}
@media (min-width: 48rem) {
  /* Frage des Tages breiter (2/3), Zieh-Panel schmaler (1/3), gleiche Höhe */
  .panels { grid-template-columns: 2fr 1fr; }
}
/* Frage-des-Tages-Panel bleibt schlicht (auf Papier) */
.panels .fdt { padding-top: 0; }

/* Zieh-Panel: abgesetzte Fläche, die zum Ziehen einlädt; füllt die Höhe */
.panel--draw {
  display: flex;
  flex-direction: column;
  padding: clamp(1.15rem, 3vw, 1.6rem);
  background: var(--paper-sunk);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
}
.panel--draw .eyebrow { margin-bottom: 0.85rem; }
/* die gezogene Frage füllt den Raum, der Button sitzt darunter */
.panel--draw .drawn {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  border-top: 0;
}
.panel--draw__foot {
  margin-top: var(--lm-space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
/* handgezeichneter „hier ziehen“-Pfeil (Graphit), neben dem Button */
.draw-arrow {
  flex: none;
  width: 2.7rem;
  height: 2.1rem;
  background: var(--pencil-arrow) no-repeat center / contain;
  pointer-events: none;
}

/* wackeliger Bleistift-Divider zwischen Panels und Themen */
.rule-pencil {
  height: 11px;
  border: 0;
  margin: clamp(1.6rem, 4vw, 2.6rem) 0 clamp(1.2rem, 3vw, 1.8rem);
  background: var(--pencil-line) no-repeat left center / 100% 11px;
}

/* Themen-Aktionen: Alle/Keine + Präsentation */
.tools__actions {
  margin-top: var(--lm-space-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
}

.fdt {
  padding-top: clamp(1.5rem, 4vw, 2.6rem);
}
.fdt__label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: clamp(0.7rem, 2vw, 1.05rem);
  /* statt Unterstreichung (von .eyebrow) hier ein handgezeichneter Tick davor */
  background: none;
  padding-bottom: 0;
}
.fdt__label::before {
  content: "";
  width: 2rem;
  height: 0.7rem;
  background: var(--pencil-tick) no-repeat center / contain;
}
.fdt__q {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.85rem, 1.15rem + 3.1vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: pretty;
  overflow-wrap: break-word;
}
/* Farbiges Initial — nur bei echten Fragen, nicht bei Zitaten. */
.fdt:not(.fdt--quote):not(.fdt--nocap) .fdt__q::first-letter {
  float: left;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.9em;
  line-height: 0.7;
  padding: 0.04em 0.11em 0 0;
  color: var(--accent);
}
.fdt--quote .fdt__q { font-style: italic; font-weight: 400; }
.fdt__meta {
  margin-top: clamp(0.9rem, 2.5vw, 1.35rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-faint);
}
.fdt__cat {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-soft);
}
.fdt__cat::before {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: var(--cat, var(--accent));
}
.fdt__cite { font-style: italic; color: var(--accent-strong); }

/* =====================================================================
   Werkzeugleiste: Themenfilter + Aktionen
   ===================================================================== */

.tools {
  margin-top: clamp(2rem, 5vw, 3.25rem);
  padding: clamp(1.15rem, 3vw, 1.7rem);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.tools__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: var(--lm-space-4);
}
.tools__count {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-faint);
}
.tools__count b {
  font-family: var(--grotesk);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
}

/* --- Chips --- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  --c: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 32px;
  padding: 0 0.72rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-faint);
  background: var(--paper-sunk);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background-color 0.16s ease, border-color 0.16s ease,
              color 0.16s ease, transform 0.16s ease;
}
.chip__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--c);
  flex: none;
  transition: box-shadow 0.16s ease;
}
.chip:hover { border-color: var(--c); transform: translateY(-1px); }
.chip[aria-pressed="true"] {
  color: var(--ink);
  background: var(--paper-raised);
  border-color: var(--c);
  box-shadow: inset 0 0 0 1px var(--c);
}
/* aktive Chips: der Punkt wird zum handgezeichneten Graphit-Haken */
.chip[aria-pressed="true"] .chip__dot {
  width: 0.9rem;
  height: 0.9rem;
  background: var(--pencil-check) no-repeat center / contain;
  box-shadow: none;
}

/* --- Alle/Keine als dezente Textknöpfe --- */
.chips__meta {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  margin-left: 0.25rem;
}
.linkbtn {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-faint);
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  background: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.linkbtn:hover:not(:disabled) { color: var(--accent-strong); background: var(--accent-tint); }
.linkbtn:disabled { opacity: 0.4; cursor: default; }

/* --- Aktionsknöpfe --- */
.actions {
  margin-top: var(--lm-space-5);
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0 1.4rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: transform 0.16s ease, background-color 0.16s ease,
              border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover:not(:disabled) { background: #000; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--primary:active { transform: translateY(0); }
.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--accent:hover:not(:disabled) { background: var(--accent-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--accent:active { transform: translateY(0); }

/* --- Gezogene Frage --- */
.drawn {
  margin-top: var(--lm-space-5);
  padding-top: var(--lm-space-5);
  border-top: 1px solid var(--line);
}
.drawn[hidden] { display: none; }
.drawn__q {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.7rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow-wrap: break-word;
}
@media (prefers-reduced-motion: no-preference) {
  .drawn.is-in .drawn__q {
    animation: e-rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
}
.drawn__meta {
  margin-top: var(--lm-space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--ink-faint);
}
.drawn__cat { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink-soft); }
.drawn__cat::before {
  content: ""; width: 0.56rem; height: 0.56rem; border-radius: 999px;
  background: var(--cat, var(--accent));
}
.drawn__cite { font-style: italic; color: var(--accent-strong); }

@keyframes e-rise {
  from { opacity: 0; transform: translateY(0.5rem); }
  to   { opacity: 1; transform: none; }
}

/* =====================================================================
   Fragen-Karten (Seite „Alle Fragen“) — bewusst OHNE Nummerierung
   ===================================================================== */

.q-section {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-bottom: clamp(2.5rem, 6vw, 3.5rem);
}
.q-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.85rem, 2vw, 1.15rem);
}
@media (min-width: 34rem) {
  .q-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 60rem) {
  .q-grid { grid-template-columns: repeat(3, 1fr); }
}
.q-grid[hidden] { display: none; }

.q-card {
  --c: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--lm-space-4);
  width: 100%;
  min-height: 10rem;
  padding: clamp(1.1rem, 3vw, 1.4rem) clamp(1.2rem, 3vw, 1.5rem);
  text-align: left;
  /* skizzenhafter, handgezeichneter Graphit-Rahmen statt glatter Linie */
  background: var(--pencil-frame) no-repeat left top / 100% 100%, var(--paper-raised);
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
/* schmale farbige Kante links, wie ein handschriftlicher Merkstrich */
.q-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--c);
  opacity: 0.5;
  transition: opacity 0.16s ease;
}
.q-card:hover,
.q-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--c) 40%, var(--line-strong));
}
.q-card:hover::before,
.q-card:focus-visible::before { opacity: 1; }
.q-card:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}

.q-card__text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.08rem, 0.98rem + 0.5vw, 1.28rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
.q-card--quote .q-card__text { font-style: italic; font-weight: 400; }

.q-card__cite {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--accent-strong);
}
.q-card__cite::before { content: "— "; }

.q-card__badges {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.q-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.6rem 0.22rem 0.5rem;
}
.q-card__badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--bc, var(--accent));
  flex: none;
}

.q-empty {
  padding: clamp(2rem, 6vw, 3rem) 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-faint);
}

/* =====================================================================
   Bildergalerie (Seite „Bilder“) — Kacheln mit echten <img>
   ===================================================================== */

.bild-section {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-bottom: clamp(2.5rem, 6vw, 3.5rem);
}

.bild-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.7rem, 2vw, 1.1rem);
}
@media (min-width: 30rem) {
  .bild-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 48rem) {
  .bild-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 68rem) {
  .bild-grid { grid-template-columns: repeat(5, 1fr); }
}

.bild-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.bild-card:hover,
.bild-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.bild-card:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}

.bild-card__frame {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--paper-sunk);
  overflow: hidden;
}
.bild-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.bild-card:hover .bild-card__img,
.bild-card:focus-visible .bild-card__img {
  transform: scale(1.035);
}
@media (prefers-reduced-motion: reduce) {
  .bild-card__img { transition: none; }
}

.bild-card__cap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem 0.8rem;
}
.bild-card__titel {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: break-word;
}
.bild-card__urheber {
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--ink-faint);
  overflow-wrap: break-word;
}

/* =====================================================================
   Weitere Wege (Verweise)
   ===================================================================== */

.more {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}
.morelink {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.3rem) clamp(1.15rem, 3vw, 1.5rem);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.morelink:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.morelink__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  letter-spacing: -0.01em;
}
.morelink__hint {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.morelink__arrow {
  font-family: var(--grotesk);
  color: var(--accent-strong);
  transition: transform 0.16s ease;
}
.morelink:hover .morelink__arrow { transform: translateX(3px); }

@media (min-width: 40rem) {
  .more { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   Fuß
   ===================================================================== */

.site-foot {
  margin-top: clamp(3rem, 8vw, 4.5rem);
  padding-block: clamp(1.5rem, 4vw, 2.25rem) clamp(2.5rem, 6vw, 3.5rem);
  border-top: 1px solid var(--line);
}
.site-foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--lm-space-4);
}
.site-foot__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}
.site-foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.9rem, 3vw, 1.6rem);
}
.site-foot__nav a {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-block: 0.15rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-foot__nav a:hover { color: var(--accent-strong); border-color: var(--line-strong); }

/* =====================================================================
   Präsentations-Bühne (.e-buehne) — konzept-lokal
   Echo von .lm-present, aber E's warmer Charakter + In-Bühne-Kategoriemenü.
   ===================================================================== */

.e-buehne {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  background-color: var(--stage-bg);
  background-image:
    radial-gradient(120% 90% at 50% -10%, rgba(187, 74, 44, 0.16), transparent 60%),
    radial-gradient(90% 70% at 50% 120%, rgba(120, 92, 40, 0.10), transparent 60%);
  color: var(--stage-fg);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  /* Nur opacity animieren; visibility schaltet sofort, damit die Bühne
     beim Öffnen sofort sichtbar/fokussierbar ist (auch im Hintergrund-Tab). */
  transition: opacity 0.3s ease;
}
.e-buehne.is-active { opacity: 1; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  .e-buehne { transition: none; }
}

/* Frage groß */
.e-buehne__text {
  margin: 0;
  max-width: 18ch;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 1rem + 5vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
@media (prefers-reduced-motion: no-preference) {
  .e-buehne__text.is-swap { animation: e-fade 0.34s ease; }
}
@keyframes e-fade {
  from { opacity: 0; transform: translateY(0.4rem); }
  to   { opacity: 1; transform: none; }
}

/* „Federstrich“: Bleistiftstrich, der sich bei jeder neuen Frage
   von links nach rechts unter die Frage zeichnet (heller Graphit). */
.e-buehne__stroke {
  width: min(20rem, 46vw);
  height: 12px;
  margin-top: clamp(1.1rem, 3vw, 1.9rem);
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'><path d='M3,7 C40,3 70,10 100,6 130,3 165,9 197,5' fill='none' stroke='%23c8bca0' stroke-width='2.2' stroke-linecap='round' opacity='0.75'/></svg>") no-repeat center / 100% 12px;
}
@media (prefers-reduced-motion: no-preference) {
  .e-buehne__stroke { transform: scaleX(0); transform-origin: left center; opacity: 0; }
  .e-buehne__stroke.is-draw { animation: e-stroke 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
}
@keyframes e-stroke {
  0%   { transform: scaleX(0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: scaleX(1); opacity: 1; }
}

/* dezenter Hinweis */
.e-buehne__hint {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(1rem, 3vw, 1.75rem);
  font-family: var(--grotesk);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stage-dim);
}
.e-buehne__hint kbd {
  font-family: inherit;
  color: var(--stage-fg);
}

/* obere Leiste: Menü-Umschalter (links) + Schließen (rechts) */
.e-buehne__bar {
  position: absolute;
  top: clamp(1rem, 3vw, 1.5rem);
  left: clamp(1rem, 3vw, 1.5rem);
  right: clamp(1rem, 3vw, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.e-stagebtn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.95rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--stage-fg);
  background: rgba(246, 240, 228, 0.08);
  border: 1px solid var(--stage-line);
  border-radius: 999px;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}
.e-stagebtn:hover { background: rgba(246, 240, 228, 0.16); border-color: rgba(246, 240, 228, 0.34); }
.e-stagebtn--icon { padding: 0; width: 2.75rem; justify-content: center; font-size: 1.05rem; }

/* untere Navigation (Maus): vor/zurück */
.e-buehne__nav {
  position: absolute;
  right: clamp(1rem, 3vw, 1.5rem);
  bottom: clamp(3rem, 8vw, 4.5rem);
  display: flex;
  gap: 0.6rem;
}
.e-buehne__nav button {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--stage-fg);
  background: rgba(246, 240, 228, 0.08);
  border: 1px solid var(--stage-line);
  border-radius: 999px;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}
.e-buehne__nav button:hover { background: rgba(246, 240, 228, 0.16); border-color: rgba(246, 240, 228, 0.34); }

.e-buehne :focus-visible {
  outline: 3px solid var(--stage-fg);
  outline-offset: 2px;
}

/* --- In-Bühne-Kategoriemenü (animiertes Panel) --- */
.e-menu {
  position: absolute;
  top: calc(clamp(1rem, 3vw, 1.5rem) + 3.25rem);
  left: clamp(1rem, 3vw, 1.5rem);
  width: min(20rem, calc(100vw - 2rem));
  max-height: min(70vh, 34rem);
  overflow-y: auto;
  padding: 1rem 1.1rem 1.2rem;
  text-align: left;
  background: var(--stage-panel);
  border: 1px solid var(--stage-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  /* geschlossen */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  /* visibility ohne Verzögerung erst nach dem Ausblenden auf hidden schalten;
     beim Öffnen dagegen sofort auf visible — so erscheint das Panel auch in
     verborgenen/Hintergrund-Tabs zuverlässig. */
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0s linear 0.24s;
}
.e-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0s linear 0s;
}
@media (prefers-reduced-motion: reduce) {
  .e-menu { transition: none; }
}
.e-menu__title {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stage-dim);
  margin-bottom: 0.75rem;
}
.e-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}
.e-menu__opt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--stage-fg);
  cursor: pointer;
}
.e-menu__opt:hover { background: rgba(246, 240, 228, 0.07); }
.e-menu__opt input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
  flex: none;
}
.e-menu__swatch {
  width: 0.66rem;
  height: 0.66rem;
  border-radius: 999px;
  background: var(--c, var(--accent));
  flex: none;
}
.e-menu__foot {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--stage-line);
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--stage-dim);
}
.e-menu__foot b {
  font-family: var(--grotesk);
  font-weight: 500;
  color: var(--stage-fg);
}

/* --- Bühne mit Bild-Hintergrund (.e-buehne--bild), z. B. Seite „Bilder“ ---
   Das Bild liegt hinter allem; ein strukturelles, undurchsichtiges
   Abdunklungslayer (Scrim) sitzt darüber, damit der helle Fragetext auf
   JEDEM Bild (dunkel bis hell) AA-Kontrast behält — unabhängig von den
   Bildpixeln selbst. Andere Bühnen-Kinder liegen (als Flex-Kinder oder
   positionierte Elemente) automatisch über dem Backdrop. */
.e-buehne__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.e-buehne__backdrop-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.e-buehne__scrim {
  position: absolute;
  inset: 0;
  /* Feste Mindestdeckkraft (0.80) überall — bewiesen AA-sicher selbst
     gegen ein rein weißes Bildpixel; zu den Rändern hin noch dunkler. */
  background:
    radial-gradient(130% 100% at 50% 42%, transparent 0%, rgba(23, 19, 13, 0.18) 70%, rgba(23, 19, 13, 0.3) 100%),
    rgba(23, 19, 13, 0.8);
}
.e-buehne__text,
.e-buehne__credit {
  position: relative;
  z-index: 1;
}
.e-buehne__credit {
  position: absolute;
  left: clamp(1rem, 3vw, 1.5rem);
  bottom: clamp(3rem, 8vw, 4.5rem);
  max-width: 22ch;
  margin: 0;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--stage-dim);
}

/* =====================================================================
   Einblendung beim Laden (gestaffelt)
   ===================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(0.7rem);
    animation: e-reveal 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .reveal[data-d="1"] { animation-delay: 0.04s; }
  .reveal[data-d="2"] { animation-delay: 0.12s; }
  .reveal[data-d="3"] { animation-delay: 0.22s; }
  .reveal[data-d="4"] { animation-delay: 0.32s; }
  @keyframes e-reveal { to { opacity: 1; transform: none; } }
}
