/* Finanzen – Grundstil der Finanz-Hülle und aller Reiter (finanzen/*.js, diagramm-finanzen.js): Farben, Diagramme, Kopf, Karten,
   Übersicht, Blätter, Formulare, Einstellungen, mobile Leiste. Aus stil.css ausgelagert; global in index.html geladen (auch das
   Dashboard zeigt den Finanzverlauf), nur Klassen mit Präfix fin-/fd-/pl-. Werte aus tokens.css. */

/* ---------- Finanzen: Farben (11 §2.4; über die Zustands-Tokens auch im hellen Thema) ---------- */
:root {
  --fin-ein: var(--gut); --fin-aus: var(--fehl); --fin-saldo: var(--akzent); --fin-neutral: #6a6a77; --fin-v-aus: #8a8a9e;
  --fin-ein-text: var(--gut-text); --fin-aus-text: var(--fehl-text); --fin-warn-text: var(--warn-text);
  --fin-minusflaeche: rgba(229,72,77,.06); --fin-band: rgba(165,148,255,.14);
  --fin-heat-1: #2e2554; --fin-heat-2: #41337e; --fin-heat-3: #5843aa; --fin-heat-4: #6a4fcc;
  /* Kategorienfarben (docs/finanzen-ansicht.md): feste Reihenfolge, nie nach Rang umfärben; geprüft mit dem Paletten-Validator (OKLab):
     dunkel auf --bg-2 alle ≥ 3:1, benachbarte Paare CVD-ΔE ≥ 8,4 und Normalsicht-ΔE ≥ 19; hell siehe unten. 7–10 nur für mehr als 6 Teile. */
  --kat-1: #3987e5; --kat-2: #d95926; --kat-3: #199e70; --kat-4: #c98500; --kat-5: #d55181; --kat-6: #9085e9;
  --kat-7: #8a9a1a; --kat-8: #2a9fc0; --kat-9: #c27a3a; --kat-10: #6f7fe0; --kat-weitere: #6a6a77;
  --fin-box-haendler: #3987e5; --fin-box-betrag: #e5484d; --fin-box-datum: #c98500; --fin-box-bon: #9a9aa7;
  --logo-grund-anteil: 32%; --logo-text-anteil: 45%; --logo-text-basis: #fff; --logo-rand: rgba(255,255,255,.13);
}
html[data-thema=hell] { --fin-neutral: #8a8a9b; --fin-minusflaeche: rgba(210,60,74,.06); --fin-band: rgba(112,72,232,.12); --kat-weitere: #8a8a9b;
  /* Hell: dieselben Farbtöne, für Weiß gestuft (alle ≥ 3:1; benachbarte Paare CVD-ΔE ≥ 7,8 → Abstände/Legende als Zweitkodierung). */
  --kat-1: #2a78d6; --kat-3: #16996a; --kat-6: #6250d6; --kat-7: #7a8a10; --kat-8: #1a8fb0; --kat-9: #b06a2a; --kat-10: #4f7fe0;
  --fin-v-aus: #7a7a90;
  --fin-heat-1: #ece7fd; --fin-heat-2: #d9cffb; --fin-heat-3: #c0b0f6; --fin-heat-4: #a690f1;
  --logo-grund-anteil: 18%; --logo-text-anteil: 72%; --logo-text-basis: #111118; --logo-rand: rgba(24,24,60,.1); }
.geld { font-variant-numeric: tabular-nums; white-space: nowrap; }
.geld.plus { color: var(--fin-ein-text); } .geld.minus { color: var(--fin-aus-text); }
.fin-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fin-reiter { position: relative; }
/* Klebende Reiterleiste: leicht durchscheinend (Glas), damit sie sich oben in den Seitenverlauf einfügt; nur Farbe/Unschärfe, keine Bewegung. */
@media (min-width: 861px) { .fin-reiter { position: sticky; top: var(--a-2); z-index: 5; background: color-mix(in srgb, var(--glas-deckend-1) 80%, transparent);
  -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); } }

/* ---------- Finanzdiagramme (diagramm-finanzen.js) ---------- */
.fd-huelle { position: relative; min-width: 0; }
.fd-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 24px; }
.fd-kopf .legende { margin-bottom: 6px; }
.fd-tabellenknopf { flex: none; }
.fd-buehne.fd-als-tabelle { min-height: 0; }
.fd-satz { font-size: .85rem; margin: 8px 0 0; }
.fd-satz:empty { display: none; }
.fd-fuss { font-size: var(--t-xs); margin: 4px 0 0; }
.legende i.fd-l-ein { background: var(--fin-ein); } .legende i.fd-l-aus { background: var(--fin-aus); }
.legende i.fd-l-saldo { background: var(--fin-saldo); } .legende i.fd-l-neutral { background: var(--fin-neutral); }
.legende i.fd-l-band { background: var(--fin-band); border: 1px dashed var(--fin-saldo); }
.legende i.fd-l-grenze { background: none; border-top: 2px dashed var(--fin-aus); border-radius: 0; height: 0; vertical-align: 3px; }
.legende i.fd-l-umriss { background: var(--fehl-flaeche); border: 1.5px solid var(--fin-aus); }
.legende i.fd-l-ueblich { background: rgba(236,236,242,.6); width: 2px; border-radius: 0; height: 12px; }
.legende i.fd-l-budget { background: var(--warn); width: 2px; border-radius: 0; height: 12px; }
.diagramm .fd-minus { fill: var(--fin-minusflaeche); }
.diagramm .fd-null { stroke: var(--linie-stark); stroke-width: 1.5; }
.diagramm .fd-s-ein { fill: var(--fin-ein); } .diagramm .fd-s-aus { fill: var(--fin-aus); }
.diagramm .fd-teil { opacity: .45; }
.diagramm .fd-umriss { fill-opacity: .12; stroke-width: 1.5; }
.diagramm .fd-u-aus { fill: var(--fin-aus); stroke: var(--fin-aus); } .diagramm .fd-u-ein { fill: var(--fin-ein); stroke: var(--fin-ein); }
.diagramm .fd-linie { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.diagramm .fd-saldo { stroke: var(--fin-saldo); } .diagramm .fd-neutral { stroke: var(--fin-neutral); }
.diagramm .fd-ein.fd-linie { stroke: var(--fin-ein); } .diagramm .fd-aus.fd-linie { stroke: var(--fin-aus); }
.diagramm .fd-fort { stroke-dasharray: 5 4; }
/* G1b Verlauf (Übersicht, FIN-15): Einnahmen als blasse Fläche mit Kante, Ausgaben als Balken davor, der Teil über den Einnahmen rot,
   Saldo als Zahl darüber, Ø der Ausgaben gestrichelt, laufende Periode schraffiert. Einzeichnen nur per transform/opacity (einmal). */
.diagramm .fv-ein { fill: var(--fin-ein); fill-opacity: .17; }
.diagramm .fv-ein-hoch { fill-opacity: .07; }
.diagramm .fv-kante { stroke: var(--fin-ein); stroke-width: 2; stroke-linecap: round; }
.diagramm .fv-kante.fv-gestrichelt { stroke-dasharray: 3 3; stroke-opacity: .8; }
.diagramm .fv-aus { fill: var(--fin-v-aus); }
.diagramm .fv-minus { fill: var(--fin-aus); }
.diagramm .fv-schraffur { fill: none; stroke: var(--fin-v-aus); stroke-width: 1.3; stroke-opacity: .85; }
.diagramm .fv-hoch-rahmen { fill: none; stroke: var(--fin-v-aus); stroke-width: 1.2; stroke-dasharray: 3 2; }
.diagramm .fv-schnitt { stroke: var(--text); stroke-opacity: .38; stroke-width: 1.2; stroke-dasharray: 4 4; }
.diagramm .fv-saldo { font-size: 10.5px; font-weight: 600; font-family: var(--schrift); paint-order: stroke; stroke: var(--bg-2, var(--bg)); stroke-width: 3px; stroke-linejoin: round; }
.diagramm .fv-s-plus { fill: var(--fin-ein-text); } .diagramm .fv-s-minus { fill: var(--fin-aus-text); }
.diagramm .fv-s-hoch { font-weight: 500; opacity: .85; }
.diagramm .fv-achse-lauf { font-weight: 600; fill: var(--text); }
.legende i.fd-l-v-ein { background: color-mix(in srgb, var(--fin-ein) 24%, transparent); box-shadow: inset 0 2px 0 var(--fin-ein); }
.legende i.fd-l-v-aus { background: var(--fin-v-aus); } .legende i.fd-l-v-minus { background: var(--fin-aus); }
.legende i.fd-l-v-schnitt { background: none; border-top: 2px dashed color-mix(in srgb, var(--text) 50%, transparent); border-radius: 0; height: 0; vertical-align: 3px; }
.legende i.fd-l-v-hoch { background: repeating-linear-gradient(135deg, var(--fin-v-aus) 0 1.5px, transparent 1.5px 4px); outline: 1px dashed var(--fin-v-aus); outline-offset: -1px; }
.fd-buehne > .fd-ein.fv-diagramm, .fd-buehne > .fd-ein.fv-diagramm svg { animation: none; }
.fd-ein.fv-diagramm .fv-saeule { animation: fv-wachsen 420ms var(--kurve-aus) both; animation-delay: calc(var(--i, 0) * 28ms); transform-box: fill-box; transform-origin: 50% 100%; }
.fd-ein.fv-diagramm .fv-kante, .fd-ein.fv-diagramm .fv-saldo, .fd-ein.fv-diagramm .fv-schnitt { animation: bz-ein 260ms var(--kurve-aus) both; animation-delay: calc(240ms + var(--i, 0) * 28ms); }
@keyframes fv-wachsen { from { transform: scaleY(0); } }
/* G3 „Weg ins Plus“: je Weg eine feste Kategorienfarbe (kat-1…3, auf --bg-2 geprüft), der eigene Betrag in --fin-saldo; der gewählte Weg
   kräftig, die übrigen dünn und blass (Name in Legende und Tooltip, Farbe nie allein). */
.diagramm .fd-weg-schnell { stroke: var(--kat-1); } .diagramm .fd-weg-ausgewogen { stroke: var(--kat-2); }
.diagramm .fd-weg-langsam { stroke: var(--kat-3); } .diagramm .fd-weg-eigen { stroke: var(--fin-saldo); }
.diagramm .fd-p-weg-schnell { fill: var(--kat-1); } .diagramm .fd-p-weg-ausgewogen { fill: var(--kat-2); }
.diagramm .fd-p-weg-langsam { fill: var(--kat-3); } .diagramm .fd-p-weg-eigen { fill: var(--fin-saldo); }
.legende i.fd-l-weg-schnell { background: var(--kat-1); } .legende i.fd-l-weg-ausgewogen { background: var(--kat-2); }
.legende i.fd-l-weg-langsam { background: var(--kat-3); } .legende i.fd-l-weg-eigen { background: var(--fin-saldo); }
.diagramm .fd-linie[class*="fd-weg-"] { stroke-width: 3; }
.diagramm .fd-linie.fd-gedaempft { stroke-width: 1.5; stroke-opacity: .45; }
.diagramm .fd-punkt.fd-gedaempft { opacity: .55; }
.diagramm .fd-spanne { stroke: var(--fin-saldo); stroke-width: 1.5; }
.diagramm .fd-punkt { fill: var(--fin-saldo); stroke: var(--bg-2); stroke-width: 1.5; }
.diagramm .fd-punkt.fd-hohl { fill: var(--bg-2); stroke: var(--fin-saldo); stroke-width: 1.5; }
.diagramm .fd-p-ein { fill: var(--fin-ein); } .diagramm .fd-p-aus { fill: var(--fin-aus); } .diagramm .fd-p-neutral { fill: var(--fin-neutral); }
.diagramm .fd-band { fill: var(--fin-band); }
.diagramm .fd-band-neutral { fill: rgba(106,106,119,.14); } .diagramm .fd-band-ein { fill: rgba(61,214,140,.14); }
.diagramm .fd-grenze { stroke: var(--fin-aus); stroke-width: 1.5; stroke-dasharray: 2 3; }
.diagramm .fd-grenztext, .diagramm .fd-zieltext, .diagramm .fd-zahltagtext, .diagramm .fd-beschriftung { font-size: 11px; font-family: var(--schrift); fill: var(--leise); }
.diagramm .fd-grenztext { fill: var(--fin-aus-text); }
.diagramm .fd-zahltag { stroke: var(--fin-ein); stroke-width: 2; }
.diagramm .fd-zahltagtext { fill: var(--fin-ein-text); font-size: 10px; }
.diagramm .fd-heute { stroke: var(--linie-stark); stroke-width: 1; stroke-dasharray: 2 2; }
.diagramm .fd-ereignis { font-size: 10px; }
.diagramm .fd-e-aus { fill: var(--fin-aus); } .diagramm .fd-e-ein { fill: var(--fin-ein); }
.diagramm .fd-klickbar { cursor: pointer; }
.diagramm .fd-tief { fill: none; stroke: var(--text); stroke-width: 1.5; }
.diagramm .fd-endwert { fill: var(--text); font-weight: 600; }
/* O-15: Halo hinter Beschriftungen – lesbar auf Linien und Bändern. */
.diagramm .fd-beschriftung, .diagramm .fd-zahltagtext { paint-order: stroke; stroke: var(--bg-2, var(--bg)); stroke-width: 3px; stroke-linejoin: round; }
.diagramm .fd-b-neutral { fill: var(--fin-neutral); } .diagramm .fd-b-ein { fill: var(--fin-ein-text); }
.diagramm .fd-markierung { fill: rgba(255,255,255,.035); }
.diagramm .fd-gewaehlt { fill: rgba(165,148,255,.08); }
.diagramm svg[tabindex]:focus-visible { outline: 2px solid var(--akzent-2); outline-offset: 2px; border-radius: var(--r-s); }
.fd-tipp { transform: none; display: block; white-space: normal; max-width: min(320px, 90%); }
.fd-tipp[hidden] { display: none; }
.fd-tz { display: flex; align-items: center; gap: 6px; }
.fd-tz i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: none; }
.fd-tz i.fd-l-ein { background: var(--fin-ein); } .fd-tz i.fd-l-aus { background: var(--fin-aus); } .fd-tz i.fd-l-saldo { background: var(--fin-saldo); }
.fd-tz i.fd-l-neutral { background: var(--fin-neutral); } .fd-tz i.fd-l-band { background: var(--fin-band); } .fd-tz i.fd-l-umriss { border: 1.5px solid var(--fin-aus); }
/* Privatsphäre „alles“: Zeichenflächen weichgezeichnet, Balkenlängen fest 50 % */
.fin-privat-alles .diagramm .plot, [data-fin-privat="alles"] .diagramm .plot { filter: blur(6px); }
.fin-privat-alles .fd-spur > i, [data-fin-privat="alles"] .fd-spur > i { width: 50% !important; }
/* G4 Balkenliste */
.fd-balkenliste { display: grid; gap: 0; }
.fd-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; min-height: 36px; padding: 4px 0;
  width: 100%; background: none; border: 0; border-radius: 0; color: inherit; text-align: left; font-size: .88rem; }
