/* Ansicht „Notizen“ (Doc 20): Liste links, Editor rechts; mobil Liste ↔ Editor. Präfix nz-.
   Nur Variablen aus dashboard.css (hell und dunkel). Keine Schatten, keine Verläufe.
   Lesbarkeit: Fließtext 16px / 1.6 in var(--sans), max. ~72ch; Nebentext nicht unter 12.5px. */

.nz { --nz-liste: 330px; }

/* ── Fläche: zwei Spalten, füllt das Fenster (Höhe misst nachRender als --nz-oben) ── */
.nz-flaeche {
  display: grid; grid-template-columns: minmax(250px, var(--nz-liste)) minmax(0, 1fr);
  /* K.4: Die Fläche liegt im Inhalt (zoom: var(--zoom)). 100dvh und --nz-oben (gemessen in Bildschirm-Pixeln) werden
     mitskaliert, deshalb durch --zoom teilen; sonst rutscht der Editor bei „sehr groß“ unter den Fensterrand. */
  height: calc((100dvh - var(--nz-oben, 210px) - 20px) / var(--zoom, 1)); min-height: calc(420px / var(--zoom, 1));
  border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); overflow: hidden;
}

/* ── Liste ── */
.nz-liste-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); border-inline-end: 1px solid var(--linie); }
.nz-liste-kopf { display: grid; gap: 10px; padding: 12px 12px 10px; border-bottom: 1px solid var(--linie); }
.nz-suche { margin: 0; flex: none; width: 100%; min-width: 0; max-width: none; }
.nz-suche input { height: 36px; font-size: 14.5px; }
.nz-chips { gap: 6px; }
.nz-chips button { height: 28px; padding: 0 10px; font-size: 13px; color: var(--fg); }
.nz-chips button .i { width: 13px; height: 13px; }
.nz-liste { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 12px; }
.nz-gruppe { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 14px 8px 4px; font: 600 12.5px/1.3 var(--sans); color: var(--mut); }
.nz-gruppe span { font-weight: 400; font-variant-numeric: tabular-nums; }
.nz-eintraege { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nz-eintrag { position: relative; display: grid; gap: 3px; min-width: 0; padding: 10px 12px 10px 14px; border-radius: var(--r2); color: var(--fg); text-decoration: none; transition: background var(--t-1) var(--ease); }
@media (hover: hover) { .nz-eintrag:hover { background: var(--flaeche); } }
.nz-eintrag.an { background: var(--flaeche2); }
.nz-eintrag.an::before { content: ""; position: absolute; inset-inline-start: 4px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--fg); }
.nz-eintrag:focus-visible { outline: var(--fokus-breite) solid var(--fokus); outline-offset: -2px; }
.nz-e-titel { display: flex; align-items: center; gap: 6px; min-width: 0; font: 600 14.5px/1.4 var(--sans); }
.nz-e-titeltext { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nz-e-pin { display: inline-flex; flex: none; color: var(--mut); }
.nz-e-pin .i { width: 13px; height: 13px; }
.nz-e-vorschau { font-size: 13.5px; line-height: 1.45; color: var(--mut); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.nz-e-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; font-size: 12.5px; color: var(--mut); }
.nz-e-meta .kat { font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.nz-e-check { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.nz-e-check .i { width: 12px; height: 12px; }
.nz-e-check.fertig { color: var(--ok); }
.nz-e-tag { color: var(--blau); }
.nz-e-ungesichert { width: 7px; height: 7px; border-radius: 50%; background: var(--gelb); }
.nz-eintrag mark { background: var(--gelb-hg); color: inherit; border-radius: var(--r1); padding: 0 1px; }
.nz-liste-leer { display: grid; justify-items: start; gap: 10px; padding: 18px 10px; }
.nz-liste-leer p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--mut); }
.nz-tipp { font-size: 12.5px; color: var(--mut); }
.nz-liste-leer .nz-tipp { font-size: 12.5px; }
.nz-liste-fuss { margin: 0; padding: 8px 14px; border-top: 1px solid var(--linie); font-size: 12.5px; color: var(--mut); }

/* ── Editor ── */
.nz-editor { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; background: var(--flaeche); }
.nz-werkzeug { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-bottom: 1px solid var(--linie); }
.nz-werkzeug-gruppe { display: flex; align-items: center; gap: 4px; }
.nz-rechts { margin-inline-start: auto; }
.nz-zurueck { display: none; }
.nz-diktat { display: inline-flex; }
.nz-knopf { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r2); background: transparent; color: var(--fg); font: 600 13px/1 var(--sans); white-space: nowrap; transition: background var(--t-1) var(--ease), color var(--t-1) var(--ease); }
@media (hover: hover) { .nz-knopf:hover { background: var(--flaeche2); } }
.nz-knopf[aria-pressed="true"] { background: var(--flaeche3); color: var(--fg); outline: 1px solid var(--fg); outline-offset: -1px; }
.nz-knopf[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.nz-knopf .i { width: 16px; height: 16px; }
.nz-rund { width: 34px; padding: 0; justify-content: center; }
.nz-klein { width: 30px; height: 30px; }
.nz-klein .i { width: 14px; height: 14px; }
@media (hover: hover) { .nz-gefahr:hover { background: var(--rot-hg); color: var(--rot); } }

.nz-papier { overflow-y: auto; overscroll-behavior: contain; padding: 22px clamp(16px, 4cqi, 44px) 40px; cursor: text; }
.nz-papier-innen { max-width: 72ch; margin: 0 auto; font-size: 16px; }
.nz-papier-innen > * { cursor: auto; }
.nz-band { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; padding: 8px 12px; border-radius: var(--r2); background: var(--flaeche2); font-size: 13.5px; }

/* Schreibflächen: dezente Linie links statt Rahmen zeigt den Fokus */
.nz-schreib { margin-inline-start: -14px; padding-inline-start: 12px; border-inline-start: 2px solid transparent; transition: border-color var(--t-1) var(--ease); }
.nz-schreib:focus-within { border-inline-start-color: var(--fokus); }
.nz-titel { display: block; width: 100%; border: 0; background: transparent; padding: 2px 0; font: 600 24px/1.3 var(--sans); color: var(--fg); }
.nz-text { display: block; width: 100%; min-height: max(22vh, 160px); border: 0; background: transparent; padding: 4px 0; font: 400 16px/1.6 var(--sans); color: var(--fg); overflow-wrap: anywhere; }
.nz-titel:focus-visible, .nz-text:focus-visible, .nz-titel:focus, .nz-text:focus { outline: none; }
.nz-titel::placeholder, .nz-text::placeholder { color: var(--mut); opacity: 1; }

/* Tags und Bezug */
.nz-bezug { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 8px 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--linie); }
.nz-bezug-feld { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--mut); }
.nz-bezug-feld > span { font-weight: 600; flex: none; }
.nz-bezug-feld > input, .nz-bezug-feld > select { height: 30px; min-width: 0; border: 1px solid var(--linie-ui); border-radius: var(--r2); background: var(--flaeche); color: var(--fg); padding: 0 8px; font: 400 13.5px/1 var(--sans); }
.nz-bezug-feld > select { max-width: 210px; }
.nz-bezug-feld > input:focus-visible, .nz-bezug-feld > select:focus-visible { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 0; }
.nz-bezug-tags { flex: 1 1 220px; }
.nz-bezug-tags > input { flex: 1; width: 100%; }
.nz-bezug-gruppe { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }

