/* Adventskalender Technik-Museum Pütnitz · Vollbild-Entwurf. Farben und Schriften wie technikmuseum-puetnitz.de */
:root {
  --orange: #fbab32;
  --dunkel: #233038;
  --text: #232323;
  --weiss: #ffffff;
  --pappe: #f3ede1;
  --titel: "Gotham Bold", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --fliess: "OpenSans-Regular", "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--dunkel); }
body {
  margin: 0;
  color: var(--weiss);
  font-family: var(--fliess);
  line-height: 1.5;
  overflow-x: hidden;
  background: var(--dunkel);
}

/* Schneefall: wird in kalender.js auf diese Fläche gezeichnet */
.schnee { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

/* Frost in den Bildecken: Eisblumen werden in kalender.js gezeichnet */
.frost { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.tuer.heute { z-index: 3; } /* heutiges Türchen liegt über dem Frost */

/* ---------- Vollbild-Bogen ---------- */
.bogen {
  --rand: 14px;
  --spalt: 6px;
  container-type: inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  min-height: 460px;
  padding: 0 var(--rand) calc(var(--rand) + env(safe-area-inset-bottom));
  background: var(--hintergrund, none) center / cover no-repeat, var(--dunkel);
}
/* Nach dem Ausmessen liegt das Bild pixelgenau unter den Türchen. */
.bogen.bereit { background: var(--hintergrund) var(--bx) var(--by) / var(--bw) var(--bh) no-repeat, var(--dunkel); }
/* Dunkler Verlauf nur hinter der Kopfzeile */
.bogen::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 150px;
  background: linear-gradient(180deg, rgba(12,18,22,.7), rgba(12,18,22,0));
  pointer-events: none;
  z-index: 1; /* liegt auch über den Türchen, damit Bild und Türchen gleich aussehen */
}

.bogen-kopf {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* Logo und Titel mittig, „Zur Website“ rechts */
  align-items: center;
  gap: 4px 12px;
  padding: calc(14px + env(safe-area-inset-top)) 0 14px;
}
.marke { display: block; line-height: 0; grid-column: 2; grid-row: 1; justify-self: center; }
.titelblock { grid-column: 1 / -1; grid-row: 2; }
.zurueck { grid-column: 3; grid-row: 1; justify-self: end; }
.logo { height: 72px; width: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.titelblock { text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
h1 {
  margin: 0;
  font-family: var(--titel);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.1;
  font-size: clamp(1.05rem, 4.6vw, 1.9rem);
}
.status { margin: 2px 0 0; font-size: clamp(.78rem, 2.6vw, .95rem); opacity: .95; }
.zurueck {
  font-family: var(--titel);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--dunkel);
  background: var(--orange);
  padding: .6rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}

.raster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  container-type: inline-size;
  flex: 1;
  min-height: 0;
  width: min(100%, 560px);
  margin: 0 auto;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(9, minmax(0, 1fr)); /* Zeilen dürfen schrumpfen, nichts wird abgeschnitten */
  grid-auto-flow: row dense;
  gap: var(--spalt);
}
/* Quer (Desktop, Tablet quer): alles auf einen Blick, 9 × 4 Felder füllen den Bildschirm */
@media (min-width: 560px) and (orientation: landscape) {
  .bogen { --rand: clamp(16px, 2.2vw, 40px); --spalt: clamp(6px, .6vw, 10px); min-height: 520px; }
  .bogen-kopf { padding-top: 18px; padding-bottom: 18px; }
  .logo { height: 96px; }
  .raster { flex: none; width: min(100%, 1240px, calc((100svh - 250px) * 16 / 9)); aspect-ratio: 16 / 9; margin: auto; grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(4, minmax(0, 1fr)); }
}
/* Handy quer (wenig Höhe): Kopf einzeilig – Logo klein neben dem Titel, Türchen bekommen die Höhe */
@media (min-width: 560px) and (orientation: landscape) and (max-height: 560px) {
  .bogen {
    min-height: 0;
    --rand: 12px; --spalt: 5px;
    padding-left: max(var(--rand), env(safe-area-inset-left));
    padding-right: max(var(--rand), env(safe-area-inset-right));
  }
  .bogen-kopf { grid-template-columns: 1fr auto auto 1fr; gap: 0 12px; padding: calc(8px + env(safe-area-inset-top)) 0 8px; }
  .marke { grid-column: 2; }
  .titelblock { grid-column: 3; grid-row: 1; text-align: left; }
  .zurueck { grid-column: 4; }
  .logo { height: 44px; }
  h1 { font-size: 1.15rem; }
  .status { font-size: .75rem; }
  .raster { width: min(100%, calc((100svh - 80px) * 16 / 9)); }
}
@media (max-width: 480px) {
  .logo { height: 60px; }
  .bogen-kopf { gap: 6px 10px; padding-bottom: 10px; }
  .heute-marke { font-size: .5rem; margin-top: .3em; }
}

.platz { position: relative; }
.platz.breit { grid-column: span 2; }
.platz.gross { grid-column: span 2; grid-row: span 2; }

/* ---------- Ein Türchen ---------- */
.tuer {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--weiss);
  font: inherit;
  cursor: pointer;
  perspective: 1500px;
}
.tuer.auf { z-index: 2; }

.loch {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #11181c;
}
.loch img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.loch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 5px 14px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.45); }
.video-zeichen { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, #3a4a55, #11181c 75%); }
.video-zeichen svg { width: 30%; max-width: 64px; }

.fluegel {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform .85s cubic-bezier(.3,1.35,.45,1), opacity .3s ease;
}
.doppel .fluegel.links { right: 50%; }
.doppel .fluegel.rechts { left: 50%; transform-origin: right center; }
.vorne, .hinten {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* Vorderseite: genau der Bildausschnitt, nur eine feine Stanzlinie */
.vorne {
  --wx: 0px;
  background: transparent;
  background: var(--hintergrund) calc(var(--bx) - var(--x) - var(--wx)) calc(var(--by) - var(--y)) / var(--bw) var(--bh) no-repeat;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.42), 0 0 0 1px rgba(0,0,0,.18);
}
.doppel .fluegel.links .vorne { border-radius: 6px 0 0 6px; }
.doppel .fluegel.rechts .vorne { --wx: calc(var(--w) / 2); border-radius: 0 6px 6px 0; box-shadow: inset 1px 0 0 rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.42); }
.hinten {
  transform: rotateY(180deg);
  border-radius: 6px;
  background:
    repeating-linear-gradient(115deg, rgba(0,0,0,.025) 0 2px, transparent 2px 5px),
    linear-gradient(90deg, #e9e1d1, var(--pappe));
}

/* Zahl direkt aufs Bild gedruckt */
.schild {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0,0,0,.85), 0 0 3px rgba(0,0,0,.8), 0 0 1px rgba(0,0,0,.9);
  transition: opacity .3s ease;
}
.zahl {
  font-family: var(--titel);
  font-weight: 700;
  line-height: 1;
  font-size: clamp(1.05rem, min(8cqw, 4.4svh), 2.6rem);
}
@media (min-width: 560px) and (orientation: landscape) { .zahl { font-size: clamp(1.4rem, 3.4cqw, 3.2rem); } }
.gross .zahl { font-size: 1.7em; }
.gross .zahl { font-size: clamp(1.8rem, min(14cqw, 7.5svh), 4.4rem); }
@media (min-width: 560px) and (orientation: landscape) { .gross .zahl { font-size: clamp(2.4rem, 6.4cqw, 5.4rem); } }
.schloss { display: none; }
.heute-marke {
  display: none;
  margin-top: .3em;
  color: var(--orange);
  font-family: var(--titel);
  font-weight: 500;
  font-size: .875rem;
}
.tuer[aria-disabled="true"] { cursor: not-allowed; }
.tuer[aria-disabled="true"] .zahl { opacity: .88; }