button.fd-zeile:hover { background: var(--hover); border-color: transparent; }
.fd-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-katpunkt { margin-right: 6px; }
.fd-wert { white-space: nowrap; }
.fd-spur { grid-column: 1 / -1; position: relative; display: block; height: 6px; background: var(--bg-3); border-radius: 3px; }
.fd-spur > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: rgba(165,148,255,.55); }
.fd-spur > i.fd-b-knapp { background: var(--warn); } .fd-spur > i.fd-b-ueber { background: var(--fin-aus); } .fd-spur > i.fd-weitere { background: var(--kat-weitere); }
.fd-m-ueblich, .fd-m-budget { position: absolute; top: -3px; width: 2px; height: 12px; margin-left: -1px; }
.fd-m-ueblich { background: rgba(236,236,242,.6); } .fd-m-budget { background: var(--warn); }
.fd-symbol { font-weight: 700; } .fd-symbol.fd-knapp { color: var(--fin-warn-text); } .fd-symbol.fd-ueber { color: var(--fin-aus-text); } .fd-symbol.fd-ok { color: var(--fin-ein-text); }
@media (min-width: 861px) { .fd-zeile { min-height: 36px; } }
@media (max-width: 860px) { .fd-zeile { min-height: 40px; } }
/* G5 Fortschritt */
.fd-schiene { position: relative; height: 8px; background: var(--bg-3); border-radius: 4px; margin: 6px 0 4px; }
.fd-schiene > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.fd-f-ok { background: var(--fin-saldo); } .fd-f-knapp { background: var(--warn); } .fd-f-ueber { background: var(--fin-aus); } .fd-f-ziel { background: var(--fin-ein); }
.fd-f-umriss { position: absolute; left: 0; top: -1px; bottom: -1px; border: 1.5px solid var(--leise); border-radius: 4px; background: var(--hover); }
.fd-f-voll { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--linie-stark); }
.fd-f-soll { position: absolute; top: 8px; margin-left: -5px; font-size: 10px; line-height: 1; color: var(--text); }
.fd-f-text { font-size: .85rem; margin-top: 8px; }
.fd-f-text .fd-prozent { white-space: nowrap; }                 /* „123,4 %“ bricht nie zwischen Zahl und % um */
/* G1-Variante Jahresvergleich: Vorjahr als Umriss in --fin-neutral; G3: Strecken unvollständiger Wochen gestrichelt und dünner. */
.diagramm .fd-u-vor { fill: var(--fin-neutral); fill-opacity: .12; stroke: var(--fin-neutral); stroke-width: 1.5; }
.legende i.fd-l-vorjahr, .fd-tz i.fd-l-vorjahr { background: rgba(106,106,119,.15); border: 1.5px solid var(--fin-neutral); }
.diagramm .fd-unvollstaendig { stroke-width: 1.5; opacity: .75; }
/* G6 Wochensäulen */
.fd-woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; height: 64px; }
.fd-wt { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: var(--t-xs); color: var(--blass); min-width: 0; }
.fd-wt-saeule { flex: 1; width: 100%; max-width: 22px; display: flex; align-items: flex-end; background: var(--bg-1); border-radius: 4px; overflow: hidden; }
.fd-wt-saeule > i { display: block; width: 100%; background: rgba(165,148,255,.55); border-radius: 4px 4px 0 0; }
.fd-draussen .fd-wt-saeule { opacity: .35; }   /* Teilwoche am Zahltag: Tage des vorigen Zyklus */
.fd-heute-zelle .fd-wt-saeule { box-shadow: 0 0 0 1.5px var(--akzent-2); } .fd-heute-zelle { color: var(--text); }
.fd-zukunft .fd-wt-saeule { opacity: .5; }   /* nur die Säule blasst ab – die Tagesnamen bleiben lesbar (AA) */
/* G7 Sparklinie */
.fd-spark { display: block; overflow: visible; }
.fd-spark-linie { fill: none; stroke: var(--leise); stroke-width: 1.5; stroke-linejoin: round; }
.fd-spark-null { stroke: var(--linie-stark); stroke-width: 1; }
.fd-spark-punkt { fill: var(--text); } .fd-spark-punkt.fd-hohl { fill: var(--bg-2); stroke: var(--text); stroke-width: 1.2; }
/* G8 Wasserfall */
.fd-wasserfall { display: grid; gap: 2px; font-size: .86rem; }
.fd-wf-zeile { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 28px; }
.fd-wf-zeile .fd-spur { grid-column: auto; height: 12px; background: transparent; }
.fd-wf-zeile .fd-spur > i { border-radius: 3px; }
.fd-wf-zu { background: var(--fin-ein) !important; } .fd-wf-ab { background: rgba(229,72,77,.7) !important; }
.fd-wf-erg { background: var(--fin-saldo) !important; } .fd-wf-minus { background: var(--fin-aus) !important; }
.fd-wf-null { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--linie-stark); }
.fd-wf-ergebnis { border-top: 1px solid var(--linie); padding-top: 4px; margin-top: 2px; }
@media (max-width: 560px) { .fd-wf-zeile { grid-template-columns: minmax(0, 1.4fr) minmax(0, .7fr) auto; gap: 6px; } }
/* G9 Kalender */
.fd-kalender { display: grid; gap: 4px; }
.fd-k-kopf, .fd-k-raster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fd-k-kopf span { font-size: var(--t-xs); color: var(--blass); text-align: center; }
.fd-k-tag { position: relative; min-height: 64px; padding: 4px 6px; border-radius: var(--r-s); background: var(--bg-2); border: 1px solid var(--linie); color: var(--text);
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font: inherit; font-size: var(--t-xs); text-align: left; min-width: 0; overflow: hidden; }
button.fd-k-tag { cursor: pointer; } button.fd-k-tag:hover { border-color: var(--linie-stark); }
.fd-heat-1 { background: var(--fin-heat-1); } .fd-heat-2 { background: var(--fin-heat-2); } .fd-heat-3 { background: var(--fin-heat-3); } .fd-heat-4 { background: var(--fin-heat-4); }
.fd-k-heute { border: 2px solid var(--akzent-2); }
.fd-k-zahltag { box-shadow: inset 0 3px 0 var(--fin-ein); }
.fd-k-nr { font-weight: 600; } .fd-k-frei { color: var(--fin-ein-text); }
.fd-k-betrag { font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.fd-k-chip { font-size: var(--t-xs); padding: 0 .4em; border-radius: var(--r-voll); background: var(--hover-stark); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) { .fd-k-tag { min-height: 44px; padding: 3px 4px; } .fd-k-betrag { font-size: var(--t-xs); } .fd-k-chip { display: none; } }
/* G10 Lückenbalken */
.fd-luecke { display: flex; gap: 2px; height: 28px; border-radius: var(--r-s); overflow: hidden; }
.fd-lk-seg { display: block; background: var(--fin-ein); } .fd-lk-weitere { opacity: .55; }
.fd-lk-offen { display: block; border: 1.5px dashed var(--leise); border-radius: 0 var(--r-s) var(--r-s) 0; }
.fd-lk-legende { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .82rem; color: var(--leise); }
.fd-lk-ueberschuss { color: var(--fin-ein-text); }
/* G12 Bedarf/Wunsch */
.fd-bw { display: grid; gap: 10px; }
.fd-bw-zeile { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 4px 10px; align-items: center; font-size: .85rem; }
.fd-bw-balken { position: relative; display: flex; height: 28px; border-radius: var(--r-s); overflow: hidden; background: var(--bg-3); }
.fd-bw-balken > i { display: block; }
.fd-bw-bedarf { background: var(--kat-1); } .fd-bw-wunsch { background: var(--kat-2); } .fd-bw-saldo { background: var(--fin-ein); } .fd-bw-ueber { background: var(--fin-aus); }
.fd-bw-ziel { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.35); }
.fd-bw-text { grid-column: 2; font-size: var(--t-xs); }
/* Ring */
.fd-ring { display: block; transform: rotate(0deg); }
.fd-ring-grund { fill: none; stroke: var(--bg-3); }
.fd-ring-seg { fill: none; stroke-linecap: butt; }
.fd-ring-seg.fd-s-ein { stroke: var(--fin-ein); fill: none; } .fd-ring-seg.fd-s-aus { stroke: var(--fin-aus); fill: none; }
.fd-ring-seg.fd-s-saldo { stroke: var(--fin-saldo); } .fd-ring-seg.fd-s-neutral { stroke: var(--fin-neutral); }
.fd-ring-text { font-size: 11px; font-weight: 600; fill: var(--text); font-family: var(--schrift); }
/* ---------- Ansicht-Bausteine (diagramm-finanzen.js: ring, donut, zeitleiste, stapelbalken, rechenweg, kennzahl;
   finanzen/ansicht.js: karte, aufklapper, hinweis). Regeln: docs/finanzen-ansicht.md. Farben nur über Tokens, Maße per CSSOM-Variablen. */
