/* ============================================================================================
   editor.css - Editor-Motivarten „2D Skizze“ (assets/js/sketch2d.js) und „3D Modell“
   (assets/js/model3d.js), 2026-09-25. Gleiche Tokens wie app.css (Neumorphismus, CD-Rot nur für
   Hauptaktion/aktiven Zustand). Der Editor sitzt in der Bühne (#stage.stage--editor > .editor-host).
   ============================================================================================ */

.stage.stage--editor { align-items: stretch; }
.editor-host { width: 100%; min-width: 0; }

.ed { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; width: 100%; }

/* Kopfzeile: Name · gespeicherte Szenen · Rückgängig · Hauptaktion */
.ed__top {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md);
  background: var(--nm-face); box-shadow: var(--nm-1);
}
.ed__top .ed__name { flex: 1 1 160px; min-width: 120px; min-height: var(--touch-sm); padding: 0 var(--sp-3); font-size: var(--fs-3); }
.ed__top select { flex: 1 1 180px; min-width: 140px; min-height: var(--touch-sm); padding: 0 var(--sp-3); font-size: var(--fs-2); }
.ed__top .ed__spacer { flex: 1 1 auto; }
.ed__kind {
  display: inline-flex; align-items: center; gap: var(--sp-1); padding: 0 var(--sp-3); min-height: var(--touch-sm);
  border-radius: var(--r-pill); background: var(--nm-brand-face); color: var(--c-brand-ink);
  font-size: var(--fs-2); font-weight: 700; white-space: nowrap;
  box-shadow: -3px -3px 7px var(--nm-light), 4px 4px 9px var(--nm-brand-dark);
}

/* Körper: Werkzeuge · Zeichenfläche · Eigenschaften */
.ed__body {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(200px, 240px); gap: var(--sp-3); min-width: 0;
  align-items: start;
}

.ed__tools { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-2); border-radius: var(--r-md); background: var(--nm-face); box-shadow: var(--nm-1); }
.ed__tool {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--r-sm);
  background: var(--nm-face); color: var(--c-ink); box-shadow: var(--nm-1); cursor: pointer; font: inherit;
  transition: box-shadow .12s ease, background .12s ease, color .12s ease;
}
.ed__tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ed__tool:active { background: var(--nm-face-in); box-shadow: var(--nm-in); }
.ed__tool[aria-pressed="true"] {
  background: var(--nm-brand-face); color: var(--c-brand-ink);
  box-shadow: -3px -3px 7px var(--nm-light), 4px 4px 9px var(--nm-brand-dark);
}
.ed__tools hr { width: 100%; height: 0; margin: 2px 0; border: 0; border-top: 1px solid var(--c-line); }

.ed__canvas-wrap {
  position: relative; min-width: 0; border-radius: var(--r-md); overflow: hidden;
  background: var(--nm-face-in); box-shadow: var(--nm-in);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.ed__canvas-wrap canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; outline: none; }
.ed__canvas-wrap canvas.is-select { cursor: default; }
.ed__canvas-wrap canvas.is-pan { cursor: grab; }
.ed__canvas-wrap canvas.is-erase { cursor: not-allowed; }
.ed__canvas-wrap canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--c-brand); }
/* 2D Skizze im Dunkelmodus (2026-10-08): Fläche um das Blatt wie im Canvas (sketch2d.js DK.out), kein heller Blitz vor dem ersten Zeichnen */
:root[data-theme="dark"] .ed[data-kind="sketch2d"] .ed__canvas-wrap { background: #1b1b1b; }

/* Statuszeile unter der Zeichenfläche: Werkzeughinweis links, Koordinaten/Maß rechts */
.ed__hint {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3); font-size: var(--fs-1); color: var(--c-muted); min-height: 22px;
}
.ed__hint b { color: var(--c-ink); font-weight: 650; }

/* Popover „Form übernehmen / Original behalten“ nach einem Freihandstrich */
.ed__pop {
  position: absolute; z-index: 5; display: flex; gap: var(--sp-1); padding: var(--sp-1);
  border-radius: var(--r-sm); background: var(--nm-face); box-shadow: var(--nm-2);
}
.ed__pop .btn { min-height: 30px; padding: 0 var(--sp-3); font-size: var(--fs-1); box-shadow: var(--nm-1); }

/* Maßeingabe direkt an der Kante / Push-Pull-Distanz */
.ed__measure {
  position: absolute; z-index: 6; display: flex; align-items: center; gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2); border-radius: var(--r-sm); background: var(--nm-face); box-shadow: var(--nm-2);
  font-size: var(--fs-2);
}
.ed__measure input { width: 92px; min-height: 30px; padding: 0 var(--sp-2); font-size: var(--fs-2); text-align: right; }
.ed__measure .btn { min-height: 30px; padding: 0 var(--sp-2); font-size: var(--fs-1); box-shadow: var(--nm-1); }

/* Eigenschaften rechts */
.ed__props {
  display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-3);
  border-radius: var(--r-md); background: var(--nm-face); box-shadow: var(--nm-1);
  max-height: 70vh; overflow: auto; scrollbar-width: thin; font-size: var(--fs-2);
}
.ed__props h4 { margin: 0; font-size: var(--fs-2); font-weight: 700; color: var(--c-ink-2); text-transform: uppercase; letter-spacing: .04em; }
.ed__props .ed__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-width: 0; }
.ed__props .ed__row label { flex: 1 1 auto; color: var(--c-ink-2); font-weight: 600; min-width: 0; }
.ed__props .ed__row input[type="number"], .ed__props .ed__row input[type="text"], .ed__props .ed__row select {
  flex: 0 0 auto; width: 96px; min-height: var(--touch-sm); padding: 0 var(--sp-2); font-size: var(--fs-2); text-align: right;
}
.ed__props .ed__row input[type="text"] { width: 100%; text-align: left; }
.ed__props .ed__row label + input[type="text"] { width: 96px; flex: 0 0 96px; text-align: right; }
.ed__props .ed__row input[type="color"] { width: 40px; height: 30px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; }
.ed__props .ed__row input[type="checkbox"] { width: 20px; height: 20px; }
.ed__props .ed__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ed__props .ed__actions .btn { flex: 1 1 auto; }
.ed__props .ed__empty { color: var(--c-muted); line-height: 1.45; }

