/* ============================================================
   GESTALTUNG – „Was für ein Fest!“
   Ruhiger Editorial-Look (angelehnt an alongdustyroads.com):
   warmes Beige, Terrakotta-Akzente, Playfair Display + DM Sans.
   Anpassungen am einfachsten über die Variablen hier oben.
   ============================================================ */

:root {
  --bone: #edeae0;          /* Seitenhintergrund */
  --bone-hell: #f6f4ec;     /* helle Flächen */
  --karte: #fdfcf8;         /* Kartenhintergrund */
  --tinte: #21201c;         /* Textfarbe */
  --tinte-hell: #6f6a5e;    /* gedämpfter Text */
  --terrakotta: #c08f74;    /* Hauptakzent */
  --terrakotta-dunkel: #a97a5f;
  --linie: rgba(33, 32, 28, 0.16);
  --linie-zart: rgba(33, 32, 28, 0.10);

  /* Akzentfarben der Lebensphasen (gedämpft) */
  --kindheit: #a08662;
  --jugend: #495a58;
  --familie: #b06a52;
  --spaeter: #7d7a55;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Segoe UI", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bone);
  color: var(--tinte);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

::selection { background: var(--terrakotta); color: #fff; }

/* ---------- Icons (Inline-SVG) ---------- */

.icon {
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Kopfbereich ---------- */

.hero {
  text-align: center;
  padding: 6rem 1.5rem 4.5rem;
}

.hero-vorspann {
  font-size: 0.78rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--tinte-hell);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0.8rem 0 0.6rem;
}

.hero .amp {
  color: var(--terrakotta);
  font-style: italic;
}

.hero-untertitel {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  color: var(--terrakotta);
  font-style: italic;
  margin-bottom: 1.4rem;
}

.hero-hinweis {
  font-size: 0.92rem;
  color: var(--tinte-hell);
}

/* ---------- Navigation oben rechts (fixiert, scrollt mit) ---------- */

.topnav {
  position: fixed;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(246, 244, 236, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--linie-zart);
  box-shadow: 0 2px 12px rgba(33, 32, 28, 0.08);
}

/* ---------- Phasen-Navigation (zentriert unter der Überschrift) ---------- */

.phasen-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 1rem;
}

/* ---------- Seiten-Aktionen (z. B. Steckbrief hinzufügen) ---------- */

.seiten-aktionen {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 1rem 0.5rem;
}

.phase-knopf, .leiste-btn, .leiste-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--tinte);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.phase-knopf:hover, .leiste-btn:hover, .leiste-link:hover {
  background: var(--tinte);
  color: var(--bone-hell);
}

/* Farbpunkt vor jeder Lebensphase */
.phase-knopf::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.phase-knopf[data-phase="kindheit"]::before { background: var(--kindheit); }
.phase-knopf[data-phase="jugend"]::before   { background: var(--jugend); }
.phase-knopf[data-phase="familie"]::before  { background: var(--familie); }
.phase-knopf[data-phase="spaeter"]::before  { background: var(--spaeter); }

.leiste-btn, .leiste-link { border-color: var(--linie); }

.leiste-btn.aktiv {
  background: var(--terrakotta);
  border-color: var(--terrakotta);
  color: #fff;
}

/* ---------- Admin-Werkzeuge (Floating unten rechts) ---------- */

