/* Download- und Archivseiten: mobil zuerst, keine externen Schriften. */

:root {
  --bg: #0f0f12;
  --card: #1a1a20;
  --fg: #f4f4f6;
  --muted: #a3a3ad;
  --accent: #3d7eff;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6f8;
    --card: #ffffff;
    --fg: #16161a;
    --muted: #5c5c66;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'DejaVu Sans',
    sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.wrap.wide {
  max-width: 1200px;
}

.event h1 {
  margin: 8px 0 0;
  font-size: clamp(1.3rem, 5vw, 2rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.event .motto {
  margin: 4px 0 0;
  color: var(--muted);
}

.photo {
  margin: 16px 0;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--card);
}

.photo figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
}

.hint {
  margin: 16px 0;
  color: var(--muted);
}

.hint summary {
  cursor: pointer;
}

.expires {
  color: var(--muted);
}

a {
  color: var(--accent);
}

footer {
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

.search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
}

.search label {
  width: 100%;
  color: var(--muted);
  font-size: 0.9rem;
}

.search input {
  flex: 1 1 140px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--muted);
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 16px; /* verhindert Zoom unter iOS */
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thumbs a {
  position: relative;
  display: block;
}

.thumbs img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--card);
}

.thumbs .label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.85rem;
}

.more {
  text-align: center;
  margin: 24px 0;
}

.message {
  text-align: center;
  padding-top: 20vh;
}