/* Kategorien: eine Klasse setzt --kat, Formen lesen nur --kat (Ring-Segment, Balken, Legendenfarbe). */
.fd-kat-1 { --kat: var(--kat-1); } .fd-kat-2 { --kat: var(--kat-2); } .fd-kat-3 { --kat: var(--kat-3); } .fd-kat-4 { --kat: var(--kat-4); }
.fd-kat-5 { --kat: var(--kat-5); } .fd-kat-6 { --kat: var(--kat-6); } .fd-kat-7 { --kat: var(--kat-7); } .fd-kat-8 { --kat: var(--kat-8); }
.fd-kat-9 { --kat: var(--kat-9); } .fd-kat-10 { --kat: var(--kat-10); } .fd-kat-weitere { --kat: var(--kat-weitere); }
/* Ton: grün = gut, gelb/orange = knapp, rot = über/Minus, Akzent = neutral (Zustand nie nur über Farbe – Symbol/Text dazu). */
.fd-ton-gut { --ton: var(--fin-ein); --ton-text: var(--fin-ein-text); } .fd-ton-knapp { --ton: var(--warn); --ton-text: var(--fin-warn-text); }
.fd-ton-schlecht { --ton: var(--fin-aus); --ton-text: var(--fin-aus-text); } .fd-ton-neutral { --ton: var(--fin-saldo); --ton-text: var(--text); }
/* Ring (Fortschritt) */
.fd-rg { position: relative; width: var(--rg, 120px); height: var(--rg, 120px); flex: none; }
.fd-rg-svg { display: block; width: 100%; height: 100%; }
.fd-rg-grund { fill: none; stroke: var(--bg-3); }
.fd-rg-grund.fd-rg-leer { stroke: var(--fin-neutral); stroke-opacity: .55; }
.fd-rg-bogen { fill: none; stroke: var(--ton); stroke-linecap: round; }
.fd-rg-ueber { fill: none; stroke: var(--fehl-text); stroke-linecap: round; stroke-opacity: .9; }
.fd-rg-mitte { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-align: center; padding: 0 11%; }
.fd-rg-wert { font-size: max(var(--t-m), calc(var(--rg, 120px) * .19)); font-weight: 650; line-height: 1.05; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fd-rg-wert .geld.minus, .fd-rg-wert .geld.plus { color: inherit; }
.fd-rg-unter { font-size: max(var(--t-xs), calc(var(--rg, 120px) * .095)); color: var(--leise); line-height: 1.2; }
.fd-rg-unter .fd-symbol { margin-right: 3px; }
/* Donut */
.fd-dn { position: relative; container-type: inline-size; }
.fd-dn-raster { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--a-4) var(--a-6); }
.fd-dn-buehne { position: relative; width: var(--dn, 168px); height: var(--dn, 168px); justify-self: center; }
.fd-dn-buehne svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fd-dn-grund { fill: none; stroke: var(--bg-3); }
.fd-dn-seg { fill: none; stroke: var(--kat); transition: opacity var(--dauer-1); }
.fd-dn-hervor .fd-dn-seg:not(.fd-an) { opacity: .3; }
.fd-dn-hervor .fd-dn-eintrag:not(.fd-an) { opacity: .55; }
.fd-dn-mitte { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; padding: 0 22%; }
.fd-dn-mitte b { font-size: max(var(--t-l), calc(var(--dn, 168px) * .13)); font-weight: 650; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fd-dn-mitte > span { font-size: var(--t-xs); color: var(--leise); }
.fd-dn-legende { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; min-width: 0; }
.fd-dn-eintrag { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 3.6em; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 6px;
  background: none; border: 0; border-radius: var(--r-s); color: var(--text); font: inherit; font-size: var(--t-s); text-align: left; cursor: default; transition: opacity var(--dauer-1); }
.fd-dn-eintrag.fd-klickbar { cursor: pointer; }
.fd-dn-eintrag:hover, .fd-dn-eintrag.fd-an { background: var(--hover); }
.fd-dn-eintrag:focus-visible { outline: 2px solid var(--akzent-2); outline-offset: 1px; }
.fd-dn-farbe, .fd-sb-farbe { width: 10px; height: 10px; border-radius: 3px; background: var(--kat); flex: none; }
.fd-dn-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-dn-anteil { color: var(--leise); text-align: right; font-variant-numeric: tabular-nums; font-size: var(--t-xs); }
.fd-dn-leer .fd-dn-legende { color: var(--leise); }
@container (max-width: 440px) { .fd-dn-raster { grid-template-columns: minmax(0, 1fr); } .fd-dn-legende { width: 100%; } }
/* Stapelbalken (100 %) */
.fd-sb { position: relative; display: grid; gap: var(--a-2); }
.fd-sb-balken { position: relative; display: flex; gap: 2px; height: 18px; border-radius: 6px; background: var(--bg-3); }
.fd-sb-seg { display: block; height: 100%; background: var(--kat); min-width: 2px; }
.fd-sb-seg:first-child { border-radius: 6px 0 0 6px; } .fd-sb-seg:last-of-type { border-radius: 0 6px 6px 0; } .fd-sb-seg:only-of-type { border-radius: 6px; }
.fd-sb-frei { display: block; flex: 1; height: 100%; border: 1.5px dashed var(--linie-stark); border-radius: 0 6px 6px 0; }
.fd-sb-fix { --kat: var(--kat-1); } .fd-sb-variabel { --kat: var(--kat-2); } .fd-sb-tilgung { --kat: var(--kat-6); } .fd-sb-sparen { --kat: var(--kat-4); }
.fd-sb-rest { --kat: var(--kat-3); } .fd-sb-minus { --kat: var(--fin-aus); } .fd-sb-neutral { --kat: var(--fin-neutral); }
.fd-sb-grenze { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 1px; }
.fd-sb-legende { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--t-s); }
.fd-sb-legende li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fd-sb-anteil { color: var(--leise); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.fd-sb-legende .fd-sb-ueber { color: var(--fin-aus-text); }
/* Rechenweg („So rechnen wir“): Name | Balken | Betrag in einer Ansicht – keine zweite Tabelle. */
.fd-rw { display: grid; gap: 0; container-type: inline-size; font-size: var(--t-s); }
.fd-rw-zeile { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(64px, 1fr) minmax(5.5em, auto); grid-template-areas: "name balken wert"; align-items: center; gap: 4px 12px; min-height: 34px; padding: 3px 0; }
.fd-rw-name { grid-area: name; min-width: 0; overflow-wrap: anywhere; }
.fd-rw-link { margin-left: 8px; font-size: var(--t-xs); white-space: nowrap; }
button.link.fd-rw-link { padding: 0; min-height: 0; vertical-align: baseline; }
.fd-rw-balken { grid-area: balken; position: relative; height: 14px; }
.fd-rw-balken > i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.fd-rw-null { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--linie-stark); }
.fd-rw-plus .fd-rw-balken > i { background: var(--fin-ein); }
.fd-rw-minus .fd-rw-balken > i { background: var(--fin-aus); opacity: .78; }
.fd-rw-ergebnis .fd-rw-balken > i { background: var(--fin-saldo); }
.fd-rw-ergebnis.fd-rw-negativ .fd-rw-balken > i { background: var(--fin-aus); opacity: 1; }
.fd-rw-wert { grid-area: wert; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fd-rw-ergebnis { border-top: 1px solid var(--linie-stark); margin-top: 4px; padding-top: 7px; font-weight: 650; }
.fd-rw-ergebnis .fd-rw-wert .geld { color: var(--text); }
.fd-rw-ergebnis.fd-rw-negativ .fd-rw-wert .geld { color: var(--fin-aus-text); }
@container (max-width: 420px) {
  .fd-rw-zeile { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name wert" "balken balken"; gap: 2px 10px; padding: 5px 0; }
  .fd-rw-balken { height: 10px; }
}
.fin-privat-alles .fd-rw-balken > i, [data-fin-privat="alles"] .fd-rw-balken > i,
.fin-privat-alles .fd-sb-balken, [data-fin-privat="alles"] .fd-sb-balken,
.fin-privat-alles .fd-dn-plot, [data-fin-privat="alles"] .fd-dn-plot { filter: blur(5px); }
/* Zeitleiste (Zahltag bis Zahltag) – breit: Bahn mit Chips über (Eingänge) und unter (Abbuchungen) der Achse; schmal: Liste. */
.fd-zl { container-type: inline-size; position: relative; }
.fd-zl-bahn { position: relative; height: var(--zl-h, 160px); margin: 0 4px; }
.fd-zl-achse, .fd-zl-vergangen { position: absolute; left: 0; top: var(--zl-achse); height: 4px; margin-top: -2px; border-radius: 2px; }
.fd-zl-achse { right: 0; background: var(--bg-3); }
.fd-zl-vergangen { background: var(--akzent-mitte); opacity: .75; }
.fd-zl-heute, .fd-zl-marke { position: absolute; top: 0; bottom: 16px; width: 0; border-left: 2px solid var(--akzent-2); }
.fd-zl-marke { border-left: 1.5px dashed var(--fin-ein); top: 16px; }
.fd-zl-punkt { position: absolute; top: var(--zl-achse); width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid var(--bg-2); background: var(--ton); }
.fd-zl-punkt.fd-zl-erledigt { background: var(--bg-2); border-color: var(--ton); }
.fd-zl-chip { position: absolute; top: var(--zl-y); height: 36px; max-width: 9em; display: flex; flex-direction: column; justify-content: center; padding: 2px 8px;
  transform: translateX(-50%); border-radius: var(--r-s); background: var(--bg-3); border: 1px solid var(--linie-stark); border-left: 3px solid var(--ton);
  color: var(--text); font: inherit; font-size: var(--t-xs); line-height: 1.25; text-align: left; cursor: default; }
.fd-zl-chip.fd-zl-a-links { transform: translateX(-10px); } .fd-zl-chip.fd-zl-a-rechts { transform: translateX(calc(-100% + 10px)); }
.fd-zl-chip:hover, .fd-zl-chip:focus-visible { border-color: var(--ton); z-index: 2; }
.fd-zl-chip:focus-visible { outline: 2px solid var(--akzent-2); outline-offset: 1px; }
.fd-zl-chip b { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fd-zl-chip > span { color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Lange Namen schneiden rechts ab statt links (Spaltenflex richtet sonst mittig/links aus). */
.fd-zl-chip > span, .fd-zl-chip > b { align-self: stretch; }
.fd-zl-chip.fd-zl-erledigt { opacity: .62; }
.fd-zl-stiel { position: absolute; width: 0; border-left: 1px solid var(--linie-stark); top: var(--zl-sy); height: var(--zl-sh); }
.fd-zl-datum, .fd-zl-marke-text { position: absolute; font-size: var(--t-xs); white-space: nowrap; line-height: 16px; transform: translateX(-50%); }
.fd-zl-datum { bottom: 0; color: var(--blass); }
.fd-zl-marke-text { top: 0; color: var(--fin-ein-text); }
.fd-zl-a-links.fd-zl-datum, .fd-zl-a-links.fd-zl-marke-text { transform: none; } .fd-zl-a-rechts.fd-zl-datum, .fd-zl-a-rechts.fd-zl-marke-text { transform: translateX(-100%); }
.fd-zl-datum.fd-zl-heute-text { color: var(--akzent-2); font-weight: 600; }
.fd-zl-ein { --ton: var(--fin-ein); } .fd-zl-aus { --ton: var(--fin-aus); } .fd-zl-vertrag { --ton: var(--kat-6); } .fd-zl-warn { --ton: var(--warn); }
.fd-zl-liste { display: none; list-style: none; margin: 0; padding: 0; }
.fd-zl-li { position: relative; display: grid; grid-template-columns: 6.2em 12px minmax(0, 1fr) auto; align-items: start; gap: 2px 8px; padding: 6px 0; font-size: var(--t-s); }
.fd-zl-li::before { content: ""; position: absolute; left: calc(6.2em + 13px); top: 0; bottom: 0; border-left: 2px solid var(--bg-3); }
.fd-zl-li:first-child::before { top: 14px; } .fd-zl-li:last-child::before { bottom: calc(100% - 14px); }
.fd-zl-li-datum { color: var(--leise); font-size: var(--t-xs); line-height: 1.6; white-space: nowrap; }
.fd-zl-li-punkt { position: relative; z-index: 1; width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--bg-2); background: var(--ton); }
.fd-zl-li.fd-zl-erledigt { opacity: .62; }
.fd-zl-li.fd-zl-erledigt .fd-zl-li-punkt { background: var(--bg-2); border-color: var(--ton); }
.fd-zl-li-text { min-width: 0; }
.fd-zl-li-text small { display: block; color: var(--leise); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-zl-li-betrag { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fd-zl-li-heute { --ton: var(--akzent-2); color: var(--akzent-2); font-weight: 600; }
.fd-zl-li-marke { --ton: var(--fin-ein); color: var(--fin-ein-text); }
.fd-zl-li-heute .fd-zl-li-punkt, .fd-zl-li-marke .fd-zl-li-punkt { height: 4px; margin-top: 7px; border: 0; border-radius: 2px; }
.fd-zl-leer { color: var(--leise); font-size: var(--t-s); margin: 0; }
@container (max-width: 520px) { .fd-zl-bahn { display: none; } .fd-zl-liste { display: block; } }
/* Kennzahl (Cockpit-Kachel) */
.fd-kz { position: relative; display: flex; align-items: center; gap: var(--a-4); min-width: 0; padding: var(--a-4) var(--a-4) var(--a-4) calc(var(--a-4) + 2px);
  border-radius: var(--r-m); background: var(--glas-innen); border: 1px solid var(--linie); color: var(--text); text-decoration: none; }
.fd-kz::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ton); }
a.fd-kz:hover { border-color: var(--linie-stark); background: var(--hover); color: var(--text); }
.fd-kz-text { min-width: 0; flex: 1; display: grid; gap: 2px; }
.fd-kz-kopf { display: flex; align-items: center; gap: 6px; font-size: var(--t-s); color: var(--leise); }
.fd-kz-wert { font-size: var(--t-2xl); font-weight: 650; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fd-kz-unter { font-size: var(--t-s); color: var(--text-2); }
.fd-kz-trend { font-size: var(--t-xs); color: var(--leise); }
.fd-kz-trend.fd-ton-gut, .fd-kz-trend.fd-ton-knapp, .fd-kz-trend.fd-ton-schlecht { color: var(--ton-text); }
.fd-kz-grafik { flex: none; }
/* Layout-Bausteine (finanzen/ansicht.js) */
.fa-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--a-4); align-items: stretch; }
.fa-raster > .tafel { margin: 0; }
.fa-karte { display: flex; flex-direction: column; gap: var(--a-3); }
.fa-kopf h2 { margin: 0; font-size: 1.05rem; }
.fa-unter { margin: 2px 0 0; color: var(--leise); font-size: var(--t-s); }
.fa-inhalt { display: grid; gap: var(--a-3); min-width: 0; flex: 1; align-content: start; }
.fa-mehr { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; font-size: var(--t-s); color: var(--akzent); text-decoration: none; }
.fa-mehr:hover { text-decoration: underline; }
.fa-satz { margin: 0; font-size: var(--t-m); color: var(--text-2); }
.fa-auf { border-top: 1px solid var(--linie); }
.fa-auf > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; color: var(--text-2); font-size: var(--t-s); }
.fa-auf > summary::-webkit-details-marker { display: none; }
.fa-auf > summary::after { content: "▾"; color: var(--leise); transition: transform var(--dauer-1); }
.fa-auf[open] > summary::after { transform: rotate(180deg); }
.fa-auf > summary:focus-visible { outline: 2px solid var(--akzent-2); outline-offset: 2px; border-radius: var(--r-s); }
.fa-auf-inhalt { display: grid; gap: var(--a-3); padding: 4px 0 var(--a-3); }
.fa-hinweis { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px; border-radius: var(--r-m); font-size: var(--t-s);
  background: color-mix(in srgb, var(--ton) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ton) 38%, transparent); }
