:root {
  --grund: #f6f4ef; --flaeche: #ffffff; --text: #1d2523; --leise: #66706d; --linie: #dcd8cf;
  --akzent: #1f4d46; --auf-akzent: #ffffff; --weich: #e3eeeb; --denk: #8a5a12; --denk-grund: #f7ead2; --warn: #a3312b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #141918; --flaeche: #1e2524; --text: #eef1f0; --leise: #9aa5a2; --linie: #333c3a;
    --akzent: #7cc4b6; --auf-akzent: #10201d; --weich: #25332f; --denk: #f0c178; --denk-grund: #3a2e17; --warn: #ef8a83;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
h1 { font-size: 22px; margin: 4px 0 12px; }
h2 { font-size: 15px; margin: 22px 0 8px; color: var(--leise); font-weight: 600; }
p { margin: 8px 0; }
.leise { color: var(--leise); font-size: 14px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 10px; padding: 10px 14px; min-height: 44px; }
button.haupt { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); font-weight: 600; }
button.klein { min-height: 34px; padding: 4px 10px; font-size: 14px; }
button.warn { color: var(--warn); }
input[type=text], input[type=number], input[type=password], input[type=search], select {
  width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche);
}
.reihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { border-radius: 999px; padding: 8px 16px; }
.chip[aria-pressed=true] { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); font-weight: 600; }
.aufgaben { display: grid; gap: 8px; }
.aufgabe { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; width: 100%; min-height: 52px; }
.marke { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--denk-grund); color: var(--denk); white-space: nowrap; }
details { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; margin: 8px 0; }
summary { padding: 14px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary span { color: var(--leise); font-weight: 400; }
details .aufgaben { padding: 0 10px 10px; }
details .aufgabe { background: var(--grund); }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 14px; margin: 8px 0; }
.eintrag { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linie); }
.eintrag:first-child { border-top: 0; }
.balken { height: 12px; border-radius: 6px; background: var(--weich); overflow: hidden; margin: 6px 0 14px; }
.balken i { display: block; height: 100%; background: var(--akzent); border-radius: 6px; }
.balken i.denk { background: var(--denk); }
.tabelle { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: right; padding: 7px 6px; border-top: 1px solid var(--linie); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; }
thead th { border-top: 0; color: var(--leise); font-weight: 600; }
nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--flaeche); border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom); }
nav button { flex: 1; border: 0; border-radius: 0; background: none; min-height: 58px; color: var(--leise); }
nav button[aria-current=page] { color: var(--akzent); font-weight: 700; }
dialog { border: 0; border-radius: 16px; padding: 20px; width: min(92vw, 440px); background: var(--flaeche); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
dialog h3 { margin: 0 0 4px; font-size: 18px; }
dialog .reihe { margin: 10px 0; }
dialog .ende { justify-content: flex-end; margin-top: 18px; }
.fehler { color: var(--warn); font-size: 14px; min-height: 20px; }
label { display: block; font-size: 14px; color: var(--leise); margin: 12px 0 4px; }
label.haken { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 16px; }
.meldung { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--grund); padding: 10px 18px; border-radius: 999px; font-size: 14px; }
