/* Zeilen-Baustein „Schnell-Bearbeiten“ (js/zeile.js, Doc 44 §8). Präfix zl-.
   Ruhig: keine Signalfläche in der Zeile. Wunschtermin verstrichen = grauer Text, heute = gelber Punkt, fester Termin
   verstrichen = roter Punkt mit Text. Keine Schatten, Verläufe, Filter. Altrosa (--hier) nur als Fokus-Strich. */

.zl-liste { list-style: none; margin: 0; padding: 0; border-top: var(--haar) solid var(--linie); }
.zl { position: relative; border-bottom: var(--haar) solid var(--linie); overflow: hidden; }
.zl-vorne { position: relative; z-index: 1; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--s2); min-height: 56px; padding: 4px 4px 4px 0; background: var(--bg); touch-action: pan-y; transition: transform var(--t-2) var(--ease); }
@media (hover: hover) { .zl:hover .zl-vorne { background: var(--flaeche); } }
.zl:focus-within .zl-vorne { background: var(--flaeche); }
.zl:focus-within::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 2px; background: var(--hier); z-index: 2; }
.zl-haken { width: 44px; min-height: 44px; display: grid; place-items: center; cursor: pointer; }
@media (pointer: fine) { .zl-haken .haken { width: 22px; height: 22px; border-radius: 6px; } }  /* wie Skizze Doc 44 */   /* Touch: kern.css macht den Haken selbst 44 px groß */
.zl-haken-knopf { cursor: default; }
.zl-text { padding: 6px 0; }
.zl-text .titel { font-size: var(--fs-15); line-height: 1.35; overflow-wrap: anywhere; }
.zl-meta { display: block; margin-top: 2px; font-size: var(--fs-13); color: var(--mut2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Optionen aus zeileHtml (Seiten-Check 23): Knöpfe nach dem Datum, Auswahl-Modus der Seite */
.zl.zl-mit-ende .zl-vorne { grid-template-columns: 44px minmax(0, 1fr) auto auto; }
.zl-ende { display: inline-flex; align-items: center; gap: 4px; }
.zl.zl-markiert .zl-vorne { background: var(--blau-hg); }
.zl.zl-markiert::after { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 2px; background: var(--blau); z-index: 2; }
.zl-fertig .titel { color: var(--mut2); text-decoration: line-through; text-decoration-color: var(--linie-ui); }
.zl-laeuft { opacity: .7; }

.zl-datum { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: var(--haar) solid var(--linie2); border-radius: 999px; background: none; color: var(--mut); font: 500 var(--fs-13)/1 var(--sans); white-space: nowrap; cursor: pointer; }
@media (hover: hover) { .zl-datum:hover { border-color: var(--linie-ui); color: var(--fg); } }
.zl-datum:focus-visible { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 2px; }
.zl-datum .punkt { width: 7px; height: 7px; }
.zl-datum.dran { color: var(--fg); }
.zl-datum.liegt { color: var(--mut2); }
.zl-datum.alarm { color: var(--rot); border-color: var(--rot); }
@media (pointer: coarse) { .zl-datum { min-height: 44px; } }
@container ansicht (max-width: 420px) { .zl-datum { padding: 0 8px; } }

/* Wischen: Flächen hinter der Zeile. Grün nur unter der Geste (Bestätigung). */
.zl-wisch { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 var(--s4); font-size: var(--fs-14); font-weight: 600; color: var(--mut); }
.zl-wisch span { display: inline-flex; align-items: center; gap: 6px; }
.zl-wisch svg { width: 18px; height: 18px; }
.zl.zl-r .zl-wisch { background: var(--ok-hg); color: var(--ok); }
.zl.zl-l .zl-wisch { background: var(--flaeche3); color: var(--fg); }
.zl.zl-r .zl-wisch-r, .zl.zl-l .zl-wisch-l { visibility: hidden; }
.zl.zl-r.zl-scharf .zl-wisch { background: var(--ok-voll); color: var(--auf-ok); }
.zl.zl-l.zl-scharf .zl-wisch { background: var(--flaeche2); }

/* Wisch-Aktionen für beliebige Listen (K.wischListe, kern.js): gleiche Optik wie das Wischen der Aufgaben-Zeilen.
   Die Seite gibt .wl und .wl-vorne, der Kern legt .wl-hinten beim Ziehen an. Farbe nur unter der Geste, Text immer dabei. */
.wl { position: relative; overflow: hidden; }
.wl-vorne { position: relative; z-index: 1; background: var(--bg); touch-action: pan-y; transition: transform var(--t-2) var(--ease); }
.wl-hinten { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 var(--s4); font-size: var(--fs-14); font-weight: 600; color: var(--mut); background: var(--flaeche3); }
.wl-hinten span { display: inline-flex; align-items: center; gap: 6px; }
.wl-hinten svg { width: 18px; height: 18px; }
.wl.wl-r .wl-l, .wl.wl-l .wl-r { visibility: hidden; }
.wl.wl-scharf .wl-hinten { background: var(--flaeche2); color: var(--fg); }
.wl.wl-scharf[data-wl-ton="ok"] .wl-hinten { background: var(--ok-voll); color: var(--auf-ok); }
.wl.wl-scharf[data-wl-ton="gelb"] .wl-hinten { background: var(--gelb-voll); color: var(--auf-gelb); }
.wl.wl-scharf[data-wl-ton="rot"] .wl-hinten { background: var(--rot-voll); color: var(--auf-rot); }
@media (prefers-reduced-motion: reduce) { .wl-vorne { transition: none; } }

/* Menü: am Computer an der Zeile, am Handy als Bottom Sheet */
.zl-schleier { position: fixed; inset: 0; z-index: 80; background: var(--schleier); }
.zl-menue { position: fixed; z-index: 81; width: 268px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; background: var(--sheet); border: var(--haar) solid var(--linie2); border-radius: var(--r2); padding: 6px; color: var(--fg); }
.zl-menue.zl-sheet { inset-inline-start: 0; inset-inline-end: 0; bottom: 0; top: auto !important; width: auto; max-width: none; max-height: 86dvh; border-radius: var(--r3) var(--r3) 0 0; padding: var(--s2) var(--s3) calc(var(--s4) + env(safe-area-inset-bottom)); }
.zl-griff { width: 40px; height: 4px; border-radius: 4px; background: var(--linie-ui); margin: 4px auto 10px; }
.zl-menue-kopf { padding: 4px 10px 8px; border-bottom: var(--haar) solid var(--linie2); margin-bottom: 4px; }
.zl-menue-kopf b { display: block; font-size: var(--fs-14); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zl-menue-kopf small { display: block; font-size: var(--fs-12); color: var(--mut); margin-top: 2px; }
.zl-mp { width: 100%; display: flex; align-items: center; gap: var(--s3); min-height: 40px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: inherit; text-align: start; font: var(--fs-14)/1.2 var(--sans); cursor: pointer; }
.zl-sheet .zl-mp { min-height: 50px; font-size: var(--fs-15); }
.zl-mp:hover, .zl-mp:focus { background: var(--flaeche3); outline: none; }
.zl-mp:focus-visible { box-shadow: inset 2px 0 0 var(--hier); }
.zl-mp svg { width: 18px; height: 18px; flex: none; }
.zl-mp small { color: var(--mut2); font-size: var(--fs-12); margin-inline-start: 4px; }
.zl-mp kbd { margin-inline-start: auto; }
.zl-sheet .zl-mp kbd { display: none; }
.zl-menue hr { border: 0; border-top: var(--haar) solid var(--linie2); margin: 4px 0; }
/* K.UI.menue (kern.js): gleiches Menü für Kopf-Werkzeuge jeder Seite. Gefahr = rote Schrift, nie rote Fläche. */
.ui-menue .zl-mp { text-decoration: none; }
.ui-menue .zl-mp > svg, .ui-menue .ui-mp-platz { inline-size: 18px; block-size: 18px; flex: none; }   /* eigene SVGs gleich groß, Text bündig */
.ui-menue .ui-mp-platz { display: inline-block; }
.ui-menue .zl-mp.ui-mp-gefahr { color: var(--rot); }
.ui-menue .zl-mp:disabled, .ui-menue .zl-mp[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.zl-schalter { margin-inline-start: auto; width: 30px; height: 18px; border-radius: 999px; border: 1.5px solid var(--linie-ui); position: relative; flex: none; }
.zl-schalter::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--mut); transition: transform var(--t-2) var(--ease); }
.zl-schalter.an { background: var(--ok-voll); border-color: var(--ok-voll); }
.zl-schalter.an::after { transform: translateX(12px); background: var(--auf-ok); }
.zl-menue-liste { max-height: 50dvh; overflow-y: auto; }
.zl-tage { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px 4px; }
.zl-tage button { min-height: 44px; border: var(--haar) solid var(--linie2); border-radius: 6px; background: none; color: inherit; font: var(--fs-13)/1.15 var(--sans); cursor: pointer; }
.zl-tage button:hover, .zl-tage button:focus { background: var(--flaeche3); border-color: var(--linie-ui); outline: none; }
.zl-tage button:focus-visible { box-shadow: inset 0 -2px 0 var(--hier); }
.zl-tage small { display: block; color: var(--mut2); font-size: var(--fs-12); }
.zl-datum-feld { display: grid; gap: 4px; padding: 6px 4px 4px; }
.zl-datum-feld input { min-height: 44px; border: var(--haar) solid var(--linie-ui); border-radius: 6px; background: var(--bg); color: var(--fg); padding: 0 10px; font: var(--fs-15) var(--sans); }
.zl-vorschau { font-size: var(--fs-12); color: var(--mut); min-height: 16px; }

/* Rückgängig muss über Menü und „Neu planen“ erreichbar bleiben (Toast aus kern.js, sonst z-index 70) */
body:has(.zl-planen, .zl-menue) .toast { z-index: 90; }
/* Handy: über dem Bottom Sheet statt auf seinen Menüpunkten (Höhe setzt zeile.js als --zl-sheet-h) */
/* :root davor, damit die Regel auch das PWA-Band (pwa.css, :root[data-pwa-band] .toast) schlägt */
:root body:has(.zl-sheet) .toast { bottom: calc(var(--zl-sheet-h, 50dvh) + 24px); }

/* Neu planen */
.zl-planen { position: fixed; z-index: 81; top: 0; inset-inline-end: 0; bottom: 0; width: min(500px, 100%); display: flex; flex-direction: column; background: var(--bg); border-inline-start: var(--haar) solid var(--linie2); color: var(--fg); }
.zl-planen-kopf { padding: var(--s4) var(--s4) var(--s3); border-bottom: var(--haar) solid var(--linie); }
.zl-planen-oben { display: flex; align-items: center; gap: var(--s2); }
.zl-planen-oben h2 { margin: 0; font: 400 26px/1.1 var(--serif); letter-spacing: .01em; }
.zl-planen-zu { margin-inline-start: auto; }
.zl-planen-kopf > p { margin: 6px 0 0; color: var(--mut); font-size: var(--fs-14); }
.zl-planen-kopf .zl-stand { font-size: var(--fs-12); color: var(--mut2); margin-top: 6px; }
.zl-fortschritt { height: 2px; background: var(--linie2); margin-top: var(--s3); }
.zl-fortschritt i { display: block; height: 2px; background: var(--fg); transition: width var(--t-3) var(--ease); }
.zl-planen-alle { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
/* Unten Platz für den Toast (bottom: --nav-unten + 16 px, rund 48 px hoch), damit er keine Knöpfe der letzten Zeile verdeckt */
.zl-planen-liste { list-style: none; margin: 0; padding: 0 var(--s4) calc(var(--nav-unten, 0px) + 96px + env(safe-area-inset-bottom)); overflow-y: auto; flex: 1; }
.zl-planen-liste li { padding: var(--s3) 0; border-bottom: var(--haar) solid var(--linie); }
.zl-planen-liste p { margin: 0; }
.zl-p-titel { font-size: var(--fs-15); }
.zl-p-meta { font-size: var(--fs-13); color: var(--mut2); margin-top: 2px !important; }
.zl-noch { font-size: var(--fs-13); color: var(--mut); margin-top: 6px !important; }
.zl-planen-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s2); }
.zl-planen-knoepfe button { min-height: 36px; padding: 0 12px; border: var(--haar) solid var(--linie2); border-radius: 999px; background: none; color: inherit; font: var(--fs-13) var(--sans); cursor: pointer; }
.zl-planen-knoepfe button:hover { border-color: var(--linie-ui); background: var(--flaeche); }
.zl-planen-knoepfe button:focus-visible { outline: var(--fokus-breite) solid var(--fokus); outline-offset: 2px; }
@media (pointer: coarse) { .zl-planen-knoepfe button { min-height: 44px; } }
.zl-planen-fertig { padding: var(--s6) var(--s4); }
.zl-planen-fertig p { margin: 0 0 var(--s3); color: var(--mut); }
.zl-planen-fertig .zl-gross { font: 400 28px/1.15 var(--serif); color: var(--fg); }
@media (max-width: 860px) { .zl-planen { border-inline-start: 0; } }
@media (prefers-reduced-motion: reduce) { .zl-vorne, .zl-schalter::after, .zl-fortschritt i { transition: none; } }
