:root {
  color-scheme: light dark;
  --grund: #f4f5f7; --flaeche: #ffffff; --linie: #dfe2e8; --text: #16191f; --leise: #5d6573;
  --akzent: #1d4ed8; --rot: #c81e2e;
  --gut-g: #e3f5ea; --gut-t: #11693a; --warten-g: #fff1d6; --warten-t: #8a5300;
  --aktiv-g: #e2ebff; --aktiv-t: #1d4ed8; --fehler-g: #fde5e7; --fehler-t: #ab1725;
  --stumm-g: #eceef2; --stumm-t: #5d6573;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #111418; --flaeche: #1a1e24; --linie: #2d333c; --text: #e8eaee; --leise: #9aa3b1;
    --akzent: #8ab0ff; --rot: #ff5a68;
    --gut-g: #143524; --gut-t: #7fdca5; --warten-g: #3b2c10; --warten-t: #f5c56b;
    --aktiv-g: #1a2b52; --aktiv-t: #a9c2ff; --fehler-g: #471a20; --fehler-t: #ff9aa4;
    --stumm-g: #272c34; --stumm-t: #a2aab7;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0; }
h2 { font-size: .95rem; margin: 0 0 .6rem; }
.leise { color: var(--leise); }
.kopf { display: flex; align-items: center; gap: 1.5rem; padding: .7rem 1.25rem; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.marke { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 700; letter-spacing: .01em; }
.marke:hover { text-decoration: none; }
.marke.gross { font-size: 1.15rem; margin-bottom: 1.25rem; }
.punkt { width: .65rem; height: .65rem; border-radius: 50%; background: var(--rot); }
.kopf nav { display: flex; gap: 1rem; flex: 1; }
.kopf nav a { color: var(--leise); padding: .2rem 0; }
.kopf nav a[aria-current] { color: var(--text); font-weight: 600; box-shadow: 0 2px 0 var(--rot); }
.abmelden { display: flex; align-items: center; gap: .75rem; margin: 0; }
.wer { color: var(--leise); font-size: .875rem; }
.inhalt { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.mitte { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; }
.anmeldung { width: min(100%, 24rem); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 1.75rem; }
.anmeldung h1 { font-size: 1.25rem; margin-bottom: .5rem; }
.stapel { display: grid; gap: .9rem; margin-top: 1rem; }
label { display: grid; gap: .25rem; font-size: .8125rem; color: var(--leise); }
input, select { width: 100%; min-height: 2.4rem; padding: .4rem .6rem; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; font: inherit; }
input.code { font-size: 1.3rem; letter-spacing: .25em; text-align: center; }
button { min-height: 2.4rem; padding: .4rem .9rem; border: 0; border-radius: 6px; background: var(--akzent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
@media (prefers-color-scheme: dark) { button { color: #0e1420; } }
button.still { min-height: 0; padding: 0; background: none; color: var(--leise); font-weight: 400; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.meldung { margin: .75rem 0; padding: .6rem .75rem; border-radius: 6px; background: var(--fehler-g); color: var(--fehler-t); overflow-wrap: anywhere; }
.meldung.warnung { background: var(--warten-g); color: var(--warten-t); }
.qr { display: block; margin: 1rem auto; background: #fff; border-radius: 6px; }
.schluessel { font-size: .875rem; color: var(--leise); }
.schluessel code { display: block; padding: .5rem; overflow-wrap: anywhere; background: var(--grund); border-radius: 6px; }
.titelzeile { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.titelzeile p { margin: 0; }
.filter { display: grid; grid-template-columns: repeat(4, minmax(8.5rem, 1fr)) minmax(11rem, 2fr) auto auto; align-items: end; gap: .6rem; margin-bottom: 1rem; }
.zuruecksetzen { align-self: center; font-size: .875rem; white-space: nowrap; }
.tabelle { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { padding: .6rem .75rem; text-align: left; font-size: .75rem; font-weight: 600; color: var(--leise); border-bottom: 1px solid var(--linie); white-space: nowrap; }
td { padding: .65rem .75rem; border-bottom: 1px solid var(--linie); vertical-align: top; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
.rechts { text-align: right; font-variant-numeric: tabular-nums; }
.zeit { color: var(--leise); font-size: .8125rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.quelle { min-width: 10rem; overflow-wrap: normal; }
.titel { min-width: 16rem; font-weight: 500; }
.hinweis { display: block; margin-top: .15rem; color: var(--leise); font-size: .8125rem; font-weight: 400; }
.marken { display: flex; flex-wrap: wrap; gap: .3rem; }
td.marken { display: table-cell; }
td.marken .badge { margin: 0 .25rem .25rem 0; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge.neutral, .badge.stumm { background: var(--stumm-g); color: var(--stumm-t); }
.badge.warten { background: var(--warten-g); color: var(--warten-t); }
.badge.aktiv { background: var(--aktiv-g); color: var(--aktiv-t); }
.badge.gut { background: var(--gut-g); color: var(--gut-t); }
.badge.fehler { background: var(--fehler-g); color: var(--fehler-t); }
.seiten { display: flex; justify-content: center; gap: 1rem; margin-top: 1rem; color: var(--leise); font-size: .875rem; }
.leer { padding: 2.5rem 1rem; text-align: center; color: var(--leise); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; }
.zurueck { display: inline-block; margin-bottom: .75rem; font-size: .875rem; }
.fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.fakten dt { color: var(--leise); font-size: .75rem; }
.fakten dd { margin: 0; font-weight: 500; }
.links { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; font-size: .875rem; }
section { min-width: 0; margin-bottom: 1rem; padding: 1rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; }
.spalten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; }
figure { margin: 0; }
figure img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--grund); border-radius: 6px; }
figure.gewaehlt img { outline: 3px solid var(--akzent); }
figcaption { margin-top: .3rem; color: var(--leise); font-size: .8125rem; }
.reel { display: block; width: min(100%, 16rem); aspect-ratio: 9 / 16; background: #000; border-radius: 6px; }
.verlauf { margin: 0; padding: 0; list-style: none; }
.verlauf li { padding: .35rem 0; border-bottom: 1px solid var(--linie); overflow-wrap: anywhere; }
.verlauf li:last-child { border-bottom: 0; }
.kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kachel { display: grid; gap: .1rem; padding: 1rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; }
.kachel span, .kachel small { color: var(--leise); font-size: .8125rem; }
.kachel strong { font-size: 1.25rem; }
.schlicht td { padding: .4rem 0; }
@media (max-width: 900px) {
  .filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .suche { grid-column: 1 / -1; }
  .spalten { grid-template-columns: minmax(0, 1fr); }
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .kopf { flex-wrap: wrap; gap: .5rem 1rem; padding: .6rem 1rem; }
  .kopf nav { order: 3; flex-basis: 100%; }
  .abmelden { margin-left: auto; }
  .inhalt { padding: 1rem 1rem 2rem; }
  .tabelle { background: none; border: 0; border-radius: 0; overflow: visible; }
  .tabelle thead { display: none; }
  .tabelle table, .tabelle tbody, .tabelle tr, .tabelle td { display: block; }
  .tabelle tr { margin-bottom: .75rem; padding: .75rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; }
  .tabelle td { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .5rem; padding: .2rem 0; border: 0; text-align: left; white-space: normal; }
  .tabelle td::before { content: attr(data-label); color: var(--leise); font-size: .75rem; font-weight: 400; }
  .tabelle td.titel { display: block; min-width: 0; margin-bottom: .3rem; font-size: 1rem; }
  .tabelle td.titel::before { content: none; }
}
