/* Wegwerfkamera Elke & Manfred: Eisen, Glut, Film. Ruhig, große Schrift, große Knöpfe. */
:root {
  --bg: #16181b;
  --bg-2: #1e2125;
  --line: #34383e;
  --text: #f1ede6;
  --muted: #b3aea4;
  --ember: #f0923f;
  --ember-ink: #1a1109;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 400 1.125rem/1.55 var(--sans);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; margin: 0 0 0.6rem; }
h1 { font-size: clamp(2rem, 8vw, 3rem); }
h2 { font-size: 1.5rem; }
p { margin: 0 0 1rem; }
a { color: var(--ember); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }

.kicker { margin: 0 0 0.5rem; font-size: 0.9rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ember); font-weight: 600; }
.years { font-family: var(--serif); font-size: 1.4rem; color: var(--muted); margin: 0 0 1.2rem; }
.lead { color: var(--text); font-size: 1.2rem; max-width: 34rem; }
.err { color: #ffb4a2; font-weight: 600; }

/* Karten-Seiten (Anmeldung, Hinweise) */
body.plain { display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(120% 80% at 50% 0%, #262a2f 0%, var(--bg) 60%); }
.card { width: min(100%, 32rem); }
.join { display: grid; gap: 0.7rem; margin-top: 1.4rem; }
.join label { font-weight: 600; }
.join input[type="text"] {
  width: 100%; min-height: 3.6rem; padding: 0.7rem 1rem; font: inherit; font-size: 1.25rem;
  color: var(--text); background: var(--bg-2); border: 2px solid var(--line); border-radius: 0.9rem;
}
.join input[type="text"]:focus { border-color: var(--ember); outline: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.6rem; padding: 0.6rem 1.6rem; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 1.15rem var(--sans); text-decoration: none; list-style: none;
  color: var(--ember-ink); background: var(--ember);
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.btn:hover { background: #f5a45c; }
.btn:active { transform: scale(0.97); }
.btn.alt { color: var(--text); background: transparent; border: 2px solid var(--line); }
.btn.alt:hover { background: var(--bg-2); }
.btn.small { min-height: 2.8rem; padding: 0.3rem 1.1rem; font-size: 1rem; }
summary.btn::-webkit-details-marker { display: none; }

/* Kamera */
body.cam-page { background: #0e0f11; }
.cam { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 0.7rem 0 1rem; }
.cam-top { width: 100%; display: flex; justify-content: space-between; align-items: baseline; padding: 0 1.1rem 0.7rem; }
.cam-title { font-family: var(--serif); font-size: 1.25rem; }
.cam-name { color: var(--muted); font-size: 1rem; }
.viewfinder {
  position: relative; overflow: hidden; background: #000;
  height: min(64dvh, 133.33vw); aspect-ratio: 3 / 4; max-width: 100vw;
  border-radius: 0.4rem;
}
.viewfinder video { width: 100%; height: 100%; object-fit: cover; display: block; }
.viewfinder video.mirror { transform: scaleX(-1); }
.viewfinder.dead::after {
  content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #17191c 0 14px, #131517 14px 28px);
}
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#flash.on { opacity: 0.9; transition: none; }
#flash:not(.on) { transition: opacity 260ms var(--ease); }
.c { position: absolute; width: 1.6rem; height: 1.6rem; border: 0 solid rgb(255 255 255 / 0.75); pointer-events: none; }
.c1 { top: 0.7rem; left: 0.7rem; border-top-width: 2px; border-left-width: 2px; }
.c2 { top: 0.7rem; right: 0.7rem; border-top-width: 2px; border-right-width: 2px; }
.c3 { bottom: 0.7rem; left: 0.7rem; border-bottom-width: 2px; border-left-width: 2px; }
.c4 { bottom: 0.7rem; right: 0.7rem; border-bottom-width: 2px; border-right-width: 2px; }

#msg { min-height: 1.6rem; margin: 0.6rem 1.2rem 0; text-align: center; color: var(--muted); font-size: 1rem; max-width: 30rem; }
.deck { width: min(100%, 26rem); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0.4rem 1.4rem; margin-top: auto; }
.count { display: grid; justify-items: start; line-height: 1.05; }
.count strong { font: 700 2.4rem ui-monospace, Menlo, Consolas, monospace; color: var(--ember); text-shadow: 0 0 14px rgb(240 146 63 / 0.45); }
.count span { font-size: 0.85rem; color: var(--muted); }
#shutter {
  width: 5.6rem; height: 5.6rem; border-radius: 50%; border: 4px solid #e9e5dc; background: transparent; padding: 0.4rem; cursor: pointer;
  transition: transform 140ms var(--ease);
}
#shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #e9e5dc; transition: transform 140ms var(--ease), background-color 140ms var(--ease); }
#shutter:active span { transform: scale(0.88); background: var(--ember); }
#shutter:disabled { opacity: 0.4; cursor: default; }
#flip {
  justify-self: end; width: 3.6rem; height: 3.6rem; border-radius: 50%; border: 2px solid var(--line); background: var(--bg-2); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}
#flip:active { transform: scale(0.94); }
.sent { min-height: 1.4rem; margin: 0.5rem 0 0; font-size: 0.95rem; color: var(--muted); }
#fallback { margin-top: 0.8rem; }
.done { margin: 1rem 1.4rem; text-align: center; max-width: 28rem; }
.done h2 { color: var(--ember); }
[hidden] { display: none !important; }

/* Album */
body.album-page, body.host-page { padding-bottom: 3rem; }
.album-head { padding: 1.6rem 1.2rem 0.4rem; max-width: 60rem; margin: 0 auto; }
.grid { list-style: none; margin: 1rem auto 0; padding: 0 0.6rem; max-width: 70rem; display: grid; gap: 0.5rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 40rem) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .grid { grid-template-columns: repeat(4, 1fr); } }
.grid li { position: relative; }
.grid button { display: block; width: 100%; padding: 0; border: 0; border-radius: 0.6rem; overflow: hidden; background: var(--bg-2); cursor: pointer; aspect-ratio: 3 / 4; transition: transform 200ms var(--ease); }
.grid button:active { transform: scale(0.98); }
.grid img { width: 100%; height: 100%; object-fit: cover; }
.lb { position: fixed; inset: 0; z-index: 10; background: rgb(8 9 10 / 0.96); display: grid; place-items: center; padding: 3.4rem 0.6rem 4.4rem; }
.lb figure { margin: 0; text-align: center; max-width: 100%; }
.lb img { max-height: 72dvh; max-width: 100%; margin: 0 auto; border-radius: 0.4rem; }
.lb figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 1rem; }
.lb button { position: absolute; border: 0; background: rgb(255 255 255 / 0.1); color: #fff; cursor: pointer; border-radius: 50%; width: 3.4rem; height: 3.4rem; font-size: 2rem; line-height: 1; }
.lb-x { top: 0.7rem; right: 0.7rem; }
.lb-p { left: 0.5rem; top: 50%; translate: 0 -50%; }
.lb-n { right: 0.5rem; top: 50%; translate: 0 -50%; }
.lb-d { position: absolute; bottom: 1rem; left: 50%; translate: -50% 0; color: var(--text); padding: 0.7rem 1.4rem; border: 2px solid var(--line); border-radius: 999px; text-decoration: none; }
body.lb-open { overflow: hidden; }
.strip { display: flex; gap: 0.5rem; margin-top: 2rem; }
.strip i { flex: 1; aspect-ratio: 3 / 4; border-radius: 0.3rem; background: var(--bg-2); animation: dev 2.4s ease-in-out infinite; }
.strip i:nth-child(2) { animation-delay: 0.2s; } .strip i:nth-child(3) { animation-delay: 0.4s; }
.strip i:nth-child(4) { animation-delay: 0.6s; } .strip i:nth-child(5) { animation-delay: 0.8s; } .strip i:nth-child(6) { animation-delay: 1s; }
@keyframes dev { 0%, 100% { background: #202327; } 50% { background: #3b2f25; } }

/* Gastgeber */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; padding: 0 1.2rem; max-width: 60rem; margin: 1rem auto; }
.stats div { background: var(--bg-2); border-radius: 0.9rem; padding: 0.9rem; text-align: center; }
.stats strong { display: block; font: 700 1.9rem var(--serif); color: var(--ember); }
.stats span { color: var(--muted); font-size: 0.95rem; }
.panel { max-width: 60rem; margin: 1.6rem auto; padding: 0 1.2rem; }
.panel details { margin: 0.8rem 0; }
.panel summary { cursor: pointer; }
.panel details form { margin-top: 0.8rem; padding: 1rem; background: var(--bg-2); border-radius: 0.9rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 0.6rem 0.4rem; border-bottom: 1px solid var(--line); }
.del summary { cursor: pointer; font-size: 0.9rem; color: var(--muted); padding: 0.4rem 0; }
.del form { margin: 0.3rem 0 0.6rem; }

/* Aufsteller zum Drucken */
body.poster { background: #fff; color: #1a1a1a; display: grid; place-items: center; min-height: 100dvh; }
.sheet { text-align: center; padding: 2rem; max-width: 34rem; }
.sheet h1 { font-size: 3.4rem; color: #1a1a1a; }
.sheet .kicker { color: #b3551a; }
.sheet .years { color: #555; font-size: 1.6rem; }
.sheet .qr { margin: 1.4rem auto; width: 20rem; height: 20rem; }
.sheet .big { font: 600 1.6rem var(--serif); margin-bottom: 0.6rem; }
.sheet .small { color: #444; }
@media print { body.poster { min-height: 0; } @page { margin: 12mm; } }

@media (prefers-reduced-motion: reduce) {
  .strip i { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