/* Vorschau mit abhakbaren Checklisten */
.nz-vorschau { min-height: 200px; font: 400 16px/1.6 var(--sans); overflow-wrap: anywhere; }
.nz-vorschau:focus { outline: none; }
.nz-vorschau p { margin: 0 0 .5em; }
.nz-vorschau .nz-v-h { margin: .9em 0 .35em; font-family: var(--sans); font-weight: 600; line-height: 1.35; }
.nz-vorschau h3.nz-v-h { font-size: 20px; }
.nz-vorschau h4.nz-v-h { font-size: 18px; }
.nz-vorschau h5.nz-v-h { font-size: 16px; }
.nz-vorschau > .nz-v-h:first-child { margin-top: 0; }
.nz-v-luecke { height: .6em; }
.nz-v-ul, .nz-v-ol { margin: 0 0 .6em; padding-inline-start: 1.4em; }
.nz-v-ul li, .nz-v-ol li { margin: .15em 0; }
.nz-v-check { list-style: none; margin: 0 0 .6em; padding: 0; display: grid; gap: 2px; }
.nz-v-check label { display: flex; align-items: flex-start; gap: 10px; margin: 0 -6px; padding: 4px 6px; border-radius: var(--r2); cursor: pointer; }
@media (hover: hover) { .nz-v-check label:hover { background: var(--flaeche2); } }
.nz-v-check .haken { flex: none; margin-top: 4px; }
.nz-v-check li.an span { color: var(--mut); text-decoration: line-through; text-decoration-color: var(--linie2); }
.nz-vorschau a { color: var(--blau); text-underline-offset: 3px; }
.nz-v-leer { color: var(--mut); }
.nz-check-hinweis { margin: 14px 0 0; }
.nz-link { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r1); color: var(--blau); font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.nz-link:focus-visible { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 2px; }
.nz-link .i { width: 14px; height: 14px; }

