/* Fotonia – gemeinsames Design. Themen über body[data-design]. */
:root {
  --bg: #fbf8f3; --karte: #ffffff; --text: #2b2622; --leise: #7d746b;
  --akzent: #b08d57; --akzent-text: #ffffff; --linie: #ebe4d8;
  --schatten: 0 2px 10px rgba(60, 40, 20, .08);
  --titel: Georgia, "Times New Roman", serif;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rund: 14px;
}
body[data-design="boho"] {
  --bg: #f6efe6; --karte: #fffaf4; --text: #4a3426; --leise: #94796a;
  --akzent: #c0714f; --linie: #ead9c8;
}
body[data-design="ostsee"] {
  --bg: #eef5f8; --karte: #ffffff; --text: #17324a; --leise: #5f7a8c;
  --akzent: #2b7bb0; --linie: #d5e5ee; --titel: var(--schrift);
}
body[data-design="nacht"] {
  --bg: #15141a; --karte: #211f28; --text: #f1edf6; --leise: #a49db0;
  --akzent: #d6b26e; --akzent-text: #15141a; --linie: #34313d;
  --schatten: 0 2px 12px rgba(0, 0, 0, .4);
}
body[data-design="rustikal"] {
  --bg: #f4efe6; --karte: #fbf8f2; --text: #3d3427; --leise: #857660;
  --akzent: #6b8f5e; --linie: #e2d8c6;
}
body[data-design="modern"] {
  --bg: #ffffff; --karte: #f6f6f6; --text: #111111; --leise: #666666;
  --akzent: #111111; --akzent-text: #ffffff; --linie: #e3e3e3; --titel: var(--schrift);
  --rund: 6px; --schatten: none;
}
body[data-design="bunt"] {
  --bg: #fff5fa; --karte: #ffffff; --text: #2a1b3d; --leise: #7a6a8a;
  --akzent: #ff4f8b; --linie: #f3dce8; --titel: var(--schrift);
}
body[data-design="glamour"] {
  --bg: #0f2a24; --karte: #163a32; --text: #f4efe2; --leise: #b9b29e;
  --akzent: #d4af37; --akzent-text: #0f2a24; --linie: #24493f;
  --schatten: 0 2px 12px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--schrift);
  font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--titel); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }
a { color: var(--akzent); }
.versteckt { display: none !important; }
.leise { color: var(--leise); font-size: .9em; }
.fehler { color: #c0392b; }

button, .knopf {
  font: inherit; border: 0; border-radius: 999px; padding: .75em 1.3em; cursor: pointer;
  background: var(--akzent); color: var(--akzent-text); font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  text-decoration: none; transition: transform .1s, opacity .2s;
}
button:active, .knopf:active { transform: scale(.97); }
button:disabled { opacity: .45; cursor: default; }
button.zweit, .knopf.zweit {
  background: transparent; color: var(--text); border: 1.5px solid var(--linie);
}
button.gross { width: 100%; font-size: 1.15em; padding: 1em; }
button.klein { padding: .4em .9em; font-size: .9em; }

input, textarea, select {
  font: inherit; color: var(--text); background: var(--karte);
  border: 1.5px solid var(--linie); border-radius: 10px; padding: .7em .8em; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
label { display: block; font-weight: 600; margin: .9em 0 .3em; }
label.reihe { display: flex; gap: .6em; align-items: center; font-weight: normal; }
label.reihe input { width: auto; }

.karte {
  background: var(--karte); border-radius: var(--rund); padding: 1.1em;
  box-shadow: var(--schatten); margin-bottom: 1em;
}

/* ---------------------------------------------------------------- Gast */
.gast { max-width: 560px; margin: 0 auto; padding: 1em 1em 6em; }
.kopf { text-align: center; padding: 1.4em .5em 1em; }
.kopf h1 { font-size: 1.9em; }
.kopf .datum { color: var(--leise); letter-spacing: .08em; text-transform: uppercase; font-size: .8em; }
.kopf .begruessung { margin-top: .6em; white-space: pre-line; }

.credits-leiste {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--karte); border-radius: 999px; padding: .5em 1em; box-shadow: var(--schatten);
  margin-bottom: 1em; font-size: .95em;
}
.credits-leiste b { color: var(--akzent); }

.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--karte);
  border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom); z-index: 10;
}
.tabs button {
  flex: 1; background: none; color: var(--leise); border-radius: 0; padding: .6em .2em .7em;
  flex-direction: column; gap: .1em; font-size: .75em; font-weight: 500;
}
.tabs button span { font-size: 1.6em; line-height: 1.1; }
.tabs button.aktiv { color: var(--akzent); font-weight: 700; }

