/* CVP Galerie: ruhig, bildzentriert, Navy als Akzent, viel Weißraum, mobil zuerst.
   Systemschrift (keine externen Schriften = keine Datenübertragung an Dritte). */
:root {
  --navy: #0F2543;
  --navy-hell: #1d3a63;
  --grau: #76818F;
  --linie: #e6e8ec;
  --hinter: #ffffff;
  --text: #16202e;
  --rot: #c0392b;
  --zeile: 200px;
  --abstand: 6px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--hinter);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
button { font: inherit; }
.klein { font-size: .85rem; color: var(--grau); }

/* ---------- Titelbild ---------- */
.titel { width: 100%; height: min(62vh, 680px); background: #eef0f3; overflow: hidden; }
.titel img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Kopf ---------- */
.kopf { max-width: 720px; margin: 0 auto; padding: 40px 20px 28px; text-align: center; }
.kopf .logo { width: 180px; height: auto; margin: 0 auto 24px; }
.kopf h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 600; letter-spacing: .01em; margin: 0 0 6px; color: var(--navy); }
.unterzeile { margin: 0 0 20px; color: var(--grau); letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; }
.einleitung { color: #3c4756; line-height: 1.55; margin: 0 auto; max-width: 560px; }
.meldung { background: #fff7e6; border: 1px solid #f0d9a8; padding: 10px 14px; border-radius: 10px; margin-top: 16px; }

.bezahlt-box { border: 1px solid var(--linie); border-radius: 16px; padding: 22px 18px; margin-top: 8px; background: #f7f9fc; }
.bezahlt-box h2 { margin: 0 0 8px; color: var(--navy); font-size: 1.3rem; }
.bezahlt-box p { margin: 8px 0; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--navy); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 22px; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 46px;
}
.knopf:hover { background: var(--navy-hell); }
.knopf:disabled { background: #b8c0cc; cursor: not-allowed; }
.knopf.leise { background: transparent; color: var(--navy); }
.knopf.breit { width: 100%; }

/* ---------- Raster (bündige Zeilen, natürliche Seitenverhältnisse) ---------- */
.raster { display: flex; flex-wrap: wrap; gap: var(--abstand); padding: 0 var(--abstand) 120px; max-width: 1800px; margin: 0 auto; }
.raster::after { content: ""; flex: 1000 1 0; }
.kachel {
  position: relative; margin: 0; overflow: hidden; background: #eef0f3;
  flex: var(--r) 1 calc(var(--r) * var(--zeile));
  aspect-ratio: var(--r);
}
.kachel .bild { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.kachel img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.kachel .bild:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }

.rund {
  position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.88); color: var(--navy); cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.18); padding: 0;
}
.rund svg { width: 22px; height: 22px; }
.herz svg path { fill: none; stroke: var(--navy); stroke-width: 1.8; }
.herz[aria-pressed="true"] { background: var(--navy); }
.herz[aria-pressed="true"] svg path { fill: #fff; stroke: #fff; }
.kachel.gewaehlt::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--navy); pointer-events: none; }
.laden { text-decoration: none; }

