:root {
  --bg: #0b0b0d; --panel: #16161a; --line: #2a2a30; --text: #ecebe6; --muted: #9a988f; --accent: #f2c14e;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); }
a { color: inherit; }
img { max-width: 100%; display: block; }

.top { position: absolute; inset: 0 0 auto 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; background: linear-gradient(#000a, #0000); }
.brand { font: 600 1.1rem var(--serif); letter-spacing: .04em; text-decoration: none; }
.top nav { display: flex; gap: 20px; align-items: center; font-size: .9rem; }
.top nav a { text-decoration: none; opacity: .85; }
.top nav a:hover { opacity: 1; color: var(--accent); }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; opacity: .85; padding: 0; }
button.link:hover { color: var(--accent); }

.hero, .banner { position: relative; overflow: hidden; display: flex; align-items: flex-end; background: #111; }
.hero { min-height: 100vh; }
.banner { min-height: 46vh; }
.banner.tall { min-height: 78vh; }
.hero img.bg, .banner img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after, .banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0004 0%, #0000 35%, #0b0b0dee 100%); }
.hero-inner, .banner > div { position: relative; z-index: 1; padding: 0 6vw 8vh; max-width: 900px; }
.hero h1 { font: 400 clamp(1.6rem, 7vw, 7rem)/1 var(--serif); margin: .1em 0 .2em; letter-spacing: -.02em; white-space: nowrap; } /* eine Zeile: Größe skaliert mit der Fensterbreite */
.banner h1 { font: 400 clamp(2.4rem, 6vw, 5rem)/1.05 var(--serif); margin: .1em 0 .2em; }
.lead { font-size: 1.15rem; color: #d8d6cf; max-width: 36em; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; color: var(--accent); margin: 0; }
.eyebrow a { text-decoration: none; }
.meta { color: #cfcdc6; }

.btn { display: inline-block; margin-top: 12px; padding: 12px 22px; background: var(--accent); color: #111; border: 0;
  border-radius: 999px; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid #fff6; }
.btn:hover { filter: brightness(1.08); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 48px 24px 80px; }
.section-title { font: 400 1.9rem var(--serif); margin: 32px 0 18px; }
.section-title a { text-decoration: none; }
.section-title a:hover { color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { position: relative; display: block; aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; background: var(--panel); text-decoration: none; }
.card img, .card .nocover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card .nocover { background: linear-gradient(135deg, #222, #0e0e10); }
.card:hover img { transform: scale(1.04); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0000 45%, #000c 100%); }
.card-text { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 14px; }
.card h3 { font: 400 1.5rem/1.2 var(--serif); margin: 0; }
.card p { margin: 2px 0 0; color: #cfcdc6; font-size: .9rem; }

.map-wrap { padding-top: 64px; }
#karte { height: 70vh; min-height: 420px; background: #0e0e10; border-bottom: 1px solid var(--line); }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.8) contrast(.9) saturate(.3); }
.hint { color: var(--muted); font-size: .85rem; padding: 6px 24px; margin: 0; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); }
.leaflet-popup-content ul { margin: 0; padding-left: 18px; }
.leaflet-popup-content a { color: var(--accent); }

.diary { max-width: 980px; }
.tag { border-top: 1px solid var(--line); padding: 36px 0; }
.tag h2 { font: 400 1.6rem var(--serif); margin: 0 0 12px; }
.tag .text { font: 1.12rem/1.75 var(--serif); color: #dcdad3; max-width: 42em; }
.tag .text em:only-child { color: var(--muted); }
.fotos p { color: var(--muted); font-size: .85rem; }
.fotos p:has(.foto, .img-fehlt) { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; color: inherit; }
.foto img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 4px; }
.anzahl { color: var(--muted); font-size: .85rem; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.galerie .foto img { aspect-ratio: 1; }
.img-fehlt { display: grid; place-items: center; aspect-ratio: 3/2; background: var(--panel); color: var(--muted); font-size: .8rem; border-radius: 4px; }

.login-box { max-width: 380px; margin: 0 auto; padding: 22vh 24px 10vh; }
.login-box h1, .editor h1 { font: 400 2.4rem var(--serif); margin: 0 0 20px; }
label { display: block; margin: 0 0 16px; color: var(--muted); font-size: .9rem; }
input, textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; font: 1rem var(--sans); }
textarea { font: 1rem/1.6 var(--serif); resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.error { color: #ff8a80; } .ok { color: #9be39b; }
.editor { max-width: 860px; padding-top: 96px; }
.editor .day span { color: var(--text); font: 1.1rem var(--serif); }

.foot { color: var(--muted); text-align: center; font-size: .8rem; padding: 30px; border-top: 1px solid var(--line); }

@media (max-width: 600px) {
  .top { padding: 14px 16px; } .top nav { gap: 12px; }
  .wrap { padding: 32px 16px 60px; }
  .grid { grid-template-columns: 1fr; }
}

/* Bildbetrachter (lightbox.js) */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.94); display: grid; place-items: center; }
.lb[hidden] { display: none; }
.lb-img { max-width: 100vw; max-height: calc(100vh - 120px); object-fit: contain; margin-bottom: 110px; }
.lb-btn { position: absolute; background: none; border: 0; color: #fff; opacity: .7; cursor: pointer; font: 3rem/1 var(--sans); padding: 16px 22px; }
.lb-btn:hover { opacity: 1; }
.lb-prev { left: 0; top: 50%; transform: translateY(-50%); } .lb-next { right: 0; top: 50%; transform: translateY(-50%); }
.lb-close { right: 0; top: 0; }
.lb-count { position: absolute; bottom: 86px; left: 0; right: 0; text-align: center; color: #fff; opacity: .7; font-size: .85rem; }
.lb-thumb { height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; opacity: .5; cursor: pointer; flex: none; }
.lb-thumb:hover { opacity: .85; } .lb-thumb.aktiv { opacity: 1; outline: 2px solid var(--accent); }
/* mittig, scrollt trotzdem von links, wenn der Streifen überläuft (justify-content:center würde links abschneiden) */
.lb-thumb:first-child { margin-left: auto; } .lb-thumb:last-child { margin-right: auto; }
.lb-strip { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.4) transparent; }
.lb-strip::-webkit-scrollbar { height: 8px; } .lb-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.4); border-radius: 4px; }
/* Vorschauleiste: 2/3 der Breite, mittig; Buttons links/rechts neben den Bildern */
.lb-bar { position: absolute; bottom: 0; left: 0; right: 0; margin: 0 auto; width: 66.67%; min-width: min(100%, 320px); height: 76px; display: flex; background: rgba(0,0,0,.6); }
.lb-strip { flex: 1; min-width: 0; display: flex; gap: 6px; padding: 6px 8px; overflow-x: auto; }
.lb-sbtn { flex: none; width: 40px; border: 0; color: #fff; font: 2rem/1 var(--sans); cursor: pointer; background: rgba(255,255,255,.08); }
.lb-sbtn[hidden] { display: none; } .lb-sbtn:hover { background: rgba(255,255,255,.2); }
/* Erstanmeldung (Passwort, 2FA-Einrichtung) und Admin-Formular "Neuer Benutzer" */
.login-box.enroll { max-width: 560px; padding-top: 10vh; }
.regeln, .schritte { color: var(--muted); font-size: .9rem; padding-left: 1.2em; }
.schritte li { margin-bottom: 12px; }
.qr { width: 220px; margin: 10px 0; background: #fff; border-radius: 6px; } .qr svg { display: block; width: 100%; height: auto; }
.schluessel { display: block; margin-top: 6px; font-size: 1.05rem; letter-spacing: .08em; color: var(--text); word-break: break-word; }
form.neu { max-width: 420px; }
/* Admin: Kontenliste scrollt auf schmalen Bildschirmen, Aktionsknöpfe brechen um */
table.konten { display: block; overflow-x: auto; }
.aktionen { display: flex; flex-wrap: wrap; gap: 6px; min-width: 220px; }
.aktionen .btn { margin-top: 0; padding: 8px 12px; font-size: .85rem; }
