/* =============================================================================
   cad.css – Zeichenfläche (CAD-Engine) für VIGL CAD
   Herausgelöst aus notes.css (Projekt-Notizen) – Klassennamen unverändert,
   damit cad-engine.js ohne Änderung der Oberfläche läuft.
   ============================================================================= */

.bnotes__tile {
    --bn-accent: #00A586;
    --bn-accent-hover: #00B28c;
    --bn-rule: #e2e2e2;
    --bn-border: #d7d7d7;
    --bn-muted: #8a8a8a;
    --bn-tile: #fcfcfc;
    --bn-head: #fafafa;
    --bn-dark: #111;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12pt;
    color: #333;
}

.bnotes__tile * {
    box-sizing: border-box;
}

.bnotes__tile button {
    font-family: inherit;
    cursor: pointer;
}

.bnotes__tile :focus-visible {
    outline: 2px solid var(--bn-accent);
    outline-offset: 1px;
}

/* Block von Knöpfen, der beim Umbrechen zusammenbleibt */
.bnotes__gruppe {
    position: relative;
    display: flex;
    align-items: center;
    flex: none;
    flex-wrap: nowrap;
    gap: 6px;
}

.bnotes__gruppe + .bnotes__gruppe::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 50%;
    width: 1px;
    height: 20px;
    margin-top: -10px;
    background: var(--bn-rule);
}


/* =============================================================================
   Zeichenfläche
   ============================================================================= */

/* Zeichenkachel: Werkzeugleiste links, Zeichenfläche rechts, Statuszeile
   unten über die ganze Breite */
.bnotes__draw {
    flex: 1 1 0;
    min-height: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    position: relative;
    background: #fff;
}

.bnotes__draw > .bnotes__cad-tabs {
    grid-column: 1 / -1;
    grid-row: 3;
}

/* senkrecht: Blöcke untereinander, bei Platzmangel weitere Spalten;
   die Breite setzt notesDraw.js (werkzeugSpalten) */
.bnotes__draw-tools {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    row-gap: 9px;
    column-gap: 8px;
    min-height: 0;
    overflow: hidden;
    padding: 4px;
    background: #f4f4f4;
    border-right: 1px solid var(--bn-rule);
}

.bnotes__draw > .bnotes__cad {
    grid-column: 2;
    grid-row: 1;
}

.bnotes__draw > .bnotes__cad-status {
    grid-column: 1 / -1;
    grid-row: 2;
}

.bnotes__draw-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    color: #666;
    font-size: 10pt;
    line-height: 1;
}

.bnotes__draw-btn:hover {
    background: #e6e6e6;
    border-color: #ccc;
    color: #111;
}

.bnotes__draw-btn.is-on {
    background: #fff;
    border-color: var(--bn-accent);
    color: var(--bn-accent);
}

.bnotes__draw-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

/* Blöcke der senkrechten Leiste: zwei Knöpfe je Zeile, Trennlinie oben
   (am Spaltenanfang abgeschnitten) */
.bnotes__draw-tools .bnotes__gruppe {
    display: grid;
    grid-template-columns: repeat(2, auto);
    justify-items: center;
    align-items: center;
    gap: 2px;
}

.bnotes__draw-tools .bnotes__gruppe + .bnotes__gruppe::before {
    left: 0;
    top: -5px;
    width: 100%;
    height: 1px;
    margin-top: 0;
    background: #ddd;
}

.bnotes__draw-tools .bnotes__draw-ebene {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 58px;
    padding: 0 1px;
    font-size: 8pt;
}

.bnotes__cad-status .bnotes__gruppe + .bnotes__gruppe::before {
    height: 16px;
    margin-top: -8px;
    background: #ddd;
}


/* Achsen durch den Nullpunkt */
.bnotes__svg .bn-achse {
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.bnotes__svg .bn-achse--x {
    stroke: rgba(210, 60, 42, .55);
}

.bnotes__svg .bn-achse--y {
    stroke: rgba(31, 157, 85, .55);
}

.bnotes__svg .bn-ursprung {
    fill: #fff;
    stroke: rgba(0, 0, 0, .45);
    stroke-width: 1;
}

.bnotes__draw-w {
    font-size: 9pt;
    font-weight: 700;
}

.bnotes__draw-color {
    width: 16px;
    height: 16px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .2);
    outline-offset: 1px;
}

.bnotes__draw-color.is-on {
    outline: 2px solid #111;
}

.bnotes__draw-sep {
    width: 1px;
    height: 16px;
    background: #ddd;
    margin: 0 3px;
    flex-shrink: 0;
}

