/* Finanzplaner-App - Grundgestaltung. Bedeutungen der Farben wie im Excel-Planer (mdlKern FARBEN),
   seit dem Desktop-Look (08.11.2026) etwas kraeftiger; Dunkelmodus weiter unten (data-theme / Windows-Einstellung). */
:root {
  color-scheme: light;
  --ink: #0f1b2b;          /* cInk */
  --primary: #2356a6;      /* cPrimary - Kredit und Haus */
  --accent: #12936a;       /* cAccent - gruen: steigt, gut */
  --warn: #d93f35;         /* cWarn - rot: laufende Ausgaben, faellt */
  --gold: #d4920f;         /* cGold - Sparen */
  --petrol: #0f8995;       /* cPetrol */
  --muted: #6b7a8c;        /* cMuted */
  --bg: #f5f7fa;           /* cBg */
  --card: #ffffff;         /* cCard */
  --grid: #e3e8ef;         /* cGrid */
  --input: #f0f8ec;        /* cInput - Ihre Eingaben */
  --calc: #f0f5fc;         /* cCalc - berechnet */
  --head: #28364c;         /* cHeadBg - dunkler Kopf */
  --einmal: #884ea0;       /* cEinmal - einmalige Ausgaben */
  --ohne: #788494;         /* cOhne - ohne Zuordnung (neutral) */
  --input-ink: #24623a; --calc-ink: #265496;
  --stand: #b9c2cd;        /* Anfangsstand (heute) - Hell(cMuted, 0.45) */
  --stand-ende: #28364c;   /* Endstand */
  --plan: #dfe4ea;         /* geplant (hellgrau) */
  --primary-hell: #7d98c0; /* Hell(cPrimary, 0.3) */
  --zins: #8ccbb5;         /* Zinsen - Hell(cAccent, 0.55) */
  --leben: #da7169;        /* Lebenshaltung - Hell(cWarn, 0.25) */
  --selten: #e49793;       /* seltener als monatlich - Hell(cWarn, 0.45) */
  --an: #dec08a;           /* an ein anderes Konto - Hell(cGold, 0.4) */
  --gold-hell: #f4e8d0;    /* Auswertungsjahr - Hell(cGold, 0.8) */
  /* Flaechen fuer Hinweise, Spuren und Kalender (im Dunkelmodus umdefiniert) */
  --spur: #eef1f5; --we: #dee2e9; --feier: #f8d7d3; --bruecke: #fff3cd;
  --eingabe-band: #d6ecce; --berechnet-band: #d8e4f6;
  --ok-bg: #e3f3ec; --ok-ink: #135c43; --ok-rand: #c4e5d6;
  --fehler-bg: #fbe9e8; --fehler-ink: #8f2a24; --fehler-rand: #f2cfcc;
  --gold-bg: #fbf4e6; --gold-bg2: #f8e6c0; --gold-rand: #ecd39a; --gold-ink: #7a5306;
  --rot-bg: #f6d4d1; --petrol-bg: #e5f2f3;
  --info-bg: #e7eef7; --info-ink: #1d4a6e; --info-rand: #c9dfee;
  --leiste-bg: rgba(255, 255, 255, .97);
  --radius: 14px;
  --schatten: 0 1px 2px rgba(15, 27, 43, .06), 0 2px 8px rgba(15, 27, 43, .05);
  --schatten-hoch: 0 2px 4px rgba(15, 27, 43, .06), 0 12px 28px rgba(15, 27, 43, .10);
  --leiste-h: 64px;
  /* Oberkante, ab der am iPhone nichts mehr verwischt: iOS legt unter die Statusleiste einen Unschärfe-Streifen, der gut
     die halbe Statusleistenhöhe weiter nach unten reicht (13.11.2026, Bildschirmfotos: 62 px Statusleiste, scharf ab ~95 px).
     Am PC und auf Geräten ohne Statusleiste 0. */
  --oben-frei: calc(env(safe-area-inset-top) * 1.55);
  --schrift: Aptos, "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --schrift-titel: "Segoe UI Variable Display", Aptos, "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
}
/* ---------- Dunkelmodus: folgt Windows, ausser im Schalter ist Hell oder Dunkel gewaehlt ---------- */
:root[data-theme="dunkel"] {
  color-scheme: dark;
  --ink: #e6ecf4; --primary: #6f9be3; --accent: #3cc193; --warn: #f0675d; --gold: #e8ab3c; --petrol: #3bb7c2;
  --muted: #8d9bae; --bg: #0c121b; --card: #151e2b; --grid: #253244; --input: #172619; --calc: #16233a;
  --head: #080d14; --einmal: #b98ad0; --ohne: #7d8898; --input-ink: #8fd3a5; --calc-ink: #9dbcf0;
  --stand: #4c5a6b; --stand-ende: #c9d4e2; --plan: #2a3647; --primary-hell: #4d6c9c; --zins: #3c8f75;
  --leben: #b85a52; --selten: #9e5550; --an: #8c7547; --gold-hell: #3a2f18;
  --spur: #1f2a39; --we: #233042; --feier: #47262a; --bruecke: #3f3719;
  --eingabe-band: #1d3a26; --berechnet-band: #1d2f4f;
  --ok-bg: #133126; --ok-ink: #8fdcb8; --ok-rand: #1f4d3b;
  --fehler-bg: #3a1a1a; --fehler-ink: #f4a39c; --fehler-rand: #5a2a28;
  --gold-bg: #2d2513; --gold-bg2: #3a2e14; --gold-rand: #5c4a1f; --gold-ink: #f0c873;
  --rot-bg: #4a2422; --petrol-bg: #12333a;
  --info-bg: #15263c; --info-ink: #a9c8ee; --info-rand: #24405f;
  --leiste-bg: rgba(16, 23, 33, .96);
  --schatten: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 10px rgba(0, 0, 0, .25);
  --schatten-hoch: 0 2px 4px rgba(0, 0, 0, .35), 0 14px 32px rgba(0, 0, 0, .45);
}
/* im Dunkeln: weisse Schrift braucht ein kraeftigeres Blau als die helle Linienfarbe */
:root[data-theme="dunkel"] .knopf.haupt { background: #2f62b5; border-color: #2f62b5; }
:root[data-theme="dunkel"] .chips a.aktiv { background: #2f62b5; border-color: #2f62b5; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--schrift); -webkit-font-smoothing: antialiased; }
/* Finger (11.11.2026): gedrückt halten auf einem Balken oder Diagramm markierte am iPhone den Text daneben und öffnete
   die Lupe/das Kopieren-Menü. Mit dem Finger wird nichts markiert - ausser in Eingabefeldern und in der Anleitung. */
@media (hover: none) and (pointer: coarse) {
  body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
  input, textarea, select, [contenteditable], #inhalt[data-seite="anleitung"] { -webkit-user-select: text; user-select: text; }
}
a { color: var(--primary); }
button { font: inherit; color: inherit; }
.zahl { font-variant-numeric: tabular-nums; white-space: nowrap; }
.plus { color: var(--accent); } .minus { color: var(--warn); } .leise { color: var(--muted); }

/* ---------- Kopf ---------- */
.kopf { position: sticky; top: 0; z-index: 5; background: var(--head); color: #fff;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px; display: flex; align-items: baseline; gap: 12px; }
.kopf h1 { font-size: 20px; margin: 0; font-weight: 650; letter-spacing: .1px; }
.kopf .stand { margin-left: auto; font-size: 12px; opacity: .75; text-align: right; }

/* ---------- Inhalt ---------- */
main { padding: 16px 16px calc(var(--leiste-h) + env(safe-area-inset-bottom) + 24px); max-width: 720px; margin: 0 auto; }
.raster { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.raster > * { min-width: 0; }
.karte { background: var(--card); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px; }
.karte h2 { font-size: 15px; margin: 0 0 8px; font-weight: 650; }
.karte p { margin: 6px 0; }
.kachel { display: block; text-decoration: none; color: inherit; }
.kachel .titel { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: none; }
.kachel .wert { font-size: 28px; font-weight: 700; margin: 2px 0; letter-spacing: -.3px; }
.kachel .unter { font-size: 13px; color: var(--muted); }
.kachel.pfeil { position: relative; padding-right: 36px; }
.kachel.pfeil::after { content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -5px;
  border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); }
.band { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .4px; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; }
.band.eingabe { background: var(--eingabe-band); color: var(--input-ink); }
.band.berechnet { background: var(--berechnet-band); color: var(--calc-ink); }
.band.bald { background: var(--spur); color: var(--muted); }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--grid); background: var(--card); cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink); }
.knopf.haupt { background: var(--primary); border-color: var(--primary); color: #fff; }
.knopf.gefahr { color: var(--warn); }
.knopf:disabled { opacity: .5; cursor: default; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hinweis { font-size: 13px; color: var(--muted); }
.meldung { padding: 10px 12px; border-radius: 10px; background: var(--calc); font-size: 14px; margin-top: 10px; }
.meldung.ok { background: var(--ok-bg); color: var(--ok-ink); }
.meldung.fehler { background: var(--fehler-bg); color: var(--fehler-ink); }

/* Listen (Konten, Mehr) */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--grid); }
.liste li:first-child { border-top: 0; }
.liste .name { flex: 1; min-width: 0; }
.liste .name small { display: block; color: var(--muted); font-size: 12px; }
.liste a.zeile { display: flex; align-items: center; gap: 12px; width: 100%; color: inherit; text-decoration: none; min-height: 28px; }
.liste .ziel::after { content: ""; display: block; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; }
.gruppe { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 4px 0 0; }
.marke { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th, .tabelle td { padding: 8px 4px; border-top: 1px solid var(--grid); text-align: left; vertical-align: top; }
.tabelle td.z, .tabelle th.z { text-align: right; }

.fett { font-weight: 700; }
.kopf .zurueck { color: inherit; text-decoration: none; font-size: 26px; line-height: 1; margin-right: -4px; padding: 0 8px 0 0; }

/* Kacheln oben auf einer Seite (Zusammenfassung) */
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kacheln .karte { padding: 12px 14px; }
.kacheln .gross { grid-column: 1 / -1; }
.kacheln .wert { font-size: 20px; }
.kacheln .gross .wert { font-size: 28px; }

/* Umschalter (Auszug | Zukunft | Rendite) und Zeitraum-Chips */
.umschalter { display: flex; background: var(--spur); border-radius: 12px; padding: 3px; gap: 3px; }
.umschalter a { flex: 1; text-align: center; padding: 8px 6px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.umschalter a.aktiv { background: var(--card); color: var(--ink); box-shadow: var(--schatten); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--grid); background: var(--card); font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; }
.chips a.aktiv { background: var(--head); border-color: var(--head); color: #fff; }

/* Waagerechte Treppe */
.treppe-zeile { display: grid; grid-template-columns: minmax(76px, 26%) 1fr auto; align-items: center; gap: 8px; min-height: 30px; font-size: 14px; }
.treppe-bahn { position: relative; height: 14px; }
.treppe-balken { position: absolute; top: 0; height: 14px; border-radius: 3px; }
.treppe-wert { text-align: right; min-width: 7.5em; }

/* Balken je Konto: links abfliessend, rechts dazukommend */
.rb-zeile { display: grid; grid-template-columns: 30% 1fr auto; align-items: center; gap: 8px; min-height: 38px; color: inherit; text-decoration: none; border-top: 1px solid var(--grid); font-size: 14px; }
.rb-zeile:first-child { border-top: 0; }
.rb-bahn{ position: relative; height: 16px; }
.rb-teil { position: absolute; top: 0; height: 16px; }
.rb-null{ position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--muted); }
.rb-wert { text-align: right; min-width: 7.5em; font-weight: 600; }
.rb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Warum: hinaus | herein */

.warum-netto { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; }

/* SVG-Diagramme */
.grafik { width: 100%; height: auto; max-height: 380px; display: block; overflow: visible; }
.grafik text { font: 600 10px var(--schrift); fill: var(--ink); }
.grafik text.unter { font-weight: 500; fill: var(--ink); font-size: 9.5px; }
.grafik text.leise { fill: var(--muted); }
.grafik text.plus { fill: var(--accent); } .grafik text.minus { fill: var(--warn); }
.grafik .achse { stroke: var(--muted); stroke-width: .8; }
.grafik .verbinder { stroke: var(--muted); stroke-width: .6; stroke-dasharray: 2 2; }
.grafik .blass { opacity: .45; }

/* Infofeld an Diagrammen (js/diagramm.js): folgt dem Mauszeiger, am Handy ein Tipp */
/* Legende hebt hervor (diagramm.js): der gewählte Eintrag, die verblassten Teile */
.hv-knopf { cursor: pointer; border-radius: 6px; transition: background .15s, box-shadow .15s; }
.hv-knopf:hover { background: var(--spur); box-shadow: 0 0 0 3px var(--spur); }
.hv-knopf.hv-gewaehlt { background: color-mix(in srgb, var(--primary) 16%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, var(--card)); font-weight: 700; }
.marke.hv-knopf.hv-gewaehlt { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.hv-blass { opacity: .18 !important; }
.gross-knopf { display: none; } /* Diagramm groß: nur am PC (desktop.css) */
.diagramm-tipp { position: fixed; z-index: 65; pointer-events: none; min-width: 170px; max-width: 320px; padding: 10px 12px; border-radius: 12px;
  background: var(--card); color: var(--ink); border: 1px solid var(--grid); box-shadow: var(--schatten-hoch); font-size: 13px; line-height: 1.35; }
.diagramm-tipp b { display: block; font-size: 13.5px; margin-bottom: 6px; }
.diagramm-tipp .tz { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 2px 0; }
.diagramm-tipp .tz i { width: 10px; height: 10px; border-radius: 3px; }
.diagramm-tipp .tz span:last-child { font-variant-numeric: tabular-nums; font-weight: 650; text-align: right; white-space: nowrap; }
.diagramm-tipp small { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--grid); color: var(--muted); font-size: 12px; }
.grafik .spalte-flaeche { fill: var(--ink); opacity: 0; pointer-events: all; }
.grafik .spalte.aktiv .spalte-flaeche { opacity: .06; }
.grafik .zeiger { opacity: 0; pointer-events: none; }
.grafik .spalte.aktiv .zeiger { opacity: 1; }

.grafik [data-tipp]:not(.spalte).aktiv { filter: brightness(1.12) saturate(1.1); }

.rb-teil.aktiv, .gb-teil.aktiv, .immo-bahn span.aktiv { filter: brightness(1.12) saturate(1.15); box-shadow: 0 0 0 1px var(--card), 0 0 0 2.5px var(--ink); z-index: 1; }

/* Vertraege & Abos */
.kachel.art { border-top: 3px solid var(--muted); }
.wahl { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px 6px; align-items: start; }
.wahl .gruppe { margin: 7px 0 0; }

/* Rückfrage (fragen in ui.js) */
dialog.frage { border: 0; border-radius: var(--radius); padding: 18px; max-width: min(92vw, 440px); box-shadow: 0 10px 40px rgba(15, 27, 43, .25); color: var(--ink); background: var(--card); }
dialog.frage::backdrop { background: rgba(15, 27, 43, .45); }
dialog.frage p { margin: 0 0 12px; font-size: 15px; line-height: 1.45; }
dialog.frage input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; min-height: 44px; padding: 0 12px; border: 1px solid var(--grid); border-radius: 10px; background: var(--input); margin-bottom: 12px; }

