:root {
  --bg: #f6f7f9; --karte: #ffffff; --text: #1d2330; --leise: #667085; --rand: #e3e6eb;
  --akzent: #2f6fde; --akzent-text: #ffffff; --gefahr: #c2410c;
  --stand: #15803d; --frage: #b45309; --thema: #6d28d9;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151b; --karte: #1b2029; --text: #e6e9ef; --leise: #98a2b3; --rand: #2a313d;
    --akzent: #5b8ff0; --gefahr: #f97316; --stand: #4ade80; --frage: #fbbf24; --thema: #a78bfa;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 1.35rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0; }
.leise { color: var(--leise); margin: 2px 0; }
.fehler { color: var(--gefahr); min-height: 1.2em; }
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 16px; }
.schmal { width: 100%; max-width: 360px; }
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.anmeldung form { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-size: .9rem; color: var(--leise); }
input, select, textarea, button { font: inherit; color: var(--text); }
input, select, textarea { background: var(--bg); border: 1px solid var(--rand); border-radius: 8px; padding: 8px 10px; width: 100%; }
textarea { resize: vertical; }
button { background: var(--akzent); color: var(--akzent-text); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button.zweitrangig { background: transparent; color: var(--text); border: 1px solid var(--rand); }
button.gefahr { background: transparent; color: var(--gefahr); border: 1px solid var(--rand); margin-right: auto; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.kopf-rechts { display: flex; gap: 8px; align-items: flex-end; }
.ich { min-width: 140px; }
.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--rand); margin-bottom: 12px; overflow-x: auto; }
.reiter button { background: transparent; color: var(--leise); border-radius: 0; border-bottom: 2px solid transparent; padding: 8px 12px; white-space: nowrap; }
.reiter button.aktiv { color: var(--text); border-bottom-color: var(--akzent); }
.zahl { background: var(--frage); color: #111; border-radius: 999px; padding: 0 7px; font-size: .75rem; margin-left: 4px; }
.zahl:empty { display: none; }
.werkzeuge { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.werkzeuge input[type=search] { flex: 1; min-width: 160px; }
.haken { display: flex; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; }
.haken input { width: auto; }
#neuFormular { display: grid; gap: 10px; margin-bottom: 12px; }
#neuFormular[hidden] { display: none; }
.zeile { display: flex; gap: 8px; flex-wrap: wrap; }
.zeile > label { flex: 1; min-width: 180px; }
.zeile.rechts { justify-content: flex-end; }
.liste { display: grid; gap: 10px; }
.eintrag-kopf { display: flex; gap: 10px; align-items: center; }
.eintrag-kopf .titel { flex: 1; }
.eintrag-kopf .status { width: auto; padding: 4px 8px; font-size: .85rem; }
.marke { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.marke.stand { color: var(--stand); } .marke.frage { color: var(--frage); } .marke.thema { color: var(--thema); }
.eintrag.erledigt .titel, .eintrag.beantwortet .titel, .eintrag.archiviert .titel { color: var(--leise); }
.text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; }
.text a, .antwort a { color: var(--akzent); }
.antworten { display: grid; gap: 6px; margin: 8px 0; }
.antwort { border-left: 3px solid var(--rand); padding: 4px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.antwort .meta { font-size: .8rem; }
.antwortformular { display: grid; gap: 6px; }
.leer { text-align: center; padding: 32px; color: var(--leise); }
.fuss { text-align: center; margin-top: 24px; font-size: .85rem; }
@media (max-width: 560px) {
  .eintrag-kopf { flex-wrap: wrap; }
  .kopf-rechts { width: 100%; }
  .ich { flex: 1; }
}
