/* ============================================================
   Photobox Gallery – Public Pages
   Ruhig, editorial, „Fotos zuerst". Warme Neutrals + Bernstein.
   ============================================================ */

body { background: var(--color-surface-2); }
main { display: block; }

/* ── Navigation ─────────────────────────────────────────────── */
.public-nav {
  height: var(--nav-height, 56px);
  background: color-mix(in oklch, var(--color-surface) 85%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  -webkit-backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--color-border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
}
.public-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--sp-4);
  min-width: 0;              /* sonst kann der Titel den Flex-Container sprengen */
}
.public-nav .nav-controls { flex-shrink: 0; padding-right: var(--sp-4); }
.public-nav > .container { flex: 1 1 auto; min-width: 0; }
.public-nav .nav-logo { flex: 0 1 auto; }
.nav-logo-text { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[hidden] { display: none !important; }
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text) !important;
  text-decoration: none !important;
  letter-spacing: -.02em;
}
.nav-logo img { height: 30px; width: auto; }
.nav-logo svg { color: var(--color-primary); flex-shrink: 0; }
/* Auf schmalen Displays lieber kürzen als zweizeilig über den Rand laufen */
.nav-logo {
  min-width: 0; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .nav-logo { font-size: var(--text-sm); gap: var(--sp-2); }
}

.nav-links { display: flex; align-items: center; gap: var(--sp-1); }
.nav-link {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--text-sm);
  color: var(--color-text-2);
  border-radius: var(--r-md);
  transition: background var(--t), color var(--t);
  text-decoration: none !important;
}
.nav-link:hover { background: var(--color-surface-3); color: var(--color-text); }

/* Nav controls (Sprache / Theme) — sichtbar auf hellem Grund */
.nav-controls { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.nav-ctl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 var(--sp-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  color: var(--color-text-2);
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.nav-ctl:hover { color: var(--color-text); border-color: var(--color-text-muted); background: var(--color-surface-3); }
.nav-ctl.is-icon { width: 32px; padding: 0; }

/* ── Footer ─────────────────────────────────────────────────── */
.public-footer {
  border-top: 1px solid var(--color-border-subtle);
  padding: var(--sp-8) 0;
  background: var(--color-surface);
  margin-top: var(--sp-16);
}
.public-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}
.footer-links { display: flex; align-items: center; gap: var(--sp-6); flex-wrap: wrap; }
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--t);
}
.footer-links a:hover { color: var(--color-text); }
.footer-powered { font-size: var(--text-xs); color: var(--color-text-muted); }
.footer-powered a { color: inherit; }
.footer-powered a:hover { color: var(--color-primary); }

/* ── Hero ───────────────────────────────────────────────────── */
/* Ohne Bild: ruhiger, typografischer Kopf auf warmem Grund.
   Mit Bild (.hero-bg vorhanden): dunkle Bühne, heller Text. */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; width: 100%; padding: var(--sp-16) 0 var(--sp-12); }
.hero-content h1 {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.035em;
  line-height: 1.08;
  margin-bottom: var(--sp-3);
}
.hero-content p {
  font-size: var(--text-lg);
  color: var(--color-text-2);
  max-width: 560px;
  line-height: 1.6;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04);
}
.hero-overlay { position: absolute; inset: 0; z-index: 1; }