/* Geöffnet: Flügel weg, Bild bleibt, Zahl klein in der Ecke */
.tuer.auf .fluegel { opacity: 0; pointer-events: none; }
/* Flügel schwingt auf und blendet danach aus, damit er keine Nachbarbilder verdeckt */
.tuer.auf.schwingt .fluegel { transition: transform .85s cubic-bezier(.3,1.35,.45,1), opacity .5s ease .8s; }
.tuer.auf.schwingt .fluegel.links { transform: rotateY(-104deg); }
.tuer.auf.schwingt .fluegel.rechts { transform: rotateY(104deg); }
.tuer.auf .schild { left: 8px; top: 6px; transform: none; }
.tuer.auf .zahl { font-size: 1rem; }
.tuer.auf.schwingt .schild { opacity: 0; }

/* Heute: orange Zahl, leuchtende Stanzlinie */
.tuer.heute:not(.auf) .zahl { color: var(--orange); }
.tuer.heute:not(.auf) .heute-marke { display: block; }
.tuer.heute:not(.auf)::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 8px;
  border: 2px solid var(--orange);
  pointer-events: none;
  animation: anstupsen .9s cubic-bezier(.2,.8,.2,1) .6s both; /* einmal beim Laden, kein Dauerpuls */
}
@keyframes anstupsen { from { opacity: 0; transform: scale(1.12); } }
@media (hover: hover) {
  .tuer.offen:not(.auf):hover .fluegel.links { transform: rotateY(-16deg); }
  .tuer.offen:not(.auf):hover .fluegel.rechts { transform: rotateY(16deg); }
  .tuer.auf:hover .loch img { transform: scale(1.06); }
}

