/* =====================================================================
   css/notizen.css — Markdown-Notizen (Paket P5, 13.10.2026,
   docs/KURS-P5-NOTIZEN-2026-10-13.md)

   Portal: nur --pp-Tokens, Schriftgrößen aus der Leiter, Zeilenhöhen aus
   den vier Stufen, Abstände ab 16 px im 4-px-Raster (verify-skala.js führt
   diese Datei in PORTAL). Die gesetzte Notiz (.nz-inhalt) trägt wie .ki-msg
   white-space: pre-wrap — mdLite gibt Zeilenumbrüche als Text zurück, ein
   Block (Überschrift, Zitat, Code) schluckt seinen Umbruch selbst.
   Präfix .nz-.
   ===================================================================== */

.nz-wirt { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; min-width: 0; }
.nz-wirt-seite { padding: 16px; }

/* ---- Kopf (UI1015-U2: statt der Werkzeugleiste) ----
   Titel (außerhalb der Arbeitsumgebung), „Noch eins" und der Stand; die
   Handgriffe stehen im Menü (Rechtsklick/Long-Press auf Kopf oder Reiter). */
.nz-leiste { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 12px; border-bottom: 1px dashed var(--pp-line); flex: none; min-height: 32px; }
.nz-wirt-seite .nz-leiste { padding: 0 0 12px; }
.nz-kopf { -webkit-touch-callout: none; cursor: context-menu; }
.nz-kopf:focus-visible { outline: 2px solid var(--pp-accent); outline-offset: -2px; }
.nz-kopf-titel { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--pp-fs-klein); line-height: var(--pp-lh-eng); font-weight: 600; color: var(--pp-text); }
/* In der Arbeitsumgebung nennt der Reiter die Notiz — der Kopf ist nur der Stand. */
.nz-kopf-reiter { min-height: 0; padding-top: 4px; padding-bottom: 4px; border-bottom: 0; }
/* sim1016-R5 (A4-02, A2-09, A7-05) + UI-Nachtrag 17.10.2026: das sichtbare
   Menü-Ziel „⋯" (vorher „Aa", nur am Finger) steht auf JEDEM Gerät oben
   rechts im Kopf, hinter dem Stand — wie das ⋯ im Heft. Am Laptop
   28 × 24 px (DK-15), am Finger ((pointer: coarse), nicht die
   Fensterbreite) 44 × 44 px. Derselbe Knopf steht über der Tastatur in
   .nz-tastatur (js/notizen.js tastaturLage), solange sie offen ist. */
.nz-menue-knopf {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 28px; min-height: 24px; padding: 0 6px; box-sizing: border-box;
  border: 1px solid var(--pp-line); border-radius: 6px; background: var(--pp-surface); color: var(--pp-text);
  font: inherit; font-size: var(--pp-fs-text); line-height: var(--pp-lh-eng); font-weight: 600;
  cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.nz-menue-knopf:hover { background: var(--pp-accent-tint); }
.nz-menue-knopf:focus-visible { outline: 2px solid var(--pp-accent); outline-offset: 1px; }
.nz-tastatur { position: fixed; right: 12px; top: 0; z-index: 130; }
.nz-tastatur[hidden] { display: none; }
@media (pointer: coarse) {
  .nz-menue-knopf { min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 8px; }
  .nz-menue-knopf:active { background: var(--pp-accent-tint); }
  .nz-tastatur .nz-menue-knopf { box-shadow: var(--pp-lift); }
}
.nz-tb {
  border: 1px solid var(--pp-line); background: var(--pp-surface); color: var(--pp-text-2);
  font: inherit; font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng);
  padding: 3px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap;
  min-height: 24px;   /* DK-15: am Laptop 24 (vorher 19), WCAG 2.2 2.5.8 */
}
.nz-tb:hover { background: var(--pp-accent-tint); color: var(--pp-text); }
.nz-stand { margin-left: auto; font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng); color: var(--pp-text-3, var(--pp-text-2)); white-space: nowrap; }
/* QA1013-Q03 (W4-19): die Warnung über der zu langen Notiz — steht, bis sie wieder passt. */
.nz-warnung { margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--pp-err); border-radius: 8px; background: var(--pp-err-tint); color: var(--pp-text); font-size: var(--pp-fs-klein); line-height: var(--pp-lh-text); }