/* Aufgaben ableiten */
.nz-ableiten { display: grid; gap: 10px; margin-top: 22px; padding: 14px 16px 12px; border: 1px solid var(--linie2); border-radius: var(--r2); background: var(--bg); }
.nz-ableiten:focus-visible { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 2px; }
.nz-abl-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nz-ableiten h3 { margin: 0; font: 600 15px/1.3 var(--sans); }
.nz-abl-tipp { margin: 0; font-size: 13px; line-height: 1.5; color: var(--mut); }
.nz-abl-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nz-abl-liste li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 6px 8px; border: 1px solid var(--linie); border-radius: var(--r2); background: var(--flaeche); }
.nz-abl-liste li:not(.an) { border-style: dashed; background: transparent; }
.nz-abl-liste li:not(.an) .nz-abl-feld input { color: var(--mut); }
.nz-abl-liste .haken { margin-top: 7px; }
.nz-abl-liste .etikett { margin-top: 5px; }
.nz-abl-feld { display: grid; gap: 2px; min-width: 0; }
.nz-abl-feld input { width: calc(100% + 6px); height: 32px; margin-inline-start: -6px; padding: 0 6px; border: 1px solid transparent; border-radius: var(--r2); background: transparent; color: var(--fg); font: 400 14.5px/1 var(--sans); }
@media (hover: hover) { .nz-abl-feld input:hover { border-color: var(--fg); } }
.nz-abl-feld input:focus { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 0; background: var(--flaeche); }
.nz-abl-vorschau { font-size: 12.5px; color: var(--mut); }
.nz-abl-vorschau:empty { display: none; }
.nz-abl-knoepfe { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.nz-abl-knoepfe .nz-tipp { margin-inline-end: auto; }

/* Fuß: Weiter damit, Stand */
.nz-fuss { display: grid; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--linie); background: var(--flaeche); }
.nz-weiter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nz-weiter-titel { margin-inline-end: 4px; font-size: 12.5px; font-weight: 600; color: var(--mut); }
.nz-stand { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 12.5px; color: var(--mut); }
.nz-stand .nz-link { font-size: 12.5px; }
.nz-ton-rot { color: var(--rot); font-weight: 600; }
.nz-privat { margin-inline-start: auto; }

/* ── Leere Zustände ── */
.nz-leer, .nz-gesperrt { padding: 48px 20px; background: var(--flaeche); border-style: solid; border-color: var(--linie); }
.nz-leer p, .nz-gesperrt p { max-width: 52ch; line-height: 1.55; }
.nz-leer p b, .nz-gesperrt p b { display: block; margin-bottom: 4px; font-size: 16px; color: var(--fg); }
.nz-leer-icon svg { width: 40px; height: 40px; fill: none; stroke: var(--mut); stroke-width: 1.3; }
.nz-leer-knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nz-editor-leer { display: grid; place-items: center; padding: 24px; }
.nz-editor-leer .leer-zustand { border: 0; }

[data-dichte="kompakt"] .nz-eintrag { padding-block: 7px; }

/* ── Mittlere Breite: schmalere Liste, Werkzeug nur mit Symbolen ── */
@container ansicht (min-width: 681px) and (max-width: 940px) {
  .nz { --nz-liste: 260px; }
  .nz-knopf-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nz-privat { margin-inline-start: 0; flex-basis: 100%; }
}