.fa-hinweis-symbol { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; flex: none; font-size: var(--t-xs); font-weight: 700; background: var(--ton); color: var(--bg); }
.fa-hinweis-text { flex: 1 1 14em; min-width: 0; }
.fa-hinweis-aktion { font-size: var(--t-s); white-space: nowrap; }
.fa-ton-info { --ton: var(--info); }
@media (prefers-reduced-motion: reduce) { .fd-dn-seg, .fd-dn-eintrag, .fa-auf > summary::after { transition: none; } }
.dash-stand { font-size: .85rem; display: inline-block; min-width: 6.5em; }   /* Platz für „Stand 10:42“ – kein Umbruch-Sprung */
.sk-text::after { inset: .3em 0; }

/* ======================================================================= Finanz-Oberfläche (finanzen/*.js, 11 §3–§15)
   Abgegrenzter Abschnitt: nur Klassen mit Präfix fin- (plus Zustände an body). Keine bestehenden Regeln überschrieben. */
.fin-huelle { min-width: 0; }
.fin-huelle [hidden], dialog.fin-blatt [hidden] { display: none !important; }
.fin-kopf { align-items: flex-start; margin-bottom: 14px; }
.fin-kopf-text { min-width: 0; flex: 1 1 26em; }
.fin-kopf-text h1 { margin-bottom: .3em; }
.fin-kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .84rem; color: var(--leise); min-height: 1.6em; margin: 0; }
.fin-kopfzeile > .sk-text { display: block; }
/* Unter 1180 px bricht die Zeitbezugzeile (Zyklus · Bank · Klären) meist in zwei Zeilen um: Platz dafür von Anfang an
   reservieren, sonst rutscht die Seite nach /meta um eine Zeile nach unten (CLS). */
@media (max-width: 1179px) { .fin-kopfzeile { min-height: 45px; align-content: flex-start; } }
.fin-kopfzeile a { color: inherit; }
.fin-kopfzeile a:hover { color: var(--text); }
.fin-trenner { color: var(--blass); }
.fin-kopf-knoepfe { display: flex; align-items: center; gap: 8px; flex: none; }
.fin-kopf-knoepfe .ik, .fin-privatknopf .ik { width: 16px; height: 16px; }
.fin-menue { min-width: 250px; }
.fin-menue .ik { width: 16px; height: 16px; }
.fin-zeitbezug { display: inline-flex; align-items: center; gap: 5px; color: var(--blass); font-size: var(--t-xs); font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.fin-zeitbezug .ik { width: 13px; height: 13px; }
.fin-zeitbezug.warn, .fin-warn-text { color: var(--fin-warn-text); }
.fin-aus-text { color: var(--fin-aus-text); }
.fin-ein-text { color: var(--fin-ein-text); }
.fin-kopfzeile .fin-zeitbezug { font-size: .84rem; color: var(--leise); }
.fin-band { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--warn-rand); background: var(--warn-flaeche); border-radius: var(--r-m); padding: 8px 12px; margin-bottom: 12px; font-size: .9rem; }
.fin-band[hidden] { display: none; }
.fin-reiter { margin-bottom: var(--a-4); }
.fin-reiter a { display: inline-flex; align-items: center; gap: 6px; }
.fin-reiter a:hover { color: var(--text); }
.fin-reiter .ik { width: 17px; height: 17px; }
.fin-reiter a[data-teil="einstellungen"] { margin-left: auto; }
.fin-reiter .zaehler, .fin-leiste .zaehler { font-size: var(--t-xs); line-height: 1.5; background: var(--fehl-flaeche-stark); color: var(--fehl-text); padding: 0 .45em; border-radius: var(--r-voll); font-variant-numeric: tabular-nums; }
.fin-reiter .zaehler:empty, .fin-leiste .zaehler:empty { display: none; }
.fin-seite { min-width: 0; }
.fin-nur-lesen .fin-schreibt:disabled { cursor: not-allowed; }
.fin-zustandskarte { max-width: 640px; }

/* ---------- Karten, Zeitbezug, Leer, Fehler ---------- */
.fin-karte { display: flex; flex-direction: column; margin-bottom: 0; }
.fin-feste-hoehe { min-height: var(--fin-h, auto); }
@media (min-width: 861px) and (max-width: 1179px) { .fin-feste-hoehe { min-height: var(--fin-h-t, var(--fin-h, auto)); } }
.fin-karte-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 1.6em; }
.fin-karte-titel { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.fin-karte-titel h2 { margin: 0; font-size: 1.05rem; }
.fin-karte-aktionen { display: flex; align-items: center; gap: 6px; flex: none; }
.fin-karte-aktionen:empty { display: none; }
.fin-inhalt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fin-inhalt > .ladefehler-karte { flex: 1; margin: 0; }
.fin-leer { display: grid; justify-items: start; gap: 8px; padding: 6px 0; color: var(--leise); }
.fin-leer p { margin: 0; }
.fin-satz { margin: 6px 0; font-size: .9rem; color: var(--leise); }
.fin-satz .geld { color: var(--text); }
.fin-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--linie); font-size: .84rem; color: var(--leise); }
.fin-fuss b .geld, .fin-fuss .geld { color: var(--text); }
.fin-hervor { animation: fin-hervor 1s ease-out; }
@keyframes fin-hervor { from { box-shadow: 0 0 0 2px var(--akzent); } to { box-shadow: 0 0 0 2px transparent; } }
.fin-drill { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: inherit; border-radius: var(--r-s); cursor: pointer; }
.fin-drill:hover { color: var(--text); }
.fin-drill:hover .geld { text-decoration: underline dotted; text-underline-offset: 3px; }
.fin-maske { letter-spacing: .02em; }