/* Bild-Variante */
.hero:has(.hero-bg) { min-height: 380px; align-items: flex-end; background: oklch(0.16 0.006 75); }
.hero:has(.hero-bg) .hero-overlay {
  background: linear-gradient(to top, oklch(0.12 0.01 75 / .82) 0%, oklch(0.12 0.01 75 / .28) 45%, oklch(0.12 0.01 75 / .12) 100%);
}
.hero:has(.hero-bg) .hero-content h1 { color: #fff; }
.hero:has(.hero-bg) .hero-content p { color: rgba(255,255,255,.86); }

/* ── Events Grid ────────────────────────────────────────────── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--sp-5);
}
.event-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none !important;
  transition: box-shadow var(--t-med), border-color var(--t-med), transform var(--t-med);
  color: var(--color-text);
}
.event-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
  transform: translateY(-2px);
}
.event-card-cover {
  aspect-ratio: 3 / 2;
  background: var(--color-surface-3);
  overflow: hidden;
  position: relative;
}
.event-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.event-card:hover .event-card-cover img { transform: scale(1.035); }
.event-card-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-border);
  background: var(--color-surface-3);
}
.event-card-body { padding: var(--sp-4) var(--sp-4) var(--sp-5); flex: 1; }
.event-card-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--color-text);
  letter-spacing: -.015em;
  line-height: 1.3;
}
.event-card-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex; align-items: center; gap: var(--sp-2);
}

.event-featured-badge {
  position: absolute; top: 8px; left: 8px; z-index: 10;
  background: var(--color-primary); color: var(--color-on-primary);
  font-size: 0.68rem; font-weight: 700; padding: 3px 9px;
  border-radius: var(--r-full); text-transform: uppercase; letter-spacing: .05em;
}

/* ── Neutrale Landing (keine Galerien gelistet) ─────────────── */
.landing-hint {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
}
.landing-hint-icon {
  width: 56px; height: 56px;
  margin: 0 auto var(--sp-5);
  border-radius: var(--r-xl);
  background: var(--color-primary-bg);
  color: var(--color-primary-text);
  display: flex; align-items: center; justify-content: center;
}
.landing-hint-icon svg { width: 28px; height: 28px; }
.landing-hint h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--color-text);
  margin-bottom: var(--sp-3);
}
.landing-hint p {
  font-size: var(--text-base);
  color: var(--color-text-2);
  line-height: 1.6;
}

/* Code-Suche */
.code-finder { margin-top: var(--sp-8); text-align: left; }
.code-finder-label {
  display: block; font-size: var(--text-sm); font-weight: 600;
  color: var(--color-text-2); margin-bottom: var(--sp-2); text-align: center;
}
.code-finder-row { display: flex; gap: var(--sp-2); justify-content: center; }
.code-input {
  flex: 1; max-width: 220px; height: 44px;
  padding: 0 var(--sp-4);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: var(--text-lg); font-weight: 600;
  letter-spacing: .18em; text-align: center; text-transform: uppercase;
  color: var(--color-text);
  transition: border-color var(--t), box-shadow var(--t);
}
.code-input:focus { outline: none; border-color: var(--color-primary); box-shadow: var(--shadow-focus); }
.code-input::placeholder { letter-spacing: .05em; font-weight: 400; color: var(--color-text-muted); }
.code-finder-row .btn { height: 44px; }
.code-error {
  margin-top: var(--sp-3); text-align: center;
  font-size: var(--text-sm); color: var(--color-danger);
}

/* ── Gallery Header ─────────────────────────────────────────── */
.gallery-body { background: var(--color-surface); }
.gallery-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: var(--sp-8) 0 var(--sp-6);
}
.gallery-header .container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}
.gallery-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 4px;
  line-height: 1.15;
}
.gallery-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: flex; align-items: center; gap: var(--sp-3);
}
.gallery-meta span + span::before { content: "·"; margin-right: var(--sp-3); color: var(--color-border); }
.gallery-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

/* „Meine Aufnahmen" in der Kopfzeile: auf schmalen Geräten nur das Symbol */
@media (max-width: 560px) { .nav-ctl-label { display: none; } }

/* Ablauf-Countdown: freundlicher Hinweis, keine Warnfarbe-Panik */
.gallery-expiry {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: var(--r-full);
  background: var(--color-primary-bg); color: var(--color-primary-text);
  font-weight: 600;
}
.gallery-meta .gallery-expiry + span::before,
.gallery-meta span + .gallery-expiry::before { content: none; margin: 0; }