/* zwei Felder nebeneinander (von/bis, Abrechnung/Kosten) */
.zwei-felder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.zwei-felder input, .zwei-felder select { width: 100%; min-width: 0; }

/* Jahresplan: Monatskalender */

/* Ansicht Jahr | Monat | Woche und Blättern in einer Zeile */

/* Jahr: zwölf kleine Monate */

/* Woche: sieben große Tage */

/* Rechtsklick-Menü am Kalender */

/* Brückentage clever nutzen */

/* Jahresplan: Monat für Monat als Farbraster */

/* Immobilien: was es kostet, was es aufbaut */
.immo-zeile { padding: 8px 0; border-top: 1px solid var(--grid); font-size: 14px; }
.immo-zeile small { display: block; color: var(--muted); font-size: 12px; }
.immo-zeile small.plus { color: var(--accent); }
.immo-bahn { display: flex; height: 14px; margin: 4px 0; border-radius: 3px; overflow: hidden; background: var(--spur); }
/* Ziele: Fortschritt */
/* Tilgungsplan: ein Block je Kredit und Jahr */

/* Cloud und Sicherung: Hinweiszeile oben, nur wenn etwas zu tun ist */
.sync-leiste { margin-bottom: 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--info-bg); color: var(--info-ink); font-size: 14px; border: 1px solid var(--info-rand); }
.sync-leiste.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-rand); }
.sync-leiste.fehler { background: var(--fehler-bg); color: var(--fehler-ink); border-color: var(--fehler-rand); }
.sync-leiste button { font: inherit; font-weight: 700; color: var(--primary); background: none; border: 0; text-decoration: underline; padding: 0 0 0 4px; cursor: pointer; }
/* Hilfe: ⓘ an Kacheln (Erklärung aus Excel), Anleitung */