.tuer.ruckelt { animation: ruckeln .45s ease; }
@keyframes ruckeln {
  0%, 100% { transform: none; }
  20% { transform: translateX(-4px) rotate(-1.2deg); }
  40% { transform: translateX(4px) rotate(1deg); }
  60% { transform: translateX(-3px) rotate(-.6deg); }
  80% { transform: translateX(2px); }
}

/* Funken beim Öffnen */
.funken { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.funke {
  position: fixed;
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--f);
  box-shadow: 0 0 10px 2px var(--f);
  animation: funke 1.1s cubic-bezier(.15,.7,.3,1) both;
}
.funke.stern { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 0; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
@keyframes funke {
  0% { transform: translate(0, 0) scale(.3); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 40px)) scale(1) rotate(180deg); opacity: 0; }
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--weiss);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--dunkel);
}

/* ---------- Fenster ---------- */
dialog {
  width: min(820px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--weiss);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  overflow: auto;
}
dialog::backdrop { background: rgba(14,20,24,.82); animation: abdunkeln .35s ease both; }
@keyframes abdunkeln { from { opacity: 0; } }
.karte { padding: 0 20px 20px; }
.karte-kopf {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 12px;
  background: var(--weiss);
}
.datum { margin: 0; font-size: .85rem; color: #5c656b; }
.karte h2 {
  margin: 0;
  font-family: var(--titel);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  line-height: 1.15;
  color: var(--dunkel);
}
.zu {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  color: var(--dunkel);
  cursor: pointer;
}
.zu svg { width: 20px; height: 20px; }
.zu:focus-visible { outline-color: var(--dunkel); box-shadow: none; }
.inhalt figure { margin: 0; }
.inhalt img, .inhalt video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 10px;
  background: var(--dunkel);
}
.inhalt figcaption { margin-top: 6px; font-size: .8rem; color: #5c656b; }
.inhalt p { margin: 14px 0 0; }
.platzhalter {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  font-family: var(--titel);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--weiss);
  background: radial-gradient(circle at 50% 40%, #3a4a55, var(--dunkel) 70%);
}

@media (prefers-reduced-motion: reduce) {
  .schnee, .funken { display: none; }
  .fluegel, .schild, .loch img { transition: none; }
  .tuer.heute:not(.auf)::after { animation: none; }
  .tuer.ruckelt { animation: none; }
  dialog::backdrop { animation: none; }
}

/* ================= Pop-up ================= */
/* Video-Platzhalter: Nachtbild statt grauer Fläche */
.platzhalter {
  position: relative;
  background: linear-gradient(rgba(12,18,22,.35), rgba(12,18,22,.65)), var(--hintergrund) center / cover no-repeat, var(--dunkel);
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
  gap: 10px;
  align-content: center;
}
.platzhalter::before {
  content: "";
  width: 64px; height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M19 15l15 9-15 9z' fill='%23233038'/%3E%3C/svg%3E") center / 70% no-repeat;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

/* ---------- Pop-up: Dunkle Bühne ---------- */
dialog {
  width: min(1100px, calc(100% - 32px));
  background: transparent;
  color: var(--weiss);
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
dialog::backdrop { background: rgba(8,12,15,.84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.karte { padding: 0; }
.karte-kopf { position: static; background: none; padding: 0 0 14px; }
.datum { color: rgba(255,255,255,.7); font-family: var(--titel); font-size: .875rem; }
.karte h2 { color: var(--weiss); font-size: clamp(1.4rem, 3.4vw, 2.2rem); letter-spacing: .04em; }
.inhalt img, .inhalt video, .platzhalter {
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 210px);
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.08);
}
.platzhalter, .inhalt video { width: min(100%, calc((100dvh - 210px) * 16 / 9)); }
.inhalt figcaption { color: rgba(255,255,255,.65); text-align: center; margin-top: 10px; }
.inhalt p { color: rgba(255,255,255,.9); text-align: center; max-width: 42em; margin: 14px auto 0; }

/* Pop-up-Auftritt: Hintergrund verschwimmt, Foto „entwickelt sich“, Datum/Titel/Knopf folgen nacheinander */
@media (prefers-reduced-motion: no-preference) {
  dialog[open]::backdrop { animation: abdunkeln .4s cubic-bezier(.2,.8,.2,1) both; }
  dialog[open] .inhalt img,
  dialog[open] .inhalt video,
  dialog[open] .platzhalter { animation: entwickeln .8s cubic-bezier(.2,.8,.2,1) .12s both; }
  dialog[open] .datum      { animation: auftauchen .5s cubic-bezier(.2,.8,.2,1) .3s both; }
  dialog[open] .karte h2   { animation: auftauchen .5s cubic-bezier(.2,.8,.2,1) .4s both; }
  dialog[open] .zu         { animation: auftauchen .4s cubic-bezier(.2,.8,.2,1) .5s both; }
  dialog[open] .inhalt figcaption,
  dialog[open] .inhalt p   { animation: auftauchen .5s cubic-bezier(.2,.8,.2,1) .6s both; }
}
@keyframes entwickeln {
  from { opacity: 0; transform: scale(1.03); filter: brightness(1.6) saturate(.4); }
  50%  { opacity: 1; }
}
@keyframes auftauchen { from { opacity: 0; transform: translateY(8px); } }

/* Gutschein-/Produktleiste im Pop-up */
.angebot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px;
  max-width: 720px; margin: 16px auto 0; padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.05);
  color: var(--weiss);
}
.angebot-text { margin: 0; flex: 1 1 220px; font-size: .95rem; font-weight: 400; }
.angebot-code button { font-weight: 400; }
.angebot-code { display: flex; align-items: center; border: 1px dashed rgba(255,255,255,.4); border-radius: 8px; overflow: hidden; }
.angebot-code code { padding: 8px 12px; font: 500 1rem/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; user-select: all; }
.angebot-code button {
  padding: 8px 12px; border: 0; border-left: 1px dashed rgba(255,255,255,.4);
  background: transparent; color: rgba(255,255,255,.8); font: inherit; font-size: .85rem; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.angebot-code button:hover { background: rgba(255,255,255,.08); color: var(--weiss); }
.angebot-link {
  padding: 10px 18px; border-radius: 999px; background: var(--orange); color: var(--dunkel);
  font-family: var(--titel); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: filter .15s;
}
.angebot-link:hover { filter: brightness(1.08); }
.angebot-code button:focus-visible, .angebot-link:focus-visible { outline: 2px solid var(--weiss); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { dialog[open] .angebot { animation: auftauchen .5s cubic-bezier(.2,.8,.2,1) .65s both; } }

/* Hinweis, falls JavaScript aus ist */
.ohne-js { margin: auto; padding: 16px 24px; border-radius: 12px; background: rgba(12,18,22,.85); text-align: center; }

/* Pop-up im Handy-Querformat: links Foto/Video in voller Höhe, rechts Datum, Titel, Text und Gutschein */
@media (orientation: landscape) and (max-height: 560px) {
  dialog { width: calc(100% - 24px); max-height: calc(100dvh - 16px); overflow: auto; }
  .karte {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 32%);
    grid-template-rows: auto auto auto 1fr;
    column-gap: 20px;
    align-items: start;
    padding: 10px; /* Platz für Schließen-Knopf und Fokusrahmen am Rand */
  }
  .inhalt { display: contents; }
  .inhalt figure { grid-column: 1; grid-row: 1 / -1; align-self: center; }
  .inhalt img, .inhalt video, .platzhalter { max-height: calc(100dvh - 56px); }
  .platzhalter, .inhalt video { width: min(100%, calc((100dvh - 56px) * 16 / 9)); }
  .platzhalter { font-size: .8rem; }
  .inhalt figcaption { margin-top: 6px; font-size: .75rem; }
  .karte-kopf { grid-column: 2; grid-row: 1; align-items: flex-start; padding: 0 0 8px; }
  .karte h2 { font-size: 1.15rem; }
  .inhalt p { grid-column: 2; text-align: left; margin: 8px 0 0; font-size: .9rem; }
  .angebot { grid-column: 2; flex-direction: column; align-items: stretch; gap: 10px; margin: 12px 0 0; padding: 12px; }
  .angebot-text { flex: none; }
  .angebot-code { justify-content: space-between; }
  .angebot-link { text-align: center; }
}

/* Veranstaltung in Türchen 13: Winterfoto und ruhige Terminankündigung. */
.mit-veranstaltung { width: min(1000px, calc(100% - 32px)); }
.mit-veranstaltung .inhalt { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.mit-veranstaltung .inhalt img { max-height: calc(100dvh - 190px); border-radius: 8px; box-shadow: none; }
.veranstaltung { text-align: left; padding: 16px 8px; }
.inhalt .veranstaltung p { text-align: left; }
.veranstaltung .veranstaltung-anlass { color: #c5d4ce; margin: 0 0 14px; font-size: .9rem; }
.veranstaltung-titel { font-family: var(--titel); font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.12; margin: 0 0 28px; font-weight: 700; }
.veranstaltung .veranstaltung-datum { color: #fff; font-weight: 700; font-size: 1.25rem; margin: 0 0 8px; }
.veranstaltung .veranstaltung-ort { color: #c5d4ce; margin: 0; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.2); }
.veranstaltung .veranstaltung-text { font-size: 1rem; line-height: 1.65; margin: 24px 0 0; }
@media (max-width: 620px) and (orientation: portrait) {
  .mit-veranstaltung .inhalt { grid-template-columns: 1fr; gap: 12px; }
  .mit-veranstaltung .inhalt img { max-height: 43dvh; }
  .veranstaltung { padding: 8px 4px; }
  .veranstaltung-titel { margin-bottom: 20px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .mit-veranstaltung .karte { display: block; }
  .mit-veranstaltung .inhalt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  .mit-veranstaltung .inhalt figure { grid-column: auto; grid-row: auto; }
  .mit-veranstaltung .inhalt img { max-height: calc(100dvh - 110px); }
  .veranstaltung { padding: 0; }
  .veranstaltung-titel { font-size: 1.5rem; margin-bottom: 12px; }
  .veranstaltung .veranstaltung-datum { font-size: 1rem; }
  .veranstaltung .veranstaltung-ort { padding-bottom: 12px; }
  .veranstaltung .veranstaltung-text { font-size: .85rem; line-height: 1.45; margin-top: 12px; }
}

.veranstaltung-titel { margin-bottom: 12px; }
.veranstaltung .veranstaltung-untertitel { margin: 0 0 24px; color: #e0e7e3; font-size: 1.05rem; line-height: 1.45; }
.veranstaltung .veranstaltung-datum { color: var(--orange); font-size: 1.4rem; }
.veranstaltung .veranstaltung-ort { font-size: .95rem; line-height: 1.5; padding-bottom: 16px; }
.veranstaltung .veranstaltung-text { margin-top: 16px; }
.veranstaltung-weitere-titel { margin: 24px 0 8px; font-size: .85rem; font-weight: 500; color: #b9c5bf; }
.veranstaltung .veranstaltung-weitere { white-space: pre-line; font-size: .8rem; line-height: 1.7; color: #b9c5bf; margin: 0; }

/* Lange Veranstaltungstitel lassen dem Schließen-Knopf auch mobil Platz. */
.karte-kopf > div { min-width: 0; }
.karte h2, .veranstaltung-titel { overflow-wrap: anywhere; }

/* Rechtslinks im Layout, damit sie keine Türchen verdecken. */
.rechtliches { position: relative; z-index: 4; display: flex; flex: none; justify-content: flex-end; align-items: center; gap: 14px; margin: 4px calc(-1 * var(--rand)) calc(-1 * var(--rand)); padding: 0 var(--rand) env(safe-area-inset-bottom); background: linear-gradient(90deg, transparent 25%, rgba(8,12,15,.78) 65%); }
.rechtliches a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 2px; color: #fff; font-size: .75rem; text-decoration: underline; text-decoration-color: rgba(255,255,255,.45); text-underline-offset: 3px; }
.rechtliches a:hover { text-decoration-color: currentColor; }
.rechtliches a:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.rechtsseite { max-width: 780px; margin: auto; padding: 24px 20px 48px; overflow-wrap: anywhere; }
.rechtsseite h1 { font-family: var(--titel); font-size: clamp(1.8rem,6vw,2.5rem); }
.rechtsseite h2 { font-family: var(--titel); font-size: 1.2rem; margin-top: 28px; }
.rechtsseite a { color: #fbcb79; text-underline-offset: 3px; }
.rechtsseite nav { display: flex; flex-wrap: wrap; gap: 20px; margin: 24px 0; }
.rechtsseite nav a { min-height: 44px; display: inline-flex; align-items: center; }
.rechtsseite address { font-style: normal; }
.rechtsseite .pruefhinweis { padding: 16px; border: 1px solid #fbab32; }
@media (pointer: coarse) { .rechtliches a { min-height: 44px; } }
