/* WILD Web-App — Handy-zuerst, eigenstaendiger Boulevard-Look.
   Keine echte Marke, eigener Titel & eigene Gestaltung. */

:root {
  --rot: #e3000f;
  --gelb: #ffe000;
  --schwarz: #111;
  --bg: #f4f1ea;
  --karte: #ffffff;
  --text: #15110e;
  --grau: #6b6b6b;
  --linie: #e2ddd2;
  --fs: 1.12rem;          /* per Schriftgroessen-Button steuerbar */
  --maxw: 680px;
}
[data-theme="dark"] {
  --bg: #14110d;
  --karte: #1f1b16;
  --text: #f2ece0;
  --grau: #a59c8c;
  --linie: #322c23;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--fs);
  line-height: 1.5;
}
img { display: block; max-width: 100%; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: var(--rot); color: #fff;
  padding: env(safe-area-inset-top) 0 0;
  box-shadow: 0 2px 0 var(--schwarz);
}
.masthead-row {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 6px 14px 0;
}
.logo {
  font-family: "Arial Black", Arial, sans-serif;
  font-weight: 900; font-style: italic;
  font-size: 2.6rem; letter-spacing: -1px;
  margin: 0; color: #fff;
  text-shadow: 2px 2px 0 var(--schwarz);
}
.masthead-tools { display: flex; gap: 8px; }
.tool-btn {
  background: #fff; color: var(--schwarz);
  border: 2px solid var(--schwarz); border-radius: 8px;
  font-weight: 900; font-size: 1rem; line-height: 1;
  min-width: 40px; height: 38px; padding: 0 8px; cursor: pointer;
}
.tool-btn span { font-size: 0.7em; }
.masthead-sub {
  max-width: var(--maxw); margin: 2px auto 6px; padding: 0 14px;
  font-family: Arial, sans-serif; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--gelb);
}

/* ---------- Rubriken-Tabs ---------- */
.tabs {
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  max-width: var(--maxw); margin: 0 auto; padding: 0 10px 8px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; white-space: nowrap; cursor: pointer;
  background: var(--schwarz); color: #fff;
  border: none; border-radius: 999px;
  font-family: Arial, sans-serif; font-weight: 800; font-size: 0.85rem;
  padding: 8px 14px;
}
.tab[aria-selected="true"] { background: var(--gelb); color: var(--schwarz); }

/* ---------- Feed ---------- */
.feed { max-width: var(--maxw); margin: 0 auto; padding: 14px 12px 40px; }
.loading { text-align: center; color: var(--grau); padding: 40px 0; }

.intro {
  background: var(--gelb); color: var(--schwarz);
  border: 3px solid var(--schwarz); border-radius: 10px;
  padding: 12px 14px; margin: 0 0 16px;
  font-family: Arial, sans-serif; font-weight: 700; text-align: center;
}