details.hl-begriff { border-top: 1px solid var(--grid); padding: 8px 0; }
details.hl-begriff p { margin: 6px 0 0; font-size: 14px; }
/* Einstellungen: je Bereich eine Zeile zum Aufklappen, Einheit hinter dem Feld, Auswahllisten als Marken */

.mit-einheit { display: flex; align-items: center; gap: 8px; }
.mit-einheit input { flex: 1; min-width: 0; text-align: right; }
.mit-einheit span { color: var(--muted); font-weight: 600; min-width: 1em; }
.ein-liste { border-top: 1px solid var(--grid); padding-top: 10px; margin-top: 10px; }
.ein-liste h3 { margin: 0 0 2px; font-size: 15px; }
.ein-chips span { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 999px; border: 1px solid var(--grid); background: var(--input); font-size: 13px; font-weight: 600; }
.ein-chips span.fest { background: var(--spur); color: var(--muted); padding-right: 12px; }
.ein-chips .weg { border: 0; background: none; color: var(--warn); font-size: 17px; line-height: 1; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.ein-neu { display: flex; gap: 8px; margin-top: 10px; }
.ein-neu input { flex: 1; min-width: 0; font: inherit; font-size: 16px; min-height: 40px; padding: 0 12px; border: 1px solid var(--grid); border-radius: 10px; background: var(--input); }
/* Jahresanalyse: je Jahr eine Zeile zum Aufklappen, Kategorien als Balken, Gold = Auswertungsjahr */

.ja-bahn { height: 10px; background: var(--spur); border-radius: 5px; overflow: hidden; }
.ja-bahn span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }

.ja-werte { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; margin: 6px 6px 8px; font-size: 14px; }
.ja-werte dt { color: var(--muted); }
.ja-werte dd { margin: 0; text-align: right; }

/* Monatsabschluss */
.liste.check li { align-items: flex-start; font-size: 14px; flex-wrap: wrap; }
.liste.check .name { flex: 1 1 200px; }
.check-zeichen { width: 18px; flex: none; font-size: 16px; line-height: 1.2; text-align: center; }
.knopf.klein { min-height: 34px; padding: 0 12px; font-size: 13px; }
.liste.check .knopf.klein { margin-left: 30px; }
.liste.tipps li { font-size: 13.5px; }
.liste.tipps li::before { content: "›"; color: var(--muted); font-weight: 700; }
.auszug.abschluss li { align-items: center; }
.auszug.abschluss .betrag input { width: 120px; text-align: right; }
details.so-gerechnet summary { cursor: pointer; font-weight: 600; }
details.so-gerechnet p { margin: 6px 0 0; }

