/* Windsen Ads, Version 2. Grundlage: Designvorlage 3 (taste-skill), Entscheidung Jan 19.10.2026.
   Marke seit 22.10.2026 (Jan): Libre Caslon Text für Marke und Überschriften, Fira Sans für Text und Zahlen
   (Tabellenziffern). Selbst gehostet unter /static/v2/fonts (SIL Open Font License, Texte daneben), nur Latein. */

@font-face {
  font-family: "Libre Caslon Text";
  src: url("/static/v2/fonts/libre-caslon-text-latin-wght.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("/static/v2/fonts/fira-sans-latin-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("/static/v2/fonts/fira-sans-latin-medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("/static/v2/fonts/fira-sans-latin-semibold.woff2") format("woff2");
  font-weight: 600 700; font-style: normal; font-display: swap;
}

:root {
  /* Windsen-CI (Jan, 20.10.2026: „als CI festlegen“). Grundfarben von windsen.de (Knöpfe, Flächen, Akzent),
     Regeln in docs/11-marke.md. Neue Farben nur hier als Token anlegen, nie als Hex in Seiten-CSS oder Vorlagen. */
  --salbei-dunkel: #4c574f;
  --salbei: #77817a;
  --waldgruen: #2e7d5b;
  --tiefgruen: #1e4a39;
  --papier: #e5dfd2;
  --gold: #c79b3a;
  --schwarz: #1b241f;
  /* abgeleitet */
  --tiefgruen-dunkel: #163a2c;          /* Knopf beim Überfahren */
  --gold-dunkel: #a8791f;               /* Gold auf hellem Grund (Diagramme, Folienkante) */
  --auf-gruen: var(--papier);           /* Schrift und Prägung auf Tiefgrün (Anmelden-Knopf, Notizbuch) */
  --auf-dunkel: #c9cec5;                /* Menü-Schrift auf der dunklen Seitenleiste */
  --auf-dunkel-leise: #9aa39b;          /* Nebentext dort */
  --warn-text: #8a5a12;
  --rot-dunkel: #6f2f25;
  --feld: #fbf9f4;                      /* Eingabefelder */
  --grund: #ebe6db;
  --flaeche: #f4f1ea;
  --linie: rgba(27, 36, 31, 0.13);
  --linie-stark: rgba(27, 36, 31, 0.26);
  --text: var(--schwarz);
  --text-2: var(--salbei-dunkel);
  --rot: #8a3b2e;
  --plus: #1c7048;                      /* Zahlen mit Plus: deutlich grün (Ole, 22.10.2026), Kontrast ≥ 4,5 auf Papier und Fläche */
  --minus: #b3322a;                     /* Zahlen mit Minus: deutlich rot, Kontrast ≥ 4,5 */
  --einband: #20251f;                   /* Notizbuch-Leinen: Schwarz statt Grün (Jan, 22.10.2026: Logo nie auf großem Grün) */
  /* Begrüßung „Schreibtisch im Lampenlicht“ (28.10.2026): nur die Szene, nicht Teil der Marke */
  --tisch: #120e0b;                     /* lackierte schwarze Eiche */
  --lampenlicht: #f7e8d2;               /* warmes Glühbirnenlicht auf Papier */
  --lampe: 255, 214, 160;               /* dasselbe Licht als RGB-Anteile für Lichtkegel und Glanz (mit Deckkraft) */
  --serif: "Libre Caslon Text", Georgia, serif;
  --sans: "Fira Sans", Arial, sans-serif;
  --mono: "Fira Sans", Arial, sans-serif;   /* Zahlen und Uhrzeiten: Fira Sans mit Tabellenziffern, kein Mono mehr */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Meeting-Raum (05.11.2026): nur die Szene, NICHT Teil der Marke — wie --tisch und --lampenlicht.
     Der Raum ist dem Aussehen einer bekannten Videokonferenz nachgebaut, damit niemand umlernen muss
     (Jan, 05.11.2026). Für eine dunkle Oberfläche reicht unsere Palette nicht: Sie kennt nur die
     Familien Grün, Beige, Gold und Rot und liefert damit keine fünf voneinander unterscheidbaren
     Kreisfarben für die Teilnehmer; und unser Rot hebt sich vom grauen Knopf des Raums kaum ab
     (Faktor 1,37 statt nötiger 3,0 — gegen unseren Knopf in Tiefgrün wären es 1,31). Diese Werte gelten AUSSCHLIESSLICH
     für raum.css; tests/test_v2_raum_szene.py hält das fest. Nie auf anderen Seiten, nie in der
     Wortmarke, nie als Ersatz für eine Marken-Farbe. */
  --raum-grund: #202124;                /* Hintergrund des Raums */
  --raum-kachel: #3c4043;               /* Kachel eines Teilnehmers, zugleich Knopffläche */
  --raum-knopf-hell: #4a4d51;           /* Knopf, wenn die Maus darauf steht */
  --raum-text: #e8eaed;                 /* Schrift auf dunklem Grund */
  --raum-leise: #9aa0a6;                /* Nebensächliches: Namen, Hinweise */
  --raum-grau-mittel: #5f6368;          /* zwei Rollen: Trennlinie im Dunkelmodus, Nebentext auf der hellen Startseite */
  --raum-rot: #ea4335;                  /* Auflegen und Aufnahme */
  --raum-rot-hell: #f06055;             /* Auflegen, Maus darauf */
  --raum-rot-text: #d93025;             /* Fehlermeldung auf hellem Grund */
  --raum-aktiv: #8ab4f8;                /* eingeschalteter Knopf */
  --raum-tat: #1a73e8;                  /* Hauptknopf „Jetzt teilnehmen“, heller Grund */
  --raum-tat-dunkel: #1765cc;           /* derselbe Knopf, Maus darauf */
  --raum-tat-hell: #aecbfa;             /* derselbe Knopf im Dunkelmodus, Maus darauf */
  --raum-hell: #fff;                 /* Startseite vor dem Beitreten: Grund und Schrift auf Farbe */
  --raum-hell-linie: #dadce0;           /* Linien auf hellem Grund */
  --raum-hell-aus: #e8eaed;             /* gesperrter Knopf, heller Grund */
  --raum-hell-aus-text: #80868b;        /* Schrift darauf */
  --raum-chip-an: #e8f0fe;              /* gewählter Name, heller Grund */
  --raum-chip-an-text: #174ea6;
  --raum-chip-an-dunkel: #394457;       /* dasselbe im Dunkelmodus */
  --raum-chip-an-text-dunkel: #d2e3fc;
  --raum-netz: #fdd663;                 /* Hinweis auf schwache Verbindung */
  --raum-avatar-0: #1a73e8;             /* fünf Kreisfarben, aus dem Namen berechnet */
  --raum-avatar-1: #188038;
  --raum-avatar-2: #b06000;
  --raum-avatar-3: #9334e6;
  --raum-avatar-4: #c5221f;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pos, .vz-pos { color: var(--plus); }
.neg, .vz-neg { color: var(--minus); }
h1, h2 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
a { color: inherit; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* Menü (Jan, 22.10.2026): Dashboard = W mit Pusteblume; der Menüpunkt Werbung heißt „ADS“, geschrieben wie der Zusatz der Marke */
.icon-marke { stroke: none; --wm-farbe: currentColor; --wm-samen: var(--gold); }
.reiter a[aria-current="page"] .icon-marke { color: var(--papier); }   /* aktiv: nur der Samen gold */
.nav-ads { font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.leer { margin: 0; padding: 18px 0; border-top: 1px solid var(--linie); color: var(--text-2); font-size: 14px; max-width: 52ch; }
.hinweis { margin: 14px 0 0; font-size: 13px; color: var(--text-2); max-width: 62ch; }
.hinweis a { color: var(--tiefgruen); text-underline-offset: 2px; }
.warn { color: var(--warn-text); }
.demo-band { margin: 0 0 20px; padding: 10px 14px; border: 1px solid var(--linie-stark); border-radius: 8px; font-size: 13px; color: var(--text-2); background: var(--flaeche); }

/* ---------- Rahmen ---------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh; background: linear-gradient(to right, var(--schwarz) 232px, transparent 232px); }

.seite {
  background: var(--schwarz);
  color: var(--papier);
  padding: 28px 16px;
  display: flex; flex-direction: column; gap: 32px;
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
}
.marke { padding: 0 12px; }
/* Logo führt zum Dashboard (Jan, 23.10.2026) */
a.marke { display: block; color: inherit; text-decoration: none; border-radius: 6px; }
a.marke-quer { display: flex; }
a.marke:focus-visible { outline: 2px solid var(--tiefgruen); outline-offset: 4px; }   /* hell: Tiefgrün; Seitenleiste überschreibt .seite a:focus-visible */
/* Wortmarke aus marke.svg (Jan, 22.10.2026): Samen = goldener i-Punkt mit Pusteblume, auch klein („Junge, ist das dumm“ ohne);
   „Ads“ als Bereichszusatz unter goldenem Strich */
.marke-wort { display: block; width: 140px; height: auto; aspect-ratio: 4482 / 1273; --wm-farbe: var(--papier); --wm-samen: var(--gold); }
.marke-zusatz { display: block; margin-top: 10px; font: 500 11px/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--auf-dunkel-leise); }
.marke-zusatz::before { content: ""; display: block; width: 28px; height: 1.5px; margin-bottom: 8px; background: var(--gold); }
.marke-quer { display: flex; align-items: center; gap: 10px; }
.marke-quer .marke-wort { width: 104px; --wm-farbe: var(--schwarz); }
.marke-quer .marke-zusatz { align-self: flex-end; margin: 0 0 6px; padding-left: 10px; border-left: 1.5px solid var(--gold); color: var(--text-2); }
.marke-quer .marke-zusatz::before { display: none; }
.nb-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.seite nav { display: grid; gap: 2px; }
/* Bücherschmiede: eigener Bereich, gleich groß wie die Hauptpunkte, durch Linie abgesetzt (Jan, 29.10.2026) */
.nav-gruppen { display: grid; gap: 14px; }
.nav-schmiede { border-top: 1px solid rgba(229, 223, 210, 0.12); padding-top: 14px; }
.seite nav a {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 6px 12px; border-radius: 8px;
  text-decoration: none; color: var(--auf-dunkel); font-size: 15px;
  position: relative;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.seite nav a span { display: grid; line-height: 1.25; }
.seite nav a small { font-size: 11px; color: var(--auf-dunkel-leise); }
.seite nav a[aria-current="page"] { color: var(--papier); background: rgba(229, 223, 210, 0.1); }
.seite nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--gold);
}
.neben-links { display: grid; gap: 0; padding: 0 0 0 0; border-top: 1px solid rgba(229, 223, 210, 0.12); padding-top: 14px; }
.neben-links a, .neben-links button {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px;
  font: 400 13px/1 var(--sans); color: var(--auf-dunkel-leise); text-decoration: none; background: none; border: 0; cursor: pointer; width: 100%; text-align: left;
}
.neben-links form { margin: 0; }
.seite .fuss { margin-top: auto; padding: 0 12px; font-size: 12px; color: var(--auf-dunkel-leise); display: grid; gap: 4px; }
/* Ausknopf unten links statt im Menü „System“ (Jan, 02.11.2026) */
.seite .abmelden { margin: 0 -12px; }
.seite .abmelden button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 6px 12px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font: 400 14px/1 var(--sans); color: var(--auf-dunkel);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.seite .abmelden .icon { width: 18px; height: 18px; }
.seite .abmelden button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* Ziel geparkt (seitenleiste.js): ohne href fiele der Zeiger sonst auf den Textcursor zurück */
.seite a[data-ziel] { cursor: pointer; }

main { padding: 32px 56px 72px; max-width: 1240px; width: 100%; }

.kopf { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--linie); }
.kopf h1 { font-size: 34px; line-height: 1.1; }
.kopf .datum { color: var(--text-2); margin-top: 6px; }
.version { display: grid; justify-items: end; gap: 8px; }
.umschalter { display: inline-flex; border: 1px solid var(--linie-stark); border-radius: 999px; padding: 3px; background: var(--flaeche); }
.umschalter span, .umschalter a {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; font-size: 13px; text-decoration: none; white-space: nowrap;
}
.umschalter span { background: var(--schwarz); color: var(--papier); font-weight: 500; }
.umschalter a { color: var(--text-2); transition: color .2s var(--ease); }
.tipp { margin: 0; font-size: 12px; color: var(--text-2); max-width: 46ch; text-align: right; }

/* ---------- Raster ---------- */
.raster {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  grid-template-areas: "monat heute" "zutun kaeufe" "zutun buecher";
  grid-template-rows: auto auto 1fr;
  column-gap: 64px;
  row-gap: 48px;
  padding-top: 36px;
}
.monat { grid-area: monat; }
.heute { grid-area: heute; }
.zutun { grid-area: zutun; align-self: start; }
.heute-kaeufe { grid-area: kaeufe; }
.buecher { grid-area: buecher; }
.abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.abschnitt-kopf h2 { font-size: 21px; }
.abschnitt-kopf .neben { font-size: 13px; color: var(--text-2); white-space: nowrap; }

/* Monat */
.monat .bezug { font-size: 14px; color: var(--text-2); }
.monat .gross { font-size: 68px; line-height: 1; font-weight: 500; margin: 10px 0 0; letter-spacing: -0.045em; }
.waage { margin-top: 28px; display: grid; gap: 10px; max-width: 620px; }
.waage-zeile { display: grid; grid-template-columns: 96px minmax(0, 1fr) 112px; align-items: center; gap: 14px; font-size: 14px; }
.waage-zeile .wert { text-align: right; }
.spur { height: 14px; position: relative; display: block; }
.spur i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 2px; transform-origin: left center; }
.spur .ein { width: var(--w); background: var(--waldgruen); }
.spur .aus { width: var(--w); background: var(--salbei); }
.spur .rest { background: transparent; border: 1px dashed var(--tiefgruen); border-radius: 2px; }
.waage-fuss { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 18px; font-size: 14px; color: var(--text-2); }
.waage-fuss b { color: var(--tiefgruen); font-weight: 600; }

/* Heute */
.heute { border-left: 1px solid var(--linie); padding-left: 40px; }
.heute .netto { font-size: 40px; line-height: 1; font-weight: 500; letter-spacing: -0.04em; }
.heute .netto-text { font-size: 14px; color: var(--text-2); margin-top: 8px; }
.kennzahlen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 24px 0 0; border-top: 1px solid var(--linie); }
.kennzahlen div { padding: 14px 0; border-bottom: 1px solid var(--linie); }
.kennzahlen div:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--linie); }
.kennzahlen div:nth-child(even) { padding-left: 20px; }
.kennzahlen dt { font-size: 13px; color: var(--text-2); }
.kennzahlen dd { margin: 2px 0 0; font-size: 22px; font-weight: 500; }
.kennzahlen dd small { display: block; font-family: var(--sans); font-size: 12px; color: var(--text-2); letter-spacing: 0; font-weight: 400; margin-top: 2px; }