/* ---- Körper ---- */
.nz-koerper { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px 16px; }
.nz-wirt-seite .nz-koerper { padding: 12px 0; overflow: visible; }
.nz-md {
  width: 100%; box-sizing: border-box; min-height: 16em; resize: vertical;
  font-family: var(--pp-mono); font-size: var(--pp-fs-klein); line-height: var(--pp-lh-text);
  color: var(--pp-text); background: var(--pp-bg); border: 1px solid var(--pp-line); border-radius: 8px; padding: 12px;
}
.nz-wirt-seite .nz-md { min-height: 28em; }
.nz-inhalt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--pp-fs-text); line-height: var(--pp-lh-text); color: var(--pp-text); }
.nz-inhalt .ki-h1 { font-size: var(--pp-fs-h2); line-height: var(--pp-lh-knapp); font-weight: 600; margin: 0 0 4px; }
.nz-inhalt .ki-h2 { font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng); text-transform: uppercase; letter-spacing: .06em; color: var(--pp-text-2); margin: 16px 0 4px; font-weight: 600; }
.nz-inhalt .ki-h3 { font-size: var(--pp-fs-text); line-height: var(--pp-lh-knapp); font-weight: 600; margin: 12px 0 2px; }
.nz-inhalt ul, .nz-inhalt ol { margin: 4px 0; padding-left: 20px; white-space: normal; }
.nz-inhalt li { margin: 2px 0; }
.nz-inhalt code { font-family: var(--pp-mono); font-size: var(--pp-fs-klein); background: var(--pp-surface); padding: 0 4px; border-radius: 4px; }
.nz-code { margin: 6px 0; padding: 8px 12px; background: var(--pp-surface); border: 1px solid var(--pp-line); border-radius: 8px; overflow: auto; white-space: pre; font-size: var(--pp-fs-klein); line-height: var(--pp-lh-text); }
.nz-code code { background: none; padding: 0; }
.nz-zitat { margin: 6px 0; padding: 6px 12px; border-left: 3px solid var(--pp-accent-line); background: var(--pp-surface); border-radius: 0 6px 6px 0; color: var(--pp-text-2); }
.nz-inhalt table { border-collapse: collapse; margin: 6px 0; white-space: normal; font-size: var(--pp-fs-klein); line-height: var(--pp-lh-knapp); }
.nz-inhalt th, .nz-inhalt td { border: 1px solid var(--pp-line); padding: 3px 8px; text-align: left; }
.nz-inhalt th { background: var(--pp-surface); font-weight: 600; }
.nz-inhalt hr { border: 0; border-top: 1px solid var(--pp-line); margin: 8px 0; }
.nz-inhalt s { color: var(--pp-text-2); }
.nz-cb { vertical-align: -2px; margin: 0 4px 0 0; accent-color: var(--pp-accent); }
/* D1-08 (web1014, 14.10.2026): Das Aufgabenkästchen einer Notiz maß am
   Finger 13 × 13 px — wirksam ebenso, die Zeilen stehen 24 px auseinander.
   Es steckt in einem <label> (js/notizen.js, Schritt 7), und am Finger
   wird die ZEILE eines Kästchens 44 px hoch (das Label als inline-flex
   mit min-height zieht ihre Zeilenbox mit) und das Label bekommt den
   44er Vorsatz des Lernplan-Kästchens (C48). Erst beides zusammen: Ein
   Vorsatz allein über 24-px-Zeilen läge zur Hälfte auf dem Kästchen der
   Nachbarzeile, und der spätere gewönne. Mit Maus pixelgleich. */
.nz-cb-l { cursor: pointer; }
@media (pointer: coarse) {
  .nz-cb-l { position: relative; display: inline-flex; align-items: center; min-height: 44px; vertical-align: middle; }
  .nz-cb-l .nz-cb { vertical-align: baseline; }
  .nz-cb-l::before {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 44px; height: 44px; transform: translate(-50%, -50%);
  }
}
.nz-a { color: var(--pp-accent-2); text-decoration: underline; }
.nz-a-aus { text-decoration: line-through dotted; color: var(--pp-text-2); }

/* Eigenschaften (schlüssel:: wert) und Tags */
.nz-props { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 0 0 8px; font-size: var(--pp-fs-klein); line-height: var(--pp-lh-eng); color: var(--pp-text-2); white-space: normal; }
.nz-prop b { font-weight: 600; color: var(--pp-text-2); margin-right: 4px; }
.nz-tag { color: var(--pp-accent-2); font-size: var(--pp-fs-klein); }

/* Verweis-Chips: Ziel gefunden (Rahmen), ungelöst (gestrichelt), Quelle (Chat: nur Auskunft). */
.nz-wl {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 5px; vertical-align: 1px;
  background: var(--pp-accent-tint); color: var(--pp-accent-2); border: 1px solid var(--pp-accent-line);
  font: inherit; font-size: var(--pp-fs-klein); line-height: var(--pp-lh-knapp); cursor: pointer; white-space: nowrap; max-width: 100%;
}
.nz-wl i { font-style: normal; font-size: var(--pp-fs-mini); color: var(--pp-text-2); }
.nz-wl:hover { filter: brightness(1.08); }
.nz-wl.nz-ungeloest { border-style: dashed; background: transparent; color: var(--pp-text-2); cursor: default; }
.nz-wl.nz-quelle { background: var(--pp-surface); border-color: var(--pp-line); color: var(--pp-text-2); cursor: default; }