/* Kontoauszug */
.auszug { list-style: none; margin: 0; padding: 0; }
.auszug li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 0; border-top: 1px solid var(--grid); font-size: 14px; }
.auszug li:first-child { border-top: 0; }
.auszug .was small { display: block; color: var(--muted); font-size: 12px; }
.auszug .betrag { text-align: right; }
.auszug .betrag small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.auszug li.stand .was, .auszug li.stand .betrag { font-weight: 700; }
.auszug li.gemeldet { background: var(--gold-bg); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.auszug li.heute { background: var(--ok-bg); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.auszug li.trenner { display: block; color: var(--petrol); font-weight: 700; background: var(--petrol-bg); margin: 0 -16px; padding: 6px 16px; }
.auszug li.rechnung .was { font-style: italic; }
.auszug li.blass { color: var(--muted); }

/* ---------- Dashboard ---------- */
h2.bereich { font-size: 15px; color: var(--primary); margin: 14px 0 -2px; }

.grafik text.ring-gross { font-size: 19px; font-weight: 750; }
.grafik .gitter { stroke: var(--grid); stroke-width: .6; }
.grafik .marke rect { fill: var(--card); stroke: var(--grid); }
.grafik .marke text { font-size: 8.5px; font-weight: 700; }
.ring { max-width: 300px; margin: 0 auto; }
.ring-legende { display: grid; gap: 10px; font-size: 13px; margin-top: 8px; }

.fs-zeile { display: grid; grid-template-columns: 34% 1fr; gap: 4px 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--grid); font-size: 13px; }
.fs-zeile:first-child { border-top: 0; }
.fs-name { font-weight: 600; }
.fs-bahn { height: 14px; background: var(--spur); border-radius: 4px; overflow: hidden; }
.fs-bahn span { display: block; height: 100%; border-radius: 4px; }
.fs-text { grid-column: 2; }
.fs-text small { display: block; color: var(--muted); font-size: 11.5px; }
.legende .marke { display: inline-block; margin: 0 3px 0 8px; vertical-align: -1px; }
.legende .marke:first-child { margin-left: 0; }
.bl-zeile { display: grid; grid-template-columns: 34% 1fr auto; gap: 8px; align-items: center; min-height: 28px; font-size: 13px; }
.bl-bahn { height: 14px; }
.bl-bahn span { display: block; height: 100%; border-radius: 2px; }

.bl-unter { grid-column: 1 / -1; color: var(--muted); font-size: 12px; margin-top: -4px; }

.extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.extra input { width: 7em; min-height: 40px; padding: 0 10px; border: 1px solid var(--gold); background: var(--input); border-radius: 10px; font: inherit; font-weight: 700; text-align: right; }

/* ---------- Start und Ihr Monat ---------- */
.fc { display: flex; align-items: center; gap: 14px; }

.kopfzeile { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kopfzeile a { font-size: 13px; font-weight: 700; color: var(--petrol); text-decoration: none; }
.gehalt { margin: 8px 0 4px; }
.gb-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.gb-kopf b { color: var(--ink); }
.schild { background: var(--spur); color: var(--ink); font-weight: 700; font-size: 12px; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.gb-bahn { display: flex; height: 22px; margin: 6px 0; gap: 1px; }
.gehalt.knapp .gb-bahn { height: 9px; opacity: .6; }
.gb-teil { display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; font-size: 11px; white-space: nowrap; }

.gb-rest { background: var(--ohne); }
/* Was ist anders als im Vormonat? (monatTeile.js monatsTabelle) - beide Monate nebeneinander, am PC und iPhone gleich */

table.mt { width: 100%; max-width: 620px; border-collapse: collapse; font-size: 14px; }
table.mt th, table.mt td { padding: 6px 0; text-align: left; font-weight: 400; vertical-align: top; }
table.mt td { text-align: right; white-space: nowrap; width: 6.4em; padding-left: 10px; }
table.mt thead th { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; text-align: right; }
table.mt thead th:first-child { text-align: left; }
table.mt thead th:last-child { color: var(--ink); }

table.mt th small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

table.mt tfoot :is(th, td) { padding-top: 10px; border-top: 2px solid var(--ink); font-weight: 750; font-size: 15px; }
table.mt tfoot td:last-child { color: var(--gold); }

/* Liste aller Konten neben dem Konto: nur am breiten PC (desktop.css) */
/* Handy: je Posten eine Zeile mit Balken und Betrag (monatTeile.js gehaltBalken) statt des einen Balkens mit Legende */
.gz { display: grid; gap: 7px; margin: 10px 0 4px; }
.gz-zeile { display: grid; grid-template-columns: minmax(84px, 34%) 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; }
.gz-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gz-bahn { height: 12px; border-radius: 4px; background: var(--spur); overflow: hidden; }
.gz-bahn > span { display: block; height: 100%; min-width: 3px; border-radius: 4px; }
.gz-zeile b { min-width: 58px; text-align: right; }
@media (max-width: 759px) { .gehalt:not(.knapp) > .gb-bahn, .gehalt:not(.knapp) > .gb-legende { display: none; } }
.gb-legende { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }
.gb-legende i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.gehalt.knapp { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--grid); }
.toepfe { margin-top: 12px; border-top: 1px solid var(--grid); padding-top: 8px; }
.tp-kopf { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.tp-kopf span { color: var(--muted); font-size: 12px; }
.tp-zeile { display: grid; grid-template-columns: 76px 1fr auto; gap: 2px 8px; align-items: center; padding: 6px 0; font-size: 14px; }
.tp-zeile small { grid-column: 2 / -1; color: var(--muted); font-size: 12px; }
.tp-name a { color: var(--ink); font-weight: 700; text-decoration: none; }
.tp-name { font-weight: 700; }
.tp-wert { font-weight: 700; text-align: right; }
.tp-summe { text-align: right; margin: 8px 0 0; font-size: 14px; }
.tp-summe .zahl { color: var(--gold); font-weight: 800; font-size: 17px; }
.tp-summe.minus .zahl, .tp-summe .zahl.minus { color: var(--warn); }

.karte.an { border-top: 4px solid var(--gold); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.karte.an p { margin: 2px 0; flex: 1; }

.liste.pc li { align-items: flex-start; font-size: 13.5px; }

.pc-link { font-size: 12.5px; font-weight: 700; color: var(--primary); text-decoration: none; white-space: nowrap; }

/* ---------- Erfassen ---------- */
.geaendert { background: var(--gold-bg); border: 1px solid var(--gold-rand); color: var(--gold-ink); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.formular { display: grid; gap: 10px; }
.formular label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.formular label[hidden] { display: none; }
.formular input, .formular select { font: inherit; font-size: 16px; color: var(--ink); font-weight: 500; min-height: 44px; padding: 0 12px; border: 1px solid var(--grid);
  border-radius: 10px; background: var(--input); width: 100%; }
.formular .feldfehler { border-color: var(--warn); box-shadow: 0 0 0 2px var(--rot-bg); }
.formular .hinweis { margin: 0; }

[data-suche] input { font: inherit; width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--grid); border-radius: 10px; margin-top: 4px; }

/* ---------- Leiste unten (Handy) ---------- */
.leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--leiste-bg);
  border-top: 1px solid var(--grid); display: flex; padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.leiste a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--leiste-h); font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
.leiste svg { width: 24px; height: 24px; }
.leiste a.aktiv { color: var(--primary); }
/* Handy: die fuenf Bereiche stehen direkt in der Leiste; die Seitenleiste des PCs (css/desktop.css) ist ausgeblendet,
   ebenso Pfad, Suche, Konto-Umschalter im Kopf und die Reiter des Monats */
.leiste-handy { display: contents; }
 .pfad{ display: none; }

/* Hinweis unten ("✔ Gespeichert · Rückgängig", ui.js hinweisZeigen) */
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--leiste-h) + env(safe-area-inset-bottom) + 14px); transform: translate(-50%, 20px); opacity: 0;
  display: flex; align-items: center; gap: 10px; max-width: min(92vw, 640px); padding: 10px 10px 10px 16px; border-radius: 14px;
  background: #182235; color: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); font-size: 14px; transition: opacity .2s, transform .2s; }
