:root {
  --bg: #0c0c11;
  --fl: #16161f;
  --fl2: #1f1f2b;
  --rand: #2b2b3a;
  --text: #e8e8f0;
  --leise: #9a9ab2;
  --akzent: #ff3fa4;
  --akzent2: #3fd8ff;
  --gefahr: #d64545;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.lb-offen { overflow: hidden; }
a { color: var(--akzent2); }
h1 { font-size: 1.7rem; line-height: 1.2; margin: .3em 0 .4em; }
h2 { font-size: 1.2rem; margin: 30px 0 10px; }
code { background: var(--fl2); padding: 1px 5px; border-radius: 4px; }

/* ---------- Kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  padding: 10px 16px;
  background: rgba(12, 12, 17, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rand);
}
.logo { text-decoration: none; line-height: 1.1; }
.logo span {
  font-weight: 800; font-size: 1.55rem; letter-spacing: -.03em;
  background: linear-gradient(90deg, var(--akzent), var(--akzent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo small {
  display: block; color: var(--leise); font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase; margin-top: 2px;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--leise); text-decoration: none; padding: 6px 13px; border-radius: 999px; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--fl2); }
.nav a.aktiv { color: #fff; background: var(--fl2); box-shadow: inset 0 0 0 1px var(--akzent); }

main { padding: 14px 10px; min-height: 60vh; }
.inhalt { max-width: 760px; margin: 0 auto; padding: 8px 6px 30px; }
.leise { color: var(--leise); }
.leer { text-align: center; margin-top: 40px; color: var(--leise); }

.fuss { text-align: center; padding: 30px 16px 40px; color: var(--leise); font-size: .85rem; border-top: 1px solid var(--rand); margin-top: 30px; }
.fuss p { margin: 6px 0; }
.fuss a { color: var(--leise); margin: 0 10px; }

/* ---------- Kopfbereiche ---------- */
.intro {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px 18px; text-align: center; margin: 4px auto 18px; max-width: 900px;
}
.intro p { margin: 0; color: var(--leise); }
.intro strong { color: var(--text); }
.seitenkopf { text-align: center; margin: 6px auto 22px; max-width: 900px; }
.seitenkopf p { margin: 0; }
.zurueck { color: var(--leise); text-decoration: none; font-size: .9rem; }
.zurueck:hover { color: var(--text); }

/* ---------- Knöpfe & Formulare ---------- */
.knopf {
  display: inline-block; font: inherit; font-weight: 600; font-size: .95rem;
  color: #fff; background: var(--akzent); border: 0; border-radius: 7px;
  padding: 9px 18px; cursor: pointer; text-decoration: none;
}
.knopf:hover { filter: brightness(1.1); }
.knopf:disabled { opacity: .5; cursor: default; }
.knopf.zweit { background: var(--fl2); box-shadow: inset 0 0 0 1px var(--rand); }
.knopf.gefahr { background: var(--gefahr); }
.knopf.klein { padding: 6px 12px; font-size: .86rem; }

label { display: block; margin: 14px 0 5px; font-size: .9rem; color: var(--leise); }
input, textarea, select {
  width: 100%; font: inherit; color: var(--text);
  background: var(--fl2); border: 1px solid var(--rand); border-radius: 7px; padding: 9px 11px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--akzent2); outline-offset: 1px; }
textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; }
.hinweis { padding: 10px 14px; border-radius: 7px; background: var(--fl2); border-left: 3px solid var(--akzent2); margin: 14px 0; }
.hinweis.fehler { border-left-color: var(--gefahr); }
.knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
form.inline { display: inline; }