/* Zu tun: die einzige erhöhte Fläche, weil hier gehandelt wird */
.zutun {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 14px;
  padding: 26px 28px 8px;
  box-shadow: 0 18px 36px -24px rgba(30, 74, 57, 0.28);
}
.zutun .abschnitt-kopf { margin-bottom: 4px; }
.zutun-hinweis { margin: 0 0 14px; font-size: 13px; color: var(--text-2); }
.aufgaben { list-style: none; margin: 0; padding: 0; }
.aufgabe {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 124px;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--linie);
}
.aufgabe .nr { font-family: var(--mono); font-size: 13px; color: var(--salbei-dunkel); align-self: start; padding-top: 2px; }
.aufgabe h3 { margin: 0; font: 600 16px/1.35 var(--sans); overflow-wrap: anywhere; }
.aufgabe p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); max-width: 58ch; overflow-wrap: anywhere; }
.aufgabe p.wo { margin-top: 2px; font-size: 13px; color: var(--salbei-dunkel); }
/* Die V1-Begründung ist lang: in der Liste drei Zeilen, vollständig im Bestätigen-Dialog. */
.aufgabe p.grund { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.wirkung .zustand { font-size: 14px; font-weight: 600; color: var(--tiefgruen); white-space: nowrap; }
.wirkung { text-align: right; }
.wirkung .num { font-size: 15px; font-weight: 600; color: var(--tiefgruen); white-space: nowrap; }
.wirkung small { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; margin-top: 2px; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; border-radius: 10px;
  font: 500 14px/1 var(--sans); cursor: pointer; white-space: nowrap;
  border: 1px solid var(--tiefgruen);
  transition: transform 120ms var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.knopf:active { transform: translateY(1px) scale(0.98); }
.knopf:disabled { cursor: default; opacity: .55; transform: none; }
.knopf:focus-visible, .seite nav a:focus-visible, .neben-links a:focus-visible, .neben-links button:focus-visible,
.umschalter a:focus-visible, .reiter a:focus-visible, .zur-alten:focus-visible, .summe a:focus-visible { outline: 2px solid var(--tiefgruen); outline-offset: 2px; }
.knopf.voll { background: var(--tiefgruen); color: var(--papier); }
.knopf.rand { background: transparent; color: var(--tiefgruen); }
.aufgabe.erledigt h3 { color: var(--text-2); }
.aufgabe.erledigt .knopf { border-color: var(--linie-stark); color: var(--text-2); background: transparent; }
.summe { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0 14px; border-top: 1px solid var(--linie-stark); font-size: 14px; color: var(--text-2); }
.summe a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tiefgruen); font-weight: 500; text-underline-offset: 3px; white-space: nowrap; }

