/* Pflege-Bereich: Fonocare-Look in der Plattform (VERTRAG.md, Abschnitt 10.4).
 *
 * Regel: Jede Regel hier ist an html[data-branche="pflege"] gebunden oder nutzt nur Klassen mit Präfix .pf-.
 * Ohne das Attribut wirkt nichts: SHK und alle anderen Branchen sehen Pixel für Pixel aus wie bisher.
 * Maße in rem (Fonocare-px geteilt durch 16), damit die Schriftgröße 115/130/150 % überall wirkt.
 * Farben wie Fonocare, für AA angepasst (Kompromiss 18.11.2026: so nah an Fonocare wie es mit 4,5:1 geht):
 * Hauptknopf #0d8577 (4,53:1, Hover #0c7f72), gedämpfte Nebentexte #617276 (5,03:1), Menü und Leisten #51666b.
 * Schriftgrößen überall wie Fonocare (Gorans Entscheidung 18.11.2026 „Wie Fonocare“, auch am Handy); nur Eingaben
 * bleiben am Handy 1rem (sonst zoomt iOS). Kleinere Knöpfe und Felder nur am PC mit Maus (Verwaltung ab 900 px).
 */

/* ===================================================================================================
 * 1. Tokens und Abbildung auf die vorhandenen Tokens (damit auch die Verwaltungs- und App-Seiten das Thema tragen)
 * =================================================================================================== */
html[data-branche="pflege"] {
  --pf-akzent: #0f9d8c;
  --pf-akzent-dunkel: #0c7f72;
  --pf-akzent-tief: #0a6f63;
  --pf-akzent-knopf: #0d8577; /* Hauptknopf mit weißer Schrift (4,53:1), näher an Fonocares #0f9d8c */
  --pf-akzent-hell: #e2f3f0;
  --pf-akzent-rand: #cdebe5;
  --pf-akzent-nacht: #2fd4bd;
  --pf-marke: #17559c;
  --pf-marke-dunkel: #124379;
  --pf-text: #101d22;
  --pf-text-2: #33484d;
  --pf-text-leise: #51666b;
  --pf-text-mut: #617276; /* leise Nebentexte (Fonocare #7d9297): 5,03:1 auf Weiß, 4,52:1 auf #eef4f3 */
  --pf-grund: #eef4f3;
  --pf-grund-2: #f6f9f9;
  --pf-flaeche: #ffffff;
  --pf-navy: #0d2331;
  --pf-rand: #e3ebea;
  --pf-rand-eingabe: #cfdedd;
  --pf-ok: #23a05f;
  --pf-ok-dunkel: #1e8551;
  --pf-gelb-punkt: #d99a17;
  --pf-gelb-grund: #fdf9ef;
  --pf-gelb-warte: #fdf6e3;
  --pf-gelb-rand: #f2e3b3;
  --pf-gelb-text: #8a6d1f;
  --pf-rot: #b0452f;
  --pf-rot-grund: #fdeeee;
  --pf-rot-rand: #efc8c0;
  --pf-pille: #eef1f4;
  --pf-schrift: system-ui, -apple-system, "Segoe UI", sans-serif;
  --pf-radius: .75rem;
  --pf-knopf: 2.875rem;
  /* Schriftstufen wie Fonocare, in Verwaltung und App gleich (Eingaben siehe unten) */
  --pf-gr-text: .9375rem;
  --pf-gr-eingabe: 1rem;
  --pf-gr-klein: .84375rem;
  --pf-gr-chip: .78125rem;
  --pf-gr-winzig: .75rem;
  --pf-gr-leiste: .6875rem;

  /* vorhandene Tokens: Orange wird Türkis, Navy wird Fonocare-Blau, Grund und Ränder wie Fonocare */
  --orange: var(--pf-akzent-dunkel);
  --orange-dunkel: var(--pf-akzent-tief);
  --orange-hell: var(--pf-akzent-nacht);
  --orange-rand: var(--pf-akzent-rand);
  --orange-rand-stark: #9fd6cc;
  --orange-flaeche: var(--pf-akzent-hell);
  --orange-flaeche-hell: #eef8f6;
  --orange-flaeche-zart: #f4fbf9;
  --orange-text: var(--pf-akzent-tief);
  --navy: var(--pf-marke);
  --navy-tief: var(--pf-navy);
  --grund: var(--pf-grund);
  --flaeche: var(--pf-flaeche);
  --rand: var(--pf-rand);
  --linie: var(--pf-rand);
  --rand-eingabe: var(--pf-rand-eingabe);
  --text: var(--pf-text);
  --text-2: var(--pf-text-2);
  --text-leise: var(--pf-text-leise);
  --ok-flaeche: var(--pf-akzent-hell);
  --ok-text: var(--pf-akzent-tief);
  --ok-rand: var(--pf-akzent-rand);
  --ok-zart: #f4fbf9;
  --ok-punkt: var(--pf-ok);
  --warn-flaeche: var(--pf-gelb-warte);
  --warn-text: #7a5f1a;
  --warn-punkt: var(--pf-gelb-punkt);
  --gelb-flaeche: var(--pf-gelb-warte);
  --gelb-text: #7a5f1a;
  --gelb-punkt: var(--pf-gelb-punkt);
  --info-flaeche: #eef3f8;
  --info-text: var(--pf-marke);
  --grau-flaeche: var(--pf-pille);
  --grau-text: var(--pf-text-leise);
  --grau-punkt: #8a9a9e;
  --rot-flaeche: var(--pf-rot-grund);
  --rot-text: var(--pf-rot);
  --rot-punkt: var(--pf-rot);
  --rot-rand: var(--pf-rot-rand);
  --gefahr: var(--pf-rot);
  --gefahr-dunkel: #8e3624;
  --fokus: var(--pf-akzent-dunkel);
  --schrift: var(--pf-schrift);
  --radius-m: .75rem;
  --radius-l: .75rem;
  --radius-xl: .75rem;
  --knopf-hoehe: 2.875rem;
  --schatten-papier: 0 .875rem 2.5rem rgba(13, 35, 49, .06);
  --schatten-hoch: 0 1.125rem 2.75rem rgba(13, 35, 49, .16);
}
/* Handy-App (html.handy): Fonocare-Größen wie in der Verwaltung (Gorans Entscheidung 18.11.2026 „Wie Fonocare“, die
 * 16-px-Messregel gilt für die Pflege nicht mehr). Eingaben bleiben dort 1rem (--pf-gr-eingabe), sonst zoomt iOS.
 * Verwaltung am PC mit Maus: Eingaben 14,5 px wie Fonocare. */
@media (min-width: 56.25em) and (pointer: fine) {
  html[data-branche="pflege"]:not(.handy) { --pf-gr-eingabe: .90625rem; }
}
html[data-branche="pflege"] body { background: var(--pf-grund); color: var(--pf-text); font-family: var(--pf-schrift); }
html[data-branche="pflege"] ::selection { background: var(--pf-akzent-rand); }
:where(html[data-branche="pflege"]) a { color: var(--pf-akzent-dunkel); }
@media (hover: hover) { :where(html[data-branche="pflege"]) a:hover { color: var(--pf-akzent-tief); } }
html[data-branche="pflege"] .dialog::backdrop { background: rgba(13, 35, 49, .45); }
html[data-branche="pflege"] .knopf--primaer { font-weight: 700; }
html[data-branche="pflege"] .eingabe { border-width: 1.5px; }
html[data-branche="pflege"] .eingabe:focus-visible { outline: 2px solid var(--pf-akzent); outline-offset: 1px; border-color: var(--pf-akzent); }
html[data-branche="pflege"] .titel-1 { letter-spacing: -.02em; }
html[data-branche="pflege"] .pf-main .titel-1 { font-size: 1.5rem; }
html[data-branche="pflege"] .zahl-punkt { background: var(--pf-rot); }
html[data-branche="pflege"] .laden::before { border-top-color: var(--pf-akzent); }

/* ===================================================================================================
 * 2. Hülle: Seitenleiste (ab 900 px), obere Leiste und untere Leiste (unter 900 px)
 * =================================================================================================== */
.pf-huelle { display: flex; min-height: 100vh; min-height: 100dvh; width: 100%; }
.pf-seite {
  flex: 0 0 15rem; width: 15rem; display: flex; flex-direction: column; gap: .25rem; padding: 1.5rem 1rem 1.25rem;
  background: var(--pf-flaeche); border-right: 1px solid var(--pf-rand); position: sticky; top: 0;
  height: 100vh; height: 100dvh; overflow-y: auto; font-family: var(--pf-schrift);
}
.pf-seite-kopf { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .25rem .5rem 1.125rem .75rem; }
.pf-markenzeile { display: flex; align-items: center; gap: .5625rem; min-width: 0; }
.pf-icon { width: 1.75rem; height: 1.75rem; flex: 0 0 auto; display: block; }
.pf-marke { font-family: var(--pf-schrift); font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.pf-marke--gross { font-size: 1.5rem; }
.pf-marke-fono { color: var(--pf-marke); }
.pf-marke-care { color: var(--pf-akzent); }
.pf-seite .pf-seite-zu { display: none; }
.pf-firma { display: flex; flex-direction: column; gap: .5rem; padding: 0 .75rem .875rem; }
.pf-firma-name { margin: 0; font-size: var(--pf-gr-klein); font-weight: 700; color: var(--pf-text-2); overflow-wrap: anywhere; }
.pf-firma .verbund-platz { padding: 0; margin: 0; }
.pf-firma .verbund-jetzt { color: var(--pf-text-leise); }
.pf-firma .verbund-jetzt-firma { display: none; }
.pf-firma .verbund-schalter { min-height: 2.75rem; }
.pf-nav { display: flex; flex-direction: column; gap: .25rem; }
.pf-nitem {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .75rem; min-height: 2.75rem;
  padding: .375rem .75rem; border-radius: var(--pf-radius); font-family: var(--pf-schrift); font-size: .9375rem;
  font-weight: 600; line-height: 1.25; color: var(--pf-text-leise); cursor: pointer; overflow-wrap: anywhere;
}
@media (hover: hover) { .pf-nitem:hover { background: var(--pf-grund-2); color: var(--pf-text-2); } }
.pf-nitem[aria-current="page"] { background: var(--pf-akzent-hell); color: var(--pf-akzent-tief); font-weight: 700; }
.pf-nitem:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; }
.pf-nitem-text { flex: 1 1 auto; min-width: 0; }
.pf-nitem .zahl-punkt { flex: 0 0 auto; }
.pf-symbol { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.pf-nav-titel {
  margin: 1.125rem 0 0; padding: 0 .75rem .25rem; font-size: var(--pf-gr-winzig); font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--pf-text-leise);
}
.pf-nav--klein .pf-nitem { font-size: var(--pf-gr-klein); min-height: 2.75rem; }
.pf-nutzer { margin-top: auto; display: flex; align-items: center; gap: .625rem; padding: 1rem .75rem 0; }
/* Avatar, Name und „Abmelden“ bleiben unten sichtbar, auch wenn die Seitenleiste scrollt (wie Fonocare). Der Block
 * reicht über den unteren Innenabstand der Leiste (1.25rem) bis an den Rand, damit nichts darunter durchscheint. Der
 * Scroll-Abstand unten hält Menüpunkte mit Fokus oder nach scrollIntoView über diesem Block: die Hülle misst seine
 * Höhe als --pf-fuss-hoehe (ein langer Name macht die Zeile hoch, Nachprüfung 19.11.2026, VERTRAG.md 16.14 H5).
 * Fuß der Leiste (.pf-seite-fuss: Kasten „Testzugang“ und Nutzerzeile): im Menü am Handy ohne eigenen Kasten
 * (display: contents), dort klebt nur die Nutzerzeile; am PC klebt der ganze Fuß (16.14 F1, siehe unten). */
.pf-seite { scroll-padding-bottom: calc(var(--pf-fuss-hoehe, 8rem) + .5rem); }
.pf-seite-fuss { display: contents; }
.pf-seite > .pf-seite-fuss > .pf-nutzer { position: sticky; bottom: -1.25rem; z-index: 1; background: var(--pf-flaeche);
  padding-bottom: 1.25rem; margin-bottom: -1.25rem; }
/* Kante oben: passt das Menü nicht ganz in die Höhe (Verwaltung mit vielen Punkten bei 900 px), liest sich der
 * Schnitt als Ende der Leiste und nicht als abgeschnittener Text (Nachprüfung 18.11.2026). */
.pf-seite > .pf-seite-fuss > .pf-nutzer { border-top: 1px solid var(--pf-rand); box-shadow: 0 -.5rem .75rem -.75rem rgba(13, 35, 49, .12); }
/* PC: Kasten und Nutzerzeile kleben zusammen unten (Fonocares .trial steht immer über der Nutzerzeile im Bild). Ohne
 * Testzugang sieht der Fuß aus wie bisher die Nutzerzeile allein (Kante, 1rem Abstand, Zeile, 1.25rem unten). */
