/* Kundenportal im neuen Design (js/kunde.js, js/offerte.js, js/haus3d.js). Alles unter .kp bzw. .kp-…, damit es auch
   in der Portal-Vorschau des Mitarbeiterportals so aussieht. Firmenfarbe: --marke. Keine Inline-Styles (CSP). */
.kp, .kp-bereich {
  --kp-linie: #e3e5e0;
  --kp-linie-2: #eceee9;
  --kp-text-2: #55595d;
  --kp-text-3: #3f4347;
  --kp-flaeche-2: #f7f8f5;
  --kp-warn: #8a4600;
  --kp-warn-hg: #fffaf1;
  --kp-warn-rand: #efd2a0;
  --kp-tint: #e8f0ec;
  --kp-tint: color-mix(in srgb, var(--marke) 10%, #fff);
  --kp-radius: 20px;
  --kp-serif: ui-serif, Georgia, Cambria, "Times New Roman", serif;
}
.kp { display: flex; flex-direction: column; gap: 20px; }
body.kundenportal .inhalt, body.kundenportal .fuss { max-width: 1200px; }
.kp .karte { border-radius: var(--kp-radius); border: 1px solid var(--kp-linie); box-shadow: none; margin: 0; }
.kp h2, .kp h3 { margin: 0; }
.kp p { margin: 0; }
.kp .unter { color: var(--kp-text-2); }

/* Reiter des Projekts */
.kp-reiter { gap: 22px; margin-bottom: 20px; }
.kp-reiter button { padding: 12px 2px; font-weight: 600; color: var(--kp-text-3); display: inline-flex; align-items: center; gap: 6px; }
.kp-reiter button.aktiv { color: var(--text); }

/* Chips */
.kp-chip {
  display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; white-space: nowrap; background: var(--kp-tint); color: var(--text);
}
.kp-chip.warn { background: #fff1df; color: var(--kp-warn); }
.kp-chip.warn.voll { background: var(--kp-warn); color: #fff; }
.kp-chip.ok { background: var(--gruen-hell); color: var(--gruen); }
.kp-chip.neu { background: var(--kp-tint); color: var(--marke); }
.kp-chip.rot { background: var(--rot-hell); color: var(--rot); }
.dokumente-liste .kp-chip { margin-top: 4px; }

.kp-kicker { font-size: .82rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--marke); }
.kp-kopfzeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kp-lead { font-size: 1.1rem; line-height: 1.55; color: var(--kp-text-3); }
.kp-karte-h { font-size: 1.15rem; font-weight: 700; }
.kp-reihe { display: flex; gap: 20px; flex-wrap: wrap; align-items: stretch; }
.kp-reihe > * { flex: 1 1 320px; min-width: 0; }
.kp-oben > .kp-naechster { flex: 3 1 480px; }
.kp-oben > .kp-wichtig { flex: 2 1 340px; }
.kp-avatar {
  width: 50px; height: 50px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--kp-tint); color: var(--marke); font-weight: 700;
}
.kp-avatar.gross { width: 72px; height: 72px; font-size: 1.3rem; }
.kp-ico { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.kp-link { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.knopf.gross { min-height: 54px; font-size: 1.05rem; }

/* Ihr nächster Schritt */
.kp-naechster { display: flex; flex-direction: column; gap: 14px; padding: 26px 28px; }
.kp .kp-naechster.bitte { background: var(--kp-warn-hg); border: 2px solid var(--kp-warn-rand); }
.kp-naechster.bitte .kp-kicker { color: var(--kp-warn); }
.kp-naechster.ruhig { background: var(--flaeche); }
.kp-naechster-titel { font-family: var(--kp-serif); font-size: 1.85rem; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.kp-naechster p { font-size: 1.05rem; line-height: 1.55; color: var(--kp-text-3); }
.kp-naechster p.unter { font-size: .95rem; }
.kp-offen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.kp-offen li { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--kp-warn-rand); border-radius: 12px; padding: 8px 14px; }
.kp-kreis { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c98a2c; flex: none; }

/* Wichtige Unterlagen */
.kp-wichtig { display: flex; flex-direction: column; gap: 6px; padding: 24px 26px; }
.kp-wichtig h2 { font-size: 1.15rem; margin-bottom: 4px; }
.kp-doks { list-style: none; margin: 0; padding: 0; }
.kp-doks li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--kp-linie-2); }
.kp-doks li:last-child { border-bottom: 0; }
.kp-dok-zeichen { font-size: 1.3rem; }
.kp-dok-text { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; overflow-wrap: anywhere; }

/* Kopf mit Dank, Haus in 3D und dem Weg */
.kp-kopf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 26px 28px; }
.kp-kopf.mit-bild { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.kp-kopf-text { display: flex; flex-direction: column; gap: 10px; }
.kp-kopf-titel { font-family: var(--kp-serif); font-size: 2.1rem; line-height: 1.12; font-weight: 700; letter-spacing: -.01em; }
.kp-kopf .fortschritt { margin: 6px 0 0; }
.kp-kopf .termine { margin: 6px 0 0; }
.kp-weg {
  grid-column: 1 / -1; list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--kp-linie-2);
  display: flex; flex-wrap: wrap; gap: 14px 2px;
}
.kp-weg .ms {
  flex: 1 1 80px; min-width: 80px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: none; padding: 0; border-radius: 0; font-size: inherit; color: var(--text);
}
.ms-punkt {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; border: 2px solid #cfd3cd; color: var(--kp-text-2); background: #fff;
}
.kp-weg .ms.erledigt .ms-punkt { background: var(--marke); border-color: var(--marke); color: #fff; }
.kp-weg .ms.arbeit .ms-punkt { border-color: #c98a2c; color: var(--kp-warn); background: var(--kp-warn-hg); }
.kp-weg .ms.aktuell .ms-punkt { box-shadow: 0 0 0 4px rgba(201, 138, 44, .18); }
.ms-titel { font-size: .92rem; font-weight: 600; hyphens: auto; }
.ms-text { font-size: .82rem; color: var(--kp-text-2); }
.kp-weg .ms.aktuell .ms-text { color: var(--kp-warn); font-weight: 700; }

/* Kontakt, Nachrichten, Arbeitsschritte */
.kp-kontakt, .kp-nachrichten { display: flex; flex-direction: column; gap: 10px; padding: 24px 26px; }
.kp-person { display: flex; align-items: center; gap: 12px; }
.kp-person > span:last-child { display: flex; flex-direction: column; }
.kp-kontakt-link { min-height: 32px; display: inline-flex; align-items: center; color: var(--text); }
.kp-letzte { background: var(--kp-flaeche-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.kp-nachrichten .knopf { align-self: flex-start; }
.kp-schritte { padding: 24px 26px; }
.kp-schritte > h2 { margin-bottom: 12px; }
.kp-schritte .phase h3 { font-size: 1.05rem; margin: 0 0 6px; }
.kp-danke { margin-bottom: 16px; }
.kp-neuhier {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 16px 20px; border-left: 4px solid var(--marke);
}
.kp-neuhier > div:first-child { flex: 1 1 320px; }
.kp-neuhier-platz { display: contents; } /* leer: kein Abstand im Raster */

/* --- Offerte ------------------------------------------------------------------------------------------------- */
.kp-offerte { gap: 0; }
.kp-kapitelnav {
  position: sticky; top: 0; z-index: 5; display: flex; gap: 6px 22px; align-items: center; overflow-x: auto;
  background: var(--flaeche); border: 1px solid var(--kp-linie); border-radius: 14px; padding: 4px 16px; margin-bottom: 8px;
  scrollbar-width: none;
}
.kp-kapitelnav::-webkit-scrollbar { display: none; }
.kp-kapitelnav button {
  font: inherit; font-weight: 600; background: none; border: 0; padding: 10px 0; min-height: 44px; cursor: pointer;
  color: var(--text); white-space: nowrap;
}
.kp-kapitelnav .kp-zum-auftrag { margin-left: auto; color: var(--marke); }

.kp-held { display: flex; gap: 40px; flex-wrap: wrap; align-items: center; padding: 34px 0 40px; }
.kp-held-text { flex: 1 1 400px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kp-held-bild { flex: 1 1 460px; min-width: 0; }
.kp-titel { font-family: var(--kp-serif); font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.04; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.kp-fakten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.kp-fakt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kp-fakt b { font-family: var(--kp-serif); font-size: 1.9rem; line-height: 1.1; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.kp-fakt span { font-size: .92rem; color: var(--kp-text-2); }
.kp-fakt.karte { padding: 18px 20px; }
.kp-fakt.betont b { color: var(--marke); }

.kp .kp-brief { display: flex; gap: 24px; align-items: flex-start; padding: 28px 32px; margin-bottom: 40px; flex-wrap: wrap; }
.kp-brief-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; font-size: 1.1rem; line-height: 1.6; }
.kp-brief-anrede { font-family: var(--kp-serif); font-size: 1.35rem; font-weight: 600; }
.kp-brief-von { font-size: 1rem; }

.kp-kap { padding: 56px 0; border-top: 1px solid var(--kp-linie); display: flex; flex-direction: column; gap: 14px; }
/* jedes zweite Kapitel weiss über die ganze Breite (ohne seitliches Scrollen) */
.kp-kap.hell { background: var(--flaeche); box-shadow: 0 0 0 100vmax var(--flaeche); clip-path: inset(0 -100vmax); }
.kp-kapnr { font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--kp-text-2); }
.kp-aussage { font-family: var(--kp-serif); font-size: clamp(1.6rem, 3.4vw, 2.25rem); line-height: 1.18; font-weight: 600; letter-spacing: -.01em; max-width: 860px; margin: 0; text-wrap: balance; }
.kp-unter { font-size: 1.1rem; line-height: 1.55; color: var(--kp-text-3); max-width: 760px; margin: 0; }
.kp-kap > .kp-zwei, .kp-kap > .karte, .kp-kap > .kp-teile, .kp-kap > .kp-ablauf { margin-top: 14px; }
.kp-zwei { display: flex; gap: 20px; flex-wrap: wrap; align-items: stretch; }
.kp-zwei > * { flex: 1 1 340px; min-width: 0; }
.kp-zwei.breit-links > :first-child { flex: 2 1 460px; }
.kp-stapel { display: flex; flex-direction: column; gap: 14px; }
.kp-bildkarte { margin: 0; background: var(--hinter); border-radius: var(--kp-radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.kp-bild { width: 100%; height: auto; display: block; border-radius: 12px; background: #e9ece6; }
.kp-bild.laedt { aspect-ratio: 4 / 3; }
.kp-flaeche { display: flex; gap: 14px; align-items: center; padding: 18px 20px; }
.kp-flaeche > span:last-child { display: flex; flex-direction: column; }
.kp-flaeche-nr {
  width: 44px; height: 44px; border-radius: 50%; background: var(--marke); color: #fff; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700;
}
.kp-faktenraster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px 22px; }
.kp-faktenraster .kp-fakt b { font-size: 1.6rem; }

/* Anlage erklärt */
.kp-teile { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.kp-teil {
  text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 18px;
  border: 2px solid var(--kp-linie); background: var(--kp-flaeche-2); cursor: pointer; font: inherit; color: var(--text); min-height: 140px;
}
.kp-teil.an { border-color: var(--marke); background: #fff; }
.kp-teil b { font-size: 1.1rem; }
.kp-teil-zeichen {
  width: 46px; height: 46px; border-radius: 14px; background: var(--kp-tint); color: var(--marke); display: inline-flex;
  align-items: center; justify-content: center; font: 700 1.15rem var(--kp-serif);
}
.kp-erklaerung { display: flex; gap: 26px; flex-wrap: wrap; padding: 24px 26px; }
.kp-erklaerung-text { flex: 2 1 380px; display: flex; flex-direction: column; gap: 10px; }
.kp-gross { font-family: var(--kp-serif); font-size: 1.35rem; line-height: 1.4; font-weight: 600; }
.kp-gutzuwissen { flex: 1 1 260px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; }
.kp-punkt { display: flex; gap: 10px; }
.kp-punkt .kp-ico { color: var(--marke); margin-top: 2px; }
.kp-begriffe { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.kp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.kp-chips .kp-chip { font-size: .92rem; font-weight: 600; padding: 8px 14px; min-height: 36px; }
.kp-chip-knopf {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #cfd3cd; background: #fff; color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer;
}
.kp-chip-knopf.an { background: var(--marke); border-color: var(--marke); color: #fff; }
.kp-definition { font-size: 1.05rem; line-height: 1.5; padding: 14px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--kp-linie); max-width: 760px; }

/* Sonne: Grafik */
.kp-grafik { margin: 14px 0 0; padding: 20px 22px; }
.kp-legende { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; }
.kp-legende-eintrag { display: inline-flex; align-items: center; gap: 8px; }
.kp-legende-balken { width: 14px; height: 14px; border-radius: 3px; background: var(--marke); }
.kp-legende-linie { width: 18px; height: 3px; background: var(--text); }
.kp-svg { width: 100%; height: auto; max-height: 330px; display: block; margin-top: 8px; }
.kp-achse { stroke: #cfd3cd; stroke-width: 1; }
.kp-saeule { fill: var(--marke); }
.kp-verbrauch { fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linejoin: round; }
.kp-wert { font-size: 13px; font-weight: 700; fill: var(--text); }
.kp-monat { font-size: 13px; fill: var(--kp-text-2); }

/* Alltag */
.kp-alltag { display: flex; flex-direction: column; gap: 18px; padding: 22px; }
.kp-segment { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: #f1f2ef; flex-wrap: wrap; }
.kp-segment button { flex: 1 1 80px; min-height: 44px; border-radius: 11px; border: 0; background: transparent; font: inherit; font-weight: 600; cursor: pointer; color: var(--text); }
.kp-segment button.an { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.kp-alltag-anzeige { display: flex; flex-direction: column; gap: 14px; }
.kp-flussraster { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 12px; }
.kp-flussraster .kp-fakt { padding: 14px 16px; border-radius: 14px; background: var(--hinter); flex-direction: column-reverse; }
.kp-flussraster .kp-fakt.betont { background: var(--kp-tint); }
.kp-flussraster .kp-fakt b { font-family: inherit; font-size: 1.3rem; color: var(--text); }
.kp-anteil { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; }
.kp-anteil-zahl { font-family: var(--kp-serif); font-size: 2.4rem; font-weight: 700; color: var(--marke); }
.kp-anteil-zahl span { font: 600 1rem system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--kp-text-2); }
.kp-balken { display: block; height: 12px; border-radius: 999px; overflow: hidden; background: #d9ddd6; }
.kp-balken-wert { display: block; height: 100%; background: var(--marke); border-radius: 999px; }

/* Was es bringt */
.kp-reglerkarte { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; }
.kp-reglerkarte label { font-weight: 700; }
.kp-reglerkarte input[type="range"] { accent-color: var(--marke); min-height: 44px; width: 100%; }
.kp-wirtschaft { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 14px; }
.kp-wirtschaft .kp-fakt b { font-size: 1.55rem; }
.kp-hinweiskarte { padding: 18px 22px; line-height: 1.5; }

/* So geht es weiter */
.kp-ablauf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 14px; }
.kp-ablauf-schritt { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.kp .kp-ablauf-schritt.sie { background: var(--kp-warn-hg); border-color: var(--kp-warn-rand); }
.kp-nr {
  width: 36px; height: 36px; border-radius: 50%; background: var(--marke); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700;
}
.kp-ablauf-schritt.sie .kp-nr { background: var(--kp-warn); }
.kp-wer { font-size: .8rem; font-weight: 700; color: var(--kp-text-2); }
.kp-ablauf-schritt.sie .kp-wer { color: var(--kp-warn); }

/* Preis und Auftrag */
.kp-investition { display: flex; flex-direction: column; padding: 22px 24px; }
.kp-karte-titel { font-size: 1.1rem; display: block; margin-bottom: 8px; }
.kp-karte-untertitel { display: block; margin: 16px 0 2px; }
.kp-zeile { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--kp-linie-2); }
.kp-zeile span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kp-zeile.total { font-size: 1.2rem; font-weight: 700; border-bottom: 0; padding-top: 14px; }
.kp-investition .unter { margin-top: 8px; }
.kp .kp-annahme { padding: 26px; border: 2px solid var(--marke); box-shadow: 0 10px 30px rgba(0, 0, 0, .08); display: flex; flex-direction: column; gap: 12px; }
.kp-annahme.fertig { background: var(--gruen-hell); border-color: var(--gruen); }
.kp-annahme-form { display: flex; flex-direction: column; gap: 14px; }
.kp-annahme-titel { font-family: var(--kp-serif); font-size: 1.5rem; display: block; }
.kp-annahme .link { align-self: flex-start; }
.kp-check { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; cursor: pointer; }
.kp-check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--marke); }
.kp-frage { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 18px 20px; }
.kp-frage-text { flex: 1 1 180px; display: flex; flex-direction: column; gap: 2px; }
.kp-details { padding: 48px 0 24px; display: flex; flex-direction: column; }
.kp-details-titel { font-family: var(--kp-serif); font-size: 1.6rem; margin-bottom: 10px; }
.kp-det { border-top: 1px solid var(--kp-linie); padding-bottom: 6px; }
.kp-det:last-child { border-bottom: 1px solid var(--kp-linie); }
.kp-det summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; font-size: 1.1rem; font-weight: 600; color: var(--text); flex-wrap: wrap;
}
.kp-det summary::-webkit-details-marker { display: none; }
.kp-det summary .unter { font-weight: 400; font-size: .92rem; }
.kp-det > p, .kp-det > .knopf { margin: 0 0 14px; }
.kp-teileliste { list-style: none; margin: 0 0 14px; padding: 0; }
.kp-teileliste li { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--kp-linie-2); }
.kp-leiste { display: none; }
.kp-anlage-kopf { max-width: 760px; }

/* --- Haus in 3D ------------------------------------------------------------------------------------------------ */
.h3d { position: relative; margin: 0; border-radius: 22px; overflow: hidden; background: #e9ece6; aspect-ratio: 660 / 460; user-select: none; -webkit-user-select: none; }
.h3d.kompakt { aspect-ratio: 520 / 330; }
.h3d-buehne { position: absolute; inset: 0; cursor: grab; touch-action: pan-y; display: flex; align-items: center; justify-content: center; }
.h3d-buehne.zieht { cursor: grabbing; }
.h3d-bild { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.h3d-laden { position: absolute; color: var(--kp-text-2, #55595d); font-size: .9rem; }
.h3d-beschriftung {
  position: absolute; left: 14px; top: 14px; display: flex; flex-direction: column; gap: 1px; padding: 8px 12px;
  border-radius: 12px; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 6px rgba(0, 0, 0, .08); max-width: calc(100% - 90px);
}
.h3d-beschriftung b { font-size: .9rem; }
.h3d-beschriftung span { font-size: .8rem; color: #55595d; }
.h3d-kompass {
  position: absolute; right: 14px; top: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .08); display: flex; align-items: center; justify-content: center;
}
.h3d-nadel { display: flex; flex-direction: column; align-items: center; transition: transform .15s ease-out; }
.h3d-n { font-size: 11px; font-weight: 700; line-height: 1; color: var(--marke); }
.h3d-spitze { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 12px solid var(--marke); }
.h3d-steuerung {
  position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 6px;
  border-radius: 16px; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
}
.h3d-knopf {
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: #f1f2f0; color: #1d1d1f; flex: none;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.h3d-zeichen { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.h3d-regler { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.h3d-regler input { flex: 1; min-width: 50px; accent-color: var(--marke); }
.h3d-hilfe { font-size: .8rem; font-weight: 600; color: #3f4347; white-space: nowrap; }

/* --- Handy und Tablet ------------------------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .kp-kopf.mit-bild { grid-template-columns: minmax(0, 1fr); }
  .h3d-hilfe { display: none; }
}
@media (max-width: 760px) {
  .kp { gap: 14px; }
  .kp-naechster, .kp-wichtig, .kp-kopf, .kp-kontakt, .kp-nachrichten, .kp-schritte { padding: 20px; }
  .kp-naechster-titel { font-size: 1.5rem; }
  .kp-kopf-titel { font-size: 1.6rem; }
  .kp-held { padding: 18px 0 26px; gap: 20px; }
  .kp-fakt b { font-size: 1.45rem; }
  .kp-kap { padding: 36px 0; }
  .kp .kp-brief { padding: 20px; margin-bottom: 24px; }
  .kp-brief .kp-avatar.gross { width: 52px; height: 52px; font-size: 1rem; }
  .h3d, .h3d.kompakt { aspect-ratio: 4 / 3.4; border-radius: 18px; }
  .kp-kapitelnav { top: 0; border-radius: 0; margin: 0 -16px 8px; border-left: 0; border-right: 0; }
  .kp-reiter { gap: 16px; }
  .kp-weg .ms { flex-basis: 96px; min-width: 96px; } /* drei je Zeile */
  /* Preis und «Auftrag erteilen» unten stets erreichbar */
  .kp-leiste {
    display: flex; position: sticky; bottom: 0; z-index: 6; align-items: center; gap: 12px; margin: 0 -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--flaeche); border-top: 1px solid var(--kp-linie);
  }
  .kp-leiste > span { display: flex; flex-direction: column; }
  .kp-leiste .knopf { margin-left: auto; }
}
@media (pointer: coarse) {
  .h3d-knopf { width: 46px; height: 46px; }
  .kp-teil, .kp-chip-knopf { min-height: 48px; }
}

/* --- Termine bestätigen und Rechnungen (Schritte 6 und 7) ----------------------------------------------------- */
.kp-termine { display: flex; flex-direction: column; gap: 4px; padding: 24px 26px; }
.kp-termine > h2 { margin-bottom: 6px; }
.kp-termin { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--kp-linie-2); }
.kp-termin:last-of-type { border-bottom: 0; }
.kp-termin-kopf { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.kp-termin-datum { color: var(--kp-text-2); }
.kp-termin .kp-chip { align-self: flex-start; }
.kp-vorschlag { margin: 0; overflow-wrap: anywhere; }
.kp-vorschlag-form { display: flex; flex-direction: column; gap: 8px; }
.kp-vorschlag-form textarea { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; }
.kp-kalender { align-self: flex-start; margin-top: 8px; }
.kp-zahlstand { display: flex; flex-direction: column; gap: 12px; padding: 24px 26px; }
.kp-zahlstand .kp-faktenraster { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); padding: 0; }
.kp-rechnungsliste, .kp-raten { padding: 24px 26px; }
.kp-ratenliste { list-style: none; margin: 8px 0 0; padding: 0; }
.kp-rate {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--kp-linie-2);
}
.kp-rate:last-child { border-bottom: 0; }
.kp-rate-betrag { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 520px) {
  .kp-rate { grid-template-columns: minmax(0, 1fr) auto; }
  .kp-rate .kp-chip { grid-column: 1 / -1; justify-self: start; }
}
