/* Wietzener Wochenpost – Zeitung der 1920er–1950er, nur Systemschriften (offline) */
:root {
  --papier: #e9dcbd;
  --papier-hell: #f3ead6;
  --papier-dunkel: #d9c9a3;
  --tinte: #2b2620;
  --tinte-hell: #5a5148;
  --linie: #6b6156;
  --rot: #7a2a2a;
  --kopf: "Didot", "Bodoni 72", "Bodoni 72 Oldstyle", "Playfair Display", Georgia, serif;
  --titel: "Hoefler Text", "Baskerville", "Iowan Old Style", Georgia, serif;
  --text: "Iowan Old Style", "Hoefler Text", "Baskerville", Georgia, "Times New Roman", serif;
  --maschine: "American Typewriter", "Courier New", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #3a3128;
  color: var(--tinte);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

/* ---------- Papier ---------- */
.papier {
  position: relative;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(120,90,40,.18), transparent 55%),
    var(--papier);
  color: var(--tinte);
  box-shadow: 0 12px 40px rgba(0,0,0,.45), inset 0 0 80px rgba(120,90,40,.15);
}
.papier::before {
  /* Papierkorn */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.18 0 0 0 .5 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}
.papier > * { position: relative; z-index: 1; }

/* ---------- Zeitungskopf ---------- */
.kopf { text-align: center; padding: 18px 20px 10px; }
.kopf .ueber { font-family: var(--maschine); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--tinte-hell); }
.kopf h1 {
  font-family: var(--kopf); font-weight: 400; margin: 6px 0 4px;
  font-size: clamp(38px, 8vw, 84px); line-height: 1; letter-spacing: .01em;
}
.kopf .unter { font-style: italic; font-size: 16px; margin-top: 4px; }
.kopf .leiste {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 6px 0;
  border-top: 3px double var(--linie); border-bottom: 1px solid var(--linie);
  font-family: var(--maschine); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}