/* Objekt-/Formenliste */
.ed__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; scrollbar-width: thin; }
.ed__list li { display: flex; align-items: center; gap: var(--sp-2); min-height: 30px; padding: 0 var(--sp-2); border-radius: 10px; cursor: pointer; }
.ed__list li:hover { background: var(--nm-face-in); }
.ed__list li[aria-selected="true"] { background: var(--nm-brand-face); color: var(--c-brand-ink); }
.ed__list li .ed__dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); flex: 0 0 auto; }
.ed__list li .ed__lname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed__list li button { border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; opacity: .7; padding: 2px 4px; }
.ed__list li button:hover { opacity: 1; }

/* Farbfelder (Flächen / Objekte) */
.ed__swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.ed__swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: var(--nm-1); }
.ed__swatch[aria-pressed="true"] { border-color: var(--c-brand); }

/* Übergabe-Dialog (Mit KI weiterarbeiten) - liegt über der Zeichenfläche */
.ed__overlay {
  position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4); background: rgba(0, 0, 0, .35); border-radius: var(--r-md);
}
.ed__dialog {
  width: min(560px, 100%); max-height: 100%; overflow: auto; display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-4); border-radius: var(--r-md); background: var(--c-bg); box-shadow: var(--nm-3); font-size: var(--fs-3);
}
.ed__dialog h3 { margin: 0; font-size: var(--fs-5); }
.ed__dialog img { width: 100%; max-height: 220px; object-fit: contain; border-radius: var(--r-sm); background: #fff; box-shadow: var(--nm-in); }
.ed__dialog .chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ed__dialog textarea { width: 100%; min-height: 84px; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-3); }
.ed__dialog .ed__dlg-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: flex-end; }
.ed__dialog .ed__note { font-size: var(--fs-1); color: var(--c-muted); line-height: 1.45; }

/* Quellbanner über einer Variante, die aus dem Editor kam (studio.js::sourceBannerHtml) */
.source-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-2); border-radius: var(--r-sm);
  background: var(--c-brand-soft); color: var(--c-brand-deep); font-size: var(--fs-2); font-weight: 600;
}

/* 3D: Ansichten-Leiste und Achsenlegende */
.ed__views { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.ed__views .chip { min-height: 28px; padding: 0 var(--sp-3); font-size: var(--fs-1); }
.ed__axes { display: inline-flex; gap: var(--sp-2); font-size: var(--fs-1); color: var(--c-muted); }
.ed__axes i { font-style: normal; font-weight: 700; }
.ed__axes .ax-x { color: #c62828; } .ed__axes .ax-y { color: #2e7d32; } .ed__axes .ax-z { color: #1565c0; }

/* Telefon/Tablet: eine Spalte, Werkzeuge als umbrechende Zeile (steht am Ende, damit es die Grundregeln oben schlägt) */
@media (max-width: 900px) {
  .ed__body { grid-template-columns: minmax(0, 1fr); }
  .ed__tools { flex-direction: row; flex-wrap: wrap; }
  .ed__tools hr { display: none; }
  .ed__props { max-height: none; }
  .ed__top .ed__scenes { flex-basis: 100%; }
}

/* Fang-Leiste (2D und 3D identisch): Umschalter mit Leuchtpunkt, aktiv = CD-Rot (aktiver Zustand) */
.ed__snapbar { display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: var(--sp-1); padding: 3px 4px; border-radius: var(--r-pill); background: var(--nm-face-in); box-shadow: var(--nm-in); }
.ed__toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 var(--sp-3); border: 0; border-radius: var(--r-pill);
  background: var(--nm-face); color: var(--c-ink); box-shadow: var(--nm-1); font: inherit; font-size: var(--fs-2); font-weight: 650; cursor: pointer; white-space: nowrap;
}
.ed__toggle i { width: 9px; height: 9px; border-radius: 50%; background: #9e9e9e; box-shadow: inset 1px 1px 2px rgba(0,0,0,.35); }
.ed__toggle[aria-pressed="true"] { background: var(--nm-brand-face); color: var(--c-brand-ink); box-shadow: -3px -3px 7px var(--nm-light), 4px 4px 9px var(--nm-brand-dark); }
.ed__toggle[aria-pressed="true"] i { background: #ffffff; box-shadow: 0 0 6px rgba(255,255,255,.9); }
.ed__top .ed__snapstep { min-height: 30px; min-width: 70px; flex: 0 0 auto; padding: 0 var(--sp-2); font-size: var(--fs-2); border-radius: var(--r-pill); }
.ed__top .ed__snapstep:disabled { opacity: .5; }
/* Neu / Speichern: deutlich hervorgehoben (kein Rot - Rot bleibt der Hauptaktion vorbehalten) */
.ed__top .btn--key { font-weight: 750; box-shadow: var(--nm-2); border: 2px solid var(--c-ink); padding: 0 var(--sp-4); }
.ed__top .btn--key:active { box-shadow: var(--nm-in); }
@media (max-width: 900px) { .ed__snapbar { flex-basis: 100%; justify-content: center; } }

/* 3D: Hinweis-Chip „Blick auf Fläche“ mit Rückweg, liegt oben links über der Ansicht */
.ed__viewchip {
  position: absolute; left: 10px; top: 10px; z-index: 6; display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-3); border-radius: var(--r-pill); background: var(--nm-face); box-shadow: var(--nm-2);
  font-size: var(--fs-2); font-weight: 650;
}
.ed__viewchip[hidden] { display: none; }
.ed__viewchip .btn { min-height: 30px; padding: 0 var(--sp-3); font-size: var(--fs-1); }

/* Konfigurator-Dialoge: Vorlagenkarten, zwei Spalten, breite Dialoge */
.ed__dialog--wide { width: min(860px, 100%); }
.ed__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-2); }
.ed__cards--small { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.ed__card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--sp-2); min-height: 96px;
  border: 2px solid transparent; border-radius: var(--r-sm); background: var(--nm-face); box-shadow: var(--nm-1); color: var(--c-ink);
  font: inherit; font-size: var(--fs-1); text-align: center; cursor: pointer; line-height: 1.3;
}
.ed__card b { font-size: var(--fs-2); }
.ed__card span { color: var(--c-muted); }
.ed__card svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.ed__card svg rect { fill: rgba(226, 0, 61, .08); }
.ed__card[aria-pressed="true"], .ed__card:active { border-color: var(--c-brand); box-shadow: var(--nm-in); }
.ed__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); align-items: start; }
.ed__cols svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
.ed__cols svg rect { fill: rgba(226, 0, 61, .08); }
.ed__dlg-body { display: flex; flex-direction: column; gap: var(--sp-3); max-height: 78vh; overflow: auto; scrollbar-width: thin; }
.ed__dlg-body h4, .ed__dialog h4 { margin: var(--sp-2) 0 0; font-size: var(--fs-2); text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-2); }
.ed__dialog .ed__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.ed__dialog .ed__row label { flex: 1 1 auto; font-size: var(--fs-2); font-weight: 600; color: var(--c-ink-2); }
.ed__dialog .ed__row input[type="number"], .ed__dialog .ed__row select { width: 120px; min-height: var(--touch-sm); padding: 0 var(--sp-2); font-size: var(--fs-2); text-align: right; }
.ed__dialog .ed__row input[type="color"] { width: 40px; height: 30px; padding: 0; border: 0; background: transparent; }
/* Garagen-Konfigurator: Seitenleiste rechts, Modell bleibt sichtbar (Live-Vorschau) */
.ed__overlay--side { justify-content: flex-end; align-items: stretch; padding: 8px; background: transparent; pointer-events: none; }
.ed__overlay--side .ed__dialog { pointer-events: auto; width: min(400px, 94%); padding: var(--sp-3); }
.ed__overlay--side .ed__dlg-body { max-height: none; }
.ed__gcfg { display: flex; flex-direction: column; gap: 6px; }
.ed__dialog .ed__gcfg .ed__row select + select { margin-left: 4px; }
.ed__actions--col { flex-direction: column; }
.ed__actions--col .btn { width: 100%; justify-content: flex-start; }
@media (max-width: 700px) { .ed__cols { grid-template-columns: 1fr; } }