/* Bannerbild der Galerie (Branding pro Event) */
.gallery-banner { background: var(--color-surface); line-height: 0; }
.gallery-banner img {
  width: 100%; max-height: 260px; object-fit: cover; display: block;
}
@media (max-width: 640px) { .gallery-banner img { max-height: 150px; } }

/* Filter / Auswahl-Toolbar */
.gallery-toolbar {
  background: color-mix(in oklch, var(--color-surface) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: var(--sp-3) 0;
  position: sticky;
  top: var(--nav-height, 56px);
  z-index: 50;
}
.gallery-toolbar .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
}
.filter-group {
  display: flex; align-items: center; gap: 2px;
  background: var(--color-surface-3);
  border-radius: var(--r-md);
  padding: 3px;
  flex-wrap: wrap;
}
.filter-btn {
  height: 30px; padding: 0 var(--sp-4);
  font-size: var(--text-xs); font-weight: 500;
  border-radius: 6px; border: none;
  background: transparent; color: var(--color-text-2);
  cursor: pointer; transition: background var(--t), color var(--t); white-space: nowrap;
}
.filter-btn:hover { color: var(--color-text); }
.filter-btn.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-xs);
}

/* ── Auswahl-Leiste („Meine Auswahl") ───────────────────────── */
.selection-bar {
  border-bottom: 1px solid var(--color-border-subtle);
  padding: var(--sp-3) 0;
  transition: background var(--t);
}
.selection-bar.is-active {
  background: color-mix(in oklch, var(--color-primary) 8%, var(--color-surface));
  position: sticky; top: var(--nav-height, 56px); z-index: 51;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.selection-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
}
.selection-lead { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.selection-hint { font-size: var(--text-sm); color: var(--color-text-2); }
.selection-count { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
.selection-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
@media (max-width: 560px) {
  .selection-hint { display: none; }
  .selection-bar-inner { justify-content: center; }
}

/* Checkbox-Overlay auf dem Foto im Auswahlmodus */
.photo-item.selectable { cursor: pointer; }
.photo-item .photo-select-cb {
  position: absolute; top: 8px; left: 8px;
  width: 22px; height: 22px; cursor: pointer; z-index: 6;
  accent-color: var(--color-primary);
  border-radius: 6px;
  box-shadow: 0 1px 3px oklch(0.15 0.01 75 / .4);
}
.photo-item.selectable::after {
  content: ""; position: absolute; inset: 0;
  border: 2px solid transparent; border-radius: inherit;
  transition: border-color var(--t), background var(--t);
  pointer-events: none; z-index: 4;
}
.photo-item.is-selected::after {
  border-color: var(--color-primary);
  background: color-mix(in oklch, var(--color-primary) 14%, transparent);
}

/* ── Masonry Photo Grid ─────────────────────────────────────── */
.photo-grid { columns: 4; column-gap: 6px; padding: var(--sp-4) 0 var(--sp-8); }
@media (max-width: 1100px) { .photo-grid { columns: 3; } }
@media (max-width: 700px)  { .photo-grid { columns: 2; column-gap: 5px; } }
@media (max-width: 340px)  { .photo-grid { columns: 1; } }

.photo-item {
  break-inside: avoid;
  margin-bottom: 6px;
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  background: var(--color-surface-3);
  display: block;
  text-decoration: none !important;
  box-shadow: 0 1px 2px oklch(0.3 0.02 75 / .04);
}
.photo-item img { width: 100%; height: auto; display: block; transition: transform var(--t-med), filter var(--t-med); }
.photo-item:hover img { transform: scale(1.03); filter: brightness(.94); }
.photo-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, oklch(0.15 0.01 75 / .55) 0%, transparent 55%);
  opacity: 0; transition: opacity var(--t);
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: var(--sp-3); gap: var(--sp-2);
}
.photo-item:hover .photo-item-overlay { opacity: 1; }
/* runde Icon-Buttons auf dem Bild */
.photo-item-overlay .btn {
  height: 32px; width: 32px; padding: 0;
  border-radius: var(--r-full);
  background: color-mix(in oklch, var(--color-surface) 92%, transparent);
  border: none; color: var(--color-text);
  box-shadow: var(--shadow-sm); backdrop-filter: blur(4px);
}
.photo-item-overlay .btn:hover { background: var(--color-surface); }

