:root {
  --bg: #f4f2ee; --karte: #fff; --text: #1d2327; --text2: #5d676e; --linie: #e2ded6;
  --akzent: #0d5c56; --akzent-hell: #e3f0ee; --akzent-dunkel: #094540;
  --gruen: #1f7a3d; --gruen-hell: #e3f3e7; --rot: #b3261e; --rot-hell: #fbe9e7; --gelb: #8a5a00; --gelb-hell: #fdf1d3; --blau: #1f5fa8; --blau-hell: #e4eefa; --ki: #6a3fb5; --ki-hell: #f0eafb;
  --radius: 12px; --schatten: 0 1px 2px rgba(20,30,30,.06), 0 4px 14px rgba(20,30,30,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.01em; } h2 { font-size: 17px; margin: 0 0 10px; } h3 { font-size: 15px; margin: 0 0 6px; }
p { margin: 0 0 10px; } a { color: var(--akzent); }
.laden { padding: 60px 20px; text-align: center; color: var(--text2); }
.leise { color: var(--text2); } .klein { font-size: 13px; } .rechts { text-align: right; } .nowrap { white-space: nowrap; }
.zahl { font-variant-numeric: tabular-nums; }

/* Kopf und Navigation */
header.kopf { position: sticky; top: 0; z-index: 1100; background: var(--akzent-dunkel); color: #fff; display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 56px; }
.marke { font-weight: 700; font-size: 16px; white-space: nowrap; color: #fff; text-decoration: none; }
nav.haupt { display: flex; gap: 2px; flex: 1; }
nav.haupt a { color: #cfe3e0; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; white-space: nowrap; position: relative; }
nav.haupt a:hover { background: rgba(255,255,255,.1); color: #fff; }
nav.haupt a.aktiv { background: rgba(255,255,255,.16); color: #fff; }
nav.haupt a svg { display: none; }
nav.haupt .anz { background: #ffd166; color: #3b2a00; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 1px 6px; margin-left: 5px; }
.finder { position: relative; }
.finder input { width: 230px; border: 0; border-radius: 8px; padding: 8px 12px; font: inherit; background: rgba(255,255,255,.14); color: #fff; }
.finder input::placeholder { color: #b9d2ce; }
.finder input:focus { outline: 2px solid #fff; background: #fff; color: var(--text); }
.finder .treffer { position: absolute; right: 0; top: 44px; width: 340px; max-width: 92vw; background: #fff; color: var(--text); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.25); overflow: hidden; }
.finder .treffer a { display: block; padding: 10px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--linie); }
.finder .treffer a:hover { background: var(--akzent-hell); }
main { max-width: 1240px; margin: 0 auto; padding: 22px 20px 80px; }
main.breit { max-width: none; padding: 0; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.seitenkopf p { margin: 0; color: var(--text2); }

/* Bausteine */
.karte { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 18px; margin-bottom: 16px; }
.karte > h2:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.raster { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.zwei { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--linie); background: #fff; color: var(--text); border-radius: 9px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 38px; }
.btn:hover { border-color: #b9b3a6; } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; } .btn.haupt:hover { background: var(--akzent-dunkel); }
.btn.klein { padding: 4px 10px; min-height: 30px; font-size: 13px; } .btn.gefahr { color: var(--rot); } .btn.gruen { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.btn.link { border: 0; background: none; color: var(--akzent); padding: 4px 6px; min-height: 0; }
.reihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.abz { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; background: #ece9e2; color: #4a4f53; white-space: nowrap; }
.abz.gruen { background: var(--gruen-hell); color: var(--gruen); } .abz.rot { background: var(--rot-hell); color: var(--rot); } .abz.gelb { background: var(--gelb-hell); color: var(--gelb); } .abz.blau { background: var(--blau-hell); color: var(--blau); } .abz.ki { background: var(--ki-hell); color: var(--ki); }
.punkte { display: inline-grid; place-items: center; min-width: 38px; height: 26px; border-radius: 8px; font-weight: 700; font-size: 13px; background: #ece9e2; color: #555; }
.punkte.hoch { background: var(--gruen); color: #fff; } .punkte.mittel { background: #d9a520; color: #fff; }
.hinweis { border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; background: var(--blau-hell); color: #173f6e; }
.hinweis.warn { background: var(--gelb-hell); color: #5c3d00; } .hinweis.rot { background: var(--rot-hell); color: #7a1711; } .hinweis.gruen { background: var(--gruen-hell); color: #14532a; } .hinweis.ki { background: var(--ki-hell); color: #3f2478; }
label.feld { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 10px; }
label.feld input, label.feld select, label.feld textarea, .eingabe { display: block; width: 100%; margin-top: 4px; border: 1px solid #cfc9bd; border-radius: 8px; padding: 8px 10px; font: inherit; font-weight: 400; color: var(--text); background: #fff; }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 0; border-color: var(--akzent); }
.felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }
table.liste { width: 100%; border-collapse: collapse; }
table.liste th { text-align: left; font-size: 12px; color: var(--text2); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
table.liste td { padding: 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.liste tr.klick { cursor: pointer; } table.liste tr.klick:hover td { background: #faf8f4; }
table.liste td.r, table.liste th.r { text-align: right; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--linie); background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); }
.chip.an { background: var(--akzent); border-color: var(--akzent); color: #fff; } .chip em { font-style: normal; opacity: .7; margin-left: 4px; }
.leer { text-align: center; padding: 36px 16px; color: var(--text2); }
details > summary { cursor: pointer; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: #1d2327; color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 3000; max-width: 92vw; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.toast.fehler { background: var(--rot); }
.balken { position: sticky; bottom: 0; z-index: 900; background: #1d2327; color: #fff; border-radius: 12px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.balken .btn { border-color: transparent; }
.schritte { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.schritte > li { counter-increment: s; position: relative; padding: 0 0 14px 40px; }
.schritte > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--akzent); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px; }

/* Anmeldung */
.anmeldung { max-width: 380px; margin: 12vh auto 0; padding: 0 20px; }
.anmeldung .karte { padding: 28px; }

/* Heute */
.aufgabe { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.aufgabe:last-child { border-bottom: 0; } .aufgabe .inhalt { flex: 1; min-width: 0; } .aufgabe .inhalt b { display: block; }
.kennzahl { font-size: 30px; font-weight: 700; line-height: 1.1; } .kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kennzahlen .karte { margin: 0; padding: 14px 16px; }

/* Suchen */
.suche { display: grid; grid-template-columns: 430px 1fr; grid-template-rows: minmax(0, 1fr); height: calc(100vh - 56px); }
.suche > * { min-height: 0; }
.suche .links { display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--linie); min-height: 0; }
.suche .filter { padding: 14px 16px; border-bottom: 1px solid var(--linie); }
.suche .treffer { flex: 1; overflow: auto; min-height: 0; }
.suche .fuss { padding: 10px 16px; border-top: 1px solid var(--linie); background: #faf8f4; }
.tr { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--linie); cursor: pointer; align-items: flex-start; }
.tr:hover, .tr.aktiv { background: var(--akzent-hell); } .tr input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.tr .inhalt { flex: 1; min-width: 0; } .tr b { display: block; }
#karte { height: 100%; min-height: 300px; background: #dfe5e2; }
.kartenwahl { position: absolute; z-index: 1000; top: 10px; right: 10px; background: #fff; border-radius: 9px; box-shadow: var(--schatten); display: flex; overflow: hidden; }
.kartenwahl button { border: 0; background: none; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.kartenwahl button.an { background: var(--akzent); color: #fff; }
.kartenfeld { position: relative; min-height: 0; }
.ansichtwahl { display: none; }
.leaflet-popup-content { margin: 12px 14px; font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; min-width: 220px; }
.leaflet-container { font: inherit; }

/* Steckbrief */
.steckkarte { height: 340px; border-radius: 10px; overflow: hidden; position: relative; }
.daten { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; } .daten dt { color: var(--text2); } .daten dd { margin: 0; }
.person { border: 1px solid var(--linie); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.tel { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
.ampel { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--rot); } .ampel.gruen { background: var(--gruen); }
.verlauf { list-style: none; padding: 0; margin: 0; } .verlauf li { padding: 8px 0 8px 18px; border-left: 2px solid var(--linie); position: relative; }
.verlauf li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--akzent); }
.fotos { display: flex; gap: 8px; flex-wrap: wrap; } .fotos img { width: 110px; height: 82px; object-fit: cover; border-radius: 8px; cursor: pointer; }
.ergebnisse { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.ergebnisse .chip { border-radius: 9px; padding: 10px; text-align: center; }
.brief { border: 1px solid var(--linie); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.brief .kopfzeile { display: flex; gap: 10px; align-items: flex-start; } .brief .kopfzeile input { width: 18px; height: 18px; margin-top: 3px; }
.brief textarea { min-height: 260px; font-size: 14px; line-height: 1.5; }
.stab { display: inline-block; height: 8px; border-radius: 4px; background: var(--akzent); vertical-align: middle; margin-right: 6px; min-width: 2px; }
.reiter { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }

@media (max-width: 900px) {
  header.kopf { height: 50px; padding: 0 12px; gap: 10px; }
  .finder { flex: 1; } .finder input { width: 100%; }
  nav.haupt { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--linie); z-index: 1200; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); justify-content: space-around; gap: 0; }
  nav.haupt a { color: var(--text2); font-size: 10.5px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 1px; flex: 1; min-width: 0; }
  nav.haupt a svg { display: block; width: 22px; height: 22px; } nav.haupt a.aktiv { background: none; color: var(--akzent); } nav.haupt a:hover { background: none; color: var(--akzent); }
  nav.haupt .anz { position: absolute; top: 0; left: 55%; margin: 0; }
  main { padding: 14px 12px 96px; } h1 { font-size: 21px; }
  .zwei { grid-template-columns: 1fr; }
  .suche { display: block; height: auto; } .suche .links { border: 0; }
  .ansichtwahl { display: flex; position: sticky; top: 50px; z-index: 1000; background: #fff; padding: 8px 12px; gap: 6px; border-bottom: 1px solid var(--linie); }
  .suche.zeigt-karte .treffer, .suche.zeigt-karte .fuss, .suche.zeigt-karte .filter { display: none; } .suche:not(.zeigt-karte) .kartenfeld { display: none; }
  .suche .kartenfeld { height: calc(100vh - 50px - 52px - 62px); } .suche .treffer { overflow: visible; } .suche .fuss { position: sticky; bottom: 58px; }
  table.liste.karten thead { display: none; } table.liste.karten tr { display: block; background: #fff; border-radius: var(--radius); box-shadow: var(--schatten); margin-bottom: 10px; padding: 10px 12px; }
  table.liste.karten td { display: block; border: 0; padding: 2px 0; text-align: left !important; } table.liste.karten td[data-t]::before { content: attr(data-t) ": "; color: var(--text2); font-size: 12px; }
  .karte.tabelle { background: none; box-shadow: none; padding: 0; }
  .balken { bottom: 62px; } .toast { bottom: 130px; } .steckkarte { height: 260px; }
  .rollen { overflow-x: auto; }
}
@media print {
  header.kopf, nav.haupt, .btn, .balken, .nichtdrucken { display: none !important; } body { background: #fff; } .karte { box-shadow: none; padding: 0; break-inside: avoid; } main { padding: 0; }
}

/* ---------- Abspielbare Beispiele (demo.js) ---------- */
.wer { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.wer.ki { background: var(--ki-hell); color: var(--ki); } .wer.prog { background: var(--blau-hell); color: var(--blau); } .wer.sie { background: var(--gruen-hell); color: var(--gruen); }
.d-wahl-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.d-wahl-karte { display: flex; flex-direction: column; text-decoration: none; color: inherit; margin: 0; transition: transform .15s, box-shadow .15s; }
.d-wahl-karte:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,30,30,.12); }
.d-wahl-karte h2 { margin: 4px 0 6px; } .d-wahl-karte .btn { margin-top: auto; align-self: flex-start; }
.d-schrittliste { margin: 0 0 14px; padding-left: 18px; }
.d-wer { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; } .d-wer p { margin: 6px 0 0; color: var(--text2); }
.steuerung .btn { min-width: 42px; }
.kapitel { display: flex; gap: 6px; margin: 0 0 10px; }
.kapitel button { all: unset; cursor: pointer; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text2); }
.kapitel button.aktiv { color: var(--akzent); }
.kbalken { height: 4px; background: var(--linie); border-radius: 2px; overflow: hidden; display: block; }
.kbalken i { display: block; height: 100%; width: 0; background: var(--akzent); transition: width .1s linear; }
.kap-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kapitel-name { display: none; }
.untertitel-demo { background: var(--akzent-dunkel); color: #fff; border-radius: 12px 12px 0 0; padding: 12px 16px; font-size: 15.5px; line-height: 1.45; min-height: 70px; }
.untertitel-demo .nr { opacity: .7; margin-right: 8px; } .untertitel-demo a { color: #fff; font-weight: 700; }
.buehne-rahmen { position: relative; background: var(--bg); border: 1px solid var(--linie); border-top: 0; border-radius: 0 0 12px 12px; overflow: hidden; box-shadow: var(--schatten); }
.buehne { height: 580px; overflow: hidden; position: relative; font-size: 14px; }
.buehne, .buehne * { pointer-events: none !important; }
.buehne.ein { animation: dEin .4s ease; } @keyframes dEin { from { opacity: 0; transform: translateY(6px); } }
.ein-unten { animation: dEin .45s ease both; } .demo-zeile { animation: dZeile .45s ease both; } @keyframes dZeile { from { opacity: 0; transform: translateX(-8px); } }
.zeiger { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(13,92,86,.25); border: 2px solid var(--akzent); opacity: 0; z-index: 2000; pointer-events: none; transition: transform .6s cubic-bezier(.3,.7,.3,1), opacity .3s; }
.zeiger.klick { background: var(--akzent); box-shadow: 0 0 0 10px rgba(13,92,86,.22); }
.gedrueckt { outline: 3px solid #ffd166 !important; outline-offset: 2px; }
.d-kopf { background: var(--akzent-dunkel); color: #fff; height: 40px; display: flex; align-items: center; gap: 16px; padding: 0 14px; font-size: 13px; }
.d-nav { display: flex; gap: 2px; } .d-nav span { padding: 4px 9px; border-radius: 6px; color: #cfe3e0; } .d-nav span.an { background: rgba(255,255,255,.16); color: #fff; }
.d-seite { padding: 14px 18px; } .d-seite h1 { font-size: 20px; } .d-seite .karte { padding: 14px; margin-bottom: 10px; }
.d-mitte { height: calc(100% - 40px); display: grid; place-items: center; padding: 20px; } .d-sprechblase { max-width: 520px; padding: 24px; }
.d-suche { display: grid; grid-template-columns: 330px 1fr; height: calc(100% - 40px); }
.d-links { background: #fff; border-right: 1px solid var(--linie); padding: 10px 12px; display: flex; flex-direction: column; min-height: 0; }
.d-links .eingabe { margin: 8px 0; padding: 6px 9px; }
.d-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; } .d-felder .feld { margin-bottom: 6px; font-size: 12px; } .d-felder input, .d-felder .eingabe { padding: 5px 8px; margin-top: 2px; }
.d-wahl { display: block; }
.d-liste { flex: 1; overflow: hidden; margin: 0 -12px; border-top: 1px solid var(--linie); } .d-liste .tr { padding: 7px 12px; } .d-liste .leer { padding: 20px 10px; }
.d-gross { font-size: 34px; font-weight: 700; color: var(--akzent); }
.d-fuss { border-top: 1px solid var(--linie); padding-top: 8px; margin: 0 -12px; padding: 8px 12px 0; }
.d-karte { position: relative; min-height: 0; } .d-karte > div:first-child, .d-gebiet > div { height: 100%; } .d-gebiet { height: 440px; border-radius: 10px; overflow: hidden; }
.d-popup { position: absolute; z-index: 1000; left: 50%; top: 14px; transform: translateX(-50%); width: min(330px, 90%); background: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.d-tab { position: absolute; z-index: 1100; right: 16px; bottom: 16px; width: min(360px, 88%); background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.d-tab-gross { right: 50%; transform: translateX(50%); bottom: 40px; width: min(460px, 92%); }
.d-tab-kopf { background: #e8e6e1; padding: 6px 10px; font-size: 12px; color: #555; }
.d-tab-bild { height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(#bcd6ea, #e9e3d4 60%, #9fb58a); text-align: center; padding: 10px; }
.d-portal { padding: 16px; } .d-captcha { display: inline-block; border: 1px solid #ccc; border-radius: 4px; padding: 10px 14px; background: #f9f9f9; }
.d-toast { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); background: #1d2327; color: #fff; padding: 9px 16px; border-radius: 10px; z-index: 1500; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.d-brieftext { margin-top: 10px; padding: 12px 14px; background: #faf8f4; border-radius: 8px; font-size: 13px; line-height: 1.5; max-height: 190px; overflow: hidden; }
.d-einwand { border-left: 3px solid var(--ki); padding: 6px 10px; margin: 8px 0; background: #fff; }
.d-neu td { background: var(--gruen-hell); }
.d-laden { padding: 16px 12px; line-height: 2; }
.buehne .balken { position: absolute; left: 18px; right: 18px; bottom: 14px; margin: 0; }
nav.haupt a[data-nav="beispiele"] { margin-left: auto; }

@media (max-width: 900px) {
  nav.haupt a[data-nav="beispiele"] { display: none; }
  .seitenkopf .steuerung { width: 100%; flex-wrap: nowrap; } .steuerung .btn { flex: 1; padding: 8px 0; }
  .lang { display: none; }
  .kapitel { gap: 3px; } .kap-text { display: none; }
  .kapitel-name { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--akzent); }
  .untertitel-demo { font-size: 14.5px; } .untertitel-demo .nr { display: none; }
  .buehne { height: 500px; font-size: 13px; }
  .d-nav span:not(.an) { display: none; }
  .d-suche { grid-template-columns: 1fr; grid-template-rows: 150px minmax(0, 1fr); }
  .d-suche.d-gewaehlt .d-schritt1 { display: none; }
  .d-felder { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 0 6px; } .d-felder .feld { font-size: 11px; } .d-felder input, .d-felder .eingabe { font-size: 12px; padding: 4px 6px; }
  .d-merken:not(.zeigen) { display: none; }
  .d-fuss #dAnz { font-size: 11px; }
  .d-links { padding: 8px 10px; } .d-links .chips .chip { padding: 3px 10px; }
  .d-felder .feld { margin-bottom: 3px; } #dMerken { padding: 0 6px; }
  .d-liste .tr { padding: 5px 10px; } .d-liste .tr .klein { font-size: 12px; }
  .d-gebiet { height: 330px !important; }
  .d-seite .karte { padding: 10px; } .d-seite h1 { font-size: 18px; margin-bottom: 2px; }
  .untertitel-demo { padding: 10px 12px; min-height: 0; }
  .d-karte { order: -1; } .d-links { border-right: 0; }
  .d-felder { grid-template-columns: 1fr 1fr; }
  .d-popup { top: 6px; padding: 8px 10px; font-size: 12px; }
 .d-sprechblase p { font-size: 16px !important; }
  .d-seite { padding: 10px 12px; } .d-gebiet { height: 400px; }
  .buehne table.liste th:nth-child(3), .buehne table.liste td:nth-child(3), .buehne table.liste th:nth-child(4), .buehne table.liste td:nth-child(4) { display: none; }
  .buehne .balken { left: 10px; right: 10px; }
  .d-toast { white-space: normal; width: 90%; text-align: center; }
}
.d-start { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; text-decoration: none; color: inherit; border-left: 4px solid var(--akzent); }

/* Suchseite: zwei Arten zu suchen */
.modus { display: flex; gap: 6px; margin-bottom: 12px; } .modus .chip { flex: 1; padding: 8px 10px; }
.schritt-titel { font-weight: 700; margin: 4px 0 6px; display: flex; align-items: center; gap: 8px; }
.schritt-titel .nr { width: 22px; height: 22px; border-radius: 50%; background: var(--akzent); color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }
#wasTeil { margin-top: 14px; }
#gsuche, #asuche { margin: 0; }
.vorschlaege { border: 1px solid var(--linie); border-radius: 9px; overflow: hidden; margin-top: 4px; }
.vorschlaege:empty { display: none; }
.vorschlaege button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--linie); background: #fff; padding: 9px 12px; font: inherit; cursor: pointer; }
.vorschlaege button:last-child { border-bottom: 0; } .vorschlaege button:hover { background: var(--akzent-hell); }
.vorschlaege p { margin: 0; padding: 8px 12px; }
.suche.modus-adresse .treffer, .suche.modus-adresse .fuss { display: none; }
.suche.modus-adresse .filter { flex: 1; overflow: auto; border-bottom: 0; }

.d-links .modus { margin-bottom: 8px; } .d-links .modus .chip { padding: 5px 8px; font-size: 12.5px; }
.d-links .schritt-titel { font-size: 13px; margin: 2px 0 4px; }
.d-links .vorschlaege button { padding: 7px 10px; font-size: 13px; }

/* Anpassen (Chat) */
.chat { display: grid; gap: 8px; max-height: 420px; overflow: auto; }
.blase { padding: 9px 12px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; }
.blase.sie { background: var(--akzent); color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
.blase.app { background: var(--ki-hell); color: #3f2478; justify-self: start; border-bottom-left-radius: 4px; }
.chat .chip { text-align: left; }

/* Wie alles zusammenhängt */
.zh-fluss { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: start; }
.zh-titel { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text2); margin-bottom: 6px; }
.zh-k { border: 1px solid var(--linie); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; display: grid; gap: 2px; background: #fff; }
.zh-k span { font-size: 12.5px; color: var(--text2); }
.zh-k.zh-app { background: var(--akzent-hell); border-color: var(--akzent); }
.zh-pfeil { align-self: center; font-size: 24px; color: var(--akzent); }
.stab-tabelle td { vertical-align: top; }
@media (max-width: 900px) { .zh-fluss { grid-template-columns: 1fr; } .zh-pfeil { transform: rotate(90deg); justify-self: center; } }

/* Nur am Handy, wo «So funktioniert es» nicht im Menü steht */
.nur-handy { display: none; }
@media (max-width: 900px) { .nur-handy { display: inline-flex; } }

/* Der Weg: Menü mit Nummern, Schritt-Köpfe, Startseite */
nav.haupt .nr, .weg .nr, .naechster .nr, .weg-g .nr { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.2); color: inherit; margin-right: 6px; vertical-align: 1px; }
nav.haupt a.aktiv .nr { background: #ffd166; color: #3b2a00; }
nav.neben { display: flex; gap: 2px; } nav.neben a { color: #b9d2ce; text-decoration: none; font-size: 13px; padding: 6px 8px; border-radius: 7px; white-space: nowrap; } nav.neben a:hover, nav.neben a.aktiv { color: #fff; background: rgba(255,255,255,.12); }
header.kopf .finder input { width: 190px; }
.schritt-nr { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--akzent); margin-bottom: 2px; }
.schritt-kopf p { max-width: 620px; }
.schritt-zeile { font-size: 13px; color: var(--text2); margin-bottom: 10px; } .schritt-zeile .schritt-nr { display: inline; margin-right: 4px; }
.naechster { display: grid; gap: 6px; text-decoration: none; color: inherit; border: 2px solid var(--akzent); padding: 20px 22px; max-width: 560px; }
.naechster .gross { font-size: 26px; font-weight: 700; display: flex; align-items: center; } .naechster .gross .nr { width: 32px; height: 32px; font-size: 16px; background: var(--akzent); color: #fff; margin-right: 10px; }
.naechster .btn { justify-self: start; margin-top: 6px; font-size: 16px; padding: 10px 22px; }
.naechster-klein { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 4px solid var(--akzent); }
.weg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1250px) and (min-width: 901px) { .weg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.weg-schritt { display: grid; gap: 4px; justify-items: start; background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; padding: 14px; text-decoration: none; color: inherit; position: relative; }
.weg-schritt .nr { background: var(--akzent-hell); color: var(--akzent); width: 26px; height: 26px; font-size: 13px; }
.weg-schritt.an { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent-hell); } .weg-schritt.an .nr { background: var(--akzent); color: #fff; }
.weg-schritt:hover { border-color: var(--akzent); }
.weg-g { display: flex; flex-wrap: wrap; gap: 6px 4px; margin-bottom: 12px; }
.weg-g span { display: inline-flex; align-items: center; font-size: 13px; color: var(--text2); padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--karte); border: 1px solid var(--linie); }
.weg-g .nr { background: #ece9e2; width: 22px; height: 22px; }
.weg-g span.vorbei .nr { background: var(--gruen-hell); color: var(--gruen); }
.weg-g span.an { border-color: var(--akzent); color: var(--akzent); font-weight: 700; } .weg-g span.an .nr { background: var(--akzent); color: #fff; }
.weg-g span.zu { border-color: var(--text2); color: var(--text2); }
@media (max-width: 1100px) { nav.neben { display: none; } }
@media (max-width: 900px) {
  .weg { grid-template-columns: 1fr; } .weg-schritt { grid-template-columns: auto 1fr auto; align-items: center; } .weg-schritt .klein { justify-self: end; }
  nav.haupt .nr { display: none; }
  nav.haupt a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .naechster .gross { font-size: 22px; }
  .schritt-kopf .reihe { width: 100%; }
}
@media (min-width: 1101px) { .nur-handy { display: none !important; } }
.legende { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; } .legende .punkte { flex: none; transform: scale(.85); }

/* Hinweis im Menü: nur ein Punkt («hier ist etwas zu tun»), keine zweite Zahl neben der Schritt-Nummer */
nav.haupt .anz { display: inline-block; width: 9px; height: 9px; padding: 0; border-radius: 50%; background: #ffd166; margin-left: 6px; vertical-align: 2px; font-size: 0; }
@media (max-width: 900px) { nav.haupt .anz { position: absolute; top: 4px; left: calc(50% + 8px); margin: 0; } }

.bilanz { font-size: 17px; margin: 4px 0 16px; } .bilanz b { color: var(--akzent); font-size: 20px; }

.abtippen { background: var(--gelb-hell); padding: 1px 6px; border-radius: 5px; }

.kanton-tabelle th[scope], .kanton-tabelle tbody th { text-align: left; font-size: 13px; color: var(--text2); white-space: nowrap; padding-right: 14px; vertical-align: top; }
.kanton-tabelle td { width: 44%; font-size: 14px; }
@media (max-width: 900px) { .kanton-tabelle { min-width: 560px; } }

/* Eigentümerabfrage je Kanton */
.kantone { display: grid; gap: 6px; }
.kanton { border: 1px solid var(--linie); border-radius: 10px; padding: 8px 12px; background: var(--karte); }
.kanton[open] { border-color: var(--akzent); }
.kanton summary { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; cursor: pointer; list-style: none; }
.kanton summary::-webkit-details-marker { display: none; }
.kanton .kt { display: inline-grid; place-items: center; width: 34px; height: 26px; border-radius: 6px; background: var(--akzent-hell); color: var(--akzent); font-size: 13px; }
.kanton .kt-name { font-weight: 600; min-width: 150px; }
.kanton .kt-kurz { flex: 1; min-width: 200px; }
.kanton .daten { margin-top: 10px; font-size: 14px; }

/* Handy-Menü: Beschriftungen ganz zeigen (z. B. «Nachfassen») */
@media (max-width: 900px) {
  nav.haupt a { padding: 4px 0; }
  nav.haupt a span { font-size: 10px; letter-spacing: -0.1px; overflow: visible; text-overflow: clip; }
}

.d-tipp { display: block; width: 100%; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--akzent); background: var(--akzent-hell); border-radius: 6px; padding: 4px 8px; }

/* 3 Eigentümer und 4 Anrufen */
.aufgabe .reihe { flex-wrap: wrap; }
.tel-gross { font-size: 17px; font-weight: 700; text-decoration: none; display: inline-block; margin-top: 4px; }
@media (max-width: 900px) {
  nav.haupt a[data-nav="heute"] { display: none; }
  .aufgabe { flex-wrap: wrap; } .aufgabe .inhalt { min-width: 200px; }
}

.weg-g span.aus { opacity: .45; text-decoration: line-through; }

/* ---------- Handy: Bedienung mit dem Daumen ---------- */
@media (max-width: 900px) {
  /* 1 kein Hineinzoomen beim Tippen (iOS zoomt bei Schrift unter 16 px) */
  input, select, textarea, .eingabe, label.feld input, label.feld select, label.feld textarea, .finder input { font-size: 16px !important; }
  /* 2 Daumengrösse */
  .btn { min-height: 44px; } .btn.klein { min-height: 40px; padding: 8px 12px; font-size: 14px; }
  .btn.link { min-height: 36px; }
  .chip { padding: 8px 14px; min-height: 38px; }
  .ergebnisse .chip { min-height: 48px; }
  /* 5 Steckbrief: Eigentümer, Gespräch und Briefe vor der Karte */
  .steckbrief-spalten > div:last-child { order: -1; }
  /* 6 Anrufen mit einem Tipp */
  .tel-gross { font-size: 21px; padding: 6px 0; }
  .aufgabe.anruf .btn { width: 100%; }
  /* 7 Zeilen mit Knöpfen: Knöpfe unter den Text, über die ganze Breite */
  .aufgabe { flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; }
  .aufgabe > .reihe { width: 100%; justify-content: stretch !important; }
  .aufgabe > .reihe .btn { flex: 1 1 auto; }
  .aufgabe > a.btn, .aufgabe > button.btn { margin-left: auto; }
  /* 8 lesbare Hinweise */
  .klein { font-size: 13.5px; }
  /* 9 Leisten und Meldungen über dem Menü */
  .balken { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
  main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  /* 10 Schritt-Kopf */
  .schritt-kopf .reihe { width: 100%; } .schritt-kopf .reihe .btn { flex: 1; }
  .schritt-kopf p { font-size: 14.5px; }
  /* Karte im Steckbrief: Hinweis zum Zoomen */
  .steckkarte::after { content: "Zoomen mit zwei Fingern"; position: absolute; left: 8px; bottom: 8px; z-index: 900; font-size: 11px; background: rgba(255,255,255,.85); padding: 2px 6px; border-radius: 6px; color: #333; pointer-events: none; }
}

/* ---------- Erscheinungsbild: heller Kopf, aktiver Menüpunkt unterstrichen, Überschriften gesperrt in Grossbuchstaben ---------- */
header.kopf { background: #fff; color: var(--text); border-bottom: 1px solid var(--linie); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.marke { color: var(--akzent); letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.marke::before { content: ""; width: 26px; height: 26px; border-radius: 6px; background: url(/app/icon-192.png) center / cover; flex: none; }
nav.haupt a { color: var(--text2); border-radius: 0; padding: 18px 10px 15px; border-bottom: 3px solid transparent; }
nav.haupt a:hover { background: none; color: var(--akzent); }
nav.haupt a.aktiv { background: none; color: var(--akzent); border-bottom-color: var(--akzent); }
nav.haupt .nr { background: var(--akzent-hell); color: var(--akzent); }
nav.haupt a.aktiv .nr { background: var(--akzent); color: #fff; }
nav.neben a { color: var(--text2); } nav.neben a:hover, nav.neben a.aktiv { color: var(--akzent); background: var(--akzent-hell); }
.finder input { background: #f1f3f2; color: var(--text); border: 1px solid transparent; }
.finder input::placeholder { color: #7b8582; }
.finder input:focus { background: #fff; border-color: var(--akzent); outline: none; }
main h1 { color: var(--akzent-dunkel); letter-spacing: -.01em; }
.karte > h2, main > h2, .seitenkopf + h2 { font-size: 13.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--akzent-dunkel); }
main > h2 { margin: 28px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--linie); }
.weg-schritt { border-top: 3px solid var(--akzent-hell); } .weg-schritt.an { border-top-color: var(--akzent); }
@media (max-width: 900px) { header.kopf { box-shadow: 0 1px 6px rgba(0,0,0,.06); } nav.haupt a { padding: 4px 0; border-bottom: 0; } }

/* Begrüssung */
.willkommen { background: linear-gradient(135deg, var(--akzent-hell), #fff); border: 1px solid var(--linie); border-left: 4px solid var(--akzent); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.willkommen h2 { font-size: 20px; margin: 4px 0 8px; text-transform: none; letter-spacing: 0; color: var(--akzent-dunkel); }
.willkommen p { max-width: 720px; }

/* Hilfe */
.sprungmarken { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 8px; }
.sprungmarken a { font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent-dunkel); }
.grundsatz { background: var(--ki-hell); border-left: 4px solid var(--ki); padding: 12px 16px; border-radius: 0 10px 10px 0; margin-bottom: 12px; }
.wer-tabelle { display: grid; gap: 8px; margin-bottom: 8px; }
.wer-zeile { display: grid; grid-template-columns: 150px 1fr; gap: 10px; background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 14px; }
.wer-zeile ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.fragen-liste { display: grid; gap: 6px; }
.frage { background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 14px; }
.frage summary { font-weight: 600; }
.frage p { margin: 8px 0 0; color: var(--text2); }
.einf-datenschutz { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 16px 0; padding: 14px 18px; background: var(--gruen-hell); border-left: 4px solid var(--gruen); border-radius: 0 10px 10px 0; }
.einf-datenschutz h3 { color: var(--gruen); margin: 0 0 6px; } .einf-datenschutz ul { margin: 0; padding-left: 18px; }
.rueckmeldung { margin: 0 0 16px; padding: 12px 16px; background: var(--blau-hell); border-radius: 10px; font-size: 14.5px; }
.erfuellt td { vertical-align: top; } .haekchen { color: var(--gruen); font-weight: 700; margin-right: 6px; }
.offen-liste { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 900px) {
  .wer-zeile { grid-template-columns: 1fr; gap: 4px; }

}
/* Datenschutz auf dem Handy: Anforderung über der Begründung statt zwei schmale Spalten */
@media (max-width: 640px) {
  table.erfuellt thead { display: none; }
  table.erfuellt tr, table.erfuellt td { display: block; width: auto !important; }
  table.erfuellt td:first-child { padding-bottom: 2px; border-bottom: 0; }
  table.erfuellt td:last-child { padding-top: 0; }
}