@media (min-width: 56.25em) {
  .pf-seite > .pf-seite-fuss {
    display: flex; flex-direction: column; margin-top: auto; padding: 1rem 0 1.25rem; margin-bottom: -1.25rem;
    position: sticky; bottom: -1.25rem; z-index: 1; background: var(--pf-flaeche);
    border-top: 1px solid var(--pf-rand); box-shadow: 0 -.5rem .75rem -.75rem rgba(13, 35, 49, .12);
  }
  .pf-seite > .pf-seite-fuss > .pf-nutzer {
    position: static; margin: 0; padding: 0 .75rem; border-top: 0; box-shadow: none; background: none;
  }
  .pf-seite-fuss > .pf-test { margin-top: 0; }
}
.pf-avatar {
  display: flex; align-items: center; justify-content: center; width: 2.125rem; height: 2.125rem; flex: 0 0 auto;
  border-radius: 999px; background: var(--pf-marke); color: #fff; font-size: .8125rem; font-weight: 700;
}
.pf-nutzer-text { min-width: 0; display: flex; flex-direction: column; }
.pf-nutzer-name { margin: 0; font-size: var(--pf-gr-klein); font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.pf-nutzer-rolle { margin: 0; font-size: var(--pf-gr-winzig); color: var(--pf-text-leise); }
.pf-nutzer-knoepfe { display: flex; flex-wrap: wrap; gap: 0 .875rem; }
.pf-textknopf {
  all: unset; box-sizing: border-box; cursor: pointer; min-height: 2.75rem; min-width: 2.75rem; display: inline-flex;
  align-items: center; justify-content: center;
  font-family: var(--pf-schrift); font-size: var(--pf-gr-klein); font-weight: 600; color: var(--pf-text-leise);
  text-decoration: underline; text-underline-offset: 3px;
}
@media (hover: hover) { .pf-textknopf:hover { color: var(--pf-text); } }
.pf-textknopf:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; border-radius: .25rem; }

.pf-haupt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pf-main {
  flex: 1 1 auto; width: 100%; min-width: 0; padding: 1.75rem 2.25rem calc(3rem + var(--meldungen-hoehe, 0px));
  display: flex; flex-direction: column; gap: 1.125rem; font-family: var(--pf-schrift);
}
.pf-main--schmal > .inhalt-seite { width: 100%; max-width: 40rem; margin: 0 auto; }
.pf-topbar, .pf-bottomnav { display: none; }

.pf-topbar {
  align-items: center; flex-wrap: wrap; gap: .375rem .625rem; min-height: 3.375rem; padding: .25rem .875rem;
  background: var(--pf-flaeche); border-bottom: 1px solid var(--pf-rand); position: sticky; top: 0; z-index: 30;
}
.pf-topbar .pf-icon { width: 1.5rem; height: 1.5rem; }
/* Wortmarke oben am Handy 17 px wie Fonocare; „care“ dort im Knopf-Türkis, weil 17 px fett für AA 4,5:1 braucht */
.pf-topbar .pf-marke { font-size: 1.0625rem; }
.pf-topbar .pf-marke-care { color: var(--pf-akzent-knopf); }
.pf-topbar-luecke { flex: 1 1 0; min-width: 0; }
.pf-topbar-knoepfe { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .375rem; min-width: 0; }
.pf-topbar-knopf {
  all: unset; box-sizing: border-box; cursor: pointer; min-height: 2.75rem; min-width: 2.75rem; padding: .375rem .5rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .375rem; border-radius: var(--pf-radius);
  font-family: var(--pf-schrift); font-size: .8125rem; font-weight: 700; color: var(--pf-text-leise);
}
@media (hover: hover) { .pf-topbar-knopf:hover { background: var(--pf-grund-2); color: var(--pf-text); } }
.pf-topbar-knopf:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 1px; }
.pf-topbar-knopf .symbol { width: 1.375rem; height: 1.375rem; }
.pf-topbar .glocke-platz .knopf--symbol { min-height: 2.75rem; }
.pf-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--pf-flaeche);
  border-top: 1px solid var(--pf-rand); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pf-bknopf {
  all: unset; box-sizing: border-box; flex: 1 1 0; min-width: 0; min-height: 3.875rem; padding: .375rem .125rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1875rem; cursor: pointer;
  font-family: var(--pf-schrift); font-size: var(--pf-gr-leiste); font-weight: 700; line-height: 1.15; text-align: center;
  color: var(--pf-text-leise); overflow-wrap: break-word; hyphens: manual;
}
.pf-bknopf[aria-current="page"] { color: var(--pf-akzent-dunkel); }
.pf-bknopf:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: -3px; }
.pf-bknopf .pf-symbol { width: 1.375rem; height: 1.375rem; }
.pf-bknopf-text { max-width: 100%; }
/* Sehr große Schrift am schmalen Handy: Symbole der unteren Leiste weglassen (die Wörter bleiben), obere Leiste scrollt mit */
.pf-bottomnav { container-type: inline-size; container-name: pfleiste; }
@container pfleiste (max-width: 16rem) {
  .pf-bknopf .pf-symbol { display: none; }
}
.pf-topbar.pf-topbar--hoch { position: static; }
/* Obere Leiste einzeilig wie Fonocare (54 px), auch bei großer Schrift: wird sie schmal, zeigen Abmelden und Leitung
 * nur ihr Symbol (Name über aria-label), dann fällt die Wortmarke weg, zuletzt das Icon. --voll: Leitung oder Zurück
 * sind zu sehen, --beide: Leitung und Zurück (mehr Knöpfe). Breiten in rem, damit die Schriftgröße mitzählt. */
.pf-topbar { container-type: inline-size; container-name: pftop; }
.pf-tb-wechsel > .symbol, .pf-tb-wechsel > .pf-symbol { display: none; width: 1.375rem; height: 1.375rem; }
@container pftop (max-width: 22rem) {
  .pf-tb-wechsel > .symbol, .pf-tb-wechsel > .pf-symbol { display: block; }
  .pf-tb-wechsel > .pf-tb-text { display: none; } /* der Name bleibt über aria-label */
}
@container pftop (max-width: 28rem) {
  .pf-topbar--voll .pf-tb-wechsel > .symbol, .pf-topbar--voll .pf-tb-wechsel > .pf-symbol { display: block; }
  .pf-topbar--voll .pf-tb-wechsel > .pf-tb-text { display: none; }
}
.pf-tb-wechsel { position: relative; }
.pf-topbar-knoepfe > .kopf-platz:empty { display: none; }
@container pftop (max-width: 28rem) {
  .pf-topbar--voll .pf-tb-wechsel > .zahl-punkt { position: absolute; top: .125rem; right: .125rem; }
}
@container pftop (max-width: 17rem) { .pf-markenzeile > .pf-marke { display: none; } .pf-topbar-knoepfe { gap: .125rem; } }
/* Testzugang: passt die Pille nur ohne die Wortmarke in die Zeile, fällt sie weg (die Hülle misst, 16.14 H1) */
.pf-topbar--ohne-wort .pf-markenzeile > .pf-marke { display: none; }
@container pftop (max-width: 20.5rem) { .pf-topbar--voll .pf-markenzeile > .pf-marke { display: none; } }
@container pftop (max-width: 25.5rem) { .pf-topbar--beide .pf-markenzeile > .pf-marke { display: none; } }
@container pftop (max-width: 19rem) { .pf-topbar--beide .pf-markenzeile { display: none; } }

@media (max-width: 56.2475em) {
  .pf-seite { display: none; }
  .pf-topbar { display: flex; }
  .pf-bottomnav { display: flex; }
  .pf-main { padding: 1.375rem .875rem calc(var(--leiste-hoehe, 4rem) + var(--meldungen-hoehe, 0px) + 1.5rem); }
  html[data-branche="pflege"] .pf-main .titel-1 { font-size: 1.25rem; }
  /* Verwaltung am schmalen Schirm: der Menü-Knopf öffnet die ganze Seitenleiste über dem Inhalt */
  .menue-offen .pf-seite {
    display: flex; position: fixed; inset: 0 0 var(--leiste-hoehe, 0px) 0; width: auto; height: auto; z-index: 60;
    border-right: 0; box-shadow: var(--schatten-hoch);
  }
  .menue-offen .pf-seite .pf-seite-zu { display: inline-flex; }
}
/* Seiten ohne Leisten (Kundenmodus, Anmelden): nur der Inhalt */
.pf-huelle--ohne .pf-seite, .pf-huelle--ohne .pf-topbar, .pf-huelle--ohne .pf-bottomnav { display: none !important; }
.pf-huelle--ohne .pf-main { padding-bottom: calc(var(--meldungen-hoehe, 0px) + 2rem); }

@media print {
  .pf-seite, .pf-topbar, .pf-bottomnav { display: none !important; }
  .pf-main { padding: 0; }
}

/* ===================================================================================================
 * 3. Bausteine der Ansichten (wie Fonocare: Karte, Knopf, Pille, Zeile, Eingaben)
 * =================================================================================================== */
