:root {
  --holz-dunkel: #412402; --holz: #5a3a17; --holz-mittel: #854f0b; --gold: #ba7517;
  --kachel: #fac775; --creme: #faeeda; --creme-2: #f4e2c2; --linie: #e2c99a;
  --text: #412402; --text-2: #7a5320; --gruen: #2f8a4a; --gelb: #d49a12; --rot: #b3302b; --grau: #a99578;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--creme); color: var(--text); font: 16px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
input, select, button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
[hidden] { display: none !important; }
.kopf { position: sticky; top: 0; z-index: 5; padding: calc(var(--safe-t) + 10px) 16px 12px; color: var(--creme); display: flex; align-items: center; gap: 10px;
  background-color: var(--holz);
  background-image: repeating-linear-gradient(178deg, rgba(255,255,255,.05) 0 2px, transparent 2px 9px), repeating-linear-gradient(181deg, rgba(0,0,0,.10) 0 1px, transparent 1px 23px), linear-gradient(180deg, #6b4520, #4d300f); }
.kopf h1 { font-size: 24px; font-weight: 600; margin: 0; flex: 1; }
.kopf .knopf { color: var(--creme); font-size: 24px; padding: 2px 6px; }
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; width: 100%; max-width: 760px; margin: 0 auto; padding: 14px 14px 12px; }
.fuss { color: var(--text-2); font-size: 13px; text-align: center; margin: 4px 0 78px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--holz); padding-bottom: var(--safe-b); z-index: 6; }
.tabs a { flex: 1; text-align: center; color: #d9c29a; text-decoration: none; padding: 12px 2px; font-size: 14px; }
.tabs a.aktiv { color: var(--kachel); font-weight: 600; box-shadow: inset 0 3px 0 var(--kachel); }
.karte { background: #fff8ec; border: 1px solid var(--linie); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.karte h3 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
h2 { font-size: 20px; margin: 4px 2px 10px; }
.klein { color: var(--text-2); font-size: 13px; }
.zeile { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.btn { background: var(--holz); color: var(--creme); border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.btn.hell { background: var(--kachel); color: var(--holz-dunkel); }
.btn.link { background: none; color: var(--holz-mittel); padding: 6px 4px; text-decoration: underline; font-weight: 400; }
.btn.klein { padding: 6px 10px; font-size: 14px; }
.btn.gefahr { background: #fff; color: var(--rot); border: 1px solid var(--rot); }
input, select { background: #fff; border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; width: 100%; }
label { display: block; font-size: 13px; color: var(--text-2); margin: 8px 0 3px; }
.reihe { display: flex; gap: 8px; }
.reihe > * { flex: 1; min-width: 0; }
.reihe .fest { flex: 0 0 auto; }
.punkt { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--grau); flex: 0 0 auto; vertical-align: middle; }
.punkt.gruen { background: var(--gruen); } .punkt.gelb { background: var(--gelb); } .punkt.rot { background: var(--rot); } .punkt.n { background: transparent; border: 2px solid var(--grau); }
.ampelbox { border-radius: 18px; padding: 16px; margin-bottom: 12px; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.14); }
.ampelbox.gruen { background: var(--gruen); } .ampelbox.gelb { background: var(--gelb); color: #2b1d00; } .ampelbox.rot { background: var(--rot); }
.ampelbox .gross { font-size: 28px; font-weight: 700; }
.ampelbox .klein { color: inherit; opacity: .9; }
.messung { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--linie); align-items: flex-start; }
.messung:first-child { border-top: 0; }
.messung .punkt { margin-top: 4px; }
.messung .mitte { flex: 1; min-width: 0; }
.messung .wert { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--linie); cursor: pointer; }
.pos:first-child { border-top: 0; }
.pos .mitte { flex: 1; min-width: 0; }
.pos .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos .rechts { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plus { color: var(--gruen); } .minus { color: var(--rot); }
.fehler { background: #fde8e6; border: 1px solid var(--rot); color: #7a1c18; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.hinweis { background: var(--creme-2); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.spark { width: 100%; height: 56px; display: block; }
.spark path { fill: none; stroke: var(--holz-mittel); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.marktwert { font-size: 26px; font-weight: 700; }
table.tab { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tab th, table.tab td { padding: 4px 5px; border-top: 1px solid var(--linie); text-align: left; white-space: nowrap; overflow: hidden; max-width: 120px; text-overflow: ellipsis; }
.scroll { overflow-x: auto; }
.login { max-width: 360px; margin: 12vh auto 0; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.schw { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; align-items: center; margin-bottom: 6px; font-size: 14px; }
.schw input { padding: 7px 8px; }
