:root {
  --flaeche: #f5f4f1; --karte: #fcfcfb; --rand: #dddbd4;
  --text: #0b0b0b; --text2: #52514e; --text3: #7a7973;
  --blau: #2a78d6; --blau-hell: #9ec5f4; --orange: #eb6834;
  --gut: #1a7f37; --warn: #b26a00; --schlecht: #c7302f; --gitter: #e8e6e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --flaeche: #121211; --karte: #1a1a19; --rand: #383835;
    --text: #ffffff; --text2: #c3c2b7; --text3: #8f8e86;
    --blau: #3987e5; --blau-hell: #184f95; --orange: #d95926;
    --gut: #4cc26b; --warn: #e0a030; --schlecht: #e66767; --gitter: #2b2b29;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--flaeche); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header { background: var(--karte); border-bottom: 1px solid var(--rand); position: sticky; top: 0; z-index: 5; }
.kopf { display: flex; align-items: baseline; gap: 16px; padding: 12px 16px 4px; flex-wrap: wrap; }
h1 { font-size: 18px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 4px; }
nav { display: flex; gap: 4px; padding: 0 12px; overflow-x: auto; }
nav button { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--text2);
  padding: 10px 10px 8px; font: inherit; cursor: pointer; white-space: nowrap; }
nav button.aktiv { color: var(--text); border-bottom-color: var(--blau); font-weight: 600; }
main { max-width: 1180px; margin: 0 auto; padding: 16px; }
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.leise { color: var(--text2); font-size: 13px; margin: 0 0 10px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kachel { background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 14px 16px; }
.kachel .titel { color: var(--text2); font-size: 13px; }
.kachel .wert { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; margin: 2px 0; }
.kachel .zusatz { color: var(--text2); font-size: 13px; }
.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.status.gut { color: var(--gut); } .status.warn { color: var(--warn); } .status.schlecht { color: var(--schlecht); }
.bild { position: relative; height: 280px; }
.bild.hoch { height: 360px; }
.rollen { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 13.5px; }
th, td { padding: 6px 10px; border-bottom: 1px solid var(--gitter); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--karte); }
th { color: var(--text2); font-weight: 600; }
td.text, th.text { text-align: left; white-space: normal; max-width: 420px; }
tr.summe td { font-weight: 650; border-top: 2px solid var(--rand); }
td.neg { color: var(--schlecht); }
td.ueber { color: var(--schlecht); font-weight: 650; }
table.schmal { width: auto; margin-bottom: 10px; }
.zeile { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 10px 0; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; align-items: end; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text2); }
label small { color: var(--text3); }
input, select, button { font: inherit; }
input, select { padding: 7px 8px; border: 1px solid var(--rand); border-radius: 6px; background: var(--karte); color: var(--text); }
td input { width: 96px; padding: 3px 6px; text-align: right; }
button { padding: 8px 14px; border-radius: 6px; border: 1px solid var(--blau); background: var(--blau); color: #fff; cursor: pointer; }
button.klein { padding: 2px 8px; background: none; color: var(--text2); border-color: var(--rand); }
.meldung { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--rand); background: var(--karte); }
.meldung.fehler { border-color: var(--schlecht); }
@media (max-width: 600px) { main { padding: 12px; } .bild.hoch { height: 300px; } }

/* Anmeldung, Ampel, Szenarien, Ablage */
body.anmelden { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
body.anmelden form { width: min(360px, 100%); display: grid; gap: 14px; }
.fehlertext { color: var(--schlecht); margin: 0; min-height: 1.4em; }
#abmelden { margin-left: auto; }
.ampel { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 10px; margin-bottom: 16px;
  background: var(--karte); border: 1px solid var(--rand); border-left: 6px solid var(--text3); }
.ampel.gut { border-left-color: var(--gut); } .ampel.warn { border-left-color: var(--warn); } .ampel.schlecht { border-left-color: var(--schlecht); }
.ampel .zeichen { font-size: 26px; line-height: 1; }
.ampel.gut .zeichen { color: var(--gut); } .ampel.warn .zeichen { color: var(--warn); } .ampel.schlecht .zeichen { color: var(--schlecht); }
.ampel strong { display: block; font-size: 18px; }
.ampel span { color: var(--text2); }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.szenario h3 { margin: 0 0 10px; font-size: 16px; display: flex; align-items: center; }
.szenario h4 { margin: 16px 0 6px; font-size: 14px; color: var(--text2); }
.ablage { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 16px; cursor: pointer;
  border: 2px dashed var(--rand); border-radius: 10px; color: var(--text2); }
.ablage strong { color: var(--text); font-size: 16px; }
.ablage.drueber { border-color: var(--blau); }
.liste { padding-left: 18px; margin: 10px 0; }
.liste .fehler { color: var(--schlecht); }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 14px; }
button.zweit { background: none; color: var(--text); border-color: var(--rand); }
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; }
@media (prefers-color-scheme: dark) { :root { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; } }
