@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --gruen: #2f5d45;
  --gruen-dunkel: #21432f;
  --gruen-hell: #e8f0ea;
  --bg: #f4f1ea;
  --flaeche: #ffffff;
  --text: #1c2620;
  --text-leise: #5a6560;
  --linie: #e2dcd1;
  --bild-bg: #ffffff;
  --schatten: 0 1px 2px rgba(28, 38, 32, 0.06), 0 4px 14px rgba(28, 38, 32, 0.07);
  --radius: 14px;
  --sicher-oben: env(safe-area-inset-top, 0px);
  --sicher-unten: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1411;
    --flaeche: #171d19;
    --text: #ecefea;
    --text-leise: #a3afa7;
    --linie: #2c3630;
    --gruen-hell: #1c2a22;
    --bild-bg: #1f2621;
    --schatten: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
button, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 10;
  background: var(--gruen);
  color: #fff;
  padding-top: var(--sicher-oben);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.kopf__innen {
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 8px;
}
.kopf__logo { width: 42px; height: 42px; color: var(--gruen-dunkel); --bock: #fff; flex: none; }
.kopf__titel { flex: 1; min-width: 0; }
.kopf__titel h1 { margin: 0; font-size: 1.35rem; font-weight: 800; line-height: 1.1; letter-spacing: 0.2px; }
.kopf__titel p { margin: 0; font-size: 0.85rem; color: #cfe0d4; }
.kopf__knopf {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.kopf__knopf svg { width: 20px; height: 20px; }
.kopf__knopf.dreht svg { animation: drehen 0.8s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

.filter {
  max-width: 720px; margin: 0 auto;
  display: flex; gap: 8px; align-items: center;
  padding: 4px 16px 12px;
  overflow-x: auto; scrollbar-width: none;
}
.filter::-webkit-scrollbar { display: none; }
.filter button {
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.4); background: transparent; color: #fff;
  border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; cursor: pointer; white-space: nowrap;
}
.filter button[aria-pressed="true"] { background: #fff; color: var(--gruen); border-color: #fff; font-weight: 650; }
.filter__verein { flex: none; margin-left: auto; }
.filter select {
  border: 1px solid rgba(255, 255, 255, 0.4); background: var(--gruen-dunkel); color: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: 0.9rem; max-width: 12rem;
}

/* ---------- Inhalt ---------- */
.inhalt { max-width: 720px; margin: 0 auto; padding: 16px 16px 24px; }
.laden, .leer { text-align: center; color: var(--text-leise); padding: 48px 8px; }
.hinweis {
  background: #fff6db; color: #5b4500; border-radius: 10px;
  padding: 10px 14px; font-size: 0.9rem; margin-bottom: 14px;
}
@media (prefers-color-scheme: dark) { .hinweis { background: #3a3218; color: #f1e2b0; } }

.monat { margin: 22px 0 10px; font-size: 1.05rem; font-weight: 750; color: var(--gruen); }
@media (prefers-color-scheme: dark) { .monat { color: #7fb894; } }
.monat:first-child { margin-top: 0; }

.karte {
  display: flex; gap: 14px; align-items: stretch;
  width: 100%; text-align: left;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 10px; margin-bottom: 10px; cursor: pointer;
  transition: transform 0.12s ease;
}
.karte:active { transform: scale(0.985); }
.karte__datum {
  flex: none; width: 58px; border-radius: 10px;
  background: var(--gruen); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 0; line-height: 1.05;
}
.karte__datum small { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.6px; opacity: 0.85; }
.karte__datum b { font-size: 1.55rem; font-weight: 800; }
.karte__text { flex: 1; min-width: 0; padding: 2px 0; }
.karte__titel { display: block; font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.karte__meta { display: block; font-size: 0.86rem; color: var(--text-leise); margin-top: 3px; }
.karte__wer { display: block; font-size: 0.8rem; color: var(--text-leise); margin-top: 2px; opacity: 0.9; }
.karte__bild {
  flex: none; width: 64px; height: 80px; border-radius: 8px; object-fit: cover;
  background: var(--bild-bg); align-self: center;
}
.heute { box-shadow: 0 0 0 2px var(--gruen), var(--schatten); }

.stand { text-align: center; font-size: 0.8rem; color: var(--text-leise); margin: 18px 0 0; }

/* ---------- Installationshinweis ---------- */
.installieren {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  background: var(--gruen-hell); border-radius: var(--radius);
  padding: 12px 40px 12px 12px; margin-bottom: 16px; font-size: 0.9rem;
}
.installieren svg { width: 40px; height: 40px; flex: none; color: var(--gruen); --bock: #fff; }
.installieren p { margin: 0; flex: 1; }
.installieren button#installierenKnopf {
  flex: none; background: var(--gruen); color: #fff; border: 0; border-radius: 999px;
  padding: 8px 14px; font-weight: 650; cursor: pointer;
}
.installieren__zu {
  position: absolute; top: 4px; right: 6px; border: 0; background: none;
  font-size: 1.4rem; line-height: 1; color: var(--text-leise); cursor: pointer; padding: 4px 6px;
}

/* ---------- Detailblatt ---------- */
.blatt { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.blatt[hidden] { display: none; }
.blatt__hintergrund { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); animation: einblenden 0.2s ease; }
.blatt__inhalt {
  position: relative; width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
  background: var(--flaeche); border-radius: 20px 20px 0 0;
  padding-bottom: calc(18px + var(--sicher-unten));
  animation: hochschieben 0.25s ease;
}
@media (min-width: 700px) {
  .blatt { align-items: center; }
  .blatt__inhalt { border-radius: 20px; max-height: 88vh; }
}
@keyframes einblenden { from { opacity: 0; } }
@keyframes hochschieben { from { transform: translateY(40px); opacity: 0.4; } }
.blatt__zu {
  position: sticky; top: 10px; float: right; margin: 10px 10px -52px 0; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.blatt__bild { background: var(--bild-bg); border-radius: 20px 20px 0 0; overflow: hidden; }
.blatt__bild img { display: block; width: 100%; max-height: 60vh; object-fit: contain; }
.blatt__text { padding: 18px 20px 0; }
.blatt__datum { margin: 0; color: var(--gruen); font-weight: 700; font-size: 0.95rem; }
@media (prefers-color-scheme: dark) { .blatt__datum { color: #7fb894; } }
.blatt__text h2 { margin: 4px 0 12px; font-size: 1.45rem; line-height: 1.2; }
.blatt__fakten { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.blatt__fakten li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.blatt__fakten svg { width: 20px; height: 20px; flex: none; color: var(--text-leise); margin-top: 1px; }
.blatt__fakten a { color: inherit; }
.blatt__beschreibung { font-size: 0.97rem; white-space: pre-line; margin-bottom: 16px; }
.blatt__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--linie); background: var(--flaeche); color: var(--text);
  border-radius: 999px; padding: 10px 16px; font-weight: 650; font-size: 0.92rem;
  text-decoration: none; cursor: pointer;
}
.knopf--voll { background: var(--gruen); border-color: var(--gruen); color: #fff; }

/* ---------- Fuß ---------- */
.fuss {
  text-align: center; font-size: 0.8rem; color: var(--text-leise);
  padding: 8px 16px calc(20px + var(--sicher-unten));
}
.fuss a { color: inherit; }

/* ---------- Glocke (Push) ---------- */
.kopf__knopf[aria-pressed="true"] { background: #fff; color: var(--gruen); border-color: #fff; }
.kopf__knopf[aria-pressed="true"] svg path:first-child { fill: currentColor; }
.hinweis--info { background: var(--gruen-hell); color: var(--text); }

/* ---------- Frage nach Benachrichtigungen ---------- */
.frage {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--flaeche); border: 2px solid var(--gruen); border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 14px; margin-bottom: 16px; font-size: 0.93rem;
}
.frage__symbol {
  width: 40px; height: 40px; flex: none; padding: 9px; border-radius: 50%;
  background: var(--gruen); color: #fff;
}
.frage__text { flex: 1; min-width: 0; }
.frage__text p { margin: 0 0 10px; }
.frage__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.frage__knoepfe .knopf { padding: 8px 14px; }
@media (prefers-color-scheme: dark) { .frage { border-color: #4f8a67; } }