/* Letzte Käufe */
.tag { position: relative; height: 48px; margin: 4px 0 18px; }
.tag .achse { position: absolute; left: 0; right: 0; top: 20px; height: 1px; background: var(--linie-stark); }
.tag .strich { position: absolute; top: 15px; width: 1px; height: 11px; background: var(--linie-stark); }
.tag .zeit { position: absolute; top: 30px; font: 400 11px/1 var(--mono); color: var(--text-2); transform: translateX(-50%); }
.tag .zeit.links { transform: none; }
.tag .zeit.rechts { transform: translateX(-100%); }
.tag .kauf { position: absolute; top: 14px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: var(--waldgruen); border: 2px solid var(--grund); }
.tag .kauf.neu::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--waldgruen);
  animation: puls 2.8s var(--ease) 3;
}
@keyframes puls { 0% { transform: scale(0.6); opacity: 0.9; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
.kaeufe { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.kaeufe li { display: grid; grid-template-columns: 64px minmax(0, auto) minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--linie); }
.kaeufe .uhr { font-family: var(--mono); font-size: 14px; color: var(--text-2); }
.kaeufe .uhr small { display: block; font-family: var(--sans); font-size: 11px; margin-top: 2px; }
.kaeufe .buch { font-weight: 500; }
.kaeufe .art { font-size: 13px; color: var(--text-2); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bücher */
.balken { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.balken li { display: grid; grid-template-columns: 104px minmax(0, 1fr) 96px; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--linie); }
.balken .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balken .wert { text-align: right; font-size: 14px; white-space: nowrap; }
.balken .spur { height: 12px; }
.balken .spur::before { content: ""; position: absolute; left: var(--null); top: -11px; bottom: -11px; width: 1px; background: var(--linie-stark); }
.balken .spur i.plus { left: var(--null); width: var(--w); background: var(--waldgruen); transform-origin: left center; }
.balken .spur i.minus { left: auto; right: calc(100% - var(--null)); width: var(--w); background: var(--salbei); transform-origin: right center; }
.balken-legende { margin: 12px 0 0; font-size: 13px; color: var(--text-2); }

/* Einmalige Bewegung: Balken wachsen vom Nullpunkt aus, gestaffelt */
.wachsen { animation: wachsen .3s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 40ms + 60ms); }
@keyframes wachsen { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Bestätigen-Dialog ---------- */
.bestaetigen {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--linie-stark); border-radius: 14px;
  background: var(--flaeche); color: var(--text);
  box-shadow: 0 30px 60px -30px rgba(27, 36, 31, 0.5);
}
.bestaetigen::backdrop { background: rgba(27, 36, 31, 0.45); }
.bestaetigen[open] { animation: dlg-auf .28s var(--ease); }
@keyframes dlg-auf { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.dlg-innen { padding: 24px 24px 20px; margin: 0; }
.dlg-innen h2 { font-size: 22px; outline: none; }
.dlg-fakten { margin: 16px 0 0; border-top: 1px solid var(--linie); }
.dlg-fakten div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.dlg-fakten dt { font-size: 13px; color: var(--text-2); }
.dlg-fakten dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.dlg-fakten dd.num { font-size: 16px; }
.dlg-grund { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }
.dlg-hinweis { margin: 12px 0 0; font-size: 13px; color: var(--text-2); }
.dlg-status { margin: 12px 0 0; font-size: 14px; min-height: 0; }
.dlg-status:empty { margin: 0; }   /* leer im Baum lassen, damit VoiceOver die Meldung ansagt */
.dlg-status.ok { color: var(--tiefgruen); font-weight: 500; }
.dlg-status.fehler { color: var(--rot); font-weight: 500; }
.dlg-knoepfe { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.nur-handy, .reiter { display: none; }

@media (prefers-reduced-motion: reduce) {
  .wachsen { animation: none; }
  .tag .kauf.neu::after { animation: none; opacity: 0; }
  .knopf, .seite nav a, .umschalter a { transition: none; }
  .knopf:active { transform: none; }
  .bestaetigen[open] { animation: none; }
}

/* ---------- Handy ---------- */
@media (max-width: 767px) {
  body { font-size: 15px; }
  .app { display: block; background: none; min-height: 0; }
  .seite, .nur-desktop { display: none !important; }
  .nur-handy { display: block; }
  main { padding: 0 16px calc(88px + env(safe-area-inset-bottom)); }
  .demo-band { margin: 12px 0 0; }

  .handy-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: calc(12px + env(safe-area-inset-top)) 0 12px; }
  .handy-kopf .marke { padding: 0; }
  .zur-alten { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--linie-stark); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--text-2); white-space: nowrap; }
  .zur-alten b { color: var(--text); font-weight: 600; margin-right: 6px; }
  .handy-tipp { margin: 0; font-size: 12px; color: var(--text-2); padding: 10px 0 14px; border-bottom: 1px solid var(--linie); }

  .handy-titel { display: flex; align-items: baseline; justify-content: space-between; padding: 20px 0 14px; }
  .handy-titel h1 { font-size: 28px; }
  .handy-titel span { font-size: 13px; color: var(--text-2); }

  .kern { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--linie); }
  .kern > div { padding: 16px 0; border-bottom: 1px solid var(--linie); min-width: 0; }
  .kern .breit { grid-column: 1 / -1; }
  .kern > div:nth-child(2) { padding-right: 14px; border-right: 1px solid var(--linie); }
  .kern > div:nth-child(3) { padding-left: 16px; }
  .kern .bezug { font-size: 13px; color: var(--text-2); }
  .kern .zahl { font-size: 26px; font-weight: 500; line-height: 1.15; margin-top: 4px; }
  .kern .breit .zahl { font-size: 44px; letter-spacing: -0.045em; }
  .kern .klein { font-size: 12px; color: var(--text-2); margin-top: 4px; }

  .raster { display: block; padding-top: 24px; }
  .raster > .heute-kaeufe { margin-top: 32px; }
  .zutun { padding: 20px 16px 4px; border-radius: 12px; }
  .abschnitt-kopf h2 { font-size: 20px; }
  .aufgabe { grid-template-columns: 22px minmax(0, 1fr); gap: 4px 10px; padding: 16px 0; }
  .aufgabe .inhalt { grid-column: 2; }
  .aufgabe .wirkung { grid-column: 2; text-align: left; margin-top: 6px; }
  .aufgabe .knopf { grid-column: 2; width: 100%; margin-top: 8px; }
  .summe { flex-direction: column; align-items: flex-start; gap: 0; }

  .kaeufe li { grid-template-columns: 56px minmax(0, auto) minmax(0, 1fr); min-height: 48px; }

  .bestaetigen { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; border-bottom: 0; }
  .dlg-innen { padding: 22px 16px calc(16px + env(safe-area-inset-bottom)); }
  .dlg-knoepfe { display: grid; grid-template-columns: 1fr 1fr; }
  .dlg-knoepfe #dlg-rueck { grid-column: 1 / -1; }

  .reiter {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
    display: grid; grid-template-columns: repeat(3, 1fr);
    background: var(--schwarz);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .reiter a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 52px; border-radius: 10px; text-decoration: none; font-size: 12px; color: var(--auf-dunkel);
  }
  .reiter a[aria-current="page"] { color: var(--papier); background: rgba(229, 223, 210, 0.1); }
  .reiter a[aria-current="page"] .icon { color: var(--gold); }
}

