:root {
  --rot: #ab2524; --rot-dunkel: #7e1a1a; --rot-hell: #fdecea;
  --text: #1f2328; --grau: #5f6670; --linie: #dde1e6; --flaeche: #f5f6f8; --weiss: #fff;
  --gruen: #1b7a3a; --gruen-hell: #e3f4e8; --gelb: #8a5a00; --gelb-hell: #fff4d6;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--flaeche); }
a { color: var(--rot); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.kopf { background: var(--rot); color: #fff; }
.kopf .innen { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 1rem; min-height: 56px; flex-wrap: wrap; }
.kopf a { color: #fff; }
.marke { font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.marke svg { width: 26px; height: 26px; }
.marke img { height: 43px; width: auto; margin: -.3rem 0; filter: drop-shadow(0 0 1px rgba(255,255,255,.6)); }
.wappen-gross { display: block; margin: 0 auto 1rem; height: 180px; width: auto; }
.anmelden h1 { text-align: center; }
.anmelden .unter { text-align: center; }
nav.haupt { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
nav.haupt a { white-space: nowrap; padding: .4rem .55rem; border-radius: 6px; font-size: .9rem; }
nav.haupt a:hover, nav.haupt a.an { background: rgba(255,255,255,.18); text-decoration: none; }
.nutzer { position: relative; font-size: .9rem; margin-left: auto; }
.nutzer summary { list-style: none; cursor: pointer; padding: .35rem .7rem; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; white-space: nowrap; }
.nutzer summary::-webkit-details-marker { display: none; }
.nutzer[open] summary { background: rgba(255,255,255,.18); }
.nutzer .menue { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 230px; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.15); padding: 6px 0; }
.nutzer .menue a, .nutzer .menue button { white-space: nowrap; display: block; width: 100%; text-align: left; padding: .45rem .9rem; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.nutzer .menue a:hover, .nutzer .menue button:hover { background: var(--flaeche); text-decoration: none; }
.nutzer .menue form { margin: 0; border-top: 1px solid var(--linie); margin-top: 4px; padding-top: 4px; }
main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 48px; }
.titelzeile { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.unter { color: var(--grau); margin: 0; }
.karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.raster { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.raster > .karte { margin-bottom: 0; }
.kennzahlen { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 16px; }
.kennzahl { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; }
.kennzahl .wert { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.kennzahl .name { color: var(--grau); font-size: .85rem; }
.knopf, button.knopf { display: inline-block; background: var(--rot); color: #fff; border: 0; border-radius: 6px; padding: .45rem .9rem; font: inherit; font-size: .92rem; cursor: pointer; text-decoration: none; }
.knopf:hover { background: var(--rot-dunkel); text-decoration: none; }
.knopf.zweit { background: var(--weiss); color: var(--text); border: 1px solid var(--linie); }
.knopf.zweit:hover { background: var(--flaeche); }
.knopf.klein { padding: .2rem .55rem; font-size: .85rem; }
.knopfreihe { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tabelle-huelle { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--weiss); }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-size: .82rem; color: var(--grau); font-weight: 600; background: var(--flaeche); white-space: nowrap; }
tr:hover td { background: #fafbfc; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.leer { color: var(--grau); font-style: italic; }
.marke-klein { flex-shrink: 0; align-self: flex-start; line-height: 1.5; display: inline-block; font-size: .78rem; padding: .05rem .45rem; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); white-space: nowrap; }
.marke-klein.rot { background: var(--rot-hell); color: var(--rot-dunkel); border-color: #f4c2bd; }
.marke-klein.gruen { background: var(--gruen-hell); color: var(--gruen); border-color: #b9e2c6; }
.marke-klein.gelb { background: var(--gelb-hell); color: var(--gelb); border-color: #f1d891; }
.filter { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filter a.an { font-weight: 700; text-decoration: underline; }
input, select, textarea { font: inherit; padding: .4rem .55rem; border: 1px solid #c5cad1; border-radius: 6px; background: #fff; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rot); outline-offset: 0; border-color: var(--rot); }
form.formular { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
form.formular .feld { display: flex; flex-direction: column; gap: 4px; }
form.formular .feld.breit { grid-column: 1 / -1; }
form.formular label { font-weight: 600; font-size: .88rem; }
form.formular input:not([type=checkbox]), form.formular select, form.formular textarea { width: 100%; }
form.formular .hilfe { color: var(--grau); font-size: .8rem; }
form.formular .fehler { color: var(--rot); font-size: .85rem; }
form.formular ul.auswahl, form.formular div.auswahl > div { list-style: none; padding: 0; margin: 0; columns: 3 220px; }
form.formular .auswahl label { font-weight: 400; display: flex; gap: .4rem; align-items: center; }
form.formular .aktionen { grid-column: 1 / -1; display: flex; gap: .5rem; }
.meldungen { list-style: none; padding: 0; margin: 0 0 16px; }
.meldungen li { padding: .6rem .9rem; border-radius: 6px; background: var(--gruen-hell); color: var(--gruen); margin-bottom: 6px; }
.meldungen li.error, .meldungen li.warning { background: var(--rot-hell); color: var(--rot-dunkel); }
dl.daten { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
dl.daten dt { color: var(--grau); }
dl.daten dd { margin: 0; }
.matrix td, .matrix th { text-align: center; font-size: .82rem; padding: .3rem .35rem; }
.matrix td:first-child, .matrix th:first-child { text-align: left; white-space: nowrap; vertical-align: bottom; }
.matrix th.dreh { vertical-align: bottom; height: 130px; text-align: center; min-width: 2.2rem; }
.matrix th.dreh span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.punkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.punkt.gueltig { background: var(--gruen); } .punkt.bald { background: #e0a400; } .punkt.abgelaufen { background: var(--rot); } .punkt.unbekannt { background: #fff; border: 2px solid var(--grau); }
.anmelden { max-width: 380px; margin: 8vh auto; }
.anmelden form p { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.anmelden input { width: 100%; }
.balken { background: var(--flaeche); border-radius: 4px; height: 8px; min-width: 60px; }
.balken > span { display: block; height: 100%; background: var(--rot); border-radius: 4px; }
/* Wird es zu eng, bekommt die Navigation eine eigene Zeile */
@media (max-width: 1180px) {
  .kopf .innen { padding: 8px 16px; }
  nav.haupt { order: 3; flex-basis: 100%; }
}
@media (max-width: 700px) {
  dl.daten { grid-template-columns: 1fr; }
  dl.daten dt { margin-top: .4rem; }
}
@media print {
  .kopf, .knopf, .knopfreihe, .filter, .nicht-drucken { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .karte { border: 0; padding: 0; }
}
.bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem; }
.bilder figure { margin: 0; }
.bilder img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; display: block; }
.bilder figcaption { font-size: .8rem; text-align: right; }
.qr svg { width: 200px; height: 200px; display: block; margin: .4rem 0; }
.schluessel { font-size: 1.1rem; letter-spacing: .05em; word-break: break-all; }
.notfallcodes { columns: 2; list-style: none; padding: 0; font-size: 1.15rem; }
.notfallcodes li { padding: .2rem 0; }