/* Standardmäßig verborgen – nur in der Admin-Stufe sichtbar */
.admin-tools { display: none; }
html:not(.gesperrt):not(.nur-betrachten) .admin-tools {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: rgba(246, 244, 236, 0.94);
  backdrop-filter: blur(6px);
  color: var(--tinte);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(33, 32, 28, 0.12);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.admin-btn:hover { background: var(--tinte); color: var(--bone-hell); border-color: var(--tinte); }

/* Hauptaktion „Foto hinzufügen“ hervorgehoben */
.admin-btn-haupt {
  background: var(--terrakotta);
  border-color: var(--terrakotta);
  color: #fff;
}
.admin-btn-haupt:hover { background: var(--terrakotta-dunkel); border-color: var(--terrakotta-dunkel); color: #fff; }

.admin-btn-rot { border-color: #a3543f; color: #a3543f; }
.admin-btn-rot:hover { background: #a3543f; border-color: #a3543f; color: #fff; }

/* ---------- Foto-hinzufügen-Formular ---------- */

.foto-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1.2rem;
  background: rgba(24, 22, 18, 0.55);
  backdrop-filter: blur(3px);
}
.foto-modal[hidden] { display: none; }

.foto-formular {
  position: relative;
  width: min(30rem, 100%);
  background: var(--karte);
  border: 1px solid var(--linie-zart);
  border-radius: 4px;
  box-shadow: 0 12px 40px rgba(33, 32, 28, 0.28);
  padding: 2rem 1.8rem 1.8rem;
}

.foto-formular h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.foto-hinweis {
  color: var(--tinte-hell);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

.foto-modal-zu {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--tinte-hell);
  cursor: pointer;
}
.foto-modal-zu:hover { color: var(--tinte); }

#foto-form { display: flex; flex-direction: column; gap: 0.9rem; }

.foto-feld { display: flex; flex-direction: column; gap: 0.35rem; }
.foto-feld > span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tinte-hell);
}

.foto-feld input[type="text"],
.foto-feld input[type="number"],
.foto-feld textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--linie);
  border-radius: 2px;
  background: #fff;
  color: var(--tinte);
  width: 100%;
}
.foto-feld textarea { resize: vertical; }
.foto-feld input:focus,
.foto-feld textarea:focus {
  outline: 2px solid var(--terrakotta);
  outline-offset: 1px;
}

.foto-zeile { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.foto-feld-jahr { flex: 1 1 8rem; }
.foto-feld-ca {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
}
.foto-feld-ca span {
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--tinte);
}

.foto-vorschau {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--linie-zart);
}
.foto-vorschau[hidden] { display: none; }

.foto-fehler { color: #a3543f; font-size: 0.88rem; }
.foto-fehler[hidden] { display: none; }

.foto-absenden {
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 999px;
  background: var(--terrakotta);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.foto-absenden:hover { background: var(--terrakotta-dunkel); }

/* ---------- Phasen-Abschnitte ---------- */

.phase-kopf {
  text-align: center;
  padding: 4.5rem 1.5rem 1rem;
  scroll-margin-top: 90px;
}

.phase-kopf .zeitraum {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

/* kurze Linien links und rechts vom Zeitraum */
.phase-kopf .zeitraum::before,
.phase-kopf .zeitraum::after {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.phase-kopf h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 400;
}

.phase-kopf p.beschreibung {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--tinte-hell);
  max-width: 34rem;
  margin: 0.5rem auto 0;
}

.phase-kindheit .zeitraum { color: var(--kindheit); }
.phase-jugend   .zeitraum { color: var(--jugend); }
.phase-familie  .zeitraum { color: var(--familie); }
.phase-spaeter  .zeitraum { color: var(--spaeter); }

/* ---------- Zeitstrahl ---------- */

.strahl {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.strahl::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: var(--linie);
}

.eintrag {
  position: relative;
  width: 50%;
  padding: 1rem 3rem 2.4rem 0;
}

.eintrag:nth-child(even) {
  margin-left: 50%;
  padding: 1rem 0 2.4rem 3rem;
}

/* Punkt auf der Linie */
.eintrag::after {
  content: "";
  position: absolute;
  top: 2.35rem;
  right: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--terrakotta);
  border: 2px solid var(--bone);
}

.eintrag:nth-child(even)::after {
  right: auto;
  left: -4px;
}

.jahr-marke {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.45rem;
  color: var(--terrakotta-dunkel);
  margin-bottom: 0.45rem;
  text-align: right;
}

.eintrag:nth-child(even) .jahr-marke { text-align: left; }

.karte {
  background: var(--karte);
  border: 1px solid var(--linie-zart);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(33, 32, 28, 0.06);
  transition: box-shadow 0.2s;
}

.karte:hover { box-shadow: 0 6px 22px rgba(33, 32, 28, 0.10); }

.karte img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  cursor: zoom-in;
  transition: filter 0.2s;
}

.karte img:hover { filter: brightness(1.05); }

.karte-text { padding: 1.1rem 1.3rem 1.3rem; }

.karte-text h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.karte-text p {
  color: var(--tinte-hell);
  font-size: 0.92rem;
}

.karte.nur-text {
  background: var(--bone-hell);
  border-left: 2px solid var(--terrakotta);
}

/* ---------- Galerie-Karten (mehrere ähnliche Bilder) ---------- */