/* Hover nur mit echter Maus, sonst bleiben Zustände am Handy nach dem Antippen hängen */
@media (hover: hover) and (pointer: fine) {
  .seite nav a:hover, .seite .abmelden button:hover { background: rgba(229, 223, 210, 0.07); color: var(--papier); }
  .neben-links a:hover, .neben-links button:hover { color: var(--papier); background: rgba(229, 223, 210, 0.07); }
  .umschalter a:hover { color: var(--text); }
  .knopf.voll:hover:not(:disabled) { background: var(--tiefgruen-dunkel); }
  .knopf.rand:hover:not(:disabled) { background: rgba(30, 74, 57, 0.08); }
}

/* Große Beträge in Fira Sans statt Mono: das Mono-Komma reißt Zahlen wie „+273,36 €“ sichtbar auseinander */
.monat .gross, .heute .netto, .kern .zahl { font-family: var(--sans); font-variant-numeric: tabular-nums; }

/* Einheitlicher Rückweg bei verknüpften Teamvorgängen. */
.team-rueckweg {margin: 0 0 1rem;}
.team-rueckweg[hidden] {display:none;}

.team-aktion > summary { display: inline-block; cursor: pointer; padding: 10px 14px; border: 1px solid currentColor; border-radius: 8px; font-weight: 600; }
.team-aktion[open] > summary { margin-bottom: 12px; }