/* Einbettungen */
.nz-emb { border: 1px solid var(--pp-line); border-radius: 8px; background: var(--pp-bg); margin: 6px 0; overflow: hidden; white-space: normal; }
.nz-emb-kopf { display: flex; gap: 6px; align-items: center; padding: 6px 12px; font-size: var(--pp-fs-klein); line-height: var(--pp-lh-knapp); color: var(--pp-text-2); border-bottom: 1px solid var(--pp-line); }
.nz-emb-kopf i { font-style: normal; }
.nz-emb-kopf b { color: var(--pp-text); font-weight: 600; }
.nz-emb-kopf .nz-wl { margin-left: auto; }
.nz-emb-art { color: var(--pp-text-2); }
.nz-emb-inhalt { padding: 8px 12px; font-size: var(--pp-fs-klein); line-height: var(--pp-lh-text); color: var(--pp-text-2); }
.nz-emb-leer { display: flex; align-items: center; gap: 8px; padding: 6px 12px; }
.nz-emb-hinweis { font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng); color: var(--pp-text-2); }
.nz-mini { display: block; width: 100%; height: auto; background-image: linear-gradient(var(--pp-line) 1px, transparent 1px), linear-gradient(90deg, var(--pp-line) 1px, transparent 1px); background-size: 16px 16px; }
.nz-mini-kanten line { stroke: var(--pp-accent-line); stroke-width: 1.2; }
.nz-mini-kaesten rect { fill: var(--pp-surface); stroke: var(--pp-line); stroke-width: 1; }
.nz-mini-kaesten text { font-family: var(--pp-sans); font-size: var(--pp-fs-mini); fill: var(--pp-text); }
/* AUSBAU-A2: eine eingebettete KARTE (![[Fläche: …#karte]]) — die Karte hervorgehoben bzw. als Text. */
.nz-mini-kaesten .nz-mini-hervor rect { stroke: var(--pp-accent); stroke-width: 2.5; }
.nz-emb-karte { padding: var(--pp-sp-2) var(--pp-sp-3); border-left: 3px solid var(--pp-accent-line); }
.nz-heftseite { display: block; max-width: 100%; height: auto; border-radius: 4px; }
.nz-task { display: flex; flex-direction: column; gap: 4px; }
.nz-task-exam { font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng); color: var(--pp-text-2); }
.nz-task-titel { font-size: var(--pp-fs-text); line-height: var(--pp-lh-knapp); color: var(--pp-text); font-weight: 600; }
.nz-task-fuss { display: flex; align-items: center; gap: 8px; }
.nz-task-fuss .nz-task-ueben { margin-left: auto; }
.nz-chip { font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng); padding: 1px 6px; border: 1px solid var(--pp-line); border-radius: 4px; color: var(--pp-text-2); }

/* Picker */
.nz-picker { border: 1px solid var(--pp-line); border-radius: 8px; background: var(--pp-surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); margin: 0 0 8px; overflow: hidden; }
/* Schwebend an der Schreibmarke (NOTIZ-R4, js/notizen.js pickerSchweben):
   über allem außer den Kontextmenüs (.pp-ctx 140). */
.nz-picker.nz-picker-schwebt { position: fixed; z-index: 130; margin: 0; max-width: calc(100vw - 16px); }
.nz-picker-such { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--pp-line); background: var(--pp-bg); color: var(--pp-text); font-family: var(--pp-mono); font-size: var(--pp-fs-klein); line-height: var(--pp-lh-text); padding: 6px 12px; }
.nz-picker-liste { max-height: 240px; overflow: auto; }
.nz-picker-gruppe { padding: 6px 12px 2px; font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng); text-transform: uppercase; letter-spacing: .06em; color: var(--pp-text-2); }
.nz-picker-kn { display: flex; gap: 8px; width: 100%; text-align: left; padding: 4px 12px; border: 0; background: none; color: var(--pp-text); font: inherit; font-size: var(--pp-fs-klein); line-height: var(--pp-lh-knapp); cursor: pointer; }
.nz-picker-kn:hover { background: var(--pp-accent-tint); }
/* Der Picker ist eine Tastaturliste: Fokus ohne Ring wäre unsichtbar. Ersatz-Ring
   innen, wie bei den anderen pp-pick-Zeilen (verify-ns0929-p5, Regel 1). */
.nz-picker-kn:focus-visible { background: var(--pp-accent-tint); outline: none; box-shadow: inset 0 0 0 2px var(--pp-accent); }
/* Die mit ↑/↓ markierte Zeile — dieselbe Fläche wie :hover (der Fokus bleibt im Suchfeld). */
.nz-picker-kn.on { background: var(--pp-accent-tint); }
.nz-picker-kn i { font-style: normal; color: var(--pp-text-2); }
.nz-picker-kn span { margin-left: auto; color: var(--pp-text-2); font-size: var(--pp-fs-mini); white-space: nowrap; }