.toast.auf { opacity: 1; transform: translate(-50%, 0); }
.toast span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast button { border: 0; border-radius: 9px; padding: 6px 12px; background: rgba(255, 255, 255, .14); color: #fff; font: 700 13px var(--schrift); cursor: pointer; }
.toast button:hover { background: rgba(255, 255, 255, .24); }
.toast .toast-zu { padding: 6px 9px; background: none; font-size: 16px; line-height: 1; }
/* Schild an einem geänderten Betrag (bewegung.js): "+500,00 €" */
.delta { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; vertical-align: 2px; white-space: nowrap;
  letter-spacing: 0; animation: delta-ein .35s ease-out, delta-aus .6s ease-in 5.4s forwards; }
.kachel .wert .delta { font-size: 12px; vertical-align: 5px; }
.delta.hoch { background: var(--ok-bg); color: var(--ok-ink); }
.delta.runter { background: var(--fehler-bg); color: var(--fehler-ink); }
@keyframes delta-ein { from { opacity: 0; transform: translateY(4px); } }
@keyframes delta-aus { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .delta { animation: none; } }
.geaendert.vorschau { background: var(--info-bg); border-color: var(--info-rand); color: var(--info-ink); font-weight: 600; }
.vorschau-marke { padding: 1px 8px; border-radius: 999px; background: var(--info-bg); color: var(--info-ink); }
.vorschau-wirkung { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--info-bg); color: var(--info-ink); font-size: 13.5px; }
.vorschau-wirkung[hidden] { display: none; }

/* Cloud-Abgleich: Prüfwert zum Kopieren */
.pruefwert { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--spur); }
.pruefwert code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 600 13px ui-monospace, Consolas, monospace; }
.cloud-form { margin-top: 10px; }

/* Selbstprüfung (Daten & Abgleich): ✔ ok, ○ Hinweis, ⚠ Achtung */
.pruefung .stufe0 .check-zeichen { color: var(--accent); }
.pruefung .stufe1 .check-zeichen { color: var(--gold); }
.pruefung .stufe2 .check-zeichen { color: var(--warn); }
.pruefung .name small { display: block; color: var(--muted); font-weight: 400; margin-top: 1px; }
.pruefung .pc-link { margin-left: 30px; font-size: 13px; font-weight: 600; }

/* Belege an einer Buchung (Erfassen) und das Fenster zum Ansehen */

.belege-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.beleg-marke { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border-radius: 999px; border: 1px solid var(--grid); background: var(--input); font-size: 13px; font-weight: 600; color: var(--ink); }
.beleg-marke button { border: 0; background: none; font: inherit; cursor: pointer; padding: 2px 4px; color: var(--primary); }
.beleg-marke .weg { color: var(--warn); font-size: 16px; line-height: 1; width: 28px; height: 28px; border-radius: 50%; padding: 0; }
.beleg-marke.neu { border-style: dashed; }