/* Five shared areas: desktop sidebar and mobile “Mehr”, 01.11.2026. */
.bereich-navigation { display: grid; gap: 6px; }
.bereich-gruppe > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 10px 12px; border-radius: 8px; font-weight: 500; line-height: 1.35; cursor: pointer; list-style: none; }
.bereich-gruppe > summary::-webkit-details-marker { display: none; }
.bereich-pfeil { flex: 0 0 auto; font-size: 22px; line-height: 1; }
.bereich-gruppe[open] > summary .bereich-pfeil { transform: rotate(90deg); }
.bereich-links { display: grid; gap: 2px; margin: 2px 0 8px 12px; padding-left: 8px; border-left: 1px solid var(--linie); }
.bereich-links form { margin: 0; }
.bereich-links button { min-height: 44px; padding: 8px 12px; width: 100%; border: 0; border-radius: 8px; text-align: left; font: inherit; color: inherit; background: transparent; cursor: pointer; }
.seite .bereich-gruppe > summary { color: var(--auf-dunkel); font-size: 15px; }
.seite .bereich-gruppe > summary.bereich-aktiv { background: rgba(229, 223, 210, 0.07); color: var(--papier); }
.seite .bereich-links { border-left-color: rgba(229, 223, 210, 0.2); }
.seite .bereich-links a, .seite .bereich-links button { font-size: 14px; color: var(--auf-dunkel); }
.seite .bereich-links a[aria-current="page"]::before { left: -9px; }
.bereich-gruppe > summary:focus-visible, .bereich-links button:focus-visible { outline: 2px solid var(--tiefgruen); outline-offset: 2px; }
.seite .bereich-gruppe > summary:focus-visible, .seite .bereich-links button:focus-visible { outline-color: var(--gold); }
.mehr-navigation { max-width: 700px; }
.mehr-navigation .bereich-gruppe { border: 1px solid var(--linie); border-radius: 10px; }
.mehr-navigation .bereich-direkt, .mehr-navigation .bereich-links a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; color: var(--text); text-decoration: none; border-radius: 8px; }
.mehr-navigation .bereich-direkt { border: 1px solid var(--linie); font-weight: 500; }
.mehr-navigation a[aria-current="page"] { background: var(--papier); font-weight: 600; }
.mehr-navigation a:focus-visible { outline: 2px solid var(--tiefgruen); outline-offset: 2px; }
.seitenreiter form { display: flex; margin: 0; flex: 0 0 auto; }
.seitenreiter form button { padding: 10px 14px; min-height: 44px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; }
.seitenreiter form button:focus-visible { outline: 2px solid var(--tiefgruen); outline-offset: -2px; }