/* Backlinks und Leerzustand */
.nz-backlinks { flex: none; padding: 0 16px 12px; }
.nz-backlinks:empty { display: none; }
.nz-backlinks h4 { margin: 8px 0 4px; font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng); text-transform: uppercase; letter-spacing: .06em; color: var(--pp-text-2); font-weight: 600; }
.nz-backlinks > div { padding: 2px 0; }
.nz-leer { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.nz-leer-satz { font-size: var(--pp-fs-klein); line-height: var(--pp-lh-text); color: var(--pp-text-2); }
.nz-leer-wege { display: flex; gap: 8px; flex-wrap: wrap; }

/* Der Lauf des Zusammenfassers (Dialog) */
.nz-lauf { display: flex; flex-direction: column; gap: 12px; }
.nz-lauf-text { font-size: var(--pp-fs-text); line-height: var(--pp-lh-text); color: var(--pp-text); }
.nz-lauf-zaehler { font-family: var(--pp-mono); font-size: var(--pp-fs-klein); line-height: var(--pp-lh-eng); color: var(--pp-text-2); min-height: 1.2em; }

/* Die Seite #notiz/<id> */
.nz-seite-karte { padding: 16px; }
.nz-seite-karte .nz-slot { display: flex; flex-direction: column; }

/* Das Arbeitsfenster: dieselbe nachgebende Kette wie der Heft-Wirt
   (Körper → Slot → Wirt), sonst hält ein Glied die Ansicht fest (Fallstrick 41). */
.arb-koerper-notiz { display: flex; flex-direction: column; min-height: 0; }
.arb-notizslot { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

/* Der Chat-Knopf „▤ Notiz" — wie .ki-druck daneben */
.ki-notiz { }

/* ---- P6 (13.10.2026): die Notiz als Karte der Fläche und Bilder im Text ----
   Die Karte trägt Kopf (zum Anfassen) und Leib (die gesetzte Notiz, eigene
   Rolle — Klicks darin gehören den Verweisen und Kästchen, data-sb-bedien).
   docs/KURS-P6-NOTIZ-FLAECHE-HEFT-2026-10-13.md. */
.nz-karte { display: flex; flex-direction: column; height: 100%; min-height: 0; min-width: 0; }
.nz-karte-kopf { display: flex; align-items: center; gap: 6px; padding: 0 0 6px; border-bottom: 1px dashed var(--pp-line); flex: none;
  font-size: var(--pp-fs-klein); line-height: var(--pp-lh-eng); color: var(--pp-text-2); min-width: 0; }
.nz-karte-kopf i { font-style: normal; }
.nz-karte-kopf b { color: var(--pp-text); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nz-karte-art { font-family: var(--pp-mono); font-size: var(--pp-fs-mini); color: var(--pp-text-2); }
.nz-karte-auf { margin-left: auto; flex: none; }
.nz-karte-leib { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 0 0; font-size: var(--pp-fs-klein); }
.nz-bild { display: block; max-width: 100%; height: auto; border-radius: 4px; }
/* F2 (13.10.2026): der Dreh-Knopf liegt auf dem Foto, oben rechts — 44 px. */
.nz-bild-wirt { position: relative; display: inline-block; max-width: 100%; }
.nz-bild-dreh {
  position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; margin: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  font: inherit; font-size: var(--pp-fs-h1); line-height: var(--pp-lh-eng); color: var(--pp-text);
  background: var(--pp-surface); border: 1px solid var(--pp-line); border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); opacity: .85;
}
.nz-bild-dreh:hover, .nz-bild-dreh:focus-visible { opacity: 1; }
.nz-bild-dreh:focus-visible { outline: 2px solid var(--pp-accent); outline-offset: 1px; }
/* „Noch eins" (F3): sichtbar nur in der Frist nach einem Foto. */
.nz-foto-noch { font-weight: 600; color: var(--pp-text); border-color: var(--pp-accent-line); }
.nz-foto-noch[hidden] { display: none; }
.nz-emb-bild { border: none; background: none; }
.nz-emb-bild .nz-emb-inhalt { padding: 0; }
/* Y2 (15.10.2026, docs/FOKUS-Y2-2026-10-15.md): Bilder größer/kleiner ziehen.
   Die Hülle ist so breit wie das Bild (fit-content), damit der Griff an der
   Bildecke sitzt und nicht am Spaltenrand. Mit Breite aus dem Text
   (`|300` → style.width) füllt das Bild die Hülle; die Spalte schneidet
   (max-width), die Höhe folgt (height: auto) — das Verhältnis bleibt. */
.nz-emb-bild { position: relative; width: -webkit-fit-content; width: fit-content; max-width: 100%; }
/* Die Grundlinie unter dem inline-block-Wirt (WebKit: 5 px) läge sonst
   zwischen Bildecke und Griff. */
.nz-emb-bild .nz-bild-wirt { vertical-align: top; }
.nz-emb-bild[data-nz-breite] .nz-bild-wirt { display: block; }
.nz-emb-bild[data-nz-breite] .nz-bild { width: 100%; }
.nz-bild-griff {
  position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; z-index: 1;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 3px 3px 0; box-sizing: border-box;
  color: var(--pp-text); background: var(--pp-surface); border-top-left-radius: 8px;
  border-top: 1px solid var(--pp-line); border-left: 1px solid var(--pp-line);
  cursor: nwse-resize; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  opacity: 0;
}
.nz-emb-bild:hover .nz-bild-griff, .nz-bild-zieht .nz-bild-griff { opacity: .9; }
.nz-bild-zieht .nz-bild { outline: 2px solid var(--pp-accent); outline-offset: 0; }
/* Unter 100 px ruht der Dreh-Knopf (kleinMarken) — sonst läge er auf dem Griff. */
.nz-bild-klein .nz-bild-dreh { display: none; }
/* Die Breite beim Ziehen, als Zahl an der Ecke. */
.nz-bild-griff[data-px]::before {
  content: attr(data-px) " px"; position: absolute; right: 26px; bottom: 2px; white-space: nowrap;
  font-family: var(--pp-mono); font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng);
  color: var(--pp-text); background: var(--pp-surface); border: 1px solid var(--pp-line); border-radius: 4px; padding: 1px 5px;
}
/* Finger: kein Überfahren, also immer sichtbar — und 44 px Trefferfläche. */
@media (pointer: coarse) {
  .nz-bild-griff { width: 44px; height: 44px; padding: 0 8px 8px 0; opacity: .85; }
  .nz-bild-griff[data-px]::before { right: 48px; bottom: 8px; }
}

/* ---- Finger (iPad, Telefon): 44 px Trefferfläche ----
   WebKit-Abnahme 13.10. abends: auf 1194/834/390 px waren die Knöpfe der
   Leiste 19 px hoch, das Notiz-Menü 21 px, die Picker-Zeilen 25 px — mit
   dem Finger in der Vorlesung kaum zu treffen. Die Chips im Text bleiben
   klein: Verweise im Fließtext sind von der Mindestgröße ausgenommen
   (WCAG 2.5.8 „inline"), eine 44-px-Zeile risse den Absatz auseinander. */
@media (hover: none) {
  .nz-tb { min-height: 44px; min-width: 44px; }
  /* DK-14: Die Verweis-Chips bleiben im Fließtext klein (WCAG-Ausnahme
     „inline"), wirken aber über einen Vorsatz 33 px hoch statt 19. */
  .nz-wl { position: relative; }
  .nz-wl::before { content: ""; position: absolute; left: -2px; right: -2px; top: -7px; bottom: -7px; }
  .nz-picker-kn { min-height: 44px; align-items: center; }
  /* Der „Öffnen"-Knopf der notiz-Karte auf der Fläche (P6) maß auf 390 px
     55 × 35 (WebKit-Abnahme der Notiz-Einheit, 13.10.2026). */
  .nz-karte-auf { min-height: 44px; }
}

/* ---- Die Notiz-Einheit (13.10.2026, docs/NOTIZ-EINHEIT-2026-10-13.md) ----
   KEINE BOX (Jonas, Entscheidung 3): Seite, Leseansicht, Live-Editor und
   Quelltext tragen weder Rand noch eigenen Grund — die Notiz steht in der
   Farbe des Hintergrunds, hell wie dunkel. Der Live-Editor (js/notiz-live.js)
   ist ein contenteditable aus Blöcken: .nz-blk.roh zeigt Quelltext (pre-wrap
   ist FUNKTION — Code-Zaun und Block-Mathe tragen Umbrüche im Innern),
   .nz-blk > .nz-gesetzt die gesetzte Fassung (contenteditable="false"). */
.nz-seite { padding: 0; }
.nz-seite .nz-slot { display: flex; flex-direction: column; }
.nz-md { border: 0; background: transparent; padding: 12px 0; border-radius: 0; }
.nz-md:focus { outline: none; }
.nz-live {
  outline: none; cursor: text; min-height: 12em;
  /* Derselbe Fluss wie die Leseansicht (.nz-inhalt, pre-wrap): Bearbeiten
     sieht aus wie Lesen (Jonas, 13.10.2026 — „live gerendert wie in
     Obsidian“). */
  white-space: pre-wrap; overflow-wrap: anywhere;
  font-size: var(--pp-fs-text); line-height: var(--pp-lh-text); color: var(--pp-text);
  padding: 0 0 8em;   /* Luft, damit der letzte Block über der Tastatur bleibt */
}
.nz-wirt-seite .nz-live { min-height: 28em; }
/* KEIN Ring um die Notiz (NOTIZ-R4, Befunde p2 S2-6 / p3 #9): Der Live-
   Editor ist ein contenteditable und damit in WebKit nach jeder Eingabe
   :focus-visible — `.pp-root *:focus-visible` (css/prepp.css, 0,2,0) schlug
   das `outline: none` oben (0,1,0, Fallstrick 4) und zog einen 2-px-Kasten
   in Akzentblau um die ganze Notiz. Dieselbe begründete Ausnahme wie
   `.nz-md:focus` (test/verify-ns0929-p5.js, AUSNAHMEN): Die Notiz IST die
   Seite; der Fokus zeigt sich als Schreibmarke im Block wie in Obsidian. */
.nz-live:focus, .nz-live:focus-visible { outline: none; }
/* BEARBEITEN = LESEN (13.10.2026, gemessen in WebKit, tools/nb1013-messung.tmp.js):
   Die Blockhülle trägt weder Rand noch Innenabstand noch Mindesthöhe — nur so
   fallen die Außenabstände der gesetzten Elemente (Überschrift, Liste, Tabelle)
   über die Hüllen hinweg zusammen wie im EINEN Fluss der Leseansicht. Vorher
   (min-height je Block, eigene, kleinere Abstände für Überschriften, Listen,
   Code, Tabelle) wich die Notiz um bis zu 33 px ab. Die gesetzten Elemente
   tragen die Regeln von .nz-inhalt (der Wirt ist .nz-inhalt) — hier steht
   KEINE eigene Größe für sie. */
.nz-blk { margin: 0; padding: 0; border: 0; }
.nz-gesetzt { display: block; }
/* Eine leere Zeile ist eine Zeile hoch — wie der Umbruch im Fluss. */
.nz-gesetzt:empty::before { content: "\00a0"; }
/* Leere Schreibstelle der Vorlagen („- [ ] " ohne Text, NOTIZ-R4): ein
   Kästchen ohne Haken, gezeichnet — kein <input>, es zählt nicht als To-do. */
.nz-cb-leer { display: inline-block; box-sizing: border-box; width: 13px; height: 13px; margin: 0 4px 0 0; vertical-align: -2px;
  border: 1px solid var(--pp-text-2); border-radius: 3px; }
.nz-cb-leer.an { background: var(--pp-accent); border-color: var(--pp-accent); }
/* Der Platzhalter einer neuen Notiz steht in der ersten leeren Zeile unter
   den Kopfzeilen (js/notiz-live.js phPflegen) — statt des Leerzeichens, das
   die leere Zeile sonst eine Zeile hoch hält. */
.nz-gesetzt[data-ph]:empty::before { content: attr(data-ph); color: var(--pp-text-3, var(--pp-text-2)); pointer-events: none; }
/* Listen: die Leseansicht fasst Folgezeilen zu EINER Liste (mdBloecke), der
   Editor setzt je Zeile eine. data-lv/data-ln (js/notiz-live.js, markieren)
   nehmen den Außenabstand zwischen zwei gleichartigen Listenzeilen weg; der
   Abstand der Punkte (li 2 px) fällt dann zusammen wie dort. */
.nz-blk[data-lv] > .nz-gesetzt > .ki-liste { margin-top: 0; }
.nz-blk[data-ln] > .nz-gesetzt > .ki-liste { margin-bottom: 0; }
/* Der ROHE Block (Cursor darin): Quelltext in der Schrift, Größe und mit den
   Außenabständen seines gesetzten Gegenstücks — ohne Kasten, ohne Grund
   (Obsidian). pre-wrap ist FUNKTION: Code-Zaun und Block-Mathe tragen
   Umbrüche im Innern. Nur Code bleibt Mono, wie gesetzt. */
.nz-blk.roh { min-height: calc(var(--pp-lh-text) * 1em); white-space: pre-wrap; font-family: var(--pp-sans); font-size: var(--pp-fs-text); line-height: var(--pp-lh-text); color: var(--pp-text); }
.nz-blk.roh[data-art="h1"] { font-size: var(--pp-fs-h2); line-height: var(--pp-lh-knapp); font-weight: 600; margin: 0 0 4px; min-height: 0; }
.nz-blk.roh[data-art="h2"] { font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng); letter-spacing: .06em; color: var(--pp-text-2); font-weight: 600; margin: 16px 0 4px; min-height: 0; }
.nz-blk.roh[data-art="h3"] { line-height: var(--pp-lh-knapp); font-weight: 600; margin: 12px 0 2px; min-height: 0; }
.nz-blk.roh[data-art="liste"] { margin: 4px 0; }
.nz-blk.roh[data-art="liste"][data-lv] { margin-top: 2px; }
.nz-blk.roh[data-art="liste"][data-ln] { margin-bottom: 2px; }
.nz-blk.roh[data-art="props"] { font-size: var(--pp-fs-klein); color: var(--pp-text-2); margin: 0 0 8px; }
.nz-blk.roh[data-art="zitat"] { margin: 6px 0; padding: 6px 12px 6px 15px; color: var(--pp-text-2); }
.nz-blk.roh[data-art="code"] { margin: 6px 0; padding: 9px 13px; font-family: var(--pp-mono); font-size: var(--pp-fs-klein); }
.nz-blk.roh[data-art="tabelle"] { margin: 6px 0; font-size: var(--pp-fs-klein); }
.nz-blk.roh[data-art="emb"] { margin: 6px 0; }
/* Abgesetzte Formel: KaTeX setzt sie mit 1em Abstand oben (katex-display) — der
   Quelltext beginnt an derselben Stelle. */