/* ---------- Stapel ---------- */
.stapel-seite { max-width: 900px; margin: 24px auto 60px; padding: 0 0 40px; }
.stapel-seite .hinweis { text-align: center; font-style: italic; padding: 8px 24px 0; color: var(--tinte-hell); }
.stapel { list-style: none; margin: 30px auto 0; padding: 0 18px; max-width: 760px; }
.stapel li { margin: 0 0 18px; }
.gefaltet {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--linie); padding: 0; background: var(--papier-hell);
  box-shadow: 0 6px 14px rgba(0,0,0,.25), 0 1px 0 #fff inset;
  transform: rotate(var(--dreh, 0deg));
  transition: transform .2s;
  position: relative; overflow: hidden;
}
.gefaltet:active { transform: rotate(var(--dreh, 0deg)) scale(.99); }
.gefaltet::after {
  /* Falz */
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.25), transparent);
}
.gefaltet .mini { padding: 14px 18px 12px; border-bottom: 1px solid var(--linie); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.gefaltet .mini b { font-family: var(--kopf); font-weight: 400; font-size: 26px; }
.gefaltet .mini span { font-family: var(--maschine); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.gefaltet .teaser { padding: 12px 18px 16px; }
.gefaltet .teaser h3 { font-family: var(--titel); font-size: 22px; margin: 0 0 4px; line-height: 1.15; }
.gefaltet .teaser p { margin: 0; font-style: italic; color: var(--tinte-hell); font-size: 15px; }
.gefaltet.zu { color: var(--tinte-hell); background: var(--papier-dunkel); }
.gefaltet.zu .teaser h3 { filter: blur(4px); opacity: .5; }
.gefaltet.zu .banderole {
  position: absolute; right: -64px; bottom: 26px; transform: rotate(-32deg);
  background: var(--rot); color: var(--papier-hell); font-family: var(--maschine);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 5px 70px;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.gefaltet.gelesen .mini::after { content: "gelesen"; font-family: var(--maschine); font-size: 11px; color: var(--tinte-hell); letter-spacing: .1em; }
.gefaltet.extra { border: 2px solid var(--rot); }
.gefaltet.extra .mini b { color: var(--rot); }

/* ---------- Ausgabe ---------- */
.ausgabe { max-width: 1100px; margin: 18px auto 60px; padding: 0 0 30px; }
.inhalt { padding: 10px 28px 20px; }
@media (max-width: 600px) { .inhalt { padding: 10px 16px 20px; } }

.wetter { font-family: var(--maschine); font-size: 13px; text-align: center; padding: 8px 0; border-bottom: 1px solid var(--linie); margin-bottom: 18px; }
.wetter b { letter-spacing: .1em; text-transform: uppercase; }

.aufmacher h2 {
  font-family: var(--titel); font-weight: 700; text-align: center;
  font-size: clamp(30px, 5vw, 54px); line-height: 1.05; margin: 8px 0 8px;
}
.aufmacher .unterzeile { text-align: center; font-style: italic; font-size: 19px; margin: 0 0 16px; color: var(--tinte-hell); }
.aufmacher .text { column-count: 2; column-gap: 28px; column-rule: 1px solid var(--linie); }
@media (min-width: 900px) { .aufmacher .text { column-count: 3; } }
@media (max-width: 600px) { .aufmacher .text { column-count: 1; } }
.text p { margin: 0 0 .8em; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.text p:first-child::first-letter { font-family: var(--titel); font-size: 3.2em; float: left; line-height: .85; padding: 4px 6px 0 0; }
.ortsmarke { font-family: var(--maschine); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

/* Fotos: Schwarzweiß mit Korn, Antippen zeigt Farb-Original */
figure.foto { margin: 0 0 18px; break-inside: avoid; }
figure.foto .rahmen {
  position: relative; border: 1px solid var(--linie); padding: 6px; background: var(--papier-hell);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
figure.foto img {
  display: block; width: 100%; height: auto;
  filter: grayscale(1) contrast(1.12) brightness(1.02) sepia(.12);
}
figure.foto .rahmen::after {
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  opacity: .28; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.18 0 0 0 0 0.15 0 0 0 .8 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}
figure.foto figcaption { font-size: 14px; font-style: italic; margin-top: 6px; color: var(--tinte-hell); }
figure.foto figcaption::before { content: "Foto: "; font-style: normal; font-family: var(--maschine); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
figure.foto.gross { max-width: 760px; margin-left: auto; margin-right: auto; }
figure.foto.klein { width: 100%; }
figure.foto.links { float: left; width: 46%; margin: 4px 18px 8px 0; }
figure.foto.rechts { float: right; width: 46%; margin: 4px 0 8px 18px; }
@media (max-width: 600px) { figure.foto.links, figure.foto.rechts { float: none; width: 100%; margin: 0 0 14px; } }

/* Rubriken / Meldungen */
.spalten { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; margin-top: 24px; padding-top: 18px; border-top: 3px double var(--linie); }
@media (max-width: 700px) { .spalten { grid-template-columns: 1fr; } }
.meldung { margin-bottom: 22px; break-inside: avoid; }
.rubrik { font-family: var(--maschine); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--linie); display: inline-block; margin-bottom: 6px; }
.meldung h3 { font-family: var(--titel); font-size: 24px; line-height: 1.1; margin: 0 0 6px; }
.meldung .text p:first-child::first-letter { font-size: 1em; float: none; padding: 0; line-height: inherit; }

/* Kleinanzeigen */
.anzeigen { border: 1px solid var(--linie); padding: 12px 14px; margin-bottom: 20px; background: rgba(255,255,255,.18); }
.anzeigen h4 { font-family: var(--maschine); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; text-align: center; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--linie); }
.anzeige { font-size: 15px; padding: 8px 0; border-bottom: 1px dotted var(--linie); }
.anzeige:last-child { border-bottom: 0; }
.anzeige b { font-family: var(--maschine); font-size: 13px; }

/* Leserbrief */
.leserbrief { font-style: italic; border-left: 3px solid var(--linie); padding: 4px 0 4px 14px; margin-bottom: 20px; }
.leserbrief .von { font-style: normal; font-family: var(--maschine); font-size: 12px; margin-top: 6px; }

/* Wort des Herausgebers */
.herausgeber {
  clear: both; margin: 28px auto 0; max-width: 560px; border: 3px double var(--linie); padding: 16px 22px;
  text-align: center; background: rgba(255,255,255,.2);
}
.herausgeber h4 { font-family: var(--maschine); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 8px; }
.herausgeber p { margin: 0 0 8px; font-size: 19px; }
.herausgeber .unterschrift { font-family: "Snell Roundhand", "Savoye LET", "Zapfino", cursive; font-size: 26px; color: var(--tinte); }

/* Navigation unten */
.nav { display: flex; justify-content: space-between; gap: 12px; padding: 18px 28px 0; border-top: 1px solid var(--linie); margin-top: 26px; }
.knopf {
  background: transparent; border: 1px solid var(--tinte); padding: 10px 16px; cursor: pointer;
  font-family: var(--maschine); font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
}
.knopf.voll { background: var(--tinte); color: var(--papier-hell); }
.knopf:active { opacity: .7; }

/* ---------- Lightbox ---------- */
#lightbox { position: fixed; inset: 0; background: rgba(20,15,10,.94); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 18px; }
#lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
#lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,.6); border: 8px solid var(--papier-hell); }
#lightbox figcaption { color: var(--papier-hell); font-family: var(--maschine); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Extrablatt ---------- */
.extrablatt .kopf h1 { color: var(--rot); }
.extrablatt .aufruf { text-align: center; padding: 6px 28px 0; }
.extrablatt .aufruf h2 { font-family: var(--titel); font-size: clamp(26px, 4.5vw, 44px); margin: 6px 0; line-height: 1.1; }
.extrablatt .aufruf p { font-style: italic; margin: 0 0 12px; }
.werkzeuge { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 6px 18px 12px; }
.werkzeuge .knopf.aktiv { background: var(--tinte); color: var(--papier-hell); }
.werkzeuge .knopf.blau.aktiv { background: #1f3a6e; }
.schreibfeld { padding: 0 18px 18px; }
#leinwand {
  display: block; width: 100%; height: auto; touch-action: none;
  border: 1px solid var(--linie); background: var(--papier-hell);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, rgba(90,80,70,.35) 47px, rgba(90,80,70,.35) 48px);
  background-position: 0 24px;
}
.extrablatt .hinweis-klein { text-align: center; font-family: var(--maschine); font-size: 12px; color: var(--tinte-hell); padding: 0 18px 10px; }