/* ── Schmal (Handy): entweder Liste oder Editor, die Seite scrollt ── */
@container ansicht (max-width: 680px) {
  .nz-flaeche { display: block; height: auto; min-height: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; }
  .nz:not(.nz-hat-notiz) .nz-editor { display: none; }
  .nz.nz-hat-notiz .nz-liste-pane, .nz.nz-hat-notiz .kopfzeile { display: none; }
  .nz-liste-pane { border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); }
  .nz-liste { overflow: visible; padding: 4px 6px 10px; }
  @media (hover: hover) { .nz-eintrag:hover { background: var(--flaeche2); } }
  .nz-editor { display: block; border: 1px solid var(--linie); border-radius: var(--r); }
  .nz-werkzeug { padding: 6px 8px; gap: 4px 6px; }
  .nz-zurueck { display: inline-flex; margin-inline-end: auto; }
  .nz-rechts { margin-inline-start: 0; }
  .nz-knopf-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nz-knopf { height: 40px; }
  .nz-rund { width: 40px; }
  .nz-papier { overflow: visible; padding: 16px 16px 28px; }
  .nz-titel { font-size: 21px; }
  .nz-text { min-height: 30vh; }
  .nz-suche input, .nz-bezug-feld > input, .nz-bezug-feld > select, .nz-abl-feld input { font-size: 16px; }
  .nz-bezug-gruppe { flex: 1 1 100%; }
  .nz-bezug-gruppe .nz-bezug-feld { flex: 1; }
  .nz-bezug-gruppe select { flex: 1; max-width: none; width: 100%; }
  .nz-nur-breit { display: none; }
  .nz-privat { margin-inline-start: 0; flex-basis: 100%; }
  .nz-abl-liste li { grid-template-columns: 22px minmax(0, 1fr); }
  .nz-abl-liste .etikett { grid-column: 2; justify-self: start; margin-top: 0; }
  .nz-abl-knoepfe .nz-tipp { display: none; }
}

/* B1: Tippziele auf Touch mind. 44px (--ziel-min) */
@media (pointer: coarse) {
  .nz-suche input, .nz-chips button, .nz-knopf, .nz-bezug-feld > input, .nz-bezug-feld > select, .nz-abl-feld input { min-height: var(--ziel-min); }
}

/* ══════════════ Mobil (B3/B4, Spec J, Doc 22 „Offen für B4“) ══════════════
   Zwei Ebenen (Liste oder Editor) wie oben. Im Editor: oben „Notizen“ (zurück) und Anheften, Archivieren, Löschen
   als Knöpfe mit Text; die Schreib-Werkzeuge (Diktat, Checkliste, Vorschau) kleben unten über der Tastatur
   (index.html: interactive-widget=resizes-content). Beim Tippen weicht die Tab-Leiste wie im Nachrichten-Komponisten. */