.missionen { display: grid; gap: .5em; margin: .6em 0 1em; }
.mission {
  display: flex; align-items: center; gap: .7em; padding: .7em .9em; border-radius: 12px;
  border: 1.5px solid var(--linie); background: var(--karte); cursor: pointer; text-align: left;
  color: var(--text); font-weight: 500; width: 100%;
}
.mission.gewaehlt { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent) inset; }
.mission.erledigt { opacity: .6; }
.mission .pkt { margin-left: auto; color: var(--akzent); font-weight: 700; white-space: nowrap; }

.warteschlange { display: grid; gap: .4em; margin-top: 1em; }
.upload-zeile { display: flex; gap: .6em; align-items: center; font-size: .9em; }
.upload-zeile img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.balken { flex: 1; height: 6px; background: var(--linie); border-radius: 3px; overflow: hidden; }
.balken div { height: 100%; background: var(--akzent); width: 0; transition: width .2s; }

.raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.raster .kachel { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 6px; cursor: pointer; background: var(--linie); }
.raster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kachel .marke {
  position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.55); color: #fff;
  font-size: .7em; padding: .1em .45em; border-radius: 6px;
}
.kachel .marke.oben { top: 4px; bottom: auto; }

.leuchtkasten {
  position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 50; display: flex;
  flex-direction: column; color: #fff;
}
.leuchtkasten .bild { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: .5em; }
.leuchtkasten img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.leuchtkasten .leiste { display: flex; gap: .6em; align-items: center; padding: 1em; flex-wrap: wrap; }
.leuchtkasten .leiste .wer { flex: 1; min-width: 40%; }
.leuchtkasten .zu { position: absolute; top: .6em; right: .6em; background: rgba(255,255,255,.15); color: #fff; }
.herz.an { background: #e0435c; color: #fff; }

.rangliste { list-style: none; padding: 0; margin: 0; }
.rangliste li {
  display: flex; gap: .8em; align-items: center; padding: .65em .2em; border-bottom: 1px solid var(--linie);
}
.rangliste .platz { width: 2em; text-align: center; font-weight: 700; color: var(--akzent); }
.rangliste .pkt { margin-left: auto; font-weight: 700; }
.rangliste li.ich { background: color-mix(in srgb, var(--akzent) 12%, transparent); border-radius: 8px; }

.hinweis {
  background: color-mix(in srgb, var(--akzent) 12%, var(--karte)); border-radius: 12px;
  padding: .8em 1em; font-size: .92em; margin: .6em 0;
}
.toast {
  position: fixed; left: 50%; bottom: 5.5em; transform: translateX(-50%); background: #222; color: #fff;
  padding: .7em 1.2em; border-radius: 999px; z-index: 60; font-size: .95em; max-width: 90vw;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.aufnahme { display: flex; gap: .6em; flex-wrap: wrap; margin-top: .6em; }
.aufnahme button { flex: 1; min-width: 45%; }
.rec-punkt { width: .8em; height: .8em; border-radius: 50%; background: #e0435c; display: inline-block; animation: blinken 1s infinite; }
@keyframes blinken { 50% { opacity: .2; } }

/* ------------------------------------------------------- Verwalten/Prüfen */
.breit { max-width: 1100px; margin: 0 auto; padding: 1em; }
.links-liste { display: grid; gap: .8em; }
.link-zeile { display: flex; gap: .5em; align-items: center; flex-wrap: wrap; }
.link-zeile input { flex: 1; min-width: 200px; font-size: .85em; }
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2em; }
@media (max-width: 700px) { .zwei-spalten { grid-template-columns: 1fr; } }
.statistik { display: flex; gap: 1em; flex-wrap: wrap; }
.statistik div { background: var(--bg); border-radius: 10px; padding: .6em 1em; min-width: 110px; }
.statistik b { display: block; font-size: 1.6em; color: var(--akzent); }
.mission-zeile { display: grid; grid-template-columns: 1fr 90px auto; gap: .4em; margin-bottom: .4em; }
.verwalt-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6em; }
.foto-karte { background: var(--karte); border-radius: 10px; overflow: hidden; box-shadow: var(--schatten); font-size: .85em; }
.foto-karte img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.foto-karte .info { padding: .5em .6em; display: grid; gap: .35em; }
.foto-karte.abgelehnt img { opacity: .3; filter: grayscale(1); }
.foto-karte .knoepfe { display: flex; gap: .3em; }
.foto-karte .knoepfe button { flex: 1; padding: .45em .3em; font-size: .9em; }
.pruef-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1em; }
.pruef-raster .foto-karte img { aspect-ratio: 4/3; object-fit: contain; background: #000; }
.status { font-weight: 700; }
.status.frei { color: #2e8b57; } .status.wartet { color: #c98a12; } .status.abgelehnt { color: #c0392b; }
.druck-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1em; }
.druck-karte { display: flex; flex-direction: column; gap: .4em; font-size: .9em; }
.druck-karte p { margin: 0; flex: 1; }
.druck-bild { background: var(--bg); border-radius: 10px; height: 220px; display: flex; align-items: center; justify-content: center; padding: .6em; }
.druck-bild img { max-width: 100%; max-height: 100%; box-shadow: 0 3px 12px rgba(0,0,0,.18); }
.gruss { border-bottom: 1px solid var(--linie); padding: .8em 0; }
.gruss audio, .gruss video { width: 100%; max-height: 360px; margin-top: .4em; }
.gruss .text { white-space: pre-line; margin-top: .3em; }

/* ------------------------------------------------------------------ Wand */
body.wand { background: #000; color: #fff; overflow: hidden; height: 100vh; cursor: none; }
.wand .ebene {
  position: fixed; inset: 0; opacity: 0; transition: opacity 1.2s ease; display: flex;
  align-items: center; justify-content: center;
}
.wand .ebene.sichtbar { opacity: 1; }
.wand .hintergrund {
  position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(40px) brightness(.45); transform: scale(1.1);
}
.wand .hauptbild {
  position: relative; max-width: 92vw; max-height: 86vh; object-fit: contain;
  border-radius: 10px; box-shadow: 0 10px 60px rgba(0,0,0,.6);
  animation: zoom 9s ease-out both;
}
@keyframes zoom { from { transform: scale(1); } to { transform: scale(1.035); } }
.wand .unterschrift {
  position: fixed; left: 3vw; bottom: 3vh; font-size: 2.2vw; text-shadow: 0 2px 10px rgba(0,0,0,.7);
  display: flex; flex-direction: column; gap: .3em; align-items: flex-start; z-index: 5;
}
.wand .marke {
  background: var(--akzent); color: var(--akzent-text); border-radius: 999px; padding: .15em .7em;
  font-size: .7em; font-weight: 700; text-shadow: none;
}
.wand .marke.boost { background: #ffcc33; color: #222; }
.wand .qr-ecke {
  position: fixed; right: 2vw; bottom: 2.5vh; background: #fff; color: #222; border-radius: 14px;
  padding: .8vw; text-align: center; z-index: 6; width: 13vw; font-size: .95vw; font-weight: 600;
  box-shadow: 0 6px 30px rgba(0,0,0,.5);
}
.wand .qr-ecke img { width: 100%; display: block; }
.wand .titel-ecke {
  position: fixed; left: 3vw; top: 3vh; font-family: var(--titel); font-size: 1.6vw; z-index: 5;
  text-shadow: 0 2px 10px rgba(0,0,0,.7); opacity: .85;
}
.wand .collage {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1vw; width: 94vw; height: 84vh;
}
.wand .collage img {
  width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 10px; opacity: 0;
  animation: reinfliegen .8s ease forwards;
}
@keyframes reinfliegen { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
.wand .rangliste-folie { text-align: center; width: 60vw; }
.wand .rangliste-folie h2 { font-size: 3.5vw; margin-bottom: 1em; }
.wand .rangliste-folie ol { list-style: none; padding: 0; margin: 0; font-size: 2.4vw; }
.wand .rangliste-folie li {
  display: flex; justify-content: space-between; padding: .45em 1em; margin: .3em 0;
  background: rgba(255,255,255,.08); border-radius: 14px;
}
.wand .rangliste-folie li:first-child { background: var(--akzent); color: var(--akzent-text); font-weight: 700; }
.wand .leer { text-align: center; }
.wand .leer h1 { font-size: 4vw; }
.wand .leer img { width: 22vw; background: #fff; border-radius: 16px; padding: 1vw; margin-top: 2vh; }
.wand .polaroid {
  position: relative; margin: 0; background: #fbfaf7; padding: 1.4vh 1.4vh 0; border-radius: 3px;
  box-shadow: 0 14px 60px rgba(0,0,0,.55); transform: rotate(var(--drehung, 0deg));
  animation: polaroid-rein 1s ease-out both;
}
.wand .polaroid-bild { display: block; max-width: 80vw; max-height: 72vh; object-fit: contain; }
.wand .polaroid figcaption {
  color: #333; font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; font-size: 3.4vh;
  text-align: center; padding: 1.4vh 0 1.8vh;
}
@keyframes polaroid-rein { from { opacity: 0; transform: rotate(calc(var(--drehung) * 3)) scale(.9) translateY(4vh); } }
.konfetti { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.konfetti i {
  position: absolute; top: -3vh; width: .8vw; height: 1.3vw; border-radius: 2px; opacity: .95;
  animation: konfetti-fall linear forwards;
}
@keyframes konfetti-fall {
  to { transform: translate(var(--x), 110vh) rotate(720deg); opacity: .8; }
}
.banner, .ticker {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 21; font-weight: 700;
  border-radius: 999px; box-shadow: 0 8px 30px rgba(0,0,0,.4); transition: opacity .6s, transform .6s;
  animation: banner-rein .5s ease-out both; white-space: nowrap;
}
.banner { top: 8vh; background: #ffcc33; color: #222; font-size: 2.6vw; padding: .5em 1.2em; }
.ticker { top: 2.5vh; background: rgba(255,255,255,.92); color: #222; font-size: 1.3vw; padding: .45em 1.1em; }
.banner.weg, .ticker.weg { opacity: 0; transform: translateX(-50%) translateY(-2vh); }
@keyframes banner-rein { from { opacity: 0; transform: translateX(-50%) translateY(-3vh) scale(.9); } }
.wand .missions-folie { text-align: center; width: 64vw; }
.wand .missions-folie h2 { font-size: 3.6vw; margin-bottom: .2em; }
.wand .missions-folie p { font-size: 1.6vw; opacity: .85; margin: 0 0 1.2em; }
.wand .missions-folie ul { list-style: none; padding: 0; margin: 0; font-size: 2vw; text-align: left; }
.wand .missions-folie li {
  display: flex; justify-content: space-between; gap: 1em; padding: .45em .9em; margin: .3em 0;
  background: rgba(255,255,255,.08); border-radius: 12px;
}
.wand .missions-folie b { color: var(--akzent); }
.wand .start-hinweis {
  position: fixed; top: 1em; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.15);
  padding: .5em 1em; border-radius: 999px; font-size: .9em; z-index: 9; cursor: pointer;
}