.galerie-rahmen {
  position: relative;
  cursor: zoom-in;
}

/* gestapelter Look: zwei angedeutete Karten hinter dem Titelbild */
.galerie-rahmen::before,
.galerie-rahmen::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: var(--karte);
  border: 1px solid var(--linie-zart);
  z-index: -1;
}
.galerie-rahmen::before { transform: translate(6px, 6px); }
.galerie-rahmen::after  { transform: translate(11px, 11px); opacity: 0.7; }

.galerie-rahmen img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  transition: filter 0.2s;
}
.galerie-rahmen:hover img { filter: brightness(1.05); }

.galerie-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(24, 22, 18, 0.72);
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(2px);
}
.galerie-badge .icon { width: 0.95em; height: 0.95em; stroke-width: 2; }

/* etwas Luft, damit der Stapel-Schatten nicht abgeschnitten wird */
.karte-galerie { overflow: visible; }
.karte-galerie .galerie-rahmen { overflow: hidden; border-radius: 2px; }

/* Bearbeitbare Felder – für Admins dauerhaft anklickbar.
   Markierung nur beim Überfahren/Bearbeiten, damit die Seite ruhig bleibt. */
.bearbeitbar[contenteditable="true"] {
  border-radius: 2px;
  min-width: 2rem;
  cursor: text;
  transition: outline-color 0.15s, background 0.15s;
}

.bearbeitbar[contenteditable="true"]:hover {
  outline: 1px dashed var(--terrakotta);
  outline-offset: 3px;
}

.bearbeitbar[contenteditable="true"]:focus {
  outline: 2px solid var(--terrakotta);
  outline-offset: 3px;
  background: #fbf7ef;
}

/* ---------- Freunde- & Familienbuch ---------- */

.fb-bereich {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.4rem 1.2rem 4rem;
}

.fb-intro {
  max-width: 40rem;
  margin: 0 auto 2.4rem;
  text-align: center;
  color: var(--tinte-hell);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.7;
}

.fb-leer {
  text-align: center;
  color: var(--tinte-hell);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  padding: 2rem 1rem;
}

.fb-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}

.fb-karte {
  position: relative;
  background: var(--karte);
  border: 1px solid var(--linie-zart);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(33, 32, 28, 0.06);
  padding: 1.4rem 1.4rem 1.5rem;
  transition: box-shadow 0.2s;
}
.fb-karte:hover { box-shadow: 0 6px 22px rgba(33, 32, 28, 0.10); }

.fb-kopf { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }

.fb-avatar {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.fb-titel h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
}
.fb-spitzname { color: var(--terrakotta-dunkel); font-style: italic; font-size: 0.95rem; }
.fb-verbindung {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tinte-hell);
  margin-top: 0.15rem;
}

.fb-felder {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.8rem;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}
.fb-felder dt {
  color: var(--tinte-hell);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.12rem;
}
.fb-felder dd { color: var(--tinte); }

.fb-erinnerung {
  border-left: 2px solid var(--terrakotta);
  padding: 0.3rem 0 0.3rem 0.9rem;
  margin: 0.6rem 0 0.9rem;
  color: var(--tinte);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
}

.fb-wunsch {
  background: var(--bone-hell);
  border-radius: 2px;
  padding: 0.7rem 0.9rem;
  color: var(--tinte);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
}

.fb-loeschen {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--linie);
  border-radius: 50%;
  background: var(--karte);
  color: #a3543f;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.fb-loeschen:hover { background: #a3543f; color: #fff; border-color: #a3543f; }
.fb-loeschen .icon { width: 1rem; height: 1rem; }

/* Formular-Modal */
.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(24, 22, 18, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}
.fb-modal[hidden] { display: none; }

.fb-formular {
  position: relative;
  width: min(46rem, 100%);
  background: var(--karte);
  border-radius: 4px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.3);
  padding: 2.2rem 1.8rem 2rem;
}

.fb-modal-zu {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--tinte-hell);
  cursor: pointer;
}

.fb-formular h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}
.fb-formular-hinweis {
  color: var(--tinte-hell);
  font-size: 0.92rem;
  margin-bottom: 1.4rem;
}

