/* Galerie: Vorschau-Kacheln und Großansicht (nur auf Seiten mit Galerie geladen) */
.galerie a { display: block; overflow: hidden; }
.galerie img { transition: transform .25s ease, filter .25s ease; }
.galerie a:hover img, .galerie a:focus-visible img { transform: scale(1.04); filter: brightness(1.06); }

html:has(.lichtkasten[open]) { overflow: hidden; }
.lichtkasten { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(20 19 16 / .94); color: #fff; }
.lichtkasten[open] { display: grid; place-items: center; }
.lichtkasten::backdrop { background: rgb(20 19 16 / .94); }
.lichtkasten figure { margin: 0; display: grid; justify-items: center; gap: .5rem; }
.lichtkasten img { display: block; width: auto; height: auto; max-width: 100vw; max-height: calc(100dvh - 4.5rem); object-fit: contain; }
.lichtkasten figcaption { color: #f3f2ec; padding-inline: 1rem; font-size: .9375rem; text-align: center; }
.lichtkasten button { position: absolute; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; font: 2rem/1 system-ui, sans-serif; cursor: pointer; }
.lichtkasten button:hover { background: var(--rot); }
.lichtkasten button:focus-visible { outline-color: #fff; }
.lichtkasten .zu { top: .75rem; right: .75rem; }
.lichtkasten .zurueck { left: .75rem; top: calc(50% - 1.5rem); }
.lichtkasten .weiter { right: .75rem; top: calc(50% - 1.5rem); }
@media (prefers-reduced-motion: reduce) { .galerie img { transition: none; } }