/* Zeilenhöhe „normal“ wie Fonocare (stil.css vererbt sonst 1.5); ausdrücklich gesetzte Werte bleiben */
.pf-ansicht { display: flex; flex-direction: column; gap: 1.125rem; min-width: 0; color: var(--pf-text); line-height: normal; }
.pf-kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; min-width: 0; }
.pf-kopfzeile > * { min-width: 0; }
.pf-h1 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.pf-luecke { flex: 1 1 0; min-width: 0; }
/* Kopf von Patienten und Tour: Suche bzw. Datum stehen am PC direkt hinter dem Zähler (Fonocare-.spacer ist 0 breit) */
.pf-luecke--null { flex: 0 0 0; }
.pf-mut { color: var(--pf-text-mut); font-size: var(--pf-gr-klein); }
.pf-frage--rot .pf-mut { color: var(--pf-text-leise); } /* auf Rot-Grund reicht #617276 nicht (4,46:1) */
.pf-mut.pf-winzig { font-size: var(--pf-gr-winzig); }
.pf-fett { font-weight: 800; }
.pf-karte {
  background: var(--pf-flaeche); border: 1px solid var(--pf-rand); border-radius: var(--pf-radius); padding: 1.5rem;
  min-width: 0;
}
.pf-karte-titel { margin: 0; font-size: 1rem; font-weight: 800; }
.pf-stapel { display: flex; flex-direction: column; gap: .875rem; min-width: 0; }
.pf-stapel-eng { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.pf-reihe { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem 1rem; min-width: 0; }
/* Leere Reihe direkt in der Ansicht (Verlauf ohne Patientenfilter, ohne „Weitere zeigen“): kein zweiter Abstand,
 * die Liste beginnt wie in Fonocare 18 px unter dem Kopf (Nachprüfung 18.11.2026) */
.pf-ansicht > .pf-reihe:empty { display: none; }

.pf-btn {
  all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--pf-knopf); padding: .375rem 1.25rem; border-radius: var(--pf-radius); cursor: pointer;
  background: var(--pf-akzent-knopf); color: #fff; font-family: var(--pf-schrift); font-size: .9375rem; font-weight: 700;
  line-height: 1.25; text-align: center; max-width: 100%; overflow-wrap: anywhere; text-decoration: none;
}
.pf-btn:focus-visible { outline: 3px solid var(--pf-marke); outline-offset: 2px; }
.pf-btn[disabled], .pf-btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.pf-btn--blau { background: var(--pf-marke); }
.pf-btn--ghost { background: var(--pf-flaeche); border: 1.5px solid var(--pf-rand-eingabe); color: var(--pf-text-2); }
.pf-btn--klein { min-height: 2.75rem; padding: .25rem .875rem; font-size: var(--pf-gr-klein); }
.pf-btn--rot { background: var(--pf-flaeche); border: 1.5px solid var(--pf-rot-rand); color: var(--pf-rot); }
/* Hover nur mit Maus: nach dem Antippen bleibt am Handy kein Hover-Rest stehen */
@media (hover: hover) {
  .pf-btn:hover { background: var(--pf-akzent-dunkel); color: #fff; }
  .pf-btn--blau:hover { background: var(--pf-marke-dunkel); }
  .pf-btn--ghost:hover { background: var(--pf-grund-2); color: var(--pf-text); border-color: var(--pf-akzent); }
  .pf-btn--rot:hover { background: var(--pf-rot-grund); color: var(--pf-rot); }
}
.pf-pille {
  display: inline-flex; align-items: center; padding: .25rem .75rem; border-radius: 999px; font-size: .8125rem;
  font-weight: 700; line-height: normal; background: var(--pf-pille); color: var(--pf-text-leise); white-space: nowrap;
}
.pf-pille--g { background: var(--pf-akzent-hell); color: var(--pf-akzent-tief); }
.pf-pille--r { background: var(--pf-rot-grund); color: var(--pf-rot); }
.pf-pille--y { background: var(--pf-gelb-warte); color: var(--pf-gelb-text); }
.pf-pille--b { background: #eef3f8; color: var(--pf-marke); }

.pf-eingabe {
  box-sizing: border-box; min-height: var(--pf-knopf); padding: .375rem .875rem; border: 1.5px solid var(--pf-rand-eingabe);
  border-radius: var(--pf-radius); background: var(--pf-flaeche); color: var(--pf-text); font-family: var(--pf-schrift);
  font-size: var(--pf-gr-eingabe); line-height: 1.4; min-width: 0; max-width: 100%;
}
select.pf-eingabe { padding-right: 2rem; text-overflow: ellipsis; }
textarea.pf-eingabe { min-height: 6.875rem; width: 100%; padding: .75rem .875rem; line-height: 1.55; resize: vertical; }
.pf-eingabe::placeholder { color: #6b7c80; }
.pf-eingabe:focus-visible { outline: 2px solid var(--pf-akzent); outline-offset: 1px; border-color: var(--pf-akzent); }
.pf-eingabe[aria-invalid="true"] { border-color: var(--pf-rot); background: #fffafa; }
.pf-suche { flex: 0 1 18.75rem; width: 18.75rem; text-overflow: ellipsis; }
.pf-suche--verlauf { flex-basis: 20rem; width: 20rem; }

/* Avatar mit Initialen (Patient) */
.pf-pava {
  display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; flex: 0 0 auto;
  border-radius: 999px; background: var(--pf-akzent-hell); color: var(--pf-akzent-tief); font-size: .875rem; font-weight: 700;
}

/* Liste mit Zeilen (Patienten, Tour, Verlauf) */
.pf-liste { display: flex; flex-direction: column; gap: .625rem; margin: 0; padding: 0; list-style: none; min-width: 0; }
.pf-prow {
  display: flex; align-items: center; gap: .875rem; padding: .875rem 1.25rem; background: var(--pf-flaeche);
  border: 1px solid var(--pf-rand); border-radius: var(--pf-radius); min-width: 0;
}
.pf-prow--klick { cursor: pointer; }
.pf-pname { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0; }
a.pf-pname-link { min-height: 2.75rem; justify-content: center; text-decoration: none; color: var(--pf-text); border-radius: .5rem; }
a.pf-pname-link:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; }
/* Hover nur mit Maus: nach dem Antippen bleibt am Handy kein türkiser Rand und keine Unterstreichung stehen */
@media (hover: hover) {
  .pf-prow--klick:hover { border-color: var(--pf-akzent); }
  a.pf-pname-link:hover .pf-pn, a.pf-pn:hover { color: var(--pf-akzent-tief); text-decoration: underline; }
}
.pf-druck-spaeter { flex: 0 1 10rem; }
.pf-pn { font-weight: 700; font-size: .96875rem; color: var(--pf-text); overflow-wrap: anywhere; text-decoration: none; }
a.pf-pn { color: var(--pf-text); }
a.pf-pn:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; border-radius: .25rem; }
.pf-ppg { flex: 0 0 6.875rem; display: flex; align-items: center; gap: .375rem; }
.pf-col { flex: 0 0 11.25rem; font-size: .875rem; color: var(--pf-text-2); overflow-wrap: anywhere; min-width: 0; }
.pf-col--schmal { flex-basis: 10.625rem; }
/* Verlauf am PC wie Fonocare: Datum 200 px, Ersteller 90 px (zweizeilig, 13 px), Name 16 px */
.pf-col--datum { flex-basis: 12.5rem; }
.pf-col--nutzer { flex-basis: 5.625rem; font-size: .8125rem; color: var(--pf-text-mut); }
.pf-prow--verlauf .pf-pn { font-size: 1rem; }
.pf-nurmobil { display: none; font-size: .8125rem; }
.pf-prow--verlauf .pf-nurmobil { font-size: var(--pf-gr-chip); }
.pf-nurschmal { display: none; }
.pf-leer {
  background: var(--pf-flaeche); border: 1px solid var(--pf-rand); border-radius: var(--pf-radius); padding: 1.5rem;
  color: var(--pf-text-leise); font-size: var(--pf-gr-klein); line-height: 1.5;
}

/* Filter-Chip (Verlauf "Patient: Name" mit "Alle zeigen") */
.pf-filter { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem .625rem; padding: .25rem .375rem .25rem .875rem;
  border-radius: 999px; background: var(--pf-akzent-hell); color: var(--pf-akzent-tief); font-size: var(--pf-gr-klein); font-weight: 700; }
.pf-filter .pf-textknopf { color: var(--pf-akzent-tief); }

/* ===================================================================================================
 * 4. Neue Eingabe
 * =================================================================================================== */
.pf-eingabe-raster { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: stretch; min-width: 0; }
.pf-sprechen { flex: 0 0 23.75rem; display: flex; flex-direction: column; gap: .875rem; min-width: 0; }
/* „Formular ausfüllen“ unten in der Karte: ist die rechte Karte länger, rutscht er wie in Fonocare ans Kartenende */
.pf-sprechen > .pf-btn--blau { margin-top: auto; }
.pf-formular { flex: 1 1 26.25rem; display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.pf-wahl { flex: 0 1 18.75rem; width: 18.75rem; }
/* Auswahl Patient und Formular der Neuen Eingabe so breit wie ihr Inhalt, mindestens wie Fonocare (260 bzw. 240 px) */
.pf-wahl--patient, .pf-wahl--formular { flex: 0 1 auto; width: auto; }
@media (min-width: 56.25em) {
  .pf-wahl--patient { min-width: min(16.25rem, 100%); }
  .pf-wahl--formular { min-width: min(15rem, 100%); }
}
/* Pflegegrad unter der Patientenauswahl, nur wenn dort aus Platzgründen nur der Name steht (Handy, große Schrift) */
.pf-kopfzeile > .pf-wahl-pg { flex: 1 1 100%; margin: -.25rem 0 0; padding-left: .875rem; }
.pf-mic-bereich { display: flex; flex-direction: column; align-items: center; gap: .625rem; padding: .75rem 0 .25rem; text-align: center; }
.pf-mic {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: center;
  width: 5.75rem; height: 5.75rem; border-radius: 999px; background: var(--pf-akzent); color: #fff;
  box-shadow: 0 .75rem 1.75rem rgba(15, 157, 140, .3);
}
.pf-mic .pf-symbol { width: 2.25rem; height: 2.25rem; }
.pf-mic--rec { background: var(--pf-rot); box-shadow: 0 .75rem 1.75rem rgba(176, 69, 47, .35); }
.pf-mic:focus-visible { outline: 3px solid var(--pf-marke); outline-offset: 4px; }
.pf-mic[disabled] { opacity: .55; cursor: default; }
.pf-mic-txt { font-size: .875rem; font-weight: 700; color: var(--pf-text-2); }
.pf-rec-info { min-height: 1.125rem; font-size: var(--pf-gr-klein); color: var(--pf-text-leise); text-align: center; overflow-wrap: anywhere; }
.pf-wartebox {
  display: flex; flex-wrap: wrap; align-items: center; gap: .625rem; padding: .625rem .75rem; background: var(--pf-gelb-warte);
  border: 1px solid var(--pf-gelb-rand); border-radius: var(--pf-radius); font-size: var(--pf-gr-klein); color: var(--pf-gelb-text);
}
.pf-wartebox .pf-symbol { color: var(--pf-gelb-text); }
.pf-wartebox-text { flex: 1 1 8rem; min-width: 0; }
.pf-chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.pf-chip {
  display: inline-flex; align-items: center; padding: .3125rem .6875rem; border-radius: 999px; font-size: var(--pf-gr-chip);
  font-weight: 600; line-height: normal; background: var(--pf-grund-2); color: var(--pf-text-leise); border: 1px solid var(--pf-rand);
}
.pf-chip--req { background: var(--pf-akzent-hell); color: var(--pf-akzent-tief); border-color: var(--pf-akzent-rand); font-weight: 700; }
.pf-chip--done { background: var(--pf-ok-dunkel); color: #fff; border-color: var(--pf-ok-dunkel); }
.pf-chip--warn { background: var(--pf-gelb-grund); color: var(--pf-gelb-text); border-color: var(--pf-gelb-rand); }
.pf-beispiel { line-height: 1.5; }
.pf-beispiel-satz { font-style: italic; }
.pf-legende { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.pf-legende-eintrag { display: inline-flex; align-items: center; gap: .3125rem; }
.pf-dot { width: .5rem; height: .5rem; border-radius: 999px; flex: 0 0 auto; display: inline-block; background: var(--pf-rand-eingabe); }
.pf-dot--g { background: var(--pf-ok); }
.pf-dot--y { background: var(--pf-gelb-punkt); }
.pf-mismatch { padding: .875rem 1rem; background: var(--pf-rot-grund); border: 1.5px solid var(--pf-rot-rand); border-radius: var(--pf-radius);
  display: flex; gap: .625rem; align-items: flex-start; color: var(--pf-rot); }
.pf-mismatch .pf-symbol { color: var(--pf-rot); margin-top: .0625rem; }
.pf-mismatch-titel { margin: 0; font-size: .875rem; font-weight: 800; }
.pf-mismatch-text { margin: .125rem 0 0; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.pf-mismatch-hinweis { margin: .375rem 0 0; font-size: var(--pf-gr-klein); color: var(--pf-text-leise); }
.pf-restbox { padding: .875rem 1rem; background: var(--pf-gelb-grund); border: 1px solid var(--pf-gelb-rand); border-radius: var(--pf-radius); color: var(--pf-gelb-text); }
.pf-restbox-titel { margin: 0 0 .25rem; font-size: .8125rem; font-weight: 700; }
.pf-restbox-text { margin: 0; font-size: .875rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.pf-restbox-hinweis { margin: .375rem 0 0; font-size: var(--pf-gr-klein); color: var(--pf-text-leise); }
.pf-speichern-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem 1rem; padding-top: .375rem; }

/* Feldzeilen (Ampel-Punkt, Etikett, Wert oder Eingabe, Notiz) */
.pf-rows { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.pf-frow {
  display: flex; align-items: center; gap: .875rem; padding: .625rem 1rem; background: var(--pf-grund-2);
  border: 1px solid var(--pf-rand); border-radius: var(--pf-radius); min-width: 0;
}
.pf-frow--warn { background: var(--pf-gelb-grund); border-color: var(--pf-gelb-rand); }
.pf-frow--vorschau { color: var(--pf-text-leise); }
.pf-lab { flex: 0 0 11.875rem; font-size: var(--pf-gr-klein); font-weight: 700; color: var(--pf-text-leise); overflow-wrap: anywhere; min-width: 0; }
.pf-wert { flex: 1 1 8rem; min-width: 0; font-size: .9375rem; overflow-wrap: anywhere; }
.pf-frow .pf-wert--feld { font-size: .90625rem; }
.pf-hint-text { flex: 1 1 8rem; min-width: 0; font-size: var(--pf-gr-klein); color: var(--pf-text-leise); }
/* leere Vorschauzeile: Hinweis blass wie Fonocare, aber AA (4,54:1 auf #f6f9f9) */
.pf-frow--vorschau .pf-hint-text { color: #64757a; }
/* Notiz („aus der Akte“, „heute“) immer ocker wie Fonocare (#8a6d1f: 4,63:1 auf #f6f9f9) */
.pf-note { flex: 0 0 auto; max-width: 13.75rem; font-size: var(--pf-gr-winzig); color: var(--pf-gelb-text); min-width: 0; overflow-wrap: anywhere; }
.pf-feld {
  flex: 1 1 8rem; min-width: 0; border: 0; border-radius: 0; background: transparent; color: var(--pf-text);
  font-family: var(--pf-schrift); font-size: var(--pf-gr-eingabe); line-height: 1.4; padding: .5rem 0; min-height: 2.75rem;
  box-shadow: 0 1px 0 transparent;
}
textarea.pf-feld { resize: none; overflow: hidden; display: block; }
@media (hover: hover) {
  .pf-feld:hover { box-shadow: 0 1px 0 var(--pf-rand-eingabe); }
}
.pf-feld:focus-visible { outline: 0; box-shadow: 0 2px 0 var(--pf-akzent); }
select.pf-feld { background: var(--pf-flaeche); border: 1.5px solid var(--pf-rand-eingabe); border-radius: .5rem; padding: .25rem .5rem; min-height: 2.75rem; }
select.pf-feld:focus-visible { outline: 2px solid var(--pf-akzent); outline-offset: 1px; box-shadow: none; }
input[type="date"].pf-feld, input[type="time"].pf-feld { min-height: 2.75rem; }
.pf-feld[readonly] { cursor: default; }
.pf-feld[readonly]:hover, .pf-feld[readonly]:focus-visible { box-shadow: none; }
.pf-mehrfach { flex: 1 1 8rem; min-width: 0; display: flex; flex-wrap: wrap; gap: .125rem .875rem; border: 0; margin: 0; padding: 0; }
.pf-mehrfach legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pf-hak { display: inline-flex; align-items: center; gap: .4375rem; min-height: 2.75rem; font-size: var(--pf-gr-klein); cursor: pointer; }
.pf-hak input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--pf-akzent-dunkel); flex: 0 0 auto; }
.pf-zwei { flex: 1 1 8rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; min-width: 0; }
/* Am PC mit Maus jede Feldzeile wie Fonocare ein einzeiliges Feld (34 px, Zeile 56 px); am Handy bleiben 44 px */
@media (min-width: 56.25em) and (pointer: fine) {
  html[data-branche="pflege"]:not(.handy) .pf-frow .pf-feld { min-height: 2.125rem; padding-top: .4375rem; padding-bottom: .4375rem; }
  html[data-branche="pflege"]:not(.handy) .pf-frow select.pf-feld { padding-top: .125rem; padding-bottom: .125rem; }
  html[data-branche="pflege"]:not(.handy) .pf-frow input:is([type="date"], [type="time"]).pf-feld { padding-top: .3125rem; padding-bottom: .3125rem; }
  html[data-branche="pflege"]:not(.handy) .pf-frow .pf-wert--feld { min-height: 2.125rem; display: flex; align-items: center; }
  html[data-branche="pflege"]:not(.handy) .pf-mehrfach .pf-hak { min-height: 2.125rem; }
}

/* ===================================================================================================
 * 5. Tour
 * =================================================================================================== */
.pf-prow--erledigt { background: var(--pf-grund-2); }
.pf-prow--erledigt .pf-pn { text-decoration: line-through; }
/* Kreis bleibt türkis, nur blasser (Fonocare: ganze Zeile .62); die Initialen behalten 4,64:1, die Schrift bleibt kräftig */
.pf-prow--erledigt > .pf-pava { background: #eaf5f3; color: #1c7a6f; }
.pf-tzeit { width: 7.5rem; min-height: 2.75rem; padding: .25rem .625rem; border: 1.5px solid var(--pf-rand-eingabe);
  border-radius: .625rem; font-family: var(--pf-schrift); font-size: var(--pf-gr-eingabe); background: var(--pf-flaeche); color: var(--pf-text); }
.pf-tzeit:focus-visible { outline: 2px solid var(--pf-akzent); outline-offset: 1px; }
.pf-editor-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .875rem; padding: .375rem 1rem;
  background: var(--pf-grund-2); border: 1px solid var(--pf-rand); border-radius: var(--pf-radius); }
.pf-editor-zeile .pf-hak { flex: 1 1 12rem; min-width: 0; font-size: .9375rem; }
.pf-datum { width: auto; }

/* ===================================================================================================
 * 6. Mappe und MD-Check
 * =================================================================================================== */
.pf-mappe-kopf { display: flex; flex-direction: column; gap: .625rem; }
/* „Stand …“ 12,5 px wie Fonocares .mut in der Mappe */
.pf-mappe-kopf .pf-stand { font-size: var(--pf-gr-chip); }
/* Statt einer Lücke wächst der Titel: passt alles in eine Zeile, stehen die Knöpfe rechts (wie Fonocare); bricht der
 * Titel um oder ist der Platz zu knapp, stehen sie links darunter, bei jeder Breite und Schriftgröße gleich
 * (Nachprüfung 18.11.2026: bei 130 % rutschte die Lücke mit in die zweite Zeile und schob den Knopf nach rechts). */
.pf-mappe-kopf > .pf-kopfzeile > .pf-h1 { flex: 1 1 auto; }
.pf-mappe-kopf > .pf-kopfzeile > .pf-luecke { display: none; }
/* Knöpfe im Mappen-Kopf wie Fonocare (14 px, Rundung 10 px; am PC 40 px hoch, siehe unten) */
.pf-mappe-kopf .pf-btn--klein { font-size: .875rem; padding-left: 1rem; padding-right: 1rem; border-radius: .625rem; }
/* Kapitel-Chips auf weißer Leiste wie Fonocares Kopf, damit die Pillen sich vom Grund abheben */
.pf-kapitel { display: flex; flex-wrap: wrap; gap: 0 .375rem; background: var(--pf-flaeche); border: 1px solid var(--pf-rand);
  border-radius: var(--pf-radius); padding: .375rem .75rem; }
.pf-kap { display: inline-flex; align-items: center; min-height: 2.75rem; max-width: 100%; text-decoration: none; border-radius: 999px; }
.pf-kap-innen { display: inline-block; min-width: 0; max-width: 100%; padding: .25rem .6875rem; border-radius: 999px;
  font-size: var(--pf-gr-chip); font-weight: 600; line-height: normal; background: var(--pf-pille); color: var(--pf-text-leise);
  overflow-wrap: break-word; hyphens: manual; }
.pf-kap-nr { font-weight: 800; margin-right: .3125rem; }
.pf-kap--on .pf-kap-innen { background: var(--pf-akzent-hell); color: var(--pf-akzent-tief); }
@media (hover: hover) {
  .pf-kap:hover .pf-kap-innen { background: #dfe7ea; }
  .pf-kap--on:hover .pf-kap-innen { background: var(--pf-akzent-rand); }
}
.pf-kap:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 1px; }
.pf-md {
  background: var(--pf-flaeche); border: 1px solid var(--pf-rand); border-radius: var(--pf-radius); padding: 1.125rem 1.25rem;
  box-shadow: 0 .875rem 2.5rem rgba(13, 35, 49, .06); display: flex; flex-direction: column; gap: .375rem;
}
.pf-md--gut { border-color: var(--pf-akzent-rand); background: #f4fbf9; }
.pf-md-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .625rem; }
.pf-md-titel { margin: 0; font-size: 1rem; font-weight: 700; }
.pf-md > .pf-liste { gap: 0; } /* Abstand zwischen den Befunden nur .375rem (margin-top der Befunde) wie Fonocare */
.pf-md-hint { flex: 1 1 100%; margin: 0 0 .25rem; font-size: var(--pf-gr-chip); color: var(--pf-text-leise); line-height: 1.5; }
.pf-zahl { display: inline-flex; padding: .1875rem .625rem; border-radius: 999px; font-size: var(--pf-gr-chip); font-weight: 700; }
.pf-zahl--fehlt { background: var(--pf-rot-grund); color: var(--pf-rot); }
.pf-zahl--pruefen { background: var(--pf-gelb-warte); color: var(--pf-gelb-text); }
.pf-zahl--hinweis { background: var(--pf-pille); color: var(--pf-text-leise); }
.pf-zahl--ok { background: var(--pf-akzent-hell); color: var(--pf-akzent-tief); }
.pf-bef {
  display: flex; gap: .75rem; align-items: flex-start; padding: .6875rem .75rem; border-radius: .625rem; margin-top: .375rem;
  text-decoration: none; color: inherit; border-left: .25rem solid var(--pf-rand-eingabe); background: #f8fafa;
  font-family: var(--pf-schrift); width: 100%; box-sizing: border-box; text-align: left;
}
button.pf-bef { all: unset; box-sizing: border-box; display: flex; gap: .75rem; align-items: flex-start; padding: .6875rem .75rem;
  border-radius: .625rem; margin-top: .375rem; border-left: .25rem solid var(--pf-rand-eingabe); background: #f8fafa; cursor: pointer;
  width: 100%; font-family: var(--pf-schrift); color: var(--pf-text); text-align: left; }
a.pf-bef, button.pf-bef { min-height: 2.75rem; }
@media (hover: hover) { a.pf-bef:hover, button.pf-bef:hover { background: var(--pf-grund); } }
a.pf-bef { color: var(--pf-text); }
.pf-bef:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; }
.pf-bef--fehlt { border-left-color: var(--pf-rot) !important; background: #fdf4f3 !important; }
.pf-bef--pruefen { border-left-color: var(--pf-gelb-punkt) !important; background: #fdfaf2 !important; }
.pf-befkap { flex: 0 0 auto; min-width: 3.25rem; padding-top: .125rem; font-size: .71875rem; font-weight: 700; color: var(--pf-text-leise); }
.pf-befmain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .125rem; }
.pf-beftitel { font-size: .90625rem; font-weight: 700; }
.pf-beftxt { font-size: .8125rem; line-height: 1.5; color: var(--pf-text-leise); overflow-wrap: anywhere; }
.pf-befstufe { flex: 0 0 auto; padding-top: .125rem; font-size: .71875rem; font-weight: 700; color: var(--pf-text-leise); }
.pf-stamm { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); gap: .5rem 1.25rem; margin: 0; }
.pf-stamm dt { color: var(--pf-text-leise); font-size: var(--pf-gr-klein); font-weight: 700; }
.pf-stamm dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }

/* ===================================================================================================
 * 7. Dialoge (Neuer Patient, Rückfragen, Unterschrift)
 * =================================================================================================== */
.pf-dialog { border: 0; padding: 0; border-radius: var(--pf-radius); background: var(--pf-flaeche); color: var(--pf-text);
  width: min(30rem, calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem); box-shadow: 0 1.125rem 2.75rem rgba(13, 35, 49, .2);
  font-family: var(--pf-schrift); }
.pf-dialog::backdrop { background: rgba(13, 35, 49, .45); }
.pf-dialog--breit { width: min(40rem, calc(100% - 1.5rem)); }
.pf-dialog-form { display: flex; flex-direction: column; gap: .875rem; padding: 1.875rem; }
.pf-dialog-titel { margin: 0; font-size: 1.1875rem; font-weight: 800; letter-spacing: -.01em; }
.pf-dialog-text { margin: 0; color: var(--pf-text-2); font-size: .9375rem; line-height: 1.5; }
.pf-dialog-fuss { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: .375rem; }
.pf-feldblock { display: flex; flex-direction: column; gap: .375rem; min-width: 0; }
.pf-feldblock > label, .pf-feldlabel { font-size: .8125rem; font-weight: 700; color: var(--pf-text-2); }
.pf-feldblock .pf-eingabe { width: 100%; }
.pf-feldfehler { margin: 0; font-size: .8125rem; font-weight: 700; color: var(--pf-rot); }
.pf-zweispaltig { display: flex; flex-wrap: wrap; gap: .75rem; }
.pf-zweispaltig > .pf-feldblock { flex: 1 1 9rem; }
.pf-aufklapp { border-top: 1px solid var(--pf-rand); padding-top: .25rem; }
.pf-aufklapp > summary { min-height: 2.75rem; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--pf-akzent-tief); }
.pf-aufklapp > summary:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; border-radius: .25rem; }
.pf-aufklapp[open] > .pf-stapel { padding-top: .375rem; }
.pf-frage { padding: .875rem 1rem; border: 1px solid var(--pf-rand); border-radius: var(--pf-radius); background: var(--pf-grund-2); display: flex; flex-direction: column; gap: .5rem; }
.pf-frage--rot { background: var(--pf-rot-grund); border-color: var(--pf-rot-rand); }
.pf-frage-text { margin: 0; font-weight: 700; }
.pf-meldungsplatz:empty { display: none; }
.pf-leinwand-rahmen { border: 2px dashed var(--pf-rand-eingabe); border-radius: var(--pf-radius); background: var(--pf-flaeche); touch-action: none; height: 10rem; }
.pf-leinwand { display: block; width: 100%; height: 100%; touch-action: none; }

.pf-beftitel, .pf-beftxt, .pf-kap-innen { overflow-wrap: break-word; hyphens: manual; }
/* Mappe ohne Silbentrennung, solange lange Wörter Platz haben (Fonocare trennt nicht, auch am Handy). Erst wenn der
 * Inhalt schmaler als 20rem ist (Handy mit großer Schrift), helfen die weichen Trennstellen gegen Überlauf. In rem,
 * damit die Schriftgröße mitzählt (Nachprüfung 18.11.2026). */
.pf-mappe-inhalt { container-type: inline-size; container-name: pfmappe; }
@container pfmappe (min-width: 20rem) {
  .pf-beftitel, .pf-beftxt, .pf-kap-innen { hyphens: none; }
}

/* ===================================================================================================
 * 7b. Verwaltung am PC mit Maus (ab 900 px): kleinere Knöpfe wie Fonocare. Am Handy und in der App bleiben 44 px.
 * =================================================================================================== */
@media (min-width: 56.25em) and (pointer: fine) {
  html[data-branche="pflege"]:not(.handy) .pf-prow .pf-btn--klein { min-height: 2.375rem; } /* „Mappe öffnen“, „Drucken“ 38 px */
  html[data-branche="pflege"]:not(.handy) a.pf-pname-link { min-height: 2.5rem; } /* Zeile 70 px wie Fonocare (14 + 40 + 14 + Rand) */
  html[data-branche="pflege"]:not(.handy) .pf-mappe-kopf .pf-btn--klein { min-height: 2.5rem; } /* Mappen-Kopf 40 px */
  html[data-branche="pflege"]:not(.handy) .pf-kap { min-height: 1.5rem; } /* Kapitel-Raster ≈30 px (Fonocare 29), Ziel 24 px */
  html[data-branche="pflege"]:not(.handy) .pf-kapitel { gap: .375rem; }
  html[data-branche="pflege"]:not(.handy) :is(.pf-beftitel, .pf-beftxt, .pf-kap-innen) { hyphens: none; }
}

/* ===================================================================================================
 * 8. Schmaler Schirm (unter 900 px): wie Fonocare-Handy
 * =================================================================================================== */
@media (max-width: 56.2475em) {
  .pf-h1 { font-size: 1.25rem; }
  .pf-karte { padding: 1rem; }
  .pf-kopfzeile { gap: .625rem; }
  .pf-suche, .pf-wahl { flex: 1 1 100%; width: 100%; }
  .pf-kopf-patienten .pf-suche { flex: 1 1 8.125rem; width: auto; }
  .pf-kopf-patienten .pf-luecke { flex: 0 0 100%; height: 0; }
  .pf-nurbreit { display: none; }
  .pf-nurschmal { display: inline; }
  .pf-btn-neu { flex: 0 0 auto; padding: .25rem .875rem; white-space: nowrap; font-size: .90625rem; }
  .pf-sprechen, .pf-formular { flex: 1 1 100%; }
  .pf-mic { width: 4.75rem; height: 4.75rem; }
  .pf-frow { flex-wrap: wrap; row-gap: .25rem; column-gap: .625rem; }
  .pf-lab { flex: 1 1 100%; } /* Ampelpunkt allein über dem Etikett wie Fonocare */
  .pf-feld, .pf-wert, .pf-mehrfach, .pf-zwei, .pf-hint-text { flex: 1 1 100%; }
  .pf-note { flex: 1 1 100%; max-width: none; }
  .pf-col { display: none; }
  .pf-prow { padding: .75rem .875rem; }
  .pf-prow--raster { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; column-gap: .75rem; row-gap: .375rem; padding: .875rem; }
  .pf-prow--raster > .pf-pava { grid-column: 1; grid-row: 1; }
  .pf-prow--raster > .pf-pname { grid-column: 2; grid-row: 1; }
  .pf-prow--raster > .pf-ppg { grid-column: 3; grid-row: 1; flex: none; }
  .pf-prow--raster > .pf-zeilenknopf { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .pf-prow--raster > .pf-btn.pf-zeilenknopf { min-height: 2.75rem; font-size: .90625rem; } /* wie Fonocares .pbtn: 44 px, 14,5 px */
  .pf-prow--raster > .pf-zeilenknoepfe { grid-column: 1 / -1; grid-row: 2; }
  .pf-nurmobil { display: block; }
  .pf-prow--verlauf > .pf-pname { grid-column: 2; }
  .pf-prow--verlauf > .pf-ppg { grid-column: 1 / -1; grid-row: 2; }
  .pf-prow--verlauf > .pf-ppg:empty { display: none; }
  .pf-prow--verlauf > .pf-zeilenknopf { grid-row: 3; }
  /* Verlauf: „Drucken“ rechts neben dem Namen wie Fonocare (ohne PDF steht der leise Hinweis darunter) */
  .pf-prow--verlauf > .pf-btn.pf-zeilenknopf { grid-column: 3; grid-row: 1; width: auto; font-size: var(--pf-gr-klein); }
  .pf-pille { white-space: normal; }
  .pf-zeilenknoepfe { display: flex; flex-wrap: wrap; gap: .5rem; }
  .pf-zeilenknoepfe > .pf-btn { flex: 1 1 8rem; }
  .pf-md { padding: .875rem; }
  .pf-mappe-inhalt > .pf-md { order: -1; } /* Handy: MD-Check vor den Kapitel-Chips */
  .pf-befstufe { display: none; }
  .pf-bef, button.pf-bef { flex-direction: column; gap: .1875rem; }
  .pf-befkap { min-width: 0; }
  .pf-stamm { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pf-stamm dd { margin-bottom: .5rem; }
  .pf-dialog-form { padding: 1.25rem; }
  /* Nachprüfung 18.11.2026 (Fonocare-Handy bildpunktnah): */
  /* Tour-Kopf: ohne die leere Lücke steht das Datum (16 px wegen iOS) wie in Fonocare rechts in Zeile 1 */
  .pf-kopfzeile:not(.pf-kopf-patienten) > .pf-luecke--null { display: none; }
  /* Auswahl rechts 14 px wie Fonocare: den Pfeil zeichnet der Browser in eigenen Platz, 2rem kosteten Text */
  select.pf-eingabe { padding-right: .875rem; }
  /* Zeilenknopf 14 px unter dem Text wie Fonocares .pbtn (Verlauf ausgenommen: „Drucken“ steht dort neben dem Namen) */
  .pf-prow--raster:not(.pf-prow--verlauf) > .pf-zeilenknopf, .pf-prow--raster > .pf-zeilenknoepfe { margin-top: .5rem; }
  /* Nur-lesen-Wert so hoch wie die Eingaben (44 px): alle Feldzeilen gleich gebaut wie in Fonocare */
  .pf-frow .pf-wert--feld { min-height: 2.75rem; display: flex; align-items: center; }
  /* „Dein Text“ wächst mit dem Diktat (bei großer Schrift passen weniger Wörter in eine Zeile), höchstens halber Schirm */
  .pf-sprechen textarea.pf-eingabe { field-sizing: content; max-height: 50vh; }
}
.pf-zeilenknoepfe { display: flex; flex-wrap: wrap; gap: .5rem; flex: 0 0 auto; }

/* ===================================================================================================
 * 9. Zeilenlisten nach eigener Breite (Container-Abfragen, nach den Regeln oben, damit sie gewinnen)
 * =================================================================================================== */
/* Zeilenlisten (Patienten, Tour, Verlauf) richten sich nach ihrer eigenen Breite in rem, nicht nach dem Fenster: so
 * wirkt auch die Schriftgröße 115/130/150 % (Nachprüfung 17.11.2026, am PC zerfiel sonst die Namensspalte). */
.pf-liste { container-type: inline-size; container-name: pfliste; }
.pf-geb { white-space: nowrap; }
/* Mittlere Breite (Tablet, kleiner PC, große Schrift): Kasse und letzter Eintrag als Nebenzeile wie am Handy */
@container pfliste (max-width: 60rem) {
  .pf-col { display: none; }
  .pf-nurmobil { display: block; }
}
/* Schmal (auch PC mit großer Schrift): Zeile wie am Handy, Knöpfe in der zweiten Reihe */
@container pfliste (max-width: 40rem) {
  .pf-prow { padding: .75rem .875rem; }
  .pf-prow--raster { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; column-gap: .75rem; row-gap: .375rem; padding: .875rem; }
  .pf-prow--raster > .pf-pava { grid-column: 1; grid-row: 1; }
  .pf-prow--raster > .pf-pname { grid-column: 2; grid-row: 1; }
  .pf-prow--raster > .pf-ppg { grid-column: 3; grid-row: 1; flex: none; }
  .pf-prow--raster > .pf-zeilenknopf { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .pf-prow--raster > .pf-btn.pf-zeilenknopf { min-height: 2.75rem; }
  .pf-prow--raster > .pf-zeilenknoepfe { grid-column: 1 / -1; grid-row: 2; }
  .pf-prow--raster:not(.pf-prow--verlauf) > .pf-zeilenknopf, .pf-prow--raster > .pf-zeilenknoepfe { margin-top: .5rem; }
  .pf-prow--verlauf > .pf-pname { grid-column: 2; }
  .pf-prow--verlauf > .pf-ppg { grid-column: 1 / -1; grid-row: 2; }
  .pf-prow--verlauf > .pf-ppg:empty { display: none; }
  .pf-prow--verlauf > .pf-zeilenknopf { grid-row: 3; }
  .pf-prow--verlauf > .pf-btn.pf-zeilenknopf { grid-column: 3; grid-row: 1; width: auto; }
  .pf-pille { white-space: normal; }
  .pf-zeilenknoepfe > .pf-btn { flex: 1 1 8rem; }
}
/* Verlauf sehr schmal (große Schrift): „Drucken“ wieder in eine eigene Reihe, damit der Name Platz hat */
@container pfliste (max-width: 20rem) {
  .pf-prow--verlauf > .pf-pname { grid-column: 2 / -1; }
  .pf-prow--verlauf > .pf-btn.pf-zeilenknopf { grid-column: 1 / -1; grid-row: 3; width: 100%; }
}
/* Sehr schmal (Handy mit großer Schrift): Pflegegrad unter den Namen, damit Name und Geburtsdatum Platz haben */
@container pfliste (max-width: 18rem) {
  .pf-prow--raster { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .pf-prow--raster > .pf-ppg { grid-column: 2; grid-row: 2; }
  .pf-prow--raster > .pf-zeilenknopf, .pf-prow--raster > .pf-zeilenknoepfe { grid-row: 3; }
  .pf-prow--verlauf > .pf-pname { grid-column: 2; }
  .pf-prow--verlauf > .pf-ppg { grid-column: 2; }
}
/* Ganz schmal (360 px bei 150 %): ohne Avatar, die ganze Breite für den Text */
@container pfliste (max-width: 14rem) {
  .pf-prow--raster { grid-template-columns: minmax(0, 1fr); }
  .pf-prow--raster > .pf-pava { display: none; }
  .pf-prow--raster > .pf-pname, .pf-prow--raster > .pf-ppg, .pf-prow--verlauf > .pf-pname, .pf-prow--verlauf > .pf-ppg { grid-column: 1; }
}

/* ===================================================================================================
 * 10. Durchlauf 2 (VERTRAG.md 15.11): Blatt der Mappe, Anlagen, Export im Verlauf, Leistungsnachweis, Druck.
 *     Fonocare-Werte aus F/app.py 2343-2393 (Mappe) und 2158-2197 (Leistungsnachweis), in rem.
 * =================================================================================================== */
/* Kapitel-Leiste klebt am PC oben wie Fonocares Kopf (nicht, wenn sie bei sehr großer Schrift zu hoch wird:
 * .pf-kapitel--frei, gemessen in mappe.js). Am Handy klebt sie nicht. */
@media (min-width: 56.25em) {
  .pf-mappe-inhalt > .pf-kapitel { position: sticky; top: 0; z-index: 6; box-shadow: 0 .375rem 1rem -.875rem rgba(13, 35, 49, .35); }
  .pf-mappe-inhalt > .pf-kapitel.pf-kapitel--frei { position: static; box-shadow: none; }
}
.pf-kap-nr { white-space: nowrap; }

/* Blatt (weiße Karte wie Fonocares .doc) */
.pf-doc {
  background: var(--pf-flaeche); border: 1px solid var(--pf-rand); border-radius: .75rem;
  box-shadow: 0 .875rem 2.5rem rgba(13, 35, 49, .06); width: 100%; max-width: 58.75rem; min-width: 0;
  padding: 2.125rem 2.375rem; color: var(--pf-text); line-height: normal;
  container-type: inline-size; container-name: pfdoc;
}
.pf-doc:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; }
.pf-doc-teil { min-width: 0; }
.pf-doc-teil > .laden, .pf-doc-teil > .fehler-kasten { margin-bottom: 1rem; }
.pf-doc-kopf {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin: 2.125rem 0 .625rem;
  padding-top: .875rem; border-top: 2px solid var(--pf-rand); min-width: 0;
}
.pf-doc-inhalt > .pf-doc-kopf:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.pf-doc-h2 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em;
  line-height: 1.3; overflow-wrap: break-word; }
.pf-doc-h2:focus { outline: 0; }
.pf-doc-h2:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 3px; border-radius: .25rem; }
.pf-doc-verlauf {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem;
  font-size: var(--pf-gr-klein); font-weight: 700; color: var(--pf-akzent-dunkel); text-decoration: none; border-radius: .375rem;
}
.pf-doc-verlauf:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; }
@media (hover: hover) { .pf-doc-verlauf:hover { color: var(--pf-akzent-tief); text-decoration: underline; } }
.pf-doc-h3 { margin: 1.25rem 0 .375rem; font-size: .9375rem; font-weight: 700; overflow-wrap: break-word; }
.pf-doc-p { margin: .375rem 0; font-size: .84375rem; line-height: 1.55; color: var(--pf-text-2); white-space: pre-line; overflow-wrap: break-word; }
.pf-doc-linie { height: 1.25rem; margin: .125rem 0; border-bottom: 1px solid #c9d6d4; }
/* Internetadressen ohne Silbentrennung (.mono), aber in der Schrift des Absatzes; brechen am Zeilenende an beliebiger
 * Stelle um, nie mit einem Trennstrich, der nicht zur Adresse gehört (Nacharbeit Handy 6) */
.pf-doc .pf-doc-url { font-family: inherit; font-size: inherit; word-break: break-all; hyphens: none; }
/* Breite Tabellen scrollen nur in ihrem Rahmen (kein Überstand der Seite, auch bei 360 px und 150 %). Geht eine Tabelle
 * seitlich weiter, zeigt ein Schatten am Rand das an (am Handy gibt es keine sichtbare Bildlaufleiste): die zwei
 * weißen Verläufe wandern mit dem Inhalt (local) und decken die Schatten (scroll) ab, solange nichts weitergeht.
 * Reines CSS, CSP-tauglich (Nacharbeit Handy 2). */
.pf-doc-tw {
  overflow-x: auto; margin: .625rem 0; max-width: 100%;
  background:
    linear-gradient(to right, var(--pf-flaeche) 40%, rgba(255, 255, 255, 0)) left center / 1.5rem 100% no-repeat local,
    linear-gradient(to left, var(--pf-flaeche) 40%, rgba(255, 255, 255, 0)) right center / 1.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(13, 35, 49, .22), rgba(13, 35, 49, 0)) left center / .625rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(13, 35, 49, .22), rgba(13, 35, 49, 0)) right center / .625rem 100% no-repeat scroll;
}
.pf-doc-tw:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; }
.pf-doc-tabelle { border-collapse: collapse; width: 100%; }
/* Zeilenhöhe „normal“ wie Fonocares td (Zelle 28 px, Nacharbeit Fonocare 2) */
.pf-doc-tabelle td, .pf-doc-tabelle th {
  border: 1px solid #d7e2e0; padding: .375rem .5625rem; font-size: .8125rem; line-height: normal; vertical-align: top;
  text-align: left; white-space: pre-line; overflow-wrap: break-word;
}
.pf-doc-tabelle tr:first-child td, .pf-doc-tabelle th { background: var(--pf-grund-2); font-weight: 600; }
/* Tabellen aus Bezeichnung und Wert im schmalen Blatt (Handy, große Schrift, Verwaltung bei 1024 px und 150 %): die
 * Bezeichnung steht über dem Wert, nichts scrollt, der Wert aus der Akte ist ganz zu sehen (Nacharbeit Handy 1). Lange
 * Unterstrich-Linien der Vorlage brechen um. Word und Druck bleiben Tabellen. */