dialog.beleg-fenster { width: min(94vw, 900px); }
.beleg-inhalt { max-height: 70vh; overflow: auto; text-align: center; }
.beleg-inhalt img { max-width: 100%; height: auto; border-radius: 8px; }
.beleg-inhalt iframe { width: 100%; height: 68vh; border: 0; border-radius: 8px; background: #fff; }

/* Weiche Seitenwechsel (app.js seitenWechsel): Kopf und Leisten bleiben stehen, der Inhalt blendet kurz über */
.kopf { view-transition-name: kopf; }
.leiste { view-transition-name: leiste; }
::view-transition-old(root) { animation: 140ms ease-out both seite-raus; }
::view-transition-new(root) { animation: 220ms ease-out both seite-rein; }
::view-transition-group(karte-auf) { animation-duration: 280ms; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
@keyframes seite-raus { to { opacity: 0; } }
@keyframes seite-rein { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* Beträge ausblenden (Auge oben rechts am Handy): Beträge und Achsen unkenntlich */
.kopf .stand { display: flex; align-items: center; gap: 8px; justify-content: flex-end; opacity: 1; }
/* Ziehen zum Aktualisieren (app.js): die Anzeige oben, nur während man die Seite herunterzieht. In Ruhe unsichtbar –
   sonst lugte sie am iPhone verschwommen unter der Statusleiste hervor (13.11.2026, Nutzer: „oben halb ausgeblendet“) */
.ptr { position: fixed; z-index: 30; left: 50%; top: calc(var(--oben-frei) + 8px); transform: translate(-50%, -60px); padding: 7px 14px; border-radius: 999px;
  background: var(--card); color: var(--ink); box-shadow: var(--schatten); font: 600 13px var(--schrift); transition: transform .15s, opacity .15s; pointer-events: none;
  opacity: 0; visibility: hidden; }
.ptr.zieht { opacity: 1; visibility: visible; }
.ptr.bereit { background: var(--accent); color: #fff; }
.h-status { font-size: 12.5px; color: var(--muted); }
.h-status.warn { color: var(--warn); }
.auge { border: 0; background: var(--spur); border-radius: 999px; width: 34px; height: 30px; font-size: 16px; line-height: 1; cursor: pointer; }
.auge[data-suche-handy] { display: inline-grid; place-items: center; color: var(--ink); }
/* Knöpfe im dunklen Kopf (12.11.2026, Nutzer: "oben halb ausgeblendet, etwas ausgeblichen"): hell auf dunkel statt grau,
   der gewählte (Auge an) kräftiger; der Kopf richtet sie mittig aus und beginnt erst unter dem Unschärfe-Streifen des iPhones */
.kopf { align-items: center; padding-top: max(16px, calc(var(--oben-frei) + 8px)); }

.kopf .auge { width: 38px; height: 34px; font-size: 17px; }
.kopf .auge[aria-pressed="true"] { background: rgba(255, 255, 255, .34); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6); }

/* Suche am Handy: oben, damit die Tastatur die Treffer nicht verdeckt; ohne Tastenkürzel-Zeile */
@media (max-width: 759px) {
  dialog.suche { margin: calc(var(--oben-frei) + 10px) auto auto; max-height: 62vh; }
  
  .such-liste a { grid-template-columns: 64px minmax(0, 1fr) auto; }
}
html.betraege-aus #inhalt :is(.zahl, .wert, .betrag, .vl-lesen b, .gb-legende, .k-legende b),
html.betraege-aus #inhalt svg.grafik text, html.betraege-aus .diagramm-tipp, html.betraege-aus .schublade :is(.zahl, .wert) { filter: blur(7px); }

/* Karte mit zwei Darstellungen (Konto: Wann, Jahresenden): Säulen oder Linie */

/* Fenster von unten (schublade.js am Handy): Erfassen und Buchung ändern gleiten herein, nach unten wischen schließt */
@media (max-width: 759px) {
  .schublade-hinter { position: fixed; inset: 0; z-index: 59; background: rgba(5, 10, 20, .45); opacity: 0; transition: opacity .2s; }
  .schublade-hinter.auf { opacity: 1; }
  .schublade { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; max-height: 92vh; display: flex; flex-direction: column; background: var(--bg);
    border-radius: 20px 20px 0 0; box-shadow: 0 -16px 40px rgba(0, 0, 0, .35); transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
  .schublade.auf { transform: none; }
  .schublade-griff { width: 42px; height: 5px; border-radius: 3px; background: var(--grid); margin: 8px auto 0; }
  .schublade-kopf { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 6px; }
  .schublade-kopf h2 { margin: 0; font-size: 18px; }
  .schublade-zu { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--spur); color: var(--ink); font-size: 20px; }
  .schublade-inhalt { flex: 1; overflow-y: auto; padding: 0 12px calc(env(safe-area-inset-bottom) + 16px); overscroll-behavior: contain; }
  .schublade-inhalt .raster { gap: 10px; }
  .schublade-inhalt [data-monat] { display: none; }   /* "Ihr Monat" daneben: am Handy zu lang - die Seite dahinter zeigt die Probe */
  .ziffern { z-index: 70; }
}

/* Monatsrückblick (seiten/handy/rueckblick.js): die Bildfolge im Vollbild (auf Heute der Kreis oben rechts) */
.story { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; padding: calc(var(--oben-frei) + 12px) 22px calc(env(safe-area-inset-bottom) + 18px);
  background: radial-gradient(120% 90% at 20% 10%, #2a62bd 0%, #142d5c 55%, #0b1530 100%); color: #fff; -webkit-user-select: none; user-select: none; }
.st-fort { display: flex; gap: 4px; }
.st-fort span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
.st-fort span.fertig, .st-fort span.jetzt { background: #fff; }
.st-zu { position: absolute; right: 14px; top: calc(var(--oben-frei) + 22px); width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 22px; }
.st-seite { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; animation: st-rein .3s ease-out; }
@keyframes st-rein { from { opacity: 0; transform: translateY(10px); } }
.st-gross { font-size: 34px; font-weight: 800; letter-spacing: -.8px; line-height: 1.1; }
.st-titel { font-size: 30px; font-weight: 800; letter-spacing: -.6px; line-height: 1.15; }
.st-satz { margin: 0; font-size: 16px; opacity: .85; line-height: 1.4; }
/* Folie 1: die Rechnung des Monats (Herein − Ausgegeben = Gespart) */
.st-rechnung { display: grid; gap: 2px; padding: 6px 16px; border-radius: 16px; background: rgba(255, 255, 255, .08); }
.st-rechnung div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; font-size: 17px; }
.st-rechnung b { font-size: 22px; font-variant-numeric: tabular-nums; }
.st-rechnung .ein b, .st-gruen { color: #6fd3a2; }
.st-rechnung .aus b, .st-rot { color: #f3968b; }
.st-rechnung .ohne { opacity: .7; }
.st-rechnung .summe { border-top: 2px solid rgba(255, 255, 255, .35); margin-top: 4px; padding-top: 12px; font-weight: 700; }
.st-rechnung .summe b, .st-gold { color: #f2c35c; }
.st-rechnung .summe b { font-size: 26px; }
/* Folie Montage: Tage und Geld je zwei Kacheln */

.st-liste small { display: flex; justify-content: space-between; gap: 10px; margin-top: 3px; font-size: 13px; opacity: .7; }
.st-liste small em { font-style: normal; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-liste small .st-betrag { flex: none; white-space: nowrap; }
.st-liste span { min-width: 0; }
.st-liste li:has(small) { align-items: start; }
.st-bahn { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: rgba(255, 255, 255, .15); }
.st-liste, .st-konten { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.st-liste li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.st-liste i { width: 12px; height: 12px; border-radius: 3px; }
.st-konten li { display: grid; grid-template-columns: minmax(70px, 1fr) 1.2fr auto; gap: 10px; align-items: center; }
.st-konten i { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.st-konten em { display: block; height: 100%; border-radius: 5px; }
.st-konten em.plus { background: #6fd3a2; }
.st-konten em.minus { background: #f08a7e; }
.st-hinweis { text-align: center; font-size: 12px; opacity: .6; }
html.betraege-aus .story b { filter: blur(7px); }
/* jeder Geldbetrag im Text (privat.js fasst "… €" in .geld) und alle Diagramm-Beschriftungen - überall, auch in Fenstern */
html.betraege-aus .geld { filter: blur(6px); }
html.betraege-aus :is(#inhalt, .schublade, .story, dialog) svg text { filter: blur(5px); }
/* App-Umschalter am Handy: nur das Logo (privat.js). Der Schirm ist immer da und schon gezeichnet, nur unsichtbar -
   html.abgedeckt schaltet ihn ohne Aufbau ein; offene Fenster (dialog liegt über allem) werden mit ausgeblendet */
.schutz-schirm { position: fixed; inset: 0; z-index: 190; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: radial-gradient(120% 90% at 20% 10%, #2a62bd 0%, #142d5c 55%, #0b1530 100%); color: #fff; font-size: 20px;
  visibility: hidden; pointer-events: none; will-change: opacity; }
html.abgedeckt .schutz-schirm { visibility: visible; }
html.abgedeckt :is(#inhalt, .leiste, .kopf, dialog, .story) { visibility: hidden; }

/* Kalender mit dem Finger (jahresplan.js fingerBedienung): seitlich wischen blättert, lange drücken und ziehen wählt */

/* Diagramme mit dem Finger: seitlich ziehen liest ab, senkrecht wischen scrollt weiter (diagramm.js, verlauf.js) */
svg.grafik { touch-action: pan-y; }
svg.verlauf { display: block; width: 100%; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.vl-strich { stroke: var(--ink); stroke-width: 1; opacity: .55; }
.vl-punkt { fill: var(--vl-farbe, var(--primary)); stroke: var(--card); stroke-width: 2; }
.vl-band { fill: var(--vl-farbe, var(--primary)); opacity: .12; }
.vl-lesen { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0 0; min-height: 22px; font-size: 13px; color: var(--muted); }
.vl-lesen.aktiv { color: var(--ink); }
.vl-lesen.aktiv b { font-size: 15px; }

/* Einfache Ansicht am Handy (ansicht.js, seiten/handy/*): ＋ rund in der Mitte der Leiste (Gestaltung der Leiste: handy.css) */

.leiste-handy.einfach .leiste-plus { display: grid; place-items: center; }
.plus-rund { display: grid; place-items: center; width: 52px; height: 52px; margin-top: -18px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 30px; line-height: 1; box-shadow: 0 6px 18px rgba(20, 60, 40, .35); }

/* App-Sperre (sperre.js): der Schirm deckt alles zu; im Hintergrund wird der Inhalt sofort unkenntlich (App-Umschalter) */
html.verdeckt #inhalt, html.verdeckt .leiste, html.verdeckt .kopf { filter: blur(22px); }
.sperre-schirm { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.sperre-inhalt { display: grid; justify-items: center; gap: 10px; text-align: center; max-width: 320px; }
.sperre-inhalt h2 { margin: 4px 0 0; font-size: 22px; }
.sperre-inhalt .knopf { min-width: 200px; min-height: 48px; font-size: 16px; }
.sperre-notfall { margin-top: 26px; border: 0; background: none; color: var(--muted); font: 500 12.5px var(--schrift); text-decoration: underline; cursor: pointer; }

/* iPhone: Erfassen-Knopf über der Leiste (am PC ausgeblendet, desktop.css), nicht auf Erfassen selbst */

/* Erfassen: Vorlagen (die häufigsten einmaligen Buchungen) */
.vorlagen { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; align-items: center; padding-bottom: 2px; }
.vorlagen::-webkit-scrollbar { display: none; }
.vorlagen span { flex: none; font-size: 12px; font-weight: 700; }
.vorlagen button { flex: none; min-height: 36px; padding: 0 12px; border: 1px dashed var(--grid); border-radius: 999px; background: none; color: var(--ink); font: 600 13px var(--schrift); cursor: pointer; }
/* iPhone: Ziffernfeld für den Betrag */
.ziffern { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 10px 12px calc(env(safe-area-inset-bottom) + 10px); background: var(--card); border-top: 1px solid var(--grid); box-shadow: 0 -10px 30px rgba(0, 0, 0, .25); }
.ziffern[hidden] { display: none; }
.ziffern button { min-height: 50px; border: 0; border-radius: 12px; background: var(--spur); color: var(--ink); font: 600 22px var(--schrift); cursor: pointer; }
.ziffern button:active { filter: brightness(1.2); }
.ziffern .ziffern-zu { font-size: 15px; }
.ziffern .ziffern-ok { grid-column: span 2; background: var(--accent); color: #fff; font-size: 17px; }
form.mit-ziffern { padding-bottom: 300px; }
.formular input.tippt { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }

/* Erfassen: Schnellwahl der Art */

/* iPhone: größere Tippflächen, Betrag gut lesbar */
@media (max-width: 759px) {
  .chips a { min-height: 36px; display: inline-flex; align-items: center; }
  .knopf.klein { min-height: 40px; }
  .formular input[name="betrag"] { font-size: 22px; font-weight: 700; min-height: 52px; }
  /* weniger Text: Erklärungen hinter dem ⓘ der Karte (app.js handyAufraeumen), Einleitungen über den Karten weg */

.raster > .kopfzeile > p.hinweis, .raster > p.hinweis { display: none; }
  .raster > .kopfzeile { justify-content: flex-end; }
  /* Kacheln als Streifen zum Wischen - eine Zeile statt drei */
  .kacheln { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 46%); overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -16px; padding: 0 16px 6px; scroll-padding-left: 16px; scrollbar-width: none; }
  .kacheln::-webkit-scrollbar { display: none; }
  .kacheln > * { scroll-snap-align: start; }
  .kacheln > .gross { grid-column: span 2; }
  
  .kacheln .unter { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* Dashboard: die Konten einzeln stehen unter Konten */
  
  /* zugeklappt nur am Handy: die Zeile zum Aufklappen */
  details.handy-zu > summary.nur-handy { display: flex; justify-content: space-between; gap: 10px; cursor: pointer; padding: 8px 2px; font-size: 13.5px; font-weight: 700; color: var(--primary); }
  /* unten Platz für den Erfassen-Knopf, damit er die letzte Karte nicht verdeckt */
  main#inhalt { padding-bottom: calc(var(--leiste-h) + env(safe-area-inset-bottom) + 84px); }
}

/* Start "Heute": Gruß mit der Lage in einem Satz */

/* Kennzahl mit Verlauf (Konten): kleine Linie der letzten zwölf Monate, Marke "▲ +320 € seit Ende Okt" */

svg.funke { display: block; width: 100%; height: 36px; margin-top: 8px; overflow: visible; }

.seit-bahn { height: 8px; border-radius: 4px; background: var(--spur); overflow: hidden; }
.seit-bahn span { display: block; height: 100%; border-radius: 4px; }
.seit-bahn .hoch { background: var(--accent); }
.seit-bahn .runter { background: var(--warn); }

/* Karten statt Listen: Ziele, Kredite, Verträge (wie die Einsatz-Karten der Reisekosten) */
.k-karten { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.k-karte { display: grid; gap: 6px; border-left: 4px solid var(--k-farbe, var(--grid)); }
a.k-karte, .k-karte > a.k-link { color: inherit; text-decoration: none; }
.k-karte > a.k-link { display: grid; gap: 6px; }
.k-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15.5px; }
.k-kopf .zahl { font-size: 18px; font-weight: 700; white-space: nowrap; }
.k-unter { color: var(--muted); font-size: 13px; }
.k-bahn { position: relative; display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--spur); margin-top: 2px; }
.k-bahn span { display: block; height: 100%; }
.k-legende { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.k-legende i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }
.k-legende b { color: var(--ink); font-weight: 600; }
.k-status { font-size: 13px; font-weight: 600; }
.k-fuss { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--grid); padding-top: 6px; }

.k-gruppe { scroll-margin-top: 70px; }
.k-gruppe h2.bereich { display: flex; align-items: center; gap: 8px; }

/* Verträge: die 12 Monate einzeln nur bei Bedarf; Kategorien zum Aufklappen (am Handy zu, am PC offen) */

/* am Handy umbrechen statt die Seite zu verbreitern (14.11.2026) */

/* kompakte Vertrags-Karte */
.k-karte.klein { padding: 12px 14px; gap: 3px; }
.k-karte.klein .k-kopf { font-size: 14.5px; }
.k-karte.klein .k-kopf .zahl { font-size: 15.5px; }

/* Reisekosten: Kacheln je Lage, Einsatz-Karten (Abrechnung = Kosten + Gewinn als Balken) */

.re-bahn { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--spur); margin-top: 2px; }
.re-bahn span { display: block; height: 100%; }

/* Reisekosten: die Auslagen eines Einsatzes */
.auslagen li .was small { display: block; }

/* leere Zustände */

.leer-zeile { align-items: center; }

/* Drucken / PDF (Monatsbericht): nur der Inhalt, ohne Leiste, Knöpfe und Schatten */
@media print {
  body { padding: 0 !important; background: #fff !important; }
  .leiste, .zurueck, .geaendert, .sync-leiste, .toast, .knopf, .delta, .ziel-hebel, .schublade, .schublade-hinter { display: none !important; }
  .kopf { position: static !important; padding: 0 0 8px !important; background: none !important; backdrop-filter: none !important; }
  main { padding: 0 !important; max-width: none !important; }
  .karte { box-shadow: none !important; border: 1px solid #d5dbe3 !important; break-inside: avoid; }
  .nur-handy { display: none !important; } 
  a { color: inherit !important; text-decoration: none !important; }
}

/* Notfall-Blatt (seiten/notfall.js): liest sich wie ein Dokument, druckt auf A4 */
.nf { max-width: 860px; }
.nf [hidden] { display: none !important; }
.nf h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.nf .kopfzeile { align-items: center; margin-bottom: 6px; }
.nf .auszug .was small { overflow-wrap: anywhere; }
.nf-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.nf-linien { display: none; }
.nf textarea { font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); padding: 10px 12px; border: 1px solid var(--grid); border-radius: 10px; background: var(--input); resize: vertical; }
.nf-fuss { margin: 0; text-align: center; }
.nf-konto, .nf-leer { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
details.nf-auf > summary { list-style: none; margin-bottom: 0; }
details.nf-auf > summary::-webkit-details-marker { display: none; }
details.nf-auf[open] > summary { margin-bottom: 6px; }
@media (max-width: 759px) {
  details.nf-auf > summary { cursor: pointer; }
  details.nf-auf > summary h2::after { content: "›"; color: var(--muted); font-weight: 400; transition: transform .15s; }
  details.nf-auf[open] > summary h2::after { transform: rotate(90deg); }
}
/* Linie unter jeder Zeile (nicht darüber): so beginnen beide Spalten auf gleicher Höhe */
.nf .auszug li { border-top: 0; border-bottom: 1px solid var(--grid); break-inside: avoid; }
.nf .auszug li.nf-kat { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0 4px; font-size: 12px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase; color: var(--muted); break-after: avoid; }
.nf .auszug li.nf-kat:first-child { padding-top: 2px; }
/* breiter Bildschirm und Papier: Listen in zwei Spalten - das Blatt bleibt kurz */
@media (min-width: 1000px), print { .nf-spalten { columns: 2; column-gap: 36px; } }
@media print {
  @page { margin: 14mm 14mm 16mm; }
  .nf { max-width: none; gap: 10px; font-size: 12.5px; }
  .nf .karte { padding: 10px 14px; break-inside: auto; }
  .nf .nf-kopf .hinweis, .nf [data-nf-aendern], .nf [data-nf-form], .nf .nf-leer, #stand button { display: none !important; }
  .nf h2 { font-size: 15px; break-after: avoid; }
  .nf .auszug li { padding: 5px 0; break-inside: avoid; font-size: 12.5px; }
  .nf-linien { display: block; height: 96px; background: repeating-linear-gradient(to bottom, transparent 0 23px, #9aa5b1 23px 24px); }
}

/* Tastenkürzel-Übersicht (?) */

.such-art { overflow: hidden; text-overflow: ellipsis; }

/* Ziele: schneller mit +x € pro Monat */
.ziel-hebel { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; }
.ziel-hebel .knopf.klein { min-height: 28px; padding: 0 10px; font-size: 12px; }
.ziel-hebel .knopf.aktiv { border-color: var(--primary); color: var(--primary); }
.ziel-hebel [data-antwort] { font-weight: 700; }

/* Was wäre, wenn? - Regler */

/* Ergebnis-Karten stehen im Raster neben den Reglern */

/* Schnellsuche (js/suche.js) */
dialog.suche { width: min(640px, 94vw); max-height: min(560px, 80vh); margin: 12vh auto auto; padding: 0; border: 1px solid var(--grid); border-radius: 16px;
  background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); overflow: hidden; }
dialog.suche::backdrop { background: rgba(8, 13, 20, .5); backdrop-filter: blur(3px); }
dialog.suche form { display: flex; flex-direction: column; max-height: inherit; }
dialog.suche input { font: inherit; font-size: 17px; color: var(--ink); padding: 16px 18px; border: 0; border-bottom: 1px solid var(--grid); background: none; outline: none; }
.such-liste { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.such-liste a { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.such-liste li[aria-selected="true"] a, .such-liste a:hover { background: var(--spur); }
.such-liste li[aria-selected="true"] a { box-shadow: inset 3px 0 0 var(--primary); }
.such-art { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.such-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.such-text small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.such-liste .leer { padding: 14px; color: var(--muted); }

kbd { display: inline-block; min-width: 1.6em; padding: 1px 5px; margin: 0 1px; border: 1px solid var(--grid); border-bottom-width: 2px; border-radius: 5px;
  font: 600 11px var(--schrift); text-align: center; color: var(--muted); background: var(--card); }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