/* ---------- Kachelwand ---------- */
.galerie { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.galerie img {
  height: 110px; min-width: 60px; display: block;
  border-radius: 4px; cursor: zoom-in; position: relative; background: var(--fl2);
  transition: transform .25s ease, box-shadow .25s ease;
}
@media (hover: hover) {
  .galerie img:hover { transform: scale(3); z-index: 10; box-shadow: 0 10px 40px rgba(0, 0, 0, .85); }
}
@media (max-width: 520px) { .galerie img { height: 86px; } }
#mehr { height: 1px; }

/* ---------- Party-Übersicht ---------- */
.partys { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; max-width: 1300px; margin: 0 auto; }
.party-karte {
  display: block; text-decoration: none; color: var(--text);
  background: var(--fl); border: 1px solid var(--rand); border-radius: 10px; overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.party-karte:hover { transform: translateY(-3px); border-color: var(--akzent); }
.party-karte img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--fl2); }
.party-karte div { padding: 10px 12px 12px; }
.party-karte strong { display: block; line-height: 1.3; }
.party-karte span { color: var(--leise); font-size: .86rem; }

/* ---------- Großansicht ---------- */
#lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .94);
  display: flex; align-items: center; justify-content: center;
}
#lb[hidden] { display: none; }
#lb figure { margin: 0; text-align: center; padding: 0 50px; }
#lb-bild { max-width: 100%; max-height: 80vh; object-fit: contain; display: block; margin: 0 auto; }
#lb figcaption { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; align-items: center; margin-top: 12px; }
#lb-party { color: #fff; font-size: 1.1rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--akzent); }
#lb-melden { background: none; border: 0; color: var(--leise); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; padding: 4px; }
#lb-melden:hover { color: var(--text); }
.lb-knopf {
  position: absolute; background: none; border: 0; color: #fff;
  font-size: 2.6rem; line-height: 1; padding: 10px 14px; cursor: pointer; opacity: .7;
}
.lb-knopf:hover { opacity: 1; }
#lb-zu { top: 6px; right: 6px; }
#lb-zurueck { left: 2px; top: 50%; transform: translateY(-50%); }
#lb-vor { right: 2px; top: 50%; transform: translateY(-50%); }
@media (max-width: 520px) { #lb figure { padding: 0 8px; } .lb-knopf { font-size: 2rem; } #lb-zurueck, #lb-vor { top: auto; bottom: 8px; transform: none; } }

#melde { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .6); padding: 16px; }
#melde[hidden] { display: none; }
#melde-form { background: var(--fl); border: 1px solid var(--rand); border-radius: 12px; padding: 20px; width: 100%; max-width: 440px; }
#melde-form h2 { margin: 0 0 6px; }
#melde-form p { font-size: .92rem; margin: 0; }
#melde-status { margin-top: 12px !important; }

/* ---------- Gästebuch ---------- */
.eintrag { background: var(--fl); border: 1px solid var(--rand); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.eintrag .meta { color: var(--leise); font-size: .86rem; margin-bottom: 6px; }
.eintrag .meta strong { color: var(--text); font-size: 1rem; }
.eintrag p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.gb-form { background: var(--fl); border: 1px solid var(--rand); border-radius: 12px; padding: 4px 18px 18px; margin: 18px 0 30px; }
.seiten { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 20px 0; }
.seiten a, .seiten span { padding: 5px 11px; border-radius: 6px; text-decoration: none; color: var(--leise); background: var(--fl); }
.seiten span { color: #fff; background: var(--akzent); }

/* ---------- Admin ---------- */
.admin-liste { display: grid; gap: 12px; }
.admin-karte { display: flex; gap: 14px; background: var(--fl); border: 1px solid var(--rand); border-radius: 10px; padding: 12px; align-items: flex-start; }
.admin-karte img { width: 130px; height: 98px; object-fit: cover; border-radius: 6px; flex: none; background: var(--fl2); }
.admin-karte .text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.admin-karte .text p { margin: 4px 0; white-space: pre-wrap; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.zahl { display: inline-block; min-width: 1.7em; padding: 0 7px; border-radius: 999px; background: var(--akzent); color: #fff; font-size: .8rem; text-align: center; margin-left: 6px; vertical-align: 2px; }
details { margin: 16px 0; }
summary { cursor: pointer; color: var(--leise); }
@media (max-width: 520px) { .admin-karte { flex-direction: column; } .admin-karte img { width: 100%; height: auto; aspect-ratio: 4 / 3; } }

/* ---------- Videos & Quiz ---------- */
.quiz label { color: var(--text); font-size: 1rem; margin-top: 18px; }
.quiz-nr { display: inline-block; width: 1.6em; height: 1.6em; line-height: 1.6em; text-align: center; border-radius: 50%; background: var(--akzent); color: #fff; font-size: .8rem; font-weight: 700; margin-right: 8px; vertical-align: 1px; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 18px; margin-top: 14px; }
.video { margin: 0; background: var(--fl); border: 1px solid var(--rand); border-radius: 10px; overflow: hidden; }
.video video { display: block; width: 100%; aspect-ratio: 4 / 3; background: #000; }
.video figcaption { padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
.video-melden { background: none; border: 0; color: var(--leise); font: inherit; font-size: .8rem; text-decoration: underline; cursor: pointer; padding: 0; text-align: left; }
.video-melden:hover { color: var(--text); }
.video-platzhalter { display: flex; align-items: center; justify-content: center; width: 130px; height: 98px; background: #000; color: #fff; font-size: 2rem; border-radius: 6px; text-decoration: none; }
.pruef { list-style: none; padding: 0; margin: 8px 0; }
.pruef li { padding: 4px 0; }
.pruef .ok { color: var(--leise); }
.pruef .nok { color: #ff8a8a; }

.fuss p:first-child a { margin: 0; }

/* =====================================================================
   Tor: die Quiz-Seite vor dem Archiv
   Idee: Man steht vor der Clubtür. Hinter Milchglas läuft die Party
   (Mosaik aus eingedampften Fotos), Scheinwerfer wandern durch.
   ===================================================================== */
@font-face {
  font-family: "Michroma";
  src: url("schrift/michroma.woff") format("woff");
  font-display: swap;
}
:root {
  --nacht: #07060c;
  --amber: #ffb547;
  --glas: rgba(16, 13, 26, .58);
  --glas-rand: rgba(255, 255, 255, .13);
}

/* Alle Seiten mit Bühne */
body.mit-buehne { background: var(--nacht); overflow-x: hidden; }
body.mit-buehne main, body.mit-buehne .fuss { position: relative; z-index: 2; }
body.mit-buehne .kopf { background: rgba(7, 6, 12, .62); border-bottom-color: rgba(255, 255, 255, .07); }
body.mit-buehne .fuss { border-top-color: rgba(255, 255, 255, .07); }

body.tor-seite { min-height: 100vh; display: flex; flex-direction: column; }
body.tor-seite main { flex: 1; display: flex; padding: 0 16px; position: relative; z-index: 2; }
body.tor-seite .kopf { position: relative; z-index: 3; background: transparent; border-bottom: 0; backdrop-filter: none; }
body.tor-seite .fuss { position: relative; z-index: 2; border-top: 0; margin-top: 0; color: rgba(232, 232, 240, .55); }
body.tor-seite .fuss a { color: rgba(232, 232, 240, .55); }

/* ---------- Die Bühne im Hintergrund ---------- */
.buehne { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--nacht); }
.buehne-mosaik {
  position: absolute; inset: -60px;                 /* Rand verstecken, den die Unschärfe erzeugt */
  background: url("teaser.php") 0 50% / auto 118vh repeat;
  filter: blur(16px) saturate(1.5) brightness(.72);
  animation: treiben 180s linear infinite;
  opacity: 0; transition: opacity 1.4s ease;
}
.buehne-mosaik.da { opacity: 1; }
/* Das Mosaik ist 1024×288 Pixel; bei 118vh Höhe ist es 1024/288·118 = 419.6vh breit */
@keyframes treiben { to { background-position: -419.6vh 50%; } }

.buehne-licht {
  position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  mix-blend-mode: screen; opacity: .55; will-change: transform;
}
.licht-magenta { background: radial-gradient(closest-side, rgba(255, 63, 164, .55), transparent); left: -20vmax; top: -25vmax; animation: schwenk-a 23s ease-in-out infinite alternate; }
.licht-cyan    { background: radial-gradient(closest-side, rgba(63, 216, 255, .45), transparent); right: -25vmax; top: 10vh;  animation: schwenk-b 29s ease-in-out infinite alternate; }
.licht-amber   { background: radial-gradient(closest-side, rgba(255, 181, 71, .35), transparent); left: 20vw; bottom: -45vmax; animation: schwenk-c 37s ease-in-out infinite alternate; }
@keyframes schwenk-a { to { transform: translate(38vw, 30vh) scale(1.15); } }
@keyframes schwenk-b { to { transform: translate(-45vw, 25vh) scale(.85); } }
@keyframes schwenk-c { to { transform: translate(-25vw, -40vh) scale(1.2); } }

/* Abdunkeln zur Mitte hin, damit Text lesbar bleibt, plus leichtes Filmkorn */
.buehne::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 52%, rgba(7, 6, 12, .55), rgba(7, 6, 12, .15) 70%, rgba(7, 6, 12, .6));
}
.buehne-korn {
  position: absolute; inset: 0; z-index: 1; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='k'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23k)'/></svg>");
}

/* ---------- Inhalt ---------- */
.tor {
  position: relative; z-index: 1;                   /* über der Bühne */
  margin: auto; width: 100%; max-width: 540px;
  padding: 3vh 0 6vh; text-align: center;
}
.tor-titel {
  font-family: "Michroma", system-ui, sans-serif; font-weight: 400;
  font-size: clamp(1.75rem, 6.4vw, 4.4rem); line-height: 1.1;
  letter-spacing: -.01em; margin: 0 -40px .35em;   /* darf breiter als die Karte sein */
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 63, 164, .55), 0 0 48px rgba(255, 63, 164, .25), 0 0 90px rgba(63, 216, 255, .25);
}
.tor-teaser { margin: 0 auto 26px; max-width: 30em; font-size: 1.06rem; color: rgba(243, 238, 248, .82); text-wrap: balance; }

.tor-karte {
  text-align: left; padding: 24px 24px 20px; border-radius: 18px;
  background: var(--glas);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--glas-rand);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.tor-regel { margin: 0 0 6px; font-size: 1.08rem; font-weight: 600; color: #fff; }
.tor-fehler { margin: 10px 0 4px; padding: 9px 12px; border-radius: 8px; background: rgba(214, 69, 69, .18); border: 1px solid rgba(255, 120, 120, .35); color: #ffd2d2; font-size: .93rem; }
.tor-karte label { color: var(--text); font-size: 1rem; margin-top: 16px; }
.tor-karte input {
  background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14);
  font-size: 1.05rem; padding: 11px 13px; transition: border-color .15s ease, box-shadow .15s ease;
}
.tor-karte input:focus { outline: none; border-color: var(--akzent2); box-shadow: 0 0 0 3px rgba(63, 216, 255, .22), 0 0 22px rgba(63, 216, 255, .18); }
.tor-knopf {
  display: block; width: 100%; margin-top: 20px; padding: 13px 18px; font-size: 1.05rem; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(255, 63, 164, .35);
}
.tor-knopf:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.tor-klein { margin: 12px 0 0; font-size: .86rem; color: rgba(232, 232, 240, .6); text-align: center; }
.tor-unten { margin-top: 18px; }
.tor-unten a { color: var(--akzent2); }

.wackeln { animation: wackeln .45s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes wackeln {
  15%, 85% { transform: translateX(-2px); }
  30%, 70% { transform: translateX(6px); }
  45%, 55% { transform: translateX(-9px); }
  50% { transform: translateX(9px); }
}

@media (max-width: 520px) {
  .tor-titel { margin-left: 0; margin-right: 0; }
  .tor-karte { padding: 20px 16px 16px; }
}

/* ---------- Einlass-Stempel nach bestandenem Quiz ---------- */
.stempel {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; pointer-events: none;
  animation: stempel-weg .6s ease 2s forwards;
}
.stempel-abdruck {
  display: grid; justify-items: center; gap: 8px; padding: 18px 34px 16px;
  border: 5px double #ff4fae; border-radius: 16px; color: #ff4fae;
  transform: rotate(-9deg);
  background: rgba(7, 6, 12, .25);
  box-shadow: 0 0 40px rgba(255, 63, 164, .45), inset 0 0 24px rgba(255, 63, 164, .25);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='t'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.2 1.9'/></filter><rect width='100%' height='100%' filter='url(%23t)'/></svg>");
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='t'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.2 1.9'/></filter><rect width='100%' height='100%' filter='url(%23t)'/></svg>");
  animation: stempel-drauf .42s cubic-bezier(.2, .9, .3, 1.25) both;
}
.stempel-abdruck strong { font-family: "Michroma", system-ui, sans-serif; font-weight: 400; font-size: clamp(2rem, 9vw, 3.6rem); line-height: 1; letter-spacing: .02em; }
.stempel-abdruck small { font-size: .95rem; font-weight: 700; letter-spacing: .08em; }
@keyframes stempel-drauf {
  0%   { opacity: 0; transform: rotate(-16deg) scale(2.3); }
  70%  { opacity: 1; transform: rotate(-8deg) scale(.95); }
  100% { opacity: 1; transform: rotate(-9deg) scale(1); }
}
@keyframes stempel-weg { to { opacity: 0; } }

/* Die Galerie wird nach dem Einlass von unscharf zu scharf */
body.enthuellen main { animation: scharf 1.8s ease-out both; }
@keyframes scharf {
  from { filter: blur(18px) brightness(.55) saturate(1.4); }
  to   { filter: none; }
}

/* ---------- Weniger Bewegung, wenn gewünscht ---------- */
@media (prefers-reduced-motion: reduce) {
  .buehne-mosaik, .buehne-licht { animation: none; }
  .wackeln { animation: none; }
  .stempel-abdruck { animation: none; transform: rotate(-9deg); }
  body.enthuellen main { animation: none; }
}
@media (min-width: 900px) { .tor-titel { margin-left: -220px; margin-right: -220px; } }

/* ---------- Bühne in voller Stärke: Textseiten ---------- */
body.buehne-voll .buehne::after { background: radial-gradient(ellipse 70% 75% at 50% 45%, rgba(7, 6, 12, .78), rgba(7, 6, 12, .5)); }
body.buehne-voll .buehne-licht { opacity: .42; }
/* Flächen auf der Bühne: halbdurchsichtig statt grau, damit die Atmosphäre durchscheint */
body.mit-buehne .eintrag,
body.mit-buehne .party-karte,
body.mit-buehne .video { background: rgba(16, 13, 26, .78); border-color: rgba(255, 255, 255, .09); }
body.mit-buehne .gb-form {
  background: var(--glas); border-color: var(--glas-rand);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
}
body.mit-buehne .seiten a { background: rgba(16, 13, 26, .78); }

/* ---------- Bühne leise: hinter den Bildern ---------- */
/* Steht still, ist stark gedimmt und zeigt nur am Rand einen farbigen Schimmer –
   die Fotos bleiben die Hauptsache, und das Handy muss nichts animieren. */
body.buehne-leise .buehne-mosaik { animation: none; filter: blur(26px) saturate(1.4) brightness(.6); }
body.buehne-leise .buehne-licht { display: none; }
body.buehne-leise .buehne-korn { display: none; }
body.buehne-leise .buehne::after { background: radial-gradient(ellipse 70% 76% at 50% 50%, rgba(7, 6, 12, .92) 45%, rgba(7, 6, 12, .42)); }
