/* =====================================================================
   app.css — MyRx UI-Gerüst Block 1 · APP-UI
   Tokens: Design-Tokens-Entscheid A3 v1-0 (03.07.) — „Frisch + Kachel"
   Regeln: System-Schrift, Dynamic Type (rem, -apple-system-body),
   Touch-Ziele ≥ 3rem, Mindesthöhen statt Fixhöhen, kein Inline-Nichts.
   ===================================================================== */

:root {
  --papier:      #FAFCFB;
  --tinte:       #16302B;
  --gruen:       #0E8560;
  --gruen-hell:  #E4F5EE;
  --linie:       #DBE5E1;
  --rot:         #C24E2E;
  --grau:        #5A6B67;
  --grau-hell:   #9AA8A4;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
@supports (font: -apple-system-body) {
  html { font: -apple-system-body; } /* folgt iOS „größerer Text" */
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--papier); color: var(--tinte);
  min-height: 100vh; padding-bottom: 6rem;
}
button, input, textarea, label { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------------- Kopf ---------------- */
.apphead {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1.875rem 0.3rem;   /* MOCK 006: Fluchtlinie 30 px wie das Tableau, Kopf flacher */
}
.marke { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; }
.marke span { color: var(--gruen); }
.zurueck {
  border: none; background: none; color: var(--gruen);
  font-size: 1rem; font-weight: 700; min-height: 3rem; padding: 0 0.3rem;
}
.personpille {
  margin-left: auto;
  font-size: 1rem; font-weight: 600; background: #fff;
  border: 1px solid var(--linie); border-radius: 99rem;
  padding: 0.35rem 0.9rem; min-height: 2.75rem;
}
.mehrknopf {
  border: none; background: #fff; border: 1px solid var(--linie);
  border-radius: 99rem; width: 2.75rem; min-height: 2.75rem;
  font-size: 1.2rem; font-weight: 800; color: var(--grau);
}
.personpille + .mehrknopf { margin-left: 0; }
.mehrknopf:only-of-type { margin-left: auto; }

/* ---------------- Knöpfe ---------------- */
.knopf {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; min-height: 2.9rem; border: none; border-radius: 99px;
  font-size: 1rem; font-weight: 600; margin-top: 0.36rem;   /* R3.7: Pillen-Familie (THO 21.09.) · R3.8: Abstand wie Karten */
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12);   /* R3.8: Schatten ueberall (THO 21.09.) */
}
.knopf.primaer { background: var(--gruen); color: #fff; }
.knopf.sekundaer { background: #fff; color: var(--tinte); border: 1px solid rgba(22, 48, 43, 0.11); }
.knopf.schmal { width: auto; padding: 0 1rem; margin-top: 0; min-height: 2.9rem; }
.knopf:active { transform: scale(0.99); }

/* ---------------- Zuhause: Listen ---------------- */
.abschnittslabel {
  padding: 0.9rem 1.1rem 0.25rem; font-size: 0.85rem; font-weight: 800;
  color: var(--grau); text-transform: uppercase; letter-spacing: 0.05em;
}
.listenkarte {
  display: flex; align-items: center; gap: 0.7rem; text-align: left;
  background: #fff; border: 1px solid var(--linie); border-radius: 0.8rem;
  margin: 0.18rem 0.9rem; padding: 0.46rem 0.95rem; min-height: 3.05rem;
  width: calc(100% - 1.8rem);
} /* wb-16: THOs Mittelweg, Feinstufe 07.07. — zwei Zeilen bleiben, Polster enger */
.listenkarte:active { background: var(--gruen-hell); }
.listenkarte .zeichen {
  width: 2.6rem; height: 2.6rem; border-radius: 0.7rem; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.1rem; font-weight: 800;
  background: var(--gruen-hell); color: var(--gruen);
}
.listenkarte .text { flex: 1; min-width: 0; }
.listenkarte .titel { font-size: 1.08rem; font-weight: 700; }
.listenkarte .unter { font-size: 0.85rem; color: var(--grau); margin-top: 0.1rem; }
.listenkarte .anzahl { font-size: 1rem; font-weight: 700; color: var(--grau); }
.listenkarte .pfeil { color: var(--grau-hell); font-size: 1.3rem; font-weight: 700; }
.listenkarte.gedimmt { opacity: 0.62; }
.listenkarte.gedimmt .zeichen {
  background: var(--papier); border: 1.5px dashed var(--grau-hell); color: var(--grau-hell);
}
.karten-merker {
  display: inline-block; margin-top: 0.15rem;
  font-size: 0.85rem; color: var(--rot); font-weight: 600;
}

/* ---------------- Leer-Zustand ---------------- */
.leer {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  justify-content: center; gap: 1rem; padding: 3rem 1.4rem 1rem; min-height: 60vh;
}
.leer-viereck {
  width: 5.4rem; height: 5.4rem; border: 2.5px dashed var(--gruen); border-radius: 1.1rem;
  display: grid; place-items: center; color: var(--gruen); font-size: 2.2rem;
}
.leer h1 { font-size: 1.45rem; line-height: 1.25; }
.leer p { font-size: 1rem; color: var(--grau); max-width: 18rem; line-height: 1.45; }
.leer .knopf { max-width: 20rem; }

/* ---------------- Einzelplan ---------------- */
.plankopf { padding: 0 1.1rem 0.4rem; }
.plantitel { font-size: 1.2rem; font-weight: 800; }   /* R3.26: Titel-Massstab 1,2 */
.planuntertitel { font-size: 0.85rem; color: var(--grau); margin-top: 0.1rem; }
.planhinweis {
  margin: 0.4rem 0.9rem; padding: 0.6rem 0.9rem;
  background: #fff; border: 1.5px dashed var(--linie); border-radius: 0.8rem;
  font-size: 0.85rem; color: var(--grau);
}
.reiter {
  display: grid; grid-template-columns: 1fr 1fr; margin: 0.3rem 0.9rem 0.4rem;
  background: #fff; border: 1px solid rgba(22, 48, 43, 0.11); border-radius: 99px; overflow: hidden;   /* R3.7: Pillen-Paar */
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12);   /* R3.8 */
}
.reiter button {
  border: none; background: #fff; font-size: 1rem; font-weight: 600; min-height: 2.9rem;
}
.reiter button.an { background: var(--tinte); color: #fff; }
.spaltenkopf { display: flex; justify-content: flex-end; padding: 0.35rem 1.35rem 0.1rem; }
.spaltenkopf .zellen { display: grid; grid-template-columns: repeat(4, 2rem); gap: 0.2rem; }
.spaltenkopf .zellen span {
  font-size: 0.62rem; color: var(--grau); font-weight: 800; text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.planliste {
  background: #fff; border: 1px solid var(--linie); border-radius: 0.9rem;
  margin: 0.1rem 0.9rem 0.8rem; overflow: hidden;
}
.gruppenkopf {
  padding: 0.55rem 1.1rem 0.25rem; font-size: 0.85rem; font-weight: 600;
  color: var(--grau); text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--papier); border-top: 1px solid var(--linie);
}
.planliste .gruppenkopf:first-child { border-top: none; }
.zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 0.7rem;
  width: 100%; text-align: left; background: #fff; border: none;
  border-top: 1px solid var(--papier);
  padding: 0.55rem 0.9rem 0.55rem 1.1rem; min-height: 3.25rem;
}
.planliste .zeile:first-child { border-top: none; }
.zeile:active { background: var(--gruen-hell); }
.zeile .name { font-size: 1rem; font-weight: 600; min-width: 0; line-height: 1.25; }
.zeile .name .stift { color: var(--grau-hell); font-weight: 400; }
.zeile .name small { display: block; font-size: 0.85rem; color: var(--grau); font-weight: 500; margin-top: 0.05rem; }
.zeile.pausiert { opacity: 0.55; }
.zeile.pausiert .name::after { content: " · pausiert"; font-size: 0.85rem; color: var(--grau); font-weight: 600; }

/* Kachel-Regel (A3): belegte Zellen = satte Kacheln, weiße Ziffer */
.quartett {
  display: grid; grid-template-columns: repeat(4, 2rem); gap: 0.2rem;
  flex-shrink: 0; font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.q {
  background: var(--papier); border: 1px solid var(--linie); border-radius: 0.35rem;
  text-align: center; padding: 0.2rem 0 0.14rem; font-size: 0.85rem; font-weight: 700;
  color: var(--grau-hell); overflow: hidden;
}
.q.an { background: var(--gruen); border-color: var(--gruen); color: #fff; font-weight: 800; }

/* ---------------- Mehr ---------------- */
.mehrtitel { font-size: 1.3rem; font-weight: 800; padding: 0.4rem 1.1rem 0.3rem; }
.mehrtitel.klein { font-size: 1rem; color: var(--grau); padding-top: 1rem; }
.wbchip {
  font-size: 0.7rem; font-weight: 800; color: #8a6d00; background: #FFF3D6;
  border: 1px solid #D6A94E; border-radius: 0.5rem; padding: 0.1rem 0.45rem;
  vertical-align: 0.1rem;
}
.mehrliste {
  background: #fff; border: 1px solid var(--linie); border-radius: 1rem;
  margin: 0.3rem 0.9rem; overflow: hidden;
}
.mehrzeile {
  display: block; width: 100%; text-align: left; background: #fff; border: none;
  border-top: 1px solid var(--papier); padding: 0.85rem 1.1rem; min-height: 3.4rem;
  font-size: 1rem; font-weight: 700;
}
.mehrliste .mehrzeile:first-child { border-top: none; }
.mehrzeile:active { background: var(--gruen-hell); }
.mehrzeile.gefahr { color: var(--rot); }
.mehrzeile.still:active { background: #fff; }
.mehrsub { display: block; font-size: 0.85rem; color: var(--grau); font-weight: 500; margin-top: 0.1rem; }

/* ---------------- Scan-Knopf ---------------- */
.fab {
  position: fixed; right: 1.1rem; bottom: 1.3rem; z-index: 40;
  width: 3.8rem; height: 3.8rem; border-radius: 50%;
  background: var(--gruen); color: #fff; border: none; font-size: 1.5rem;
  box-shadow: 0 0.3rem 1rem rgba(14, 133, 96, 0.4);
}

/* ---------------- Eintrag-Sheet (B14) ---------------- */
.schleier {
  position: fixed; inset: 0; background: rgba(22, 48, 43, 0.45); z-index: 60;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: #fff; border-radius: 1.4rem 1.4rem 0 0;
  padding: 0.7rem 1.1rem calc(1rem + env(safe-area-inset-bottom));
  box-shadow: 0 -0.5rem 1.8rem rgba(0, 0, 0, 0.28);
  max-height: 88vh; overflow-y: auto;
}
.griff { width: 2.75rem; height: 0.32rem; background: var(--linie); border-radius: 99rem; margin: 0 auto 0.7rem; }
.sheetkopf { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.sheettitel { font-size: 1.2rem; font-weight: 800; }
.sheetuntertitel { font-size: 0.85rem; color: var(--grau); margin-top: 0.1rem; }
.pausiertchip {
  margin-top: 0.5rem; display: inline-block;
  font-size: 0.85rem; font-weight: 700; color: var(--grau);
  background: var(--papier); border: 1px dashed var(--grau-hell);
  border-radius: 0.6rem; padding: 0.25rem 0.6rem;
}
.feldlabel { display: block; font-size: 0.85rem; font-weight: 800; margin-top: 1rem; }
.feldsub { display: block; font-size: 0.85rem; color: var(--grau); font-weight: 500; margin-top: 0.05rem; }
textarea, input[type="number"] {
  width: 100%; margin-top: 0.4rem; padding: 0.6rem 0.7rem;
  border: 1.5px solid var(--linie); border-radius: 0.7rem; background: var(--papier);
  font-size: 1rem; line-height: 1.4;
}
textarea:focus, input:focus { outline: 2px solid var(--gruen); border-color: var(--gruen); background: #fff; }
.vorratzeile { display: flex; gap: 0.5rem; align-items: stretch; margin-top: 0.4rem; }
.vorratzeile input { margin-top: 0; flex: 1; }
.vorratstand { font-size: 0.85rem; color: var(--grau); margin-top: 0.3rem; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 6rem; transform: translateX(-50%);
  background: var(--tinte); color: #fff; font-size: 0.85rem; font-weight: 600;
  padding: 0.7rem 1.1rem; border-radius: 0.8rem; z-index: 90;
  max-width: 88vw; text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: hoch 0.22s ease-out; }
  @keyframes hoch { from { transform: translateY(30%); opacity: 0.6; } to { transform: none; opacity: 1; } }
}

/* ============ v0-2: Scan-Fluss + Alte (N3') ============ */
.wbbanner {
  margin: 0.4rem 0.9rem; padding: 0.6rem 0.9rem;
  background: #FFF3D6; border: 1px solid #D6A94E; border-radius: 0.8rem;
  font-size: 0.85rem; color: #6b5106;
}
.scanpanel { padding: 0 0.9rem; }
.knopf.geist { background: transparent; border: none; color: var(--grau); font-size: 1rem; min-height: 2.8rem; box-shadow: none; }

.zeile.alt { opacity: 0.55; }
.zeile.alt .name::after { content: " · nicht mehr auf dem Plan"; font-size: 0.85rem; color: var(--grau); font-weight: 600; }
.chip {
  display: inline-block; margin-left: 0.35rem; vertical-align: 0.1rem;
  font-size: 0.75rem; font-weight: 800; border-radius: 0.5rem; padding: 0.08rem 0.4rem;   /* R3.26: Kleinkram 0,75 */
}
.chip.neu { background: var(--gruen-hell); color: var(--gruen); border: 1px solid var(--gruen); }
.chip.geaendert { background: var(--papier); color: var(--grau); border: 1px solid var(--linie); }

/* Bestätigen-Moment */
.scan-titel { font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }
.scan-titel .ok { color: var(--gruen); font-size: 1.35rem; }
.fakten { margin: 0.6rem 0 0.2rem; }
.fakten div { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.4rem 0; border-bottom: 1px solid var(--papier); font-size: 1rem; }
.fakten .k { color: var(--grau); }
.fakten .v { font-weight: 700; text-align: right; }
.seitenpunkte { display: flex; gap: 0.4rem; justify-content: center; margin: 0.6rem 0 0.2rem; }
.punkt { width: 2.2rem; height: 0.5rem; border-radius: 99rem; background: var(--linie); }
.punkt.da { background: var(--gruen); }
.personwahl {
  display: flex; align-items: center; gap: 0.7rem; width: 100%; text-align: left;
  border: 2px solid var(--linie); border-radius: 0.9rem; background: #fff;
  padding: 0.7rem 0.9rem; margin-top: 0.55rem; min-height: 3.4rem;
  font-size: 1rem; font-weight: 700;
}
.personwahl:active { background: var(--gruen-hell); }
.personwahl.neuanlage { border-style: dashed; border-color: var(--gruen); color: var(--gruen); }
.personwahl .kreis {
  width: 2.2rem; height: 2.2rem; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 0.85rem; font-weight: 800;
  background: var(--gruen-hell); color: var(--gruen);
}

/* ============ v0-3: Echte Kamera — Draufhalten pur (B6/B7) ============ */
.kamera {
  position: fixed; inset: 0; z-index: 50; background: #22332F;
  display: flex; flex-direction: column; padding-top: env(safe-area-inset-top);
}
.kamera-x {
  position: absolute; top: calc(0.8rem + env(safe-area-inset-top)); right: 0.9rem; z-index: 5;
  width: 3rem; height: 3rem; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.3); color: #fff; font-size: 1.2rem; font-weight: 800;
}
.kamera-status {
  margin: 0.9rem auto 0; background: rgba(0,0,0,0.35); color: #DDE7E4;
  font-size: 0.85rem; font-weight: 700; padding: 0.35rem 0.9rem; border-radius: 99rem;
}
.kamera-hinweis { color: #DDE7E4; text-align: center; font-size: 1rem; padding: 0.7rem 1.6rem 0; line-height: 1.4; }
.kamera-hinweis b { color: #fff; }
.sucher {
  position: relative; margin: 1rem auto 0; width: min(78vw, 22rem); aspect-ratio: 1;
  border-radius: 0.8rem; overflow: hidden; background: #000;
}
.sucher video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sucher-rahmen { position: absolute; inset: 0; pointer-events: none; }
.sucher-rahmen::before, .sucher-rahmen::after,
.sucher-rahmen { --ecke: 2.2rem; --dicke: 4px; --farbe: rgba(255,255,255,0.92); }
.sucher-rahmen::before, .sucher-rahmen::after {
  content: ""; position: absolute; width: var(--ecke); height: var(--ecke);
  border: var(--dicke) solid var(--farbe);
}
.sucher-rahmen::before { top: 0.5rem; left: 0.5rem; border-right: none; border-bottom: none; border-radius: 0.5rem 0 0 0; }
.sucher-rahmen::after  { bottom: 0.5rem; right: 0.5rem; border-left: none; border-top: none; border-radius: 0 0 0.5rem 0; }
.sucher-rahmen.treffer { --farbe: #4FC08D; }
.kruecke-zeile { text-align: center; padding: 1rem 0 0; min-height: 3rem; }
.kruecke-link {
  border: none; background: none; color: rgba(255,255,255,0.7);
  font-size: 1rem; font-weight: 700; min-height: 2.75rem; padding: 0 0.8rem;
  border-bottom: 1px dotted rgba(255,255,255,0.45);
}
.kruecke-link.klein { font-size: 0.85rem; min-height: 2.2rem; color: rgba(255,255,255,0.5); }
.kamera-wbzeile {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 0.8rem;
  padding: 0.6rem 1rem calc(1rem + env(safe-area-inset-bottom));
}
.kamera-wbchip {
  font-size: 0.72rem; font-weight: 800; color: #FFE9AE;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,233,174,0.5);
  border-radius: 0.5rem; padding: 0.15rem 0.5rem;
}

/* ============ 1a: Sortier-Modus, Personen-Sheet, Lizenzen, Detail ============ */
.zuhauswerkzeug { display: flex; justify-content: flex-end; padding: 0 1rem; min-height: 0; }
.sortknopf {
  border: 1px solid rgba(22, 48, 43, 0.11); background: #fff; color: var(--grau);
  border-radius: 99px; font-size: 0.85rem; font-weight: 600;   /* R3.8: halbe Pille rund (THO 21.09.) */
  min-height: 2.4rem; padding: 0 0.9rem; box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12);
}
.sortknopf.an { background: var(--tinte); color: #fff; border-color: var(--tinte); }
.sortpfeile { display: flex; gap: 0.35rem; flex-shrink: 0; }
.sortpfeile button {
  width: 2.75rem; min-height: 2.75rem; border-radius: 0.6rem;
  border: 2px solid var(--linie); background: #fff; font-size: 1rem; font-weight: 800; color: var(--tinte);
}
.sortpfeile button:disabled { opacity: 0.25; }
.listenkarte.sortier { border-style: dashed; }

.personzeile {
  display: flex; align-items: center; gap: 0.8rem; width: 100%; text-align: left;
  background: #fff; border: 2px solid var(--linie); border-radius: 0.9rem;
  padding: 0.7rem 0.9rem; margin-top: 0.55rem; min-height: 3.6rem;
  font-size: 1rem; font-weight: 700;
}
.personzeile:active { background: var(--gruen-hell); }
.personzeile .kreis {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1rem; font-weight: 800;
  background: var(--gruen-hell); color: var(--gruen);
}
.personzeile .haken { margin-left: auto; color: var(--gruen); font-size: 1.2rem; }
.personzeile.anlegen { border-style: dashed; border-color: var(--gruen); color: var(--gruen); }
.sheet .kleinlink {
  display: block; width: 100%; text-align: center; border: none; background: none;
  color: var(--grau); font-size: 0.85rem; font-weight: 700; min-height: 2.6rem; margin-top: 0.3rem;
}
.feldhinweis { font-size: 0.85rem; color: var(--grau); margin-top: 0.25rem; }
.knopf.gefahrrand { background: #fff; color: var(--rot); border: 2px solid var(--rot); }

.verlauf { margin-top: 0.9rem; }
.verlauf .vtitel { font-size: 0.85rem; font-weight: 800; }
.verlauf .vzeile { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid var(--papier); font-size: 0.85rem; }
.verlauf .vzeile .vd { color: var(--grau); }

.lizenztext { padding: 0 1.1rem; font-size: 1rem; line-height: 1.5; }
.lizenztext h3 { font-size: 1rem; margin-top: 0.9rem; }
.lizenztext p { margin-top: 0.3rem; color: #33453F; }
.lizenzfuss { font-size: 0.85rem; color: var(--grau); margin-top: 1rem; }

/* ============ B1: Listen-Mitgliedschaft im Eintrag-Sheet ============ */
.listentoggle {
  display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left;
  background: #fff; border: 1px solid rgba(22, 48, 43, 0.11); border-radius: 99px;   /* R3.8: Pillen-Standard */
  padding: 0.55rem 1.1rem; margin-top: 0.36rem; min-height: 2.9rem;
  font-size: 1rem; font-weight: 600; box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12);
}
.listentoggle .zeichen { font-size: 1.1rem; color: var(--grau-hell); font-weight: 800; }
.listentoggle.an { border-color: var(--gruen); background: var(--gruen-hell); }
.listentoggle.an .zeichen { color: var(--gruen); }

/* ============ B2: Plan-Kopf-Optionen, Aussteller ============ */
.plankopfzeile { display: flex; align-items: center; gap: 0.6rem; }
.plankopfzeile .plantitel { flex: 1; min-width: 0; }
.mehrknopf.klein { width: 2.4rem; min-height: 2.4rem; font-size: 1rem; flex-shrink: 0; }

/* ============ P2: „+ Medikament" (Katalog-Suche + Frei-Erfassen) ============ */
#infoSheetInhalt input {
  width: 100%; margin-top: 0.4rem; padding: 0.6rem 0.7rem;
  border: 1.5px solid var(--linie); border-radius: 0.7rem; background: var(--papier);
  font-size: 1rem; line-height: 1.4;
}
.trefferliste { margin-top: 0.4rem; max-height: 38vh; overflow-y: auto; }
.trefferzeile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem;
  width: 100%; text-align: left; background: #fff; border: 2px solid var(--linie);
  border-radius: 0.8rem; padding: 0.55rem 0.9rem; margin-top: 0.45rem;
  min-height: 3rem; font-weight: 700;
}
.trefferzeile:active { background: var(--gruen-hell); }
.trefferzeile .treffersub { font-size: 0.85rem; color: var(--grau); font-weight: 500; }
.trefferleer { margin-top: 0.7rem; font-size: 0.85rem; color: var(--grau); }
.quartettfelder { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
#infoSheetInhalt .quartettfelder input { margin-top: 0; text-align: center; font-variant-numeric: tabular-nums; }

/* ============ Suche v2: Gruppen-Trefferliste (Kontrakt v0-7) ============ */
.gruppenzeile {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; text-align: left; background: #fff; border: 2px solid var(--linie);
  border-radius: 0.8rem; padding: 0.55rem 0.9rem; margin-top: 0.45rem;
  min-height: 3rem; font-weight: 700;
}
.gruppenzeile:active { background: var(--gruen-hell); }
.gruppenname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gruppensub { flex: none; font-size: 0.85rem; color: var(--grau); font-weight: 600; }
.packungsklappe { margin-left: 0.9rem; }
.packungszeile {
  display: block; width: calc(100% - 0.0rem); text-align: left;
  background: var(--papier); border: 1.5px solid var(--linie);
  border-radius: 0.7rem; padding: 0.5rem 0.8rem; margin-top: 0.35rem;
  font-size: 0.85rem; font-weight: 600; min-height: 2.6rem;
}
.packungszeile:active { background: var(--gruen-hell); }

/* ============ Such-Vollbild (iOS-Tastatur-Befund THO 06.07.) ============ */
.sheet.suchmodus {
  top: 0; border-radius: 0; max-height: none;
  display: flex; flex-direction: column; overflow: hidden;
  padding-bottom: 0.4rem;
}
.suchmodus #infoSheetInhalt { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.suchmodus .trefferliste {
  flex: 1 1 auto; min-height: 0; max-height: none;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-bottom: 0.6rem;
}
.suchlinks { display: flex; gap: 1.4rem; align-items: center; margin-top: 0.5rem; flex: none; }

/* ============ wb-14: Sofa-Beschlüsse (Kapsel · H3 · Türen · dichte Zeilen) ============ */
/* G3-Kapsel: geteilte Pille, Flüsterton, Daumen-Zone */
.kapsel { position: fixed; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
          display: flex; border-radius: 99px; overflow: hidden;
          box-shadow: 0 2px 6px rgba(0,0,0,.14); z-index: 40; }
.kammer { width: 3.75rem; padding: 0.375rem 0; text-align: center; font-weight: 800; /* wb-18/D8: rem statt px — waechst mit iOS-Schrift */
          font-size: 1rem; border: 2px solid var(--gruen); background: #fff; color: var(--gruen); }
/* wb-16: Kapsel flacher + breiter — weniger Klotz, größere Tippfläche je Kammer */
.kscan { background: var(--tinte); color: #fff; border-color: var(--tinte);
         border-radius: 99px 0 0 99px; }
.kliste { border-left: none; border-right: 1px dashed var(--gruen); }
.kmedi { background: var(--gruen); color: #fff; border-left: none; border-radius: 0 99px 99px 0; }
.kammer:active { filter: brightness(1.08); }

/* H3: Ordnen wohnt in den Überschriften */
.abschnittszeile { display: flex; align-items: baseline; }
.abschnittszeile .abschnittslabel { margin: 0; }
.ordnenwerk { margin-left: auto; display: flex; gap: 0.4rem; }
.ordnenknopf { font-size: 1rem; font-weight: 800; color: var(--grau);
               background: none; border: none; padding: 0.15rem 0.45rem; border-radius: 0.5rem; }
.ordnenknopf.an { color: var(--gruen); background: var(--gruen-hell); }

/* J2-Türen: Einstellungen */
.tuer { display: flex; align-items: center; gap: 0.9rem; width: 100%; text-align: left;
        background: #fff; border: 2px solid var(--linie); border-radius: 1.1rem;
        padding: 1rem; margin-bottom: 11px; }
.tuer:active { background: var(--gruen-hell); }
.tbild { font-size: 1.7rem; flex: none; }
.tmitte { flex: 1; min-width: 0; }
.twort { display: block; font-weight: 800; font-size: 1rem; }
.tsub { display: block; color: var(--grau-hell); font-weight: 600; font-size: 0.85rem; }
.tpfeil { color: var(--grau-hell); font-size: 1.2rem; flex: none; }
.tuersatz { font-size: 0.85rem; color: var(--grau); margin: 0 2px 14px; line-height: 1.45; }
.fussleiste { display: flex; justify-content: space-between; align-items: center;
              margin-top: 18px; font-size: 0.74rem; color: var(--grau-hell); font-weight: 600; }
.werklink { color: var(--warnfarbe, #B8860B); background: #FBF4E4; border: 1px solid #B8860B;
            border-radius: 99px; padding: 4px 11px; font-weight: 800; font-size: 0.85rem; }

/* D-Basis: dichte einzeilige Treffer (Pillen folgen mit v0-7b) */
.gruppenzeile.dicht { min-height: 2.5rem; padding: 0.42rem 0.6rem; margin-top: 0.3rem;
                      border-width: 1.5px; border-radius: 0.6rem;
                      flex-direction: row; align-items: baseline; gap: 0.45rem;
                      font-weight: 600; font-size: 0.85rem; }
.zg-name { font-weight: 800; font-size: 0.85rem; color: var(--tinte);
           overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; }
.zg-w { color: var(--grau); white-space: nowrap; }
.zg-d { color: var(--gruen); font-weight: 800; white-space: nowrap; }
.zg-f { color: var(--grau); white-space: nowrap; }
.zg-m { white-space: nowrap; }
.zg-h { margin-left: auto; color: var(--grau-hell); white-space: nowrap; flex: none; }

/* ▦ am Suchfeld */
.suchzeile { display: flex; gap: 0.5rem; align-items: stretch; }
.suchzeile input { flex: 1; }
.suchscan { flex: none; width: 52px; border: 2px solid var(--tinte); background: var(--tinte);
            color: #fff; border-radius: 0.7rem; font-size: 1.1rem; font-weight: 800; margin-top: 0.4rem; }

/* ============ wb-15: Filter-Pillen (v0-7b, Schaubild D) ============ */
.pillenzeile { display: flex; gap: 5px; margin-top: 0.5rem; flex: none; }
.fpille { flex: 1; min-width: 0; text-align: center; border: 1.5px solid var(--linie);
          border-radius: 99px; padding: 4px 2px; background: var(--papier); }
.fpille .fpwort { display: block; font-size: 0.75rem; font-weight: 800; color: var(--grau); white-space: nowrap; }
.fpille .fpwert { display: block; font-size: 0.66rem; font-weight: 700; color: var(--grau-hell);
                  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpille.an { background: var(--gruen-hell); border-color: var(--gruen); }
.fpille.an .fpwort, .fpille.an .fpwert { color: var(--gruen); }
.fpille.auf { border-color: var(--gruen); }
.fklappe { border: 1.5px solid var(--gruen); border-radius: 0.9rem; background: #fff;
           box-shadow: 0 6px 18px rgba(0,0,0,.14); padding: 4px; margin-top: 6px;
           max-height: 34vh; overflow-y: auto; overscroll-behavior: contain; flex: none; }
.fkzeile { display: flex; justify-content: space-between; gap: 0.6rem; width: 100%;
           text-align: left; padding: 0.55rem 0.75rem; font-size: 0.85rem; font-weight: 700; /* wb-18/D8 */
           border-radius: 0.6rem; background: none; border: none; }
.fkzeile.an { background: var(--gruen-hell); color: var(--gruen); }
.fkzeile .fkzahl { color: var(--grau-hell); font-weight: 600; font-size: 0.85rem; }

/* wb-16: Such-Kopf mit ✕ (Abbrechen-Fehltipp-Falle entschärft) */
.suchkopf { display: flex; align-items: center; gap: 0.6rem; }
.suchkopf .sheettitel { flex: 1; }
.xknopf { flex: none; width: 40px; height: 40px; border-radius: 11px;
          border: 2px solid var(--linie); background: var(--papier); color: var(--grau);
          font-size: 1rem; font-weight: 800; }
.xknopf:active { background: var(--gruen-hell); }

/* ============ wb-17: J1-Kacheln · Riesel-Balken ============ */
.tuergitter { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kachel { background: #fff; border: 2px solid var(--linie); border-radius: 1.2rem;
          padding: 1.05rem 0.6rem 0.9rem; text-align: center; }
.kachel:active { background: var(--gruen-hell); }
.kachel .tbild { font-size: 2rem; display: block; margin-bottom: 0.45rem; }
.kachel .twort { display: block; font-weight: 800; font-size: 1rem; }
.kachel .tsub { display: block; color: var(--grau-hell); font-weight: 600; font-size: 0.74rem;
                margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ladebalken { position: relative; height: 2rem; border: 2px solid var(--linie);
              border-radius: 99px; overflow: hidden; background: var(--papier); margin-top: 0.6rem; }
.ladefuellung { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--gruen-hell);
                border-right: 2px solid var(--gruen); transition: width .25s ease; }
.ladepillen { position: absolute; inset: 0; display: flex; align-items: center;
              justify-content: center; gap: 0.6rem; font-size: 1rem;
              animation: rieseln 1.2s ease-in-out infinite alternate; }
@keyframes rieseln { from { transform: translateY(-2px); } to { transform: translateY(2px); } }

/* ================= wb-18: Praxis-Karte (Schaubild P, Dichte-Stufe 2, rem) ================= */
.kzeile { display: flex; align-items: center; gap: 0.55rem; width: 100%;
  padding: 0.28rem 1.1rem; border-top: 1px solid var(--linie);
  min-height: 2.4rem; background: none; text-align: left; }
.kzeile:active { background: var(--gruen-hell); }
.kzeile .medi { flex: 1; min-width: 0; }
.kzeile .kzname { font-weight: 700; font-size: 1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kzeile .kzunter { font-size: 0.75rem; color: var(--grau); margin-top: 0.03rem; }
.kzeile .kzunter b { font-weight: 700; }
.kzeile .quartett { flex: none; }
.kzeile.kz-gelb { background: #FFF8E1; }
.kzeile.kz-gelb .kzunter b { color: #B07C1E; }
.kzeile.kz-gruen { background: #EDF8F1; }
.kzeile.kz-gruen .kzunter b { color: var(--gruen); }
.kzeile.kz-grau { background: #F2F4F3; }
.kzeile.kz-grau .kzname { text-decoration: line-through; color: var(--grau); font-weight: 600; }
.kzeile.kz-grau .q { opacity: 0.45; }
/* Absetzen-Dialog (Schaubild Q, Moment 2) */
.absetzhaken { display: flex; align-items: center; gap: 0.5rem;
  width: 100%; background: none; text-align: left;
  padding: 0.5rem 0.2rem; font-size: 1rem; }
.absetzhaken .kasten { width: 1.25rem; height: 1.25rem; border-radius: 0.3rem;
  border: 2px solid var(--linie); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: var(--gruen); }
.absetzhaken.an .kasten { border-color: var(--gruen); background: var(--gruen-hell); }

/* ===== a3a: Einwurf (Ziegel wb-18-einwurf) ===== */
#einwurfSchleier { position:fixed; inset:0; background:rgba(22,48,43,0.35); z-index:80; }
#einwurfBlatt { position:fixed; left:0.6rem; right:0.6rem; bottom:0; z-index:81; background:#fff;
  border-radius:20px 20px 0 0; box-shadow:0 -10px 40px rgba(0,0,0,0.3); padding:1.1rem 1rem 1.5rem; text-align:center; }
#einwurfBlatt .ewIkon { font-size:2.4rem; }
#einwurfBlatt .ewTitel { font-size:1rem; margin:0.3rem 0 0; }
#einwurfBlatt .ewText { color:var(--grau, #5A6B67); font-size:0.85rem; margin:0.45rem 0 0; line-height:1.45; }
.ewPunkte { display:flex; justify-content:center; gap:0.45rem; margin-top:0.4rem; }
.ewPunkte i { width:0.6rem; height:0.6rem; border-radius:50%; background:var(--gruen, #0E8560); }
.ewPunkte i:nth-child(1){ opacity:0.35; } .ewPunkte i:nth-child(2){ opacity:0.65; }
.ewKnopf { display:block; width:100%; margin-top:0.9rem; padding:0.7rem; border:none; border-radius:13px;
  background:var(--gruen, #0E8560); color:#fff; font:inherit; font-weight:800; font-size:1rem; cursor:pointer; }
.ewKnopf.zweit { background:#fff; color:var(--gruen, #0E8560); border:1.5px solid var(--gruen, #0E8560); }
#btnEinwerfen { display:block; width:calc(100% - 1.6rem); margin:0.9rem 0.8rem 0; padding:0.75rem; border:none;
  border-radius:13px; background:var(--gruen, #0E8560); color:#fff; font:inherit; font-weight:800; font-size:1rem; cursor:pointer; }
.bestellhaken { color:var(--gruen, #0E8560); font-weight:700; font-size:0.85rem; white-space:nowrap; }

/* =====================================================================
   a3a-Nachtrag 16.08.: Konto-Sphäre (Schaubild R, Gesetz B3 — hinter
   der EINEN blauen Tür ist ALLES blau: Kopf, Grund). Farbe trägt nie
   allein: die Sphäre spricht zusätzlich über Titel und Wortlaut.
   ===================================================================== */
:root { --konto: #3B4C63; --konto-tief: #2E3C4F; --konto-hell: #A9B8CE; }
.tuerblau { margin-top: 1.4rem; }
.mehrzeile.konto { border-left: 4px solid var(--konto); color: var(--konto); font-weight: 600; }
.mehrzeile.konto .mehrsub { color: var(--grau); font-weight: 400; }
.kontopunkt { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--konto); margin-right: .5rem; vertical-align: .08rem; }
body.kontoSphaere { background: var(--konto); }
body.kontoSphaere .apphead { background: var(--konto); border-color: var(--konto-tief); }
body.kontoSphaere .zurueck { color: #fff; }
#ansichtKonto { min-height: calc(100vh - 4rem); }
#ansichtKonto .mehrtitel { padding-left: 1.875rem; padding-right: 1.875rem; }
#ansichtKonto .tuersatz, #ansichtKonto #kontoMaske, #ansichtKonto #kontoInfo, #ansichtKonto #kontoStand { margin-left: 1.875rem; margin-right: 1.875rem; }
#ansichtKonto .feldlabel { margin-top: .4rem; }
#ansichtKonto input { width: 100%; min-height: 3rem; border: 1px solid rgba(22, 48, 43, 0.14);
  border-radius: .75rem; padding: 0 .85rem; background: #fff; color: var(--tinte); margin-bottom: 1rem;
  font-size: 1rem; -webkit-appearance: none; appearance: none; }
#ansichtKonto input:focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 3px var(--gruen-hell); }
.knopf.kontoprimaer { background: #fff; color: var(--konto); }
.knopf.kontogeist { background: none; color: var(--konto-hell); border: 2px solid var(--konto-tief); }
.kontofehler { background: #FBEBE6; border-left: 4px solid var(--rot); color: var(--tinte);
  padding: .7rem .8rem; border-radius: .5rem; margin-bottom: 1rem; }
.kontokarte { background: #fff; border: 1px solid var(--linie); border-radius: .9rem; padding: 1rem; margin-bottom: 1rem; }
.kontoinfo { background: var(--gruen-hell); border-left: 4px solid var(--gruen); color: var(--tinte);
  padding: .7rem .8rem; border-radius: .5rem; margin-bottom: 1rem; line-height: 1.45; white-space: pre-line; }
.pwzeile { position: relative; margin-bottom: 1rem; }
#ansichtKonto .pwzeile input { margin-bottom: 0; padding-right: 3rem; }
.pwauge { position: absolute; right: .3rem; top: .3rem; min-height: 2.4rem; width: 2.6rem;
  border: none; background: none; font-size: 1.15rem; color: var(--gruen); border-radius: .5rem; }
.kontozeile { font-weight: 600; font-size: 1rem; }
.kontosub { color: var(--grau); margin-top: .35rem; }

/* =====================================================================
   MOCK 004 = 003 mit Schatten-Versatz nach rechts (Vergleich) · MOCK 003 = 002 + Karten mit Schatten + Symbole (THO 17:2x) · MOCK 002: Vorhang · Rx-Zeichen · Auswahl-Tableau.
   Nur Papier, Tinte, Grün — keine neue Farbe. Form des Rx-Zeichens = Familie
   (Praxis-Browser .rxmark), Farbe = App.
   ===================================================================== */
.rxmark { width: 2.75rem; height: 2.75rem; border-radius: 0.8rem; padding: 0; line-height: 1;
  border: 1.5px solid var(--gruen); background: var(--gruen-hell); color: var(--gruen);   /* THO 17:1x: kein Schwarz */
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rxmark small { font-size: 0.6em; margin-top: 0.55em; }
.vorhang { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: var(--papier); transition: opacity 0.45s ease; }
.vorhang.weg { opacity: 0; pointer-events: none; }
.vkarte { text-align: center; padding: 2rem 1.5rem; }
.vrx { width: 5.5rem; height: 5.5rem; border-radius: 1.4rem; border: 2px solid var(--gruen); background: var(--gruen-hell);
  color: var(--gruen); font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; font-size: 2.8rem;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1; margin-bottom: 1.2rem; }
.vrx small { font-size: 0.6em; margin-top: 0.55em; }
.vtitel { font-size: 1.6rem; font-weight: 300; letter-spacing: -0.02em; color: var(--tinte); }
.vtext { margin-top: 0.55rem; color: var(--grau); font-size: 1rem; line-height: 1.45; }
.tableau { display: grid; gap: 1rem; padding: 2.2rem 1.875rem 2rem; }   /* THO 17:1x: Luft 30 px */
.tableau .tuer { min-height: 2.75rem; border-radius: 99px; border: 1px solid rgba(22, 48, 43, 0.11); background: #fff;
  color: var(--gruen); font-size: 1rem; font-weight: 600; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 0 1rem;
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12); }   /* MOCK 004 (b): wie 003, plus 2 px nach rechts (Licht oben links) */
.tableau .tuer svg { flex-shrink: 0; }
.tableau .tuer:active { box-shadow: 0 1px 3px rgba(22, 48, 43, 0.14); }
.tableau .tuer:active { background: var(--gruen-hell); }

/* MOCK 005 (THO 22.08. ~18:2x): Begrüßung, leise Zeile, stiller Personen-Text im Kopf */
.gruss { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; font-size: 1.55rem; color: var(--tinte); line-height: 1.1; padding: 0; }
.grusskopf { padding: 0.2rem 0.2rem 0.4rem; }
.grussunter { font-size: 1rem; color: var(--grau); padding: 0.5rem 0 0; }   /* THO 19:3x: eine halbe Zeile Abstand */
.leise { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.1rem; padding: 1.6rem 0 0; }
.leiselink { border: none; background: none; color: var(--grau); font-size: 0.85rem; font-weight: 500; min-height: 2.4rem; padding: 0 0.2rem; }
.leiselink:active { color: var(--gruen); }
.kopfperson { margin-left: auto; font-size: 0.85rem; color: var(--grau); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }

/* MOCK 006: ⋯ oben rechts, leise; das Mehr-Blatt nutzt die Mehr-Liste der Fläche */
.mehrknopf.leise { border: none; background: none; color: var(--grau); font-size: 1.5rem; width: 2.4rem; min-height: 2.4rem; margin-left: auto; }
.sheet { overscroll-behavior: contain; }   /* THO 20:0x: Wischen bewegt nicht die Seite dahinter */
html.blattOffen { overflow: hidden; overscroll-behavior: none; }   /* THO 20:1x: Klemme, solange ein Blatt offen ist */
html.blattOffen body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; overscroll-behavior: none; }
.sheet.festes-blatt .griff { visibility: hidden; }   /* THO 20:2x: kein Griff = nicht wischbar */
.sheet .abbrechen-auto { margin-top: 0.9rem; }   /* R3.9 */
.tableau.tableau-blatt { padding: 0.6rem 0.6rem 0.2rem; }   /* THO 19:4x: im ⋯-Blatt derselbe Stil wie vorne */
.tableau .tuer.dunkel { color: var(--tinte); }            /* „von mir aus Schwarz — ist ja was Besonderes“ */

/* =====================================================================
   MOCK 008 (APP-UI 22.08.2026, THO 18:1x): „Meine Listen" im 007-Design.
   Nur Anstrich — Abschnitte, Karten, Kapsel bleiben, wie sie sind.
   ===================================================================== */
.abschnittslabel { padding: 1.1rem 1.875rem 0.35rem; font-size: 0.85rem; font-weight: 600;
  color: var(--grau); text-transform: uppercase; letter-spacing: 0.06em; }
.abschnittszeile { padding-right: 1.875rem; }
.abschnittszeile .abschnittslabel { padding-right: 0; }
.listenkarte { border: 1px solid rgba(22, 48, 43, 0.11); border-radius: 0.9rem;
  margin: 0.3rem 1.875rem; width: calc(100% - 3.75rem); padding: 0.35rem 0.8rem; min-height: 2.75rem; gap: 0.6rem;   /* THO 18:2x: kompakt */
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12); }
.listenkarte:active { background: var(--gruen-hell); box-shadow: 2px 1px 3px rgba(22, 48, 43, 0.10); }
.listenkarte .zeichen { width: 1.9rem; height: 1.9rem; border-radius: 0.55rem; font-size: 0.85rem; font-weight: 600; }   /* THO 18:2x: Piktogramm kleiner */
.listenkarte .titel { font-size: 1rem; font-weight: 600; color: var(--tinte); line-height: 1.2; }
.listenkarte .unter { font-size: 0.85rem; color: var(--grau); margin-top: 0.1rem; line-height: 1.25; }
.listenkarte .anzahl { font-size: 0.85rem; font-weight: 500; color: var(--grau); }
.listenkarte .pfeil { color: var(--grau-hell); font-size: 1.1rem; font-weight: 400; }
.listenkarte.gedimmt { opacity: 1; box-shadow: none; border: 1px dashed rgba(22, 48, 43, 0.18); background: transparent; }
.listenkarte.gedimmt .titel { color: var(--grau); font-weight: 500; }
.ordnenknopf { font-weight: 600; color: var(--grau-hell); }
.ordnenknopf.an { color: var(--gruen); }
.kapsel { right: 1.875rem; bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px)); background: #fff;
  border: 1px solid rgba(22, 48, 43, 0.11);
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12); }
.kammer { width: 3.4rem; min-height: 2.9rem; padding: 0; border: none; background: #fff; color: var(--gruen);
  display: flex; align-items: center; justify-content: center; }
.kammer + .kammer { border-left: 1px solid rgba(22, 48, 43, 0.11); }
.kscan, .kmedi { background: #fff; color: var(--gruen); border-color: transparent; }
.kliste { border-right: none; }
.kammer:active { background: var(--gruen-hell); filter: none; }
/* THO 18:3x: Safari-Stufen sind 85 % (1× kleiner) und 75 % (2× kleiner) — Optimum dazwischen: die Listen-Seite samt Kapsel auf 80 %.
   Auswahl und Kopf bleiben bei 100 %. (Mock-Maß; in der Stilkarte wird daraus eine echte Schriftstufe.) */
#ansichtZuhause, #kapsel { zoom: 1; }   /* R3.4: Mock-Schraube 0.8 gefallen — gleiche Stufe wie die Startseite (THO 21.09.) */

/* MOCK 010 (THO 19:0x): Name = Schalter · Kacheln gleich hoch */
.grussname { font: inherit; color: inherit; background: none; border: none; padding: 0; min-height: 2.4rem; }
.grussname:active, .kopfperson:active { color: var(--gruen); }
.kopfperson { background: none; border: none; padding: 0 0 0 0.4rem; min-height: 2.4rem; text-align: right; }
.listenkarte { min-height: 3.2rem; }   /* zwei Textzeilen hoch — auch wenn nur eine drinsteht */

/* MOCK 011 (THO 19:1x): lange Namen · Personen-Blatt im Kartenstandard */
.kopfperson { max-width: none; flex: 1 1 auto; min-width: 0; margin-left: 0.4rem; }   /* nimmt den Restplatz, kürzt erst am Ende */
.apphead .zurueck { flex-shrink: 0; }
.grusskopf .gruss { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* THO 19:3x: Höflichkeit — der Name bleibt in EINER Zeile, die Schrift schrumpft bei Bedarf */
.grussname { display: inline; white-space: nowrap; text-align: left; }
.personzeile { border: 1px solid rgba(22, 48, 43, 0.11); border-radius: 0.9rem; background: #fff;
  min-height: 3.2rem; padding: 0.35rem 0.8rem; margin-top: 0.5rem; font-weight: 600; color: var(--tinte);
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12); }
.personzeile:active { background: var(--gruen-hell); box-shadow: 2px 1px 3px rgba(22, 48, 43, 0.10); }
.personzeile .kreis { width: 1.9rem; height: 1.9rem; font-size: 0.85rem; font-weight: 600; }
.personzeile .haken { font-size: 1rem; }
.personzeile.anlegen { box-shadow: none; background: transparent; border: 1px dashed rgba(22, 48, 43, 0.18);
  color: var(--grau); font-weight: 500; }
.personzeile.anlegen .kreis { background: transparent; border: 1px dashed var(--grau-hell); color: var(--grau); }
.sheet .kleinlink { font-weight: 500; }

/* MOCK 012 (THO 19:3x): Daten ändern im CI — Felder, Labels, Knöpfe der Blätter im Kartenstandard */
.sheet input:not([type="checkbox"]):not([type="radio"]), .sheet textarea, .sheet select {
  width: 100%; margin-top: 0.3rem; padding: 0.55rem 0.85rem; min-height: 2.75rem;
  border: 1px solid rgba(22, 48, 43, 0.14); border-radius: 0.75rem; background: #fff;
  font-size: 1rem; line-height: 1.3; color: var(--tinte); -webkit-appearance: none; appearance: none; }
.sheet input[type="date"] { min-height: 2.75rem; }
.sheet input:focus, .sheet textarea:focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 3px var(--gruen-hell); background: #fff; }
.sheet .feldlabel { font-size: 0.85rem; font-weight: 600; color: var(--grau); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 1rem; }
.sheet .feldhinweis { font-size: 0.85rem; color: var(--grau-hell); margin-top: 0.3rem; line-height: 1.35; }
.sheettitel { font-size: 1.2rem; font-weight: 600; }   /* R3.26: Titel-Massstab 1,2 */
.sheetuntertitel { font-size: 0.85rem; color: var(--grau); margin-top: 0.15rem; }
.sheet .knopf.primaer { border-radius: 99px; min-height: 2.9rem; font-size: 1rem; font-weight: 600; margin-top: 1.4rem;
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 10px 22px rgba(22, 48, 43, 0.14); }
.sheet .knopf.gefahrrand { background: none; border: none; color: var(--rot); font-size: 1rem; font-weight: 500;
  min-height: 2.6rem; margin-top: 0.4rem; box-shadow: none; }   /* Löschen = leise rote Zeile, kein Kasten */
.sheet .kleinlink { font-weight: 500; color: var(--grau-hell); }
.sheet { padding-left: 1.875rem; padding-right: 1.875rem; }   /* THO 19:4x: 30 px zum Rand, wie überall */
/* THO 19:5x: runde Pillen (Bogen links + rechts) statt abgerundeter Ecken — Karten, Personenzeilen, Eingabefelder, Zeichen */
.listenkarte, .personzeile { border-radius: 99px; padding-left: 0.55rem; }
.listenkarte .zeichen { border-radius: 50%; }
.sheet input:not([type="checkbox"]):not([type="radio"]), .sheet textarea, .sheet select { border-radius: 99px; padding-left: 1.1rem; padding-right: 1.1rem; }
.sheet textarea { border-radius: 1.4rem; }

/* MOCK 013 (THO 19:5x): Personen-Felder in zwei Gruppen */
.sheet .gruppe { font-size: 0.85rem; font-weight: 600; color: var(--gruen); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.9rem; }
.sheet .kacheln { display: flex; gap: 0.4rem; margin-top: 0.3rem; }
.sheet .kachel4 { flex: 1; min-height: 3rem; border-radius: 99px; border: 1px solid rgba(22, 48, 43, 0.14); background: #fff; color: var(--tinte);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding: 0.25rem 0; }
.sheet .kachel4 b { font-size: 1rem; font-weight: 700; }
.sheet .kachel4 small { font-size: 0.62rem; color: var(--grau); }
.sheet .kachel4.an { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.sheet .kachel4.an small { color: #fff; }
.sheet .feldzeile { display: flex; gap: 0.6rem; }
.sheet .feldteil { flex: 1; min-width: 0; }
.sheet .feldteil.schmal { flex: 0 0 6.5rem; }
.sheet .klapp { display: block; width: 100%; text-align: left; border: none; background: none; color: var(--gruen);
  font-size: 1rem; font-weight: 600; min-height: 2.6rem; margin-top: 0.9rem; padding: 0; }
.sheet .weitere { margin-top: -0.4rem; }
.sheet .satz { margin-top: 1.1rem; padding: 0.6rem 0.9rem; background: var(--gruen-hell); border-radius: 1rem;
  font-size: 0.85rem; color: var(--tinte); line-height: 1.4; }

/* =====================================================================
   MOCK 014 (APP-UI 22.08.2026, THO 21:2x): Medikamenten-Suche als Seite.
   Die Tastatur nimmt die Hälfte — der Rest gehört den Treffern.
   ===================================================================== */
.sheet.suchmodus { background: var(--papier); box-shadow: none;
  padding: calc(0.25rem + env(safe-area-inset-top, 0px)) 0 0; }
.sheet#ansichtSuche .griff { display: none; }
.sheet#ansichtSuche .abbrechen-auto { display: none; }   /* Ausgang ist „‹ Zurück“ oben — kein Sandwich zwischen Liste und Tastatur (THO 06.07.) */
#ansichtSuche .suchkopf { display: flex; align-items: center; gap: 0.4rem; margin: 0 1.875rem; min-height: 2.6rem; flex: none; }
#ansichtSuche .suchkopf .zurueck { min-height: 2.6rem; padding: 0 0.2rem 0 0; margin-left: -0.1rem; }
#ansichtSuche .suchtitel { flex: 1; min-width: 0; text-align: right; font-size: 0.9rem; font-weight: 500; color: var(--grau);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ansichtSuche .suchzeile { margin: 0.1rem 1.875rem 0; gap: 0.5rem; flex: none; align-items: center; }
#infoSheet#ansichtSuche .suchzeile input { margin-top: 0; min-height: 2.75rem; background: #fff; border-radius: 99px;
  padding-left: 1.1rem; padding-right: 1.1rem; }   /* ID-Regel #infoSheetInhalt input schlägt Klassen — darum hier mit ID */
#ansichtSuche .suchscan { width: 2.75rem; height: 2.75rem; min-height: 2.75rem; margin-top: 0; padding: 0; border-radius: 50%;
  border: 1px solid rgba(22, 48, 43, 0.14); background: #fff; color: var(--gruen);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10); }
#ansichtSuche .suchscan:active { background: var(--gruen-hell); }
#ansichtSuche .pillenzeile, #ansichtSuche .fklappe { margin-left: 1.875rem; margin-right: 1.875rem; }
#ansichtSuche .trefferliste { margin-top: 0.15rem; padding: 0.2rem 1.875rem 1.4rem; }
/* Trefferkarten im Kartenstandard: zwei Zeilen, rund, Flughöhe (wie die Listen-Karten) */
#ansichtSuche .gruppenzeile.dicht { flex-direction: column; align-items: stretch; gap: 0.05rem; background: #fff;
  border: 1px solid rgba(22, 48, 43, 0.11); border-radius: 99px; padding: 0.45rem 1.25rem; margin-top: 0.5rem; min-height: 3.2rem;
  justify-content: center; font-size: 0.8rem; font-weight: 500;
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12); }
#ansichtSuche .gruppenzeile.dicht:active { background: var(--gruen-hell); box-shadow: 2px 1px 3px rgba(22, 48, 43, 0.10); }
.zg-oben { display: flex; align-items: baseline; gap: 0.45rem; min-width: 0; }
.zg-oben .zg-name { font-size: 1rem; font-weight: 600; line-height: 1.2; }
.zg-oben .zg-d { font-size: 0.85rem; font-weight: 600; }
.zg-unten { display: flex; align-items: baseline; gap: 0.35rem; min-width: 0; color: var(--grau); line-height: 1.25; overflow: hidden; }
.zg-unten > span + span:not(.zg-h)::before { content: '·'; margin-right: 0.35rem; color: var(--grau-hell); }
.zg-unten .zg-w { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.zg-unten .zg-m { color: var(--tinte); }
/* Packungen als Pillen unter der Karte */
#ansichtSuche .packungsklappe { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 0.15rem 1.25rem; }
#ansichtSuche .packungszeile { display: inline-flex; align-items: center; width: auto; min-height: 2.2rem; margin-top: 0; padding: 0.25rem 0.9rem;
  border-radius: 99px; border: 1px solid rgba(22, 48, 43, 0.14); background: #fff; font-size: 0.85rem; font-weight: 500; color: var(--tinte); }
/* Leerzustand: nicht leer */
.suchleer { margin: 2rem 0 0; text-align: center; color: var(--grau); }
.suchleer svg { color: var(--grau-hell); }
.suchleer p { margin: 0.5rem 0 0; font-size: 1rem; line-height: 1.35; }
.suchleer .kleinlink { display: inline-block; margin-top: 0.9rem; }
.suchleer .stand { margin-top: 1.3rem; font-size: 0.75rem; color: var(--grau-hell); }
#ansichtSuche .trefferleer { margin-top: 0.8rem; }
#ansichtSuche .freizeile { display: block; width: 100%; text-align: center; margin-top: 1rem; min-height: 2.6rem; }

/* =====================================================================
   MOCK 015 (APP-UI 22.08.2026, THO 21:4x): Suche als echte Ansicht im Dokumentfluss.
   Kein fixed, keine Tastatur-Kopplung — die Leiste klebt oben, die Seite scrollt.
   ===================================================================== */
#ansichtSuche { padding-bottom: 3rem; }
.suchleiste { position: sticky; top: 0; z-index: 5; background: var(--papier);
  padding: 0.3rem 0 0.45rem; }
#ansichtSuche .suchzeile { margin: 0 1.875rem; }
#ansichtSuche .suchzeile input { width: 100%; margin-top: 0; min-height: 2.75rem; padding: 0.55rem 1.1rem;
  border: 1.5px solid var(--linie); border-radius: 99px; background: #fff; font-size: 1rem; line-height: 1.4; }
#ansichtSuche .suchzeile input:focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 3px var(--gruen-hell); }
#ansichtSuche .pillenzeile { margin: 0.45rem 1.875rem 0; }
#ansichtSuche .fklappe { margin: 0.3rem 1.875rem 0; }
#ansichtSuche .trefferliste { max-height: none; overflow: visible; margin-top: 0; padding: 0.1rem 1.875rem 0; }
#ansichtSuche .kleinlink { display: block; width: 100%; text-align: center; border: none; background: none;
  color: var(--grau-hell); font-size: 0.92rem; font-weight: 500; min-height: 2.6rem; margin-top: 0.3rem; }
#ansichtSuche .suchleer { margin-top: 2.2rem; }

/* =====================================================================
   MOCK 016 (APP-UI 22.08.2026, THO-Screenshot 21:4x): Unterzeile der Trefferkarte als Fließtext.
   Bei größerer Schrift wurde „Ibuprofen“ zu „I.“ gequetscht — jetzt bricht die Zeile um, nichts wird gekürzt.
   ===================================================================== */
#ansichtSuche .zg-unten { display: block; white-space: normal; overflow: visible; line-height: 1.3; }
#ansichtSuche .zg-unten > span { display: inline; white-space: normal; overflow: visible; min-width: 0; margin: 0; }
#ansichtSuche .zg-unten > span + span::before { content: '·'; margin: 0 0.3rem; color: var(--grau-hell); }
#ansichtSuche .zg-unten .zg-h { margin-left: 0; }
#ansichtSuche .gruppenzeile.dicht { padding-top: 0.5rem; padding-bottom: 0.5rem; }

/* =====================================================================
   MOCK 017 (APP-UI 22.08.2026, THO 21:5x): Dichte-Sonderlösung der Suche — an der CI vorbei.
   Ziel: Treffer über der Tastatur. Eine Kopfzeile, flache Felder, Mini-Filter, ein Treffer = eine Zeile.
   ===================================================================== */
body.sucheOffen .apphead { display: none; }
#ansichtSuche { padding-top: 0.25rem; }
.suchleiste { padding: 0.15rem 0 0.25rem; }
#ansichtSuche .suchkopfzeile { display: flex; align-items: center; gap: 0.3rem; margin: 0 0.9rem 0 0.4rem; }
#ansichtSuche .suchzurueck { flex: none; width: 2.4rem; min-height: 2.25rem; border: none; background: none;
  color: var(--gruen); font-size: 1.6rem; font-weight: 600; line-height: 1; padding: 0 0 0.15rem; }
#ansichtSuche .suchzeile { flex: 1; min-width: 0; margin: 0; gap: 0.3rem; }
#ansichtSuche .suchzeile input { min-height: 2.25rem; padding: 0.25rem 0.9rem; font-size: 1rem; border-width: 1px; }
#ansichtSuche .suchscan { width: 2.25rem; height: 2.25rem; min-height: 2.25rem; border: none; background: none; box-shadow: none; }
/* Filter: Mini-Zeile, Text statt Pillen-Grafik */
#ansichtSuche .pillenzeile { margin: 0.15rem 1.1rem 0; gap: 0.1rem; }
#ansichtSuche .fpille { flex: none; border: none; background: none; padding: 0 0.35rem; min-height: 1.5rem;
  display: flex; align-items: baseline; gap: 0.25rem; line-height: 1.5rem; }
#ansichtSuche .fpille + .fpille::before { content: '·'; color: var(--grau-hell); margin-right: 0.25rem; }
#ansichtSuche .fpille .fpwort { font-size: 0.76rem; font-weight: 700; color: var(--grau); }
#ansichtSuche .fpille .fpwert { display: none; }
#ansichtSuche .fpille.an .fpwort { display: none; }
#ansichtSuche .fpille.an .fpwert { display: inline; font-size: 0.76rem; font-weight: 700; color: var(--gruen); max-width: 7rem; }
#ansichtSuche .fpille.auf .fpwort, #ansichtSuche .fpille.auf .fpwert { color: var(--gruen); }
#ansichtSuche .fklappe { margin: 0.2rem 1.1rem 0; padding: 2px; border-radius: 0.6rem; }
#ansichtSuche .fkzeile { padding: 0.3rem 0.6rem; font-size: 0.85rem; min-height: 1.9rem; }
/* Treffer: eine Zeile, Haarlinie, kein Schatten, keine Rundung */
#ansichtSuche .trefferliste { padding: 0 1.1rem 0; }
#ansichtSuche .gruppenzeile.dicht { display: flex; flex-direction: row; align-items: baseline; gap: 0.35rem;
  background: none; border: none; border-bottom: 1px solid rgba(22, 48, 43, 0.10); border-radius: 0; box-shadow: none;
  margin: 0; padding: 0.3rem 0.2rem; min-height: 2.1rem; font-size: 0.78rem; font-weight: 500; white-space: nowrap; overflow: hidden; }
#ansichtSuche .gruppenzeile.dicht:active { background: var(--gruen-hell); box-shadow: none; }
#ansichtSuche .gruppenzeile.dicht .zg-name { flex: 1 1 auto; min-width: 6rem; font-size: 0.92rem; font-weight: 700; color: var(--tinte);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ansichtSuche .gruppenzeile.dicht .zg-w { flex: 0 1 auto; min-width: 0; max-width: 5.5rem; color: var(--grau); overflow: hidden; text-overflow: ellipsis; }
#ansichtSuche .gruppenzeile.dicht .zg-d { flex: none; color: var(--gruen); font-weight: 700; }
#ansichtSuche .gruppenzeile.dicht .zg-f { flex: none; color: var(--grau); }
#ansichtSuche .gruppenzeile.dicht .zg-m { flex: none; color: var(--tinte); font-variant-numeric: tabular-nums; }
#ansichtSuche .gruppenzeile.dicht .zg-h { flex: 0 1 auto; min-width: 0; max-width: 30%; margin-left: auto; color: var(--grau-hell);
  overflow: hidden; text-overflow: ellipsis; }
/* Packungen: ebenso flach, eingerückt */
#ansichtSuche .packungsklappe { display: block; margin: 0 0 0 1.2rem; }
#ansichtSuche .packungszeile { display: block; width: 100%; min-height: 1.9rem; margin: 0; padding: 0.25rem 0.2rem;
  border: none; border-bottom: 1px solid rgba(22, 48, 43, 0.08); border-radius: 0; background: none; font-size: 0.8rem; font-weight: 500; color: var(--tinte); text-align: left; }
#ansichtSuche .trefferleer { margin-top: 0.4rem; font-size: 0.85rem; }
#ansichtSuche .kleinlink { min-height: 2rem; margin-top: 0.15rem; font-size: 0.85rem; }
#ansichtSuche .freizeile { margin-top: 0.4rem; min-height: 2rem; }
#ansichtSuche .suchleer { margin-top: 1.4rem; }
#ansichtSuche .suchleer p { font-size: 0.88rem; }
#ansichtSuche .suchleer .stand { margin-top: 0.9rem; }

/* =====================================================================
   MOCK 018 (APP-UI 22.08.2026, THO 22:1x): Einstellungen — die Eingangsseite im Kartenstandard.
   Vier Türen als Karten, Liniensymbole, Fluchtlinie 30 px, leiser Fuß. Nichts an Logik.
   ===================================================================== */
#ansichtMehr .mehrtitel.abschnittslabel { font-size: 0.85rem; font-weight: 600; color: var(--grau); text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.9rem 1.875rem 0.35rem; margin: 0; }
#ansichtMehr .einstelltuer { display: flex; align-items: center; gap: 0.6rem; text-align: left; }
#ansichtMehr .einstelltuer .zeichen { display: flex; align-items: center; justify-content: center; color: var(--gruen);
  background: var(--gruen-hell); flex: none; }
#ansichtMehr .einstelltuer .zeichen svg { width: 18px; height: 18px; }
#ansichtMehr .einstelltuer .unter:empty { display: none; }
#ansichtMehr .fussleiste.leise { margin: 1.6rem 1.875rem 0; padding: 0; border: none; font-size: 0.85rem; color: var(--grau-hell); }
#ansichtMehr .fussleiste.leise .werklink { background: none; border: none; color: var(--grau-hell); font-size: 0.85rem;
  font-weight: 500; padding: 0.4rem 0; min-height: 2rem; }

/* =====================================================================
   MOCK 019 (APP-UI 22.08.2026, THO 22:3x): „Meine Daten" im Kartenstandard — blaue Tür zuerst, Datei-Zeilen raus.
   ===================================================================== */
#ansichtDaten .mehrtitel.abschnittslabel { font-size: 0.85rem; font-weight: 600; color: var(--grau); text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.9rem 1.875rem 0.35rem; margin: 0; }
#ansichtDaten .tuersatz.leise { margin: 0 1.875rem 0.9rem; font-size: 0.85rem; color: var(--grau-hell); line-height: 1.4; }
#ansichtDaten .einstelltuer { display: flex; align-items: center; gap: 0.6rem; text-align: left; }
#ansichtDaten .einstelltuer .zeichen { display: flex; align-items: center; justify-content: center; flex: none; }
#ansichtDaten .einstelltuer.tuerblau { margin-top: 0.3rem; border-color: rgba(59, 76, 99, 0.25); }
#ansichtDaten .einstelltuer.tuerblau .zeichen { background: #EEF1F6; }
#ansichtDaten .einstelltuer.tuerblau .kontopunkt { width: 0.7rem; height: 0.7rem; margin: 0; }
#ansichtDaten .einstelltuer.tuerblau .titel { color: var(--konto); }
#ansichtDaten .loeschzeile { display: block; width: 100%; margin: 1.6rem 1.875rem 0; width: calc(100% - 3.75rem);
  text-align: left; border: none; background: none; padding: 0.5rem 0.55rem; min-height: 2.6rem;
  color: var(--rot); font-size: 1rem; font-weight: 500; }
#ansichtDaten .loeschzeile .unter { display: block; font-size: 0.85rem; color: var(--grau-hell); font-weight: 400; margin-top: 0.1rem; }
#ansichtDaten .loeschzeile:active { background: #FBECEC; border-radius: 99px; }

/* =====================================================================
   MOCK 021 (APP-UI 22.08.2026, THO 22:5x GO): Meine Daten = Hauptbenutzer.
   Die Formular-Regeln der Blätter (012/013) gelten auch auf dieser Seite (programmatisch gespiegelt).
   ===================================================================== */
.formseite input:not([type="checkbox"]):not([type="radio"]), .formseite textarea, .formseite select {
  width: 100%; margin-top: 0.3rem; padding: 0.55rem 0.85rem; min-height: 2.75rem;
  border: 1px solid rgba(22, 48, 43, 0.14); border-radius: 0.75rem; background: #fff;
  font-size: 1rem; line-height: 1.3; color: var(--tinte); -webkit-appearance: none; appearance: none; }
.formseite input[type="date"] { min-height: 2.75rem; }
.formseite input:focus, .formseite textarea:focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 3px var(--gruen-hell); background: #fff; }
.formseite .feldlabel { font-size: 0.85rem; font-weight: 600; color: var(--grau); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 1rem; }
.formseite .feldhinweis { font-size: 0.85rem; color: var(--grau-hell); margin-top: 0.3rem; line-height: 1.35; }
.formseitetitel { font-size: 1.15rem; font-weight: 600; }
.formseiteuntertitel { font-size: 0.85rem; color: var(--grau); margin-top: 0.15rem; }
.formseite .knopf.primaer { border-radius: 99px; min-height: 2.9rem; font-size: 1rem; font-weight: 600; margin-top: 1.4rem;
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 10px 22px rgba(22, 48, 43, 0.14); }
.formseite .knopf.gefahrrand { background: none; border: none; color: var(--rot); font-size: 1rem; font-weight: 500;
  min-height: 2.6rem; margin-top: 0.4rem; }
.formseite .kleinlink { font-weight: 500; color: var(--grau-hell); }
.formseite { padding-left: 1.875rem; padding-right: 1.875rem; }
.formseite input:not([type="checkbox"]):not([type="radio"]), .formseite textarea, .formseite select { border-radius: 99px; padding-left: 1.1rem; padding-right: 1.1rem; }
.formseite textarea { border-radius: 1.4rem; }
.formseite .gruppe { font-size: 0.85rem; font-weight: 600; color: var(--gruen); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.9rem; }
.formseite .kacheln { display: flex; gap: 0.4rem; margin-top: 0.3rem; }
.formseite .kachel4 { flex: 1; min-height: 3rem; border-radius: 99px; border: 1px solid rgba(22, 48, 43, 0.14); background: #fff; color: var(--tinte);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding: 0.25rem 0; }
.formseite .kachel4 b { font-size: 1rem; font-weight: 700; }
.formseite .kachel4 small { font-size: 0.62rem; color: var(--grau); }
.formseite .kachel4.an { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.formseite .kachel4.an small { color: #fff; }
.formseite .feldzeile { display: flex; gap: 0.6rem; }
.formseite .feldteil { flex: 1; min-width: 0; }
.formseite .feldteil.schmal { flex: 0 0 6.5rem; }
.formseite .klapp { display: block; width: 100%; text-align: left; border: none; background: none; color: var(--gruen);
  font-size: 1rem; font-weight: 600; min-height: 2.6rem; margin-top: 0.9rem; padding: 0; }
.formseite .weitere { margin-top: -0.4rem; }
.formseite .satz { margin-top: 1.1rem; padding: 0.6rem 0.9rem; background: var(--gruen-hell); border-radius: 1rem;
  font-size: 0.85rem; color: var(--tinte); line-height: 1.4; }
.formseite { padding: 0 1.875rem; }
.formseite .abschnittslabel { padding: 0.9rem 0 0.1rem; }
.formseite .feldlabel { margin-top: 0.8rem; }
#ansichtDaten .einstelltuer.tuerblau { margin-top: 1.2rem; margin-bottom: 0.2rem; }
.formseite .satz { margin-top: 1.1rem; }
.formseite .knopf.primaer { margin-top: 1.2rem; }
#ansichtDaten .loeschzeile { margin-top: 2rem; }

/* =====================================================================
   MOCK 022 (APP-UI 23.08.2026, THO 09:1x GO): Weitere Personen.
   ===================================================================== */
#ansichtPersonen .mehrtitel.abschnittslabel { font-size: 0.85rem; font-weight: 600; color: var(--grau); text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.9rem 1.875rem 0.35rem; margin: 0; }
.personkarte { display: flex; align-items: center; gap: 0.6rem; text-align: left; }
.personkarte .zeichen { display: flex; align-items: center; justify-content: center; flex: none;
  background: var(--gruen-hell); color: var(--gruen); font-size: 0.85rem; font-weight: 600; }
.personkarte.anlegen { box-shadow: none; background: transparent; border: 1px dashed rgba(22, 48, 43, 0.18); color: var(--grau); }
.personkarte.anlegen .zeichen { background: transparent; border: 1px dashed var(--grau-hell); color: var(--grau); }
.personkarte.anlegen .titel { font-weight: 500; color: var(--grau); }
#ansichtPerson .formseite { padding: 0 1.875rem 2rem; }
#ansichtPerson .formseite .knopf.gefahrrand { margin-top: 0.8rem; }
.formseite .adresslink { display: block; border: none; background: none; padding: 0.35rem 0 0;
  color: var(--gruen); font-size: 0.85rem; font-weight: 600; text-align: left; min-height: 2rem; }

/* =====================================================================
   MOCK 024 (APP-UI 23.08.2026, THO 10:2x): Aussteller — Besteller-Praxen · Verordner / Ärzte.
   Untereinander; ab 640 px zwei Spalten (THO: „nur wenn es optisch passt").
   ===================================================================== */
#ansichtAussteller .mehrtitel.abschnittslabel { font-size: 0.85rem; font-weight: 600; color: var(--grau); text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.9rem 1.875rem 0.35rem; margin: 0; }
#ansichtAussteller .praxiskarte { background: #fff; border: 1px solid rgba(22, 48, 43, 0.11); border-radius: 1.4rem;
  margin: 0.3rem 1.875rem; padding: 0.65rem 1.1rem 0.5rem; box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12); }
#ansichtAussteller .praxiskarte .titel { font-size: 1rem; font-weight: 600; color: var(--tinte); }
#ansichtAussteller .praxiskarte .unter { font-size: 0.85rem; color: var(--grau); margin-top: 0.1rem; }
.arztchips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; align-items: center; }
.arztchip { display: inline-flex; align-items: center; gap: 0.15rem; border: 1px solid rgba(22, 48, 43, 0.14); border-radius: 99px;
  padding: 0.1rem 0.2rem 0.1rem 0.8rem; font-size: 0.85rem; font-weight: 500; color: var(--tinte); background: var(--papier); }
.arztchip .chipx { border: none; background: none; color: var(--grau-hell); font-size: 0.85rem; line-height: 1;
  min-width: 1.9rem; min-height: 1.9rem; padding: 0; }
.leiseText { font-size: 0.85rem; color: var(--grau-hell); }
.leiseText.leerzeile { display: block; margin: 0.4rem 1.875rem; }
.praxiswerk { display: flex; gap: 1.1rem; margin-top: 0.4rem; }
#ansichtAussteller .kleinlink { border: none; background: none; padding: 0; min-height: 2.2rem; font-size: 0.85rem;
  font-weight: 600; color: var(--gruen); }
#ansichtAussteller .kleinlink.rotlink { color: var(--rot); font-weight: 500; }
#ansichtAussteller .personkarte { margin-bottom: 0.3rem; }
@media (min-width: 640px) {
  #ansichtAussteller .zweispalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.5rem; align-items: start; }
}

/* =====================================================================
   MOCK 025 (APP-UI 23.08.2026, THO 10:5x): App-Einstellungen klein im Fuß · Werkbank heißt Rx-Development.
   ===================================================================== */
#ansichtMehr .fussleiste.leise { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; }
#ansichtMehr .fusslinks { display: flex; gap: 1rem; }
#ansichtAppEinst .mehrtitel.abschnittslabel { font-size: 0.85rem; font-weight: 600; color: var(--grau); text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.9rem 1.875rem 0.35rem; margin: 0; }
#ansichtAppEinst .formseite { padding: 0 1.875rem; }
#ansichtAppEinst .kachel4 b { font-size: 0.85rem; }
#ansichtAppEinst .kachel4 { min-height: 3.4rem; }

/* =====================================================================
   MOCK 027 (APP-UI 23.08.2026, THO ~14:2x): Schalter für die automatischen Listen in den App-Einstellungen.
   ===================================================================== */
#ansichtAppEinst .kacheln { margin-bottom: 1.15rem; }
#ansichtAppEinst .schaltliste { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.3rem; }
#ansichtAppEinst .schaltzeile { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem;
  width: 100%; min-height: 3rem; padding: 0.65rem 1rem; border: 1px solid var(--linie); border-radius: 1.1rem;
  background: var(--papier); font-size: 0.85rem; font-weight: 500; color: var(--tinte); text-align: left; }
#ansichtAppEinst .schaltlage { font-size: 0.85rem; font-weight: 600; background: var(--gruen); border: 1px solid var(--gruen);
  color: #fff; border-radius: 99px; padding: 0.15rem 0.7rem; min-width: 3.1rem; text-align: center; }
#ansichtAppEinst .schaltzeile.aus .schaltlage { background: #fff; border-color: rgba(22, 48, 43, 0.14); color: var(--grau); }
#ansichtAppEinst .schaltzeile.aus .schaltwort { color: var(--grau); }
#ansichtAppEinst .leiseText { margin-top: 0.7rem; }

/* =====================================================================
   MOCK 028 (APP-UI 23.08.2026, THO 14:4x): tippbare Katalog-Hinweise der Suche.
   ===================================================================== */
#ansichtSuche .ladehinweis { border: 0; background: none; font: inherit; cursor: pointer;
  color: var(--gruen); font-weight: 600; }
#ansichtSuche .ladehinweis.leise { color: var(--grau); font-weight: 500; }

/* =====================================================================
   MOCK 030 (APP-UI 23.08.2026, THO ~21:0x): Stoppuhr-Protokoll in Rx-Development.
   ===================================================================== */
#wbMessProtokoll { white-space: pre-line; font-variant-numeric: tabular-nums; }

/* ---- R3.8 (Lab-Dreh 11, THO 21.09.): Eintrag-Blatt aufgeraeumt ---- */
.sheetuntertitel div { line-height: 1.35; }
.klappzeile { margin-top: 0.36rem; border: 1px solid rgba(22, 48, 43, 0.11); border-radius: 1.45rem; background: #fff;
  box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12); }
#notizZeile { margin-top: 1rem; }   /* R3.9: unter der Verwalten-Zeile */
.zeilenkopf { display: flex; align-items: center; gap: 0.6rem; width: 100%; min-height: 2.9rem; padding: 0.4rem 0.9rem 0.4rem 1.1rem;
  background: none; border: none; text-align: left; color: var(--tinte); }
.zk-text { flex: 1; min-width: 0; display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }   /* R3.9: eine Zeile · R3.10a: Netz bei grossem Text */
.zk-titel { font-size: 1rem; font-weight: 600; flex-shrink: 0; }
.zk-wert { flex: 1 1 auto; min-width: 0; max-width: 100%; text-align: right; font-size: 0.85rem; color: var(--grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* R3.10a: bricht als Ganzes in Zeile 2, statt abgeschnitten */
.zk-wert.platzhalter { color: var(--grau-hell); }   /* R3.8a: THO 22.09. Notiz-Zeile schirmfuellend — Klasse leer kollidierte */
.zk-icon { flex-shrink: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--grau); border: 1px solid rgba(22, 48, 43, 0.11); }
.klappzeile.offen .zk-icon { color: var(--gruen); border-color: var(--gruen); }
.zeilenkoerper { display: flex; gap: 0.5rem; align-items: flex-end; padding: 0 0.9rem 0.8rem 1.1rem; }
.sheet .zeilenkoerper textarea, .sheet .zeilenkoerper input { flex: 1; width: auto; min-width: 0; margin-top: 0; }
.sheet .zeilenkoerper textarea { border-radius: 99px; resize: none; }   /* R3.9: einzeilig wie ein Eingabefeld */
.hakenknopf { flex-shrink: 0; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: none; background: var(--gruen); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12); }
.verwalten { display: flex; flex-wrap: wrap; gap: 0.36rem; margin-top: 1rem; }
.sheet .knopf.klein { width: auto; flex: 1 1 auto; min-height: 2.4rem; padding: 0 0.75rem; margin-top: 0; font-size: 0.85rem; font-weight: 600;   /* R3.10a: 0,75 rem — drei Pillen bei 375 px in einer Reihe */
  background: #fff; color: var(--tinte); border: 1px solid rgba(22, 48, 43, 0.11); box-shadow: 2px 2px 3px rgba(22, 48, 43, 0.10), 2px 12px 28px rgba(22, 48, 43, 0.12); }
.sheet .knopf.klein.gefahrrand { color: var(--rot); border-color: var(--rot); }
/* R3.9 (THO 22.09.): WEG-PILLEN — Schliessen/Abbrechen/Zurueck: leise, halbe Breite, mittig, Piktogramm; gruen bleibt dem Tun */
.knopf.weg { background: transparent; border: 1px solid rgba(22, 48, 43, 0.18); color: var(--grau); box-shadow: none;
  width: 58%; margin: 0.9rem auto 0; padding: 0 1rem; min-height: 2.9rem; font-size: 1rem; font-weight: 600; gap: 0.35rem; }   /* R3.9a: Trefflaeche wie alle Pillen */
.knopf.weg::before { content: '×' / ''; font-size: 1.3rem; font-weight: 400; line-height: 1; }   /* R3.9a: / '' = fuer VoiceOver stumm */
.knopf.weg.rueck::before { content: '‹' / ''; }   /* R3.9a: .rueck statt .zurueck (Kopf-Klasse) */
.knopf.weg:active { background: var(--papier); }

/* ---- R3.10 (Lab-Dreh 13, THO 22.09.): Vorschau vor dem Tun ---- */
.vorschausatz { font-size: 1rem; line-height: 1.45; color: var(--tinte); margin: 0.7rem 0 0; }
.vorschausatz + .vorschausatz { margin-top: 0.4rem; color: var(--grau); }
.vorschaufuss { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }   /* R3.10b: bei grossem Text bricht der Fuss, nie das Wort */
.vorschaufuss .knopf { flex: 1 1 8.5rem; box-sizing: border-box; min-width: auto; white-space: nowrap; width: auto; margin: 0; padding: 0 0.9rem; }   /* R3.10b: Innenabstand (Weiter-Pille hatte 0) */
.vorschaufuss .knopf.weg { flex: 0 1 auto; width: auto; margin: 0; }   /* R3.10b: Zurueck bleibt kompakt, Weiter nimmt den Rest — so passt „Wieder aufnehmen“ bei 375 px in eine Reihe */
.sheet .vorschaufuss .knopf.primaer { margin-top: 0; }
.knopf.weiter::after { content: '›' / ''; font-size: 1.3rem; font-weight: 400; line-height: 1; }
.knopf.primaer.rot { background: var(--rot); color: #fff; }
#infoSheet { z-index: 71; }   /* R3.10a: Vorschau-Blatt liegt UEBER dem Eintrag-Blatt (DOM-Reihenfolge, gleicher z-index) */
/* ---- R3.10b: Blatt auf Blatt — oberer Schleier, Absetz-Dialog in der Familie ---- */
.schleier-oben { z-index: 70; }   /* DOM hinter #sheet: ueber dem Eintrag-Blatt (70), unter #infoSheet (71) */
.absetzhaken { border: none; appearance: none; -webkit-appearance: none; border-radius: 99px; padding: 0.5rem 0.9rem; }   /* R3.10b: kein UA-Rahmen */
#infoSheetInhalt input.memofeld { border-radius: 99px; background: #fff; border: 1px solid rgba(22, 48, 43, 0.14); padding: 0.55rem 1.1rem; min-height: 2.75rem; }
#vorratZeile { margin-top: 0.36rem; }   /* R3.11: Vorrat direkt unter dem Kopf */
.zeilenhinweis { padding: 0 1.1rem 0.8rem; margin-top: -0.25rem; font-size: 0.85rem; color: var(--grau); line-height: 1.35; }   /* R3.12: Reichweite-Satz unter dem Vorrat-Feld */
#hinweiseZeile .zeilenkoerper, #grundZeile .zeilenkoerper { flex-wrap: wrap; }   /* R3.32: Platz fuer die Plan-Zeile */
.plantext { flex: 1 1 100%; font-size: 0.85rem; color: var(--grau); line-height: 1.35; }   /* R3.32: der Plan-Text bleibt unter dem eigenen Hinweis/Grund sichtbar */
#vorratZeile .zeilenkoerper { flex-wrap: wrap; }   /* R3.33: Platz fuer den Packung-Knopf */
.sheet .knopf.klein.packungknopf { flex: 1 0 100%; margin-top: 0.1rem; }   /* R3.33: eigene Zeile unter Feld + Haken */
/* ---- R3.13 (Lab-Dreh 16): Nachbestell-Zeile ---- */
.sheet .zeilenkoerper.nachbestellwahl { flex-direction: column; align-items: stretch; gap: 0.36rem; }
.wahlzeile { display: flex; align-items: center; gap: 0.45rem; width: 100%; text-align: left; background: #fff; color: var(--tinte); white-space: nowrap;
  border: 1px solid rgba(22, 48, 43, 0.11); border-radius: 99px; padding: 0.25rem 0.9rem; min-height: 2.4rem; font-size: 0.85rem; font-weight: 600; }   /* R3.15: kleine Pillen-Familie, EINE Zeile (THO 23.09.) */
.wahlzeile .zeichen { font-size: 1rem; color: var(--grau-hell); font-weight: 800; flex: none; }
.wahlzeile.an { border-color: var(--gruen); background: var(--gruen-hell); }
.wahlzeile.an .zeichen { color: var(--gruen); }
.sheet .zeilenkoerper.nachbestellwahl .wahlzeile input { flex: 0 0 3.6rem; width: 3.6rem; min-height: 1.8rem; margin: 0; padding: 0.1rem 0.5rem; font-size: 0.85rem; text-align: center; font-weight: 600; }   /* schlaegt die .sheet-input-Regel */
.sheet .zeilenkoerper.nachbestellwahl .wahlzeile.datum input { flex: 1 1 6rem; width: auto; min-width: 0; text-align: left; }
.nachbestellwahl .hakenknopf { align-self: flex-end; margin-top: 0.2rem; }
/* ---- R3.14 (Lab-Dreh 17): Rest-Tage in der Plan-Zeile, rot bei Faelligkeit ---- */
.zeile .name small.restzeile { font-weight: 600; }
.zeile.faellig .name, .zeile.faellig .name small.restzeile { color: var(--rot); }
.formseite .kachel3 b { white-space: normal; }   /* R3.15: „Bei Fälligkeit“ darf bei grossem Text umbrechen statt anzustossen */
.formseite .kachel3 { flex: 1 1 0; min-width: 0; min-height: 3.4rem; border-radius: 99px; border: 1px solid rgba(22, 48, 43, 0.14); background: #fff; color: var(--tinte);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem; padding: 0.3rem 0.5rem; text-align: center; }   /* R3.14: wie kachel4, drei in einer Reihe */
.formseite .kachel3 b { font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
.formseite .kachel3 small { font-size: 0.62rem; color: var(--grau); }
.formseite .kachel3.an { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.formseite .kachel3.an small { color: #fff; }
#ansichtAppEinst .schaltzeile { border-radius: 99px; }   /* R3.16: Pillen alle rund (THO 23.09.) */
/* ---- R3.17: zarte Wahl-Pillen (App-Einstellungen, M/W/D bei Meine Daten und Personen-Blatt) ---- */
#ansichtAppEinst .kacheln, .formseite .kacheln, .sheet .kacheln { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
#ansichtAppEinst .kachel3, #ansichtAppEinst .kachel4, .formseite .kachel4, .sheet .kachel4 { flex: 0 1 auto; min-width: 3.1rem; min-height: 0; padding: 0.15rem 0.7rem; border-radius: 99px;   /* R3.17a: exakt das Mass der An/Aus-Lage (THO 23.09.) */
  border: 1px solid rgba(22, 48, 43, 0.14); background: #fff; color: var(--tinte); display: flex; align-items: center; justify-content: center; gap: 0; }
#ansichtAppEinst .kachel3 b, #ansichtAppEinst .kachel4 b, .formseite .kachel4 b, .sheet .kachel4 b { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
#ansichtAppEinst .kachel3.an, #ansichtAppEinst .kachel4.an, .formseite .kachel4.an, .sheet .kachel4.an { background: var(--gruen); border-color: var(--gruen); color: #fff; }
/* ---- R3.19 (Lab-Dreh 21): nicht aktiv (Dummy im App-Zustand) ---- */
.zeile.inaktiv { opacity: 0.55; }
.zeile.inaktiv .name::after { content: " · nicht aktiv"; font-size: 0.85rem; color: var(--grau); font-weight: 600; }
/* ---- R3.20: Praxis-Karte in zwei Bereichen ---- */
#planListe .abschnittslabel.bereich { margin-top: 0.9rem; }
.kzeile.kz-inaktiv { opacity: 0.6; }
/* ---- R3.22 (Lab-Dreh 23): Dosier-Zeile ---- */
.zeilenkoerper.dosierwahl { flex-wrap: wrap; align-items: flex-end; row-gap: 0.6rem; }
.dosfeld { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; flex: 0 0 auto; font-size: 0.75rem; font-weight: 600; color: var(--grau); }
.sheet .zeilenkoerper.dosierwahl .dosfeld input { width: 2.6rem; height: 2.4rem; min-height: 2.4rem; flex: 0 0 auto; text-align: center; padding: 0 0.2rem; border-radius: 0.75rem; font-weight: 700; }   /* Innenbreite 275 px bei 375/17: vier Felder + Haken in einer Zeile */
.zeilenkoerper.dosierwahl .absetzhaken { flex: 1 1 100%; margin: 0; justify-content: center; }
.zeile .name small.dosisanders { font-weight: 600; color: var(--grau); }
/* ---- R3.23 (Lab-Dreh 24): Anker-Zeile ---- */
.ankerzeile { display: flex; align-items: center; gap: 0.55rem; padding: 0.1rem 1.1rem 0.45rem; color: var(--gruen); }
.anker-pikto { display: flex; flex: 0 0 auto; }
.anker-pikto svg { display: block; width: 18px; height: 18px; }
.anker-linie { flex: 1 1 auto; height: 1px; background: rgba(22, 48, 43, 0.18); }
.anker-ort { flex: 0 0 auto; font-size: 0.75rem; font-weight: 600; color: var(--grau); letter-spacing: 0.02em; white-space: nowrap; }
body.sucheOffen .ankerzeile { display: none; }
/* ---- R3.24: Loeschen allein rechts, wenn die Verwalten-Zeile umbricht ---- */
#verwaltenZeile #btnEintragLoeschen { margin-left: auto; }
/* ---- R3.27 (Lab-Dreh 28): Vormerk-Zeile im Blatt, Meine Nachbestellungen ---- */
.sheet .schaltzeile.vormerkzeile { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; width: 100%; min-height: 3rem; margin: 0.35rem 0 0.2rem; padding: 0.55rem 1rem; border: 1px solid var(--linie); border-radius: 99px; background: var(--papier); color: var(--tinte); text-align: left; }
.sheet .vormerkzeile .schaltwort { font-size: 1rem; font-weight: 600; min-width: 0; }
.sheet .vormerkzeile .schaltwort small { display: block; font-size: 0.75rem; font-weight: 500; color: var(--grau); }
.sheet .vormerkzeile .schaltlage { flex: 0 0 auto; font-size: 0.85rem; font-weight: 600; background: var(--gruen); border: 1px solid var(--gruen); color: #fff; border-radius: 99px; padding: 0.15rem 0.7rem; min-width: 3.1rem; text-align: center; }
.sheet .vormerkzeile.aus .schaltlage { background: #fff; border-color: rgba(22, 48, 43, 0.14); color: var(--grau); }
.sheet .vormerkzeile.aus .schaltwort { color: var(--grau); }
.nbfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.2rem 1.1rem 0.4rem; }
.nbtrenner { flex: 1 1 auto; }
.filterpille { flex: 0 1 auto; min-width: 3.1rem; padding: 0.15rem 0.7rem; border-radius: 99px; border: 1px solid rgba(22, 48, 43, 0.14); background: #fff; color: var(--tinte); display: flex; align-items: center; justify-content: center; }
.filterpille b { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.filterpille.an { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.nbzeile { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 1.1rem; border-bottom: 1px solid var(--linie); }
.nbzeile .nbtext { flex: 1 1 auto; min-width: 0; text-align: left; background: none; border: none; padding: 0; color: inherit; }
.nbzeile .nbname { font-size: 1rem; font-weight: 600; line-height: 1.25; }
.nbzeile small { display: block; font-size: 0.85rem; color: var(--grau); font-weight: 500; margin-top: 0.05rem; }
.nbzeile.jetzt .nbname, .nbzeile.jetzt small { color: var(--rot); }
.nbzeile.aus .nbname { color: var(--grau); font-weight: 500; }
.jakopf { flex: 0 0 auto; min-width: 3.1rem; padding: 0.15rem 0.7rem; border-radius: 99px; border: 1px solid rgba(22, 48, 43, 0.14); background: #fff; color: var(--grau); font-size: 0.85rem; font-weight: 600; }
.jakopf.an { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.nbfuss { padding: 1rem 1.1rem 1.4rem; }
.nbfuss .knopf:disabled { opacity: 0.45; }
/* ---- R3.28 (Lab-Dreh 29): Vorbereiten-Uebersicht + Druckzettel ---- */
#ansichtZettel { padding-bottom: 2rem; }
.zgruppe { margin: 0.4rem 1.1rem 0.9rem; border: 1px solid var(--linie); border-radius: 1.1rem; background: #fff; overflow: hidden; }
.zgruppe.offen { border-style: dashed; }
.zgruppekopf { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding-right: 0.9rem; }
.zgruppekopf .abschnittslabel { padding-left: 1rem; flex: 1 1 auto; min-width: 0; }
.zpos { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 1rem; border-top: 1px solid var(--linie); }
.zpostext { flex: 1 1 auto; min-width: 0; }
.zpostext small { display: block; font-size: 0.85rem; color: var(--grau); font-weight: 500; margin-top: 0.05rem; }
.zpostext .zposlink { display: inline-block; min-height: 0; margin-top: 0.15rem; padding: 0; font-size: 0.75rem; }
.mengestepper { flex: 0 0 auto; display: flex; align-items: center; gap: 0.25rem; }
.stepknopf { width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid rgba(22, 48, 43, 0.14); background: #fff; color: var(--tinte); font-size: 1.1rem; font-weight: 700; line-height: 1; }
.stepknopf:disabled { opacity: 0.35; }
.mengewert { min-width: 5.2rem; text-align: center; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.zgruppefuss { padding: 0.6rem 1rem 0.9rem; border-top: 1px solid var(--linie); display: flex; flex-direction: column; gap: 0.5rem; }
.zgruppefuss .schaltzeile.onlinezeile { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; width: 100%; min-height: 3rem; padding: 0.55rem 1rem; border: 1px solid var(--linie); border-radius: 99px; background: var(--papier); color: var(--tinte); text-align: left; }
.zgruppefuss .onlinezeile .schaltwort { font-size: 1rem; font-weight: 600; min-width: 0; }
.zgruppefuss .onlinezeile .schaltwort small { display: block; font-size: 0.75rem; font-weight: 500; color: var(--grau); }
.zgruppefuss .onlinezeile .schaltlage { flex: 0 0 auto; font-size: 0.85rem; font-weight: 600; background: var(--gruen); border: 1px solid var(--gruen); color: #fff; border-radius: 99px; padding: 0.15rem 0.7rem; min-width: 3.1rem; text-align: center; }
.zgruppefuss .onlinezeile.aus .schaltlage { background: #fff; border-color: rgba(22, 48, 43, 0.14); color: var(--grau); }
.zgruppefuss .onlinezeile:disabled { opacity: 0.55; }
.zgruppefuss .knopf.sekundaer { margin: 0; }
.zettelfuss { padding: 0.6rem 1.1rem 0; }
.druckblatt { margin: 0.4rem 1.1rem; padding: 1.1rem 1rem 1.3rem; background: #fff; border: 1px solid var(--linie); border-radius: 0.6rem; color: #111; font-size: 0.85rem; line-height: 1.35; overflow-x: auto; -webkit-overflow-scrolling: touch; }   /* am Handy scrollt die Matrix im Blatt, der Druck hat A4 */
.druckblatt .dmatrix { min-width: 100%; }
.druckblatt .dkopf { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; margin-bottom: 0.6rem; }
.druckblatt h1 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.druckblatt .ddatum { font-size: 0.85rem; color: #444; white-space: nowrap; }
.druckblatt .dan { font-weight: 700; margin-bottom: 0.7rem; }
.druckblatt .dfuer { border: 1px solid #999; border-radius: 0.3rem; padding: 0.5rem 0.7rem; margin-bottom: 0.8rem; display: inline-block; min-width: 60%; }
.druckblatt .dfuerlabel { font-size: 0.75rem; color: #555; margin-bottom: 0.15rem; }
.druckblatt .dfuerzeile { font-weight: 600; }
.druckblatt .dsatz { margin: 0 0 0.6rem; }
.druckblatt .dmatrix { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.druckblatt .dmatrix th, .druckblatt .dmatrix td { border: 1px solid #888; padding: 0.3rem 0.3rem; text-align: left; vertical-align: top; white-space: nowrap; }
.druckblatt .dmatrix td:first-child { white-space: normal; min-width: 8rem; }
.druckblatt .dmatrix th { background: #f0f2f1; font-weight: 700; }
.druckblatt .dmatrix td.dq { text-align: center; width: 1.6rem; font-weight: 700; }
.druckblatt .dfuss { margin: 0.9rem 0 0; }
.druckblatt .dunterschrift { margin-top: 2.2rem; padding-top: 0.25rem; border-top: 1px solid #333; width: 60%; font-size: 0.75rem; color: #555; }
.druckblatt .dquelle { margin-top: 0.9rem; font-size: 0.7rem; color: #777; }
@media print { body.druckOffen > *:not(#ansichtZettel), body.druckOffen .nichtdrucken { display: none !important; } body.druckOffen { background: #fff; } body.druckOffen .druckblatt { margin: 0; border: none; border-radius: 0; font-size: 11pt; } body.druckOffen .druckblatt .dmatrix { font-size: 10pt; } }
/* ---- R3.29 (Lab-Dreh 30): Bestell-Archiv ---- */
#ansichtZettel .archivkarte { margin: 0.35rem 1.1rem; width: calc(100% - 2.2rem); }
#ansichtZettel .archivkarte .zeichen { display: flex; align-items: center; justify-content: center; color: var(--gruen); }
.nbzeile .jakopf[aria-label^='Packung'] { min-width: 6rem; }
.sheet .knopf.klein.gefahrrand { flex-grow: 0; margin-left: auto; }   /* R3.9a: beim Umbruch keine vollbreite rote Pille */

/* ---- R3: Klammer-Stil + Tor ---- */
.klammer { font-style: italic; font-size: .85rem; color: var(--grau); }
.torwarnung { background: #FBEBE6; border-left: 4px solid var(--rot); color: var(--tinte);
  padding: .7rem .8rem; border-radius: .5rem; margin: .4rem 0 1rem; line-height: 1.4; }
.knopf.rot { background: var(--rot); color: #fff; }
.knopf.rot:disabled { opacity: .45; }
#kontoTorSheet .listenkarte { text-align: left; }

/* ---- R3.30 (Lab-Dreh 31): Platz-Dreh — Block A (gemeinsam) ---- */
/* A1 Body: 100svh statt 100vh (iOS-Phantom-Scroll), Fusspolster 2rem statt 6rem (Scan-Knopf .fab gibt es nicht mehr); Kapsel-Reserve nur auf Zuhause/Plan */
body { padding-bottom: 2rem; min-height: 100vh; min-height: 100svh; }
#ansichtZuhause, #ansichtPlan { padding-bottom: calc(2.6rem + env(safe-area-inset-bottom, 0px)); }
/* A2 Kopfzeile: Kopf einheitlich; .zurueck ist Textlink (keine Pille), 2.75rem = Mass von Rx-Marke/Personen-Pille */
.apphead { padding-top: 0.4rem; padding-bottom: 0.2rem; }
.apphead .zurueck { min-height: 2.75rem; }
/* A3 Anker-Zeile: nur die Luft unter der Linie */
#ankerZeile { padding-bottom: 0.25rem; }
/* A4 Karten-Familie .listenkarte (Zuhause, Einstellungs-Tueren, Aussteller-, Personen-, Konto-Tor-, Archiv-Karten); Touch 51 px */
.listenkarte { padding-top: 0.25rem; padding-bottom: 0.25rem; min-height: 3rem; }
.listenkarte .unter { margin-top: 0.05rem; }
/* A5 Bereichs-Labels in der Plan-Karte (Meine Medikamente, Nachbestellungen, Praxis-Karte): 40 px Luft um 16 px Text -> knapp */
#planListe .abschnittslabel.bereich { margin-top: 0.35rem; padding-top: 0.55rem; padding-bottom: 0.3rem; }
#planListe .abschnittslabel.bereich:first-child, #planListe .nbfilter + .abschnittslabel.bereich { margin-top: 0; }
/* A6 Plan-Zeilen + Quartett: Zellen 1.8rem (Anzeige, keine Wahl-Pillen), Namensspalte breiter -> weniger Umbrueche; Spaltenkopf exakt ueber den Zellen */
#ansichtPlan .zeile { gap: 0.45rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }
#ansichtPlan .quartett, #ansichtPlan .spaltenkopf .zellen { grid-template-columns: repeat(4, 1.8rem); gap: 0.15rem; }
#ansichtPlan .zeile .name small { margin-top: 0; }
#ansichtPlan .spaltenkopf { padding: 0.1rem calc(1.8rem + 1px) 0.05rem; }
#ansichtPlan .planliste { margin-top: 0; margin-bottom: 0.5rem; }
/* A7 Plan-Kopf: Untertitel neben dem Listen-Knopf statt darunter (display: contents-Kniff; Zettel-Koepfe durch > unberuehrt) */
#ansichtPlan > .plankopf { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0; align-items: center; padding-bottom: 0.15rem; }
#ansichtPlan > .plankopf .plankopfzeile { display: contents; }
#ansichtPlan > .plankopf #planTitel { grid-column: 1; grid-row: 1; align-self: end; }
#ansichtPlan > .plankopf #planUntertitel { grid-column: 1; grid-row: 2; margin-top: 0; }
#ansichtPlan > .plankopf #btnListeMehr { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin-left: 0.6rem; }
/* ---- R3.30 Block B (je Bildschirm) ---- */
/* B1 Auswahl: ...-Knopf ohne Fusszeilen-Erbe (padding-top 1.6rem), Tableau-Luft, Tuer-Abstand = gap */
.apphead .mehrknopf.leise { padding: 0; align-items: center; justify-content: center; }
#ansichtAuswahl .tableau { padding-top: 1.2rem; padding-bottom: 1rem; }
#ansichtAuswahl .tableau .tuer { margin-bottom: 0; }
.grusskopf { padding: 0 0.2rem 0.2rem; }
/* B2 Zuhause: Abschnitts-Labels knapper, keine doppelte Kopfluft unter der Anker-Zeile */
#zuhauseInhalt .abschnittslabel { padding-top: 0.75rem; padding-bottom: 0.25rem; }
#zuhauseInhalt > :first-child.abschnittslabel, #zuhauseInhalt > :first-child.abschnittszeile .abschnittslabel { padding-top: 0.45rem; }
/* B3 Eintrag-Blatt: fester Griff nimmt keinen Platz mehr, Vormerk-Zeile einzeilig, Listen/Bestellen-bei/Verwalten/Notiz/Schliessen enger */
.sheet.festes-blatt .griff { display: none; }
.sheet.festes-blatt { padding-top: 0.9rem; }
#vormerkZeile { gap: 0.4rem; padding: 0.4rem 0.8rem 0.4rem 1rem; margin: 0.36rem 0 0; }
#listenBlock { margin-top: 0.6rem; }
#listenBlock .feldhinweis { margin-top: 0.15rem; }
#listenBlock .kleinlink { min-height: 2.5rem; margin-top: 0.15rem; }
#sheetBestellenBei .feldlabel { margin-top: 0.6rem; }
#verwaltenZeile { margin-top: 0.6rem; }
#notizZeile { margin-top: 0.6rem; }
#btnSheetZu { margin-top: 0.6rem; }
/* B4 Meine Medikamente: Leer-Hinweis war ungestylt */
#planListe .leerhinweis { padding: 0 1.1rem 0.55rem; font-size: 0.85rem; color: var(--grau); }
/* B5 Nachbestellungen: Fuss und Reihen knapper (Pillen unangetastet) */
.nbfuss { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.nbzeile { padding-top: 0.4rem; padding-bottom: 0.4rem; }
/* B6 Vorbereiten/Zettel: Gruppen-Label ohne Seiten-Padding (einzeilig), Klein-Pille statt Riesenpille, Positionen/Fuss/Gruppen enger, Stepper-Trefffläche 40 px, Druckvorschau kompakt (Ausdruck @media print unveraendert) */
#ansichtZettel .zgruppekopf .abschnittslabel { padding: 0.6rem 0 0.3rem 1rem; }
#ansichtZettel .zgruppekopf .knopf.klein { width: auto; flex: 0 0 auto; min-height: 2.4rem; margin: 0.3rem 0; font-size: 0.85rem; font-weight: 600; padding: 0 0.75rem; background: #fff; color: var(--tinte); border: 1px solid rgba(22, 48, 43, 0.11); }
#ansichtZettel .zpos { padding: 0.35rem 1rem; }
#ansichtZettel .zpostext .zposlink { border: none; background: none; color: var(--gruen); font-weight: 600; line-height: 1.2; padding: 0.75rem 0.2rem; margin: -0.65rem -0.2rem -0.6rem; }
#ansichtZettel .zgruppefuss { padding: 0.45rem 1rem 0.6rem; gap: 0.36rem; }
#ansichtZettel .zgruppefuss .schaltzeile.onlinezeile { padding: 0.4rem 1rem; }
#ansichtZettel .zgruppe { margin: 0.25rem 1.1rem 0.6rem; }
#ansichtZettel .zettelfuss { margin-top: 0.6rem; padding-top: 0; }
#ansichtZettel .plankopf { padding-bottom: 0.15rem; }
#ansichtZettel .planuntertitel { margin-top: 0; }
#ansichtZettel { padding-bottom: 0.5rem; }
#ansichtZettel .stepknopf { position: relative; }
#ansichtZettel .stepknopf::before { content: ''; position: absolute; inset: -0.2rem; border-radius: 50%; }
@media screen { .druckblatt { padding: 0.8rem 0.8rem 0.9rem; } .druckblatt .dkopf { flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: 0.4rem; } .druckblatt .dan { margin-bottom: 0.4rem; } .druckblatt .dfuer { padding: 0.35rem 0.6rem; margin-bottom: 0.5rem; } .druckblatt .dsatz { margin-bottom: 0.4rem; } .druckblatt .dfuss { margin-top: 0.5rem; } .druckblatt .dunterschrift { margin-top: 1.2rem; } .druckblatt .dquelle { margin-top: 0.5rem; } }
/* B7 Einstellungen: Titel-Doppel zum Anker-Ort nur noch fuer VoiceOver, Tueren enger, Fussleiste: Version eine Zeile, Links darunter */
#ansichtMehr .mehrtitel.abschnittslabel { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#ansichtMehr .einstelltuer { margin-top: 0.2rem; margin-bottom: 0.2rem; }
#ansichtMehr .fussleiste.leise { margin-top: 0.8rem; gap: 0.2rem 0.8rem; }
#fussMarke { flex: 1 1 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ansichtMehr .fussleiste.leise .werklink { min-height: 2.5rem; margin-bottom: -0.5rem; }
/* B8 App-Einstellungen: Kachel-Luft doppelte sich mit dem Label-Abstand; Schaltzeilen im Mass der kleinen Pille */
#ansichtAppEinst .mehrtitel.abschnittslabel { padding-top: 0.35rem; padding-bottom: 0.2rem; }
#ansichtAppEinst .kacheln { margin-top: 0.25rem; margin-bottom: 0; }
#ansichtAppEinst .formseite .feldlabel { margin-top: 0.6rem; }
#ansichtAppEinst .schaltzeile { min-height: 2.4rem; padding-top: 0.45rem; padding-bottom: 0.45rem; }
#ansichtAppEinst .schaltliste { gap: 0.4rem; }
/* B9 Meine Daten: Label naeher am eigenen Feld als am Feld davor; bleibt Scroll-Bildschirm (Struktur-Idee an THO) */
#ansichtDaten .formseite .feldlabel { margin-top: 0.5rem; }
#ansichtDaten .formseite input:not([type='checkbox']):not([type='radio']) { margin-top: 0.2rem; }
#datenName .abschnittslabel { padding-top: 0.5rem; }
#ansichtDaten .formseite .klapp { margin-top: 0.4rem; min-height: 2.5rem; }
#ansichtDaten .formseite .satz { margin-top: 0.5rem; padding-top: 0.45rem; padding-bottom: 0.45rem; }
#ansichtDaten .formseite .knopf.primaer { margin-top: 0.6rem; }
#ansichtDaten .mehrzeile { padding-top: 0.5rem; padding-bottom: 0.5rem; min-height: 3rem; }
#ansichtDaten .mehrsub { margin-top: 0; }
#ansichtDaten .loeschzeile { margin-top: 1rem; }

/* ---- R3.35 (Lab-Dreh 36): Grundmaß 80 % (THO 26.09.), später nutzerabhängig ---- */
html { font-size: 4.25vw; -webkit-text-size-adjust: 100%; }   /* R3.36: Bezugskonstante — Wurzel = 3,24 % der Bildschirmbreite (THO 26.09., Referenz Bild 2 auf dem iPhone Air); Safari-Zoom und persönliche Textgröße heben sich auf; später nutzerabhängig */
@media (min-width: 600px) { html { font-size: 16px; } }   /* R3.36: Deckel für Tablet/Desktop — einzige absolute Zahl, greift auf keinem iPhone */

/* R3.42/R3.43 (Lab-Drehs 43/44): Label nur als Platzhalter im leeren Feld (wie „Vorname oder Spitzname"), PLZ | Ort, Geschlecht-Zeile mittig, Satz hinter dem i, Pillen flacher */
.formseite .feld { position: relative; margin-top: 0.45rem; }
.formseite .doppel .feld, .formseite .feldzeile { margin-top: 0.45rem; }
.formseite .feld input:not([type="checkbox"]):not([type="radio"]) { margin-top: 0 !important; }
.formseite input:not([type="checkbox"]):not([type="radio"]) { min-height: 2.5rem; padding-top: 0.35rem; padding-bottom: 0.35rem; }   /* R3.43: flacher bei gleicher Schrift (2,5 rem ≈ 44 pt am Air) */
.formseite input[type="date"] { min-height: 2.5rem; }
.formseite .feld .feldlabel { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; line-height: 1; }   /* nur für Vorleser · R3.44: !important gegen #ansichtDaten … .feldlabel { margin-top } — sonst haengt der Datums-Platzhalter unten */
.formseite .feld.datum.ohnewert .feldlabel { width: auto; height: auto; clip: auto; left: 1.1rem; right: 1.1rem; top: 50%; transform: translateY(-50%); pointer-events: none;
  font-size: 1rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--grau-hell); }   /* Datum kennt keinen Platzhalter: Label liegt im leeren Feld */
.formseite .feld.datum.ohnewert input { color: transparent; }
.formseite .doppel { display: grid; grid-template-columns: minmax(5.2rem, 1fr) 2fr; gap: 0.5rem; }
.formseite .feldzeile { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.formseite .feldzeile > .feldlabel { margin: 0 !important; flex: 0 0 auto; text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 400; color: var(--grau-hell); line-height: 1; }
.formseite .feldzeile .kacheln { margin: 0 !important; flex: 1 1 auto; align-items: center; }
.formseite .abschnittszeile { display: flex; align-items: center; gap: 0.5rem; padding-right: 0; }   /* der Rand aus .abschnittszeile drueckte das Label auf zwei Zeilen */
.formseite .abschnittszeile .abschnittslabel { padding-right: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.formseite .infoknopf { flex: 0 0 auto; width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 1px solid var(--gruen); background: #fff; color: var(--gruen);
  font: italic 700 0.8rem/1 Georgia, serif; padding: 0; margin-top: 0.7rem; }
.formseite .infoknopf.an { background: var(--gruen); color: #fff; }
.formseite .satz { margin-top: 0.5rem; }

/* ---- LAB-Kennung (THO 29.08.: rotes Rx statt Band — null Platzverlust) ---- */
.rxmark, .vrx { border-color: var(--rot); background: #FBEBE6; color: var(--rot); }