#fb-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.1rem;
}
.fb-feld { display: flex; flex-direction: column; gap: 0.3rem; }
.fb-feld-breit { grid-column: 1 / -1; }
.fb-feld-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tinte-hell);
}
.fb-feld input,
.fb-feld textarea {
  font-family: var(--sans);
  font-size: 0.98rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--linie);
  border-radius: 2px;
  background: #fff;
  color: var(--tinte);
  resize: vertical;
}
.fb-feld input:focus,
.fb-feld textarea:focus {
  outline: 2px solid var(--terrakotta);
  outline-offset: 1px;
}

.fb-aktionen {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 0.6rem;
}
.fb-btn-abbruch, .fb-btn-speichern {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--linie);
  background: transparent;
  color: var(--tinte);
  transition: background 0.15s, color 0.15s;
}
.fb-btn-abbruch:hover { background: var(--tinte); color: var(--bone-hell); }
.fb-btn-speichern {
  border-color: var(--terrakotta);
  background: var(--terrakotta);
  color: #fff;
}
.fb-btn-speichern:hover { background: var(--terrakotta-dunkel); border-color: var(--terrakotta-dunkel); }

/* ---------- Freundesbuch: Galerie nach Kategorien ---------- */

.fb-kategorie { margin-bottom: 3rem; }

.fb-kategorie-titel {
  text-align: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin-bottom: 1.6rem;
}
.fb-kategorie-titel span {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}
.fb-kategorie-titel span::before,
.fb-kategorie-titel span::after {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: var(--terrakotta);
  opacity: 0.6;
}

.fb-buch-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.4rem;
}

.fb-beitrag {
  position: relative;
  cursor: pointer;
}

.fb-beitrag-bild {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid var(--linie-zart);
  background: var(--karte);
  box-shadow: 0 1px 3px rgba(33, 32, 28, 0.10);
  transition: box-shadow 0.2s, transform 0.2s;
}
.fb-beitrag:hover .fb-beitrag-bild {
  box-shadow: 0 8px 24px rgba(33, 32, 28, 0.16);
  transform: translateY(-2px);
}
.fb-beitrag-bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.fb-beitrag-ohnebild {
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-beitrag-ohnebild span {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: #fff;
}

.fb-beitrag-tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(24, 22, 18, 0.68);
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fb-beitrag-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.05rem;
  text-align: center;
  margin-top: 0.7rem;
  line-height: 1.3;
}

/* Löschknopf über der Karte (Admin) */
.fb-beitrag .fb-loeschen {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  margin: 0;
  padding: 0.35rem;
  border-radius: 50%;
  background: rgba(253, 252, 248, 0.9);
}

/* ---------- Leseansicht digitaler Beiträge (Look der Vorlage) ---------- */

.fb-leseansicht {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1.2rem;
  background: rgba(24, 22, 18, 0.7);
  backdrop-filter: blur(3px);
}

.fb-la-karte {
  position: relative;
  width: min(40rem, 100%);
  background: #1f2a36;
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  padding: 2.4rem 1.8rem 2rem;
}

.fb-la-zu {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  font-size: 1.8rem;
  line-height: 1;
  background: none;
  border: none;
  color: #cdd8e0;
  cursor: pointer;
}
.fb-la-zu:hover { color: #fff; }

.fb-la-name {
  color: #fff;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  text-align: center;
  margin-bottom: 1.4rem;
}

.fb-la-felder { display: flex; flex-direction: column; gap: 0.9rem; }

.fb-la-foto { text-align: center; }
.fb-la-foto img {
  max-width: 100%;
  max-height: 340px;
  border-radius: 6px;
  border: 4px solid #eef3f6;
}

.fb-la-feld {
  background: #b9ccd6;
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}
.fb-la-label {
  display: block;
  font-weight: 500;
  color: #1f2a36;
  margin-bottom: 0.25rem;
}
.fb-la-feld p {
  color: #21303c;
  line-height: 1.55;
}
.fb-la-leer { color: #cdd8e0; text-align: center; font-style: italic; }

/* ---------- Modal: Auswahl / Formularschritte ---------- */

.fb-formular-titel {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.7rem;
  margin-bottom: 0.3rem;
}

.fb-zurueck {
  border: none;
  background: none;
  color: var(--tinte-hell);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0 0 0.6rem;
}
.fb-zurueck:hover { color: var(--tinte); }

.fb-wahl {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}
.fb-wahl-knopf {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--linie);
  border-radius: 6px;
  background: var(--bone-hell);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.fb-wahl-knopf:hover {
  border-color: var(--terrakotta);
  background: #fff;
  transform: translateY(-2px);
}
.fb-wahl-knopf .icon { width: 1.5rem; height: 1.5rem; color: var(--terrakotta); }
.fb-wahl-titel {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--tinte);
}
.fb-wahl-text { font-size: 0.9rem; color: var(--tinte-hell); }

/* Formular-Layout in den Schritten (überschreibt das alte Grid) */
.fb-formular #fb-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.fb-raster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.1rem;
}
.fb-select {
  font-family: var(--sans);
  font-size: 0.98rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--linie);
  border-radius: 2px;
  background: #fff;
  color: var(--tinte);
}
.fb-select:focus { outline: 2px solid var(--terrakotta); outline-offset: 1px; }