.bnotes__cad {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

.bnotes__svg {
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    display: block;
    background-color: #fff;
    background-repeat: repeat;
    touch-action: none;
    cursor: crosshair;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
}

.bnotes__svg:focus-visible {
    box-shadow: inset 0 0 0 2px var(--bn-accent);
}

.bnotes__svg.is-cad-cursor {
    cursor: none;
}

.bnotes__svg.is-pan {
    cursor: grab;
}

.bnotes__svg.is-panning {
    cursor: grabbing;
}

.bnotes--ro .bnotes__svg {
    cursor: grab;
}

.bnotes__svg .bn-shape {
    cursor: inherit;
}

.bnotes__svg .bn-sel .bn-vis {
    stroke-dasharray: 7 4;
}

.bnotes__svg .bn-sel .bn-text,
.bnotes__svg .bn-sel .bn-dimtext,
.bnotes__svg .bn-sel .bn-head {
    fill: #2f6fd6;
}

.bnotes__svg .bn-temp {
    opacity: .7;
}

.bnotes__svg .bn-temp .bn-hit {
    display: none;
}

.bnotes__svg .bn-dimtext {
    stroke: #fff;
    stroke-width: 3px;
    stroke-linejoin: round;
    paint-order: stroke;
}

.bnotes__svg .bn-cross {
    fill: none;
    stroke: rgba(20, 20, 20, .38);
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.bnotes__svg .bn-pickbox {
    fill: none;
    stroke: #222;
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.bnotes__svg .bn-grip {
    fill: #2f6fd6;
    stroke: #fff;
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.bnotes__svg .bn-grip.is-hot {
    fill: #d23c2a;
}

/* angedockter Griff: etwas größer, heller Rotton, weicher Hof */
.bnotes__svg .bn-grip.is-hover {
    fill: #ef7a68;
    stroke: #fff;
}

.bnotes__svg .bn-grip-halo {
    fill: rgba(210, 60, 42, .10);
    stroke: rgba(210, 60, 42, .35);
    stroke-width: 1;
}

/* Hof hinter jeder Fangmarke beim Zeichnen und beim Absetzen eines Griffs */
.bnotes__svg .bn-snap-halo {
    fill: rgba(217, 130, 0, .12);
    stroke: none;
}

/* Bezeichnung eines angedockten Griffs */
.bnotes__cad-tip.is-griff {
    border-color: rgba(210, 60, 42, .45);
    color: #7a2317;
}

/* heißer Griff: Linie vom Ausgangspunkt zum Zeiger */
.bnotes__svg .bn-rubber {
    fill: none;
    stroke: #d23c2a;
    stroke-width: 1;
    stroke-dasharray: 4 3;
}

.bnotes__svg .bn-snap {
    fill: none;
    stroke: #d98200;
    stroke-width: 2;
}

.bnotes__svg .bn-win {
    fill: rgba(47, 111, 214, .1);
    stroke: #2f6fd6;
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.bnotes__svg .bn-win--cross {
    fill: rgba(0, 165, 134, .1);
    stroke: var(--bn-accent);
    stroke-dasharray: 5 3;
}

/* Bemaßen: erkannte und gewählte Linien */
.bnotes__svg .bn-hover {
    fill: none;
    stroke: #2f6fd6;
    stroke-width: 6;
    stroke-opacity: .35;
    stroke-linecap: round;
}

.bnotes__svg .bn-picked {
    fill: none;
    stroke: #d98200;
    stroke-width: 5;
    stroke-opacity: .5;
    stroke-linecap: round;
}

/* Mauern */
.bnotes__svg .bn-op-hit {
    cursor: inherit;
}

.bnotes__svg .bn-op.is-opsel .bn-op-hit {
    fill: rgba(47, 111, 214, .14);
}

.bnotes__svg .bn-op.is-opsel .bn-op-vis {
    stroke: #2f6fd6;
}

.bnotes__svg .bn-sel .bn-op-arc {
    stroke-dasharray: 4 3;
}

/* Objektfangspur */
.bnotes__svg .bn-track {
    fill: none;
    stroke: #1f9d55;
    stroke-width: 1;
    stroke-dasharray: 2 4;
}

.bnotes__svg .bn-track-pt {
    fill: none;
    stroke: #1f9d55;
    stroke-width: 1.5;
}

.bnotes__svg .bn-track-x {
    fill: none;
    stroke: #1f9d55;
    stroke-width: 1.5;
}

/* Ebenen: gestrichelt, gesperrt */
.bnotes__svg .bn-gestrichelt .bn-vis {
    stroke-dasharray: 8 4;
}

.bnotes__svg .bn-gesperrt {
    opacity: .5;
}

/* Stutzen und Dehnen: Vorschau beim Überfahren */
.bnotes__svg .bn-stutzen {
    fill: none;
    stroke: #d23c2a;
    stroke-width: 4;
    stroke-opacity: .55;
    stroke-dasharray: 6 4;
}

.bnotes__svg .bn-dehnen {
    fill: none;
    stroke: #1f9d55;
    stroke-width: 2;
    stroke-dasharray: 5 4;
}

/* Ebene in der Werkzeugleiste */
.bnotes__draw-ebene {
    height: 22px;
    max-width: 130px;
    padding: 0 4px;
    border: 1px solid #cfcfcf;
    background: #fff;
    font-family: inherit;
    font-size: 9pt;
    color: #111;
    border-radius: 0;
}

.bnotes__draw-ebene.is-auswahl {
    border-color: #2f6fd6;
    color: #2f6fd6;
}

/* Fenster: Ebenen, Fangarten, Druck */
.bnotes__cad-panel--ebenen {
    width: 340px;
}

.bnotes__ebene {
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 3px 0;
    padding: 2px 3px;
    border: 1px solid transparent;
}

.bnotes__ebene.is-aktiv {
    border-color: var(--bn-accent);
    background: #f3fbf9;
}

.bnotes__ebene.is-aus .bnotes__ebene-name {
    color: #999;
}

.bnotes__ebene-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 3px;
    border: 1px solid transparent;
    background: transparent;
    color: #555;
    font-size: 9pt;
}

.bnotes__ebene-btn:hover {
    border-color: #ccc;
    background: #fff;
}

.bnotes__ebene-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.bnotes__ebene-btn.is-aus {
    color: #b3261e;
}

.bnotes__ebene-btn.is-an {
    color: #c98a00;
}

.bnotes__ebene-akt {
    color: var(--bn-accent);
}

.bnotes__ebene-farbe {
    min-width: 16px;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(0, 0, 0, .25);
}

.bnotes__cad-panel .bnotes__ebene-name {
    flex: 1 1 auto;
    min-width: 0;
    height: 22px;
    padding: 0 4px;
    border: 1px solid #ddd;
    font: inherit;
}

.bnotes__ebene-zahl {
    min-width: 18px;
    color: #999;
    font-size: 8.5pt;
    text-align: right;
}

.bnotes__ebene-strich {
    letter-spacing: -1px;
}

.bnotes__ebene-weg:hover {
    color: #b3261e;
}

.bnotes__cad-panel--druck input[type="text"] {
    width: 140px;
    height: 22px;
    padding: 0 4px;
    border: 1px solid #cfcfcf;
    font: inherit;
    border-radius: 0;
}

.bnotes__cad-panel--druck {
    width: 300px;
}

.bnotes__cad-panel-hint.is-warnung {
    color: #b3261e;
}

.bnotes__cad-fangmenue {
    padding: 0 3px;
    margin-left: -3px;
}

/* Kachel, die sich nicht darstellen ließ */
.bnotes__tile--fehler {
    border-top-color: #c0392b;
}

.bnotes__tile--fehler .bnotes__tile-body {
    color: #b3261e;
    font-size: 10.5pt;
}

/* Zeichenmodul (notesDraw.js) nicht geladen */
.bnotes__cad-fehlt {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: var(--bn-muted);
    font-size: 10.5pt;
    text-align: center;
}

/* Maßstabsleiste unten links */
.bnotes__svg .bn-scale-bg {
    fill: rgba(255, 255, 255, .88);
    stroke: rgba(0, 0, 0, .12);
    stroke-width: 1;
}

.bnotes__svg .bn-scale-dunkel {
    fill: #333;
    stroke: #333;
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.bnotes__svg .bn-scale-hell {
    fill: #fff;
    stroke: #333;
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.bnotes__svg .bn-scale-text {
    fill: #333;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.bnotes__svg .bn-scale-m {
    font-weight: 700;
}

.bnotes__cad-scale {
    height: 20px;
    min-width: 76px;
    padding: 0 2px;
    border: 1px solid transparent;
    background: transparent;
    color: #333;
    font-family: inherit;
    font-size: 8.5pt;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border-radius: 0;
    cursor: pointer;
}

.bnotes__cad-scale:hover,
.bnotes__cad-scale:focus {
    border-color: #ccc;
    background: #fff;
    outline: none;
}

.bnotes__draw-ctx-btn--del {
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.bnotes__draw-ctx-btn--del svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.bnotes__draw-ctx-btn--del:hover {
    color: #b3261e;
    border-color: #b3261e;
}

/* Leiste für Mauer und Öffnung */
/* schwebt über der Zeichnung, damit sie beim Werkzeugwechsel nicht springt */
.bnotes__draw-ctx {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 4;
    max-width: calc(100% - 12px);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 3px 6px;
    background: rgba(251, 251, 251, .96);
    border: 1px solid var(--bn-border);
    box-shadow: 0 1px 6px rgba(0, 0, 0, .1);
    font-size: 9pt;
    color: #555;
    flex-shrink: 0;
}

.bnotes__draw-ctx-op {
    display: contents;
}

.bnotes__draw-ctx-gruppe {
    display: contents;
}

.bnotes__draw-ctx-hinweis {
    color: #888;
    font-size: 8.5pt;
}

.bnotes__draw-ctx-titel {
    font-weight: 700;
    color: #333;
}

.bnotes__draw-ctx-feld {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bnotes__draw-ctx-feld input,
.bnotes__draw-ctx select {
    height: 22px;
    padding: 0 4px;
    border: 1px solid #cfcfcf;
    background: #fff;
    font: inherit;
    color: #111;
    border-radius: 0;
}

.bnotes__draw-ctx-feld input {
    width: 64px;
}

.bnotes__draw-ctx-feld em {
    font-style: normal;
    color: #888;
}

.bnotes__draw-ctx-btn {
    height: 22px;
    padding: 0 7px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 9pt;
    color: #333;
}

.bnotes__draw-ctx-btn:hover {
    border-color: var(--bn-accent);
    color: #111;
}

.bnotes__cad-dxf {
    gap: 3px;
    font-weight: 700;
    letter-spacing: .02em;
}

.bnotes__cad-dxf svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Maß am Zeiger: Länge und Winkel beim Zeichnen */
.bnotes__cad-tip {
    display: none;
    position: absolute;
    z-index: 3;
    padding: 2px 6px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid #c9c9c9;
    font-size: 9.5pt;
    color: #222;
    white-space: nowrap;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}

/* Statuszeile unter der Zeichnung */
.bnotes__cad-status {
    display: flex;
    align-items: center;
    column-gap: 13px;
    row-gap: 2px;
    flex-wrap: wrap;
    overflow: hidden;
    min-height: 26px;
    padding: 2px 4px;
    background: #f4f4f4;
    border-top: 1px solid var(--bn-rule);
    font-size: 9pt;
    color: #555;
    flex-shrink: 0;
}

.bnotes__cad-status .bnotes__gruppe {
    gap: 4px;
}

/* Eingabeblock füllt die Zeile; die Aufforderung kürzt sich mit „…“ */
.bnotes__cad-status .bnotes__gruppe:first-child {
    flex: 1 1 260px;
    min-width: 0;
}

.bnotes__cad-status .bnotes__cad-prompt {
    flex: 1 1 auto;
    min-width: 0;
}

.bnotes__cad-xy {
    min-width: 128px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #333;
}

.bnotes__cad-prompt {
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.bnotes__cad-cmd {
    width: 120px;
    height: 20px;
    padding: 0 5px;
    border: 1px solid #cfcfcf;
    background: #fff;
    font-family: inherit;
    font-size: 9.5pt;
    color: #111;
    border-radius: 0;
}

.bnotes__cad-cmd:focus {
    outline: none;
    border-color: var(--bn-accent);
}

.bnotes__cad-result {
    color: #2f6fd6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.bnotes__cad-gap {
    flex: 1 1 auto;
}

.bnotes__cad-toggle {
    height: 20px;
    padding: 0 5px;
    border: 1px solid transparent;
    background: transparent;
    color: #999;
    font-size: 8pt;
    font-weight: 700;
    letter-spacing: .03em;
}

.bnotes__cad-toggle:hover {
    border-color: #ccc;
    color: #333;
}

.bnotes__cad-toggle.is-on {
    color: var(--bn-accent);
    border-color: var(--bn-accent);
    background: #fff;
}

.bnotes__cad-zbtn,
.bnotes__cad-zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    min-width: 20px;
    padding: 0 3px;
    border: 1px solid transparent;
    background: transparent;
    color: #555;
    font-size: 8.5pt;
    font-variant-numeric: tabular-nums;
}

.bnotes__cad-zoom {
    min-width: 48px;
}

.bnotes__cad-zbtn:hover,
.bnotes__cad-zoom:hover {
    background: #e6e6e6;
    border-color: #ccc;
    color: #111;
}

.bnotes__cad-zbtn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

/* Schmale Kachel: Aufforderung weg, Befehlszeile schmaler */
.bnotes__draw.is-eng .bnotes__cad-prompt,
.bnotes__draw.is-eng .bnotes__cad-result {
    display: none;
}

.bnotes__draw.is-eng .bnotes__cad-xy {
    min-width: 0;
}

.bnotes__draw.is-eng .bnotes__cad-cmd {
    width: 78px;
}

.bnotes__draw.is-eng .bnotes__cad-toggle {
    padding: 0 3px;
    font-size: 7.5pt;
}

.bnotes__draw.is-eng .bnotes__cad-status .bnotes__gruppe:first-child {
    flex-basis: 170px;
}

/* Bemaßungsstil */
.bnotes__cad-panel {
    position: absolute;
    top: 34px;
    right: 6px;
    z-index: 20;
    width: 240px;
    max-width: calc(100% - 12px);
    max-height: calc(100% - 40px);
    overflow-y: auto;
    padding: 8px 10px 10px;
    background: #fff;
    border: 1px solid var(--bn-border);
    border-top: 3px solid var(--bn-accent);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
    font-size: 9.5pt;
    color: #333;
}

.bnotes__cad-panel-head {
    font-weight: 700;
    margin-bottom: 6px;
    color: #111;
}

.bnotes__cad-panel label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 5px 0;
}

.bnotes__cad-panel select,
.bnotes__cad-panel input[type="number"] {
    width: 96px;
    height: 22px;
    padding: 0 4px;
    border: 1px solid #cfcfcf;
    background: #fff;
    font: inherit;
    border-radius: 0;
}

.bnotes__cad-inline {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bnotes__cad-inline input[type="number"] {
    width: 70px;
}

.bnotes__cad-inline em {
    font-style: normal;
    color: #777;
}

.bnotes__cad-panel .bnotes__cad-check {
    justify-content: flex-start;
}

.bnotes__cad-check input {
    margin: 0;
    accent-color: var(--bn-accent);
}

.bnotes__cad-panel-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 5px 6px;
    border: 1px solid #ccc;
    background: #f6f6f6;
    font-size: 9.5pt;
    text-align: left;
}

.bnotes__cad-panel-btn:hover {
    border-color: var(--bn-accent);
    background: #fff;
}

.bnotes__cad-panel-btn--zu {
    text-align: center;
    background: var(--bn-accent);
    border-color: var(--bn-accent);
    color: #fff;
    font-weight: 700;
}

.bnotes__cad-panel-hint {
    margin: 3px 0 0;
    color: #888;
    font-size: 8.5pt;
    line-height: 1.35;
}

.bnotes__tile-body .todo {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 3px;
}

.bnotes__tile-body .todo input {
    width: 14px;
    min-height: 0;
    height: 14px;
    flex: none;
    accent-color: var(--bn-accent);
    transform: translateY(2px);
}

.bnotes__tile-body .todo input:checked+span {
    color: #999;
    text-decoration: line-through;
}

.bnotes__tile-body .todo span {
    flex: 1;
}

/* Nur-Lesen */
.bnotes--ro .bnotes__bar,
.bnotes--ro .bnotes__tabadd,
.bnotes--ro .bnotes__tile-actions,
.bnotes--ro .bnotes__resize,
.bnotes--ro .bnotes__tab-del {
    display: none;
}

.bnotes--ro .bnotes__tile-head {
    cursor: default;
}

/* Zoomknöpfe in der Zeichenfläche (Finger) */
.bnotes__cad-mini {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 3;
    display: none;
    gap: 4px;
}

.bnotes__cad-mini-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--bn-border);
    background: rgba(255, 255, 255, .94);
    color: #333;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}

.bnotes__cad-mini-btn:active {
    background: #eee;
}

.bnotes__cad-mini-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

/* Hinweis auf die Zwei-Finger-Geste */
.bnotes__cad-hint {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);
    max-width: 80%;
    padding: 8px 12px;
    background: rgba(17, 17, 17, .78);
    color: #fff;
    font-size: 10.5pt;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
}

.bnotes__cad-hint.is-on {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .bnotes__cad-hint {
        transition: none;
    }
}



/* =============================================================================
   Zeichnung im dunklen Design (wie AutoCAD)
   Alle Farben laufen über Variablen. .is-hell (beim Drucken der Seite) und
   @media print setzen Papierfarben. Objektfarben am Bildschirm passt
   notesDraw.js an (Schwarz erscheint hell); gedruckt wird die echte Farbe.
   ============================================================================= */

.bnotes__draw {
    --cad-bg: #1f242b;            /* Zeichenfläche – gleich GRUND_DUNKEL in notesDraw.js */
    --cad-leiste: #2b3139;        /* Werkzeugleiste, Statuszeile, Fenster */
    --cad-feld: #1a1e24;          /* Eingabefelder */
    --cad-hover: #3a414b;
    --cad-linie: #454c56;
    --cad-text: #dfe3e8;
    --cad-leise: #9aa2ac;
    --cad-akzent: #22c7a6;
    --cad-akzent-grund: rgba(34, 199, 166, .16);
    --cad-kreuz: rgba(255, 255, 255, .5);
    --cad-auswahl: #5c9dff;
    background: var(--cad-bg);
    color: var(--cad-text);
    color-scheme: dark;
}

.bnotes__draw.is-hell {
    --cad-bg: #ffffff;
    --cad-leiste: #f4f4f4;
    --cad-feld: #ffffff;
    --cad-hover: #e6e6e6;
    --cad-linie: #d4d4d4;
    --cad-text: #222222;
    --cad-leise: #666666;
    --cad-akzent: #00a586;
    --cad-akzent-grund: #ffffff;
    --cad-kreuz: rgba(20, 20, 20, .38);
    --cad-auswahl: #2f6fd6;
    color-scheme: light;
}

/* Kopf der Zeichenkachel ebenfalls dunkel */
.bnotes__tile--draw {
    background: #1f242b;
    border-color: #3a414b;
}

.bnotes__tile--draw .bnotes__tile-head {
    background: #262b32;
    border-bottom-color: #3a414b;
    color: #dfe3e8;
}

.bnotes__tile--draw .bnotes__tile-title {
    color: #dfe3e8;
}

.bnotes__tile--draw .bnotes__tile-btn {
    color: #aab2bc;
}

.bnotes__tile--draw .bnotes__tile-btn:hover {
    color: #fff;
    background: #3a414b;
}

.bnotes__tile--draw .bnotes__resize {
    background: repeating-linear-gradient(135deg, #6b737d 0 1px, transparent 1px 4px);
}

/* ---- Werkzeugleiste ---- */

.bnotes__draw .bnotes__draw-tools {
    padding: 6px;
    row-gap: 11px;
    column-gap: 10px;
    background: var(--cad-leiste);
    border-right: 1px solid var(--cad-linie);
}

/* feste Spaltenbreite in allen Blöcken – so fluchten die Knöpfe untereinander */
.bnotes__draw .bnotes__draw-tools .bnotes__gruppe {
    grid-template-columns: repeat(2, 28px);
    grid-auto-rows: 28px;
    gap: 3px;
}

.bnotes__draw .bnotes__draw-tools .bnotes__gruppe + .bnotes__gruppe::before {
    top: -6px;
    background: var(--cad-linie);
}

.bnotes__draw .bnotes__draw-btn {
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: var(--cad-text);
    font-size: 10.5pt;
}

.bnotes__draw .bnotes__draw-btn svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.7;
}

.bnotes__draw .bnotes__draw-btn:hover {
    background: var(--cad-hover);
    border-color: var(--cad-linie);
    color: #fff;
}

.bnotes__draw.is-hell .bnotes__draw-btn:hover {
    color: #111;
}

.bnotes__draw .bnotes__draw-btn.is-on {
    background: var(--cad-akzent-grund);
    border-color: var(--cad-akzent);
    color: var(--cad-akzent);
}

.bnotes__draw .bnotes__draw-btn:focus-visible {
    outline: 2px solid var(--cad-akzent);
    outline-offset: 1px;
}

.bnotes__draw .bnotes__draw-w {
    font-size: 10pt;
}

.bnotes__draw .bnotes__draw-color {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 3px;
}

.bnotes__draw.is-hell .bnotes__draw-color {
    border-color: rgba(0, 0, 0, .2);
}

.bnotes__draw .bnotes__draw-color:hover {
    border-color: #fff;
}

.bnotes__draw .bnotes__draw-color.is-on {
    outline: 2px solid var(--cad-text);
    outline-offset: 2px;
}

/* zu wenig Höhe für zwei Spalten: einspaltig mit dünner Rollleiste */
.bnotes__draw .bnotes__draw-tools.is-rollen {
    flex-wrap: nowrap;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--cad-linie) transparent;
}

.bnotes__draw .bnotes__draw-tools.is-rollen .bnotes__gruppe {
    flex: none;
}

.bnotes__draw .bnotes__draw-tools.is-rollen::-webkit-scrollbar {
    width: 6px;
}

.bnotes__draw .bnotes__draw-tools.is-rollen::-webkit-scrollbar-thumb {
    background: var(--cad-linie);
    border-radius: 3px;
}

/* ---- Ebene: Knopf und Liste ---- */

.bnotes__draw .bnotes__draw-tools .bnotes__draw-ebene {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 5px;
    width: 59px;
    max-width: none;
    height: 28px;
    padding: 0 5px;
    border: 1px solid var(--cad-linie);
    border-radius: 3px;
    background: var(--cad-feld);
    color: var(--cad-text);
    font: inherit;
    font-size: 8.5pt;
    text-align: left;
    cursor: pointer;
}

.bnotes__draw .bnotes__draw-ebene:hover {
    border-color: var(--cad-leise);
}

.bnotes__draw .bnotes__draw-ebene.is-auswahl {
    border-color: var(--cad-auswahl);
}

.bnotes__draw-ebene-farbe {
    flex: none;
    width: 10px;
    height: 10px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 2px;
}

.bnotes__draw-ebene-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bnotes__ebenen-menue {
    position: absolute;
    z-index: 30;
    min-width: 190px;
    max-height: calc(100% - 8px);
    overflow-y: auto;
    padding: 4px;
    background: var(--cad-leiste);
    border: 1px solid var(--cad-linie);
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

.bnotes__ebenen-eintrag {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--cad-text);
    font: inherit;
    font-size: 9.5pt;
    text-align: left;
    cursor: pointer;
}

.bnotes__ebenen-eintrag span {
    flex: 1 1 auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bnotes__ebenen-eintrag:hover,
.bnotes__ebenen-eintrag:focus-visible {
    background: var(--cad-hover);
    outline: none;
}

.bnotes__ebenen-eintrag.is-on {
    background: var(--cad-akzent-grund);
    color: var(--cad-akzent);
}

.bnotes__ebenen-eintrag.is-aus span {
    color: var(--cad-leise);
}

.bnotes__ebenen-eintrag em,
.bnotes__ebenen-eintrag svg {
    display: flex;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    color: var(--cad-leise);
}

.bnotes__ebenen-verwalten {
    margin-top: 4px;
    border-top: 1px solid var(--cad-linie);
    border-radius: 0 0 3px 3px;
    color: var(--cad-leise);
}

/* ---- Auswahlfelder einheitlich: flach, eigener Pfeil ---- */

.bnotes__draw select {
    -webkit-appearance: none;
    appearance: none;
    height: 26px;
    padding: 0 24px 0 8px;
    border: 1px solid var(--cad-linie);
    border-radius: 3px;
    background-color: var(--cad-feld);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239aa2ac' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px 7px;
    color: var(--cad-text);
    font: inherit;
    font-size: 9pt;
    cursor: pointer;
}

.bnotes__draw select:hover {
    border-color: var(--cad-leise);
}

.bnotes__draw select:focus,
.bnotes__draw input:focus {
    outline: none;
    border-color: var(--cad-akzent);
    box-shadow: 0 0 0 2px var(--cad-akzent-grund);
}

.bnotes__draw select option {
    background: var(--cad-feld);
    color: var(--cad-text);
}

.bnotes__draw input[type="text"],
.bnotes__draw input[type="number"],
.bnotes__draw .bnotes__cad-cmd {
    border: 1px solid var(--cad-linie);
    border-radius: 3px;
    background: var(--cad-feld);
    color: var(--cad-text);
}

/* ---- Statuszeile ---- */

.bnotes__draw .bnotes__cad-status {
    min-height: 30px;
    padding: 2px 6px;
    background: var(--cad-leiste);
    border-top: 1px solid var(--cad-linie);
    color: var(--cad-leise);
}

.bnotes__draw .bnotes__cad-status .bnotes__gruppe + .bnotes__gruppe::before {
    background: var(--cad-linie);
}

.bnotes__draw .bnotes__cad-xy {
    color: var(--cad-text);
}

.bnotes__draw .bnotes__cad-prompt,
.bnotes__draw .bnotes__cad-result {
    color: var(--cad-leise);
}

.bnotes__draw .bnotes__cad-cmd {
    height: 22px;
}

.bnotes__draw .bnotes__cad-status .bnotes__gruppe:first-child {
    flex-basis: 230px;
}

.bnotes__draw .bnotes__cad-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 22px;
    border-radius: 3px;
    color: var(--cad-leise);
    border-color: transparent;
    background: transparent;
}

.bnotes__draw .bnotes__cad-toggle:hover {
    background: var(--cad-hover);
    color: var(--cad-text);
}

.bnotes__draw .bnotes__cad-toggle.is-on {
    border-color: var(--cad-akzent);
    background: var(--cad-akzent-grund);
    color: var(--cad-akzent);
}

.bnotes__draw .bnotes__cad-zbtn,
.bnotes__draw .bnotes__cad-zoom {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    color: var(--cad-text);
}

.bnotes__draw .bnotes__cad-zoom {
    width: auto;
}

.bnotes__draw .bnotes__cad-zbtn svg {
    width: 16px;
    height: 16px;
}

.bnotes__draw .bnotes__cad-zbtn:hover,
.bnotes__draw .bnotes__cad-zoom:hover {
    background: var(--cad-hover);
    border-color: var(--cad-linie);
    color: #fff;
}

.bnotes__draw.is-hell .bnotes__cad-zbtn:hover {
    color: #111;
}

/* Maßstab in der Statuszeile: kompakt, fett */
.bnotes__draw .bnotes__cad-scale {
    height: 22px;
    min-width: 80px;
    padding-left: 6px;
    padding-right: 20px;
    background-position: right 6px center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ---- Eigenschaftsleiste, Fenster, Zeiger-Beschriftung ---- */

.bnotes__draw .bnotes__draw-ctx-btn--del {
    border-color: var(--cad-linie);
    border-radius: 3px;
    background: var(--cad-feld);
    color: var(--cad-leise);
}

.bnotes__draw .bnotes__draw-ctx-btn--del:hover {
    border-color: #d9604d;
    background: rgba(217, 96, 77, .15);
    color: #ff8a78;
}

.bnotes__draw .bnotes__draw-ctx {
    background: rgba(43, 49, 57, .97);
    border: 1px solid var(--cad-linie);
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
    color: var(--cad-text);
}

.bnotes__draw.is-hell .bnotes__draw-ctx {
    background: rgba(251, 251, 251, .96);
}

.bnotes__draw .bnotes__draw-ctx-titel,
.bnotes__draw .bnotes__draw-ctx-feld em,
.bnotes__draw .bnotes__draw-ctx-hinweis {
    color: var(--cad-leise);
}

.bnotes__draw .bnotes__draw-ctx-btn {
    border-radius: 3px;
    color: var(--cad-text);
}

.bnotes__draw .bnotes__draw-ctx-btn:hover {
    background: var(--cad-hover);
}

.bnotes__draw .bnotes__cad-panel {
    background: var(--cad-leiste);
    border: 1px solid var(--cad-linie);
    border-top: 3px solid var(--cad-akzent);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    color: var(--cad-text);
}

.bnotes__draw .bnotes__cad-panel-head {
    color: var(--cad-text);
}

.bnotes__draw .bnotes__cad-panel-hint {
    color: var(--cad-leise);
}

.bnotes__draw .bnotes__cad-panel-btn {
    border: 1px solid var(--cad-linie);
    border-radius: 3px;
    background: var(--cad-feld);
    color: var(--cad-text);
}

.bnotes__draw .bnotes__cad-panel-btn:hover {
    background: var(--cad-hover);
}

.bnotes__draw .bnotes__cad-panel-btn--zu {
    background: var(--cad-akzent);
    border-color: var(--cad-akzent);
    color: #0d1f1b;
}

.bnotes__draw .bnotes__ebene.is-aktiv {
    background: var(--cad-akzent-grund);
    border-color: var(--cad-akzent);
}

.bnotes__draw .bnotes__ebene-btn {
    color: var(--cad-leise);
}

.bnotes__draw .bnotes__ebene-btn:hover {
    background: var(--cad-hover);
    border-color: var(--cad-linie);
    color: var(--cad-text);
}

.bnotes__draw .bnotes__cad-panel .bnotes__ebene-name {
    border-color: var(--cad-linie);
    background: var(--cad-feld);
    color: var(--cad-text);
}

.bnotes__draw .bnotes__cad-tip {
    background: rgba(18, 21, 25, .94);
    border-color: var(--cad-linie);
    border-radius: 3px;
    color: var(--cad-text);
}

.bnotes__draw.is-hell .bnotes__cad-tip {
    background: rgba(255, 255, 255, .94);
}

.bnotes__draw .bnotes__cad-tip.is-griff {
    border-color: rgba(239, 122, 104, .6);
    color: #ffb4a8;
}

.bnotes__draw .bnotes__cad-hint {
    background: rgba(18, 21, 25, .9);
    color: var(--cad-text);
}

.bnotes__draw .bnotes__cad-mini-btn {
    border-color: var(--cad-linie);
    background: rgba(43, 49, 57, .95);
    color: var(--cad-text);
}

/* ---- Zeichenfläche ---- */

.bnotes__draw .bnotes__svg {
    background-color: var(--cad-bg);
}

.bnotes__draw .bnotes__svg .bn-cross {
    stroke: var(--cad-kreuz);
}

.bnotes__draw .bnotes__svg .bn-pickbox {
    stroke: var(--cad-text);
}

.bnotes__draw .bnotes__svg .bn-dimtext {
    stroke: var(--cad-bg);
}

.bnotes__draw .bnotes__svg .bn-sel .bn-text,
.bnotes__draw .bnotes__svg .bn-sel .bn-dimtext,
.bnotes__draw .bnotes__svg .bn-sel .bn-head {
    fill: var(--cad-auswahl);
}

.bnotes__draw .bnotes__svg .bn-grip {
    fill: #3d86ff;
    stroke: var(--cad-bg);
}

.bnotes__draw .bnotes__svg .bn-grip.is-hover {
    stroke: var(--cad-bg);
}

.bnotes__draw .bnotes__svg .bn-hover {
    stroke: #5c9dff;
    stroke-opacity: .5;
}

.bnotes__draw .bnotes__svg .bn-scale-bg {
    fill: rgba(26, 30, 36, .88);
    stroke: rgba(255, 255, 255, .14);
}

.bnotes__draw .bnotes__svg .bn-scale-dunkel {
    fill: var(--cad-text);
    stroke: var(--cad-text);
}

.bnotes__draw .bnotes__svg .bn-scale-hell {
    fill: var(--cad-bg);
    stroke: var(--cad-text);
}

.bnotes__draw .bnotes__svg .bn-scale-text {
    fill: var(--cad-text);
}

.bnotes__draw.is-hell .bnotes__svg .bn-scale-bg {
    fill: rgba(255, 255, 255, .88);
    stroke: rgba(0, 0, 0, .12);
}

.bnotes__draw .bnotes__svg .bn-achse--x {
    stroke: rgba(255, 96, 76, .6);
}

.bnotes__draw .bnotes__svg .bn-achse--y {
    stroke: rgba(76, 214, 128, .6);
}

.bnotes__draw .bnotes__svg .bn-ursprung {
    fill: var(--cad-bg);
    stroke: var(--cad-text);
}

/* Finger: größere Knöpfe, gleiche Ausrichtung */
@media (pointer: coarse) {
    .bnotes__draw .bnotes__draw-tools .bnotes__gruppe {
        grid-template-columns: repeat(2, 34px);
        grid-auto-rows: 34px;
    }

    .bnotes__draw .bnotes__draw-btn {
        width: 34px;
        height: 34px;
    }

    .bnotes__draw .bnotes__draw-color {
        width: 24px;
        height: 24px;
    }

    .bnotes__draw .bnotes__draw-tools .bnotes__draw-ebene {
        width: 71px;
        height: 34px;
    }
}

/* Drucken der Notizseite: Papierfarben (notesDraw.js zeichnet zusätzlich mit
   echten Objektfarben neu) */
@media print {
    .bnotes__tile--draw,
    .bnotes__tile--draw .bnotes__tile-head {
        background: #fff;
        border-color: #ccc;
        color: #111;
    }

    .bnotes__tile--draw .bnotes__tile-title {
        color: #111;
    }

    .bnotes__draw {
        --cad-bg: #ffffff;
        --cad-text: #222222;
        --cad-linie: #d4d4d4;
        background: #fff;
        color-scheme: light;
    }

    .bnotes__draw .bnotes__svg .bn-achsen {
        display: none;
    }

    .bnotes__ebenen-menue {
        display: none !important;
    }
}




/* =============================================================================
   VIGL CAD – Ergänzungen: Druck-, Import/Export-Fenster
   ============================================================================= */

.bnotes__cad-panel--druck {
    width: 360px;
}

.bnotes__cad-panel--io {
    width: 320px;
}

.bnotes__cad-panel--druck input[type="text"],
.bnotes__draw .bnotes__cad-panel input[type="text"] {
    width: 170px;
    height: 24px;
    padding: 0 5px;
    border: 1px solid var(--cad-linie, #cfcfcf);
    background: var(--cad-feld, #fff);
    color: var(--cad-text, #111);
    font: inherit;
    border-radius: 3px;
}

.bnotes__draw .bnotes__cad-panel select,
.bnotes__draw .bnotes__cad-panel input[type="number"] {
    width: 170px;
    height: 24px;
    border: 1px solid var(--cad-linie);
    background: var(--cad-feld);
    color: var(--cad-text);
    border-radius: 3px;
}

.bnotes__draw .bnotes__cad-panel .bnotes__cad-inline input[type="number"] {
    width: 62px;
}

.bnotes__draw .bnotes__cad-panel .bnotes__cad-raender input[type="number"] {
    width: 38px;
    padding: 0 2px;
}

.bnotes__cad-panel label > span:first-child {
    flex: 0 0 auto;
    color: var(--cad-leise, #666);
}

.bnotes__cad-panel-abschnitt {
    margin: 10px 0 4px;
    padding-top: 6px;
    border-top: 1px solid var(--cad-linie, #ddd);
    font-weight: 700;
    font-size: 9pt;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--cad-leise, #777);
}

.bnotes__cad-panel-zeile {
    margin: 2px 0 4px;
    text-align: right;
}

.bnotes__cad-panel-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--cad-akzent, #00a586);
    font: inherit;
    font-size: 9pt;
    text-decoration: underline;
    cursor: pointer;
}

.bnotes__cad-panel-knoepfe {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 4px;
}

.bnotes__cad-panel-knoepfe .bnotes__cad-panel-btn {
    margin-top: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
}

.bnotes__draw .bnotes__cad-panel .bnotes__cad-dpi {
    width: auto;
    height: 20px;
    padding: 0 2px;
    font-size: 8pt;
}

.bnotes__cad-frei[style*="none"] {
    display: none;
}


/* =============================================================================
   Layouts – Papierbereich mit Ansichtsfenstern
   ============================================================================= */

.bnotes__draw-tools--layout,
.bnotes__cad-status--layout {
    display: none;
}

.bnotes__draw.is-layout > .bnotes__draw-tools:not(.bnotes__draw-tools--layout),
.bnotes__draw.is-layout > .bnotes__cad-status:not(.bnotes__cad-status--layout),
.bnotes__draw.is-layout .bnotes__draw-ctx,
.bnotes__draw.is-layout .bnotes__cad-tip {
    display: none !important;
}

.bnotes__draw.is-layout > .bnotes__draw-tools--layout {
    display: flex;
    width: auto;
}

.bnotes__draw.is-layout > .bnotes__cad-status--layout {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
}

.bnotes__draw.is-layout > .bnotes__cad-status--layout {
    flex-wrap: nowrap;
}

.bnotes__cad-status--layout .bnotes__cad-prompt--layout {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

.bnotes__cad-status--layout .bnotes__cad-xy {
    min-width: 150px;
}

.bnotes__cad-status--layout .bnotes__cad-scale {
    min-width: 90px;
}

.bnotes__draw .bnotes__cad-status--layout .bnotes__cad-scale:disabled {
    opacity: .5;
    cursor: default;
}

.bnotes__layout {
    cursor: default;
}

.bnotes__layout.is-pan { cursor: grab; }
.bnotes__layout.is-panning { cursor: grabbing; }

.bnotes__layout .bn-blatt-schatten {
    fill: rgba(0, 0, 0, .45);
}

.bnotes__layout .bn-blatt-papier {
    fill: #fff;
    stroke: #9aa2ac;
    stroke-width: 1;
}

.bnotes__layout .bn-fenster {
    fill: transparent;
    stroke: #8a94a0;
    stroke-width: 1;
    stroke-dasharray: 5 4;
    shape-rendering: crispEdges;
}

.bnotes__layout .bn-fenster--druck {
    stroke: #333;
    stroke-dasharray: none;
}

.bnotes__layout .bn-fenster.is-sel {
    stroke: var(--cad-auswahl, #2f6fd6);
    stroke-width: 2;
    stroke-dasharray: none;
}

.bnotes__layout .bn-fenster.is-inhalt {
    stroke: var(--cad-akzent, #22c7a6);
}

.bnotes__layout .bn-fenster-text {
    fill: #8a94a0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    pointer-events: none;
}

.bnotes__layout .bn-grip {
    fill: var(--cad-auswahl, #2f6fd6);
    stroke: #fff;
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.bnotes__layout .bn-win {
    fill: rgba(47, 111, 214, .1);
    stroke: #2f6fd6;
    stroke-width: 1;
}

.bnotes__layout .bn-dimtext {
    stroke: #fff;
    stroke-width: 3px;
    stroke-linejoin: round;
    paint-order: stroke;
}

.bnotes__layout .bn-gestrichelt .bn-vis {
    stroke-dasharray: 8 4;
}

/* Reiter: Modell | Layout 1 | Layout 2 | + */
.bnotes__cad-tabs {
    display: flex;
    align-items: stretch;
    gap: 2px;
    min-height: 28px;
    padding: 0 6px;
    background: var(--cad-leiste, #f4f4f4);
    border-top: 1px solid var(--cad-linie, #ddd);
    overflow-x: auto;
    scrollbar-width: thin;
}

.bnotes__cad-tab {
    flex: none;
    min-width: 60px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 0 0 4px 4px;
    background: transparent;
    color: var(--cad-leise, #666);
    font: inherit;
    font-size: 9pt;
    white-space: nowrap;
}

.bnotes__cad-tab:hover {
    background: var(--cad-hover, #e6e6e6);
    color: var(--cad-text, #111);
}

.bnotes__cad-tab.is-on {
    background: var(--cad-bg, #fff);
    border-color: var(--cad-linie, #ddd);
    color: var(--cad-akzent, #00a586);
    font-weight: 700;
}

.bnotes__cad-tab--plus,
.bnotes__cad-tab--mehr {
    min-width: 30px;
    padding: 0 8px;
    font-size: 12pt;
    line-height: 1;
}

.bnotes__cad-tab-info {
    margin-left: auto;
    align-self: center;
    padding-left: 10px;
    color: var(--cad-leise, #777);
    font-size: 8.5pt;
    white-space: nowrap;
}

.bnotes__cad-layoutmenue {
    top: auto;
    bottom: 36px;
    right: 6px;
    width: 260px;
}

.bnotes__draw .bnotes__cad-panel-btn--weg {
    color: #ef6b5c;
}

@media (pointer: coarse) {
    .bnotes__cad-tabs { min-height: 36px; }
    .bnotes__cad-tab { font-size: 10pt; }
}

.bnotes__layout .bn-picked-pt {
    fill: none;
    stroke: #d98200;
    stroke-width: 2;
}

.bnotes__layout .bn-fang-text {
    fill: #d98200;
    font-weight: 700;
}
