:root {
  --bg: #f6f7f4; --karte: #fff; --text: #1d241f; --leise: #66706a; --linie: #dfe3dc;
  --akzent: #2f6b3c; --akzent-hell: #e4efe5; --rot: #b3261e; --rot-hell: #fbe9e7;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141815; --karte: #1e2420; --text: #e6ebe7; --leise: #9aa59e; --linie: #313a34;
          --akzent: #79c08a; --akzent-hell: #233629; --rot: #ff8a80; --rot-hell: #3a2220; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background: var(--bg); color: var(--text); }
a { color: var(--akzent); }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: .4em 0; } h1 small { color: var(--leise); font-weight: 400; font-size: .9rem; }
h2 { font-size: 1.15rem; margin-top: 1.6em; }
.kopf { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--karte);
        border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 2; }
.kopf .logo { font-weight: 700; text-decoration: none; color: var(--text); white-space: nowrap; }
.kopf nav { display: flex; gap: 4px; overflow-x: auto; margin-left: auto; }
.kopf nav a { text-decoration: none; padding: 6px 10px; border-radius: 8px; white-space: nowrap; color: var(--text); }
.kopf nav a:hover { background: var(--akzent-hell); }
@media (max-width: 640px) { .lang { display: none; } .kopf nav a { font-size: 1.3rem; padding: 4px 8px; } }
.fuss { text-align: center; color: var(--leise); font-size: .85rem; padding: 24px 16px 40px; }
.inline { display: inline; }
button, .button { font: inherit; border: 0; border-radius: 10px; padding: 11px 16px; background: var(--akzent);
                  color: #fff; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
@media (prefers-color-scheme: dark) { button, .button { color: #10170f; } }
button.link { background: none; color: var(--akzent); padding: 0; text-decoration: underline; }
.hell { background: var(--akzent-hell) !important; color: var(--text) !important; }
.gefahr { background: var(--rot); }
.breit { width: 100%; display: block; margin-top: 10px; }
.gross-btn { padding: 16px; font-size: 1.1rem; font-weight: 600; }
input, select, textarea { font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--linie);
                          border-radius: 10px; background: var(--karte); color: var(--text); margin-top: 4px; }
.formular label { display: block; margin: 12px 0; font-weight: 500; }
.formular label.radio { display: flex; gap: 8px; align-items: center; }
.formular label.radio input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--linie); border-radius: var(--radius); margin: 14px 0; padding: 4px 14px 12px; }
legend { font-weight: 700; padding: 0 6px; }
.zeile { display: flex; gap: 10px; align-items: flex-end; }
.zeile > * { flex: 1; }
.zeile > button { flex: 0 0 auto; }
.suche, .filter { display: flex; gap: 8px; margin: 8px 0 16px; }
.suche input, .filter input { flex: 1; margin: 0; } .filter select { width: auto; margin: 0; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kachel { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px;
          text-decoration: none; color: var(--text); }
.kachel .gross { font-size: 2rem; } .kachel .name { font-weight: 700; }
.kachel .zahl { font-size: 1.6rem; font-weight: 700; color: var(--akzent); }
.kachel .zahl small { font-size: .85rem; font-weight: 400; color: var(--leise); }
.klein, .kachel .klein { font-size: .85rem; color: var(--leise); }
.liste { list-style: none; padding: 0; margin: 0; background: var(--karte); border: 1px solid var(--linie);
         border-radius: var(--radius); overflow: hidden; }
.liste li + li { border-top: 1px solid var(--linie); }
.liste a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; color: var(--text); }
.liste .titel { flex: 1; } .liste .titel small { display: block; color: var(--leise); }
.liste .leer, .leer { padding: 14px; color: var(--leise); }
.id { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: var(--akzent); }
.gross-id { font-size: 1.2rem; }
.datum { font-size: .9rem; color: var(--leise); white-space: nowrap; } .rot { color: var(--rot) !important; font-weight: 700; }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px; }
.karte.mitte { max-width: 420px; margin: 40px auto; text-align: center; }
.karte-kopf { display: flex; justify-content: space-between; align-items: center; }
.status { font-size: .8rem; padding: 3px 10px; border-radius: 99px; background: var(--akzent-hell); }
.status.verbraucht { background: var(--rot-hell); color: var(--rot); }
.felder { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; }
.felder dt { color: var(--leise); } .felder dd { margin: 0; overflow-wrap: anywhere; }
.aktionen { margin: 14px 0; } .aktionen form { margin: 0; }
.aktionen .zeile input { margin: 0; }
.meldung { padding: 10px 14px; border-radius: 10px; }
.meldung.fehler { background: var(--rot-hell); color: var(--rot); }
.verlauf { margin-top: 18px; color: var(--leise); font-size: .9rem; }
.verlauf ul { padding-left: 18px; }
code { background: var(--akzent-hell); padding: 1px 5px; border-radius: 4px; }