/* Like-Button: Herz + Zähler, gefüllt wenn geliked */
.photo-item-overlay .btn.pb-like {
  width: auto; min-width: 32px; padding: 0 10px; gap: 5px;
  color: var(--color-text);
}
.pb-like.is-liked { color: #e0245e; }
.pb-like .pb-like-count { font-size: 11.5px; font-weight: 700; line-height: 1; }
.pb-like[hidden] { display: none; }
@keyframes pbHeartPop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
.pb-like.pb-pop svg { animation: pbHeartPop .32s ease; }

/* ── Download-Größenwahl ────────────────────────────────────── */
.dl-sheet {
  position: fixed; inset: 0; z-index: 1300;
  display: flex; align-items: flex-end; justify-content: center;
  background: oklch(0.15 0.01 75 / .5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: dlFade .18s ease;
}
.dl-sheet[hidden] { display: none; }
@keyframes dlFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes dlUp   { from { transform: translateY(14px) } to { transform: none } }

.dl-sheet-panel {
  width: 100%; max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: var(--sp-5) var(--sp-5) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-lg);
  animation: dlUp .2s ease;
}
@media (min-width: 560px) {
  .dl-sheet { align-items: center; }
  .dl-sheet-panel { border-radius: var(--r-lg); }
}
.dl-sheet-title {
  font-size: var(--text-base); font-weight: 600;
  margin: 0 0 var(--sp-4); text-align: center;
}
.dl-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left;
  padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-2);
  background: var(--color-surface-3);
  border: 1px solid transparent; border-radius: var(--r-md);
  cursor: pointer; transition: background var(--t), border-color var(--t);
}
.dl-opt:hover, .dl-opt:focus-visible {
  background: color-mix(in oklch, var(--color-primary) 12%, var(--color-surface-3));
  border-color: var(--color-primary);
}
.dl-opt-main { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
.dl-opt-hint { font-size: var(--text-xs); color: var(--color-text-muted); }
.dl-sheet-note {
  font-size: var(--text-xs); color: var(--color-text-muted);
  text-align: center; margin: var(--sp-3) 0 var(--sp-2);
}
.dl-sheet-cancel { width: 100%; justify-content: center; }

/* ── Toast (Feedback, z.B. „Link kopiert") ──────────────────── */
.pb-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px);
  z-index: 1200;
  background: var(--color-text); color: var(--color-surface);
  padding: 10px 18px; border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-med), transform var(--t-med);
}
.pb-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Lightbox (eigen, offline-tauglich) ─────────────────────── */
.lb {
  position: fixed; inset: 0; z-index: 1000;
  display: none;
  background: oklch(0.14 0.006 75 / .96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity var(--t-med);
}
.lb.open { display: block; opacity: 1; }
.lb-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 64px 72px;
}
.lb-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px oklch(0 0 0 / .5);
  user-select: none;
  animation: lb-in var(--t-med) var(--ease);
}
@keyframes lb-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

.lb-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  color: oklch(0.96 0.004 80);
  z-index: 2;
  background: linear-gradient(to bottom, oklch(0.12 0.01 75 / .55), transparent);
}
.lb-counter { font-size: var(--text-sm); font-variant-numeric: tabular-nums; letter-spacing: .04em; opacity: .9; }
.lb-tools { display: flex; align-items: center; gap: var(--sp-2); }
.lb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: none; border-radius: var(--r-full);
  background: oklch(1 0 0 / .10); color: #fff;
  cursor: pointer; transition: background var(--t);
}
.lb-btn:hover { background: oklch(1 0 0 / .20); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
}
.lb-prev { left: max(var(--sp-4), env(safe-area-inset-left)); }
.lb-next { right: max(var(--sp-4), env(safe-area-inset-right)); }
@media (max-width: 640px) {
  .lb-stage { padding: 56px 12px; }
  .lb-nav { width: 42px; height: 42px; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
}

/* ── Subscribe ──────────────────────────────────────────────── */
.subscribe-section {
  margin-top: var(--sp-12);
  padding: var(--sp-10) var(--sp-8);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-xl);
  text-align: center;
}