@container pfdoc (max-width: 28rem) {
  .pf-doc-tabelle--paar, .pf-doc-tabelle--paar > tbody, .pf-doc-tabelle--paar > tbody > tr,
  .pf-doc-tabelle--paar > tbody > tr > td { display: block; width: auto; }
  .pf-doc-tabelle--paar > tbody > tr > td { overflow-wrap: anywhere; }
  .pf-doc-tabelle--paar > tbody > tr > td:first-child:not(:only-child) { border-bottom: 0; font-weight: 600; }
  .pf-doc-tabelle--paar > tbody > tr > td + td { border-top: 0; }
  .pf-doc-tabelle--paar > tbody > tr + tr > td:first-child { border-top: 0; }
}
/* Was aus der Akte kommt, in Blau (E11) */
.pf-doc .pf-doc-wert, .pf-doc-tabelle td.pf-doc-wert { color: var(--pf-marke); font-weight: 600; }

/* Anlagen: weitere Dokumente (Teil des Blatts, lädt unabhängig) */
.pf-anlagen { min-width: 0; container-type: inline-size; container-name: pfanl; }
.pf-anl-text { margin: .375rem 0; font-size: var(--pf-gr-chip); line-height: 1.55; }
.pf-anl-hoch { min-width: 0; }
.pf-anl-up { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem; margin: .875rem 0 .375rem; min-width: 0; }
.pf-anl-wahl { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .625rem; min-width: 0; flex: 0 1 auto; }
/* Die Datei-Eingabe bleibt bedienbar (Tastatur, Vorleser), sichtbar ist der Knopf „Datei auswählen“ */
.pf-datei-eingabe { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pf-datei-knopf { cursor: pointer; }
.pf-datei-eingabe:focus-visible + .pf-datei-knopf { outline: 3px solid var(--pf-marke); outline-offset: 2px; }
.pf-datei-name { min-width: 0; max-width: 16rem; font-size: var(--pf-gr-klein); overflow-wrap: anywhere; }
.pf-anl-kat { flex: 0 1 15rem; min-width: 0; }
.pf-anl-notiz { flex: 1 1 12.5rem; min-width: 0; }
.pf-anl-hinweis { margin: .875rem 0 .375rem; }
.pf-anl-leerzeile td { font-size: var(--pf-gr-klein); }
.pf-anl-liste { min-width: 0; margin-top: .625rem; }
.pf-anl-tabelle th { white-space: nowrap; }
/* Die Liste hat einen echten Kopf: die erste Datenzeile ist nicht grau (anders als die Tabellen der Vorlage) */
.pf-anl-tabelle tbody tr:first-child td { background: none; font-weight: 400; }
.pf-anl-tabelle td { white-space: normal; }
.pf-anl-name {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; min-height: 2.75rem;
  color: var(--pf-akzent-dunkel); font-weight: 400; font-size: .8125rem; overflow-wrap: anywhere; max-width: 100%;
  border-radius: .25rem;
}
.pf-anl-name:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; }
.pf-anl-name[disabled] { opacity: .6; cursor: default; }
@media (hover: hover) { .pf-anl-name:hover { color: var(--pf-akzent-tief); text-decoration: underline; } }
.pf-anl-meta { display: none; font-size: var(--pf-gr-chip); }
.pf-anl-notiz-text { display: block; font-size: var(--pf-gr-chip); overflow-wrap: anywhere; }
.pf-anl-aktion { width: 1%; white-space: nowrap; }
/* „entfernen“ als roter Textknopf wie Fonocare (12,5 px, unterstrichen) */
.pf-textknopf--rot { color: var(--pf-rot); font-size: var(--pf-gr-chip); font-weight: 400; } /* wie Fonocares button.del */
@media (hover: hover) { .pf-textknopf--rot:hover { color: #8e3624; } }
/* Schmal (Handy, große Schrift): alles untereinander, je Dokument eine Zeile mit Name, „Kategorie · Datum · von“,
 * Notiz und „entfernen“ */
@container pfanl (max-width: 36rem) {
  .pf-anl-up { flex-direction: column; align-items: stretch; }
  .pf-anl-up > .pf-anl-wahl, .pf-anl-up > .pf-anl-kat, .pf-anl-up > .pf-anl-notiz, .pf-anl-up > .pf-anl-senden { flex: 1 1 auto; width: 100%; }
  .pf-datei-name { max-width: none; flex: 1 1 8rem; }
  .pf-anl-tabelle, .pf-anl-tabelle tbody, .pf-anl-tabelle tr, .pf-anl-tabelle td { display: block; width: auto; }
  .pf-anl-tabelle thead { display: none; } /* die Zeile nennt „Kategorie · Datum · von“ selbst */
  .pf-anl-tabelle tr { padding: .5rem .75rem; margin-bottom: .5rem; border: 1px solid #d7e2e0; border-radius: .625rem; }
  .pf-anl-tabelle td { border: 0; padding: 0; }
  .pf-anl-tabelle .pf-anl-spalte { display: none; }
  .pf-anl-name { font-weight: 700; font-size: .875rem; }
  .pf-anl-meta { display: block; }
  .pf-anl-aktion { width: auto; }
  .pf-anl-tabelle tr.pf-anl-leerzeile { padding: 0; margin: 0; border: 0; border-radius: 0; }
}

/* Verlauf: „NRW-Original“ und „Export …“ nach „Drucken“ (Fonocare-Reihenfolge) */
.pf-exporte { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; flex: 0 0 auto; min-width: 0; }
select.pf-export {
  min-height: 2.75rem; width: auto; max-width: 100%; padding: .25rem .5rem .25rem .625rem; font-weight: 700;
  color: var(--pf-text-2); border-radius: var(--pf-radius); cursor: pointer;
}
@media (hover: hover) { select.pf-export:hover { border-color: var(--pf-akzent); } }
/* Am PC (Zeile als Flex-Reihe) wie Fonocare: Drucken, NRW-Original und Export … in einer Reihe (bei 1280 px; Zeile
 * 70 px). Dafür fällt die leere Status-Spalte weg (eine Status-Pille steht dort in der Namensspalte, siehe unten), die
 * Auswahl hat Fonocares Polster und der Name braucht mindestens 10rem. Erst wenn das nicht passt (große Schrift),
 * rutschen „NRW-Original“ und „Export …“ rechts in eine zweite Zeile; „Drucken“ wird nie gestaucht (Nacharbeit
 * Fonocare 1). */
.pf-prow--verlauf > .pf-ppg:empty { display: none; }
.pf-prow--verlauf.pf-prow--export { flex-wrap: wrap; row-gap: .5rem; }
.pf-prow--verlauf.pf-prow--export > .pf-pname { flex: 1 1 10rem; }
/* Status-Pille: in der Flex-Reihe (PC) in der Namensspalte, in den Raster-Zeilen (Handy, schmal) in ihrer eigenen Zelle */
.pf-pname .pf-pille--name { padding: .0625rem .5rem; font-size: .75rem; vertical-align: .0625rem; margin-left: .25rem; }
.pf-prow--verlauf > .pf-ppg { display: none; }
@container pfliste (max-width: 40rem) {
  .pf-prow--verlauf > .pf-ppg { display: flex; }
  .pf-prow--verlauf > .pf-ppg:empty, .pf-pname .pf-pille--name { display: none; }
}
@media (max-width: 56.2475em) {
  .pf-prow--verlauf > .pf-ppg { display: flex; }
  .pf-prow--verlauf > .pf-ppg:empty, .pf-pname .pf-pille--name { display: none; }
}
.pf-prow--verlauf.pf-prow--export > .pf-btn.pf-zeilenknopf { flex-shrink: 0; }
.pf-prow--export > .pf-exporte { margin-left: auto; justify-content: flex-end; }
@media (max-width: 56.2475em) {
  .pf-prow--export > .pf-exporte { margin-left: 0; justify-content: flex-start; }
  .pf-prow--verlauf > .pf-exporte { grid-column: 2 / -1; grid-row: 3; }
  .pf-prow--verlauf:has(> .pf-druck-spaeter) > .pf-exporte { grid-row: 4; }
  select.pf-export { padding-right: .875rem; }
}
@container pfliste (max-width: 40rem) {
  .pf-prow--export > .pf-exporte { margin-left: 0; justify-content: flex-start; }
  .pf-prow--verlauf > .pf-exporte { grid-column: 2 / -1; grid-row: 3; }
  .pf-prow--verlauf:has(> .pf-druck-spaeter) > .pf-exporte { grid-row: 4; }
}
@container pfliste (max-width: 20rem) {
  .pf-prow--verlauf > .pf-exporte { grid-row: 4; grid-column: 1 / -1; } /* bündig unter „Drucken“ (Nacharbeit Handy 7) */
  .pf-prow--verlauf > .pf-exporte > select.pf-export { flex: 1 1 auto; }
}
@container pfliste (max-width: 14rem) {
  .pf-prow--verlauf > .pf-exporte { grid-column: 1; }
}

/* Leistungsnachweis: Steuerleiste (weiß wie Fonocares .steuer, nicht klebend) und Blatt */
.pf-steuer {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .75rem 1.25rem; background: var(--pf-flaeche);
  border: 1px solid var(--pf-rand); border-radius: var(--pf-radius); min-width: 0;
}
.pf-steuer .pf-btn--klein { font-size: .875rem; border-radius: .625rem; padding-left: 1.125rem; padding-right: 1.125rem; } /* Fonocare 0 18px */
.pf-ln-monat { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; min-width: 0; }
.pf-ln-monat > label { font-size: .84375rem; font-weight: 600; }
.pf-ln-monatwahl { min-width: 0; flex: 1 1 9rem; font-weight: 400; }
select.pf-ln-monatwahl { padding-right: .75rem; } /* den Pfeil zeichnet der Browser in eigenen Platz (Fonocare 12 px) */
.pf-nachweis-platz { min-width: 0; }
.pf-nachweis-blatt {
  page: pfnachweis; width: 100%; max-width: 62.5rem; min-width: 0; padding: 1.75rem 2rem; background: var(--pf-flaeche);
  border: 1px solid var(--pf-rand); border-radius: .75rem; color: var(--pf-text); line-height: normal;
  container-type: inline-size; container-name: pfblatt;
}
.pf-ln-h1 { margin: 0 0 .25rem; font-size: 1.1875rem; font-weight: 700; line-height: 1.3; }
.pf-ln-h1:focus { outline: 0; }
.pf-ln-vorlage { margin: 0; font-size: var(--pf-gr-chip); color: var(--pf-text-mut); }
.pf-ln-kopf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1.5rem; margin: .875rem 0 1.125rem; }
.pf-ln-kopfzeile { display: flex; gap: .5rem; padding: .3125rem 0; border-bottom: 1px solid var(--pf-rand); font-size: .84375rem; min-width: 0; }
.pf-ln-etikett { flex: 0 0 9.375rem; font-weight: 600; color: var(--pf-text-leise); }
.pf-ln-wert { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pf-ln-rahmen.pf-doc-tw { margin: 0; }
.pf-ln-tabelle { border-collapse: collapse; width: 100%; min-width: 46rem; font-size: .78125rem; }
.pf-ln-tabelle th, .pf-ln-tabelle td { border: 1px solid var(--pf-rand-eingabe); padding: .3125rem .4375rem; text-align: left; vertical-align: top;
  overflow-wrap: break-word; }
.pf-ln-tabelle th { background: var(--pf-grund-2); font-size: .71875rem; font-weight: 700; }
.pf-ln-tabelle td.pf-ln-lk { font-size: .75rem; }
.pf-ln-tabelle .pf-ln-datum, .pf-ln-tabelle .pf-ln-hz { width: 3.875rem; }
.pf-ln-tabelle .pf-ln-zeit, .pf-ln-tabelle .pf-ln-sig { width: 3.625rem; }
.pf-ln-tabelle .pf-ln-menge { width: 4.875rem; }
.pf-ln-tabelle .pf-ln-bes { width: 9.375rem; }
.pf-ln-leerzeile td { height: 1.625rem; }
/* Am Handy ist die Tabelle 2- bis 4-mal so breit wie der Rahmen: das Datum bleibt beim seitlichen Scrollen stehen,
 * damit man weiß, welche Zeile man liest (Nacharbeit Handy 5). Die Linie rechts zeichnet die Zelle selbst (die Ränder
 * einer zusammengefassten Tabelle wandern sonst mit); der Schatten nur, wenn der Rahmen wirklich scrollt. */
.pf-ln-tabelle :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--pf-flaeche);
  background-clip: padding-box; }
.pf-ln-tabelle th:first-child { background: var(--pf-grund-2); }
.pf-doc-tw--scroll .pf-ln-tabelle :is(th, td):first-child {
  box-shadow: inset -1px 0 0 var(--pf-rand-eingabe), .375rem 0 .375rem -.375rem rgba(13, 35, 49, .25); }
.pf-ln-summe { display: flex; flex-wrap: wrap; gap: .25rem 1.125rem; margin-top: .625rem; font-size: .8125rem; color: var(--pf-text-leise); }
.pf-ln-summe b { color: inherit; } /* wie Fonocare: die Zahl in der Farbe der Summe */
.pf-ln-pruef { margin-top: 1.125rem; font-size: .78125rem; line-height: 1.9; }
.pf-ln-pruef-punkte { display: flex; flex-wrap: wrap; gap: 0 1rem; } /* Fonocare „ &nbsp;&nbsp; “ ≈ 16 px */
.pf-ln-unter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.125rem; margin-top: 1.875rem; }
/* Inhalt unten bündig: die Linien beider Felder stehen auf einer Höhe (auch mit Hinweis oder Bild) */
.pf-sigfeld { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.pf-sigbild { display: block; width: 100%; height: 7.5rem; object-fit: contain; object-position: left bottom; }
.pf-sigbild--alt { opacity: .35; }
.pf-leinwand-rahmen.pf-sigpad { height: 7.5rem; border: 1.5px dashed var(--pf-rand-eingabe); border-radius: .625rem; background: #fcfdfd; }
.pf-sigpad .pf-leinwand { cursor: crosshair; }
.pf-siglinie { display: flex; flex-direction: column; gap: .125rem; margin-top: .375rem; padding-top: .3125rem; border-top: 1px solid var(--pf-text-2); }
.pf-sigtext { font-size: .75rem; color: var(--pf-text-leise); }
.pf-sigmeta { margin: 0; font-size: .6875rem; color: var(--pf-text-mut); overflow-wrap: anywhere; }
.pf-sigmeta--alt { margin-top: .125rem; }
.pf-sighinweis {
  margin: .375rem 0 .5rem; padding: .375rem .625rem; font-size: .75rem; font-weight: 700; line-height: 1.45;
  color: var(--pf-gelb-text); background: var(--pf-gelb-grund); border: 1px solid var(--pf-gelb-rand); border-radius: .5rem;
}
.pf-sigbtn { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; min-width: 0; }
.pf-signame { flex: 1 1 12rem; min-width: 0; } /* „Name (optional)“ nie abgeschnitten (Nacharbeit Handy 4) */
.pf-signame-konto { flex: 1 1 7.5rem; }
.pf-sigfeld > .pf-meldungsplatz { margin-top: .5rem; }
.pf-ln-frueher { margin-top: 1.5rem; }
.pf-ln-h2 { margin: 0 0 .375rem; font-size: .8125rem; font-weight: 700; }
.pf-ln-frueher-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .25rem;
  font-size: .75rem; color: var(--pf-text-2); }
.pf-ln-frueher-liste li { overflow-wrap: anywhere; }
.pf-ln-fuss { margin-top: 1.125rem; font-size: .6875rem; line-height: 1.5; color: var(--pf-text-mut); }
.pf-ln-fuss p { margin: 0; }
/* Blatt schmal (Handy, große Schrift): Kopf und Unterschriften einspaltig */
@container pfblatt (max-width: 40rem) {
  .pf-ln-kopf { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pf-ln-unter { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
}
@container pfblatt (max-width: 30rem) {
  .pf-ln-etikett { flex-basis: 8.25rem; }
}
@container pfblatt (max-width: 18rem) {
  .pf-ln-kopfzeile { flex-wrap: wrap; gap: 0 .5rem; }
  .pf-ln-etikett { flex: 1 1 100%; }
}

/* Schmaler Schirm (unter 900 px) */
@media (max-width: 56.2475em) {
  .pf-doc { padding: 1.125rem .875rem; }
  .pf-nachweis-blatt { padding: 1.125rem .875rem; }
  .pf-steuer { padding: .625rem .75rem; gap: .625rem; }
  .pf-steuer > .pf-luecke { display: none; }
  .pf-ln-monat { flex: 1 1 12rem; }
  .pf-ln-monatwahl { flex: 1 1 auto; }
  .pf-steuer .pf-btn--klein { flex: 1 1 auto; }
}

/* Verwaltung am PC mit Maus: Fonocare-Größen (Mappe, Steuerleiste 40 px, Unterschrift 34 px, Verlauf 38 px; mindestens
 * 24 px nach WCAG 2.5.8). Am Handy und in der App bleiben 44 px. */
@media (min-width: 56.25em) and (pointer: fine) {
  html[data-branche="pflege"]:not(.handy) .pf-doc-verlauf { min-height: 1.5rem; min-width: 1.5rem; }
  html[data-branche="pflege"]:not(.handy) .pf-anl-name { min-height: 1.5rem; }
  html[data-branche="pflege"]:not(.handy) .pf-anl-tabelle .pf-textknopf { min-height: 1.5rem; min-width: 1.5rem; }
  html[data-branche="pflege"]:not(.handy) .pf-anl-up .pf-btn--klein,
  html[data-branche="pflege"]:not(.handy) .pf-anl-up .pf-eingabe { min-height: 2.5rem; font-size: .875rem; }
  html[data-branche="pflege"]:not(.handy) .pf-steuer .pf-btn--klein,
  html[data-branche="pflege"]:not(.handy) .pf-steuer .pf-eingabe { min-height: 2.5rem; }
  html[data-branche="pflege"]:not(.handy) .pf-sigbtn .pf-btn--klein,
  html[data-branche="pflege"]:not(.handy) .pf-sigbtn .pf-eingabe { min-height: 2.125rem; font-size: .8125rem; padding-top: .125rem; padding-bottom: .125rem; }
  html[data-branche="pflege"]:not(.handy) .pf-sigbtn .pf-btn--klein { padding-left: .75rem; padding-right: .75rem; }
  html[data-branche="pflege"]:not(.handy) .pf-exporte .pf-btn--klein { min-height: 2.375rem; padding-left: .875rem; padding-right: .875rem;
    font-size: .84375rem; }
  html[data-branche="pflege"]:not(.handy) .pf-exporte select.pf-export { min-height: 2.375rem; font-size: .8125rem; padding-left: .5rem; }
}

/* Druck: Leistungsnachweis auf A4 quer (benannte Seite, kein globales @page: andere Seiten und Branchen drucken wie
 * bisher). Steuerleiste, Knöpfe, Eingaben und Meldungen weg; die leere Leinwand ohne Rahmen, nur die Linie bleibt;
 * der Hinweis zu einer nicht mehr gültigen Unterschrift bleibt sichtbar. */
@page pfnachweis { size: A4 landscape; margin: 12mm; }
@media print {
  html[data-branche="pflege"]:has(.pf-nachweis-blatt) body { background: #fff; }
  html[data-branche="pflege"]:has(.pf-nachweis-blatt) :is(.pf-huelle, .pf-haupt, .pf-main, .inhalt-seite, .pf-ansicht.pf-nachweis) {
    display: block !important; padding: 0 !important; margin: 0 !important; min-height: 0 !important; }
  html[data-branche="pflege"] .meldungen-feld { display: none !important; }
  .pf-nachweis > .pf-steuer, .pf-nachweis-blatt .pf-sigbtn, .pf-nachweis-blatt .pf-meldungsplatz,
  .pf-nachweis-blatt button, .pf-nachweis-blatt input, .pf-nachweis-blatt select { display: none !important; }
  .pf-nachweis-blatt { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .pf-ln-rahmen.pf-doc-tw { overflow: visible; }
  .pf-doc-tw { background: none; }
  .pf-ln-tabelle :is(th, td):first-child { position: static; box-shadow: none; }
  .pf-ln-tabelle { min-width: 0; }
  .pf-leinwand-rahmen.pf-sigpad { border: 0; background: transparent; }
  .pf-ln-unter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-ln-kopf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-doc { box-shadow: none; }
  .pf-ln-unter, .pf-ln-fuss, .pf-ln-tabelle tr { break-inside: avoid; }
}

/* ===================================================================================================
 * 11. Durchlauf 3 (VERTRAG.md 16.8.5 bis 16.8.10): Testzugang (Kasten und Pille), Ablauf-Ansicht, Erste Schritte.
 *     Nur Klassen mit Präfix .pf-; Firmen ohne Testzugang sehen nichts davon.
 * =================================================================================================== */
/* Kasten „Testzugang“ unten in der Seitenleiste (Fonocares .trial), zwischen Menü und Nutzerzeile */
.pf-test {
  margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: .75rem .875rem;
  background: var(--pf-gelb-warte); border: 1px solid var(--pf-gelb-rand); border-radius: .75rem; /* Fonocare #fdf6e3 */
  font-family: var(--pf-schrift); font-size: .8125rem; line-height: 1.45; color: var(--pf-gelb-text); overflow-wrap: anywhere;
}
.pf-test p { margin: 0; }
.pf-test-titel { font-weight: 700; }
.pf-test:not([hidden]) + .pf-nutzer { margin-top: .75rem; }
.pf-test .pf-test-link { justify-content: flex-start; font-size: .8125rem; color: var(--pf-gelb-text); text-align: left; }
@media (hover: hover) { .pf-test .pf-test-link:hover { color: var(--pf-text); } }
/* Am PC mit Maus reichen 24 px (WCAG 2.5.8, wie 10.4); am Handy und in der App 44 px */
@media (min-width: 56.25em) and (pointer: fine) {
  html[data-branche="pflege"]:not(.handy) .pf-test .pf-test-link { min-height: 1.5rem; min-width: 1.5rem; margin-top: .25rem; }
}
/* Pille „Test: Noch 7 Tage.“ in der oberen Leiste (Fonocares .pill.g als #trialTop) */
.pf-test-pille {
  display: inline-flex; align-items: center; flex: 0 0 auto; padding: .25rem .75rem; border-radius: 999px;
  background: var(--pf-akzent-hell); color: var(--pf-akzent-tief); font-family: var(--pf-schrift); font-size: .8125rem;
  font-weight: 700; line-height: 1.35; white-space: nowrap;
}
/* Passt sie nicht neben Marke und Knöpfe (schmal, große Schrift): eigene Zeile unter ihnen, über die ganze Breite,
 * Umbruch erlaubt (die Hülle misst das, siehe _pf_huelle.js pilleMessen) */
.pf-topbar--pille-zeile > .pf-test-pille {
  order: 10; flex: 1 1 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; border-radius: 1rem;
  padding: .3125rem .875rem; margin-bottom: .375rem;
}

/* Ablauf-Ansicht „Testzugang beendet“ (wie Fonocares _hinweis_seite): Karte senkrecht mittig, ohne Leisten. Maße wie
 * Fonocares .k (440 px Inhalt ohne box-sizing, also 440 + 2 × 32 + 2 = 506 px gesamt), Text 16 px, Titel 700. */
.pf-ende { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 70vh; min-width: 0; }
.pf-ende-karte {
  box-sizing: border-box; width: 100%; max-width: 31.625rem; display: flex; flex-direction: column; gap: 1rem; padding: 2rem;
  background: var(--pf-flaeche, var(--flaeche)); border: 1px solid var(--pf-rand, var(--rand)); border-radius: .75rem;
  font-family: var(--pf-schrift, inherit); color: var(--pf-text, var(--text)); min-width: 0;
}
.pf-ende-marke { display: flex; align-items: center; gap: .5625rem; }
.pf-ende-marke .pf-icon { width: 2rem; height: 2rem; }
.pf-ende-titel { margin: 0; font-size: 1.375rem; font-weight: 700; letter-spacing: normal; line-height: 1.25; }
.pf-ende-titel:focus, .pf-ende-titel:focus-visible { outline: none; } /* Fokus nur für Vorleser (wie jede h1 mit tabindex=-1) */
.pf-ende-text { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--pf-text-leise, var(--text-leise)); overflow-wrap: anywhere; }
.pf-ende-knoepfe { display: flex; flex-direction: column; gap: .625rem; margin-top: .25rem; }
.pf-ende-knoepfe > * { min-height: 2.75rem; }
@media (min-width: 30em) {
  .pf-ende-knoepfe { flex-direction: row; flex-wrap: wrap; }
  .pf-ende-knoepfe > * { flex: 1 1 auto; }
}
@media (max-width: 56.2475em) {
  .pf-ende-karte { padding: 1.25rem; }
}

/* Erste Schritte (Karte nach 10.4, Liste mit .75rem Abstand) */
.pf-schritte-text { margin: 0; font-size: .9375rem; line-height: 1.6; color: var(--pf-text-2); }
.pf-schritte-liste { margin: 0; padding-left: 1.375rem; display: flex; flex-direction: column; gap: .75rem;
  font-size: .9375rem; line-height: 1.55; color: var(--pf-text); }
.pf-schritte-liste li { padding-left: .25rem; overflow-wrap: break-word; }
.pf-schritte-liste li::marker { font-weight: 700; color: var(--pf-akzent-tief); }
.pf-schritte-liste b { font-weight: 700; }
.pf-schritte-knoepfe { display: flex; flex-wrap: wrap; gap: .625rem; }

/* ===================================================================================================
 * 12. Durchlauf 4 (VERTRAG.md 17.7.6): Eingang der Verwaltung im Fonocare-Look (Anmelden, Konto einrichten),
 *     Markenleiste der App über öffentlichen Seiten, Hinweis „nur erfundene Daten“ im Testzugang.
 *     Nur Klassen mit Präfix .pf- (bzw. darin); Firmen anderer Branchen sehen nichts davon.
 *     Maße wie Fonocares LOGIN_HTML in rem (px / 16); Farben für AA angepasst wie oben.
 * =================================================================================================== */
/* Hülle im Eingang: Inhalt ohne Innenabstand und Breitengrenze, die Seite zeichnet ihren Rahmen selbst */
.pf-huelle--eingang .pf-main { padding: 0; gap: 0; }
.pf-huelle--eingang .pf-main > .inhalt-seite { flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; min-width: 0; }

.pf-eingang {
  flex: 1 0 auto; display: flex; width: 100%; min-width: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--pf-grund-2); color: var(--pf-text); font-family: var(--pf-schrift); line-height: normal;
}
/* Dunkle Spalte (Fonocares .side): 42 %, 56 px Innenabstand, Wortmarke oben, Claim und Text mittig, Fuß unten */
.pf-eingang-seite {
  flex: 0 0 42%; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: 3.5rem; background: var(--pf-navy); color: #fff; overflow-wrap: break-word;
}
.pf-eingang-wort { margin: 0; font-size: 1.375rem; font-weight: 800; letter-spacing: -.02em; line-height: normal; }
.pf-eingang-fono { color: #6ea8e8; }
.pf-eingang-care { color: #2fd4bd; }
.pf-eingang-claim { margin: 0 0 1.25rem; font-size: 2.125rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: #fff; }
.pf-eingang-text { margin: 0; font-size: 1rem; line-height: 1.65; color: #9fb8c4; }
/* Fonocares #6a8694 erreicht auf #0d2331 kein AA; #8aa3b0 schon */
.pf-eingang-fuss { margin: 0; font-size: .84375rem; line-height: normal; color: #8aa3b0; }
/* Rechte Seite (Fonocares .main) mit der Karte (.card): höchstens 420 px, 40 px innen, Lücke 20 px */
.pf-eingang-haupt { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.pf-eingang-karte {
  box-sizing: border-box; display: flex; flex-direction: column; gap: 1.25rem; width: 100%; max-width: 26.25rem; min-width: 0;
  padding: 2.5rem; background: var(--pf-flaeche); border: 1px solid var(--pf-rand); border-radius: .75rem;
  box-shadow: 0 1.125rem 2.75rem rgba(13, 35, 49, .07); overflow-wrap: break-word;
}
.pf-eingang-icon { display: block; width: 3.625rem; height: 3.625rem; align-self: flex-start; }
.pf-eingang-kopf { min-width: 0; }
.pf-eingang-titel { margin: 0; font-size: 1.625rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--pf-text); }
.pf-eingang-titel:focus, .pf-eingang-titel:focus-visible { outline: none; } /* Fokus nur für Vorleser (tabindex=-1) */
.pf-eingang-unter { margin: .375rem 0 0; font-size: .90625rem; line-height: 1.5; color: var(--pf-text-leise); }
.pf-eingang-text-karte { margin: 0; font-size: .9375rem; line-height: 1.6; color: var(--pf-text-2); }
.pf-eingang-so { margin: 0; font-size: .875rem; line-height: 1.6; color: var(--pf-text-2); }
.pf-eingang-form { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.pf-eingang-knoepfe { display: flex; flex-wrap: wrap; gap: .625rem; }
/* Felder (ui.formfeld): Beschriftung 13,5 px fett, Eingabe 48 px mit 1,5 px Rand und 12 px Ecken */
.pf-eingang-karte .feld { gap: .5rem; }
.pf-eingang-karte .feld-label { font-size: .84375rem; font-weight: 700; line-height: normal; color: var(--pf-text-2); }
.pf-eingang-karte .feld-hilfe { margin: 0; font-size: .8125rem; line-height: 1.45; color: var(--pf-text-mut); }
.pf-eingang-karte .feld-fehler { margin: 0; font-size: .84375rem; line-height: 1.45; font-weight: 700; color: var(--pf-rot); }
/* Fehlertext unter der Beschriftung und über der Eingabe (wie /testzugang/, 16.14 H4): öffnet sich am Handy die
 * Tastatur, bleibt er mit der Eingabe im Bild. DOM und aria-describedby bleiben; bei Kästchen steht er darunter. */
.pf-eingang-karte .feld > .feld-label { order: 0; }
.pf-eingang-karte .feld > .feld-fehler { order: 1; }
.pf-eingang-karte .feld > .feld-hilfe { order: 2; }
.pf-eingang-karte .feld > .eingabe { order: 3; }
.pf-eingang-karte .eingabe {
  box-sizing: border-box; width: 100%; min-height: 3rem; padding: .375rem 1rem; border: 1.5px solid var(--pf-rand-eingabe);
  border-radius: .75rem; background: #fff; color: var(--pf-text); font-family: var(--pf-schrift); font-size: var(--pf-gr-eingabe);
  line-height: 1.4;
}
.pf-eingang-karte .eingabe::placeholder { color: #6b7c80; opacity: 1; }
.pf-eingang-karte .eingabe:focus-visible { outline: 2px solid var(--pf-akzent); outline-offset: 1px; border-color: var(--pf-akzent); }
.pf-eingang-karte .eingabe[aria-invalid="true"] { border-color: var(--pf-rot); background: #fffafa; }
.pf-eingang-karte .eingabe--gross { font-size: 1.375rem; letter-spacing: .2em; text-align: center; }
.pf-eingang-karte .ankreuzen {
  min-height: 2.75rem; padding: .5rem 0; gap: .625rem; align-items: flex-start; font-size: .875rem; line-height: 1.5;
  color: var(--pf-text-2);
}
.pf-eingang-karte .ankreuzen input { width: 1.125rem; height: 1.125rem; margin: .1875rem 0 0; accent-color: var(--pf-akzent-knopf); }
.pf-eingang-karte .ankreuzen input[aria-invalid="true"] { outline: 2px solid var(--pf-rot); outline-offset: 1px; }
/* Hauptknopf (Fonocares button): volle Breite, 52 px, 16 px fett, Hover nur mit Maus */
.pf-eingang-karte .knopf { border-radius: .75rem; font-family: var(--pf-schrift); }
.pf-eingang-karte .knopf--primaer, .pf-eingang-knopf {
  min-height: 3.25rem; padding: .5rem 1.25rem; background: var(--pf-akzent-knopf); border-color: var(--pf-akzent-knopf); color: #fff;
  font-size: 1rem; font-weight: 700;
}
@media (hover: hover) {
  .pf-eingang-karte .knopf--primaer:hover, .pf-eingang-knopf:hover { background: var(--pf-akzent-dunkel); border-color: var(--pf-akzent-dunkel); color: #fff; }
}
.pf-eingang-karte .knopf:focus-visible { outline: 3px solid var(--pf-marke); outline-offset: 2px; }
.pf-eingang-karte .knopf--leise { min-height: 2.75rem; color: var(--pf-text-leise); font-weight: 600; font-size: .875rem; }
/* Fehlerkasten (Fonocares .err) */
.pf-eingang-fehler {
  margin: 0; padding: .75rem .875rem; background: var(--pf-rot-grund); border: 1px solid var(--pf-rot-rand); border-radius: .75rem;
  color: var(--pf-rot); font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere;
}
.pf-eingang-warten { margin: 0; font-size: .875rem; font-weight: 700; color: var(--pf-gelb-text); }
.pf-eingang-warten:empty { display: none; }
.pf-eingang-trenner { height: 1px; background: var(--pf-rand); }
.pf-eingang-zugang { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--pf-text-leise); }
.pf-eingang-zugang .pf-eingang-link { font-weight: 700; }
.pf-eingang-hinweis { margin: 0; font-size: .78125rem; line-height: 1.5; color: var(--pf-text-mut); }
.pf-eingang-zeilen { display: flex; flex-direction: column; gap: .25rem; margin-top: -.25rem; }
.pf-eingang-leise { margin: 0; font-size: .8125rem; line-height: 1.5; color: var(--pf-text-mut); }
/* Links: Ziel 44 px, am PC mit Maus 24 px (WCAG 2.5.8) */
.pf-eingang-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--pf-akzent-dunkel); text-decoration: none; }
@media (hover: hover) { .pf-eingang-link:hover { color: var(--pf-akzent-tief); text-decoration: underline; } }
.pf-eingang-link:focus-visible { outline: 3px solid var(--pf-akzent-dunkel); outline-offset: 2px; border-radius: .25rem; }
@media (pointer: fine) {
  .pf-eingang-link { min-height: 1.5rem; }
  .pf-eingang-karte .ankreuzen { min-height: 1.5rem; }
}
/* Liste der Einrichtung: Pflegedienst, E-Mail, Link gilt bis. Beschriftung über dem Wert (wie .va-raster einspaltig):
 * mit zwei Spalten blieben dem Wert am Handy mit großer Schrift nur 22 px (Befund Handy 1, Durchlauf 4) */
.pf-eingang-liste {
  margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: .125rem; padding: .875rem 1rem;
  background: var(--pf-grund-2); border: 1px solid var(--pf-rand); border-radius: .75rem; font-size: .875rem; line-height: 1.45;
}
.pf-eingang-liste dt { min-width: 0; color: var(--pf-text-leise); font-weight: 600; }
.pf-eingang-liste dd { margin: 0; min-width: 0; color: var(--pf-text); font-weight: 600; overflow-wrap: anywhere; hyphens: manual; }
.pf-eingang-liste dd + dt { margin-top: .5rem; }
/* Zwei-Faktor in der Karte: QR höchstens 13.5rem, Schlüssel bricht nur zwischen den Vierergruppen um (ohne
 * Trennstriche, Befund Handy 4), Absätze mit Zeilenhöhe 1.5 wie die Schritte (Befund Handy 5) */
.pf-eingang-karte .titel-2 { margin: 0; font-size: 1.125rem; font-weight: 800; letter-spacing: -.01em; }
.pf-eingang-karte .va-schritte { gap: .5rem; font-size: .875rem; line-height: 1.5; color: var(--pf-text-2); }
.pf-eingang-karte .va-totp-flach p { line-height: 1.5; }
.pf-eingang-karte .va-qr { width: min(13.5rem, 100%); }
.pf-eingang-karte .va-geheimnis { hyphens: none; overflow-wrap: anywhere; word-break: normal; font-size: 1rem; }
/* Weg am Handy vor dem QR-Code: Satz und „In der Zwei-Faktor-App öffnen“, nur bei Bedienung mit dem Finger (Befund
 * Handy 2) */
.pf-eingang-karte .va-app-weg,
.pf-eingang-karte .va-app-link { display: none; }
@media (pointer: coarse) {
  .pf-eingang-karte .va-app-weg {
    display: flex; flex-direction: column; gap: .75rem; padding: .875rem 1rem; background: var(--pf-akzent-hell);
    border: 1px solid var(--pf-rand); border-radius: .75rem;
  }
  .pf-eingang-karte .va-app-link { display: inline-flex; }
}
.pf-eingang-karte .va-app-weg p { margin: 0; font-size: .875rem; color: var(--pf-text); }
.pf-eingang-karte .va-app-link { min-height: 3rem; }
/* Zweitknöpfe in der Karte („In der Zwei-Faktor-App öffnen“, „Schlüssel kopieren“, „Abmelden“) wie Fonocares Ghost-Knopf
 * statt im DocuFill-Blau (Befund Handy 6) */
.pf-eingang-karte .knopf--sekundaer {
  background: var(--pf-flaeche); border: 1.5px solid var(--pf-rand-eingabe); color: var(--pf-akzent-dunkel); font-weight: 700;
}
@media (hover: hover) {
  .pf-eingang-karte .knopf--sekundaer:hover { background: var(--pf-grund-2); border-color: var(--pf-akzent); color: var(--pf-akzent-tief); }
}
/* „Kontakt aufnehmen“ unter dem Ablauf-Text (Befund Handy 7) */
.pf-eingang-kontakt { margin: -.5rem 0 0; font-size: .875rem; line-height: 1.5; }
.pf-eingang-kontakt .pf-eingang-link { font-weight: 700; }
.pf-eingang-laden { min-height: 3rem; }
/* Zwei-Faktor in der Karte: Einrichtung und Code-Formular mit dem Abstand der Karte; keine Pflichtmarke (wie Fonocare,
 * `required` bleibt am Feld) */
.pf-eingang-totp { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.pf-eingang-karte .feld-pflicht { display: none; }
.pf-eingang-karte .formular { gap: 1rem; }
/* Unter 820 px (51.25em): Spalte weg, Haupt und Karte enger (wie Fonocare) */
@media (max-width: 51.2475em) {
  .pf-eingang-seite { display: none; }
  .pf-eingang-haupt { padding: 1.25rem 1rem; }
  .pf-eingang-karte { padding: 1.75rem 1.375rem; }
}

/* Markenleiste der App über öffentlichen Seiten ohne Leisten (Einladung, PIN-Anmeldung) */
.pf-marke-oben { display: flex; align-items: center; justify-content: center; gap: .5625rem; padding: 1rem 0 .25rem; }
.pf-marke-oben .pf-marke-oben-icon { width: 2rem; height: 2rem; }
.pf-marke-oben .pf-marke { font-size: 1.3125rem; }

/* Hinweis „nur erfundene Daten“ (nur im Testzugang im DOM) */
.pf-erfunden {
  display: flex; align-items: flex-start; gap: .5rem; margin: 0; padding: .5rem .75rem; max-width: 100%; min-width: 0;
  background: var(--pf-gelb-warte); border: 1px solid var(--pf-gelb-rand); border-radius: .625rem; color: var(--pf-gelb-text);
  font-family: var(--pf-schrift); font-size: .8125rem; font-weight: 600; line-height: 1.45; text-align: left; overflow-wrap: anywhere;
}
.pf-erfunden .pf-erfunden-symbol { width: 1rem; height: 1rem; flex: 0 0 auto; margin-top: .0625rem; }
.pf-erfunden > span { min-width: 0; }
.pf-mic-bereich > .pf-erfunden { align-self: center; }

/* Zugang zurücksetzen, Durchlauf 5 Teil A (VERTRAG.md 18.4.7): Codes und Weg mit Code in der Fonocare-Karte, Satz bei
 * Verlust unter dem Formular. Nur in der Karte des Eingangs (.pf-eingang-karte) oder mit Präfix .pf-. */
.pf-eingang-karte .va-codes-liste { background: var(--pf-grund-2); border: 1px solid var(--pf-rand); border-radius: .75rem;
  font-size: 1rem; color: var(--pf-text); }
.pf-eingang-karte .va-codes .ankreuzen { font-weight: 600; color: var(--pf-text); }
.pf-eingang-karte .va-weg-knopf { color: var(--pf-akzent-dunkel); font-size: .875rem; text-decoration: none; padding-left: 0; }
@media (hover: hover) { .pf-eingang-karte .va-weg-knopf:hover { color: var(--pf-akzent-tief); text-decoration: underline; } }
.pf-eingang-verlust .pf-eingang-link { font-weight: 700; }
/* Ende Zugang zurücksetzen */

/* Nacharbeit Durchlauf 5 (VERTRAG.md 18.13): Löschdatum unter dem Ablauf-Text der Anmeldung (403 „testzeit“) */
.pf-eingang-daten { margin: -.5rem 0 0; font-size: .875rem; line-height: 1.5; color: var(--pf-text); overflow-wrap: anywhere; }
.pf-eingang-daten[hidden] { display: none; }
/* Ende Nacharbeit */