/* ---------- Übersicht: Raster (gleich für Skelett und Inhalt; keine order-Regeln) ---------- */
.fin-uebersicht { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.fin-uebersicht > * { grid-column: 1 / -1; margin: 0; min-width: 0; }
@media (min-width: 861px) { .fin-uebersicht > :nth-child(5), .fin-uebersicht > :nth-child(6) { grid-column: span 3; } }
@media (min-width: 1180px) { .fin-uebersicht > :nth-child(1) { grid-column: span 4; } .fin-uebersicht > :nth-child(2) { grid-column: span 2; } }

/* Ü1 Lage */
.fin-lage .fin-inhalt { gap: 2px; }
.fin-hero { display: inline-flex; align-self: flex-start; background: none; border: 0; padding: 0; margin: 2px 0 6px; color: var(--text); border-radius: var(--r-m);
  font-size: 2.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.fin-hero:hover { color: var(--text); border: 0; }
.fin-hero .geld { font-variant-numeric: proportional-nums; }
.fin-hero.fehlbetrag .geld { color: var(--fin-aus-text); }
.fin-hero-sk { min-height: 3.2rem; display: flex; align-items: center; }
.fin-lage-oben { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.fin-lage-links { min-width: 0; flex: 1; display: flex; flex-direction: column; }
/* O-10: Inhalt oben bündeln (kein Verteilen auf die Rasterhöhe); die Lage-Karte streckt sich nicht auf die Nachbarkarte. */
@media (min-width: 1180px) { .fin-lage .fin-inhalt { justify-content: flex-start; gap: 10px; } .fin-lage .fin-hl { margin-top: 0; } }
/* Lage und Kompass strecken sich nie auf die Nachbarkarte – auch nicht im Skelett, sonst sprängen sie beim Freigeben der Endhöhe. */
.fin-uebersicht > .fin-lage, .fin-uebersicht > .fin-kompass-karte, .fin-uebersicht > .fin-lage-sk, .fin-uebersicht > .fin-kompass-sk { align-self: start; }
.fin-ue2-werte { display: grid; gap: 4px; margin: 0; }
.fin-ue2-paar { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 10px; align-items: baseline; }
.fin-ue2-paar dt { color: var(--leise); }
.fin-ue2-paar dd { margin: 0; color: var(--text); }
.fin-spanne { display: block; font-size: var(--t-xs); }
/* FIN-14: die Ausgaben je Tag der Budgetwoche stehen auf allen Breiten (rechts neben der Wochenzahl, am Handy darunter). */
.fin-lage-woche { display: block; flex: 0 1 260px; min-width: 200px; padding: 8px 10px 6px; border-radius: var(--r-m); background: var(--bg-1); border: 1px solid var(--linie); color: var(--leise); }
.fin-lage-woche:hover { border-color: var(--linie-stark); color: var(--leise); }
.fin-lage-woche-titel { display: block; font-size: var(--t-xs); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-lage-woche-titel .geld { color: var(--leise); }
.fin-lage-woche .fd-woche { height: 56px; }
.fin-lage-woche-sk { display: grid; gap: 8px; }
.fin-woche-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 2px 0 0; min-height: 1.4em; font-size: .92rem; color: var(--leise); }
.fin-woche-label { color: var(--text); font-weight: 600; }
.fin-woche-spanne { font-size: .82rem; font-variant-numeric: tabular-nums; }
.fin-woche-fortschritt .fd-f-text { line-height: 1.45; }
.fin-gleichung.fin-woche-gleichung { margin-bottom: 2px; min-height: 0; }
/* Kommende Wochen bis zum Zahltag: eine Zeile, die bei vielen Wochen in sich scrollt (die Seite nie). */
.fin-wv { display: grid; gap: 6px; margin: 0 0 12px; color: var(--leise); border-radius: var(--r-m); min-width: 0; }
.fin-wv:hover { color: var(--leise); }
.fin-wv:hover .fin-wv-titel { color: var(--text); }
.fin-wv-titel { font-size: .8rem; }
.fin-wv-liste { list-style: none; margin: 0; padding: 0 0 2px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(148px, 1fr); gap: 6px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; }
.fin-wv-woche { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; padding: 7px 10px; border-radius: var(--r-s);
  background: var(--bg-1); border: 1px solid var(--linie); font-size: .84rem; scroll-snap-align: start; }
.fin-wv-zeit { color: var(--leise); font-size: var(--t-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-variant-numeric: tabular-nums; }
.fin-wv-woche .geld { color: var(--text); font-weight: 600; white-space: nowrap; }
.fin-wv-ende { margin: 0; padding: 7px 0; font-size: .84rem; }
.fin-wv-sk { display: grid; gap: 6px; }
.fin-weg-zeile { margin: -6px 0 2px; font-size: .84rem; color: var(--leise); line-height: 1.45; }
.fin-weg-zeile .geld, .fin-weg-zeile b { color: var(--text); }
/* Im Fehlbetrag folgt die Zeile direkt auf den Kopf der Karte (ohne Wochen-Fortschritt) – dann mit Abstand. */
.fin-lage-oben + .fin-weg-zeile { margin-top: 10px; }
.fin-rw-woche { display: grid; gap: 6px; }
.fin-rw-titel { margin: 6px 0 0; font-size: .9rem; font-weight: 600; color: var(--text); }
.fin-hl-titelknopf { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; border-radius: 4px; display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-hl-titelknopf:hover { color: var(--text); text-decoration: underline dotted; text-underline-offset: 3px; }
.fin-hl-plus { display: none; }
.fin-gleichung { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; margin: 0 0 12px; font-size: .95rem; color: var(--leise); background: none; border: 0; padding: 0; text-align: left; border-radius: var(--r-s); }
.fin-gleichung .geld { color: var(--text); font-weight: 500; }
.fin-gleichung b .geld { font-weight: 700; }
.fin-gl-op { color: var(--blass); }
.fin-gleichung.fin-drill:hover { color: var(--leise); }
.fin-pace { margin: 0 0 12px; }
.fin-pace-sk { display: grid; gap: 6px; margin: 4px 0 12px; }
.fin-pace .fd-f-text { font-size: .86rem; color: var(--leise); }
.fin-pace .fd-f-text .geld { color: var(--text); }
.fin-pace-leer { display: grid; gap: 6px; }
.fin-pace-schiene-leer { height: 8px; border: 1.5px dashed var(--linie-stark); border-radius: 4px; }
.fin-kurzwerte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.fin-kurzwert { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: .55em .8em; background: var(--bg-1); border: 1px solid var(--linie);
  border-radius: var(--r-m); color: var(--leise); font-size: .86rem; text-align: left; line-height: 1.35; min-height: 44px; }
.fin-kurzwert:hover { border-color: var(--linie-stark); color: var(--leise); }
.fin-kurzwert .geld { color: var(--text); }
.fin-pfeil { color: var(--blass); flex: none; }
.fin-mehr { margin: 2px 0 8px; }
.fin-mehr > summary { cursor: pointer; color: var(--akzent); font-size: .88rem; list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.fin-mehr > summary::-webkit-details-marker { display: none; }
.fin-mehr > summary::after { content: "▾"; font-size: .8em; transition: transform .15s; }
.fin-mehr[open] > summary::after { transform: rotate(180deg); }
.fin-mehr-inhalt { display: grid; gap: 12px; padding: 10px 0 4px; }
.fin-rechenweg { display: grid; border-top: 1px solid var(--linie); }
.fin-rw-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto 9em; align-items: center; gap: 4px 12px; padding: 7px 0; border-bottom: 1px solid var(--linie); font-size: .88rem; }
.fin-rw-text { color: var(--leise); min-width: 0; }
.fin-rw-text .geld, .fin-rw-text .fin-name { color: var(--text); }
.fin-rw-betrag { text-align: right; }
.fin-rw-aktion { display: flex; gap: 10px; justify-content: flex-end; }
.fin-rw-summe { border-bottom: 0; }
.fin-rw-summe .fin-rw-text { color: var(--text); }
.fin-rw-fuss { font-size: .8rem; margin: 0; }
.fin-lage-platz { flex: 1; min-height: 40px; }
.fin-fehlbetrag { display: grid; gap: 4px; margin-bottom: 10px; }
.fin-ziel-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: var(--r-m); background: var(--bg-1); border: 1px solid var(--linie); }
.fin-ziel { margin: 0; font-size: .9rem; color: var(--leise); }
.fin-ziel .geld, .fin-ziel b { color: var(--text); }

/* Hinweisleiste: feste Höhe 44 px, Teil der Lage-Karte */
.fin-hl { margin-top: auto; }
.fin-hinweisleiste { display: flex; align-items: center; gap: 10px; height: 44px; margin: 6px -18px -16px; padding: 0 18px; border-top: 1px solid var(--linie);
  background: var(--hover); border-radius: 0 0 var(--r-m) var(--r-m); min-width: 0; }
.fin-hl:has(.fin-hl-liste:not([hidden])) .fin-hinweisleiste { border-radius: 0; }
.fin-hl-ruhig { color: var(--leise); font-size: .88rem; }
.fin-hl-eintrag { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; font-size: .88rem; }
.fin-hl-eintrag.kurz .fin-hl-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-hl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fin-hl-text small { font-size: .8rem; }
.fin-hl-titel { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fin-hl-eintrag.kurz .fin-hl-titel { white-space: nowrap; }
.fin-hl-sym { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: var(--t-xs); font-weight: 700; background: var(--bg-3); color: var(--leise); }
.fin-hl-sym.fehl { background: var(--fehl-flaeche-stark); color: var(--fin-aus-text); }
.fin-hl-sym.warn { background: var(--warn-flaeche-stark); color: var(--fin-warn-text); }
.fin-hl-sym.gut { background: var(--gut-flaeche); color: var(--fin-ein-text); }
.fin-hl-aktionen { display: flex; gap: 6px; flex: none; }
.fin-hl-aktionen .knopf, .fin-hl-aktionen button { padding: .25em .7em; font-size: .82rem; border-radius: var(--r-s); }
.fin-hl-weitere { flex: none; white-space: nowrap; }
.fin-hl-liste { display: grid; margin: 16px -18px -16px; border-top: 1px solid var(--linie); }
.fin-hl-liste .fin-hl-eintrag { min-height: 44px; padding: 8px 18px; border-bottom: 1px solid var(--linie); align-items: flex-start; }
.fin-hl-liste .fin-hl-eintrag:last-child { border-bottom: 0; }
.fin-hl-liste .fin-hl-sym { margin-top: 1px; }
.fin-hl-weg { width: 28px; height: 28px; flex: none; }
.fin-hl-weg .ik { width: 14px; height: 14px; }
.fin-hl:has(.fin-hl-liste:not([hidden])) .fin-hl-liste { margin-top: 0; }
.fin-hl:has(.fin-hl-liste:not([hidden])) .fin-hinweisleiste { margin-bottom: 0; }

/* Zeilen (Termine, Drill, Buchungen kompakt) */
.fin-zeilen { display: grid; }
.fin-zeile { display: grid; grid-template-columns: 5.6em minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px; margin: 0 -6px;
  width: calc(100% + 12px); background: none; border: 0; border-bottom: 1px solid var(--linie); border-radius: 0; color: inherit; text-align: left; font-size: .88rem; }
button.fin-zeile:hover { background: var(--hover); border-color: var(--linie); }
.fin-zeile:last-child { border-bottom: 0; }
.fin-z-datum { display: flex; flex-direction: column; line-height: 1.25; color: var(--leise); font-variant-numeric: tabular-nums; font-size: .82rem; }
.fin-z-datum small { font-size: var(--t-xs); color: var(--blass); }
.fin-z-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fin-z-name .farbpunkt, .fin-punkt { flex: none; margin: 0; }
.fin-punkt:not([style]) { background: var(--kat-weitere); }
/* Händler-Logos (finanzen/geld.js logoEl): Kreis fester Größe – die Initiale steht sofort, das Bild blendet nach dem Laden darüber (kein
   Layoutsprung). Weißer Grund unter dem Bild, damit dunkle Symbole im dunklen Thema lesbar bleiben; dezenter Rand über allem. */
.fin-logo { --fin-logo-farbe: var(--kat-weitere); position: relative; display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px;
  border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--fin-logo-farbe) var(--logo-grund-anteil), var(--bg-2)); color: color-mix(in srgb, var(--fin-logo-farbe) var(--logo-text-anteil), var(--logo-text-basis));
  font-size: .82rem; font-weight: 600; line-height: 1; letter-spacing: 0; user-select: none; vertical-align: middle; }
.fin-logo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--logo-rand); pointer-events: none; }
.fin-logo-klein { width: 28px; height: 28px; font-size: var(--t-xs); }
.fin-logo-gross { width: 44px; height: 44px; font-size: 1.1rem; }
.fin-logo-ini { position: relative; }
.fin-logo-bild { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .18s ease; }
.fin-logo-da .fin-logo-bild { opacity: 1; }
[data-fin-privat="alles"] .fin-logo { background: var(--bg-3); }
@media (prefers-reduced-motion: reduce) { .fin-logo-bild { transition: none; } }
.fin-hebel-kopf { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fin-z-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.fin-z-text > .fin-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-z-text small { font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-z-name .marke-klein { flex: none; font-size: var(--t-xs); }
.fin-z-betrag { text-align: right; font-variant-numeric: tabular-nums; }
.fin-marke { flex: none; color: var(--blass); font-size: .85rem; }

/* Ü2 Bis zum Zahltag */
.fin-zahltag .fin-inhalt { gap: 6px; }
.fin-ue2-saetze { display: grid; gap: 2px; margin: 8px 0 6px; font-size: .84rem; color: var(--leise); }
.fin-ue2-saetze p { margin: 0; }
.fin-ue2-saetze .geld { color: var(--text); }
.fin-ue2-saetze .fin-aus-text .geld { color: inherit; }
.fin-ue2-liste { display: flex; flex-direction: column; flex: 1; }
.fin-termine .marke-klein { padding: 0 .45em; }

/* Ü3 Kennzahlen */
.kacheln.fin-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.fin-kachel { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 128px; text-align: left; color: inherit; font: inherit; cursor: default; padding: 12px 14px; }
button.fin-kachel { cursor: pointer; }
button.fin-kachel:hover { border-color: var(--linie-stark); color: inherit; }
.fin-kachel .wert { font-size: 1.45rem; font-variant-numeric: proportional-nums; }
.fin-kachel-delta { min-height: 1.3em; }
.fin-kachel-delta .delta { font-size: var(--t-xs); }
.fin-kachel .unter { line-height: 1.35; }
.fin-kachel .unter .geld { color: var(--leise); }
.fin-kachel-spark { margin-top: auto; padding-top: 6px; height: 34px; display: flex; align-items: flex-end; }
.fd-spark-platz { display: block; width: 96px; height: 28px; }
.fin-ue3-fuss { margin: 10px 0 0; font-size: .82rem; }
.fin-ue3-fuss a { color: var(--leise); }
.fin-ue3-fuss a:hover .geld { color: var(--text); }

/* Ü4/Ü5 */
.fin-verlauf-ziel { min-width: 0; }
.fin-legende-satz, .fin-ueblich { font-size: .8rem; margin: 6px 0 0; }
/* Ü4 Verlauf (FIN-15): Kernaussagen unter dem Diagramm und die Einkommens-Kurzzeile. */
.fin-verlauf-aussagen { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; font-size: .86rem; line-height: 1.4; }
.fin-verlauf-aussagen li { position: relative; padding-left: 16px; min-width: 0; overflow-wrap: anywhere; }
.fin-verlauf-aussagen li::before { content: ''; position: absolute; left: 2px; top: .52em; width: 7px; height: 7px; border-radius: 50%; background: var(--fin-v-aus); }
.fin-verlauf-aussagen li.ton-gut::before { background: var(--fin-ein); } .fin-verlauf-aussagen li.ton-warn::before { background: var(--warn); }
.fin-verlauf-einkommen { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--linie); font-size: .84rem; }
.fin-verlauf-einkommen a { margin-left: auto; white-space: nowrap; }
@media (max-width: 560px) { .fin-verlauf-aussagen { font-size: .82rem; gap: 4px; } }
.fin-n-wahl button { padding: .15em .7em; font-size: .8rem; }
.fin-ue5-delta { font-size: var(--t-xs); margin-left: 4px; }
.fin-wohin .fd-balkenliste { margin-bottom: 8px; }

/* Ü6 Schulden-Kompass */
.fin-kompass { display: grid; }
.fin-kompass-zeile { display: grid; grid-template-columns: 9em minmax(0, 1fr); grid-template-areas: "titel wert" "titel unter"; align-items: baseline; gap: 2px 14px;
  min-height: 64px; padding: 9px 6px; margin: 0 -6px; border-bottom: 1px solid var(--linie); color: var(--text); border-radius: 0; }
.fin-kompass-zeile:last-child { border-bottom: 0; }
/* Skelett der Kompass-Zeilen in den Maßen des Inhalts (Titel links über zwei Zeilen, Wert und Unterzeile rechts). */
.fin-kompass-zeile > .sk-titel { grid-area: titel; margin: 0; } .fin-kompass-zeile > .sk-wert { grid-area: wert; height: 1.15rem; margin: 0; }
.fin-kompass-zeile > .sk-text { grid-area: unter; font-size: .8rem; }
a.fin-kompass-zeile:hover { background: var(--hover); color: var(--text); }
.fin-k-titel { grid-area: titel; color: var(--leise); font-size: .84rem; }
.fin-k-wert { grid-area: wert; font-size: 1.15rem; font-weight: 650; }
.fin-k-unter { grid-area: unter; display: flex; flex-direction: column; font-size: .8rem; }
.fin-k-unter .geld { color: var(--leise); }
.fin-k-ausblick { font-size: .95rem; font-weight: 500; line-height: 1.4; }
.fin-kompass-zeile > .sk-titel, .fin-kompass-zeile > .sk-wert, .fin-kompass-zeile > .sk-text { grid-column: 1 / -1; }
.fin-kompass-zeile:has(> .skelett) { display: block; }

/* Ü7 Hebel */
.fin-hebelliste { display: grid; }
.fin-hebelzeile { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 16px; min-height: 64px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.fin-hebelzeile:last-child { border-bottom: 0; }
.fin-hebelzeile.fin-weg { opacity: .4; }
.fin-hebel-text { display: flex; flex-direction: column; min-width: 0; }
.fin-hebel-text b { font-weight: 600; }
.fin-hebel-text small { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-hebel-wert { text-align: right; white-space: nowrap; font-weight: 600; }
.fin-hebel-wert small { font-weight: 400; }
.fin-hebel-aktionen { display: flex; align-items: center; gap: 10px; }

/* ---------- Blätter (Dialoge) ---------- */
dialog.fin-blatt { padding: 0; width: min(560px, calc(100vw - 24px)); border-radius: var(--r-karte); overflow: hidden; }
dialog.fin-blatt.breit { width: min(760px, calc(100vw - 24px)); }
dialog.fin-blatt.klein { width: min(440px, calc(100vw - 24px)); }
dialog.fin-blatt[open] { display: flex; flex-direction: column; }
.fin-blatt-kopf { display: flex; align-items: flex-start; gap: 10px; padding: 18px 16px 8px 22px; }
.fin-blatt-titel { flex: 1; min-width: 0; }
.fin-blatt-titel h2 { margin: 0; font-size: 1.12rem; overflow-wrap: anywhere; }
.fin-blatt-titel p { margin: 4px 0 0; font-size: .85rem; }
.fin-blatt-zurueck { display: none; }
.fin-blatt-zu { margin: -4px -4px 0 0; }
.fin-blatt-inhalt { flex: 1; overflow-y: auto; padding: 6px 22px 18px; min-height: 0; }
.fin-blatt-fuss { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--linie); background: var(--bg-2); }
.fin-privat-hinweis { font-size: .82rem; }
.fin-blatt-zusatz { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--linie); }
@media (max-width: 560px) {
  dialog.fin-blatt, dialog.fin-blatt.breit, dialog.fin-blatt.klein { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; border: 0; }
  .fin-blatt-kopf { padding: 12px 12px 6px; align-items: center; }
  .fin-blatt-zurueck { display: inline-flex; flex: none; }
  .fin-blatt-zu { display: none; }
  .fin-blatt-inhalt { padding: 6px 16px 16px; }
  .fin-blatt-fuss { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .fin-blatt-fuss > button, .fin-blatt-fuss > .knopf { flex: 1 1 auto; justify-content: center; }
}
#meldung .fin-meldung { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#meldung .fin-meldung button.link { flex: none; font-weight: 600; }

/* ---------- Formulare ---------- */
.fin-form-zeile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.fin-form-zeile > .feld { min-width: 0; }
.fin-buchungform .fin-segment { margin-bottom: 14px; }
.fin-buchungform input, .fin-buchungform select { min-height: 44px; }
.fin-notiz { font-family: var(--schrift); font-size: .92rem; min-height: 44px; }
.fin-form-schalter { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 8px; }
.fin-form-gruppe { background: var(--bg-1); border: 1px solid var(--linie); border-radius: var(--r-m); padding: 10px 14px 0; margin-bottom: 12px; }
.fin-form-gruppe[hidden], .fin-form-zusatz[hidden] { display: none; }
.fin-formfehler { color: var(--fin-aus-text); font-size: .86rem; margin: 6px 0 0; min-height: 0; }
.fin-formfehler:empty { display: none; }
.fin-gesperrt { display: flex; align-items: center; gap: 6px; font-size: .84rem; }
.fin-gesperrt .ik { width: 15px; height: 15px; }
.fin-vorschau { display: block; min-height: 1.2em; color: var(--leise); font-size: .8rem; margin-top: .3em; font-variant-numeric: tabular-nums; }
.fin-vorschau.fehl { color: var(--fin-aus-text); }
.fin-betragfeld input { font-variant-numeric: tabular-nums; }
.fin-datum-zeile { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fin-datum-zeile input { flex: 1 1 10.5em; min-width: 0; }
.fin-chip { flex: none; padding: .3em .7em; font-size: .8rem; min-height: 36px; }
.fin-einheit { display: flex; align-items: center; gap: 8px; }
.fin-einheit input { flex: 1; min-width: 0; }
.fin-einheit span { color: var(--leise); }
.fin-schalter { align-items: flex-start; }
.fin-schalter input { margin: .2em 0 0; padding: 0; width: 16px; height: 16px; flex: none; }
.fin-schalter > span { display: flex; flex-direction: column; }
.fin-schalter small { font-size: .8rem; }
.fin-segment { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.fin-segment button { white-space: nowrap; min-height: 32px; }
.fin-kategoriewahl { position: relative; }
.fin-kw-knopf { width: 100%; justify-content: space-between; background: var(--bg-1); min-height: 44px; padding: .55em .8em; text-align: left; }
.fin-kw-wert { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-kw-pfeil { color: var(--blass); }
.fin-kw-feld { position: absolute; left: 0; right: 0; top: calc(1.6em + 48px); z-index: 30; background: var(--bg-2); border: 1px solid var(--linie-stark); border-radius: var(--r-m); padding: 8px;
  box-shadow: var(--schatten-2); }
.fin-kw-feld[hidden] { display: none; }
.fin-kw-liste { max-height: 260px; overflow-y: auto; display: grid; margin-top: 6px; }
.fin-kw-gruppe { font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--blass); padding: 8px 8px 4px; }
.fin-kw-option { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; border-radius: var(--r-s); padding: .45em .6em; color: var(--text); text-align: left; min-height: 40px; }
.fin-kw-option small { margin-left: auto; }
.fin-kw-option:hover, .fin-kw-option:focus-visible { background: var(--bg-3); }
.fin-kw-option[aria-selected="true"] { background: var(--akzent-flaeche); }
@media (max-width: 560px) {
  .fin-kw-feld { position: fixed; inset: auto 0 0 0; top: auto; border-radius: var(--r-karte) var(--r-karte) 0 0; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
  .fin-kw-liste { max-height: 50vh; }
}
.fin-filterzeile { display: grid; gap: 8px; margin-bottom: 12px; }
.fin-filter-steuer { display: flex; flex-wrap: wrap; gap: 8px; }
.fin-filter-steuer > * { width: auto; flex: 1 1 10em; min-width: 0; }
.fin-filter-mobil { display: none; justify-self: start; }
.fin-filterchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fin-zeitraumwahl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fin-zeitraum-select { display: none; width: auto; }
.fin-zeitraum-nav { display: inline-flex; align-items: center; gap: 4px; }
.fin-zeitraum-label { min-width: 9em; text-align: center; font-weight: 600; }
@media (max-width: 560px) {
  .fin-filter-steuer { display: none; } .fin-filter-mobil { display: inline-flex; }
  .fin-zeitraumwahl .fin-segment { display: none; } .fin-zeitraum-select { display: block; }
  .fin-form-zeile { grid-template-columns: minmax(0, 1fr); }
}

/* Drill-Blatt */
.fin-drill-summe { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 0 10px; border-bottom: 1px solid var(--linie); margin-bottom: 4px; color: var(--leise); }
.fin-drill-wert { font-size: 1.3rem; color: var(--text); }

/* Einstellungen: Wochenlimit (FIN-14) */
.fin-einst-woche { display: grid; gap: 8px; }
.fin-einst-woche .nz-segment { justify-self: start; }
.fin-einst-woche p { margin: 0; }
.fin-einst-woche-hinweis { font-size: .86rem; line-height: 1.45; }
.fin-einst-woche-fest { display: grid; gap: 4px; max-width: 24rem; }
.fin-einst-woche-fest .fin-einst-fuss { justify-content: flex-start; }
/* Einrichtung, Wochenlimit, Zahltag-Plan */
.fin-einrichtung-liste { display: grid; gap: 12px; }
.fin-angabe { background: var(--bg-1); border: 1px solid var(--linie); border-radius: var(--r-m); padding: 12px 14px; }
.fin-angabe.erledigt { opacity: .6; }
.fin-angabe-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fin-angabe h3 { color: var(--text); font-size: .95rem; margin: 0 0 4px; }
.fin-angabe > p.leise { font-size: .82rem; margin-bottom: 10px; }
.fin-tagfeld { width: 5.5em; }
.fin-zahltagplan { display: grid; gap: 0; }
.fin-plan-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(8em, max-content); align-items: baseline; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--linie); font-size: .9rem; }
.fin-plan-zeile > span:last-child { text-align: right; font-size: .82rem; white-space: nowrap; }
.fin-plan-wert { text-align: right; }
.fin-plan-summe { border-bottom: 0; }
.fin-zahltagplan > p { margin: 10px 0 0; }
.fin-datei { padding: .35em; font-size: .85rem; }
.fin-datei-zeile { margin-top: 6px; }

/* Bon-Scan: Prüfansicht mit Boxen (Farbe nie allein – Legende mit Text) */
.fin-scan-status { display: flex; align-items: center; gap: 10px; min-height: 120px; justify-content: center; color: var(--leise); margin: 0; }
.fin-scan-status .puls { margin: 0; }
.fin-scan-raster { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.fin-scan-bild { position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--bg-1); border: 1px solid var(--linie); }
.fin-scan-bild img { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; }
.fin-scan-boxen { position: absolute; inset: 0; width: 100%; height: 100%; }
.fin-scan-boxen rect { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.fin-box-haendler { stroke: var(--fin-box-haendler); } .fin-box-betrag { stroke: var(--fin-box-betrag); } .fin-box-datum { stroke: var(--fin-box-datum); } .fin-box-bon { stroke: var(--fin-box-bon); stroke-dasharray: 4 3; }
.fin-scan-legende { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--leise); }
.fin-scan-legende i { display: inline-block; width: 12px; height: 10px; border: 2px solid; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.fin-scan-legende i.fin-box-l-haendler { border-color: var(--fin-box-haendler); } .fin-scan-legende i.fin-box-l-betrag { border-color: var(--fin-box-betrag); }
.fin-scan-legende i.fin-box-l-datum { border-color: var(--fin-box-datum); } .fin-scan-legende i.fin-box-l-bon { border-color: var(--fin-box-bon); border-style: dashed; }
.fin-scan-rechts label .marke-klein { font-size: var(--t-xs); margin-left: 4px; }
.fin-scan-vorschlaege { margin: 6px 0 4px; }
.fin-scan-vorschlaege h3 { color: var(--text); font-size: .9rem; margin-bottom: 4px; }
.fin-scan-ablauf { font-size: .8rem; margin: 8px 0 0; }
@media (max-width: 560px) { .fin-scan-raster { grid-template-columns: minmax(0, 1fr); } .fin-scan-bild img { max-height: 40vh; } }

/* Mehr-Blatt, Kürzel */
.fin-mehr-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 18px; }
.fin-mehr-kachel { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; min-height: 84px; border-radius: var(--r-m); background: var(--bg-1); border: 1px solid var(--linie); color: var(--text); }
.fin-mehr-kachel:hover { border-color: var(--linie-stark); color: var(--text); }
.fin-mehr-kachel .ik { color: var(--akzent); width: 20px; height: 20px; }
.fin-mehr-privat { margin-bottom: 16px; }
.fin-mehr-privat h3 { margin-bottom: 8px; }
.fin-kuerzel-liste { display: grid; gap: 6px; }
.fin-kuerzel { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; align-items: center; font-size: .9rem; }
.fin-kuerzel kbd { justify-self: start; font-family: var(--mono); font-size: .8rem; background: var(--bg-1); border: 1px solid var(--linie-stark); border-bottom-width: 2px; border-radius: var(--r-s); padding: .1em .5em; }

/* Platzhalter für Reiter, die noch kommen */
.fin-platzhalter { display: grid; gap: 16px; padding: 22px; max-width: 760px; }
.fin-platzhalter-kopf { display: flex; gap: 16px; align-items: flex-start; }
.fin-platzhalter-kopf h2 { margin-bottom: .3em; }
.fin-platzhalter-kopf p { margin: 0; }
.fin-platzhalter-sym { flex: none; width: 44px; height: 44px; border-radius: var(--r-m); display: grid; place-items: center; color: var(--akzent); background: var(--akzent-flaeche); box-shadow: 0 0 0 1px var(--akzent-flaeche-stark) inset; }
.fin-platzhalter-sym .ik { width: 22px; height: 22px; }
.fin-platzhalter-bloecke h3 { margin-bottom: .4em; }
.fin-platzhalter-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.fin-platzhalter-liste li { font-size: .82rem; padding: .25em .7em; border-radius: var(--r-voll); border: 1px solid var(--linie-stark); color: var(--leise); }

/* ---------- Einstellungen ---------- */
.fin-einst-intro { margin: -4px 0 14px; font-size: .88rem; }
.fin-einstellungen { display: grid; gap: 10px; max-width: 980px; }
details.fin-einst { margin: 0; padding: 0; scroll-margin-top: 64px; }
details.fin-einst > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "titel pfeil" "unter pfeil"; align-items: center; gap: 0 12px;
  padding: 14px 18px; cursor: pointer; list-style: none; border-radius: var(--r-m); min-height: 56px; }
details.fin-einst > summary::-webkit-details-marker { display: none; }
details.fin-einst > summary::after { content: "▾"; grid-area: pfeil; color: var(--blass); transition: transform .15s; }
details.fin-einst[open] > summary::after { transform: rotate(180deg); }
details.fin-einst > summary:hover { background: var(--hover); }
.fin-einst-titel { grid-area: titel; font-weight: 600; font-size: 1rem; }
details.fin-einst > summary small { grid-area: unter; font-size: .8rem; }
details.fin-einst.gefahr > summary .fin-einst-titel { color: var(--fehl-text); }
.fin-einst-inhalt { padding: 14px 18px 18px; border-top: 1px solid var(--linie); }
.fin-einst-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.fin-einst-raster[hidden], .fin-einst-zeile[hidden] { display: none; }
.fin-schalterliste { display: grid; gap: 10px; margin: 4px 0 14px; }
.fin-einst-gruppe { padding: 14px 0; border-bottom: 1px solid var(--linie); }
.fin-einst-gruppe:first-child { padding-top: 0; }
.fin-einst-gruppe:last-child { border-bottom: 0; padding-bottom: 0; }
.fin-einst-gruppe h3 { color: var(--text); font-size: .92rem; margin-bottom: .6em; }
.fin-einst-fuss { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.fin-einst-kopfzeile { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fin-einst-kopfzeile p { margin: 0; font-size: .85rem; }
.fin-einst-kopfzeile h3 { margin: 0; }
.fin-kat-liste, .fin-regel-liste, .fin-zugang-liste { display: grid; border-top: 1px solid var(--linie); }
.fin-kat-zeile { display: grid; grid-template-columns: auto minmax(8em, 1.2fr) minmax(0, 1.4fr) 9.5em auto; align-items: center; gap: 6px 12px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--linie); font-size: .88rem; }
.fin-kat-zeile.archiviert { opacity: .7; }
.fin-kat-ordnung { display: inline-flex; gap: 0; }
.fin-kat-ordnung .ikknopf { width: 30px; height: 30px; font-size: .95rem; }
.fin-kat-name { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.fin-kat-meta { font-size: .8rem; min-width: 0; }
.fin-klein-select { padding: .3em .5em; font-size: .82rem; }
.fin-archiv { margin-top: 10px; }
.fin-archiv > summary { cursor: pointer; color: var(--leise); font-size: .85rem; padding: 6px 0; }
.fin-regel-zeile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--linie); font-size: .88rem; }
.fin-regel-text { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.fin-regel-text small { flex-basis: 100%; font-size: var(--t-xs); }
.fin-regel-aktionen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.fin-regel-aktionen .ik { width: 16px; height: 16px; }
.fin-testfeld { margin-top: 18px; padding: 14px; background: var(--bg-1); border: 1px solid var(--linie); border-radius: var(--r-m); }
.fin-testfeld h3 { color: var(--text); font-size: .9rem; }
.fin-testergebnis { min-height: 1.6em; margin-top: 8px; font-size: .88rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fin-chipeditor { display: grid; gap: 6px; }
.fin-chipeditor .fin-chips:empty, .fin-chipeditor .fin-vorschau:empty { display: none; }
.fin-chip-wert { font-size: .8rem; padding: .25em .7em; }
.fin-muster { display: grid; gap: 6px; }
.fin-muster-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 12em) auto; align-items: center; gap: 8px; }
.fin-muster-zeile.neu { grid-template-columns: minmax(0, 1fr) minmax(0, 12em) auto; }
.fin-muster-zeile code { overflow-wrap: anywhere; }
.fin-muster-zeile .ik { width: 14px; height: 14px; }
.fin-zeiten { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fin-umbruch { overflow-wrap: anywhere; }
.fin-zugang-zeile { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 13em; align-items: center; gap: 6px 14px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--linie); font-size: .88rem; }
.fin-zugang-zeile.aus { opacity: .6; }
.fin-zugang-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fin-zugang-name > span { display: flex; flex-direction: column; min-width: 0; }
.fin-zugang-name small { font-size: var(--t-xs); }
.fin-zugang-name .ik { color: var(--leise); }
.fin-zugang-recht { font-size: .82rem; min-width: 0; }
.fin-zugang-aktion { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.fin-pflicht { margin: 4px 0 10px; }
.fin-token { user-select: all; }
.fin-kit-info { margin-top: 10px; }
.fin-kit-liste { margin: 8px 0 0; padding-left: 1.2em; font-size: .86rem; }
.fin-kit-pruefen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.fin-kit-pruefen input { width: auto; flex: 1 1 9em; min-width: 0; }
.fin-audit { display: grid; border-top: 1px solid var(--linie); }
.fin-audit-zeile { border-bottom: 1px solid var(--linie); }
.fin-audit-zeile > summary { display: grid; grid-template-columns: 8.5em auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font-size: .86rem; }
.fin-audit-zeile > summary::-webkit-details-marker { display: none; }
.fin-audit-zeit { color: var(--leise); font-variant-numeric: tabular-nums; }
.fin-audit-aktion { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-audit-details { margin: 0 0 10px; padding: 8px 10px; background: var(--bg-1); border-radius: var(--r-s); font-size: var(--t-xs); color: var(--leise); white-space: pre-wrap; overflow-wrap: anywhere; }
.fin-palette { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.fin-farbe { width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 2px solid transparent; }
.fin-farbe[aria-checked="true"] { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg-2) inset; }
.fin-hex { width: 8.5em; }
.fin-vorschau-zyklus { margin: 4px 0 0; }

/* ---------- Mobil: untere Finanzleiste und Plus-Knopf (11 §15) ---------- */
.fin-leiste, .fin-plus, .fin-plus-pfeil, .fin-plus-menue { display: none; }
@media (max-width: 860px) {
  .fin-reiter { display: none; }
  body.mit-fin-leiste .inhalt { padding-bottom: 176px; }
  body.mit-fin-leiste #meldung { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .fin-leiste { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; inset: auto 0 0 0; z-index: 15;
    height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--linie); }
  .fin-leiste > a, .fin-leiste > button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 0 2px;
    background: none; border: 0; border-top: 2px solid transparent; border-radius: 0; color: var(--leise); font-size: var(--t-xs); line-height: 1.1; }
  .fin-leiste > a.aktiv, .fin-leiste > button.aktiv { color: var(--text); border-top-color: var(--akzent-mitte); }
  .fin-leiste svg { width: 22px; height: 22px; }
  .fin-leiste-sym { position: relative; display: inline-flex; }
  .fin-leiste .zaehler { position: absolute; top: -5px; right: -12px; }
  .fin-plus { display: inline-flex; position: fixed; z-index: 16; right: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); width: 56px; height: 56px; padding: 0;
    border-radius: 50%; justify-content: center; background: var(--akzent-mitte); border: 0; color: #fff; box-shadow: var(--schatten-2); }
  .fin-plus .ik { width: 26px; height: 26px; }
  /* O-03: Pfeil über dem Plus (mittig, mit Abstand) statt halb darauf; beide treten beim Scrollen nach unten zur Seite. */
  .fin-plus-pfeil { display: inline-flex; position: fixed; z-index: 17; right: 32px; bottom: calc(136px + env(safe-area-inset-bottom)); width: 24px; height: 24px; padding: 0;
    justify-content: center; border-radius: 50%; font-size: var(--t-xs); background: var(--bg-3); }
  .fin-plus, .fin-plus-pfeil { transition: transform .2s ease, opacity .2s ease; }
  body.fin-plus-eingefahren .fin-plus, body.fin-plus-eingefahren .fin-plus-pfeil { transform: translateX(96px); opacity: 0; pointer-events: none; }
  @media (prefers-reduced-motion: reduce) { .fin-plus, .fin-plus-pfeil { transition: none; } }
  .fin-plus-menue:not([hidden]) { display: grid; position: fixed; z-index: 18; right: 16px; bottom: calc(166px + env(safe-area-inset-bottom)); min-width: 200px; padding: 6px;
    background: var(--bg-2); border: 1px solid var(--linie-stark); border-radius: var(--r-m); box-shadow: var(--schatten-2); }
  .fin-plus-menue button { justify-content: flex-start; background: none; border: 0; padding: .7em .8em; }
  body.tastatur-offen .fin-leiste, body.tastatur-offen .fin-plus, body.tastatur-offen .fin-plus-pfeil { display: none; }
  .fin-feste-hoehe { min-height: var(--fin-h-m, auto); }
  .fin-kopf-knoepfe .fin-schreibt { display: none; }
}
/* FIN-14: Die Lage-Karte ist erst unter 561 px einspaltig (Woche unter der großen Zahl); darüber ist sie so hoch wie auf dem Tablet.
   Mit der Handy-Höhe (707 px) stand auf Tablets im Hochformat ≈ 250 px leere Fläche in der Karte. Gemessen mit S1: 561 px → 537,
   600 → 518, 700–860 → 449–456 px. */
@media (min-width: 561px) and (max-width: 860px) { .fin-lage.fin-feste-hoehe, .fin-lage-sk.fin-feste-hoehe { min-height: 540px; } }
@media (min-width: 700px) and (max-width: 860px) { .fin-lage.fin-feste-hoehe, .fin-lage-sk.fin-feste-hoehe { min-height: var(--fin-h-t, 456px); } }
/* Ebenso knapp über den Umbrüchen (gemessen mit S1): 861 px → 518, 900 → 479 (Tablet-Wert 456); 1180 px → 527, 1280 → 504 (Desktop-Wert 497) –
   sonst wüchse die Karte nach dem Laden und schöbe alles darunter. */
@media (min-width: 861px) and (max-width: 959px) { .fin-lage.fin-feste-hoehe, .fin-lage-sk.fin-feste-hoehe { min-height: 520px; } }
@media (min-width: 1180px) and (max-width: 1279px) { .fin-lage.fin-feste-hoehe, .fin-lage-sk.fin-feste-hoehe { min-height: 527px; } }
@media (max-width: 560px) {
  .fin-kopf { gap: 10px; }
  .fin-kopf h1 { font-size: 1.35rem; }
  .fin-knopftext { display: none; }
  .fin-privatknopf { padding: .4em .55em; }
  .fin-hero { font-size: 2.2rem; }
  .fin-lage-oben { flex-direction: column; align-items: stretch; gap: 8px; }
  .fin-lage-woche { flex-basis: auto; min-width: 0; padding: 6px 10px 4px; }
  .fin-lage-woche .fd-woche { height: 46px; }
  .fin-woche-gleichung .fin-gl-op { flex-basis: 100%; height: 0; overflow: hidden; }
  .fin-wv-woche { flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 10px; }
  .fin-wv-zeit { max-width: 100%; }
  .fin-gleichung .fin-gl-op:last-of-type { flex-basis: 100%; height: 0; overflow: hidden; }
  .fin-kurzwerte { grid-template-columns: minmax(0, 1fr); }
  .kacheln.fin-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-kachel .wert { font-size: 1.2rem; }
  .fin-rw-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .fin-rw-aktion { grid-column: 1 / -1; justify-content: flex-start; }
  .fin-rw-aktion:empty { display: none; }
  .fin-hinweisleiste { margin-left: -14px; margin-right: -14px; padding: 0 14px; }
  .fin-hl-liste { margin-left: -14px; margin-right: -14px; }
  .fin-hinweisleiste .fin-hl-aktionen { display: none; }
  .fin-kpi .fin-delta-bezug, .fin-kopfzeile .fin-trenner { display: none; }
  .fin-hl-plus { display: inline; } .fin-hl-lang { display: none; }
  .fin-kopf { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; }
  .fin-kopf-text { display: contents; }
  .fin-kopf h1 { margin: 0; }
  .fin-kopfzeile { grid-column: 1 / -1; }
  .fin-kopf-knoepfe { gap: 4px; grid-row: 1; grid-column: 2; }
  .fin-hebelzeile { grid-template-columns: minmax(0, 1fr) auto; }
  .fin-hebel-aktionen { grid-column: 1 / -1; }
  .fin-hebel-text b { font-size: .95rem; }
  .fin-hebel-text small { white-space: normal; }
  .fin-kompass-zeile { grid-template-columns: minmax(0, 1fr); grid-template-areas: "titel" "wert" "unter"; }
  .fin-einst-raster { grid-template-columns: minmax(0, 1fr); }
  .fin-kat-zeile { grid-template-columns: auto minmax(0, 1fr) auto; }
  .fin-kat-meta { grid-column: 2 / -1; }
  .fin-kat-zeile .fin-klein-select { grid-column: 2; }
  .fin-zugang-zeile { grid-template-columns: minmax(0, 1fr); }
  .fin-zugang-aktion { justify-content: flex-start; }
  .fin-regel-zeile { grid-template-columns: auto minmax(0, 1fr); }
  .fin-regel-aktionen { grid-column: 1 / -1; justify-content: flex-start; }
  .fin-audit-zeile > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .fin-audit-aktion { grid-column: 1 / -1; white-space: normal; }
  .fin-zeiten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-muster-zeile { grid-template-columns: minmax(0, 1fr) minmax(0, 9em) auto; }
  .fin-muster-zeile > span[aria-hidden] { display: none; }
  .fin-muster-zeile.neu { grid-template-columns: minmax(0, 1fr) auto; }
  .fin-muster-zeile.neu > input { grid-column: 1 / -1; }
  .fin-plan-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .fin-plan-zeile > span:last-child { grid-column: 1 / -1; text-align: left; }
  .tafel.fin-karte { padding: 14px; }
}
@media (hover: none) { .fin-hl-weg { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fin-hervor { animation: none; outline: 2px solid var(--akzent); } }
