:root {
  --grund: #0b0d10; --flaeche: #15181d; --flaeche2: #1c2027; --linie: #262b33; --text: #eef1f4; --leise: #8b939d;
  --akzent: #f7931a; --gruen: #4ade80; --rot: #ff8a80; --radius: 18px; color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--grund); color: var(--text); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); touch-action: manipulation; }
body.offen { overflow: hidden; }
button { font: inherit; color: inherit; }
input { font: inherit; color: var(--text); }
[hidden] { display: none !important; }
.zahl { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

header { position: sticky; top: 0; z-index: 5; background: var(--grund); display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 8px; }
h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; flex: 1; display: flex; align-items: center; gap: 10px; }
h1::before { content: "₿"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--akzent); color: #fff; font-size: 16px; font-weight: 700; }
.leise { background: none; border: 0; color: var(--leise); font-size: 13px; padding: 8px 6px; cursor: pointer; }
.rund { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--flaeche2); display: grid; place-items: center; cursor: pointer; }
.rund svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

main { padding: 6px 16px 110px; max-width: 720px; margin: 0 auto; }
.total { background: radial-gradient(120% 140% at 0% 0%, #2a1d0b 0%, var(--flaeche) 55%); border: 1px solid var(--linie); border-radius: 24px; padding: 18px 18px 12px; }
.etikett { color: var(--leise); font-size: 13px; }
.betrag { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.unter { color: var(--leise); font-size: 15px; display: flex; gap: 10px; flex-wrap: wrap; }
.unter #total-chf { color: var(--text); font-weight: 600; }
#kurve { width: 100%; height: 90px; margin-top: 12px; display: block; overflow: visible; }
.bereiche { display: flex; gap: 6px; margin-top: 8px; }
.bereiche button { border: 0; background: transparent; color: var(--leise); border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.bereiche button.aktiv { background: var(--flaeche2); color: var(--text); }
.verdeckt .wert { filter: blur(9px); user-select: none; }

.tabs { display: flex; gap: 6px; margin: 18px 0 8px; }
.tabs button { border: 1px solid var(--linie); background: transparent; border-radius: 999px; padding: 7px 16px; cursor: pointer; color: var(--leise); }
.tabs button.aktiv { background: var(--text); color: var(--grund); border-color: var(--text); }
.tabs span { opacity: .7; }

.monat { color: var(--leise); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; margin: 16px 4px 6px; }
.zeile-e { display: flex; align-items: center; gap: 12px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px;
  padding: 11px 14px; margin: 6px 0; text-decoration: none; color: inherit; cursor: pointer; width: 100%; text-align: left; }
.zeile-e:active { transform: scale(.99); }
.punkt { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.punkt.eingang { background: rgba(74, 222, 128, .14); color: var(--gruen); }
.punkt.ausgang { background: rgba(255, 138, 128, .14); color: var(--rot); }
.punkt.intern { background: rgba(139, 147, 157, .16); color: var(--leise); }
.punkt.adr { background: rgba(247, 147, 26, .15); color: var(--akzent); }
.mitte-e { flex: 1; min-width: 0; }
.titel-e { font-weight: 600; }
.unter-e { color: var(--leise); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rechts { text-align: right; flex: none; }
.rechts .gross { font-variant-numeric: tabular-nums; font-weight: 600; }
.rechts .klein { color: var(--leise); font-size: 12px; font-variant-numeric: tabular-nums; }
.plus { color: var(--gruen); } .minus { color: var(--rot); } .neutral { color: var(--leise); }
.offen-marke { background: rgba(247, 147, 26, .16); color: var(--akzent); border-radius: 6px; padding: 0 6px; font-size: 11px; font-weight: 600; margin-left: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.hinweis, .leer { color: var(--leise); text-align: center; margin: 30px 10px; font-size: 14px; }
.hinweis { margin: 12px 0 0; }

.fab { position: fixed; right: 18px; bottom: calc(22px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border-radius: 20px; border: 0;
  background: linear-gradient(135deg, #ffb547, #f7931a); color: #fff; font-size: 34px; line-height: 1; box-shadow: 0 6px 22px rgba(247, 147, 26, .35); cursor: pointer; z-index: 6; }

.vollbild { position: fixed; inset: 0; background: var(--grund); z-index: 30; display: grid; place-items: center; padding: 24px; }
.mitte { max-width: 420px; text-align: center; }
.logo { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 22px; background: url(/icon.svg) center/cover; }
.mitte p { color: var(--leise); }
.zeile { display: flex; gap: 8px; margin-top: 16px; }
.zeile input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); outline: none; font-size: 16px; }
.zeile button { border: 0; border-radius: 12px; background: var(--akzent); color: #14181e; padding: 0 18px; font-weight: 700; cursor: pointer; }

.blatt { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 20; display: flex; align-items: flex-end; }
.blatt-innen { background: var(--flaeche); width: 100%; max-width: 720px; margin: 0 auto; border-radius: 26px 26px 0 0; border: 1px solid var(--linie);
  padding: 20px 18px calc(16px + env(safe-area-inset-bottom)); max-height: 85vh; overflow: auto; }
.blatt h2 { margin: 0 0 14px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.blatt h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--akzent); }
.feld { width: 100%; padding: 13px 14px; border-radius: 14px; border: 0; background: var(--flaeche2); outline: none; font-size: 16px; margin-bottom: 10px; }
.feld:focus { box-shadow: 0 0 0 2px var(--akzent); }
.pruefung { font-size: 13px; margin: -2px 2px 10px; }
.knoepfe { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.knoepfe .platz { flex: 1; }
.knopf { border: 0; border-radius: 14px; padding: 12px 20px; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, #ffb547, #f7931a); color: #14181e; }
.knopf:disabled { background: var(--flaeche2); color: var(--leise); }
.text-knopf { border: 0; background: none; color: var(--leise); padding: 12px 8px; cursor: pointer; }
.text-knopf.gefahr { color: var(--rot); font-weight: 600; }
.notiz { color: var(--leise); font-size: 12px; margin: 10px 2px 0; }

.meldung { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--grund);
  padding: 10px 16px; border-radius: 999px; font-size: 15px; z-index: 40; max-width: calc(100vw - 32px); }