/* ── Password Page ──────────────────────────────────────────── */
.password-page {
  min-height: calc(100dvh - var(--nav-height, 56px));
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-8) var(--sp-4);
  background: var(--color-surface-2);
}
.password-card {
  width: 100%; max-width: 400px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-2xl);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.password-icon {
  width: 56px; height: 56px;
  background: var(--color-primary-bg);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-5);
  color: var(--color-primary-text);
}
.password-icon svg { width: 26px; height: 26px; }
.password-card h1 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -.02em; margin-bottom: var(--sp-2); }
.password-card p { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--sp-6); }

/* ── Legal Pages ────────────────────────────────────────────── */
.legal-page { max-width: 760px; margin: var(--sp-12) auto; }
.legal-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-lg);
  padding: var(--sp-10);
  box-shadow: var(--shadow-xs);
}
.legal-content h1, .legal-content h2, .legal-content h3 { margin-bottom: var(--sp-4); font-weight: 700; letter-spacing: -.02em; }
.legal-content h1 { font-size: var(--text-2xl); }
.legal-content h2 { font-size: var(--text-xl); margin-top: var(--sp-8); }
.legal-content h3 { font-size: var(--text-lg); margin-top: var(--sp-6); }
.legal-content p { margin-bottom: var(--sp-4); color: var(--color-text-2); }
.legal-content ul, .legal-content ol { margin: var(--sp-4) 0 var(--sp-4) var(--sp-6); }
.legal-content li { margin-bottom: var(--sp-2); color: var(--color-text-2); }

/* ── Kiosk Mode ─────────────────────────────────────────────── */
/* ── Slideshow (Beamer / Screen am Event) ───────────────────── */
.ss-body {
  background: #000; color: #fff; margin: 0;
  height: 100dvh; overflow: hidden;
  font-family: var(--font-sans, system-ui, sans-serif);
}
.ss-body.ss-idle { cursor: none; }

.ss-stage { position: fixed; inset: 0; z-index: 0; background: #000; }
.ss-layer {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .9s ease;
}
.ss-layer.is-active { opacity: 1; }

/* Unscharfe Kopie füllt den Rahmen, damit hoch- und quer-formatige Fotos
   ohne schwarze Balken wirken – das scharfe Bild bleibt unbeschnitten. */
.ss-backdrop {
  position: absolute; inset: -6%;
  background-size: cover; background-position: center;
  filter: blur(38px) brightness(.42) saturate(1.15);
  transform: scale(1.1);
}
.ss-photo {
  position: absolute; inset: 0; margin: auto;
  max-width: 92%; max-height: 92%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 80px oklch(0 0 0 / .65);
}
@keyframes ssKenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.045); }
}
.ss-photo.ss-kb { animation: ssKenBurns 7s ease-out forwards; }
@media (prefers-reduced-motion: reduce) {
  .ss-photo.ss-kb { animation: none; }
  .ss-layer { transition: none; }
}