/* Browser-local shortcuts, deliberately absent from the mobile bottom bar. */
.navigation-schnell{border-top:1px solid var(--linie);margin-top:1rem;padding-top:1rem}
.navigation-schnell[hidden]{display:none}
.navigation-schnell h2{font-size:.8rem;font-weight:600;margin:0 0 .35rem;padding:0 .75rem;color:var(--text-2)}
.navigation-schnell-aendern{display:block;font-size:.8rem;padding:.6rem .75rem}
.navigation-einstellungen{max-width:850px}
.navigation-einstellungen form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.navigation-einstellungen fieldset{min-width:0;border:1px solid var(--linie);border-radius:12px;padding:.8rem}
.navigation-einstellungen legend{font-weight:650;padding:0 .4rem}
.navigation-auswahl{display:flex;align-items:center;gap:.65rem;min-height:44px;cursor:pointer;overflow-wrap:anywhere}
.navigation-auswahl input{flex:0 0 auto;width:20px;height:20px;accent-color:var(--tiefgruen)}
.navigation-auswahl input:focus-visible{outline:3px solid var(--tiefgruen);outline-offset:3px}
@media(max-width:600px){.navigation-einstellungen form{grid-template-columns:1fr}}
.seite .navigation-schnell { border-top-color: rgba(229, 223, 210, 0.25); }
.seite .navigation-schnell h2 { color: var(--auf-dunkel-leise); }

/* Gemeinsame, ruhige Bedienung der fünf Entwicklungsbereiche. */
.team-kopf { margin-bottom: 16px; }
.team-kopf .sk-unter { max-width: 65ch; }
.team-hauptaktionen { margin-bottom: 18px; }
.team-hilfe > summary, .team-weitere > summary, .team-letzte-antwort summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.team-hilfe > summary::before, .team-weitere > summary::before { content: '▸'; }
.team-hilfe[open] > summary::before, .team-weitere[open] > summary::before { content: '▾'; }
.team-hilfe > summary::-webkit-details-marker, .team-weitere > summary::-webkit-details-marker { display: none; }
.team-weitere { margin-top: 8px; border-top: 1px solid var(--linie); }
.team-letzte-antwort { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--gold); background: var(--flaeche); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.team-letzte-antwort p:last-child { margin-bottom: 0; }
.team-hilfe summary:focus-visible, .team-weitere summary:focus-visible { outline: 2px solid var(--tiefgruen); outline-offset: 2px; }
@media(max-width:600px) { .team-hauptaktionen { display: flex; flex-wrap: wrap; } .team-hauptaktionen .knopf { flex: 1 1 auto; text-align: center; } }
