*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#eaf1f8;color:#0f172a}.top{background:#0f172a;color:white;padding:12px 18px}.top h1{margin:0;font-size:22px}.top p{margin:4px 0 0;color:#dbeafe}.app{display:grid;grid-template-columns:360px 1fr;gap:12px;padding:12px}.panel,.card{background:white;border:1px solid #d7e0ea;border-radius:12px;padding:12px}.panel{height:calc(100vh - 86px);overflow:auto;position:sticky;top:10px}h3{margin:14px 0 8px;border-top:1px solid #e2e8f0;padding-top:10px}h3:first-child{border-top:0;margin-top:0;padding-top:0}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px}label{font-size:12px;font-weight:bold;display:block;margin:8px 0}input,select,textarea{width:100%;padding:8px;border:1px solid #cbd5e1;border-radius:8px;margin-top:4px}button{padding:8px;border:1px solid #94a3b8;border-radius:8px;background:#f8fafc;font-weight:bold;cursor:pointer}.btnrow{display:grid;grid-template-columns:1fr 1fr;gap:8px}.metrics{display:grid;grid-template-columns:repeat(8,1fr);gap:8px;margin-bottom:12px}.metric{background:white;border:1px solid #d7e0ea;border-radius:10px;padding:8px;font-size:11px}.metric b{display:block;font-size:15px}.views{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}svg{width:100%;height:520px;background:#fbfdff;border:1px solid #d7e0ea;border-radius:10px}.views svg{height:330px}.gridLine{stroke:#e2e8f0;stroke-width:.6}.room{fill:none;stroke:#111827;stroke-width:3}.opening{fill:#dbeafe;stroke:#2563eb;stroke-width:2;stroke-dasharray:8 5}.step{fill:#d6a15c;stroke:#5f3715;stroke-width:1.2}.winder{fill:#d9a85f;stroke:#5f3715;stroke-width:1.2}.landing{fill:#d2b48c;stroke:#5f3715;stroke-width:1.5}.walk{fill:none;stroke:#10b981;stroke-width:3;stroke-dasharray:6 5}.edge{fill:none;stroke:#5c3a21;stroke-width:5;stroke-linejoin:miter!important;stroke-linecap:butt!important;stroke-miterlimit:1!important}.rail{fill:none;stroke:#111827;stroke-width:3;stroke-linejoin:round;stroke-linecap:round}.post{stroke:#111827;stroke-width:1.3}.slab{fill:#94a3b8;stroke:#334155;opacity:.55}.txt{font-size:12px;font-weight:bold;fill:#0f172a}.small{font-size:10px;fill:#334155}.ok{color:#15803d;font-weight:bold}.warn{color:#b45309;font-weight:bold}.bad{color:#b91c1c;font-weight:bold}pre{background:#0f172a;color:#dbeafe;border-radius:10px;padding:10px;max-height:260px;overflow:auto}.adminBox{background:#fff7ed;border:1px solid #fed7aa;border-radius:12px;padding:10px;margin-top:10px}.adminBox textarea{height:230px;font-family:Consolas,monospace;font-size:11px}.hint{font-size:12px;color:#64748b}.modal{position:fixed;inset:0;background:rgba(0,0,0,.82);display:none;align-items:center;justify-content:center;z-index:9999}.modal svg{width:94vw;height:90vh;background:white}
.doorSym{fill:none;stroke:#16a34a;stroke-width:4;stroke-linecap:round}.doorArc{fill:none;stroke:#16a34a;stroke-width:2;stroke-dasharray:4 3}.windowSym{fill:none;stroke:#0284c7;stroke-width:5;stroke-linecap:round}.nicheSym{fill:none;stroke:#7c3aed;stroke-width:3;stroke-dasharray:8 4}.partitionSym{fill:none;stroke:#111827;stroke-width:4}.wallSymbol{fill:none;stroke:#334155;stroke-width:2}.glass3d{fill:#bfdbfe;stroke:#0284c7;stroke-width:1.2;opacity:.65}.door3d{fill:#dcfce7;stroke:#16a34a;stroke-width:1.2;opacity:.65}.wall3d{fill:none;stroke:#64748b;stroke-width:1.4;opacity:.9}

/* V322 hard corner */
.step,.winder,.landing,.edge,.rail,.walk,.stringer{stroke-linejoin:miter!important;stroke-linecap:butt!important;stroke-miterlimit:1!important}

.dim{stroke:#2563eb;stroke-width:1.5;stroke-dasharray:5 4;fill:none}

.riserLine{stroke:#7c2d12;stroke-width:1.2;stroke-linejoin:miter;stroke-linecap:butt}


/* ==========================================================================
   V331 HARD-CORNER PATCH
   ========================================================================== */

svg .winder,
svg .step,
svg .landing {
  fill: #d9a85f !important;
  stroke: #5c3a21 !important;
  stroke-width: 1.5 !important;
  stroke-linejoin: miter !important;
  stroke-linecap: butt !important;
  stroke-miterlimit: 1 !important;
}

svg .edge,
svg .stringer {
  fill: none !important;
  stroke: #111827 !important;
  stroke-width: 5 !important;
  stroke-linejoin: miter !important;
  stroke-linecap: butt !important;
  stroke-miterlimit: 1 !important;
}

svg .walk {
  fill: none !important;
  stroke-linejoin: miter !important;
  stroke-linecap: butt !important;
  stroke-miterlimit: 1 !important;
}

svg polyline,
svg polygon,
svg path,
svg line {
  stroke-linejoin: miter !important;
  stroke-linecap: butt !important;
  stroke-miterlimit: 1 !important;
}



/* V332 Geländer / Setzstufen / Sprossen */
.riserPlan{
  stroke:#7c2d12;
  stroke-width:1.4;
  stroke-linejoin:miter;
  stroke-linecap:butt;
}
.riserLine{
  stroke:#7c2d12;
  stroke-width:1.3;
  stroke-linejoin:miter;
  stroke-linecap:butt;
}
.postPlan{
  fill:#111827;
  stroke:#ffffff;
  stroke-width:1;
}
.spindlePlan{
  fill:#475569;
  stroke:none;
}
.tiny{
  font-size:9px;
  fill:#7c2d12;
}
.rail{
  fill:none;
  stroke:#374151;
  stroke-width:4;
  stroke-linejoin:miter;
  stroke-linecap:butt;
}
.post{
  stroke:#111827;
  stroke-width:2;
  stroke-linejoin:miter;
  stroke-linecap:butt;
}



/* V338 echte Waende im Grundriss */
.wallBody{
  fill:#d1d5db;
  stroke:#111827;
  stroke-width:1.2;
  shape-rendering:crispEdges;
}
.innerWallBody{
  fill:#cbd5e1;
  stroke:#111827;
  stroke-width:1;
  shape-rendering:crispEdges;
}
.wallEdge{
  stroke:#111827;
  stroke-width:2;
  stroke-linejoin:miter;
  stroke-linecap:butt;
}
.openingFill{
  fill:#eaf4ff;
  opacity:0.55;
}
.openingEdge{
  fill:none;
  stroke:#2563eb;
  stroke-width:2;
  stroke-dasharray:6 4;
  stroke-linejoin:miter;
}



/* V339 erste halbe Stufe */
.half{
  fill:#d9a85f;
  stroke:#5c3a21;
  stroke-width:1.5;
  stroke-linejoin:miter;
  stroke-linecap:butt;
}
.skip{
  fill:none;
  stroke:none;
}



/* V341 Fenster/Tueren klarer + Koordinatenmarken */
.doorLeaf{fill:#dcfce7;stroke:#15803d;stroke-width:1.4;opacity:.72}
.doorSwing{fill:none;stroke:#15803d;stroke-width:2;stroke-dasharray:3 3}
.windowGlass{fill:#dbeafe;stroke:#0369a1;stroke-width:1.4;opacity:.78}
.windowFrame{stroke:#075985;stroke-width:2}
.coordEntry{fill:#16a34a;stroke:#052e16;stroke-width:1.5}
.coordExit{fill:#2563eb;stroke:#172554;stroke-width:1.5}
.coordLine{stroke:#64748b;stroke-width:1.4;stroke-dasharray:5 4}

.dragHandle{stroke-width:2.5;filter:drop-shadow(0 1px 2px rgba(0,0,0,.35));}
.dragHandle:hover{stroke:#111827;stroke-width:3.5;}


/* V363: Fenster und Tueren deutlich ueber schwarzer Wand sichtbar */
.doorOpening{fill:#fff;stroke:#111827;stroke-width:2.4;opacity:1}
.doorThreshold{stroke:#111827;stroke-width:2.2;stroke-linecap:square}
.doorLeafLine{stroke:#111827;stroke-width:2.2;stroke-linecap:round}
.doorSwing{fill:none;stroke:#111827;stroke-width:1.8;stroke-dasharray:none}
.windowOpening{fill:#fff;stroke:#111827;stroke-width:2.6;opacity:1}
.windowGlass{fill:#dbeafe;stroke:#0284c7;stroke-width:1.8;opacity:.95}
.windowCenter{stroke:#0284c7;stroke-width:2.2;stroke-linecap:round}
.windowFrame{stroke:#111827;stroke-width:2.2;stroke-linecap:square}
.coordExit{fill:#7c3aed;stroke:#ffffff;stroke-width:2.2}
.coordWall{fill:#111827;stroke:#ffffff;stroke-width:2.2}
.coordEntry{fill:#16a34a;stroke:#ffffff;stroke-width:2.2}
.pointLabelA{font-size:13px;font-weight:700;fill:#7c3aed;paint-order:stroke;stroke:#fff;stroke-width:3px}
.pointLabelB{font-size:13px;font-weight:700;fill:#111827;paint-order:stroke;stroke:#fff;stroke-width:3px}
.pointLabelC{font-size:13px;font-weight:700;fill:#15803d;paint-order:stroke;stroke:#fff;stroke-width:3px}

/* V365 klare Wandöffnungen: Fenster/Tür immer sichtbar über schwarzer Wand */
.doorOpening{fill:#fff!important;stroke:#000!important;stroke-width:3!important;opacity:1!important}
.windowOpening{fill:#fff!important;stroke:#000!important;stroke-width:3!important;opacity:1!important}
.windowGlass{fill:#dbeafe!important;stroke:#0284c7!important;stroke-width:2.4!important;opacity:1!important}
.windowCenter{stroke:#0284c7!important;stroke-width:3!important}
.windowFrame,.doorThreshold,.doorLeafLine{stroke:#000!important;stroke-width:2.8!important}
.doorSwing{fill:none!important;stroke:#000!important;stroke-width:2!important}


/* V368 FINAL: sichtbare Oeffnungen wie Referenz */
.wallBody{fill:#000!important;stroke:#000!important;stroke-width:1!important;shape-rendering:crispEdges!important}
.innerWallBody{fill:#000!important;stroke:#000!important;stroke-width:1!important;shape-rendering:crispEdges!important}
.wallEdge{stroke:#000!important;stroke-width:2!important}
.doorOpening,.windowOpening{fill:#fff!important;stroke:#000!important;stroke-width:3.5!important;opacity:1!important;shape-rendering:crispEdges!important}
.windowGlass{fill:#dbeafe!important;stroke:#0284c7!important;stroke-width:2.4!important;opacity:1!important}
.windowCenter{stroke:#0284c7!important;stroke-width:3!important;opacity:1!important}
.windowFrame,.doorThreshold,.doorLeafLine{stroke:#000!important;stroke-width:3!important;opacity:1!important}
.doorSwing{fill:none!important;stroke:#000!important;stroke-width:2.2!important;stroke-dasharray:none!important}
.coordExit{fill:#7c3aed!important;stroke:#fff!important;stroke-width:2.5!important}
.coordWall{fill:#111827!important;stroke:#fff!important;stroke-width:2.5!important}
.coordEntry{fill:#16a34a!important;stroke:#fff!important;stroke-width:2.5!important}


/* V370 FINAL Sichtbarkeit Fenster/Tueren/Waende */
.wallBody{fill:#000!important;stroke:#000!important;stroke-width:1!important;opacity:1!important;shape-rendering:crispEdges!important}
.innerWallBody{fill:#000!important;stroke:#000!important;stroke-width:1!important;opacity:1!important;shape-rendering:crispEdges!important}
.wallEdge{stroke:#000!important;stroke-width:2.5!important;opacity:1!important}
.openingFill{fill:#eef6ff!important;stroke:none!important;opacity:0.95!important}
.openingEdge{fill:none!important;stroke:#2563eb!important;stroke-width:2.5!important;stroke-dasharray:7 5!important}
.doorOpening,.windowOpening{fill:#fff!important;stroke:#000!important;stroke-width:4!important;opacity:1!important;shape-rendering:crispEdges!important}
.windowGlass{fill:#dbeafe!important;stroke:#0284c7!important;stroke-width:3!important;opacity:1!important}
.windowCenter{stroke:#0284c7!important;stroke-width:4!important;opacity:1!important}
.windowFrame,.doorThreshold,.doorLeafLine{stroke:#000!important;stroke-width:4!important;opacity:1!important;stroke-linecap:square!important}
.doorSwing{fill:none!important;stroke:#000!important;stroke-width:2.5!important;stroke-dasharray:none!important}
.coordExit{fill:#7c3aed!important;stroke:#fff!important;stroke-width:3!important}
.coordWall{fill:#111827!important;stroke:#fff!important;stroke-width:3!important}
.coordEntry{fill:#16a34a!important;stroke:#fff!important;stroke-width:3!important}
.pointLabelA,.pointLabelB,.pointLabelC{font-size:13px!important;font-weight:700!important;paint-order:stroke!important;stroke:#fff!important;stroke-width:4px!important}
.half{fill:#f6c66b!important;stroke:#7c2d12!important;stroke-width:2!important}


/* V391 Wand-/Oeffnungssymbolik: Architektursymbol sichtbar */
.wallBody,.innerWallBody{fill:#000!important;stroke:#000!important;opacity:1!important;shape-rendering:crispEdges!important}
.wallEdge{stroke:#000!important;stroke-width:2.5!important;opacity:1!important}
.openingFill{fill:#ffffff!important;stroke:#2563eb!important;stroke-width:2!important;opacity:1!important}
.doorOpening,.windowOpening{fill:#ffffff!important;stroke:#000000!important;stroke-width:4!important;opacity:1!important;shape-rendering:crispEdges!important}
.windowGlass{fill:#cfe8ff!important;stroke:#0284c7!important;stroke-width:3!important;opacity:1!important}
.windowCenter{stroke:#000000!important;stroke-width:3!important;opacity:1!important}
.windowFrame,.doorThreshold,.doorLeafLine{stroke:#000000!important;stroke-width:4!important;opacity:1!important;stroke-linecap:square!important}
.doorSwing{fill:none!important;stroke:#000000!important;stroke-width:2.7!important;stroke-dasharray:none!important}
.half{fill:#f6c66b!important;stroke:#7c2d12!important;stroke-width:2!important}


/* V402 FINAL: helle Waende, fachgerechte Oeffnungen sichtbar - letzte Regel gewinnt */
.wallBody,.innerWallBody{fill:#d1d5db!important;stroke:#6b7280!important;stroke-width:1.2!important;opacity:1!important;shape-rendering:crispEdges!important}
.wallEdge{stroke:#374151!important;stroke-width:2!important;opacity:1!important}
.openingFill{fill:#ffffff!important;stroke:#2563eb!important;stroke-width:1.8!important;opacity:1!important}
.openingEdge{fill:none!important;stroke:#2563eb!important;stroke-width:2.2!important;stroke-dasharray:7 5!important}
.doorOpening,.windowOpening{fill:#ffffff!important;stroke:#111827!important;stroke-width:3!important;opacity:1!important;shape-rendering:crispEdges!important}
.windowGlass{fill:#cfe8ff!important;stroke:#0284c7!important;stroke-width:2.4!important;opacity:1!important}
.windowFrame{stroke:#111827!important;stroke-width:2!important;fill:none!important}
.doorLeaf{fill:#ffffff!important;stroke:#111827!important;stroke-width:2.2!important;opacity:1!important}
.doorSwing{fill:none!important;stroke:#111827!important;stroke-width:2.4!important;stroke-dasharray:none!important}

/* V463 Eintrittskante optisch brechen */


/* V465 Eintrittskontur: erste halbe Stufe ohne automatischen Voll-Stroke */
.entryCutStepNoStroke{stroke:none!important;}
.entryDisplayStepFill{stroke:none!important;}
.stepSepLine{stroke:#5c3a21!important;stroke-width:1.2!important;fill:none!important;stroke-linecap:butt!important;stroke-linejoin:miter!important;stroke-miterlimit:1!important;}
.entryCutLine{stroke:#111827!important;stroke-width:3.2!important;fill:none!important;stroke-linecap:butt!important;stroke-linejoin:miter!important;stroke-miterlimit:1!important;}

.stringerPlan{fill:none;stroke:#7c4a22;stroke-opacity:.52;stroke-linejoin:miter!important;stroke-linecap:butt!important;stroke-miterlimit:1!important;pointer-events:none}
.stringerIso{fill:none;stroke:#7c4a22;stroke-opacity:.70;stroke-linejoin:miter!important;stroke-linecap:butt!important;stroke-miterlimit:1!important;pointer-events:none}

.stringerSide{fill:#7c4a22;fill-opacity:.42;stroke:#5c3a21;stroke-width:1.2;stroke-linejoin:miter;stroke-linecap:butt;pointer-events:none}
.stringerSideEdge{stroke:#5c3a21;stroke-width:1.2;stroke-linejoin:miter;stroke-linecap:butt;pointer-events:none}