/* ---------- Leiste unten ---------- */
.leiste {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom));
  width: min(640px, calc(100% - 20px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid var(--linie); border-radius: 999px; padding: 8px 8px 8px 22px;
  box-shadow: 0 8px 30px rgba(15,37,67,.16); z-index: 20;
}
.leiste-text { display: flex; flex-direction: column; min-width: 0; }
.leiste-text strong { color: var(--navy); }
.leiste-text span { font-size: .82rem; color: var(--grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leiste.ueber strong { color: var(--navy); }

/* ---------- Warenkorb ---------- */
dialog#korb { border: 0; border-radius: 18px; padding: 0; width: min(460px, calc(100% - 24px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog#korb::backdrop { background: rgba(15,37,67,.45); }
#kauf-form { padding: 24px 22px 18px; display: grid; gap: 14px; }
#kauf-form h2 { margin: 0; color: var(--navy); }
.zusammenfassung { margin: 0; display: grid; gap: 6px; }
.zusammenfassung div { display: flex; justify-content: space-between; gap: 12px; }
.zusammenfassung dt { color: var(--grau); }
.zusammenfassung dd { margin: 0; text-align: right; }
.zusammenfassung .summe { border-top: 1px solid var(--linie); padding-top: 8px; font-weight: 700; color: var(--navy); font-size: 1.1rem; }
.feld { display: grid; gap: 6px; font-size: .9rem; color: #3c4756; }
.feld input { font: inherit; padding: 12px 14px; border: 1px solid #cfd5dd; border-radius: 10px; width: 100%; }
.haken { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; line-height: 1.45; cursor: pointer; }
.haken input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--navy); }
.fehler { color: var(--rot); margin: 0; font-size: .9rem; }

/* ---------- Großansicht ---------- */
.lightbox { position: fixed; inset: 0; background: #080e1a; z-index: 50; display: grid; place-items: center; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100vw; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-knopf { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; }
.lb-knopf:hover { background: rgba(255,255,255,.25); }
.lb-zu { top: 14px; right: 14px; font-size: 1.2rem; }
.lb-zurueck { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-vor { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-unten { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 18px; color: #cfd6e0; font-size: .9rem; }
.lb-unten .rund { position: static; }
@media (hover: none) { .lb-zurueck, .lb-vor { display: none; } }

/* ---------- Fuß ---------- */
.fuss { text-align: center; padding: 30px 20px 120px; color: var(--grau); font-size: .8rem; }
.fuss img { margin: 0 auto 8px; width: 110px; height: auto; opacity: .7; }
body.bezahlt .fuss { padding-bottom: 40px; }
body.bezahlt .raster { padding-bottom: 40px; }

/* ---------- Schlichte Seiten (Danke, Fehler, Probe-Checkout, Admin) ---------- */
.mitte { max-width: 520px; margin: 12vh auto; padding: 0 20px; text-align: center; }
.mitte .logo { width: 180px; height: auto; margin: 0 auto 28px; }
.mitte h1 { color: var(--navy); }

.probe-band { background: #fff3cd; color: #6b4e00; text-align: center; padding: 10px; font-weight: 700; letter-spacing: .02em; }
.checkout { display: grid; grid-template-columns: 1fr; max-width: 920px; margin: 0 auto; }
.checkout-links, .checkout-rechts { padding: 32px 24px; }
.checkout-links { background: #f6f8fb; }
.checkout-links .logo { width: 150px; height: auto; margin-bottom: 18px; }
.checkout .betrag { font-size: 2.2rem; font-weight: 700; color: var(--navy); margin: 6px 0; }
.checkout-rechts { display: grid; gap: 14px; align-content: start; }
.checkout-rechts h1 { margin: 0; font-size: 1.3rem; }
.checkout-rechts form { margin: 0; }
.probekarte { border: 1px dashed #b8c0cc; border-radius: 10px; padding: 14px; display: flex; justify-content: space-between; color: var(--grau); font-family: ui-monospace, monospace; }
@media (min-width: 760px) {
  .checkout { grid-template-columns: 1fr 1fr; margin-top: 6vh; border: 1px solid var(--linie); border-radius: 16px; overflow: hidden; }
}

.admin { max-width: 1400px; margin: 0 auto; padding: 20px; }
.admin-kopf { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-bottom: 1px solid var(--linie); padding-bottom: 14px; }
.admin-kopf img { width: 120px; height: auto; }
.admin-kopf h1 { font-size: 1.3rem; margin: 0; color: var(--navy); flex: 1; }
.admin-event h2 { color: var(--navy); font-size: 1.1rem; margin: 28px 0 10px; }
.tabelle-huelle { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { color: var(--grau); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
td a { word-break: break-all; }
.schalter { border: 1px solid #cfd5dd; background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.schalter.an { background: var(--navy); color: #fff; border-color: var(--navy); }

@media (max-width: 600px) {
  :root { --zeile: 130px; --abstand: 4px; }
  .titel { height: 46vh; }
  .kopf { padding-top: 28px; }
  .rund { width: 36px; height: 36px; right: 6px; bottom: 6px; }
  .leiste { padding-left: 16px; }
}

/* Admin: Warnung (z. B. Erstattung prüfen) */
.warnung { color: #fff; background: var(--rot); display: inline-block; padding: 3px 8px; border-radius: 6px; margin-top: 4px; font-size: .82rem; }

/* ---------- Videos ---------- */
[hidden] { display: none !important; }
.kachel.video .dauer {
  position: absolute; left: 8px; top: 8px; background: rgba(15,37,67,.78); color: #fff;
  font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; pointer-events: none; letter-spacing: .02em;
}
.video-kauf {
  position: absolute; right: 8px; bottom: 8px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--navy); font-weight: 600; font-size: .82rem;
  padding: 9px 14px; min-height: 38px; box-shadow: 0 1px 4px rgba(0,0,0,.18); white-space: nowrap;
}
.video-kauf[aria-pressed="true"] { background: var(--navy); color: #fff; }
.lb-unten .video-kauf { position: static; }
.lightbox video { max-width: 100vw; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); background: #000; }
body.bezahlt.mit-leiste .raster { padding-bottom: 120px; }
body.bezahlt.mit-leiste .fuss { padding-bottom: 120px; }
.platzhalter { color: #9a6a00; font-weight: 700; }
.hinweis { color: #9a6a00; font-size: .82rem; }
@media (max-width: 600px) {
  .video-kauf { right: 6px; bottom: 6px; font-size: .74rem; padding: 7px 10px; min-height: 34px; }
}

/* ---------- M2: Willkommenstext, Passwortabfrage ---------- */
.willkommen { white-space: pre-line; color: #3c4756; line-height: 1.55; margin: 0 auto 18px; max-width: 560px; font-size: 1.05rem; }
.pw-form { max-width: 360px; margin: 18px auto 0; text-align: left; display: grid; gap: 14px; }