.nz-blk.roh[data-art="mathe"] { margin-top: 1em; }
.nz-live[data-leer]::before { content: attr(data-ph); color: var(--pp-text-3, var(--pp-text-2)); pointer-events: none; display: block; margin-bottom: calc(var(--pp-lh-text) * -1em); }
/* Form-Marken in den Listen (app.js): ▣ Fläche, ✎ Heft an der Notiz-Zeile. */

/* ---- K2 EVENT-NOTIZ (14.10.2026, docs/EVENT-NOTIZ-2026-10-14.md) ----
   Die Marken des gepflegten Überblicks (HTML-Kommentare prepp:…) haben keine
   Höhe — gelesen verschluckt rendern sie, im Bearbeiten steht ein leerer
   Span (Bearbeiten = Lesen). Der Graph-Block steht wie ein Aufgabenbild auf
   weißem Papier (der Zeichner der Graph-Karte ist immer hell), darunter
   eine Zeile mit „⤢ Öffnen" und „→ Fläche". */
.nz-marke { display: none; }
.nz-graph { margin: 8px 0; white-space: normal; }
.nz-graph-bild { border: 1px solid var(--pp-line); border-radius: 8px; background: #fff; padding: 4px; overflow: hidden; }
/* Gezeichnet wird oft im noch nicht eingehängten Block (Breite unbekannt,
   Vorgabe 520 px) — das SVG hat eine viewBox und füllt die Spalte. */
.nz-graph-bild svg { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto; }
.nz-graph-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.nz-graph-knopf { min-height: 32px; padding: 4px 12px; border: 1px solid var(--pp-line); border-radius: 6px; background: var(--pp-surface); color: var(--pp-text); font: inherit; font-size: var(--pp-fs-klein); cursor: pointer; }
.nz-graph-knopf:hover { border-color: var(--pp-accent-line); }
.nz-graph-fehler { flex: 1 1 100%; font-size: var(--pp-fs-mini); line-height: var(--pp-lh-eng); color: var(--pp-text-2); }
.nz-pdfseite { display: block; max-width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--pp-line); }
.nz-emb-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.nz-emb-fuss .nz-emb-oeffnen { margin-left: auto; }
.nz-auszug { white-space: pre-wrap; max-height: 12em; overflow: auto; font-size: var(--pp-fs-klein); line-height: var(--pp-lh-text); color: var(--pp-text); }
.nz-va-karte { display: flex; flex-direction: column; gap: 4px; }
.nz-va-zeile { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.nz-podcast { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nz-podcast li { display: flex; align-items: center; gap: 8px; justify-content: space-between; }

/* AUSBAU-A1 (14.10.2026): die angesprungene Überschrift (#notiz/<id>#Abschnitt)
   und „Verweise aus: …" im Kopf von Heft und Fläche (Backlinks). */
@keyframes nz-anker-ping { 0% { background: var(--pp-accent-tint) } 100% { background: transparent } }
.nz-anker-ziel { animation: nz-anker-ping 1.8s ease-out; border-radius: 4px; }
.nz-verweise { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: var(--pp-fs-klein); min-width: 0; }
.hf-verweise:empty, .sb-verweise:empty { display: none; }
.hf-verweise, .sb-verweise { display: inline-flex; min-width: 0; overflow: hidden; }

/* ---- Die Notiz in der Lerngruppe, zeichengenau live (a1014-G5b, 15.10.2026,
   js/notiz-gruppe.js): Marke und Markierung der ANDEREN in ihrer Kürzel-Farbe
   (--nz-f, aus PreppGruppe.farbe). Die Deckschicht liegt im Wirt NEBEN dem
   contenteditable (nie darin: normalisieren() im Editor machte aus jedem
   fremden Knoten einen rohen Block), ohne Zeiger-Ereignisse — sie darf
   weder Klick noch Auswahl stören. Bearbeiten = Lesen bleibt: nichts hier
   trägt Abstand oder Höhe. */
.nz-live-wirt { position: relative; }
.nz-fremd { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 2; }
.nz-fremd-cursor { position: absolute; width: 0; border-left: 2px solid var(--nz-f, var(--pp-accent)); margin-left: -1px; }
/* Die kleine Fahne am Strich bleibt immer (Farbe = Person); der NAME nur
   kurz nach einer Bewegung (a1014-fix-lv LV-11, Klasse nz-fremd-frisch aus
   js/notiz-gruppe.js) — stehend verdeckte er die Zeile darüber. 12 px und
   weiße Schrift auf einer Farbe mit ≥ 4,5 : 1 (LV-10, PreppGruppe.FARBEN). */
.nz-fremd-cursor::before { content: ""; position: absolute; left: -4px; top: -3px; width: 6px; height: 6px; border-radius: 1px; background: var(--nz-f, var(--pp-accent)); }
.nz-fremd-name { position: absolute; left: -1px; top: -1.25em; padding: 0 5px; border-radius: 4px 4px 4px 0;
  background: var(--nz-f, var(--pp-accent)); color: #fff; font-size: var(--pp-fs-klein); line-height: 1.25em; font-weight: 600; white-space: nowrap;
  opacity: 0; transition: opacity .25s ease; }
.nz-fremd-cursor.nz-fremd-frisch .nz-fremd-name { opacity: 1; }
.nz-fremd-auswahl { position: absolute; background: var(--nz-f, var(--pp-accent)); opacity: .14; border-radius: 3px; }
/* a1014-fix-lg LG-18: in der ersten Zeile unter der Marke, nie über der Zeile darüber. */
.nz-fremd-cursor.nz-fremd-unten .nz-fremd-name { top: 100%; border-radius: 0 4px 4px 4px; }
/* Nur lesen (Pass ruht): kein Textcursor über dem gesperrten Feld. */
.nz-live[data-nz-gesperrt] { cursor: default; }

/* ---------- kl1019 (19.10.2026, docs/KL1019.md) — Aufgabenlisten ----------
   Jonas: „Die Checkbox neben den Notizen ist noch ein bisschen schlecht
   formatiert." Gemessen (WebKit, Lesen UND Live-Editor): „•  ☐ Test" — der
   Listenpunkt blieb stehen, das Kästchen stand IM Text (Text 16 px weiter
   eingerückt als bei normalen Punkten) und 3,2 px unter der Mitte der
   ersten Zeile (vertical-align: −2px). Wie in Obsidian und GitHub ersetzt
   das Kästchen jetzt den Punkt: kein Marker, das Kästchen hängt in der
   Einrückung, der Text beginnt dort, wo er bei „- Punkt" beginnt, und das
   Kästchen steht mittig auf der ersten Zeile (Höhe 1lh) — auch wenn die
   Zeile umbricht. Nur ungeordnete Listen: „1. [ ]" behält seine Nummer.
   Lage: Kästchenmitte 0,8em vor dem Text (wo sonst der Punkt sitzt), ~5 px
   Luft zum Text. In .nz-inhalt (20 px Einzug) liegt es ganz im Einzug; in
   der knapperen .ki-liste (1,1em, Einbettungen außerhalb der Notiz) ragt
   es ≤ 3 px in den Rand davor. */
ul > li:has(> .nz-cb-l, > .nz-cb-leer) { list-style: none; position: relative; }
ul > li > .nz-cb-l {
  position: absolute; left: -1.3em; top: 0; width: 1em; height: 1.55em; height: 1lh;
  display: flex; align-items: center; justify-content: center;
}
ul > li > .nz-cb-l > .nz-cb { margin: 0; vertical-align: baseline; }
/* Die leere Schreibstelle („- [ ] " ohne Text, gezeichnetes Kästchen) steht
   an derselben Stelle wie das echte. */
ul > li > .nz-cb-leer { position: absolute; left: calc(-0.8em - 6.5px); top: calc((1.55em - 13px) / 2); top: calc((1lh - 13px) / 2); margin: 0; }
/* Am Finger (D1-08): Die Zeile eines Kästchens bleibt 44 px hoch, damit
   die 44er Trefferfläche (.nz-cb-l::before) nicht auf der Nachbarzeile
   liegt — jetzt über Innenabstand der Zeile statt über ein hohes Label im
   Text; das Kästchen sitzt mittig auf der ersten Textzeile. */
@media (pointer: coarse) {
  ul > li:has(> .nz-cb-l) { box-sizing: border-box; min-height: 44px; padding-block: calc((44px - 1.55em) / 2); padding-block: calc((44px - 1lh) / 2); }
  ul > li > .nz-cb-l { position: absolute; height: 44px; min-height: 0; }
}