/* Ecke mit QR + Code */
.ss-corner {
  position: fixed; right: 2.2vw; bottom: 2.2vw; z-index: 10;
  display: flex; align-items: center; gap: 18px;
  padding: 16px 22px 16px 16px;
  background: oklch(0 0 0 / .5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid oklch(1 0 0 / .14);
  border-radius: 18px;
  transition: opacity .4s ease;
}
.ss-idle .ss-corner { opacity: .82; }
.ss-qr {
  width: clamp(96px, 9vw, 150px); height: auto; display: block;
  background: #fff; padding: 8px; border-radius: 10px;
}
.ss-corner-text { max-width: 30ch; }
.ss-event { font-size: clamp(1rem, 1.5vw, 1.5rem); font-weight: 700; letter-spacing: -.02em; }
.ss-hint  { font-size: clamp(.8rem, 1vw, 1rem); opacity: .8; margin-top: 4px; line-height: 1.35; }
.ss-code {
  margin-top: 10px; display: inline-block;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: clamp(1rem, 1.6vw, 1.6rem); font-weight: 700; letter-spacing: .16em;
  padding: 4px 12px; border-radius: 8px;
  background: oklch(1 0 0 / .14);
}

/* Leerzustand */
.ss-empty {
  position: fixed; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 5vw;
  background: radial-gradient(ellipse at center, oklch(0.22 0.008 75), oklch(0.10 0.004 75));
}
.ss-empty[hidden] { display: none; }
.ss-empty svg { opacity: .5; }
.ss-empty h1 { font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 700; margin: 0; }
.ss-empty p  { opacity: .65; max-width: 46ch; margin: 0; font-size: clamp(.9rem, 1.2vw, 1.1rem); }

/* Hinweise / Status */
.ss-badge, .ss-paused {
  position: fixed; top: 2.2vw; left: 2.2vw; z-index: 12;
  padding: 9px 18px; border-radius: 999px;
  font-size: clamp(.8rem, 1.1vw, 1rem); font-weight: 600;
  background: var(--color-primary, oklch(0.72 0.135 72)); color: #1a1206;
  box-shadow: 0 6px 24px oklch(0 0 0 / .4);
}
.ss-paused { background: oklch(1 0 0 / .18); color: #fff; backdrop-filter: blur(10px); }
.ss-badge[hidden], .ss-paused[hidden] { display: none; }

.ss-help {
  position: fixed; top: 2.2vw; right: 2.2vw; z-index: 12;
  font-size: .8rem; opacity: 0; transition: opacity .3s ease;
  padding: 7px 14px; border-radius: 999px;
  background: oklch(0 0 0 / .45); backdrop-filter: blur(10px);
}
.ss-help.is-visible { opacity: .75; }

.ss-progress { position: fixed; left: 0; right: 0; bottom: 0; height: 3px; z-index: 12; background: oklch(1 0 0 / .1); }
.ss-progress-bar { height: 100%; width: 0; background: var(--color-primary, oklch(0.72 0.135 72)); }

.kiosk-body { background: #000; color: #fff; min-height: 100dvh; overflow: hidden; }
.kiosk-slideshow { position: fixed; inset: 0; z-index: 0; }
.kiosk-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s var(--ease); transform: scale(1.04);
}
.kiosk-slide.active { opacity: 1; }
.kiosk-overlay {
  position: fixed; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at center, oklch(0.1 0.01 75 / .15) 0%, oklch(0.08 0.01 75 / .7) 100%);
}
.kiosk-content {
  position: relative; z-index: 2; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--sp-8); text-align: center;
}
.kiosk-qr {
  background: #fff; border-radius: var(--r-2xl);
  padding: var(--sp-5); margin-bottom: var(--sp-6);
  box-shadow: 0 24px 64px oklch(0 0 0 / .45);
}
.kiosk-qr img { width: 200px; height: 200px; display: block; }
.kiosk-title { font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.04em; margin-bottom: var(--sp-3); text-shadow: 0 2px 20px oklch(0 0 0 / .45); }
.kiosk-hint { font-size: var(--text-lg); opacity: .8; }

