:root {
  --gruen: #2f7d6d; --gruen-hell: #e6f2ef; --text: #1f2a28; --leise: #6b7a77;
  --rand: #dde5e3; --grund: #f6f8f7; --rot: #c0392b; --orange: #d9822b; --weiss: #fff;
  --unten: calc(84px + env(safe-area-inset-bottom));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--grund); color: var(--text);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
h1 { font-size: 24px; margin: 0 0 10px; }
h2 { font-size: 21px; margin: 4px 0 6px; }
a { color: var(--gruen); }
.leise { color: var(--leise); font-size: 15px; }
.fehler { color: var(--rot); min-height: 1.2em; }
input, textarea { font: inherit; width: 100%; padding: 12px 14px; border: 1px solid var(--rand);
  border-radius: 12px; background: var(--weiss); color: var(--text); }
input:focus, textarea:focus { outline: 2px solid var(--gruen); border-color: transparent; }

.knopf { font: inherit; border: 0; border-radius: 14px; padding: 12px 16px; cursor: pointer; font-weight: 600; }
.knopf.haupt { background: var(--gruen); color: #fff; }
.knopf.zweit { background: var(--gruen-hell); color: var(--gruen); }
.knopf.leise-knopf { background: transparent; color: var(--leise); font-weight: 500; }
.knopf.gross { width: 100%; padding: 15px; font-size: 17px; }
.knopf:active { transform: scale(.98); }

/* Вход */
.anmeldung { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.anmeldung-box { width: 100%; max-width: 340px; text-align: center; }
.anmeldung-logo { width: 84px; height: 84px; border-radius: 20px; }
.anmeldung form { display: grid; gap: 12px; margin-top: 18px; }

/* Шапка и поиск */
main { padding-bottom: var(--unten); max-width: 680px; margin: 0 auto; }
.kopf { position: sticky; top: 0; z-index: 5; background: var(--grund);
  padding: calc(14px + env(safe-area-inset-top)) 16px 8px; }
.suche { position: relative; }
.suche input { padding-right: 44px; font-size: 17px; }
.suche-weg { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0;
  background: none; font-size: 18px; color: var(--leise); padding: 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--rand); background: var(--weiss); border-radius: 999px;
  padding: 7px 13px; font-size: 15px; color: var(--text); }
.chip.an { background: var(--gruen); color: #fff; border-color: var(--gruen); }
.chip small { color: var(--leise); margin-left: 3px; }
.chip.an small { color: #d8ece7; }

/* Список */
.liste { padding: 0 16px; }
.gruppe { margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: var(--leise);
  text-transform: uppercase; letter-spacing: .04em; }
.eintrag { display: flex; gap: 12px; align-items: center; background: var(--weiss); border-radius: 16px;
  padding: 10px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: pointer; }
.eintrag.leer { opacity: .72; }
.bild { width: 58px; height: 58px; border-radius: 12px; flex: none; object-fit: cover;
  background: var(--gruen-hell); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.eintrag-text { min-width: 0; flex: 1; }
.eintrag-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eintrag-kurz { color: var(--leise); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marken { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.marke { font-size: 12.5px; padding: 2px 8px; border-radius: 999px; background: var(--grund); color: var(--leise); }
.marke.rot { background: #fbe7e5; color: var(--rot); }
.marke.orange { background: #fbefe2; color: var(--orange); }
.marke.gruen { background: var(--gruen-hell); color: var(--gruen); }
.leer-hinweis { text-align: center; padding: 40px 20px; color: var(--leise); }
.leer-hinweis .gross-emoji { font-size: 54px; }
.fuss { text-align: center; color: var(--leise); font-size: 13px; padding: 18px 16px; }

/* Нижняя панель */
.unten { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(246,248,247,.94);
  backdrop-filter: blur(10px); border-top: 1px solid var(--rand); }
.unten .haupt { flex: 1.6; }
.unten .zweit { flex: 1; }
.unten > * { max-width: 420px; }
@media (min-width: 700px) { .unten { justify-content: center; } }

/* Лист (карточка, диалог) */
.blatt { position: fixed; inset: 0; z-index: 20; background: var(--grund); overflow-y: auto;
  -webkit-overflow-scrolling: touch; animation: rein .18s ease-out; }
@keyframes rein { from { transform: translateY(24px); } to { transform: none; } }
.blatt-kopf { position: sticky; top: 0; z-index: 2; background: var(--grund);
  padding: calc(8px + env(safe-area-inset-top)) 8px 4px; }
.zurueck { border: 0; background: none; color: var(--gruen); font: inherit; font-size: 18px; padding: 8px; }
.blatt-inhalt { padding: 0 16px 40px; max-width: 680px; margin: 0 auto; }
.blatt-inhalt form { display: grid; gap: 12px; margin-top: 12px; }

.fotos { display: flex; gap: 8px; overflow-x: auto; margin: 4px 0 12px; }
.fotos img { height: 150px; border-radius: 14px; flex: none; }
.unter { color: var(--leise); margin-bottom: 8px; }
.kasten { background: var(--weiss); border-radius: 16px; padding: 14px; margin: 12px 0; }
.kasten h3 { margin: 0 0 8px; font-size: 16px; }
.feld-titel { font-size: 14px; color: var(--leise); margin: 12px 0 6px; }
.wahl { display: flex; gap: 6px; background: var(--grund); padding: 4px; border-radius: 12px; }
.wahl button { flex: 1; border: 0; background: none; font: inherit; font-size: 15px; padding: 9px 4px;
  border-radius: 9px; color: var(--leise); }
.wahl button.an { background: var(--weiss); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.quelle { border-radius: 14px; padding: 12px 14px; margin: 12px 0; font-size: 15px; }
.quelle.gut { background: var(--gruen-hell); color: #1e5a4e; }
.quelle.vorsicht { background: #fdf3e6; color: #7a4a12; }
.quelle .knopf { margin-top: 10px; }
.abschnitt { background: var(--weiss); border-radius: 14px; margin: 8px 0; overflow: hidden; }
.abschnitt summary { padding: 13px 14px; font-weight: 600; list-style: none; cursor: pointer; display: flex; justify-content: space-between; }
.abschnitt summary::-webkit-details-marker { display: none; }
.abschnitt summary::after { content: '›'; color: var(--leise); transform: rotate(90deg); transition: transform .15s; }
.abschnitt[open] summary::after { transform: rotate(-90deg); }
.abschnitt div { padding: 0 14px 14px; white-space: pre-line; }
.aktionen { display: grid; gap: 10px; margin-top: 18px; }
.loeschen { color: var(--rot) !important; }

/* Ожидание и сообщения */
.warten { position: fixed; inset: 0; z-index: 40; background: rgba(20,30,28,.45);
  display: flex; align-items: center; justify-content: center; padding: 30px; }
.warten-box { background: var(--weiss); border-radius: 20px; padding: 26px 24px; text-align: center; min-width: 240px; }
.kreisel { width: 42px; height: 42px; margin: 0 auto 12px; border-radius: 50%;
  border: 4px solid var(--gruen-hell); border-top-color: var(--gruen); animation: dreh .9s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
.meldung { position: fixed; left: 16px; right: 16px; bottom: calc(var(--unten) + 10px); z-index: 50;
  background: var(--text); color: #fff; padding: 13px 16px; border-radius: 14px; text-align: center;
  max-width: 520px; margin: 0 auto; }
.unten .knopf { white-space: nowrap; }
body.blatt-offen .unten { display: none; }

/* ---- Вкладки внизу ---- */
:root { --tabs: calc(58px + env(safe-area-inset-bottom)); }
main { padding-bottom: calc(var(--tabs) + 90px); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; display: flex;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--rand);
  padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; border: 0; background: none; font: inherit; font-size: 11.5px; color: var(--leise);
  padding: 7px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tabs button span { font-size: 22px; line-height: 1.15; filter: grayscale(1); opacity: .6; }
.tabs button.an { color: var(--gruen); font-weight: 600; }
.tabs button.an span { filter: none; opacity: 1; }
.unten { bottom: var(--tabs); padding-bottom: 10px; }
body.blatt-offen .tabs { display: none; }
.punkt { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