.fb-u-vorschau { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fb-u-thumb {
  width: 72px;
  height: 96px;
  object-fit: cover;
  object-position: top center;
  border-radius: 3px;
  border: 1px solid var(--linie-zart);
}
.fb-d-vorschau {
  max-width: 160px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--linie-zart);
}
.fb-d-vorschau[hidden] { display: none; }

.fb-fehler { color: #a3543f; font-size: 0.9rem; }
.fb-fehler[hidden] { display: none; }

@media (max-width: 620px) {
  #fb-form { grid-template-columns: 1fr; }
  .fb-raster { grid-template-columns: 1fr; }
}

/* ---------- Fußzeile ---------- */

.fuss {
  text-align: center;
  padding: 3rem 1rem 3.5rem;
  color: var(--tinte-hell);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.02rem;
  border-top: 1px solid var(--linie-zart);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(24, 22, 18, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox[hidden] { display: none; }

.lightbox figure {
  max-width: min(1100px, 95vw);
  max-height: 92vh;
  text-align: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 2px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox figcaption {
  color: #ece7db;
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-style: italic;
}

.lightbox-zu {
  position: absolute;
  top: 1rem;
  right: 1.4rem;
  font-size: 2.4rem;
  line-height: 1;
  background: none;
  border: none;
  color: #ece7db;
  cursor: pointer;
}

/* Galerie-Navigation */
.lightbox-pfeil {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  line-height: 1;
  background: rgba(24, 22, 18, 0.45);
  border: 1px solid rgba(236, 231, 219, 0.35);
  border-radius: 50%;
  color: #ece7db;
  cursor: pointer;
  transition: background 0.15s;
  z-index: 2;
}
.lightbox-pfeil:hover { background: rgba(192, 143, 116, 0.85); }
.lightbox-pfeil[hidden] { display: none; }
#lightbox-vor    { left: 1rem; }
#lightbox-weiter { right: 1rem; }

.lightbox-zaehler {
  margin-top: 0.6rem;
  color: #cfc9bb;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
}
.lightbox-zaehler[hidden] { display: none; }

@media (max-width: 700px) {
  .lightbox-pfeil { width: 2.4rem; height: 2.4rem; font-size: 1.8rem; }
  #lightbox-vor    { left: 0.3rem; }
  #lightbox-weiter { right: 0.3rem; }
}

/* ---------- Handy-Ansicht ---------- */

@media (max-width: 700px) {
  .strahl::before { left: 14px; }

  .eintrag,
  .eintrag:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 0.8rem 0 1.8rem 2.6rem;
  }

  .eintrag::after,
  .eintrag:nth-child(even)::after {
    left: 10px;
    right: auto;
    top: 2rem;
  }

  .jahr-marke,
  .eintrag:nth-child(even) .jahr-marke {
    text-align: left;
    font-size: 1.3rem;
  }

  .hero { padding: 3.5rem 1rem 2.6rem; }

  /* Navigation oben rechts auf dem Handy kompakt (nur Symbole) */
  .topnav {
    top: 0.6rem;
    right: 0.6rem;
    gap: 0.2rem;
    padding: 0.25rem;
    flex-wrap: nowrap;
  }
  .topnav .leiste-link { padding: 0.5rem; }
  .topnav .leiste-link span { display: none; }
  .topnav .icon { width: 1.25em; height: 1.25em; }

  /* Admin-Werkzeuge etwas näher an den Rand */
  html:not(.gesperrt):not(.nur-betrachten) .admin-tools {
    right: 0.6rem;
    bottom: 0.6rem;
  }
}
