/* Papierlayout und maßgleiche Druckvorschau. */
    .ep-druck {
        font-family: var(--fw-font);
        color: #000;
        background: #fff;
        font-size: 9pt;
        line-height: 1.4;
    }

    .ep-blatt { break-after: page; page-break-after: always; }
    .ep-blatt:last-child { break-after: auto; page-break-after: auto; }

    .ep-blatt-kopf {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        gap: 1rem;
        border-bottom: .5pt solid #000;
        padding-bottom: 2mm;
        margin-bottom: 3mm;
    }
    .ep-blatt-kopf h2 { font-size: 12pt; font-weight: 700; }
    .ep-blatt-kopf .ep-blatt-meta { font-size: 8pt; text-align: right; line-height: 1.5; }

    /* Auf dem großen Planblatt zählt jeder Millimeter — der Kopf schrumpft
       auf eine Zeile. */
    .ep-blatt-kopf--schmal { align-items: baseline; padding-bottom: 1mm; margin-bottom: 2mm; }
    .ep-blatt-kopf--schmal h2 { font-size: 9.5pt; }
    .ep-blatt-kopf--schmal .ep-blatt-meta { font-size: 7pt; line-height: 1.3; white-space: nowrap; }

    /* Der Plan bekommt die Seite, abzüglich Kopf und Fuß — und abzüglich der
       Übersicht daneben, falls sie gedruckt wird. */
    .ep-blattzeile { display: flex; gap: 4mm; align-items: flex-start; }
    .ep-blattmitte { display: flex; justify-content: center; }

    /* Die Übersicht neben dem Plan. Sie ist bewusst eng gesetzt: sie soll
       den Plan lesbar machen, nicht ihn ersetzen. Was nicht mehr hineinpasst,
       steht vollständig auf den Blättern dahinter. */
    .ep-planlegende { font-size: 6.4pt; line-height: 1.35; overflow: hidden; flex: 0 0 auto; }
    .ep-planlegende.ist-quer {
        width: 100%;
        column-count: 3;
        column-gap: 5mm;
        margin-top: 4mm;
    }
    .ep-pl-block { break-inside: avoid; margin-bottom: 2.6mm; }
    .ep-pl-titel {
        font-size: 6.6pt;
        font-weight: 700;
        letter-spacing: .05em;
        text-transform: uppercase;
        border-bottom: .4pt solid #000;
        padding-bottom: .6mm;
        margin-bottom: 1mm;
    }
    .ep-pl-zeile { display: flex; gap: 1.3mm; align-items: baseline; margin-bottom: .7mm; }
    .ep-pl-marke { flex: 0 0 4mm; font-weight: 700; font-style: italic; }
    .ep-pl-sym { flex: 0 0 6mm; text-align: center; align-self: center; }
    .ep-pl-sym svg { height: 3.8mm; width: auto; max-width: 100%; overflow: visible; }
    .ep-pl-punkt {
        display: inline-block;
        width: 2.2mm; height: 2.2mm;
        border-radius: 50%;
        /* Ohne das druckt Chrome die Fläche weiß, und die Farbzuordnung
           zum Plan wäre hin. */
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .ep-pl-grau { color: #444; }
    .ep-pl-fliess { line-height: 1.5; }
    .ep-pl-fuss { font-size: 6pt; color: #444; margin-top: 1.5mm; }

    .ep-druckplan { position: relative; width: 100%; }
    .ep-druckplan img { display: block; width: 100%; height: auto; }
    /* Rahmen und Bemaßungen liegen deckungsgleich über dem Grundriss. */
    .ep-debene {
        position: absolute;
        left: 0; top: 0;
        width: 100%; height: 100%;
        overflow: visible;
        pointer-events: none;
    }
    /* color wird je Symbol gesetzt, wenn nach Stromkreis eingefärbt wird;
       ohne Farbe bleibt es beim Schwarz von hier. */
    .ep-druckplan .ep-dsym {
        position: absolute;
        color: #000;
        transform: translate(-50%, -50%);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .ep-druckplan .ep-dsym svg { display: block; overflow: visible; width: 100%; height: 100%; }

    /* Beschriftung liegt über dem Zeichen, dreht sich aber nicht mit. */
    .ep-druckplan .ep-dbes {
        position: absolute;
        transform: translate(-50%, -50%);
        color: #000;
        line-height: 1;
        pointer-events: none;
    }
    /* Alles haengt unter dem Symbol: darueber ist im Grundriss die Wand, und
       was dort steht, verschwindet im Schwarz. Marke links, Nummer rechts,
       Kuerzel eine Zeile darunter. */
    .ep-druckplan .ep-dbes span { position: absolute; white-space: nowrap; }
    .ep-druckplan .ep-dnr { right: 0; bottom: 0; transform: translate(100%, 100%); font-weight: 700; }
    .ep-druckplan .ep-dsm { left: 0; bottom: 0; transform: translate(-100%, 100%); font-weight: 700; font-style: italic; }
    .ep-druckplan .ep-dkz { left: 50%; bottom: 0; transform: translate(-50%, 100%); font-weight: 600; font-size: .94em; }
    .ep-druckplan .ep-dbes.ist-zweizeilig .ep-dkz { bottom: -1.15em; }
    /* Die Bemerkung als kursive Zeile unter der Beschriftung — ihr Abstand
       nach unten kommt je nach Zeilenzahl darüber aus dem Skript. */
    .ep-druckplan .ep-dbm { left: 50%; bottom: 0; transform: translate(-50%, 100%); font-style: italic; font-size: .85em; }
    /* Seitliche Beschriftung neben senkrecht stehenden Kombinationen: je
       Einheit eine Zeile auf Höhe der Einheit, statt untereinander. */
    .ep-druckplan .ep-dseite { position: absolute; top: 50%; transform: translateY(-50%); display: inline-flex; gap: .35em; align-items: baseline; white-space: nowrap; }
    .ep-druckplan .ep-dseite .ep-dnr,
    .ep-druckplan .ep-dseite .ep-dsm,
    .ep-druckplan .ep-dseite .ep-dbm,
    .ep-druckplan .ep-dseite .ep-dkz { position: static; transform: none; }

    .ep-drucktabelle { width: 100%; border-collapse: collapse; font-size: 8pt; }
    .ep-drucktabelle th,
    .ep-drucktabelle td {
        border: .5pt solid #666;
        padding: 1mm 1.5mm;
        text-align: left;
        vertical-align: top;
    }
    .ep-drucktabelle th { background: #eee; font-weight: 700; }
    .ep-drucktabelle .ep-td-nr { width: 8mm; text-align: right; }
    .ep-drucktabelle .ep-td-sym { width: 14mm; text-align: center; }
    .ep-drucktabelle .ep-td-sym svg { height: 6mm; width: auto; max-width: 100%; overflow: visible; }
    .ep-drucktabelle tr { break-inside: avoid; page-break-inside: avoid; }

    .ep-druck-gruppe {
        font-size: 9pt;
        font-weight: 700;
        margin: 3mm 0 1mm;
        break-after: avoid;
        page-break-after: avoid;
    }
    .ep-druck-h3 { font-size: 10pt; font-weight: 700; margin-bottom: 2mm; }
    .ep-druck-hinweis { font-size: 7.5pt; margin-top: 2mm; }

    /* ── Kombinationsblatt ───────────────────────────────────────────────
       Der Plan zeigt die Batterie von oben, die Baustelle sieht sie von
       vorn. Hier steht sie deshalb als Wandansicht: die oberste Zeile ist
       die oberste Dose. */
    .ep-kombi-raster {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(118mm, 1fr));
        gap: 4mm;
        align-items: start;
    }
    .ep-kombi-karte {
        border: .5pt solid #666;
        border-radius: 1mm;
        padding: 2.5mm 3mm 3mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .ep-kombi-kopf {
        display: flex;
        align-items: baseline;
        gap: 2mm;
        border-bottom: .5pt solid #bbb;
        padding-bottom: 1.5mm;
        margin-bottom: 2.5mm;
    }
    .ep-kombi-marke { font-size: 11pt; font-weight: 700; }
    .ep-kombi-wo { font-size: 8pt; }
    .ep-kombi-dreh { margin-left: auto; font-size: 7.5pt; white-space: nowrap; }
    .ep-kombi-inhalt { display: flex; gap: 3mm; align-items: flex-start; }
    /* Ein waagerechter Rahmen ist breit — er steht über der Tabelle statt
       daneben, sonst wird die Tabelle zur Spalte aus Silben. */
    .ep-kombi-inhalt.ist-quer { flex-direction: column; }
    .ep-kombi-wand { flex: 0 0 auto; text-align: center; align-self: flex-start; }
    .ep-kombi-quer { display: flex; align-items: center; gap: 1.5mm; }
    .ep-kombi-hin { font-size: 7pt; font-weight: 600; letter-spacing: .02em; }
    .ep-kombi-hin--oben { margin-bottom: 1mm; }
    .ep-kombi-hin--unten { margin-top: 1mm; }
    .ep-kombi-rahmen {
        display: inline-flex;
        flex-direction: column;
        gap: 1mm;
        border: 1pt solid #000;
        border-radius: 1.2mm;
        padding: 1.5mm;
    }
    .ep-kombi-rahmen.ist-waagerecht { flex-direction: row; }
    .ep-kombi-dose {
        position: relative;
        width: 19mm;
        height: 17mm;
        border: .5pt solid #888;
        border-radius: .8mm;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .6mm;
    }
    .ep-kombi-dose svg { height: 6.5mm; width: auto; overflow: visible; }
    .ep-kombi-pos {
        position: absolute;
        top: .3mm;
        left: 1mm;
        font-size: 6.5pt;
        font-weight: 700;
    }
    .ep-kombi-dose-nr { font-size: 6.5pt; font-weight: 600; }
    .ep-kombi-blick { font-size: 6.5pt; margin-top: 1.2mm; }
    /* min-width:0 und feste Spaltenbreiten: sonst sprengt die Tabelle als
       Flex-Kind die Karte, statt sich in sie einzufügen. */
    .ep-kombi-tab {
        flex: 1 1 0;
        min-width: 0;
        width: 100%;
        table-layout: fixed;
        font-size: 7.5pt;
    }
    .ep-kombi-tab th, .ep-kombi-tab td { padding: .7mm 1.2mm; overflow-wrap: break-word; }
    .ep-kombi-tab .ep-td-nr { width: 10mm; }
    .ep-kombi-tab .ep-kombi-sp-hoehe { width: 15mm; }
    .ep-kombi-fuss { font-size: 7pt; margin-top: 2mm; }

/* Einheitliches Satzraster, auf dem Bildschirm und beim Drucken identisch. */
.ep-druck {
    --druck-ink: #172c3b;
    --druck-accent: #216666;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9pt;
    line-height: 1.45;
    color: var(--druck-ink);
    background: #fff;
    text-align: left;
}
.ep-druck *, .ep-druck *::before, .ep-druck *::after { box-sizing: border-box; }
.ep-druck h1, .ep-druck h2, .ep-druck h3, .ep-druck p { padding: 0; }
.ep-druck .ep-blatt {
    width: 277mm;
    height: 189mm;
    display: flex;
    flex-direction: column;
    gap: 3mm;
    background: white;
    color: var(--druck-ink);
    box-sizing: content-box;
    overflow: visible;
}
.ep-druck .ep-blatt--hoch { width: 190mm; height: 276mm; }
.ep-druck .ep-blatt-kopf {
    flex: 0 0 22mm;
    min-height: 22mm;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border: 0;
    border-top: 1.1mm solid var(--druck-accent);
    border-bottom: .25mm solid #bdc9cd;
    padding: 3mm 0 2mm;
    margin: 0;
    gap: 8mm;
}
.ep-kopf-links { min-width: 0; flex: 1; }
.ep-druck .ep-druck-kicker { color: var(--druck-accent); font-size: 7.5pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.3; }
.ep-druck .ep-blatt-kopf h2 { font-size: 16pt; line-height: 1.15; font-weight: 700; margin: 1mm 0; letter-spacing: -.025em; }
.ep-druck .ep-kopf-projekt { font-size: 8pt; color: #50626c; }
.ep-druck .ep-blatt-meta { display: flex; flex-direction: column; font-size: 7.5pt; line-height: 1.5; text-align: right; max-width: 65mm; overflow-wrap: anywhere; }
.ep-druck .ep-blatt-meta strong { font-size: 8.5pt; color: var(--druck-accent); }
/* Vermerk „Maßstab geschätzt aus Raumfläche“ (50 druckSchaetzVermerk):
   mitten im Blattkopf, damit er die Höhe des Plans nicht verändert —
   kräftig umrandet, auch im Schwarz-Weiß-Druck gut zu sehen. */
.ep-druck .ep-kopf-schaetz {
    flex: 0 1 60mm;
    min-width: 44mm;
    align-self: center;
    display: flex;
    flex-direction: column;
    padding: .8mm 2mm;
    border: .45mm solid #b3261e;
    border-left-width: 1.5mm;
    border-radius: 1mm;
    background: #fff4f1;
    color: #5a1a10;
    font-size: 6.3pt;
    line-height: 1.25;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.ep-druck .ep-kopf-schaetz strong { font-size: 6.8pt; font-weight: 700; color: #8f1d12; }
.ep-druck .ep-blatt--hoch .ep-kopf-schaetz { flex-basis: 52mm; min-width: 40mm; }
.ep-druck .ep-blatt-inhalt { flex: 1 1 auto; min-height: 0; position: relative; }
.ep-druck .ep-blatt-fuss { flex: 0 0 7mm; display: flex; align-items: center; gap: 5mm; justify-content: space-between; font-size: 7pt; border-top: .25mm solid #bdc9cd; color: #50626c; }
.ep-blatt-fuss > span:first-child { flex: 1; }
.ep-seitennummer { min-width: 27mm; text-align: right; color: #172c3b; white-space: nowrap; }
.ep-druck .ep-plan-daten { display: flex; justify-content: space-between; align-items: center; gap: 3mm; font-size: 8pt; min-height: 7mm; margin-bottom: 2mm; }
.ep-druck .ep-plan-daten strong { font-size: 10pt; }
.ep-druck .ep-planrahmen { border: .25mm solid #cbd4d7; display: flex; align-items: center; justify-content: center; height: 143mm; padding: 3mm; }
.ep-druck .ep-planrahmen.ist-gross { height: 149mm; padding: 1mm; }
.ep-druck .ep-blatt--hoch .ep-planrahmen.ist-gross { height: 236mm; }
.ep-druck .ep-planrahmen.ist-gross + .ep-plan-daten { font-size: 7pt; margin: 0; min-height: 4mm; }
.ep-druck .ep-druckplan { flex: 0 0 auto; }
.ep-druck .ep-druckplan img { max-width: none; }
.ep-druck .ep-druck-intro { font-size: 9pt; line-height: 1.45; color: #50626c; margin: 0 0 4mm; }
.ep-druck .ep-drucktabelle { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 8.5pt; line-height: 1.3; margin: 0; }
.ep-druck .ep-drucktabelle th, .ep-druck .ep-drucktabelle td { border: 0; border-bottom: .2mm solid #d9e0e3; padding: 1.15mm 2.2mm; vertical-align: top; overflow-wrap: anywhere; }
.ep-druck .ep-drucktabelle th { color: #172c3b; background: #eaf0f1; font-size: 7.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; border-top: .25mm solid #adc0c5; border-bottom: .35mm solid #829ba4; }
.ep-druck .ep-drucktabelle tbody tr:nth-child(even):not(.ep-raumzeile) { background: #f7f9fa; }
.ep-druck .ep-drucktabelle .ep-td-nr { font-variant-numeric: tabular-nums; text-align: right; }
.ep-druck .ep-drucktabelle .ep-td-sym svg { display: block; margin: 0 auto; height: 5.2mm; max-width: 12mm; }
.ep-druck .ep-drucktabelle .ep-druck-gruppe { background: #fff; color: var(--druck-accent); border-bottom: .45mm solid var(--druck-accent); font-size: 10pt; padding: 4mm 2mm 1.5mm; }
.ep-druck .ep-druck-gruppe span { float: right; font-size: 8pt; font-weight: 400; color: #50626c; }
.ep-druck .ep-druck-h3, .ep-druck .ep-pl-titel { font-size: 11pt; color: var(--druck-accent); margin: 4mm 0 2mm; padding: 0 0 1.5mm; border-bottom: .35mm solid #95b4b5; text-transform: none; letter-spacing: 0; }
.ep-druck .ep-druck-hinweis, .ep-druck .ep-pl-fuss { font-size: 8pt; color: #50626c; margin: 3mm 0 0; }
.ep-druck .ep-planlegende { font-size: 9pt; overflow: visible; }
.ep-druck .ep-pl-zeile { font-size: 9pt; line-height: 1.5; padding: 1.4mm 0; margin: 0; border-bottom: .2mm solid #e2e8e9; gap: 3mm; }
.ep-druck .ep-pl-marke { flex-basis: 8mm; }
.ep-druck .ep-pl-sym { flex-basis: 10mm; }
.ep-druck .ep-pl-sym svg { height: 5.5mm; }
.ep-druck .ep-uebersicht-zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; }
.ep-druck .ep-kombi-raster { display: block; }
.ep-druck .ep-kombi-karte { margin-bottom: 5mm; border: .25mm solid #b4c5ca; border-radius: 0; padding: 3mm; }
.ep-druck .ep-kombi-inhalt.ist-quer { flex-direction: row; }
.ep-druck .ep-kombi-dose { width: 13mm; height: 14mm; }
.ep-druck .ep-kombi-tab { font-size: 8pt; }
.ep-druck .ep-kombi-tab th, .ep-druck .ep-kombi-tab td { padding: 1.2mm; }
.ep-druck .ep-kombi-tab .ep-td-nr { width: 9mm; }
.ep-druck .ep-kombi-tab .ep-kombi-sp-hoehe { width: 17mm; }
.ep-projektnotiz { font-size: 10pt; line-height: 1.6; margin: 0 0 3mm; white-space: pre-wrap; overflow-wrap: anywhere; }
.ep-druck .ep-cover-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10mm; align-items: center; min-height: 103mm; }
.ep-druck .ep-cover-text h1 { font-size: 29pt; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; margin: 3mm 0; }
.ep-druck .ep-cover-titel { font-size: 19pt; line-height: 1.3; max-width: 135mm; margin: 0 0 6mm; overflow-wrap: anywhere; }
.ep-cover-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm 7mm; }
.ep-cover-feld { min-width: 0; overflow-wrap: anywhere; }
.ep-cover-feld span { display: block; font-size: 7.5pt; color: #50626c; margin-bottom: 1mm; }
.ep-cover-feld strong { font-size: 9pt; font-weight: 600; }
.ep-cover-plan { padding: 4mm; background: #f7f9fa; border: .25mm solid #d9e0e3; display: flex; flex-direction: column; align-items: center; gap: 3mm; }
.ep-cover-plan > span { font-size: 7pt; color: #50626c; }
.ep-cover-zahlen { display: grid; grid-template-columns: repeat(4, 1fr); padding: 4mm 0; border-top: .5mm solid #216666; border-bottom: .25mm solid #bdc9cd; margin: 4mm 0; }
.ep-cover-zahlen > div { display: flex; align-items: baseline; gap: 3mm; padding-left: 5mm; border-left: .25mm solid #bdc9cd; }
.ep-cover-zahlen > div:first-child { border: 0; padding-left: 0; }
.ep-cover-zahlen strong { font-size: 26pt; font-weight: 400; line-height: 1.1; }
.ep-cover-zahlen span { font-size: 9pt; color: #50626c; }
.ep-cover-wegweiser { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8mm; margin-top: 5mm; }
.ep-cover-wegweiser b, .ep-cover-wegweiser span { display: block; font-size: 9pt; }
.ep-cover-wegweiser b { color: #216666; margin-bottom: 1mm; }
.ep-cover-wegweiser span { color: #50626c; font-size: 8pt; }

/* Vorschau bleibt bis zum Schließen bestehen, auch nach Abbruch des Druckdialogs. */
body.ep-druck-offen { overflow: hidden; }
.ep-druck.ep-druck-vorschau { display: block; position: fixed; inset: 0; z-index: 100000; overflow: auto; background: #dce3e7; overscroll-behavior: contain; }
.ep-druck.ep-druck-messen { display: block; position: fixed; left: -20000px; top: 0; width: 297mm; visibility: hidden; }
.ep-druck-vorschau .ep-blatt { margin: 24px auto; padding: 10mm; box-shadow: 0 4px 24px #172c3b20; }
.ep-druck-toolbar { position: sticky; top: 0; z-index: 3; background: #172c3b; color: #fff; padding: 14px 24px; display: flex; align-items: center; gap: 12px; min-width: 320px; font: 14px/1.4 Arial, sans-serif; box-shadow: 0 2px 8px #172c3b30; }
.ep-druck-toolbar > div { flex: 1; }
.ep-druck-toolbar strong { display: block; font-size: 17px; }
.ep-druck-toolbar small { display: block; color: #ccdadd; font-size: 12px; margin-top: 3px; }
.ep-druck-toolbar button { font: 600 14px Arial, sans-serif; cursor: pointer; border: 1px solid #93a8ae; border-radius: 6px; padding: 11px 16px; color: white; background: transparent; white-space: nowrap; }
.ep-druck-toolbar button.ep-druck-start { background: white; border-color: white; color: #172c3b; }
.ep-druck-toolbar button:focus-visible { outline: 3px solid #7bd9d5; outline-offset: 3px; }
.ep-druck-schriftwahl { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #ccdadd; white-space: nowrap; }
.ep-druck-schriftwahl select { font: 14px Arial, sans-serif; padding: 9px 8px; border-radius: 6px; border: 1px solid #93a8ae; max-width: 19rem; }
.ep-druck-ueberlauf { outline: 2px solid #b54b28; }
@media screen and (max-width: 760px) {
    .ep-druck-toolbar { flex-wrap: wrap; padding: 12px 16px; position: sticky; left: 0; }
    .ep-druck-toolbar > div { flex-basis: 100%; }
    .ep-druck-vorschau .ep-blatt { margin-left: 16px; margin-right: 16px; }
}
@media print {
    /* Ränder 0: das Blatt zeichnet seine Ränder selbst (plansatz.css, Teil 55);
       so druckt der Browser keine Kopf-/Fußzeilen, und nichts wird skaliert. */
    @page { size: A4 landscape; margin: 0; }
    @page ephoch { size: A4 portrait; margin: 0; }
    html, body { margin: 0; padding: 0; }
    body.ep-druck-offen { overflow: visible; }
    body > * { display: none !important; }
    body > .ep-druck { display: block !important; position: static !important; overflow: visible !important; background: #fff !important; visibility: visible !important; }
    .ep-druck-toolbar { display: none !important; }
    .ep-druck-ff { display: none !important; }   /* Firefox-Hinweis (Teil 51) nur am Bildschirm */
    /* Druckauswahl (Teil 54): Leiste, Schleier und Leerhinweis nie aufs
       Papier; die Blätter fließen wie früher untereinander. Ein gerade
       messender Kasten bleibt ebenfalls weg. */
    .ep-da-leiste, .ep-da-schleier, .ep-da-leer { display: none !important; }
    body > .ep-druck.ep-druck-messen { display: none !important; }
    .ep-druck .ep-da-rumpf, .ep-druck .ep-da-flaeche, .ep-druck .ep-da-seiten {
        display: block !important; position: static !important; overflow: visible !important;
        height: auto !important; min-height: 0 !important; padding: 0 !important;
    }
    .ep-druck .ep-blatt { margin: 0; padding: 0; box-shadow: none; break-after: page; page-break-after: always; }
    .ep-druck .ep-blatt:last-child { break-after: auto; page-break-after: auto; }
    .ep-druck .ep-blatt--hoch { page: ephoch; }
    .ep-druck, .ep-druck * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.ep-druck .ep-blatt-inhalt > li { font-size: 9pt; margin: 0 0 2mm 5mm; }

.ep-druck .ep-kombi-dose { height: 12mm; }
.ep-druck .ep-kombi-karte { padding: 2mm; margin-bottom: 3mm; }
.ep-druck .ep-kombi-kopf { margin-bottom: 2mm; padding-bottom: 1mm; }
.ep-druck .ep-kombi-fuss { margin: 1mm 0 0; }
.ep-druck .ep-blatt { scroll-margin-top: 85px; }

/* Planseiten geben dem Grundriss die gesamte Fläche zwischen Kopf und Fuß. */
.ep-druck .ep-blatt--plan .ep-blatt-kopf { flex-basis: 16mm; min-height: 16mm; padding-top: 1.5mm; padding-bottom: 1mm; }
.ep-druck .ep-blatt--plan .ep-blatt-kopf h2 { font-size: 13pt; margin: .5mm 0; }
.ep-druck .ep-blatt--plan .ep-druck-kicker { font-size: 6.5pt; }
.ep-druck .ep-blatt--plan .ep-kopf-projekt { font-size: 7pt; }
.ep-druck .ep-planrahmen.ist-gross { height: 153mm; padding: .75mm; }
.ep-druck .ep-blatt--hoch .ep-planrahmen.ist-gross { height: 240mm; }
.ep-druck .ep-planrahmen.ist-gross + .ep-plan-daten { min-height: 5mm; font-size: 6.7pt; }
.ep-druckausschnitt { position: relative; flex: 0 0 auto; overflow: hidden; background: white; }

.ep-druck .ep-kombi-karte { padding: 1.5mm; }
.ep-druck .ep-kombi-kopf { margin-bottom: 1mm; }

.ep-druck-toolbar select { max-width: 230px; min-width: 100px; border: 1px solid #93a8ae; border-radius: 6px; color: white; background: #172c3b; padding: 10px 8px; font: 13px Arial,sans-serif; }
.ep-druck-toolbar .ep-druck-zoom { font-size: 12px; padding: 11px 10px; }
@media screen and (max-width: 1000px) {
    .ep-druck-toolbar { flex-wrap: wrap; }
    .ep-druck-toolbar > div { flex-basis: 100%; }
    .ep-druck-toolbar select { max-width: 100%; }
}
@media print { .ep-druck .ep-blatt { zoom: 1 !important; } }

.ep-druck .ep-stuecktabelle .ep-td-sym svg { height: 4.5mm; }

/* Heller Hof um die Planbeschriftung: Nummern neben der Wand oder über einer
   Maßlinie bleiben auf dem Papier lesbar (Positionen 23–25 an der schwarzen
   Küchenwand im Beispielplan). */
/* Ohne Plansatz (Teil 55) als text-shadow; mit ihm ersetzt plansatz.css den
   Hof durch eine weiße Fläche (Vektor im PDF, F12). */
.ep-druckplan .ep-dbes span {
    text-shadow: 0 0 .12mm #fff, 0 0 .25mm #fff, 0 0 .4mm #fff, 0 0 .55mm #fff;
}

/* Bemerkungen im Plan brechen wie am Bildschirm um, statt in den Nachbarn
   zu laufen (nur unter dem Symbol, nicht in der seitlichen Zeile). */
.ep-druckplan .ep-dbes > .ep-dbm {
    width: max-content;
    max-width: max(100%, 7.5em);
    white-space: normal;
    text-align: center;
    line-height: 1.12;
}

/* Keine einsamen Zeilen am Blattende. Die Blätter selbst teilt
   51-druckvorschau.js nach Messung auf; diese Regeln gelten dort, wo der
   Browser selbst umbricht (Absätze, Listen, Zeilenpaare der Übersicht),
   und kosten kein zusätzliches Blatt. */
.ep-druck p, .ep-druck li { orphans: 3; widows: 3; }
.ep-druck .ep-uebersicht-zeile, .ep-druck .ep-pl-zeile, .ep-druck .ep-pl-block,
.ep-druck .ep-kombi-karte, .ep-druck .ep-drucktabelle tr { break-inside: avoid; page-break-inside: avoid; }
.ep-druck .ep-pl-titel, .ep-druck .ep-druck-h3, .ep-druck .ep-druck-gruppe { break-after: avoid; page-break-after: avoid; }

/* Installationspunkt (Teil 33/50): Zeilen gleicher Höhe nebeneinander,
   getrennte Rahmen mit Spalt. */
.ep-kombi-zeile { display: flex; flex-direction: row; gap: 1mm; justify-content: center; }
.ep-kombi-spalt { height: 3mm; }
.ep-kombi-wand .ep-kombi-rahmen + .ep-kombi-spalt + .ep-kombi-rahmen { margin-top: 0; }

/* Nummer und Marke nicht in die Wand (Teil 50, 25.09.2026): Wand rechts →
   Nummer links, Marke unter das Zeichen; Wand links → Marke unter das Zeichen.
   Nur ohne eigene Lage aus dem Rahmen (innen setzt style="transform…"). */
.ep-druckplan .ep-dbes.ist-wand-rechts .ep-dnr:not([style]) { right: auto; left: 0; transform: translate(-100%, 100%); }
.ep-druckplan .ep-dbes.ist-wand-rechts .ep-dsm:not([style]) { left: auto; right: 0; transform: translate(0, 100%); }
.ep-druckplan .ep-dbes.ist-wand-links .ep-dsm:not([style]) { transform: translate(0, 100%); }

/* Spaltenköpfe brechen nie mitten im Wort (Befund 25.09.2026: „MARKE“ und
   „POSITIONEN“ standen Buchstabe für Buchstabe untereinander). Schmale
   Nummernspalten wachsen dafür mit ihrem Kopf. */
.ep-druck .ep-drucktabelle th { overflow-wrap: normal; word-break: normal; hyphens: none; }
.ep-druck .ep-drucktabelle th.ep-td-nr { white-space: nowrap; }
.ep-druck .ep-drucktabelle th.ep-th-marke, .ep-druck .ep-drucktabelle th.ep-th-anzahl { width: 15mm; }
