/* © 2026 Martin Scherer · Fachwerte (https://www.fachwerte.de) · Alle Rechte vorbehalten.
   Badplaner — Original: https://www.fachwerte.de/tools/badplaner/ · Kennung FWBP-2026-09-23 */

/* ── Farben ─────────────────────────────────────────────────────────── */
:root {
    --bp-akzent: #1f6fd1;
    --bp-akzent-dk: #1557a8;
    --bp-akzent-sf: #eaf2fd;
    --bp-akzent-rand: #b9d3f5;
    --bp-flaeche: var(--fw-bg, #fff);
    --bp-leiste: #f6f7f9;
    --bp-karte: #ffffff;
    --bp-rand: var(--fw-border, #e6e6e3);
    --bp-rand-str: var(--fw-border-str, #d4d4d0);
    --bp-text: var(--fw-text, #111);
    --bp-text-2: var(--fw-text-2, #4a4a48);
    --bp-leise: var(--fw-muted, #85857f);
    --bp-warn-sf: #fff4e6;
    --bp-warn-tx: #8a4b0f;
    --bp-warn-rand: #f3cf9f;
    --bp-rot: #c93434;
    --bp-gruen: #2e8b57;
    --bp-schatten: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --bp-schatten-gross: 0 12px 32px rgba(16, 24, 40, .16);
    --bp-plan-aussen: #eef1f5;
    --bp-3d-grund: linear-gradient(180deg, #e9eef4 0%, #f7f8fa 100%);
    --bp-r: 10px;
    --bp-r-klein: 7px;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bp-akzent: #5a9df5;
        --bp-akzent-dk: #8ab9f8;
        --bp-akzent-sf: #16233a;
        --bp-akzent-rand: #27446e;
        --bp-leiste: #171716;
        --bp-karte: #1f1f1e;
        --bp-warn-sf: #33260f;
        --bp-warn-tx: #f0c98a;
        --bp-warn-rand: #6b4a18;
        --bp-rot: #f07a7a;
        --bp-gruen: #6fd19c;
        --bp-schatten: 0 1px 2px rgba(0, 0, 0, .4);
        --bp-schatten-gross: 0 12px 32px rgba(0, 0, 0, .6);
        --bp-3d-grund: linear-gradient(180deg, #23272d 0%, #1a1c20 100%);
    }
}
:root[data-theme="dark"] {
    --bp-akzent: #5a9df5;
    --bp-akzent-dk: #8ab9f8;
    --bp-akzent-sf: #16233a;
    --bp-akzent-rand: #27446e;
    --bp-leiste: #171716;
    --bp-karte: #1f1f1e;
    --bp-warn-sf: #33260f;
    --bp-warn-tx: #f0c98a;
    --bp-warn-rand: #6b4a18;
    --bp-rot: #f07a7a;
    --bp-gruen: #6fd19c;
    --bp-schatten: 0 1px 2px rgba(0, 0, 0, .4);
    --bp-schatten-gross: 0 12px 32px rgba(0, 0, 0, .6);
    --bp-3d-grund: linear-gradient(180deg, #23272d 0%, #1a1c20 100%);
}

/* ── Rahmen ─────────────────────────────────────────────────────────── */
.bp-app [hidden], .bp-dialog [hidden] { display: none !important; }
.bp-app { max-width: 118rem; margin: 1rem auto 0; padding: 0 1rem; font-family: var(--fw-font); color: var(--bp-text); position: relative; }
@media (min-width: 40rem) { .bp-app { padding: 0 1.5rem; } }
.bp-kasten { border: 1px solid var(--bp-rand); border-radius: 14px; background: var(--bp-flaeche); overflow: hidden; box-shadow: 0 1px 3px rgba(16, 24, 40, .05); }

.bp-app button { font-family: inherit; }
.bp-app svg { flex-shrink: 0; }

/* ── Kopfleiste ─────────────────────────────────────────────────────── */
.bp-kopf { display: flex; align-items: center; gap: .6rem 1rem; padding: .55rem .7rem; border-bottom: 1px solid var(--bp-rand); background: var(--bp-flaeche); flex-wrap: wrap; }
.bp-marke { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem; letter-spacing: -.01em; padding-right: .25rem; }
.bp-schritte { display: flex; gap: .25rem; padding: .22rem; background: var(--bp-leiste); border: 1px solid var(--bp-rand); border-radius: 999px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.bp-schritte::-webkit-scrollbar { display: none; }
.bp-schritte button { display: inline-flex; align-items: center; gap: .42rem; border: 0; background: transparent; color: var(--bp-text-2); padding: .38rem .8rem .38rem .42rem; border-radius: 999px; cursor: pointer; font-size: .84rem; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.bp-schritte button b { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--bp-karte); border: 1px solid var(--bp-rand-str); font-size: .72rem; color: var(--bp-leise); font-weight: 700; }
.bp-schritte button:hover { color: var(--bp-text); background: rgba(127, 127, 127, .08); }
.bp-schritte button[aria-pressed="true"] { background: var(--bp-karte); color: var(--bp-text); box-shadow: var(--bp-schatten); }
.bp-schritte button[aria-pressed="true"] b { background: var(--bp-akzent); border-color: var(--bp-akzent); color: #fff; }
.bp-schritte button.ist-fertig b { border-color: var(--bp-akzent-rand); color: var(--bp-akzent); }
.bp-schritte button.ist-aus:not([aria-pressed="true"]) { opacity: .45; }
.bp-schritte button.ist-aus:not([aria-pressed="true"]) span { text-decoration: line-through; text-decoration-thickness: 1px; }

/* Kopfleiste kompakter bei mittleren Breiten (7 Schritte, 30.09.2026) */
@media (max-width: 100rem) { .bp-marke span { display: none; } .bp-kopf { column-gap: .7rem; } }
@media (max-width: 88rem) and (min-width: 60.01rem) { .bp-schritte button { padding: .36rem .55rem .36rem .36rem; gap: .32rem; font-size: .8rem; } }

.bp-aktionen { display: flex; align-items: center; gap: .3rem; margin-left: auto; flex-wrap: wrap; }
.bp-trenn { width: 1px; height: 1.4rem; background: var(--bp-rand); margin: 0 .2rem; }
.bp-kn { display: inline-flex; align-items: center; justify-content: center; gap: .38rem; min-height: 2.15rem; padding: .3rem .65rem; border: 1px solid var(--bp-rand-str); border-radius: var(--bp-r-klein); background: var(--bp-karte); color: var(--bp-text); font-size: .82rem; font-weight: 500; cursor: pointer; line-height: 1.1; transition: border-color .12s, background .12s; }
.bp-kn:hover { border-color: var(--bp-akzent); }
.bp-kn:disabled { opacity: .45; cursor: default; border-color: var(--bp-rand-str); }
.bp-kn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bp-kn--icon { min-width: 2.15rem; padding: .3rem; }
.bp-kn--primaer { background: var(--bp-akzent); border-color: var(--bp-akzent); color: #fff; }
.bp-kn--primaer:hover { background: var(--bp-akzent-dk); border-color: var(--bp-akzent-dk); }
.bp-kn--rot { color: var(--bp-rot); }
.bp-kn--rot:hover { border-color: var(--bp-rot); }
.bp-kn--voll { width: 100%; }
.bp-kn[aria-pressed="true"] { background: var(--bp-akzent-sf); border-color: var(--bp-akzent); color: var(--bp-akzent); }
@media (max-width: 104rem) { #bp-oeffnen span, #bp-speichern span, #bp-link span { display: none; } #bp-oeffnen, #bp-speichern, #bp-link { min-width: 2.15rem; padding: .3rem; } }
@media (max-width: 88rem) { .bp-aktionen .bp-kn:not(.bp-kn--icon):not(.bp-kn--anl) span { display: none; } .bp-aktionen .bp-kn:not(.bp-kn--anl) { min-width: 2.15rem; padding: .3rem; } }

.bp-beispiel { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem .8rem; background: var(--bp-akzent-sf); border-bottom: 1px solid var(--bp-rand); font-size: .82rem; color: var(--bp-text-2); }
.bp-link-kn { border: 0; background: none; color: var(--bp-akzent); font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.bp-x { border: 0; background: none; font-size: 1.2rem; line-height: 1; color: var(--bp-leise); cursor: pointer; padding: .1rem .3rem; }

/* ── Arbeitsfläche ──────────────────────────────────────────────────── */
.bp-grid { display: grid; grid-template-columns: 21rem minmax(0, 1fr); height: clamp(38rem, 84vh, 76rem); }
.bp-leiste { background: var(--bp-leiste); border-right: 1px solid var(--bp-rand); overflow: auto; min-height: 0; scrollbar-width: thin; }
.bp-leiste-inhalt { padding: .8rem .85rem 1.4rem; }

.bp-buehne { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; background: var(--bp-flaeche); }
.bp-buehne-kopf { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border-bottom: 1px solid var(--bp-rand); min-height: 2.9rem; }
.bp-seg { display: inline-flex; padding: .18rem; gap: .15rem; background: var(--bp-leiste); border: 1px solid var(--bp-rand); border-radius: 9px; }
.bp-seg button { border: 0; background: transparent; padding: .3rem .8rem; border-radius: 6px; font-size: .8rem; font-weight: 600; color: var(--bp-text-2); cursor: pointer; }
.bp-seg button[aria-pressed="true"] { background: var(--bp-karte); color: var(--bp-text); box-shadow: var(--bp-schatten); }
.bp-status { font-size: .78rem; color: var(--bp-leise); flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-status b { color: var(--bp-text-2); font-weight: 600; }
.bp-status .ist-rot { color: var(--bp-rot); font-weight: 600; }

.bp-ansichten { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr; position: relative; }
.bp-ansichten[data-modus="geteilt"] { grid-template-columns: 1fr 1fr; }
.bp-ansichten[data-modus="2d"] .bp-flaeche--3d, .bp-ansichten[data-modus="3d"] .bp-flaeche--2d { display: none; }
.bp-flaeche { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.bp-ansichten[data-modus="geteilt"] .bp-flaeche--3d { border-left: 1px solid var(--bp-rand); }
.bp-flaeche--3d { background: var(--bp-3d-grund); }

/* 2D-Plan: bleibt papierhell, auch im Dunkelmodus */
.bp-plan { background: var(--bp-plan-aussen); touch-action: none; user-select: none; -webkit-user-select: none; }
.bp-plan-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; font-family: var(--fw-font); }
.bp-plan-svg .bp-t { font-family: var(--fw-font); font-variant-numeric: tabular-nums; }
.bp-plan-zoom { position: absolute; right: .6rem; bottom: .6rem; display: flex; flex-direction: column; background: #fff; border: 1px solid #d9dee5; border-radius: 9px; box-shadow: 0 2px 10px rgba(16, 24, 40, .1); overflow: hidden; z-index: 3; }
.bp-plan-zoom button { width: 2.2rem; height: 2.1rem; border: 0; background: #fff; display: grid; place-items: center; cursor: pointer; color: #2a2f36; }
.bp-plan-zoom button + button { border-top: 1px solid #e6e9ee; }
.bp-plan-zoom button:hover { background: #f1f4f8; }
.bp-plan-zoom svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bp-plan-massstab { position: absolute; left: .7rem; bottom: .7rem; display: flex; align-items: center; gap: .4rem; font-size: .7rem; color: #3b434d; background: rgba(255, 255, 255, .85); padding: .2rem .45rem; border-radius: 6px; pointer-events: none; z-index: 2; }
.bp-plan-massstab svg { display: block; }
.bp-plan-hinweis { position: absolute; left: 50%; bottom: .7rem; transform: translateX(-50%); max-width: calc(100% - 9rem); background: rgba(24, 28, 34, .88); color: #fff; font-size: .76rem; padding: .38rem .75rem; border-radius: 999px; pointer-events: none; z-index: 3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-plan-laenge { position: absolute; left: 50%; top: .7rem; transform: translateX(-50%); display: flex; align-items: center; gap: .35rem; background: #fff; border: 1px solid #b9d3f5; box-shadow: 0 4px 16px rgba(16, 24, 40, .14); border-radius: 10px; padding: .3rem .35rem .3rem .7rem; font-size: .8rem; color: #2a2f36; z-index: 4; }
.bp-plan-laenge label { display: flex; align-items: center; gap: .4rem; font-weight: 600; }
.bp-plan-laenge input { width: 5.2rem; font: inherit; font-size: .9rem; padding: .28rem .45rem; border: 1px solid #cfd6df; border-radius: 6px; background: #fff; color: #111; }
.bp-plan-laenge input:focus { outline: 2px solid #1f6fd1; outline-offset: 0; }
.bp-plan-laenge button { border: 0; background: #1f6fd1; color: #fff; border-radius: 6px; padding: .3rem .55rem; cursor: pointer; font-weight: 700; }
.bp-plan-menue { position: absolute; z-index: 6; min-width: 11rem; background: #fff; border: 1px solid #d9dee5; border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 24, 40, .18); padding: .3rem; display: flex; flex-direction: column; }
.bp-plan-menue button { text-align: left; border: 0; background: none; padding: .5rem .65rem; border-radius: 6px; font-size: .84rem; color: #1d242c; cursor: pointer; }
.bp-plan-menue button:hover { background: #eef4fc; }
.bp-plan-menue button.ist-rot { color: #c93434; }
.bp-plan .fw-vtools { background: #fff; border-color: #d9dee5; color: #1d242c; --fw-text: #1d242c; --fw-bg: #fff; --fw-surface-2: #eef2f6; --fw-border-str: #c4ccd6; --fw-border: #e3e7ec; }

/* 3D-Platzhalter */
.bp-3d-platzhalter { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 2rem; color: var(--bp-text-2); }
.bp-3d-platzhalter div { max-width: 22rem; }
.bp-3d-platzhalter svg { width: 5rem; height: 5rem; margin: 0 auto .8rem; display: block; color: var(--bp-akzent); opacity: .85; }
.bp-3d-platzhalter b { display: block; font-size: 1rem; color: var(--bp-text); margin-bottom: .3rem; }
.bp-3d-platzhalter p { margin: 0; font-size: .84rem; line-height: 1.5; }

/* ── Leiste: Bausteine ──────────────────────────────────────────────── */
.bp-panel-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin: .1rem 0 .7rem; }
.bp-panel-kopf h2 { font-size: 1.02rem; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.bp-panel-kopf span { font-size: .74rem; color: var(--bp-leise); }
.bp-karte { background: var(--bp-karte); border: 1px solid var(--bp-rand); border-radius: var(--bp-r); padding: .75rem .8rem; margin: 0 0 .7rem; box-shadow: 0 1px 1px rgba(16, 24, 40, .03); }
.bp-karte--auswahl { border-color: var(--bp-akzent-rand); box-shadow: 0 0 0 3px var(--bp-akzent-sf); }
.bp-karte h3 { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--bp-leise); margin: 0 0 .6rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.bp-karte h3 .bp-x { font-size: 1.1rem; text-transform: none; }
.bp-karte-titel { display: flex; align-items: center; gap: .6rem; margin: 0 0 .7rem; }
.bp-karte-titel .bp-ikon { width: 2.6rem; height: 2.6rem; border-radius: 8px; background: var(--bp-leiste); border: 1px solid var(--bp-rand); display: grid; place-items: center; flex-shrink: 0; color: var(--bp-text); }
.bp-karte-titel .bp-ikon svg { width: 2.1rem; height: 2.1rem; }
.bp-karte-titel b { font-size: .95rem; display: block; }
.bp-karte-titel small { color: var(--bp-leise); font-size: .74rem; }
.bp-karte-titel .bp-x { margin-left: auto; align-self: flex-start; }
.bp-karte details > summary { cursor: pointer; font-size: .78rem; font-weight: 600; color: var(--bp-text-2); padding: .2rem 0; }

.bp-feld { margin: 0 0 .55rem; min-width: 0; }
.bp-feld > label, .bp-lbl { display: block; font-size: .74rem; font-weight: 600; color: var(--bp-text-2); margin: 0 0 .22rem; }
.bp-eingabe { position: relative; display: flex; align-items: center; }
.bp-eingabe input, .bp-select, .bp-text-in { font: inherit; font-size: .88rem; padding: .42rem .55rem; border: 1px solid var(--bp-rand-str); border-radius: var(--bp-r-klein); background: var(--bp-karte); color: var(--bp-text); width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.bp-eingabe input { padding-right: 2.3rem; }
.bp-eingabe .bp-einheit { position: absolute; right: .55rem; font-size: .76rem; color: var(--bp-leise); pointer-events: none; }
.bp-eingabe input:focus, .bp-select:focus, .bp-text-in:focus { outline: 2px solid var(--bp-akzent); outline-offset: 0; border-color: transparent; }
.bp-hinw { display: block; font-size: .72rem; color: var(--bp-leise); margin-top: .22rem; line-height: 1.45; }
.bp-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.bp-drei { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .4rem; }
.bp-zeile { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.bp-zeile > .bp-kn { flex: 1 1 auto; }

/* Umschalt-Chips */
.bp-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.bp-chip { border: 1px solid var(--bp-rand-str); background: var(--bp-karte); color: var(--bp-text-2); padding: .34rem .62rem; border-radius: 999px; font-size: .78rem; font-weight: 600; cursor: pointer; line-height: 1.15; }
.bp-chip:hover { border-color: var(--bp-akzent); color: var(--bp-text); }
.bp-chip[aria-pressed="true"] { background: var(--bp-akzent); border-color: var(--bp-akzent); color: #fff; }
.bp-chips--gross { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .4rem; }
.bp-chips--gross .bp-chip { border-radius: var(--bp-r-klein); padding: .6rem .55rem; font-size: .82rem; text-align: center; }
.bp-chips--gross .bp-chip small { display: block; font-weight: 500; font-size: .7rem; opacity: .8; margin-top: .15rem; }

/* Schalter */
.bp-schalter { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: .82rem; font-weight: 600; color: var(--bp-text-2); cursor: pointer; margin: 0 0 .5rem; }
.bp-schalter input { appearance: none; -webkit-appearance: none; width: 2.3rem; height: 1.3rem; border-radius: 999px; background: var(--bp-rand-str); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; margin: 0; }
.bp-schalter input::after { content: ''; position: absolute; top: .15rem; left: .15rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.bp-schalter input:checked { background: var(--bp-akzent); }
.bp-schalter input:checked::after { transform: translateX(1rem); }
.bp-farbe { width: 100%; height: 2.2rem; padding: .15rem; border: 1px solid var(--bp-rand-str); border-radius: var(--bp-r-klein); background: var(--bp-karte); cursor: pointer; }

/* Formvorlagen */
.bp-formen { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; margin: 0 0 .8rem; }
.bp-form { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .45rem .2rem .35rem; border: 1px solid var(--bp-rand-str); border-radius: var(--bp-r-klein); background: var(--bp-karte); cursor: pointer; font-size: .66rem; font-weight: 600; color: var(--bp-text-2); line-height: 1.1; text-align: center; }
.bp-form svg { width: 2.4rem; height: 2rem; }
.bp-form:hover { border-color: var(--bp-akzent); }
.bp-form[aria-pressed="true"] { border-color: var(--bp-akzent); background: var(--bp-akzent-sf); color: var(--bp-akzent); }

/* Wandliste */
.bp-wandliste { display: flex; flex-direction: column; gap: .3rem; }
.bp-wand { display: grid; grid-template-columns: 1.7rem 1fr 6.2rem; gap: .45rem; align-items: center; padding: .28rem .35rem; border: 1px solid transparent; border-radius: var(--bp-r-klein); cursor: pointer; }
.bp-wand:hover { background: rgba(127, 127, 127, .07); }
.bp-wand.ist-aktiv { border-color: var(--bp-akzent-rand); background: var(--bp-akzent-sf); }
.bp-wand-nr { width: 1.7rem; height: 1.7rem; border-radius: 6px; display: grid; place-items: center; background: #34383f; color: #fff; font-size: .72rem; font-weight: 700; }
.bp-wand-name { font-size: .8rem; font-weight: 600; min-width: 0; }
.bp-wand-name small { display: block; font-weight: 500; color: var(--bp-leise); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-wand .bp-eingabe input { padding: .3rem 1.9rem .3rem .4rem; font-size: .82rem; }

/* Palette */
.bp-gruppe-kopf { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--bp-leise); margin: .9rem 0 .45rem; }
.bp-gruppe-kopf:first-child { margin-top: 0; }
.bp-palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.bp-kachel { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .55rem .25rem .45rem; border: 1px solid var(--bp-rand); border-radius: var(--bp-r); background: var(--bp-karte); cursor: grab; font-size: .7rem; font-weight: 600; color: var(--bp-text-2); line-height: 1.15; text-align: center; touch-action: none; user-select: none; -webkit-user-select: none; transition: border-color .12s, transform .12s, box-shadow .12s; }
.bp-kachel:hover { border-color: var(--bp-akzent); box-shadow: var(--bp-schatten); transform: translateY(-1px); color: var(--bp-text); }
.bp-kachel > span:last-child { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; max-width: 100%; }
.bp-kachel svg { width: 2.8rem; height: 2.8rem; color: var(--bp-text); }
.bp-kachel .bp-kachel-ersatz { width: 2.8rem; height: 2.8rem; border-radius: 8px; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: .7rem; }
.bp-geist { position: fixed; z-index: 1000; pointer-events: none; padding: .45rem .6rem; background: var(--bp-karte); border: 1px solid var(--bp-akzent); border-radius: 10px; box-shadow: var(--bp-schatten-gross); font-size: .78rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; transform: translate(-50%, -120%); color: var(--bp-text); }
.bp-geist svg { width: 1.8rem; height: 1.8rem; }

/* Werkzeugknöpfe (Wände) */
.bp-werkzeuge { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.bp-werkzeug { min-width: 0; display: flex; align-items: center; gap: .45rem; padding: .5rem .5rem; border: 1px solid var(--bp-rand-str); border-radius: var(--bp-r); background: var(--bp-karte); cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--bp-text); text-align: left; line-height: 1.15; }
.bp-werkzeug small { display: block; font-size: .68rem; font-weight: 500; color: var(--bp-leise); }
.bp-werkzeug svg { width: 2rem; height: 2rem; }
.bp-werkzeug:hover { border-color: var(--bp-akzent); }
.bp-werkzeug[aria-pressed="true"] { border-color: var(--bp-akzent); background: var(--bp-akzent-sf); box-shadow: 0 0 0 3px var(--bp-akzent-sf); }

.bp-liste { display: flex; flex-direction: column; gap: .25rem; }
.bp-listen-eintrag { display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem; border: 1px solid var(--bp-rand); border-radius: var(--bp-r-klein); background: var(--bp-karte); cursor: pointer; font-size: .8rem; }
.bp-listen-eintrag:hover { border-color: var(--bp-akzent); }
.bp-listen-eintrag.ist-aktiv { border-color: var(--bp-akzent); background: var(--bp-akzent-sf); }
.bp-listen-eintrag small { margin-left: auto; color: var(--bp-leise); font-size: .72rem; white-space: nowrap; }
.bp-punkt { width: .7rem; height: .7rem; border-radius: 3px; flex-shrink: 0; }

/* Hinweise */
.bp-hinweise { display: flex; flex-direction: column; gap: .35rem; margin: .5rem 0 0; }
.bp-hinweis { font-size: .78rem; line-height: 1.45; padding: .45rem .6rem; border-radius: var(--bp-r-klein); background: var(--bp-akzent-sf); color: var(--bp-text-2); border: 1px solid transparent; }
.bp-hinweis--warn { background: var(--bp-warn-sf); color: var(--bp-warn-tx); border-color: var(--bp-warn-rand); }
.bp-hinweis .bp-kn { margin-top: .45rem; }
.bp-leer { font-size: .82rem; color: var(--bp-leise); line-height: 1.5; margin: .2rem 0 .6rem; }
.bp-kommt { text-align: center; padding: 1.4rem 1rem; }
.bp-kommt svg { width: 3.2rem; height: 3.2rem; color: var(--bp-akzent); margin-bottom: .5rem; }
.bp-kommt b { display: block; margin-bottom: .3rem; }
.bp-kommt p { font-size: .82rem; color: var(--bp-text-2); line-height: 1.5; margin: 0; }
.bp-weiter { margin-top: .9rem; }

/* Toast */
.bp-toast { position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%); z-index: 1200; background: #1d242c; color: #fff; padding: .6rem 1rem; border-radius: 10px; font-size: .84rem; box-shadow: var(--bp-schatten-gross); max-width: min(34rem, calc(100vw - 2rem)); }
.bp-toast.ist-fehler { background: #9c2626; }

/* Dialog */
.bp-dialog { border: 0; border-radius: 16px; padding: 0; max-width: min(40rem, calc(100vw - 1.5rem)); width: 100%; box-shadow: var(--bp-schatten-gross); background: var(--bp-karte); color: var(--bp-text); }
.bp-dialog::backdrop { background: rgba(10, 14, 20, .45); }
.bp-dialog-inhalt { padding: 1.2rem 1.3rem 1rem; }
.bp-dialog h2 { margin: 0 0 .25rem; font-size: 1.15rem; }
.bp-neu-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 1rem 0; }
@media (max-width: 34rem) { .bp-neu-wahl { grid-template-columns: 1fr; } }
.bp-neu-karte { position: relative; display: flex; flex-direction: column; gap: .4rem; padding: .9rem; border: 1.5px solid var(--bp-rand-str); border-radius: 12px; cursor: pointer; }
.bp-neu-karte:has(input:checked) { border-color: var(--bp-akzent); background: var(--bp-akzent-sf); }
.bp-neu-karte > input { position: absolute; top: .8rem; right: .8rem; accent-color: var(--bp-akzent); }
.bp-neu-bild svg { width: 4rem; height: 3rem; color: var(--bp-text); }
.bp-neu-masse { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; }
.bp-neu-masse label { display: grid; grid-template-columns: 5.2rem 1fr auto; align-items: center; gap: .4rem; color: var(--bp-text-2); }
.bp-neu-masse input { font: inherit; padding: .35rem .45rem; border: 1px solid var(--bp-rand-str); border-radius: 6px; width: 100%; background: var(--bp-karte); color: var(--bp-text); }
.bp-dialog-fuss { display: flex; justify-content: flex-end; gap: .5rem; }

/* ── Unter dem Werkzeug ─────────────────────────────────────────────── */
.bp-bericht { max-width: 118rem; margin: 1.2rem auto 0; padding: 0 1rem; scroll-margin-top: 4.5rem; }
@media (min-width: 40rem) { .bp-bericht { padding: 0 1.5rem; } }
.bp-bericht:empty { display: none; }
.bp-bericht.ist-markiert { animation: bp-blitz 1.2s ease-out; }
@keyframes bp-blitz { 0% { box-shadow: 0 0 0 0 var(--bp-akzent-sf); } 30% { box-shadow: 0 0 0 10px var(--bp-akzent-sf); } 100% { box-shadow: 0 0 0 0 transparent; } }
.bp-bericht-ersatz { border: 1px solid var(--bp-rand); border-radius: 14px; padding: 1.2rem 1.4rem; background: var(--bp-karte); }
.bp-bericht-ersatz h2 { margin: 0 0 .8rem; font-size: 1.15rem; }
.bp-bericht-ersatz .bp-blatt-plan { background: #fff; border-radius: 8px; padding: .6rem; text-align: center; }
.bp-bericht-ersatz .bp-blatt-plan svg { max-width: 100%; height: auto; max-height: 70vh; }

.bp-anleitung-wrap { max-width: 72ch; margin: 1.5rem auto 0; padding: 0 1rem; }
.bp-anleitung { border: 1px solid var(--bp-rand); border-radius: 12px; background: var(--bp-karte); scroll-margin-top: 4.5rem; }
.bp-anleitung > summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 700; display: flex; gap: .5rem; align-items: center; }
.bp-anleitung-inhalt { padding: 0 1.2rem 1rem; line-height: 1.65; color: var(--fw-text-2); font-size: .92rem; }

.bp-seo { max-width: 72ch; margin: 0 auto; padding: 2.5rem var(--fw-pad, 1.5rem) 4rem; }
.bp-seo h1 { font-size: clamp(1.5rem, 3.2vw, 2rem); line-height: 1.2; margin: .3rem 0 .8rem; }
.bp-seo p { line-height: 1.7; color: var(--fw-text-2); }
.bp-eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .12em; color: var(--bp-akzent); }
.bp-stand { font-size: .78rem; color: var(--fw-muted); }
.bp-stand a { color: inherit; }

/* ── Vollbild ───────────────────────────────────────────────────────── */
.bp-app:fullscreen { max-width: none; height: 100%; margin: 0; padding: .6rem .8rem; display: flex; flex-direction: column; background: var(--fw-bg); overflow: hidden; }
.bp-app:fullscreen .bp-kasten { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.bp-app:fullscreen .bp-grid { flex: 1 1 auto; min-height: 0; height: auto; }
.bp-app:-webkit-full-screen { max-width: none; width: 100%; height: 100%; margin: 0; padding: .6rem .8rem; display: flex; flex-direction: column; background: var(--fw-bg); }
.bp-app:-webkit-full-screen .bp-kasten { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.bp-app:-webkit-full-screen .bp-grid { flex: 1 1 auto; min-height: 0; height: auto; }

/* ── Mobil ──────────────────────────────────────────────────────────── */
@media (max-width: 60rem) {
    .bp-app { padding: 0; margin-top: .5rem; }
    .bp-kasten { border-left: 0; border-right: 0; border-radius: 0; }
    .bp-kopf { padding: .45rem .5rem; gap: .45rem; }
    .bp-marke { display: none; }
    .bp-schritte { order: 2; flex: 1 1 100%; border-radius: 12px; }
    .bp-schritte button { padding: .36rem .65rem .36rem .36rem; font-size: .8rem; }
    .bp-aktionen { margin-left: 0; width: 100%; justify-content: flex-start; }
    .bp-aktionen .bp-kn--anl span { display: none; }
    .bp-grid { grid-template-columns: minmax(0, 1fr); height: auto; }
    .bp-buehne { order: 1; }
    .bp-leiste { order: 2; border-right: 0; border-top: 1px solid var(--bp-rand); overflow: visible; }
    .bp-ansichten { height: 62vh; min-height: 22rem; }
    .bp-ansichten[data-modus="geteilt"] { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; height: 88vh; }
    .bp-ansichten[data-modus="geteilt"] .bp-flaeche--3d { border-left: 0; border-top: 1px solid var(--bp-rand); }
    .bp-status { display: none; }
    .bp-palette { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .bp-aktionen { order: 3; }
    .bp-plan-hinweis { bottom: 3.2rem; max-width: calc(100% - 1.5rem); white-space: normal; text-align: center; border-radius: 12px; }
}
@media (max-width: 26rem) { .bp-palette { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bp-formen { grid-template-columns: repeat(5, 1fr); gap: .25rem; } .bp-form span { font-size: .6rem; } }

/* ── Druck (Grundgerüst; das Ergebnisblatt bringt eigene Regeln) ────── */
@media print {
    .fw-header, .fw-legal-fallback, .bp-app, .bp-anleitung-wrap, .bp-seo, .fw-skip, noscript { display: none !important; }
    .bp-bericht { display: block !important; margin: 0; padding: 0; max-width: none; }
    .bp-bericht-ersatz { border: 0; padding: 0; }
    .bp-bericht-ersatz .bp-blatt-plan svg { max-height: none; }
}

/* Vorschläge unter Zahlfeldern */
.bp-chips--klein { margin-top: .3rem; gap: .25rem; }
.bp-chips--klein .bp-chip { padding: .2rem .5rem; font-size: .72rem; }

/* ── Anleitung (aufklappbar) und SEO-Teil unter dem Werkzeug ─────────── */
.bp-anleitung-wrap { max-width: 62rem; margin: 1.5rem auto 0; padding: 0 1rem; }
.bp-anleitung { background: var(--fw-bg); border: 1px solid var(--bp-rand); border-radius: 14px; scroll-margin-top: 5.5rem; }
.bp-anleitung > summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "icon title chev" "icon sub chev"; column-gap: .75rem; align-items: center; padding: .85rem 1.1rem; cursor: pointer; border-radius: 14px; font-weight: 400; }
.bp-anleitung > summary::-webkit-details-marker { display: none; }
.bp-anleitung > summary:hover { background: var(--fw-surface); }
.bp-anleitung > summary:focus-visible { outline: 2px solid var(--bp-akzent); outline-offset: 2px; }
.bp-anleitung .anl-icon { grid-area: icon; font-size: 1.35rem; }
.bp-anleitung .anl-title { grid-area: title; font-weight: 700; font-size: 1rem; color: var(--bp-akzent); }
.bp-anleitung .anl-sub { grid-area: sub; font-size: .78rem; color: var(--fw-muted); line-height: 1.45; margin-top: .1rem; }
.bp-anleitung .anl-chevron { grid-area: chev; color: var(--fw-muted); font-size: 1.1rem; transition: transform .2s; }
.bp-anleitung[open] > summary { border-bottom: 1px solid var(--bp-rand); border-radius: 14px 14px 0 0; }
.bp-anleitung[open] .anl-chevron { transform: rotate(180deg); }
.bp-anleitung .anl-body { padding: .4rem clamp(1rem, 3vw, 2.25rem) 1.75rem; }
.bp-anleitung .anl-lead { font-size: .95rem; line-height: 1.65; color: var(--fw-text-2); margin: .8rem 0 1rem; }
.bp-anleitung h3 { font-size: 1.08rem; margin: 1.9rem 0 .5rem; scroll-margin-top: 5.5rem; }
.bp-anleitung p, .bp-anleitung li { font-size: .9rem; line-height: 1.65; color: var(--fw-text-2); }
.bp-anleitung p { margin: 0 0 .7rem; }
.bp-anleitung ul { margin: .3rem 0 .8rem; padding-left: 1.3rem; }
.bp-anleitung li { margin: 0 0 .35rem; }
.bp-anleitung li strong, .bp-anleitung p strong { color: var(--fw-text); }
.bp-anleitung a { color: var(--bp-akzent); }
.bp-anleitung figure { margin: .9rem 0 1.1rem; }
.bp-anleitung figure img { width: 100%; height: auto; border: 1px solid var(--bp-rand); border-radius: 10px; background: #fff; }
.bp-anleitung figcaption { font-size: .78rem; color: var(--fw-muted); margin-top: .35rem; line-height: 1.5; }
.bp-anleitung .anl-kurz { display: grid; gap: .55rem; grid-template-columns: 1fr; margin: .5rem 0 .8rem; }
@media (min-width: 40rem) { .bp-anleitung .anl-kurz { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .bp-anleitung .anl-kurz { grid-template-columns: repeat(4, 1fr); } }
.bp-anleitung .anl-kurz div { background: var(--fw-surface); border: 1px solid var(--bp-rand); border-radius: 12px; padding: .7rem .85rem; font-size: .84rem; line-height: 1.5; color: var(--fw-text-2); }
.bp-anleitung .anl-kurz strong { display: block; color: var(--bp-akzent); margin-bottom: .15rem; }
.bp-anleitung .anl-tabelle { overflow-x: auto; }
.bp-anleitung .anl-tabelle table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: .4rem 0 1rem; }
.bp-anleitung .anl-tabelle th, .bp-anleitung .anl-tabelle td { text-align: left; padding: .4rem .55rem; border-bottom: 1px solid var(--bp-rand); vertical-align: top; line-height: 1.5; }
.bp-anleitung .anl-tabelle th { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fw-muted); background: var(--fw-surface); font-weight: 600; }
.bp-anleitung .anl-tabelle td { color: var(--fw-text-2); }
.bp-anleitung .anl-tabelle td:first-child { font-weight: 600; color: var(--fw-text); width: 14rem; }
@media (max-width: 48rem) {
    .bp-anleitung .anl-tabelle td:first-child { width: auto; }
    .bp-anleitung > summary { grid-template-columns: auto 1fr; grid-template-areas: "icon title" "icon sub"; }
    .bp-anleitung .anl-chevron { display: none; }
}

.bp-seo { max-width: 72ch; margin: 0 auto; padding: 2.5rem var(--fw-pad, 1.5rem) 4rem; }
.bp-seo .bp-seo-lead { font-size: 1.02rem; }
.bp-seo h2 { font-size: 1.22rem; line-height: 1.3; margin: 2.2rem 0 .7rem; }
.bp-seo h3 { font-size: 1rem; margin: 1.3rem 0 .4rem; }
.bp-seo p, .bp-seo li { line-height: 1.7; color: var(--fw-text-2); }
.bp-seo a { color: var(--bp-akzent); }
.bp-seo .bp-kurz { background: var(--bp-akzent-sf); border-radius: 14px; padding: 1rem 1.25rem; margin: 1.2rem 0; }
.bp-seo .bp-kurz strong { color: var(--fw-text); }
.bp-seo .bp-kurz ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.bp-seo .bp-kurz li { margin: 0 0 .3rem; font-size: .92rem; }
.bp-seo .bp-norm { border: 1px solid var(--bp-rand); border-left: 4px solid var(--bp-akzent); border-radius: 12px; padding: .9rem 1.2rem; background: var(--fw-surface); }
.bp-seo .bp-norm ul { margin: 0; padding-left: 1.1rem; }
.bp-seo .bp-norm li { font-size: .88rem; margin: 0 0 .45rem; }
.bp-seo .bp-norm li:last-child { margin-bottom: 0; }
.bp-seo .bp-haftung { margin: 1.6rem 0 0; padding: .9rem 1.2rem; border-radius: 12px; background: var(--bp-warn-sf); border: 1px solid var(--bp-warn-rand); color: var(--bp-warn-tx); font-size: .86rem; line-height: 1.6; }
.bp-seo .bp-haftung strong { color: inherit; }
.bp-seo details.fw-klapp { border-bottom: 1px solid var(--bp-rand); }
.bp-seo details.fw-klapp:first-of-type { border-top: 1px solid var(--bp-rand); }
.bp-seo .fw-klapp > summary { display: flex; align-items: center; gap: .6rem; padding: .75rem .1rem; cursor: pointer; list-style: none; }
.bp-seo .fw-klapp > summary::-webkit-details-marker { display: none; }
.bp-seo .fw-klapp > summary h3 { margin: 0; flex: 1 1 auto; font-size: .98rem; line-height: 1.4; }
.bp-seo .fw-klapp-plus { width: 1.1rem; height: 1.1rem; position: relative; flex-shrink: 0; }
.bp-seo .fw-klapp-plus::before, .bp-seo .fw-klapp-plus::after { content: ''; position: absolute; background: var(--bp-akzent); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.bp-seo .fw-klapp-plus::before { width: 100%; height: 2px; }
.bp-seo .fw-klapp-plus::after { width: 2px; height: 100%; transition: transform .15s; }
.bp-seo details[open] > summary .fw-klapp-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.bp-seo .fw-klapp-inhalt { padding: 0 .1rem .9rem; }
.bp-seo .fw-klapp-inhalt p { margin: 0; font-size: .93rem; }
.bp-seo .autor-box { margin: 2.2rem 0 0; background: var(--fw-surface); border: 1px solid var(--bp-rand); border-radius: 14px; padding: 1.25rem 1.5rem; display: flex; gap: 1.2rem; align-items: flex-start; }
.bp-seo .autor-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.bp-seo .autor-box .ab-name { font-weight: 700; color: var(--fw-text); font-size: .95rem; }
.bp-seo .autor-box .ab-role { font-size: .78rem; color: var(--bp-akzent); font-weight: 600; margin-bottom: .35rem; }
.bp-seo .autor-box p { font-size: .86rem; margin: 0; }
@media (max-width: 560px) { .bp-seo .autor-box { flex-direction: column; } }
.bp-seo .bp-weiter { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .7rem; padding: 0; margin: 1rem 0 0; list-style: none; }
.bp-seo .bp-weiter a { display: block; height: 100%; padding: .8rem 1rem; border: 1px solid var(--bp-rand); border-radius: 12px; text-decoration: none; color: var(--fw-text); font-size: .9rem; font-weight: 600; }
.bp-seo .bp-weiter a:hover { border-color: var(--bp-akzent); }
.bp-seo .bp-weiter span { display: block; font-size: .78rem; color: var(--fw-muted); margin-top: .2rem; font-weight: 400; line-height: 1.5; }
