/* Gedenkseite Merlin
   Helle, ruhige Grundstimmung. Grün als Akzent aus dem Kartendesign.
   Keine externen Schriften, keine Fremdverbindungen, keine Animation. */

:root {
  --gruen-tief:   #33691e;
  --gruen:        #558b2f;
  --gruen-hell:   #f1f6ec;
  --grund:        #faf9f6;
  --text:         #23241f;
  --text-leise:   #5c5f56;
  --linie:        #dfded6;
  --breite:       44rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.mitte {
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: #fff;
  padding: .5rem .75rem;
  border: 2px solid var(--gruen-tief);
}

/* --- Kopf ------------------------------------------------------------ */

.kopf {
  padding-block: 1.75rem 1.25rem;
}
.kopf .mitte {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 2rem;
  justify-content: space-between;
}

.wortmarke {
  font-size: 1.5rem;
  letter-spacing: .02em;
  color: var(--text);
  text-decoration: none;
}
.wortmarke .kreuz { color: var(--gruen); }

.kopf nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .9375rem;
}
.kopf nav a {
  color: var(--text-leise);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.kopf nav a:hover { color: var(--text); border-bottom-color: var(--linie); }
.kopf nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--gruen);
}

/* --- Blockraster ------------------------------------------------------
   Nachempfunden dem Hintergrund der Dankeskarten. Bewusst nur als schmale
   Kante — vollflächig auf jeder Seite würde aus der Erinnerung ein Muster. */

.raster {
  height: 10px;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='40'><rect width='80' height='40' fill='%237cb342'/><rect y='0' width='20' height='20' fill='%23689f38'/><rect x='40' y='0' width='20' height='20' fill='%238bc34a'/><rect x='20' y='20' width='20' height='20' fill='%239ccc65'/><rect x='60' y='20' width='20' height='20' fill='%23558b2f'/></svg>");
  background-size: 40px 20px;
}

/* --- Hero (nur Startseite) ------------------------------------------- */

.bild-hero img {
  display: block;
  width: 100%;
  height: clamp(180px, 34vw, 340px);
  object-fit: cover;
  object-position: center 60%;
}

/* --- Inhalt ---------------------------------------------------------- */

main { padding-block: 2.5rem 3.5rem; }

h1, h2, h3 {
  line-height: 1.25;
  font-weight: 600;
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0 0 1.5rem;
  letter-spacing: -.01em;
}
h2 {
  font-size: 1.4rem;
  margin: 3rem 0 .75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--linie);
  color: var(--gruen-tief);
}
h3 { font-size: 1.15rem; margin: 2rem 0 .5rem; }

p { margin: 0 0 1.25rem; }

a { color: var(--gruen-tief); text-underline-offset: .18em; }
a:hover { color: var(--text); }

strong { font-weight: 600; }

blockquote {
  margin: 2rem 0;
  padding: .25rem 0 .25rem 1.5rem;
  border-left: 4px solid var(--gruen);
  color: var(--text-leise);
  font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--linie);
  margin: 2.5rem 0;
}

ul, ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
li { margin-bottom: .4rem; }

/* Tabellen (Buchangaben) müssen auf dem Handy scrollen dürfen,
   ohne die ganze Seite querscrollen zu lassen. */
.tabelle-scroll { overflow-x: auto; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: .9375rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: .5rem .75rem .5rem 0;
  border-bottom: 1px solid var(--linie);
}
th { font-weight: 600; color: var(--text-leise); white-space: nowrap; }

img { max-width: 100%; height: auto; }

/* --- Hervorgehobene Kästen ------------------------------------------- */

.kasten {
  background: var(--gruen-hell);
  border-left: 4px solid var(--gruen);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.kasten > :last-child { margin-bottom: 0; }

address {
  font-style: normal;
  margin-bottom: 1.25rem;
}

.hinweis {
  font-size: .9375rem;
  color: var(--text-leise);
}

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

.fuss {
  padding-block: 2rem 3rem;
  font-size: .875rem;
  color: var(--text-leise);
}
.fuss p { margin: 0 0 .4rem; }
.fuss a { color: var(--text-leise); }

/* --- Druck ----------------------------------------------------------- */

@media print {
  .kopf nav, .raster, .bild-hero, .skip { display: none; }
  body { background: #fff; font-size: 11pt; }
  a { color: inherit; }
}

/* --- Galerie ---------------------------------------------------------- */

.galerie {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin: 1.25rem 0 2.5rem;
}
.galerie figure { margin: 0; }
.galerie a {
  display: block;
  line-height: 0;
  border: 1px solid var(--linie);
  background: #fff;
}
.galerie a:focus-visible { outline: 3px solid var(--gruen); outline-offset: 2px; }
.galerie img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
/* Die Galerie darf breiter laufen als der Lesetext — Bilder brauchen Platz,
   Fließtext nicht. */
@media (min-width: 56rem) {
  .galerie {
    width: 52rem;
    margin-inline: calc((var(--breite) - 52rem) / 2);
  }
}

/* --- Porträt auf der Startseite --------------------------------------
   Bewusst nicht randlos wie das Hero-Bild: ein Porträt braucht eine Kante,
   sonst franst es in die Seite aus. */

.portraet {
  margin: 2rem auto 2.5rem;
  max-width: 30rem;
}
.portraet img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--linie);
}

/* --- Gedichte ---------------------------------------------------------
   Strophen brauchen Luft und dürfen nicht wie Fließtext aussehen. Etwas
   eingerückt, damit die Zeilenumbrüche als gewollt lesbar sind. */

.gedicht {
  margin: 1.5rem 0 2.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--gruen-hell);
}
.gedicht p {
  margin: 0 0 1.5rem;
  line-height: 1.85;
  text-wrap: pretty;
}
.gedicht p:last-child { margin-bottom: 0; }

/* --- Lightbox ---------------------------------------------------------
   Natives <dialog>: Escape und Fokusfalle kommen vom Browser, nicht von
   einer Bibliothek. */

#lupe {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  overflow: visible;
}
#lupe::backdrop { background: rgba(24, 22, 18, .92); }
#lupe form { margin: 0; }
#lupe img {
  display: block;
  max-width: 94vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  background: var(--grund);
}

/* Fest in der Ecke des Fensters, nicht am Bild — so ist der Knopf bei jedem
   Bildformat an derselben Stelle. */
.lupe-zu {
  position: fixed;
  top: .75rem;
  right: .75rem;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.75rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  cursor: pointer;
}
.lupe-zu:hover { background: rgba(0, 0, 0, .8); }
.lupe-zu:focus-visible { outline: 3px solid var(--gruen); outline-offset: 2px; }