/* ── Print QR ───────────────────────────────────────────────── */
@media print {
  .public-nav, .public-footer { display: none; }
  body { background: #fff; }
}
.print-qr-card {
  max-width: 560px; margin: var(--sp-12) auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-2xl);
  padding: var(--sp-12) var(--sp-10);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.print-qr-logo { height: 40px; width: auto; margin: 0 auto var(--sp-6); }
.print-qr-title {
  font-size: var(--text-2xl); font-weight: 800; letter-spacing: -.03em;
  margin-bottom: var(--sp-2); color: var(--color-text);
}
.print-qr-sub { color: var(--color-text-2); font-size: var(--text-base); margin-bottom: var(--sp-8); }
/* QR im ruhigen Rahmen — klar abgesetzt */
.print-qr-frame {
  display: inline-flex; margin: 0 auto var(--sp-6);
  padding: var(--sp-4); background: #fff;
  border: 1px solid var(--color-border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}
.print-qr-frame img { display: block; width: 260px; height: 260px; }
/* Galerie-Link: groß, dunkel, klar lesbar, tappbar */
.print-qr-link {
  display: block; margin: 0 auto var(--sp-6); max-width: 420px;
  padding: var(--sp-3) var(--sp-5);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  color: var(--color-text) !important;
  font-size: var(--text-md); font-weight: 600;
  letter-spacing: -.01em; word-break: break-all; line-height: 1.4;
  text-decoration: none !important;
  transition: border-color var(--t), background var(--t);
}
.print-qr-link:hover { border-color: var(--color-primary); background: var(--color-primary-bg); }
.print-qr-code {
  margin: calc(-1 * var(--sp-2)) 0 var(--sp-6); font-size: var(--text-sm);
  color: var(--color-text-2); letter-spacing: .01em;
}
.print-qr-code strong {
  font-family: var(--font-mono); letter-spacing: .15em; color: var(--color-text);
  font-size: var(--text-base);
}
.print-qr-actions { display: flex; justify-content: center; gap: var(--sp-3); margin-bottom: var(--sp-6); flex-wrap: wrap; }
#copyBtn.is-copied { border-color: var(--color-primary); color: var(--color-primary-text); background: var(--color-primary-bg); }
.print-qr-back { display: inline-block; font-size: var(--text-sm); color: var(--color-text-muted); }
@media print {
  .print-qr-actions, .print-qr-back { display: none; }
  .print-qr-card { box-shadow: none; border: none; }
}

/* ── Setup Wizard ───────────────────────────────────────────── */
.setup-page {
  min-height: 100dvh;
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--color-primary-bg) 0%, transparent 60%),
    var(--color-surface-2);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-8) var(--sp-4);
}
.setup-card {
  width: 100%; max-width: 540px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.setup-header {
  padding: var(--sp-8) var(--sp-8) var(--sp-6);
  border-bottom: 1px solid var(--color-border-subtle);
}
.setup-header h1 { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -.03em; margin-bottom: var(--sp-1); }
.setup-header p { color: var(--color-text-muted); font-size: var(--text-sm); }
.setup-body { padding: var(--sp-8); }
.setup-footer { padding: var(--sp-5) var(--sp-8) var(--sp-8); }

/* ── Login Page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100dvh;
  background:
    radial-gradient(1000px 460px at 50% -10%, var(--color-primary-bg) 0%, transparent 60%),
    var(--color-surface-2);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-6) var(--sp-4);
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-2xl);
  padding: var(--sp-10) var(--sp-8);
  box-shadow: var(--shadow-lg);
}
.login-logo {
  width: 48px; height: 48px;
  background: var(--color-primary);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.login-logo svg { width: 24px; height: 24px; color: var(--color-on-primary); }
.login-card h1 { font-size: var(--text-xl); font-weight: 700; text-align: center; letter-spacing: -.02em; margin-bottom: var(--sp-2); }
.login-card .subtitle { text-align: center; font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--sp-8); }

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--color-surface);
}
.faq-item { border-bottom: 1px solid var(--color-border-subtle); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  font-weight: 600; cursor: pointer; list-style: none;
  background: var(--color-surface); transition: background var(--t);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { background: var(--color-surface-2); }
details[open] .faq-question { background: var(--color-surface-2); }
details[open] .faq-chevron { transform: rotate(180deg); }
.faq-chevron { flex-shrink: 0; color: var(--color-text-muted); transition: transform var(--t); }
.faq-answer { padding: var(--sp-4) var(--sp-5) var(--sp-5); background: var(--color-surface); line-height: 1.7; color: var(--color-text-2); }
.faq-answer p { margin: 0 0 var(--sp-3); }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer a { color: var(--color-link); }

/* ── Guest upload drop zone ─────────────────────────────────── */
.upload-drop-zone {
  border: 1.5px dashed var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  color: var(--color-text-2);
  transition: border-color var(--t), background var(--t);
}
.upload-drop-zone svg { width: 30px; height: 30px; margin: 0 auto var(--sp-3); color: var(--color-text-muted); }
.upload-drop-zone.drag-over { border-color: var(--color-primary); background: var(--color-primary-bg); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .events-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .gallery-header .container { flex-direction: column; align-items: flex-start; }
  .legal-content { padding: var(--sp-6); }
  .hero-content { padding: var(--sp-12) 0 var(--sp-10); }
}
@media (max-width: 480px) {
  .events-grid { grid-template-columns: 1fr; }
}

/* Box-Uploads: Video-Kennzeichen, feste Seitenverhältnisse gegen Layout-Sprünge */
.photo-item img { aspect-ratio: attr(width) / attr(height); }
.photo-play { position:absolute; left:10px; bottom:10px; width:34px; height:34px; border-radius:50%; display:grid; place-items:center;
  background:rgba(12,12,14,.62); color:#fff; pointer-events:none; }
.photo-item { position: relative; }

/* ── Galerie-Einstellungen je Event ─────────────────────────── */
.photo-grid.pg-gap-s { column-gap: 3px; } .photo-grid.pg-gap-s .photo-item { margin-bottom: 3px; }
.photo-grid.pg-gap-l { column-gap: 14px; } .photo-grid.pg-gap-l .photo-item { margin-bottom: 14px; }
.photo-grid.pg-square .photo-item, .photo-grid.pg-square .photo-item img { border-radius: 0; }
.photo-grid.pg-round .photo-item { border-radius: 10px; overflow: hidden; }
@media (min-width: 701px) {
  .photo-grid--masonry.pg-size-s { columns: 6; } .photo-grid--masonry.pg-size-l { columns: 3; }
}
.photo-grid--grid { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.photo-grid--grid.pg-size-s { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photo-grid--grid.pg-size-l { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.photo-grid--grid.pg-gap-s { gap: 3px; } .photo-grid--grid.pg-gap-l { gap: 14px; }
.photo-grid--grid .photo-item { margin: 0; aspect-ratio: 1; }
.photo-grid--grid .photo-item img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .photo-grid--grid { grid-template-columns: repeat(2, 1fr); } .photo-grid--grid.pg-size-l { grid-template-columns: 1fr; } }
.photo-grid--list { columns: 1; max-width: 900px; margin: 0 auto; }
.photo-grid--list .photo-item { margin-bottom: 18px; }
.photo-tag { position: absolute; top: 10px; left: 10px; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.9); pointer-events: none; }
.photo-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); pointer-events: none; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 0; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--color-border-subtle); background: var(--color-surface); color: var(--color-text-2); font-size: 13px; cursor: pointer; }
.tag-chip.active { color: var(--color-text); border-color: var(--color-text); }
.tag-chip i, .tag-menu i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tag-menu { position: absolute; z-index: 300; display: grid; gap: 2px; padding: 6px; border-radius: 12px; background: var(--color-surface); box-shadow: 0 12px 40px -10px rgba(0,0,0,.35); border: 1px solid var(--color-border-subtle); }
.tag-menu button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px; border: 0; background: none; border-radius: 8px; font-size: 14px; color: var(--color-text); cursor: pointer; text-align: left; }
.tag-menu button:hover { background: var(--color-surface-3); }
/* Touchgeräte: Aktionen immer sichtbar (kein Hover) */
@media (hover: none) {
  .photo-item-overlay { opacity: 1 !important; background: linear-gradient(transparent 55%, rgba(0,0,0,.45)); }
  .photo-item-overlay .btn { width: 36px; height: 36px; }
}