/* Plan-Import: Leiste über der Ansicht (links), Kantenliste, eigene Karte */
.ed__planpanel {
  position: absolute; left: 10px; top: 48px; bottom: 10px; z-index: 7; width: min(300px, 60%); overflow: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md);
  background: var(--c-bg); box-shadow: var(--nm-3); font-size: var(--fs-2);
}
.ed__planpanel h4 { margin: var(--sp-2) 0 0; font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-2); }
.ed__planpanel .ed__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.ed__planpanel .ed__row label { flex: 1 1 auto; font-weight: 600; color: var(--c-ink-2); }
.ed__planpanel .ed__row input[type="number"], .ed__planpanel .ed__row input[type="text"], .ed__planpanel .ed__row select { width: 96px; min-height: 30px; padding: 0 var(--sp-2); font-size: var(--fs-2); text-align: right; }
.ed__planpanel .ed__row input[type="range"] { width: 110px; }
.ed__planpanel .ed__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ed__planpanel .ed__actions .btn { flex: 1 1 auto; }
.ed__pp-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.ed__edges { max-height: 220px; overflow: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 4px; }
.ed__edges .ed__row.is-ok label { color: var(--c-ok); }
/* Plan-Werkzeuge 2026-10-01: Blätter/Geschosse, Vorschlags-Legende, Räume, Import-Dialog mit Seitenvorschau */
.pp-sheets { display: flex; flex-wrap: wrap; gap: 4px; }
.pp-sheets .chip { font-size: var(--fs-1); padding: 2px 8px; min-height: 26px; }
.pp-xy { display: flex; gap: 4px; }
.ed__planpanel .pp-xy input[type="text"] { width: 62px; }
.pp-key { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin: 0 4px 2px 6px; vertical-align: middle; }
.pp-key--prop { background: #f28005; } .pp-key--ai { background: #8c40d9; } .pp-key--on { background: #26993f; } .pp-key--off { background: #9e9e9e; }
.pp-rooms { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow: auto; scrollbar-width: thin; }
.ed__planpanel .pp-rooms .ed__row input[type="text"] { flex: 1 1 auto; width: auto; text-align: left; }
.pp-rooms .ed__row span { font-size: var(--fs-1); white-space: nowrap; color: var(--c-ink-2); }
.pt-cand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-2); max-height: 52vh; overflow: auto; }
.pt-cand { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: var(--r-sm); box-shadow: var(--nm-1, var(--nm-in)); opacity: .55; }
.pt-cand.is-on { opacity: 1; outline: 2px solid var(--c-brand); outline-offset: -2px; }
.pt-cand__img { position: relative; display: block; cursor: pointer; }
.pt-cand__img input { position: absolute; left: 6px; top: 6px; width: 18px; height: 18px; }
.ed__dialog .pt-cand__img img { max-height: 130px; background: #fff; }
.pt-cand__ph { display: grid; place-items: center; height: 90px; background: #fff; border-radius: var(--r-sm); font-weight: 700; color: var(--c-muted); }
.pt-cand__meta { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-1); }
.pt-cand__meta span { color: var(--c-muted); }
.ed__card--own { border-color: var(--c-brand); }
.ed__card--own svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
@media (max-width: 700px) { .ed__planpanel { width: calc(100% - 20px); bottom: auto; max-height: 60%; } }

/* gardmi-Abgleich 2026-09-28: Maßbeschriftungen als HTML-Overlay, Gehmodus-Chip, Zaun-/Höhenpunkt-Zeilen */
.ed__labels { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.ed__lbl {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; padding: 1px 6px; border-radius: 8px;
  background: rgba(255, 255, 255, .86); color: #1a1a1a; font-size: 11px; font-weight: 650; line-height: 1.5; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.ed__lbl--zone { background: rgba(13, 140, 217, .92); color: #fff; }
.ed__lbl--bad { background: rgba(226, 0, 61, .92); color: #fff; }
.ed__lbl--h { background: rgba(230, 128, 26, .92); color: #fff; }
.ed__walkchip { left: 10px; top: 10px; }
.ed__walkchip .ed__walkpad { display: inline-flex; gap: 3px; }
.ed__walkchip .ed__walkpad .btn { min-width: 30px; padding: 0 6px; }
.ed__props .ed__row--gate input[type="number"] { width: 62px; }
.ed__props .ed__row--gate .btn { min-height: 26px; padding: 0 6px; }
.ed__lenstep, .ed__gridstep { min-height: 30px; min-width: 76px; flex: 0 0 auto; padding: 0 var(--sp-2); font-size: var(--fs-2); border-radius: var(--r-pill); }
.ed__lenstep:disabled { opacity: .5; }
@media (max-width: 900px) { .ed__snapbar { flex-wrap: wrap; } }
.ed__lbl--room { background: rgba(60, 60, 60, .85); color: #fff; }

/* XR Experience (Konzept 2026-09-28): Zeichenfläche wird Vollbild-Overlay, HUD darüber; Touch-Ziele ≥ 44 px */
.ed--xr .ed__canvas-wrap { position: fixed; inset: 0; z-index: 3000; height: 100vh !important; height: 100dvh !important; border-radius: 0; background: #111; box-shadow: none; }
.ed--xr .ed__canvas-wrap canvas { cursor: grab; }
.ed--xr .ed__measure, .ed--xr .ed__viewchip, .ed--xr .ed__walkchip, .ed--xr .ed__labels, .ed--xr .ed__planpanel { display: none !important; }
body.is-xr { overflow: hidden; }
.ed--xr .ed__overlay { z-index: 3100; }
.xr { position: absolute; inset: 0; z-index: 5; pointer-events: none; font-family: inherit; color: #fff; --xr-bg: rgba(20, 20, 20, .72); }
.xr > * { pointer-events: auto; }
.xr__top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 10px 8px; background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); font-size: 14px; }
.xr__title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.xr__room { font-weight: 650; opacity: .9; }
.xr__spacer { flex: 1 1 auto; }
.xr__fps { font-size: 12px; opacity: .85; white-space: nowrap; }
.xr__btn { min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: var(--xr-bg); color: #fff; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.35); white-space: nowrap; }
.xr__btn--sm { min-height: 36px; padding: 0 10px; font-size: 13px; }
.xr__btn[aria-pressed="true"] { background: #e2003d; }
.xr__btn:disabled { opacity: .45; cursor: default; }
.xr__sel { display: inline-flex; align-items: center; gap: 6px; }
.xr__sel select { border: 0; background: transparent; color: #fff; font: inherit; font-size: 14px; }
.xr__sel select option { color: #111; }
.xr__side { position: absolute; right: 10px; top: 64px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.xr__pad { position: absolute; right: 10px; bottom: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.xr__pad div { display: flex; gap: 4px; }
.xr__pad .xr__btn { min-width: 48px; padding: 0; }
.xr__map { position: absolute; left: 10px; bottom: 84px; width: 240px; height: 240px; border-radius: 12px; overflow: hidden; background: var(--xr-bg); box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.xr__map canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.xr__map.is-closed { height: 40px; width: 140px; }
.xr__map.is-closed canvas { display: none; }
.xr__mapbtn { position: absolute; right: 4px; top: 4px; min-width: 32px; min-height: 32px; border: 0; border-radius: 16px; background: rgba(255,255,255,.2); color: #fff; font: inherit; cursor: pointer; }
.xr__bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 6px; padding: 8px 10px max(10px, env(safe-area-inset-bottom)); background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.6)); }
.xr__tool { min-height: 48px; min-width: 96px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--xr-bg); color: #fff; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.xr__tool[aria-pressed="true"] { background: #fff; color: #111; }
.xr__tool:disabled { opacity: .4; cursor: default; }
.xr__tool--primary { background: #e2003d; }
.xr__ar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 10px; background: rgba(0,0,0,.6); font-size: 14px; }
.xr__ar select { min-height: 40px; border-radius: 10px; }
.xr__toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); max-width: min(90vw, 560px); padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.75); color: #fff; font-size: 14px; text-align: center; }
.xr__toast[hidden] { display: none; }
.ed__toggle--xr { font-weight: 750; }
.ed__card.is-disabled { opacity: .45; }
@media (max-width: 700px) { .xr__map { width: 160px; height: 160px; bottom: 76px; } .xr__tool { min-width: 0; font-size: 13px; padding: 0 8px; } .xr__side .xr__btn { font-size: 13px; padding: 0 10px; } .xr__title { display: none; } }
@media (max-height: 500px) { .xr__side { top: 56px; } .xr__map { width: 150px; height: 150px; } }
/* Mengenliste + GLB-Dialog (2026-09-29) */
.ed__bom { max-height: 52vh; overflow: auto; margin: var(--sp-2) 0; }
.ed__bom table { width: 100%; border-collapse: collapse; font-size: var(--fs-1); }
.ed__bom th, .ed__bom td { padding: 4px 8px; text-align: left; border-bottom: 1px solid var(--line, rgba(0,0,0,.12)); vertical-align: top; }
.ed__bom th { position: sticky; top: 0; background: var(--bg, #fff); }
.ed__bom .ed__bom-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ed__bom .ed__bom-grp td { font-weight: 700; padding-top: var(--sp-2); }
.ed__glblink input { width: 100%; font-family: ui-monospace, monospace; font-size: var(--fs-1); }
.ed__note--warn { color: var(--warn, #b45309); }
/* Automotive / XR Engineering (patch44) */
.ed__grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-3); }
.ed__fit { width: 100%; border-collapse: collapse; font-size: var(--fs-1); }
.ed__fit td { padding: 4px 6px; border-bottom: 1px solid var(--line, rgba(0,0,0,.12)); vertical-align: top; }
.ed__fit td:first-child { white-space: nowrap; font-weight: 600; }
.ed__fitbox { margin: var(--sp-2) 0; }
.ed__amp { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 2px; background: #9e9e9e; }
.ed__amp--gruen { background: #2e9e4f; } .ed__amp--gelb { background: #e0a800; } .ed__amp--rot { background: #d32f2f; }
.ed__rimtools { display: inline-flex; align-items: center; gap: var(--sp-2); }
.ed__rimprev { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line, rgba(0,0,0,.2)); }
.ed__rimcrop canvas { display: block; max-width: 100%; border: 1px solid var(--line, rgba(0,0,0,.2)); border-radius: 8px; cursor: crosshair; background: #222; }
.ed__refbtns { display: inline-flex; gap: 4px; }
.ed__rigval { min-width: 56px; display: inline-block; text-align: right; font-variant-numeric: tabular-nums; }
.ed__lbl--ref { background: #c2185b; color: #fff; }
.xr__fine { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.xr__fine[hidden] { display: none; }

/* ---- 19. Motorsport RX – Kinematik (2026-09-29) ---- */
.kin { display: flex; flex-direction: column; gap: var(--sp-2); min-height: 70vh; }
.kin__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.kin__kind { font-weight: 600; font-size: var(--fs-2); white-space: nowrap; }
.kin__name { flex: 1 1 140px; min-width: 120px; min-height: var(--touch-sm); padding: 0 var(--sp-3); font-size: var(--fs-3); }
.kin__scenes { flex: 1 1 160px; min-width: 140px; min-height: var(--touch-sm); font-size: var(--fs-2); }
.kin__modes { display: flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--border); border-radius: var(--radius); padding: 2px; }
.kin__mode { min-height: calc(var(--touch-sm) - 4px); padding: 0 var(--sp-3); border: 0; border-radius: calc(var(--radius) - 2px); background: transparent; color: inherit; font: inherit; font-size: var(--fs-2); cursor: pointer; }
.kin__mode[aria-selected="true"] { background: var(--accent); color: #fff; }
.kin__spacer { flex: 1 0 0; }
.kin__body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-3); align-items: start; }
.kin__main { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.kin__views { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.kin__view { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2, #f6f7f8); }
.kin__view canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.kin__vlabel { position: absolute; top: 4px; left: 6px; font-size: var(--fs-1); font-weight: 600; opacity: .75; pointer-events: auto; }
.kin__3d { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-height: 480px; }
.kin__3dhost { min-height: 480px; }
.kin__motion { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-2) var(--sp-3); align-items: center; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius); }
.kin__motion label { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: var(--sp-2); font-size: var(--fs-2); }
.kin__motion label b { font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 52px; text-align: right; }
.kin__motion input[type="range"] { width: 100%; min-height: var(--touch-sm); }
.kin__mbtns { display: flex; gap: var(--sp-2); }
.kin__plots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-2); }
.kin__plot { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.kin__plot canvas { display: block; width: 100%; touch-action: none; cursor: col-resize; }
.kin__side { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius); max-height: calc(100vh - 140px); overflow: auto; position: sticky; top: 8px; }
.kin__side h4 { margin: var(--sp-2) 0 0; font-size: var(--fs-2); text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.kin__row { display: grid; grid-template-columns: 1fr 110px; align-items: center; gap: var(--sp-2); font-size: var(--fs-2); }
.kin__row input[type="number"], .kin__row input[type="text"], .kin__row select { min-height: var(--touch-sm); padding: 0 var(--sp-2); font-size: var(--fs-2); width: 100%; }
.kin__row input[type="checkbox"] { justify-self: start; width: 20px; height: 20px; }
.kin__bounds { display: flex; gap: 3px; }
.kin__bounds input { width: 100%; min-width: 0; }
.kin__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.kin__actions--col { flex-direction: column; align-items: stretch; }
.kin__note { font-size: var(--fs-1); opacity: .8; margin: 0; }
.kin__bad { color: var(--accent); opacity: 1; }
.kin__pt { margin: 0; font-size: var(--fs-2); }
.kin__live { display: flex; flex-direction: column; gap: 2px; }
.kin__lv { display: flex; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-2); padding: 2px 0; border-bottom: 1px dotted var(--border); }
.kin__lv b { font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.kin__lv--sweep { margin-top: var(--sp-2); font-weight: 600; border-bottom: 1px solid var(--border); }
.kin__amp { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; }
.kin__amp--warn { background: #f59e0b; }
.kin__amp--bad { background: #e2003d; }
.kin__tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-1); }
.kin__tbl th, .kin__tbl td { padding: 2px 3px; text-align: right; border-bottom: 1px solid var(--border); }
.kin__tbl th:first-child, .kin__tbl td:first-child { text-align: left; font-family: ui-monospace, monospace; }
.kin__tbl input { width: 64px; min-height: 26px; padding: 0 3px; font-size: var(--fs-1); text-align: right; }
.kin__tbl tr.is-sel td { background: rgba(226, 0, 61, .08); }
.kin__free { display: grid; grid-template-columns: 1fr 1fr; gap: 2px var(--sp-2); font-size: var(--fs-1); font-family: ui-monospace, monospace; }
.kin__rules { display: flex; flex-direction: column; gap: var(--sp-2); }
.kin__rule { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--sp-2); padding: var(--sp-2); border-left: 4px solid #9ca3af; background: var(--surface-2, #f6f7f8); font-size: var(--fs-1); }
.kin__rule > b, .kin__rule > span { grid-column: 1; }
.kin__rule > button { grid-column: 2; grid-row: 1 / span 4; align-self: start; }
.kin__rule--ok { border-left-color: #22c55e; }
.kin__rule--bad { border-left-color: #e2003d; }
.kin__rule--todo { border-left-color: #f59e0b; }
.kin__rulesrc { opacity: .7; }
.kin__status { min-height: 1.4em; font-size: var(--fs-2); padding: var(--sp-1) var(--sp-2); border-radius: var(--radius); }
.kin__status.is-ok { color: #15803d; }
.kin__status.is-warn { color: #b45309; }
.kin__status.is-err { color: var(--accent); }
@media (max-width: 900px) { .kin__body { grid-template-columns: 1fr; } .kin__side { position: static; max-height: none; } .kin__views { grid-template-columns: 1fr; } .kin__motion label { grid-template-columns: 64px 1fr auto; } }
.kin__rule--na { border-left-color: #cbd5e1; opacity: .6; }
.kin__rule--info { border-left-color: #60a5fa; }
.kin__docbtns { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.kin__clsnote { font-size: var(--fs-1); opacity: .75; margin: 0; }
.kin__comps { display: flex; flex-wrap: wrap; gap: 4px; }
.kin__comps .btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.kin__axsel { display: flex; gap: 4px; margin-bottom: var(--sp-2); }
.kin__axsel .btn { flex: 1 1 0; }
.kin__axsel .btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.kin__hud .kin__mini { display: block; margin-top: 6px; width: 200px; height: 110px; background: rgba(255,255,255,.06); border-radius: 6px; }
.kin__hud .kin__hudtxt { white-space: nowrap; }
.kin__3dhost .ed, .kin__3dhost .ed__body { display: block; grid-template-columns: none; }
.kin__3dhost .ed__canvas-wrap { width: 100%; }
.kin__3d { position: relative; }
.kin__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 4px 10px; font-size: var(--fs-1); border-bottom: 1px solid var(--border); }
.kin__legend i { display: inline-block; width: 22px; height: 6px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.kin__hud { position: absolute; right: 8px; top: 40px; min-width: 200px; padding: 8px 10px; border-radius: var(--radius); background: rgba(20, 22, 26, .78); color: #e6e6e6; font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; pointer-events: none; z-index: 5; }
.kin__hud b { color: #fff; }
.kin__hud .is-bad { color: #ff6b81; }
.kin__hud .is-warn { color: #fbbf24; }
.kin__hud[hidden] { display: none; }
/* Strecken-Editor */
.kin--track .kin__views, .kin--track .kin__3d, .kin--track .kin__motion, .kin--track .kin__plots { display: none !important; }
.kin__trk[hidden] { display: none; }
.kin__trk { display: flex; flex-direction: column; gap: var(--sp-2); }
.kin__trkmapwrap, .kin__trkprofwrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.kin__trkmap, .kin__trkprof { display: block; width: 100%; touch-action: none; cursor: crosshair; }
.kin__trkprof { cursor: ns-resize; }
.kin__trkinfo { display: flex; flex-direction: column; gap: 2px; }

/* Rallycross-Strecken (patch56): Abschnitte, Kurvenliste */
.kin__sec { display: grid; grid-template-columns: 1fr 1fr 1.5fr 0.9fr auto; gap: 4px; align-items: center; margin: 0 0 4px; }
.kin__sec input, .kin__sec select { min-width: 0; width: 100%; min-height: var(--touch-sm); padding: 0 var(--sp-1); font-size: var(--fs-2); }
.kin__sec .btn { padding: 0 8px; min-height: var(--touch-sm); }
.kin__sec--h { font-size: var(--fs-1); opacity: .7; margin-bottom: 2px; }
.kin__secname { margin: -2px 0 6px; }
.kin__corn { display: grid; grid-template-columns: 3.2em 1fr auto 6.5em; gap: 4px 6px; align-items: center; padding: 3px 0; border-bottom: 1px dotted var(--border); font-size: var(--fs-1); }
.kin__corn b { font-size: var(--fs-2); }
.kin__corn span { opacity: .8; min-width: 0; }
.kin__corn select { min-height: var(--touch-sm); font-size: var(--fs-1); padding: 0 4px; width: 100%; }
.kin__ct { font-style: normal; font-weight: 600; white-space: nowrap; font-size: var(--fs-1); }
.kin__ct--drift { color: var(--c-brand-deep); }
.kin__ct--light { opacity: .6; }
.kin__hud .kin__hudtxt b { color: #fff; }

/* Optik-Ansicht der Simulation (patch57) */
.kin__scenehost { position: relative; height: 560px; background: #cfe6f7; }
.kin__scenehost[hidden] { display: none; }
.kin__scenebar { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; z-index: 6; }
.kin__scenebar .btn { background: rgba(20, 22, 26, .62); color: #fff; border-color: rgba(255,255,255,.25); }
.kin__scenebar .btn[aria-pressed="true"] { background: var(--c-brand); color: var(--c-brand-ink); }
.kin__scenedrv { display: inline-flex; gap: 4px; margin-left: 8px; }

/* Rennen mit mehreren Fahrern (patch60) */
.kin__race { display: grid; grid-template-columns: 22px 1.6fr 0.9fr 0.8fr 0.6fr 34px 28px; gap: 4px; align-items: center; margin: 0 0 4px; font-size: var(--fs-1); }
.kin__race--f { grid-template-columns: 22px 1fr auto; }
.kin__race--h { opacity: .7; }
.kin__race input[type="text"], .kin__race input[type="number"], .kin__race select { min-width: 0; width: 100%; min-height: var(--touch-sm); padding: 0 4px; font-size: var(--fs-1); }
.kin__race input[type="color"] { width: 32px; min-height: var(--touch-sm); padding: 0; }
.kin__race .btn { padding: 0 6px; min-height: var(--touch-sm); }
.kin__stand { position: absolute; left: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: var(--radius); background: rgba(20, 22, 26, .68); color: #fff; font-size: 12px; z-index: 6; pointer-events: none; }
.kin__standrow { display: grid; grid-template-columns: 14px 10px 1fr auto; gap: 6px; align-items: center; min-width: 190px; }
.kin__standrow i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.kin__standrow em { font-style: normal; opacity: .75; font-variant-numeric: tabular-nums; }
.kin__standrow.is-focus { font-weight: 700; }

.kin__rdrv { border-bottom: 1px dotted var(--border); padding-bottom: 4px; margin-bottom: 4px; }
.kin__race--a { grid-template-columns: 22px 1fr 34px 30px; }
.kin__race--b { grid-template-columns: auto 1fr auto 1.2fr auto 0.7fr; }
.kin__race--b span { opacity: .7; }

/* Sektorzeiten, Fahrer-Sektoren (patch75) */
.kin__sec3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.kin__sec3 input { min-width: 0; width: 100%; min-height: var(--touch-sm); padding: 0 4px; font-size: var(--fs-2); }
.kin__rsec { display: block; opacity: .75; font-size: var(--fs-1); margin: 0; }
.kin__race small { opacity: .75; }
/* Plan-Leiste: aufklappbare Abschnitte (2026-10-01) */
.pp-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.pp-sec > summary::-webkit-details-marker { display: none; }
.pp-sec > summary::before { content: '▸'; font-size: var(--fs-1); color: var(--c-ink-2); transition: transform .15s; }
.pp-sec[open] > summary::before { transform: rotate(90deg); }
.pp-sec > summary h4 { margin: var(--sp-2) 0; }
.pp-sec { display: flex; flex-direction: column; gap: var(--sp-2); }
.pp-sec[open] { padding-bottom: var(--sp-1); }

/* 2026-10-01: Weg abrunden (Angebot nach dem Zeichnen), Innenansicht-Schalter einzeln */
.ed__pathround { left: 50%; top: 10px; transform: translateX(-50%); z-index: 8; align-items: center; flex-wrap: wrap; justify-content: center; }
.ed__pathround > span { font-size: var(--fs-1); font-weight: 650; padding: 0 var(--sp-2); }
.ed__toggle--solo { flex: 0 0 auto; }

/* Objektmanager + Auswahlmodi + Pfadleiste (2026-10-01, Recherche docs/RECHERCHE_OBJEKTMANAGER_AUSWAHL_2026-10-01.md) */
.ed-outliner { margin-top: var(--sp-3); padding: var(--sp-2); border-radius: var(--r-md); background: var(--c-bg); box-shadow: var(--nm-2, var(--nm-in)); display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-1); min-width: 0; }
.ed-outliner--inside { margin: 0 0 var(--sp-3); }
.ol__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.ol__head b { font-size: var(--fs-2); }
.ol__count { color: var(--c-muted); }
.ol__search { width: 100%; min-height: 28px; padding: 0 var(--sp-2); font-size: var(--fs-1); }
.ol__tree { display: flex; flex-direction: column; max-height: 46vh; overflow: auto; scrollbar-width: thin; }
.ol__row { display: flex; align-items: center; gap: 3px; min-height: 26px; padding: 1px 2px; border-radius: 6px; cursor: pointer; }
.ol__row:hover { background: rgba(127, 127, 127, .12); }
.ol__row.is-sel { background: var(--nm-brand-face, rgba(226, 0, 61, .15)); color: var(--c-brand-ink, inherit); }
.ol__row.is-hidden .ol__name { opacity: .45; text-decoration: line-through; }
.ol__row.is-ctx .ol__name { font-weight: 750; }
.ol__row--group { margin-top: 4px; font-weight: 700; color: var(--c-ink-2); text-transform: uppercase; letter-spacing: .03em; font-size: 11px; cursor: default; }
.ol__row--kid { padding-left: 18px; }
.ol__tw { flex: 0 0 18px; width: 18px; height: 20px; padding: 0; border: 0; background: none; color: inherit; font-size: 11px; cursor: pointer; }
.ol__ico { flex: 0 0 18px; text-align: center; }
.ol__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ol__n { color: var(--c-muted); font-weight: 600; }
.ol__lv { flex: 0 0 auto; padding: 0 5px; border-radius: 8px; background: rgba(127, 127, 127, .18); font-size: 10px; }
.ol__t { flex: 0 0 22px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; font-size: 12px; opacity: .55; }
.ol__t:hover, .ol__t.is-on { opacity: 1; }
.ol__note { margin: 0; color: var(--c-muted); line-height: 1.4; font-size: 11px; }
.ed__selmode-l { font-size: var(--fs-1); font-weight: 700; color: var(--c-ink-2); padding: 0 4px 0 2px; align-self: center; }
.ed__crumb { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: var(--r-sm); background: var(--nm-face, var(--c-bg)); box-shadow: var(--nm-2); font-size: var(--fs-1); outline: 2px dashed var(--c-brand); outline-offset: 2px; }
.ed__crumb-sep { color: var(--c-muted); }
/* Durchgangserkennung Hecke/Zaun (2026-10-02) */
.ed__openings { left: 50%; top: 10px; transform: translateX(-50%); z-index: 8; flex-direction: column; align-items: stretch; gap: 6px; max-width: min(560px, 92%); }
.ed__openings > b { font-size: var(--fs-2); padding: 0 var(--sp-1); }
.ed__openings-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-1); }
.ed__openings > .btn { align-self: flex-end; }

/* Wandtypen (wall_tools.js, Stufe 1 2026-10-07): Vorlagenkarten mit Mini-Schnitt außen → innen */
.wt__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-2); }
.ed__card.wt__card { align-items: stretch; text-align: left; min-height: 0; gap: 3px; }
.wt__bar { display: flex; width: 100%; height: 16px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .28); }
.wt__bar--sm { height: 12px; }
.wt__bar i { display: block; min-width: 2px; border-right: 1px solid rgba(0, 0, 0, .22); }
.wt__bar i:last-child { border-right: 0; }
.wt__ends { display: flex; justify-content: space-between; font-size: var(--fs-1); color: var(--c-muted); }
.wt__ends em { font-style: normal; }
.wt__legend, .wt__hint { font-size: var(--fs-1); color: var(--c-muted); line-height: 1.35; }
.wt__hint { font-style: italic; }
.wt__props { display: flex; flex-direction: column; gap: 2px; }
.ed__dlg-body.wt__body { max-height: min(54vh, 560px); }

/* 2D-Wandwerkzeug (sketch_walls.js, Stufe 3 2026-10-08): Abschnitte rechts und Zahlenfeld für die Längeneingabe auf Touch-Geräten */
.skw-tool, .skw-seg, .skw-op, .skw-optool, .skw-view { display: flex; flex-direction: column; gap: var(--sp-2); }
.skw-pad { position: absolute; right: 8px; bottom: 8px; z-index: 6; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: var(--r-sm); background: var(--nm-face); box-shadow: var(--nm-2); }
.skw-pad__out { min-height: 30px; padding: 0 var(--sp-2); border-radius: 6px; background: var(--nm-face-in); box-shadow: var(--nm-in); font-size: var(--fs-3); font-weight: 650; line-height: 30px; text-align: right; color: var(--c-ink); }
.skw-pad__keys { display: grid; grid-template-columns: repeat(3, 46px); gap: 4px; }
.skw-pad__keys .btn { min-height: 40px; padding: 0; font-size: var(--fs-3); box-shadow: var(--nm-1); }
.skw-tool .ed__row input[inputmode="decimal"], .skw-seg .ed__row input[inputmode="decimal"], .skw-op .ed__row input[inputmode="decimal"], .skw-optool .ed__row input[inputmode="decimal"] { flex: 0 0 auto; width: 96px; text-align: right; }

/* Kontur bearbeiten (3D-Modell, 2026-10-09): Eckpunkt-Griffe (40 px Trefferfläche), antippbare Kantenmaße, Kanten-Leiste. */
.ed__canvas-wrap { touch-action: none; }
.ed__edit { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; touch-action: none; overflow: visible; }
.ed__edit[hidden] { display: none; }
.ed__edit-vis { stroke: #1e88e5; stroke-width: 2; stroke-opacity: .85; fill: none; pointer-events: none; }
.ed__edit-vis.is-sel { stroke: #e2003d; stroke-width: 4; stroke-opacity: 1; }
.ed__edit-hit { stroke: rgba(0, 0, 0, .001); stroke-width: 30; stroke-linecap: round; pointer-events: stroke; cursor: pointer; touch-action: none; }
.ed__edit-v { cursor: grab; touch-action: none; }
.ed__edit-vh { fill: rgba(0, 0, 0, .001); pointer-events: all; touch-action: none; }
.ed__edit-vd { fill: #fff; stroke: #1e88e5; stroke-width: 2.5; pointer-events: none; }
.ed__edit-v.is-on .ed__edit-vd { fill: #f2bf1a; stroke: #e2003d; }
.ed__lbl--edge { pointer-events: auto; cursor: pointer; }
.ed__lbl--edge::before { content: ""; position: absolute; inset: -10px -8px; }
.ed__lbl--sel { background: rgba(226, 0, 61, .95); color: #fff; }
.ed__edgebar { position: absolute; z-index: 6; display: flex; align-items: center; gap: var(--sp-1); padding: var(--sp-1) var(--sp-2); border-radius: var(--r-sm); background: var(--nm-face); box-shadow: var(--nm-2); font-size: var(--fs-2); left: 50%; top: 10px; transform: translateX(-50%); flex-wrap: wrap; justify-content: center; max-width: calc(100% - 20px); }
.ed__edgebar .btn { box-shadow: var(--nm-1); font-size: var(--fs-1); }
.ed__edgebar[hidden] { display: none; }
.ed__edgebar .btn { min-height: 36px; }
.ed__edgebar-t { white-space: nowrap; }
.ed__actions--edge { flex-wrap: wrap; }
.ed__actions--edge .btn { min-height: 36px; }
.ed__dimbox input { min-height: 36px; }
.ed--xr .ed__edit, .ed--xr .ed__edgebar { display: none !important; }
