/* 🔁 Routinen (A-073, routinen.js). Auswahl-Knöpfe, nummerierte Schritte, Anleitung zum Aufklappen, Abhaken-Modus.
   Farben als Variablen: hell = App-Grün auf Weiß, dunkel = abgedunkelt (Text >= 4,5 : 1). Farbe nie allein:
   Auswahl hat zusätzlich Rahmen + Häkchen-Zustand (aria-pressed), Erledigt ist durchgestrichen + angehakt. */
:root {
  --rout-gruen: #3f7306; --rout-gruen-text: #fff; --rout-text: #1f2a17; --rout-leise: #4f5b47;
  --rout-rand: #b9c2b0; --rout-flaeche: #fff; --rout-nr: #eef3ea; --rout-anl: #f7f9f5; --rout-anl-rand: #dfe6d8;
  --rout-chip: #fff; --rout-link: #2f5d04;
}
html.dark {
  --rout-gruen: #3f7306; --rout-gruen-text: #fff; --rout-text: #f2f4ef; --rout-leise: #c9d1c2;
  --rout-rand: #4a5246; --rout-flaeche: #1f242a; --rout-nr: #2c3a22; --rout-anl: #262c26; --rout-anl-rand: #3b4538;
  --rout-chip: #1f242a; --rout-link: #a8d36a;
}
.rout-karte { color: var(--rout-text); }
.rout-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.rout-chip { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--rout-rand); background: var(--rout-chip); color: var(--rout-text); font: inherit; font-size: 16px; cursor: pointer; }
.rout-chip.rout-chip-an { background: var(--rout-gruen); border-color: var(--rout-gruen); color: var(--rout-gruen-text); font-weight: 700; }
.rout-chip:focus-visible, .rout-info:focus-visible, .rout-zeile input:focus-visible, .rout-schalter input:focus-visible { outline: 3px solid #1565c0; outline-offset: 2px; }
.rout-routine { background: var(--rout-flaeche); border: 1px solid var(--rout-rand); border-radius: 14px; padding: 12px; }
.rout-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rout-kopf h3 { margin: 0; font-size: 19px; color: var(--rout-text); overflow-wrap: anywhere; }
.rout-schalter { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-height: 44px; cursor: pointer; margin: 0; }
.rout-schalter input { width: 22px; height: 22px; accent-color: var(--rout-gruen); }
.rout-fortschritt { margin: 4px 0 8px; }
.rout-fortschritt progress { width: 100%; height: 10px; accent-color: var(--rout-gruen); }
.rout-stand { margin: 4px 0 0; font-size: 14px; color: var(--rout-leise); }
.rout-schritte { list-style: none; counter-reset: rout; margin: 0; padding: 0; }
.rout-schritt { counter-increment: rout; border-top: 1px solid var(--rout-rand); padding: 8px 2px; }
.rout-reihe { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.rout-zeile { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 200px; min-width: 0; margin: 0; font-weight: 400; font-size: 16px; line-height: 1.4; }
.rout-nr { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--rout-nr); color: var(--rout-link); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.rout-nr::before { content: counter(rout); }
.rout-text { overflow-wrap: anywhere; padding-top: 2px; }
.rout-zeile input[type="checkbox"] { flex: 0 0 26px; width: 26px; height: 26px; margin: 0; accent-color: var(--rout-gruen); }
.rout-erledigt { text-decoration: line-through; color: var(--rout-leise); }
.rout-info { margin-left: auto; min-height: 36px; padding: 4px 8px; border: 0; background: transparent; color: var(--rout-link); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; white-space: nowrap; }
.rout-anl { background: var(--rout-anl); border: 1px solid var(--rout-anl-rand); border-radius: 10px; padding: 8px 10px; margin: 6px 0 2px 36px; font-size: 15px; line-height: 1.45; }
.rout-anl[hidden] { display: none; }
.rout-anl-text { margin: 0 0 6px; white-space: pre-line; overflow-wrap: anywhere; }
.rout-bild { display: block; max-width: 100%; max-height: 360px; border-radius: 8px; margin: 6px 0; }
.rout-unten { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.rout-hinweis { color: var(--rout-leise); font-size: 14px; margin: 4px 0; }
.rout-leer { color: var(--rout-leise); margin: 8px 0; }
.rout-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 14px; }
@media (max-width: 480px) { .rout-anl { margin-left: 0; } .rout-info { margin-left: 36px; } }

/* Bearbeiten (nur Admin) */
.rout-edit h3 { margin: 16px 0 4px; }
.rout-edit-liste { list-style: none; padding: 0; margin: 6px 0 12px; counter-reset: route; }
ol.rout-edit-liste > li { counter-increment: route; }
ol.rout-edit-liste > li > .rout-edit-name::before { content: counter(route) ". "; font-weight: 700; }
.rout-edit-liste li { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 4px 0; border-bottom: 1px solid var(--rout-rand); }
.rout-edit-liste li > .rout-edit-name { flex: 1; min-width: 120px; overflow-wrap: anywhere; }
.rout-edit-liste input[type="text"] { flex: 1; min-width: 100px; }
.rout-neu-zeile { display: flex; gap: 8px; flex-wrap: wrap; }
.rout-neu-zeile input { flex: 1; min-width: 160px; }
.hc-sheet.rout-form { max-width: 560px; }
.rout-form label { display: block; margin-top: 10px; font-weight: 600; }
.rout-form input[type="text"], .rout-form textarea { width: 100%; box-sizing: border-box; }
.rout-fenster-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rout-fotos-titel { margin: 14px 0 4px; }
.rout-bilder-liste { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.rout-bilder-liste li { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rout-bilder-liste img { max-width: 140px; max-height: 110px; border-radius: 8px; }
.rout-foto-neu { border-top: 1px solid var(--rout-rand); margin-top: 8px; padding-top: 4px; }
.rout-foto-neu .btn { margin-top: 8px; }
.rout-form-knoepfe { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