.nz-knopf-wort { display: none; }
@container ansicht (max-width: 680px) {
  .nz-editor:not(.nz-editor-leer) { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "zurueck rechts" "papier papier" "werkzeug werkzeug" "fuss fuss"; }
  .nz-editor:not(.nz-editor-leer) > .nz-werkzeug { display: contents; }
  .nz-werkzeug > .nz-zurueck { grid-area: zurueck; align-self: center; margin-block: 6px; margin-inline: 8px 0; min-height: var(--ziel-min); }
  .nz-werkzeug > .nz-rechts { grid-area: rechts; justify-content: flex-end; flex-wrap: wrap; gap: 4px; padding: 6px 8px; }
  /* Klebt nur, wenn sein Rasterbereich mitläuft: deshalb über Papier und eigene Zeile gespannt und unten ausgerichtet
     (der Rasterbereich ist der Bezugsrahmen für sticky). Das Papier hält unten Platz frei. */
  .nz-werkzeug > .nz-werkzeug-gruppe:not(.nz-rechts) {
    grid-column: 1 / -1; grid-row: 2 / span 2; align-self: end; position: sticky; z-index: 5; bottom: calc((var(--nav-unten) + env(safe-area-inset-bottom)) / var(--zoom, 1));
    gap: 6px; padding: 6px 8px; background: var(--flaeche); border-top: 1px solid var(--linie);
  }
  .nz-editor:not(.nz-editor-leer) > .nz-papier { grid-area: papier; padding-bottom: 76px; border-top: 1px solid var(--linie); }
  .nz-editor:not(.nz-editor-leer) > .nz-fuss { grid-area: fuss; }
  .nz-knopf, .nz-rund { height: auto; min-height: var(--ziel-min); min-width: var(--ziel-min); }
  /* Anheften, Archivieren, Löschen mit sichtbarem Wort */
  .nz-rechts .nz-rund:has(.nz-knopf-wort) { width: auto; padding: 0 10px; }
  .nz-rechts .nz-knopf-wort { display: inline; }
  .nz-rechts .nz-knopf { border-color: var(--linie-ui); }
  /* Weiter damit: Knöpfe volle Breite, Text bricht */
  .nz-weiter .k { flex: 1 1 auto; min-height: var(--ziel-min); white-space: normal; }
  .nz-e-titeltext { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .nz-eintrag { min-height: var(--ziel); }
  .nz-text { min-height: calc(30dvh / var(--zoom, 1)); }
}
/* Seiten-Check 07: Handy bündelt seltene Handlungen im Menü „…“ (K.UI.menue, Mobbin: Apple Notes, ClickUp).
   Oben bleiben Zurück und „…“, unten nur Teilen und der Stand. Am Rechner bleiben die Knöpfe sichtbar. */
.nz-mehr { display: none; }
@container ansicht (max-width: 680px) {
  .nz-mehr { display: inline-flex; }
  .nz-mehr .k { min-height: var(--ziel-min); min-width: var(--ziel-min); }
  .nz-rechts > .nz-knopf { display: none; }
  .nz-weiter > :is(#nz-k-ableiten, #nz-k-eingang, #nz-k-claude) { display: none; }
  .nz-weiter:not(:has(> .k:not(#nz-k-ableiten, #nz-k-eingang, #nz-k-claude))) { display: none; }
}
[dir="rtl"] .nz-zurueck .i { transform: scaleX(-1); }

@container ansicht (max-width: 380px) {
  .nz-rechts .nz-gefahr .nz-knopf-wort { display: none; }  /* Löschen bleibt als Symbol mit Namen (aria-label), Platz für Anheften und Archivieren */
  .nz-rechts .nz-rund.nz-gefahr:has(.nz-knopf-wort) { width: var(--ziel-min); padding: 0; }
}
@media (max-width: 860px) {
  body:has(#nz-text:focus, #nz-titel:focus) .tabs { display: none; }
  body:has(#nz-text:focus, #nz-titel:focus) { --nav-unten: 0px; }
}

/* ══ Sonne 2 (js/Sonne2_Spezifikation.md) ══
   Liste dichter (Titel 14, Vorschau und Meta 12), Notiztitel 17 px 600, Editor-Text 14/22 am Rechner (Handy bleibt 16 px wegen iOS-Zoom). */
:root.sonne .nz-flaeche { border-radius: var(--r); }
:root.sonne .nz-liste-kopf { gap: 8px; padding: 10px 10px 8px; }
:root.sonne .nz-gruppe { margin: 12px 8px 2px; font: 600 var(--text-meta, 12px)/16px var(--sans); color: var(--mut2); }
:root.sonne .nz-eintrag { gap: 1px; padding: 6px 10px 6px 14px; }
:root.sonne .nz-eintrag.an::before { top: 8px; bottom: 8px; }
:root.sonne .nz-e-titel { font: 500 14px/20px var(--sans); }
:root.sonne .nz-eintrag.an .nz-e-titel { font-weight: 600; }
:root.sonne .nz-e-vorschau { font-size: var(--text-meta, 12px); line-height: 16px; }
:root.sonne .nz-e-meta, :root.sonne .nz-e-meta .kat { font-size: var(--text-meta, 12px); }
:root.sonne .nz-liste-leer p { font-size: 13px; }
:root.sonne :is(.nz-tipp, .nz-liste-leer .nz-tipp, .nz-liste-fuss, .nz-bezug-feld, .nz-abl-vorschau, .nz-weiter-titel, .nz-stand, .nz-stand .nz-link) { font-size: var(--text-meta, 12px); }
:root.sonne .nz-band { font-size: 13px; }
:root.sonne .nz-papier { padding-top: 18px; }
:root.sonne .nz-titel { font: 600 17px/24px var(--sans); }
:root.sonne .nz-vorschau h3.nz-v-h { font-size: 17px; }
:root.sonne .nz-vorschau h4.nz-v-h { font-size: 15px; }
:root.sonne .nz-vorschau h5.nz-v-h { font-size: 14px; }
:root.sonne .nz-link { font-size: 13px; }
:root.sonne .nz-ableiten { margin-top: 18px; padding: 12px 14px 10px; border-color: var(--linie); border-radius: var(--r); }
:root.sonne .nz-ableiten h3 { font-size: 14px; }
:root.sonne .nz-abl-tipp { font-size: var(--text-meta, 12px); }
:root.sonne .nz-fuss { padding: 8px 12px 10px; }
:root.sonne .nz-leer p b, :root.sonne .nz-gesperrt p b { font-size: 15px; }
:root.sonne[data-dichte="kompakt"] .nz-eintrag { padding-block: 4px; }
@media (min-width: 861px) {
  :root.sonne .nz-papier-innen { font-size: 14px; }
  :root.sonne .nz-text, :root.sonne .nz-vorschau { font-size: 14px; line-height: 22px; }
  :root.sonne .nz-suche input { font-size: 13px; }
  :root.sonne .nz-abl-feld input { font-size: 14px; }
}
@media (pointer: fine) {
  :root.sonne .nz-suche input { height: 32px; }
  :root.sonne .nz-chips button { height: 26px; font-size: var(--text-meta, 12px); }
  :root.sonne .nz-bezug-feld > input, :root.sonne .nz-bezug-feld > select { height: 28px; font-size: 13px; }
}
/* Werkzeugknöpfe nur in der breiten Fassung kleiner; schmal gelten die Handy-Regeln oben (auto, ≥ 44 px, Wort sichtbar) */
@container ansicht (min-width: 681px) {
  @media (pointer: fine) {
    :root.sonne .nz-knopf { height: 30px; }
    :root.sonne .nz-rund { width: 30px; }
  }
}
/* ══ Seiten-Check 07: WYSIWYG-Editor (contenteditable), Speicherformat Markdown ══
   Mobbin: Apple Notes, Notion, Obsidian (Formatleiste über der Tastatur), Google Keep (Checkliste per Tipp). */
.nz-doc { position: relative; cursor: text; }
.nz-doc.leer::before { content: attr(data-platzhalter); position: absolute; color: var(--mut); pointer-events: none; }
.nz-doc > p { margin: 0; min-height: 1.6em; }
.nz-doc h3, .nz-doc h4, .nz-doc h5 { margin: .7em 0 .25em; font-family: var(--sans); font-weight: 600; line-height: 1.35; }
.nz-doc > :first-child { margin-block-start: 0; }
.nz-doc h3 { font-size: 20px; }
.nz-doc h4 { font-size: 18px; }
.nz-doc h5 { font-size: 16px; }
.nz-doc ul, .nz-doc ol { margin: .15em 0 .35em; padding-inline-start: 1.5em; }
.nz-doc li { margin: .1em 0; }
.nz-doc a { color: var(--blau); text-underline-offset: 3px; }
.nz-doc strong, .nz-doc b { font-weight: 600; }
/* Checkliste: Kästchen am Zeilenanfang, Tippziel 30 px (am Handy größer) */
.nz-doc ul.nz-cl { list-style: none; padding-inline-start: 0; }
.nz-doc ul.nz-cl > li { position: relative; padding-inline-start: 32px; min-height: 1.6em; }
.nz-doc ul.nz-cl > li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .2em; box-sizing: border-box; width: 20px; height: 20px; border: 1.5px solid var(--linie-ui); border-radius: 6px; background: var(--flaeche); cursor: pointer; transition: background var(--t-2) var(--ease), border-color var(--t-2) var(--ease); }
.nz-doc ul.nz-cl > li[data-an="1"]::before { background: var(--ok-voll); border-color: var(--ok-voll); }
.nz-doc ul.nz-cl > li[data-an="1"]::after { content: ""; position: absolute; inset-inline-start: 9px; top: calc(.2em + 4px); width: 5px; height: 10px; border: solid var(--auf-ok); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.nz-doc ul.nz-cl > li[data-an="1"] { color: var(--mut); text-decoration: line-through; text-decoration-color: var(--linie2); }
@media (pointer: coarse) { .nz-doc ul.nz-cl > li { padding-inline-start: 36px; min-height: 32px; } .nz-doc ul.nz-cl > li::before { width: 24px; height: 24px; top: .05em; } .nz-doc ul.nz-cl > li[data-an="1"]::after { inset-inline-start: 11px; top: calc(.05em + 5px); } }

/* Formatleiste: am Rechner oben neben „Notizen“, am Handy klebt sie über der Tastatur und scrollt quer */
.nz-format { flex-wrap: wrap; }
.nz-format .nz-knopf[aria-pressed="true"] { background: var(--flaeche3); outline: 1px solid var(--linie-ui); outline-offset: -1px; }
.nz-format-trenner { width: 1px; align-self: stretch; margin: 6px 4px; background: var(--linie); }
@container ansicht (max-width: 680px) {
  .nz-werkzeug > .nz-format { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; gap: 2px; }
  .nz-werkzeug > .nz-format::-webkit-scrollbar { display: none; }
  .nz-format .nz-knopf { flex: none; }
  .nz-weiter > #nz-k-auslage { display: none; }
}

/* Auslage einreichen (Formular in der Notiz, gleiche Fläche wie „Aufgaben ableiten“) */
.nz-asl-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 12px; }
.nz-asl-feld { display: grid; gap: 4px; min-width: 0; font-size: 13px; font-weight: 500; color: var(--mut); }
.nz-asl-breit { grid-column: span 2; }
.nz-asl-feld input, .nz-asl-feld select { min-width: 0; width: 100%; height: 36px; border: 1px solid var(--linie-ui); border-radius: var(--r2); background: var(--flaeche); color: var(--fg); padding: 0 10px; font: 400 14.5px/1 var(--sans); }
.nz-asl-feld input:focus-visible, .nz-asl-feld select:focus-visible { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 0; }
.nz-asl-mit { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--fg); cursor: pointer; }
.nz-asl-mit .haken { flex: none; margin-top: 2px; }
@container ansicht (max-width: 680px) { .nz-asl-breit { grid-column: auto; } .nz-asl-feld input, .nz-asl-feld select { font-size: 16px; } }
@media (pointer: coarse) { .nz-asl-feld input, .nz-asl-feld select { min-height: var(--ziel-min); } }

/* Projekt-Auswahl (gemeinsamer Baustein) in der Bezug-Zeile: eigene Schrift statt der kleinen grauen Zeile, genug Breite */
.nz-bezug-feld .pw { min-inline-size: 200px; font-size: 14px; color: var(--fg); font-weight: 400; }
.nz-bezug-feld .pw-knopf { min-height: 30px; padding-block: 4px; }
@media (pointer: coarse) { .nz-bezug-feld .pw-knopf { min-height: var(--ziel-min); } }

@media (min-width: 861px) {
  :root.sonne .nz-doc h3 { font-size: 17px; }
  :root.sonne .nz-doc h4 { font-size: 15px; }
  :root.sonne .nz-doc h5 { font-size: 14px; }
}.nz-anhaenge { margin-block-start: 18px; }
.nz-anhaenge:empty { display: none; }
.nz-asl-belege { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.nz-asl-belege .k { cursor: pointer; }
.nz-asl-belege:has(input:focus-visible) .k { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 2px; }.nz-asl-meine { display: grid; gap: 6px; padding-block-end: 10px; border-block-end: 1px solid var(--linie); }
.nz-asl-meine-kopf { margin: 0; font-size: 13px; font-weight: 600; color: var(--mut); }
.nz-asl-meine ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nz-asl-meine li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; font-size: 14px; }
.nz-asl-meine-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nz-asl-meine .etikett { flex: none; }/* Eingerückte Listenpunkte (Review S19): Tiefe aus der Einrückung im Markdown */
.nz-doc li[data-einzug] { margin-inline-start: calc(var(--nz-tiefe, 0) * 1.5em); }