.card {
  background: var(--karte); border: 1px solid var(--linie);
  border-radius: 12px; overflow: hidden; margin: 0 0 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card-body { padding: 14px 16px 18px; }

.kicker {
  display: inline-block; background: var(--rot); color: #fff;
  font-family: Arial, sans-serif; font-weight: 800; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.6px;
  padding: 3px 8px; border-radius: 4px; margin-bottom: 8px;
}
.hero-badge {
  display: inline-block; background: var(--gelb); color: var(--schwarz);
  font-family: Arial, sans-serif; font-weight: 900; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 1px;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 10px;
  border: 2px solid var(--schwarz);
}
.headline {
  font-family: "Arial Black", Arial, sans-serif; font-weight: 900;
  line-height: 1.06; margin: 0 0 12px; padding-bottom: 10px; color: var(--text);
  font-size: 1.55rem; border-bottom: 3px solid var(--rot);
}
.card.hero .headline { font-size: 2rem; }
.card.hero .kicker { background: var(--schwarz); }

.prose { } /* Wrapper um die Absätze */
.para { margin: 0 0 0.8em; }
.para:last-child { margin-bottom: 0; }

/* Brief-Stil (z. B. „Post von Wagner"): ruhiger, enger, persönlich */
.letter .para { margin: 0 0 0.55em; }
.letter { font-style: italic; }
.letter .para:first-child { font-style: normal; font-weight: 700; }
.dropcap::first-letter {
  float: left; font-family: "Arial Black", Arial, sans-serif;
  font-size: 3.1rem; line-height: 0.8; padding: 4px 8px 0 0; color: var(--rot);
}

/* Fotos / Galerie */
.gallery { display: grid; gap: 4px; background: var(--schwarz); }
.gallery.n1 { grid-template-columns: 1fr; }
.gallery.n2 { grid-template-columns: 1fr 1fr; }
.gallery.n3 { grid-template-columns: 1fr 1fr; }
.gallery.n3 .shot:first-child { grid-column: 1 / -1; }
.gallery.many { grid-template-columns: 1fr 1fr 1fr; }
.shot { margin: 0; position: relative; cursor: zoom-in; background: #ddd; }
.shot img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.gallery.n1 .shot img { aspect-ratio: auto; max-height: 70vh; object-fit: cover; }
.caption {
  font-family: Arial, sans-serif; font-size: 0.82rem; color: var(--grau);
  padding: 8px 16px 0; font-style: italic;
}

/* Infobox (gelb) */
.infobox {
  background: var(--gelb); color: var(--schwarz);
  border-left: 6px solid var(--schwarz);
  font-family: Arial, sans-serif; font-weight: 600;
  padding: 10px 14px; margin: 14px 0 0; border-radius: 0 8px 8px 0;
}
.infobox b { display: block; font-weight: 900; margin-bottom: 2px; text-transform: uppercase; font-size: 0.72rem; }

/* Listen: Glueckwunsch-Zitatkarten / Witze */
.quotes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.quotes li {
  background: var(--bg); border: 1px solid var(--linie);
  border-radius: 10px; padding: 12px 14px; position: relative;
}
.quotes li::before {
  content: "“"; position: absolute; top: -6px; left: 8px;
  font-size: 2.4rem; color: var(--rot); font-family: Georgia, serif;
}
.quotes li { padding-left: 34px; }
.quotes .speaker { display: block; font-family: Arial, sans-serif; font-weight: 900; color: var(--rot); margin-bottom: 3px; }
.jokes { background: var(--rot); color: #fff; border-radius: 10px; padding: 12px 16px; margin-top: 6px; }
.jokes ul { margin: 0; padding-left: 18px; }
.jokes li { margin: 0 0 8px; }

/* ---------- Reaktionen (Likes/Kommentare) ---------- */
.react { border-top: 1px solid var(--linie); margin-top: 16px; padding-top: 12px; }
.react-bar { display: flex; align-items: center; gap: 14px; }
.like-btn {
  background: none; border: 2px solid var(--rot); color: var(--rot);
  border-radius: 999px; font-weight: 800; font-size: 1rem;
  padding: 7px 16px; cursor: pointer; font-family: Arial, sans-serif;
  display: inline-flex; align-items: center; gap: 7px;
}
.like-btn.liked { background: var(--rot); color: #fff; }
.like-btn .heart { font-size: 1.15rem; }
.comment-toggle {
  background: none; border: none; color: var(--grau); cursor: pointer;
  font-family: Arial, sans-serif; font-weight: 700; font-size: 0.9rem;
  text-decoration: underline;
}
.comments { margin-top: 12px; display: none; }
.comments.open { display: block; }
.comment {
  background: var(--bg); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px;
}
.comment .who { font-family: Arial, sans-serif; font-weight: 800; font-size: 0.82rem; }
.comment .what { margin: 2px 0 0; }
.comment-form { display: grid; gap: 8px; margin-top: 8px; }
.comment-form input, .comment-form textarea {
  font-family: inherit; font-size: 0.95rem; padding: 9px 11px;
  border: 1px solid var(--linie); border-radius: 8px;
  background: var(--karte); color: var(--text);
}
.comment-form textarea { min-height: 64px; resize: vertical; }
.comment-form button {
  justify-self: start; background: var(--schwarz); color: #fff;
  border: none; border-radius: 8px; font-weight: 800; font-family: Arial, sans-serif;
  padding: 9px 18px; cursor: pointer;
}
.muted { color: var(--grau); font-size: 0.85rem; font-family: Arial, sans-serif; }

/* ---------- Footer ---------- */
.foot {
  text-align: center; color: var(--grau);
  font-family: Arial, sans-serif; font-size: 0.78rem;
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.94);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lb-img { max-width: 100vw; max-height: 84vh; object-fit: contain; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255,255,255,0.15); color: #fff;
  border: none; cursor: pointer; font-size: 2rem; line-height: 1;
  width: 48px; height: 48px; border-radius: 50%;
}
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-caption {
  position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); left: 0; right: 0;
  text-align: center; color: #fff; font-family: Arial, sans-serif;
  font-size: 0.85rem; padding: 0 20px; margin: 0;
}

/* ---------- Hitliste (Beliebt) ---------- */
.top-title {
  font-family: "Arial Black", Arial, sans-serif; font-weight: 900;
  font-size: 1.5rem; margin: 4px 0 2px; color: var(--text);
}
.top-hint { margin: 0 0 14px; color: var(--grau); font-family: Arial, sans-serif; font-size: 0.85rem; }
.charts { list-style: none; margin: 0; padding: 0; counter-reset: none; display: grid; gap: 8px; }
.chart {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: var(--karte); border: 1px solid var(--linie); border-radius: 12px;
  padding: 12px 14px;
}
.chart:active { transform: scale(0.99); }
.chart .rank {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-family: "Arial Black", Arial, sans-serif;
  font-weight: 900; font-size: 1rem; background: var(--schwarz); color: #fff;
}
.chart-mid { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.chart-title {
  font-family: "Arial Black", Arial, sans-serif; font-weight: 900; font-size: 1rem;
  line-height: 1.15; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.chart-rubrik { font-family: Arial, sans-serif; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--grau); margin-top: 2px; }
.chart-count {
  flex: 0 0 auto; font-family: Arial, sans-serif; font-weight: 900; color: var(--rot);
  font-size: 1.05rem; white-space: nowrap;
}
/* Podium: Gold/Silber/Bronze für die Top 3 */
.chart.podium { border-width: 2px; }
.chart.p1 { border-color: #e8b923; }
.chart.p1 .rank { background: #e8b923; color: #3a2e00; }
.chart.p2 { border-color: #b9c0c7; }
.chart.p2 .rank { background: #b9c0c7; color: #2b2f33; }
.chart.p3 { border-color: #cd7f4d; }
.chart.p3 .rank { background: #cd7f4d; color: #2e1500; }

/* ---------- Gästebuch ---------- */
.guestbook-form {
  background: var(--karte); border: 1px solid var(--linie); border-radius: 12px;
  padding: 14px; margin: 0 0 16px;
}
.guestbook-list { display: grid; gap: 10px; }
.guestbook-list .comment {
  border: 1px solid var(--linie);
  border-left: 5px solid var(--rot);
}

/* ---------- Wortwolke ---------- */
.wordcloud {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 4px 12px; padding: 18px 12px 28px; line-height: 1.1; text-align: center;
}
.wordcloud .word {
  font-family: "Arial Black", Arial, sans-serif; font-weight: 900;
  display: inline-block;
}
.wordcloud .word.c0 { color: var(--rot); }
.wordcloud .word.c1 { color: var(--text); }
.wordcloud .word.c2 { color: #c9a200; }
.wordcloud .word.c3 { color: var(--grau); }

/* ---------- Partyfotos ---------- */
.party-tools {
  background: var(--karte); border: 1px solid var(--linie); border-radius: 12px;
  padding: 12px; margin: 0 0 14px; display: grid; gap: 8px;
}
.party-tools input {
  font-family: inherit; font-size: 0.95rem; padding: 9px 11px;
  border: 1px solid var(--linie); border-radius: 8px; background: var(--bg); color: var(--text);
}
.party-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.party-upload {
  background: var(--rot); color: #fff; border: none; border-radius: 999px;
  font-family: Arial, sans-serif; font-weight: 800; font-size: 1rem;
  padding: 10px 18px; cursor: pointer;
}
.party-upload:disabled { opacity: 0.6; }
.party-toggle {
  background: none; border: 2px solid var(--schwarz); color: var(--text);
  border-radius: 999px; font-family: Arial, sans-serif; font-weight: 800;
  padding: 8px 14px; cursor: pointer;
}
.party-status { font-family: Arial, sans-serif; font-size: 0.85rem; color: var(--grau); }

/* Raster: gleich große Kacheln */
.party-gallery.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.party-gallery.grid .pshot { margin: 0; cursor: zoom-in; }
.party-gallery.grid .pshot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; display: block; }

/* Bildwolke: dichtes Mosaik (Spalten, unterschiedliche Höhen) */
.party-gallery.cloud { column-count: 2; column-gap: 4px; }
.party-gallery.cloud .pshot { break-inside: avoid; margin: 0 0 4px; cursor: zoom-in; }
.party-gallery.cloud .pshot img { width: 100%; height: auto; border-radius: 4px; display: block; }
@media (min-width: 480px) { .party-gallery.cloud { column-count: 3; } }

/* „Nach oben"-Knopf */
.to-top {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 30; width: 48px; height: 48px; border-radius: 50%;
  background: var(--schwarz); color: #fff; border: 2px solid #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.to-top.show { opacity: 0.92; pointer-events: auto; }

/* groessere Schrift-Stufe */
[data-fs="l"]  { --fs: 1.28rem; }
[data-fs="xl"] { --fs: 1.46rem; }
