:root{
  --bg:#e9eef4;--panel:#fff;--line:#d7dee8;--line2:#e8edf3;--text:#172033;--muted:#667085;--dark:#0f172a;
  --accent:#2563eb;--accent-soft:#eff6ff;--teal:#0f766e;--danger:#b42318;--warning:#b54708;--shadow:0 14px 34px rgba(15,23,42,.10);
  --sidebar:286px;--rightbar:338px;--topbar:66px;
}
*{box-sizing:border-box}html,body{height:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--text);background:var(--bg);overflow:hidden}
button,input,select,textarea{font:inherit}button{user-select:none}.hidden{display:none!important}.advanced{}.simple-mode .advanced{display:none!important}
.app-shell{height:100%;display:flex;flex-direction:column}.topbar{height:var(--topbar);background:var(--dark);color:#fff;display:grid;grid-template-columns:260px minmax(420px,1fr) auto;align-items:center;padding:0 14px;gap:12px;box-shadow:0 1px 0 rgba(255,255,255,.06);z-index:30}
.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-mark{width:40px;height:40px;border-radius:11px;background:linear-gradient(135deg,#60a5fa,#22d3ee);display:grid;place-items:center;color:#08111f;font-weight:950;letter-spacing:-1px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}.brand-title{font-size:15px;font-weight:850;letter-spacing:.2px;white-space:nowrap}.version{font-size:10px;background:#263449;border:1px solid #3a4a63;padding:2px 5px;border-radius:999px;margin-left:3px;color:#cbd5e1}.brand-subtitle{font-size:10px;color:#9ba7b8;margin-top:2px;white-space:nowrap}
.project-strip,.view-strip{display:flex;align-items:center;gap:7px;min-width:0}.project-strip{justify-content:flex-start}.view-strip{justify-content:flex-end}.project-meta{display:flex;flex-direction:column;min-width:160px;max-width:270px;flex:0 1 240px}.project-meta input{border:0;background:transparent;color:white;font-weight:750;padding:1px 4px;outline:none;min-width:0;width:100%}.project-meta span{font-size:10px;color:#9ba7b8;padding-left:4px}.top-select{background:#1f2a3a;color:#fff;border:1px solid #354157;border-radius:8px;padding:7px 9px;max-width:120px}.top-select option{color:#111;background:#fff}
.icon-btn,.ghost-btn,.primary-btn,.seg,.mode-btn,.mini-btn,.status-btn,.danger-ghost{border:1px solid transparent;border-radius:8px;cursor:pointer;transition:.15s}.icon-btn{width:34px;height:34px;background:#263449;color:white;font-size:20px}.ghost-btn{background:#1d2939;border-color:#344054;color:#e5e7eb;padding:8px 10px}.ghost-btn.light{background:#fff;color:#344054;border-color:var(--line)}.primary-btn{background:#2563eb;color:white;padding:9px 13px;font-weight:750}.primary-btn:hover{background:#1d4ed8}.seg{background:#1d2939;color:#cbd5e1;padding:8px 9px;border-radius:7px}.seg.active{background:#fff;color:#111827}.mode-btn{padding:7px 9px;background:transparent;border-color:#364153;color:#aeb9c8;font-size:11px;font-weight:800}.mode-btn.active{background:#0b6b5f;color:#fff;border-color:#188476}.top-divider{width:1px;height:24px;background:#334155;margin:0 2px}
.mobile-toolbar{display:none}.workspace{height:calc(100% - var(--topbar));display:grid;grid-template-columns:var(--sidebar) 1fr var(--rightbar);min-width:940px}.left-panel,.right-panel{background:var(--panel);overflow:auto;scrollbar-width:thin}.left-panel{border-right:1px solid var(--line);padding:13px}.right-panel{border-left:1px solid var(--line);padding:13px}.section-title{font-size:10px;text-transform:uppercase;letter-spacing:.09em;font-weight:850;color:#697586;margin:17px 0 8px}.section-title.no-top{margin-top:2px}.section-title.no-margin{margin:0}.row-between{display:flex;justify-content:space-between;align-items:center}.kbd-hint{font-size:9px;color:#98a2b3;font-weight:650;letter-spacing:0;text-transform:none}
.trade-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px}.trade{border:1px solid var(--line);background:#fbfcfd;border-radius:9px;padding:8px;font-weight:720;color:#475467;cursor:pointer;text-align:left;display:flex;align-items:center;gap:7px;font-size:11px}.trade span{width:18px;text-align:center;font-size:13px}.trade:hover{background:#f6f8fb}.trade.active{border-color:#84adff;color:#1849a9;background:#eff4ff}.tool-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.tool{min-height:50px;border:1px solid var(--line);background:white;border-radius:9px;display:flex;align-items:center;gap:8px;padding:8px 9px;text-align:left;font-size:11px;font-weight:720;cursor:pointer;color:#344054}.tool>span{width:24px;height:24px;border-radius:6px;background:#f2f4f7;display:grid;place-items:center;font-size:15px;flex:0 0 24px}.tool:hover{background:#f8fafc}.tool.active{border-color:#7aa2f7;background:#eff6ff;color:#1849a9}.tool.hidden-tool{display:none}.simple-mode .tool-grid{grid-template-columns:1fr 1fr}.simple-mode .tool{min-height:56px;font-size:12px}.simple-mode .tool>span{width:28px;height:28px;flex-basis:28px}
.layers{display:flex;flex-direction:column;gap:5px}.layer-row{display:grid;grid-template-columns:24px 1fr 30px;align-items:center;gap:6px;border:1px solid var(--line);border-radius:8px;padding:6px 7px;font-size:11px}.layer-eye{border:0;background:transparent;cursor:pointer;color:#667085}.layer-eye.off{opacity:.28}.layer-color{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:6px}.mini-btn{border-color:var(--line);background:#fff;padding:5px 7px;font-size:10px;color:#475467}.mini-btn:disabled{opacity:.4;cursor:not-allowed}.library-search{width:100%;border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 9px;margin-bottom:7px;font-size:11px;outline:none}.library-search:focus{border-color:#84adff;box-shadow:0 0 0 3px #eff4ff}.library{display:flex;flex-direction:column;gap:6px}.library button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 9px;text-align:left;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px}.library button:hover{background:#f8fafc}.library b{font-size:10px;color:#667085;text-transform:uppercase}.library span{font-size:11px;color:#344054}.library em{font-style:normal;font-size:9px;color:#98a2b3}
.canvas-area{display:grid;grid-template-rows:45px 1fr 29px;min-width:0;background:#dfe6ee}.canvas-toolbar{background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 10px;gap:10px}.tool-context{font-size:11px;color:#475467;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quick-controls,.zoom-controls{display:flex;align-items:center;gap:4px}.quick-controls label{display:flex;align-items:center;gap:5px;font-size:10px;color:#667085}.quick-controls select{border:1px solid var(--line);border-radius:6px;padding:4px 6px;background:#fff}.zoom-controls button{border:1px solid var(--line);background:#fff;border-radius:6px;height:28px;min-width:28px;color:#344054;cursor:pointer}.zoom-controls button:hover{background:#f8fafc}.zoom-controls span{font-size:10px;color:#667085;min-width:42px;text-align:center}.zoom-controls .divider{width:1px;min-width:1px;height:20px;background:var(--line);margin:0 3px}
.stage-wrap{position:relative;overflow:hidden;background:#edf1f5;display:flex;min-height:0}.plan-pane,.three-pane{position:relative;min-width:0;min-height:0}.plan-pane{flex:1}.three-pane{flex:1;border-left:1px solid #cbd5e1;background:#eef3f8}.stage-wrap.view-3d .plan-pane{display:none}.stage-wrap.view-3d .three-pane{display:block;flex:1}.stage-wrap.view-split .plan-pane,.stage-wrap.view-split .three-pane{display:block;flex:1}.plan-svg,.preview3d{width:100%;height:100%;display:block}.plan-svg{background:#fbfcfd;cursor:crosshair;touch-action:none}.plan-svg.pan-cursor{cursor:grab}.plan-svg.panning{cursor:grabbing}.preview3d{background:linear-gradient(#edf4fb 0 63%,#d9dee4 63%)}.three-hint{position:absolute;left:12px;bottom:10px;background:rgba(255,255,255,.88);border:1px solid var(--line);border-radius:8px;padding:6px 9px;font-size:10px;color:#667085;backdrop-filter:blur(6px)}
.statusbar{background:#fff;border-top:1px solid var(--line);display:flex;align-items:center;gap:15px;padding:0 8px;font-size:9px;color:#667085;white-space:nowrap}.status-grow{flex:1}.status-btn{height:21px;padding:0 7px;border-color:var(--line);background:#fff;color:#667085;font-size:9px;font-weight:850}.status-btn.active{background:#e0e7ff;color:#3730a3;border-color:#c7d2fe}
.panel-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:10px;border-bottom:1px solid var(--line);gap:8px}.panel-actions{display:flex;gap:5px}.muted{font-size:10px;color:var(--muted);margin-top:4px}.danger-ghost{border-color:#fecdca;background:#fff;color:#b42318;padding:5px 7px;font-size:10px}.danger-ghost:disabled{opacity:.35;cursor:not-allowed}.properties{padding:12px 0}.properties.empty-state{text-align:center;padding:28px 10px;color:#667085}.empty-icon{font-size:32px;color:#cbd5e1;margin-bottom:8px}.properties.empty-state p{font-size:11px;line-height:1.45}.prop-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.field{display:flex;flex-direction:column;gap:4px}.field.full{grid-column:1/-1}.field label{font-size:9px;font-weight:850;color:#667085;text-transform:uppercase}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:7px;padding:7px 8px;background:#fff;color:#172033;font-size:11px}.field textarea{min-height:60px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:#84adff;box-shadow:0 0 0 3px #eff4ff}.calc-box{margin-top:10px;border:1px solid #b2ddff;background:#eff8ff;border-radius:9px;padding:10px;font-size:11px;line-height:1.5}.calc-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.calc-item{background:#fff;border:1px solid #d1e9ff;border-radius:7px;padding:7px}.calc-item span{display:block;color:#667085;font-size:9px}.calc-item strong{display:block;font-size:14px;color:#175cd3;margin-top:2px}.status-chip{display:inline-flex;padding:2px 6px;border-radius:999px;font-size:9px;font-weight:800}.status-chip.new{background:#dcfae6;color:#067647}.status-chip.existing{background:#f2f4f7;color:#344054}.status-chip.demolish{background:#fee4e2;color:#b42318}
.summary-cards{display:grid;grid-template-columns:1fr 1fr;gap:7px}.summary-card{border:1px solid var(--line);border-radius:9px;padding:9px;background:#f8fafc}.summary-card b{display:block;font-size:15px}.summary-card span{font-size:9px;color:#667085}.summary-card.accent{background:#eff8ff;border-color:#b2ddff}.workflow{border:1px solid var(--line);border-radius:10px;background:#fbfcfd;padding:10px;font-size:11px;color:#475467;line-height:1.5}.workflow ol{margin:4px 0 0;padding-left:18px}.notice-card{border:1px solid #d1e9ff;background:#f5fbff;border-radius:10px;padding:11px;margin-top:8px}.notice-card b{font-size:11px}.notice-card p{font-size:10px;color:#667085;line-height:1.45;margin:5px 0 0}
.report-dialog,.small-dialog,.menu-dialog{border:0;border-radius:14px;box-shadow:0 25px 80px rgba(15,23,42,.28);padding:0}.report-dialog{width:min(1100px,94vw);height:min(760px,88vh)}.report-dialog::backdrop,.small-dialog::backdrop,.menu-dialog::backdrop{background:rgba(15,23,42,.58)}.report-head{display:flex;justify-content:space-between;align-items:center;padding:17px 19px;border-bottom:1px solid var(--line)}.report-head h2,.dialog-head h2{margin:0;font-size:19px}.report-head p{margin:3px 0 0;font-size:11px;color:#667085}.report-tabs{padding:9px 18px;background:#f8fafc;display:flex;gap:5px;overflow:auto}.report-tabs .seg{background:#fff;color:#667085;border-color:var(--line);white-space:nowrap}.report-tabs .seg.active{background:#111827;color:#fff;border-color:#111827}.report-content{padding:17px 19px;overflow:auto;height:calc(100% - 159px)}.report-actions{height:56px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:flex-end;gap:7px;padding:0 18px}.metric-row{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-bottom:16px}.metric{border:1px solid var(--line);border-radius:10px;padding:11px;background:#fff}.metric b{font-size:18px;display:block}.metric span{font-size:10px;color:#667085}.report-section-title{font-size:12px;margin:18px 0 8px;color:#344054}.report-table{width:100%;border-collapse:collapse;font-size:11px}.report-table th,.report-table td{text-align:left;padding:8px 7px;border-bottom:1px solid var(--line2);vertical-align:top}.report-table th{font-size:9px;text-transform:uppercase;color:#667085;background:#f8fafc;position:sticky;top:0}.report-table tfoot td{font-weight:800;background:#f8fafc}.empty-report{padding:28px;border:1px dashed var(--line);border-radius:10px;text-align:center;color:#667085}.small-dialog{width:min(520px,92vw);padding:19px}.small-dialog h2{margin-top:0}.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.form-grid label{display:flex;flex-direction:column;gap:5px;font-size:10px;font-weight:800;color:#667085}.form-grid label.full{grid-column:1/-1}.form-grid input,.form-grid select,.form-grid textarea{border:1px solid var(--line);border-radius:8px;padding:9px;color:#172033}.form-grid textarea{min-height:80px;resize:vertical}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}.levels-list{display:flex;flex-direction:column;gap:7px;max-height:340px;overflow:auto}.level-row{display:grid;grid-template-columns:1fr 90px auto;gap:7px;align-items:center;border:1px solid var(--line);border-radius:8px;padding:7px}.level-row input{border:1px solid var(--line);border-radius:6px;padding:7px;min-width:0}.level-row button{border:1px solid #fecdca;background:#fff;color:#b42318;border-radius:6px;padding:6px 7px;cursor:pointer}.add-level{display:grid;grid-template-columns:1fr 100px auto;gap:7px;margin-top:12px}.add-level input{border:1px solid var(--line);border-radius:7px;padding:8px;min-width:0}.menu-dialog{padding:7px;width:240px}.menu-dialog button,.menu-dialog label{display:block;width:100%;text-align:left;border:0;background:#fff;border-radius:7px;padding:10px 11px;font-size:11px;color:#344054;cursor:pointer}.menu-dialog button:hover,.menu-dialog label:hover{background:#f2f4f7}.menu-dialog label{position:relative}.menu-dialog label input{position:absolute;inset:0;opacity:0;cursor:pointer}.toast{position:fixed;left:50%;bottom:42px;transform:translate(-50%,20px);background:#101828;color:#fff;padding:9px 13px;border-radius:9px;box-shadow:var(--shadow);font-size:11px;opacity:0;pointer-events:none;transition:.2s;z-index:100}.toast.show{opacity:1;transform:translate(-50%,0)}
.selection-box{fill:none;stroke:#2563eb;stroke-width:2;stroke-dasharray:6 4;vector-effect:non-scaling-stroke;pointer-events:none}.selection-handle{fill:#fff;stroke:#2563eb;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}.room-shape{fill:#f1f5f9;stroke:#cbd5e1;stroke-width:1.5}.room-shape.status-demolish{fill:#fff1f0;stroke:#f97066;stroke-dasharray:9 5}.room-label{font-size:16px;fill:#475467;text-anchor:middle;pointer-events:none;font-weight:700}.room-area{font-size:11px;fill:#98a2b3;text-anchor:middle;pointer-events:none}.wall-line{stroke:#344054;stroke-linecap:square}.wall-line.status-existing{stroke:#667085}.wall-line.status-demolish{stroke:#d92d20;stroke-dasharray:12 8}.wall-center{stroke:#fff;stroke-width:1;stroke-dasharray:4 4;opacity:.55;pointer-events:none}.door-line{stroke:#8b5e3c;fill:none}.window-line{stroke:#0ea5e9}.arch-symbol{fill:#fff;stroke:#475467;stroke-width:2}.elec-symbol{fill:#fff;stroke:#7c3aed;stroke-width:2}.plumb-symbol{fill:#fff;stroke:#0284c7;stroke-width:2}.heat-symbol{fill:#fff;stroke:#dc2626;stroke-width:2}.symbol-text{font-size:10px;text-anchor:middle;dominant-baseline:central;pointer-events:none;font-weight:850}.elec-text{fill:#6d28d9}.plumb-text{fill:#0369a1}.heat-text{fill:#b91c1c}.cable-line{fill:none;stroke:#7c3aed;stroke-width:2;stroke-dasharray:7 4}.pipe-line{fill:none;stroke:#0284c7;stroke-width:3}.heatpipe-line{fill:none;stroke:#dc2626;stroke-width:3;stroke-dasharray:10 4}.drywall-line{stroke:#b45309;stroke-width:10;stroke-dasharray:5 4}.measure-line{stroke:#ef4444;stroke-width:1.4}.measure-text{font-size:11px;fill:#b91c1c;text-anchor:middle;pointer-events:none}.surface-shape{fill-opacity:.23;stroke-width:1.5;stroke-dasharray:5 3}.paint-shape{stroke:#f59e0b}.wallpaper-shape{stroke:#a855f7}.floor-shape{stroke:#0f766e}.tile-shape{stroke:#0891b2}.note-text{font-size:13px;fill:#111827}.draft{stroke:#2563eb;stroke-width:2;stroke-dasharray:7 4;fill:rgba(37,99,235,.05);pointer-events:none}.object-hit{cursor:pointer}.object-hit.filtered{opacity:.08;pointer-events:none}.selected-object{filter:url(#shadow)}.object-muted{opacity:.16}.object-other-level{display:none}.object-status-demolish{opacity:.7}.object-label{font-size:9px;fill:#64748b;text-anchor:middle;pointer-events:none}.hit-line{stroke:transparent;stroke-width:20;fill:none;cursor:pointer}.line-visible{pointer-events:none}
@media(max-width:1320px){:root{--sidebar:255px;--rightbar:305px}.topbar{grid-template-columns:225px minmax(360px,1fr) auto}.brand-subtitle{display:none}.project-meta{max-width:190px}.ghost-btn{padding:7px 8px}.tool{font-size:10px;padding:7px}.right-panel,.left-panel{padding:10px}}
@media(max-width:1100px){.desktop-only{display:none}.topbar{grid-template-columns:205px minmax(300px,1fr) auto}.workspace{grid-template-columns:235px 1fr 275px}.project-meta{max-width:150px}.view-strip .seg[data-view="split"]{display:none}}
@media(max-width:900px){html,body{overflow:hidden}.topbar{height:58px;grid-template-columns:1fr auto;padding:0 9px}.brand{display:none}.project-strip{min-width:0}.project-meta{flex:1;max-width:none}.project-strip .ghost-btn,.top-select{display:none}.view-strip .seg,.view-strip .top-divider{display:none}.view-strip .primary-btn{display:none}.mobile-toolbar{height:42px;display:flex;background:#fff;border-bottom:1px solid var(--line);gap:6px;padding:5px 8px}.mobile-toolbar button{flex:1;border:1px solid var(--line);background:#fff;border-radius:7px;font-size:11px;font-weight:750;color:#344054}.workspace{height:calc(100% - 100px);display:block;min-width:0;position:relative}.left-panel,.right-panel{position:absolute;top:0;bottom:0;z-index:25;width:min(86vw,320px);box-shadow:var(--shadow);transition:transform .2s}.left-panel{left:0;transform:translateX(-105%)}.right-panel{right:0;transform:translateX(105%)}.left-panel.open{transform:none}.right-panel.open{transform:none}.canvas-area{height:100%}.metric-row{grid-template-columns:1fr 1fr}.statusbar span:nth-child(n+3):not(.status-grow){display:none}.canvas-toolbar .advanced{display:none!important}.simple-mode .advanced{display:none!important}}
@media print{body{overflow:visible;background:#fff}.app-shell,.mobile-toolbar,.toast{display:none!important}.report-dialog{position:static!important;width:100%!important;height:auto!important;box-shadow:none!important;display:block!important}.report-head button,.report-tabs,.report-actions{display:none!important}.report-content{height:auto;overflow:visible;padding:0}.report-table th{position:static}}
.level-actions{display:flex;align-items:center;gap:9px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.level-actions .muted{margin:0;line-height:1.35}
.vent-symbol{fill:#fff;stroke:#0f766e;stroke-width:2}.vent-text{fill:#0f766e}.duct-line{fill:none;stroke:#0f766e;stroke-width:5;stroke-dasharray:12 5}
.room-auto{margin-top:8px;display:flex;gap:6px;flex-wrap:wrap}.room-auto button{border:1px solid #b2ddff;background:#fff;color:#175cd3;border-radius:7px;padding:7px 9px;font-size:10px;font-weight:750;cursor:pointer}.room-auto button:hover{background:#eff8ff}
.snap-badge{display:inline-flex;align-items:center;gap:4px;background:#ecfdf3;color:#067647;border:1px solid #abefc6;border-radius:999px;padding:2px 6px;font-size:9px;font-weight:800}

/* PlanWerk Pro 3.1 – adaptive device profiles / installable app */
html,body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent}
body{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.device-btn,.install-btn{white-space:nowrap}
.device-dialog,.install-dialog{max-height:min(760px,92dvh);overflow:auto}
.device-options{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}.device-options button{min-height:88px;border:1px solid var(--line);background:#fff;border-radius:11px;padding:12px;text-align:left;cursor:pointer;color:#344054}.device-options button:hover{background:#f8fafc;border-color:#98b7ff}.device-options button.active{background:#eff6ff;border-color:#6f9df5;box-shadow:0 0 0 2px #dbeafe inset}.device-options b{display:block;font-size:13px;margin-bottom:4px}.device-options span{display:block;font-size:10px;line-height:1.4;color:#667085}.device-current{margin-top:12px;padding:10px;border-radius:9px;background:#f8fafc;border:1px solid var(--line);font-size:10px;color:#475467}.install-instructions{border:1px solid var(--line);border-radius:10px;padding:12px;background:#fff;font-size:11px;line-height:1.55;color:#344054}.install-instructions b{display:block;margin-bottom:5px}.install-instructions ol{margin:6px 0 0;padding-left:20px}.install-instructions p{margin:5px 0}.install-benefits{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.install-benefits b{grid-column:1/-1;font-size:11px}.install-benefits span{border:1px solid var(--line2);background:#f8fafc;border-radius:8px;padding:8px;font-size:10px;color:#475467}.install-btn.ready{background:#0b6b5f;border-color:#188476;color:#fff}.install-btn.installed{background:#263449;color:#aeb9c8}.mobile-toolbar button span{font-size:15px;line-height:1}

/* Effective phone profile. This also allows desktop users to preview the phone UI. */
body.device-phone .topbar{height:56px;grid-template-columns:1fr auto;padding:0 8px;gap:6px}
body.device-phone .brand{display:none}
body.device-phone .project-strip{min-width:0;gap:4px}
body.device-phone .project-meta{flex:1;max-width:none;min-width:80px}
body.device-phone .project-meta input{font-size:13px}
body.device-phone .project-meta span{font-size:8px}
body.device-phone .project-strip .ghost-btn,body.device-phone .project-strip .top-select,body.device-phone .project-strip .desktop-only{display:none!important}
body.device-phone .view-strip .seg,body.device-phone .view-strip .top-divider,body.device-phone .view-strip .primary-btn,body.device-phone .view-strip .device-btn,body.device-phone .view-strip .install-btn{display:none!important}
body.device-phone .view-strip .mode-btn{min-width:54px;min-height:38px;padding:6px}
body.device-phone .mobile-toolbar{display:grid;position:fixed;left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);height:60px;z-index:60;grid-template-columns:repeat(5,1fr);gap:3px;padding:5px 5px 7px;background:rgba(255,255,255,.97);border-top:1px solid var(--line);border-bottom:0;box-shadow:0 -8px 22px rgba(15,23,42,.08)}
body.device-phone .mobile-toolbar button{min-width:0;border:0;background:transparent;border-radius:8px;font-size:8px;font-weight:800;color:#475467;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:2px}
body.device-phone .mobile-toolbar button:active{background:#eff6ff;color:#1849a9}
body.device-phone .workspace{height:calc(100dvh - 116px - env(safe-area-inset-top) - env(safe-area-inset-bottom));display:block;min-width:0;position:relative}
body.device-phone .left-panel,body.device-phone .right-panel{position:absolute;top:0;bottom:0;z-index:50;width:100%;max-width:none;padding:12px 12px 24px;box-shadow:none;transition:transform .18s ease;background:#fff}
body.device-phone .left-panel{left:0;transform:translateX(-102%)}
body.device-phone .right-panel{right:0;transform:translateX(102%)}
body.device-phone .left-panel.open,body.device-phone .right-panel.open{transform:none}
body.device-phone .canvas-area{height:100%;grid-template-rows:44px 1fr 26px}
body.device-phone .canvas-toolbar{padding:0 5px}
body.device-phone .tool-context{display:none}
body.device-phone .quick-controls{width:100%;justify-content:flex-end}
body.device-phone .zoom-controls{width:100%;justify-content:space-between;gap:4px}
body.device-phone .zoom-controls button{height:36px;min-width:42px;font-size:16px}
body.device-phone .zoom-controls #fitBtn{font-size:10px;flex:1;max-width:100px}
body.device-phone .zoom-controls span{font-size:9px;min-width:34px}
body.device-phone .stage-wrap.view-split{flex-direction:column}
body.device-phone .stage-wrap.view-split .three-pane{border-left:0;border-top:1px solid #cbd5e1}
body.device-phone .statusbar{gap:7px;padding:0 4px;font-size:8px}
body.device-phone .statusbar span:nth-child(n+3):not(.status-grow){display:none}
body.device-phone .statusbar .status-btn{display:none}
body.device-phone .trade-tabs{grid-template-columns:1fr 1fr}
body.device-phone .trade{min-height:46px;font-size:11px}
body.device-phone .tool-grid,body.device-phone .simple-mode .tool-grid{grid-template-columns:1fr 1fr;gap:7px}
body.device-phone .tool,body.device-phone .simple-mode .tool{min-height:58px;font-size:12px;padding:9px}
body.device-phone .tool>span,body.device-phone .simple-mode .tool>span{width:30px;height:30px;flex:0 0 30px;font-size:16px}
body.device-phone .library button{min-height:48px}
body.device-phone .prop-grid{grid-template-columns:1fr}
body.device-phone .field.full{grid-column:1}
body.device-phone .field input,body.device-phone .field select,body.device-phone .field textarea{min-height:44px;font-size:16px}
body.device-phone dialog{max-width:calc(100vw - 14px);max-height:calc(100dvh - 18px)}
body.device-phone .small-dialog{width:calc(100vw - 14px);padding:14px}
body.device-phone .form-grid{grid-template-columns:1fr}
body.device-phone .form-grid label.full{grid-column:1}
body.device-phone .form-grid input,body.device-phone .form-grid select,body.device-phone .form-grid textarea{min-height:44px;font-size:16px}
body.device-phone .metric-row{grid-template-columns:1fr 1fr}
body.device-phone .report-dialog{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0}
body.device-phone .report-content{padding:12px;height:calc(100% - 166px)}
body.device-phone .report-actions{padding:6px;height:auto;display:grid;grid-template-columns:1fr 1fr 1fr}
body.device-phone .report-actions button{min-height:42px;padding:6px;font-size:10px}
body.device-phone .device-options{grid-template-columns:1fr}
body.device-phone .install-benefits{grid-template-columns:1fr}
body.device-phone .install-benefits b{grid-column:1}

/* Effective tablet profile. Drawers keep the drawing area large but controls stay touch friendly. */
body.device-tablet .topbar{height:60px;grid-template-columns:210px minmax(280px,1fr) auto;padding:0 9px;gap:7px}
body.device-tablet .brand-subtitle{display:none}
body.device-tablet .project-meta{max-width:180px}
body.device-tablet .project-strip .desktop-only{display:none!important}
body.device-tablet .view-strip .seg[data-view="split"]{display:none}
body.device-tablet .view-strip .device-btn,body.device-tablet .view-strip .install-btn{display:none}
body.device-tablet .mobile-toolbar{display:grid;position:fixed;left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);height:58px;z-index:60;grid-template-columns:repeat(5,1fr);gap:5px;padding:5px 10px;background:#fff;border-top:1px solid var(--line);box-shadow:0 -8px 22px rgba(15,23,42,.06)}
body.device-tablet .mobile-toolbar button{border:1px solid var(--line);background:#fff;border-radius:8px;font-size:10px;font-weight:800;color:#344054;display:flex;align-items:center;justify-content:center;gap:5px}
body.device-tablet .workspace{height:calc(100dvh - 118px - env(safe-area-inset-top) - env(safe-area-inset-bottom));display:block;min-width:0;position:relative}
body.device-tablet .left-panel,body.device-tablet .right-panel{position:absolute;top:0;bottom:0;z-index:50;width:min(420px,70vw);box-shadow:var(--shadow);transition:transform .18s ease}
body.device-tablet .left-panel{left:0;transform:translateX(-103%)}
body.device-tablet .right-panel{right:0;transform:translateX(103%)}
body.device-tablet .left-panel.open,body.device-tablet .right-panel.open{transform:none}
body.device-tablet .canvas-area{height:100%}
body.device-tablet .tool,body.device-tablet .trade,body.device-tablet .library button{min-height:46px}
body.device-tablet .field input,body.device-tablet .field select,body.device-tablet .field textarea{min-height:42px;font-size:15px}
body.device-tablet .statusbar span:nth-child(n+5):not(.status-grow){display:none}
body.device-tablet dialog{max-height:92dvh}

/* Desktop profile: full planning workstation. */
body.device-desktop .mobile-toolbar{display:none!important}
body.device-desktop .workspace{display:grid;grid-template-columns:var(--sidebar) 1fr var(--rightbar);min-width:940px;height:calc(100% - var(--topbar))}
body.device-desktop .left-panel,body.device-desktop .right-panel{position:static!important;transform:none!important;width:auto!important;max-width:none!important;box-shadow:none}
body.device-desktop .brand{display:flex}
body.device-desktop .project-strip .top-select,body.device-desktop .view-strip .seg,body.device-desktop .view-strip .primary-btn,body.device-desktop .view-strip .device-btn,body.device-desktop .view-strip .install-btn{display:inline-flex}

@media(max-width:520px){.device-options{grid-template-columns:1fr}.install-benefits{grid-template-columns:1fr}.install-benefits b{grid-column:1}}
@media (pointer:coarse){button,.tool,.trade,.mini-btn,.ghost-btn,.primary-btn,.seg,.mode-btn{touch-action:manipulation}}
body.device-phone .mobile-menu-dialog{width:calc(100vw - 14px);max-width:none}
body.device-phone .mobile-menu-dialog button{min-height:48px;font-size:13px}
body.device-desktop .topbar{height:var(--topbar);grid-template-columns:260px minmax(420px,1fr) auto;padding:0 14px}
body.device-desktop .project-strip .ghost-btn,body.device-desktop .project-strip .top-select{display:inline-flex!important}
body.device-desktop .view-strip .top-divider{display:block!important}

/* PlanWerk Pro 4.0 – Baustelle, Teilen und neue Gewerke */
.wide-dialog{width:min(1080px,96vw);max-height:92vh;border:0;border-radius:16px;padding:0;box-shadow:0 24px 70px rgba(15,23,42,.25)}
.wide-dialog::backdrop,.pdf-dialog::backdrop{background:rgba(15,23,42,.48)}
.wide-dialog .dialog-head,.pdf-dialog .dialog-head{padding:18px 20px;border-bottom:1px solid #e2e8f0;background:#fff;position:sticky;top:0;z-index:3}
.circuit-add{display:grid;grid-template-columns:2fr 1fr 1fr .7fr auto;gap:8px;padding:14px 20px;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.circuit-add input,.circuit-add select,.site-form input,.site-form select,.site-form textarea{min-height:42px;border:1px solid #cbd5e1;border-radius:9px;padding:8px 10px;background:#fff;font:inherit}
.data-list{padding:14px 20px;display:grid;gap:8px;max-height:62vh;overflow:auto}.data-row{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px}.data-row div:first-child{display:flex;flex-direction:column;gap:3px}.data-row span{font-size:12px;color:#64748b}
.site-form{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr 1.5fr;gap:8px;padding:14px 20px;background:#f8fafc}.site-form textarea{grid-column:1/5;min-height:74px;resize:vertical}.site-form .file-label{grid-column:5/7}.site-form button[type=submit]{grid-column:5/7}.file-label{display:flex;align-items:center;justify-content:center;min-height:42px;border:1px dashed #94a3b8;border-radius:9px;padding:8px 10px;background:#fff;cursor:pointer;text-align:center}.file-label input{display:none}
.site-list{padding:14px 20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:58vh;overflow:auto}.site-card{border:1px solid #e2e8f0;border-left:5px solid #64748b;border-radius:12px;padding:12px;background:#fff}.site-card.priority-hoch{border-left-color:#f97316}.site-card.priority-sofort{border-left-color:#dc2626}.site-card.priority-niedrig{border-left-color:#16a34a}.site-card-head{display:flex;justify-content:space-between;gap:10px}.site-card-head>div{display:flex;flex-direction:column;gap:3px}.site-card-head span{font-size:12px;color:#64748b}.site-status{white-space:nowrap;font-weight:700}.site-card p{margin:8px 0;font-size:13px}.site-photo{min-height:42px;background:#f8fafc;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:12px;overflow:hidden}.site-photo img{width:100%;max-height:220px;object-fit:cover}.site-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.pdf-dialog{width:min(1200px,97vw);height:min(900px,94vh);border:0;border-radius:16px;padding:0;box-shadow:0 24px 70px rgba(15,23,42,.25)}.pdf-toolbar{display:flex;gap:10px;align-items:center;padding:10px 16px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.pdf-toolbar #pdfName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdf-dialog iframe{display:block;width:100%;height:calc(100% - 128px);border:0;background:#e2e8f0}
.share-summary{width:100%;min-height:190px;resize:vertical;border:1px solid #cbd5e1;border-radius:10px;padding:10px;font:13px/1.45 ui-monospace,Consolas,monospace;background:#f8fafc}.share-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.whatsapp-btn{border:0;border-radius:9px;background:#25D366;color:#06280f;font-weight:800;padding:10px 14px;cursor:pointer}.small{font-size:11px}
.floorheating-shape{fill:#fecaca!important;fill-opacity:.28;stroke:#dc2626;stroke-width:2;stroke-dasharray:10 5}.drywallceiling-shape{fill:#e7e5e4!important;fill-opacity:.35;stroke:#78716c;stroke-width:2;stroke-dasharray:7 5}.skirting-line{stroke:#92400e;stroke-width:5;stroke-linecap:round}

@media(max-width:900px){.circuit-add{grid-template-columns:1fr 1fr}.circuit-add .primary-btn{grid-column:1/-1}.site-form{grid-template-columns:1fr 1fr}.site-form>*{grid-column:auto!important}.site-form textarea,.site-form .file-label,.site-form button[type=submit]{grid-column:1/-1!important}.site-list{grid-template-columns:1fr}.data-row{grid-template-columns:1fr auto}.data-row>button{grid-column:1/-1}.pdf-dialog{width:100vw;height:100vh;max-width:none;max-height:none;border-radius:0}.share-grid{grid-template-columns:1fr}}
@media print{.topbar,.mobile-toolbar,.left-panel,.right-panel,.canvas-toolbar,.statusbar,dialog:not([open]){display:none!important}}
body.device-phone #siteBtn,body.device-phone #shareBtn,body.device-tablet #siteBtn,body.device-tablet #shareBtn{display:none!important}
@media(max-width:900px){#siteBtn,#shareBtn{display:none!important}}


/* PlanWerk Pro 4.x – Installationspflicht & lokaler Datenschutz */
.install-gate[hidden]{display:none!important}.install-gate{position:fixed;inset:0;z-index:9999;background:radial-gradient(circle at 30% 15%,#233b60 0,#0f172a 42%,#07101f 100%);overflow:auto;padding:clamp(18px,4vw,48px);color:#0f172a}.install-gate-card{width:min(760px,100%);margin:0 auto;background:#fff;border-radius:22px;padding:clamp(22px,4vw,42px);box-shadow:0 30px 100px rgba(0,0,0,.35)}.install-gate-brand{display:flex;gap:14px;align-items:center;margin-bottom:20px}.install-gate-brand .brand-mark{width:54px;height:54px;font-size:18px}.install-gate-brand h1{margin:0;font-size:26px}.install-gate-brand p{margin:3px 0 0;color:#64748b}.privacy-shield{display:flex;flex-direction:column;gap:5px;background:#ecfdf3;border:1px solid #86efac;border-radius:13px;padding:14px 16px;margin:14px 0 22px}.privacy-shield strong{color:#166534}.privacy-shield span{font-size:13px;line-height:1.45;color:#365314}.install-gate-card h2{margin:0 0 8px}.install-gate-card>p{line-height:1.55}.gate-state{margin:16px 0 10px;padding:10px 12px;border-radius:9px;background:#f1f5f9;font-weight:800;color:#334155}.gate-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.gate-actions button{min-height:48px}.gate-notes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0 8px}.gate-notes span{background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px;padding:9px;font-size:12px;font-weight:700;color:#475569}body.install-required #app{display:none!important}.local-data-dialog{width:min(700px,94vw)}.local-data-status{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:16px 20px}.local-data-status>div{display:flex;flex-direction:column;gap:4px;border:1px solid #e2e8f0;border-radius:10px;padding:11px 12px;background:#f8fafc}.local-data-status span{font-size:11px;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.local-data-status strong{font-size:13px;color:#0f172a}.local-data-info{padding:2px 20px 14px}.local-data-info b{display:block;margin-top:12px}.local-data-info p{margin:4px 0 0;font-size:13px;line-height:1.5;color:#475569}.local-data-actions{padding:14px 20px 20px}.local-data-actions button{min-height:44px}@media(max-width:620px){.gate-actions,.gate-notes,.local-data-status{grid-template-columns:1fr}.install-gate{padding:10px}.install-gate-card{border-radius:15px;padding:20px 16px}.install-gate-brand h1{font-size:22px}}

/* PlanWerk 4.2 – vereinfachtes und robustes Löschen */
.tool.delete-tool{border-color:#fecdca;color:#b42318;background:#fff7f6}.tool.delete-tool>span{background:#fee4e2;color:#b42318}.tool.delete-tool.active{background:#fee4e2;border-color:#f97066;color:#912018;box-shadow:0 0 0 2px #fef3f2 inset}.quick-delete-btn{border:1px solid #fecdca;background:#fff;color:#b42318;border-radius:7px;height:30px;padding:0 10px;font-size:10px;font-weight:800;cursor:pointer;white-space:nowrap}.quick-delete-btn:disabled{opacity:.3;cursor:not-allowed}.quick-delete-btn.has-selection{background:#fff4f2;border-color:#f97066}.quick-delete-btn.has-selection:hover{background:#fee4e2}.plan-svg.delete-cursor{cursor:not-allowed}
body.device-phone .quick-delete-btn,body.device-tablet .quick-delete-btn{min-height:34px;height:34px;font-size:11px;padding:0 9px}

body.device-phone .mobile-toolbar,body.device-tablet .mobile-toolbar{grid-template-columns:repeat(6,1fr)}
body.device-phone .quick-delete-btn{display:none}
body.device-phone .quick-controls{gap:3px}
body.device-phone .zoom-controls{width:100%;flex:1}

/* PlanWerk 4.3 – Testmodus und PDF-Zeichenunterlage */
.gate-actions{grid-template-columns:1fr 1fr 1fr}.demo-btn{border:1px solid #7dd3fc;background:#ecfeff;color:#0c4a6e;border-radius:9px;font-weight:800;cursor:pointer;padding:10px 14px}.demo-btn:hover{background:#cffafe}
.demo-banner[hidden]{display:none!important}.demo-banner{position:relative;z-index:75;min-height:52px;background:#fff7ed;border-bottom:1px solid #fdba74;color:#7c2d12;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:8px 14px}.demo-banner>div:first-child{display:flex;flex-direction:column;gap:2px}.demo-banner strong{font-size:12px;letter-spacing:.05em}.demo-banner span{font-size:11px;color:#9a3412}.demo-banner>div:last-child{display:flex;gap:8px}.demo-banner button{min-height:34px;border-radius:8px;border:1px solid #fdba74;background:#fff;padding:0 11px;font-weight:800;color:#9a3412;cursor:pointer}.demo-banner .primary-btn{background:#0f172a;color:#fff;border-color:#0f172a}
body.demo-mode .topbar{box-shadow:0 1px 0 #fed7aa}body.demo-mode #saveBtn{opacity:.55}body.demo-mode #saveStatus{color:#c2410c;font-weight:800}.demo-tour-dialog{width:min(650px,94vw)}.demo-tour-body{padding:18px 20px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.demo-tour-body>div{border:1px solid #e2e8f0;background:#f8fafc;border-radius:11px;padding:12px;display:flex;flex-direction:column;gap:5px}.demo-tour-body b{font-size:12px;color:#0f172a}.demo-tour-body span{font-size:12px;line-height:1.45;color:#475569}

.plan-pane{overflow:hidden}.pdf-plan-overlay{position:absolute;left:0;top:0;z-index:0;transform-origin:0 0;background:#fff;pointer-events:none;box-shadow:0 0 0 1px rgba(15,23,42,.12);will-change:transform}.pdf-plan-overlay iframe{width:100%;height:100%;border:0;background:#fff;display:block;pointer-events:none}.plan-pane .plan-svg{position:relative;z-index:1}.plan-pane.pdf-visible .plan-svg{background:transparent}.pdf-overlay-toggle{border-color:#bae6fd!important;color:#075985!important}.pdf-overlay-toggle.active{background:#e0f2fe!important;border-color:#38bdf8!important;color:#0c4a6e!important;font-weight:800}
.pdf-overlay-controls{display:grid;grid-template-columns:1.25fr 1.4fr .7fr 1fr 1fr 1fr 1fr auto;gap:8px;align-items:end;padding:10px 16px;border-bottom:1px solid #e2e8f0;background:#fff}.pdf-overlay-controls label{font-size:10px;font-weight:800;color:#475467;display:flex;flex-direction:column;gap:5px}.pdf-overlay-controls input[type=number]{min-height:36px;border:1px solid #cbd5e1;border-radius:8px;padding:6px 8px;font:inherit;background:#fff}.pdf-overlay-controls input[type=range]{width:100%}.pdf-overlay-controls .pdf-check{flex-direction:row;align-items:center;align-self:center;font-size:11px}.pdf-overlay-controls .pdf-check input{width:18px;height:18px}.pdf-overlay-controls button{min-height:36px}.pdf-overlay-note{padding:8px 16px;background:#f0f9ff;border-bottom:1px solid #bae6fd;color:#075985;font-size:11px;line-height:1.4}.pdf-dialog iframe#pdfViewer{height:calc(100% - 220px)}

@media(max-width:900px){.demo-banner{position:relative;flex-direction:column;align-items:stretch;padding:7px 10px}.demo-banner>div:last-child{display:grid;grid-template-columns:1fr 1fr}.demo-banner button{width:100%}.demo-tour-body{grid-template-columns:1fr}.pdf-overlay-controls{grid-template-columns:1fr 1fr}.pdf-overlay-controls .pdf-check,.pdf-overlay-controls button{grid-column:1/-1}.pdf-dialog iframe#pdfViewer{height:calc(100% - 390px)}}
@media(max-width:620px){.gate-actions{grid-template-columns:1fr}.demo-banner span{font-size:10px}.pdf-overlay-controls{grid-template-columns:1fr 1fr}.pdf-overlay-note{font-size:10px}.demo-tour-body{padding:12px}}


/* V4.4 – PDF-Kalibrierung / direkte Ausrichtung */
.pdf-calibration-bar{position:fixed;z-index:1200;left:50%;top:10px;transform:translateX(-50%);display:flex;align-items:center;gap:14px;max-width:min(92vw,850px);padding:10px 12px;border-radius:12px;background:#7f1d1d;color:#fff;box-shadow:0 10px 30px rgba(15,23,42,.28);font-size:13px}
.pdf-calibration-bar[hidden]{display:none}.pdf-calibration-bar button{min-height:36px;border:1px solid rgba(255,255,255,.5);border-radius:9px;background:#fff;color:#7f1d1d;font-weight:800;padding:7px 12px;white-space:nowrap}
.pdf-overlay-controls #pdfCalibrateBtn,.pdf-overlay-controls #pdfMoveBtn{min-height:38px}
.pdf-calibration-dialog .calibration-form-body{padding:18px 20px;display:grid;gap:14px}.calibration-measured{padding:12px;border-radius:10px;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;font-weight:800}.pdf-calibration-dialog label{display:grid;gap:6px;font-weight:800;color:#344054}.pdf-calibration-dialog input{min-height:44px;border:1px solid #cbd5e1;border-radius:9px;padding:8px 10px;font:inherit;font-size:17px}
@media(max-width:900px){.pdf-calibration-bar{top:auto;bottom:76px;left:8px;right:8px;transform:none;max-width:none;flex-direction:column;align-items:stretch;gap:7px}.pdf-calibration-bar button{width:100%}.pdf-overlay-controls #pdfCalibrateBtn,.pdf-overlay-controls #pdfMoveBtn{grid-column:1/-1}}

.pdf-dialog[open]{display:flex;flex-direction:column}.pdf-dialog iframe#pdfViewer{flex:1;min-height:220px;height:auto!important}

/* V4.5 PDF-Unterlage / Wand-Nachzeichnung */
.pdf-plan-overlay.pdf-locked{box-shadow:0 0 0 2px rgba(22,163,74,.22)}
.pdf-overlay-controls button:disabled{opacity:.45;cursor:not-allowed}
.pdf-trace-box{margin:14px 18px;padding:14px;border:1px solid #bbf7d0;background:#f0fdf4;border-radius:12px;display:grid;gap:10px}
.pdf-trace-box p{margin:4px 0 0}.pdf-trace-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.pdf-trace-options label{display:grid;gap:5px;font-weight:700;color:#344054}.pdf-trace-options input,.pdf-trace-options select{min-height:40px;border:1px solid #cbd5e1;border-radius:8px;padding:6px 8px;background:#fff;font:inherit}
.pdf-trace-options .pdf-check{display:flex;align-items:center;gap:8px}.pdf-trace-options .pdf-check input{min-height:auto}.pdf-trace-options #pdfTraceBtn{grid-column:1/-1}
.pdf-action-buttons{display:flex;gap:7px;flex-wrap:wrap}.pdf-action-buttons button[hidden]{display:none}
@media(max-width:900px){.pdf-trace-options{grid-template-columns:1fr}.pdf-trace-options #pdfTraceBtn{grid-column:auto}.pdf-action-buttons{width:100%}.pdf-action-buttons button{flex:1 1 auto}.pdf-calibration-bar strong{text-align:center}}


/* V4.6.0 – automatische Updates & Schnellöffnungen */
.update-overlay[hidden]{display:none!important}.update-overlay{position:fixed;inset:0;z-index:12000;background:rgba(7,16,31,.88);display:grid;place-items:center;padding:20px}.update-card{width:min(520px,92vw);background:#fff;border-radius:18px;padding:28px;box-shadow:0 30px 100px rgba(0,0,0,.4);text-align:center}.update-card h2{margin:10px 0 7px}.update-card p{margin:0 0 16px;color:#475569;line-height:1.5}.update-card small{display:block;margin-top:10px;color:#64748b}.update-spinner{width:44px;height:44px;border-radius:50%;border:5px solid #dbeafe;border-top-color:#2563eb;margin:0 auto;animation:pwspin .85s linear infinite}@keyframes pwspin{to{transform:rotate(360deg)}}.update-progress{height:9px;background:#e2e8f0;border-radius:999px;overflow:hidden}.update-progress span{display:block;height:100%;width:10%;background:#2563eb;border-radius:999px;transition:width .25s ease}.opening-tool{border-color:#93c5fd!important;background:#eff6ff!important}.opening-dialog .opening-help{margin:13px 0 2px;padding:11px 12px;border-radius:9px;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;font-size:12px;line-height:1.45}.pdf-trace-options #pdfOpeningBtn{grid-column:1/-1}.wall-opening-hint{stroke:#fff;stroke-width:2}.local-data-actions{flex-wrap:wrap}


/* V4.7 Material & Bestellung */
.material-top-btn{border-color:#0f766e!important;background:#ecfdf5!important;color:#065f46!important;font-weight:800}.material-dialog{width:min(1180px,96vw);max-height:94vh}.material-summary .metric-row{margin:4px 0 12px}.material-toolbar{display:grid;grid-template-columns:180px 180px minmax(220px,1fr) auto;gap:8px;align-items:center;margin:8px 0 10px}.material-toolbar select,.material-toolbar input,.material-fields input{width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:9px;background:#fff;color:#0f172a}.material-explain,.material-footer-note{background:#f0fdfa;border:1px solid #99f6e4;border-radius:10px;padding:10px 12px;color:#134e4a;font-size:12px;line-height:1.45;margin:8px 0 12px}.material-footer-note{background:#f8fafc;border-color:#cbd5e1;color:#475569}.material-list{display:grid;gap:10px;max-height:58vh;overflow:auto;padding:2px 3px 10px}.material-card{border:1px solid #cbd5e1;border-left:5px solid #94a3b8;border-radius:12px;background:#fff;padding:12px}.material-card.status-missing{border-left-color:#dc2626}.material-card.status-ordered{border-left-color:#d97706}.material-card.status-ready{border-left-color:#0284c7}.material-card.status-installed{border-left-color:#16a34a}.material-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.material-card-head h3{margin:2px 0 2px;font-size:15px}.material-card-head p{margin:0;color:#64748b;font-size:11px}.material-trade{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#64748b;font-weight:800}.material-status{border-radius:999px;background:#e2e8f0;padding:4px 8px;font-size:11px;font-weight:800;white-space:nowrap}.status-missing .material-status{background:#fee2e2;color:#991b1b}.status-ordered .material-status{background:#fef3c7;color:#92400e}.status-ready .material-status{background:#dbeafe;color:#1e40af}.status-installed .material-status{background:#dcfce7;color:#166534}.material-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:10px 0}.material-metrics>div{border:1px solid #e2e8f0;border-radius:8px;padding:8px;background:#f8fafc}.material-metrics span{display:block;font-size:10px;color:#64748b}.material-metrics b{font-size:14px}.material-metrics .need{background:#fff7ed;border-color:#fed7aa}.material-note{font-size:11px;color:#475569;margin:4px 0 8px}.material-fields{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:7px}.material-fields label{font-size:10px;color:#475569;font-weight:700}.material-fields label.full{grid-column:1/-1}.material-fields input{margin-top:3px;padding:7px;font-size:12px}.material-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.material-actions button:disabled{opacity:.45;cursor:not-allowed}.material-dialog-actions{position:sticky;bottom:0;background:#fff;padding-top:10px;border-top:1px solid #e2e8f0;margin-top:8px}
@media(max-width:900px){.material-toolbar{grid-template-columns:1fr 1fr}.material-toolbar input{grid-column:1/-1}.material-fields{grid-template-columns:1fr 1fr}.material-metrics{grid-template-columns:1fr 1fr}.material-list{max-height:62vh}.material-dialog-actions{display:grid;grid-template-columns:1fr 1fr}.material-dialog-actions .primary-btn{grid-column:1/-1}}
@media(max-width:560px){.material-toolbar{grid-template-columns:1fr}.material-toolbar input{grid-column:auto}.material-fields{grid-template-columns:1fr 1fr}.material-card{padding:10px}.material-card-head{align-items:center}.material-metrics{grid-template-columns:1fr 1fr}.material-actions{display:grid;grid-template-columns:1fr 1fr}.material-actions button{min-height:44px}.material-dialog-actions{grid-template-columns:1fr 1fr}.material-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}}


/* V4.9 · Lifecycle / Bauteilpass / Material / Baustelle */
.asset-quick-card{margin-top:12px;padding:10px;border:1px solid #d7e0ea;border-radius:12px;background:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:10px}.asset-quick-card>div{display:grid;gap:2px}.asset-quick-card span,.asset-quick-card small{font-size:11px;color:#667085}.asset-quick-card b{font-size:13px;color:#101828}.asset-pass-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:18px}.asset-pass-main h3,.asset-qr-panel h3{margin:18px 0 8px}.asset-pass-actions{display:flex;gap:8px;margin-top:10px}.asset-qr-panel{border:1px solid #d7e0ea;border-radius:14px;padding:14px;background:#f8fafc;align-self:start;display:grid;gap:10px}.asset-qr{background:white;border:1px solid #e4e7ec;border-radius:12px;padding:10px;display:grid;place-items:center}.asset-qr svg{width:min(100%,240px);height:auto}.asset-qr-link{font-size:9px;line-height:1.3;color:#667085;word-break:break-all}.asset-file-picker{display:inline-flex;align-items:center;gap:8px;border:1px dashed #98a2b3;padding:10px 12px;border-radius:10px;cursor:pointer;background:#fff}.asset-file-picker input{display:none}.asset-documents{display:grid;gap:7px;margin-top:10px}.asset-doc-row{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid #e4e7ec;border-radius:10px;padding:9px 10px;background:#fff}.asset-doc-row>div:first-child{display:grid;gap:2px}.asset-doc-row span{font-size:11px;color:#667085}.asset-doc-row>div:last-child{display:flex;gap:6px}.where-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) 180px 180px auto;gap:8px;align-items:center;margin-bottom:12px}.where-toolbar input,.where-toolbar select{min-height:40px}.where-installed-list{display:grid;gap:8px;max-height:65vh;overflow:auto;padding-right:3px}.where-card{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid #e4e7ec;border-radius:12px;padding:11px;background:white}.where-card h3{margin:2px 0 3px;font-size:14px}.where-card p,.where-card small{margin:0;color:#667085;font-size:11px}.where-card>div:first-child>span{font-size:10px;font-weight:800;color:#475467}.where-card>div:last-child{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}@media(max-width:800px){.asset-pass-layout{grid-template-columns:1fr}.asset-qr-panel{order:-1}.where-toolbar{grid-template-columns:1fr 1fr}.where-toolbar input{grid-column:1/-1}.where-card{align-items:flex-start;flex-direction:column}.where-card>div:last-child{width:100%}.where-card button{flex:1}.asset-doc-row{align-items:flex-start;flex-direction:column}.asset-doc-row>div:last-child{width:100%}.asset-pass-actions{flex-direction:column}.asset-pass-actions button{width:100%}}
/* V4.9 Baustellen-Lifecycle */
.asset-doc-upload,.maintenance-entry,.measure-actions,.revision-toolbar,.revision-compare-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.asset-doc-upload select,.maintenance-entry input,.revision-compare-controls select{min-width:150px}.maintenance-entry input:nth-child(2){flex:1 1 260px}.recipe-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px;margin:14px 0}.recipe-card{border:1px solid #d0d5dd;border-radius:12px;padding:12px;background:#fff}.recipe-card b{display:block;margin-bottom:4px}.recipe-card small{color:#667085}.revision-list{display:grid;gap:8px;margin:12px 0;max-height:42vh;overflow:auto}.revision-row{display:grid;grid-template-columns:1fr auto;gap:10px;border:1px solid #d0d5dd;border-radius:10px;padding:10px;background:#fff}.revision-row span{display:block;color:#667085;font-size:12px;margin-top:3px}.pdf-revision-overlay{filter:sepia(1) saturate(7) hue-rotate(315deg);mix-blend-mode:multiply;z-index:1}.pdf-visible #pdfPlanOverlay{z-index:2}.camera-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(230px,1fr);gap:12px}.camera-stage{position:relative;min-height:360px;background:#111827;border-radius:12px;overflow:hidden}.camera-stage video{width:100%;height:100%;min-height:360px;object-fit:cover}.camera-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.camera-controls{display:grid;gap:10px;align-content:start}.camera-controls label{display:grid;gap:4px}.lifecycle-pill{display:inline-block;padding:3px 7px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:11px}.variance-pos{color:#b42318}.variance-neg{color:#027a48}.variance-zero{color:#475467}.toggle-row{display:flex;gap:8px;align-items:center;margin:10px 0}.measure-log-item{display:grid;grid-template-columns:1fr auto;gap:8px;border:1px solid #e4e7ec;border-radius:10px;padding:9px}.measure-log-item span{color:#667085;font-size:12px}.handover-doc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}.handover-thumb{border:1px solid #d0d5dd;border-radius:8px;padding:8px}.handover-thumb img{width:100%;max-height:180px;object-fit:contain}.voice-example{font-size:12px;color:#667085}
@media(max-width:900px){.camera-layout{grid-template-columns:1fr}.camera-stage,.camera-stage video{min-height:280px}.maintenance-entry>*{flex:1 1 140px}}

.pdf-plan-overlay.revision-current-tint{filter:sepia(1) saturate(6) hue-rotate(145deg);mix-blend-mode:multiply;}

/* V5.0 – konfigurierbare Rezepte, Revisionanalyse, Lasermessgeräte */
.recipe-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0}.recipe-editor{display:grid;gap:10px;margin:12px 0;max-height:56vh;overflow:auto;padding-right:2px}.recipe-edit-row{display:grid;grid-template-columns:90px minmax(150px,1fr) minmax(180px,1.3fr) minmax(160px,1.2fr) minmax(150px,1fr) 95px 100px 90px 110px minmax(180px,1.2fr) auto;gap:8px;align-items:end;border:1px solid #d0d5dd;border-radius:12px;padding:10px;background:#fff}.recipe-edit-row label{display:grid;gap:4px;font-size:11px;color:#475467}.recipe-edit-row input,.recipe-edit-row select{min-width:0}.recipe-edit-row .check-inline{display:flex;align-items:center;gap:6px;padding-bottom:8px}.revision-analysis{display:grid;gap:10px;margin-top:12px}.revision-change-group{border:1px solid #d0d5dd;border-radius:12px;padding:10px;background:#f8fafc}.revision-change-group h3{margin:0 0 8px}.revision-change-group small{display:block;color:#667085;margin-top:3px}.laser-panel{border:1px solid #b9c3d0;border-radius:12px;padding:12px;margin-bottom:14px;background:#f8fafc}.laser-panel h3{margin:0 0 10px}.laser-panel .check-inline{align-self:end;padding-bottom:8px}
@media(max-width:1100px){.recipe-edit-row{grid-template-columns:repeat(2,minmax(0,1fr))}.recipe-edit-row .recipe-note{grid-column:1/-1}.recipe-edit-row button{justify-self:start}}
@media(max-width:640px){.recipe-edit-row{grid-template-columns:1fr}.recipe-edit-row .recipe-note{grid-column:auto}.recipe-toolbar>*{width:100%}.laser-panel .form-grid{grid-template-columns:1fr}}


/* PlanWerk 5.1 – mobile reliability, sorted PDFs and encrypted device sync */
@media(max-width:900px){
  .topbar .view-strip .mode-btn{display:none!important}
  dialog,.wide-dialog,.small-dialog,.menu-dialog,.pdf-dialog{overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  .wide-dialog{max-height:calc(100dvh - 12px);width:calc(100vw - 12px)}
  .menu-dialog{max-height:calc(100dvh - 24px);overflow-y:auto;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
  .mobile-toolbar{pointer-events:auto}
  .mobile-toolbar button{pointer-events:auto;touch-action:manipulation;user-select:none;-webkit-user-select:none}
  .dialog-actions{position:sticky;bottom:0;background:rgba(255,255,255,.98);z-index:4;padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}
}
body.device-phone .mobile-toolbar,body.device-tablet .mobile-toolbar{grid-template-columns:repeat(6,minmax(0,1fr))!important}
body.device-phone .mobile-toolbar button{font-size:7.5px;line-height:1.05}
body.device-phone .mobile-toolbar button span{font-size:17px}
body.device-phone .mobile-menu-dialog{height:min(82dvh,760px);margin:auto 7px 7px;position:fixed;inset:auto 0 0;border-radius:18px 18px 0 0;padding:10px}
body.device-phone .mobile-menu-dialog button{min-height:52px;font-size:13px;border-bottom:1px solid #eef2f6}

.pdf-report-toolbar{display:flex;gap:12px;align-items:end;padding:16px 18px;border-bottom:1px solid var(--line);background:#f8fafc}.pdf-report-toolbar label{display:flex;flex-direction:column;gap:5px;font-size:10px;font-weight:800;color:#667085}.pdf-report-toolbar select{min-height:38px;border:1px solid var(--line);border-radius:8px;padding:6px 9px;background:#fff}.pdf-report-toolbar span{font-size:11px;color:#667085}.pdf-report-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:18px}.pdf-report-grid button{min-height:112px;border:1px solid var(--line);border-radius:12px;background:#fff;text-align:left;padding:14px;cursor:pointer;color:#344054}.pdf-report-grid button:active{background:#eff6ff}.pdf-report-grid b{display:block;font-size:14px;margin-bottom:6px;color:#101828}.pdf-report-grid span{font-size:11px;line-height:1.45;color:#667085}.pdf-report-grid .pdf-report-all{grid-column:1/-1;background:#f8fafc;border-color:#98a2b3}

.sync-warning{margin:0 18px 12px;padding:12px 14px;background:#eff8ff;border:1px solid #b2ddff;border-radius:10px;color:#1849a9;font-size:12px;line-height:1.45}.sync-status-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:0 18px 14px}.sync-status-grid>div{border:1px solid var(--line);border-radius:10px;padding:10px;background:#fff;display:flex;flex-direction:column;gap:3px}.sync-status-grid span{font-size:9px;text-transform:uppercase;color:#667085}.sync-status-grid strong{font-size:12px}.sync-actions{display:flex;flex-wrap:wrap;gap:8px;padding:0 18px 12px}.sync-actions button{min-height:42px}.sync-auto{margin:0 18px 12px;display:flex;gap:8px;align-items:flex-start;font-size:12px;color:#344054}.sync-auto input{width:20px;height:20px;flex:0 0 auto}.sync-link-box{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end;padding:12px 18px;background:#f8fafc;border-block:1px solid var(--line)}.sync-link-box label{display:flex;flex-direction:column;gap:5px;font-size:10px;font-weight:800;color:#667085}.sync-link-box input{min-height:42px;border:1px solid var(--line);border-radius:8px;padding:8px;font-size:12px}.sync-qr{display:flex;justify-content:center;padding:12px}.sync-qr svg{width:min(260px,70vw);height:auto}.sync-conflict{margin:10px 18px;padding:13px;border:1px solid #fda29b;background:#fff4ed;border-radius:10px;display:flex;flex-direction:column;gap:7px}.sync-conflict[hidden]{display:none!important}.sync-conflict span{font-size:12px;color:#7a271a}.sync-conflict>div{display:flex;gap:8px;flex-wrap:wrap}.sync-footer{display:flex;align-items:center;gap:12px;padding:14px 18px}.sync-footer span{font-size:10px;color:#667085;line-height:1.4}
@media(max-width:720px){.pdf-report-grid{grid-template-columns:1fr}.pdf-report-grid .pdf-report-all{grid-column:1}.pdf-report-toolbar{align-items:stretch;flex-direction:column}.sync-status-grid{grid-template-columns:1fr 1fr}.sync-link-box{grid-template-columns:1fr}.sync-footer{align-items:stretch;flex-direction:column}.sync-actions{display:grid;grid-template-columns:1fr 1fr}.sync-actions button{width:100%}}
@media(max-width:420px){.sync-status-grid{grid-template-columns:1fr}.sync-actions{grid-template-columns:1fr}}


/* PlanWerk Pro 5.2 – desktop reliability / help / canvas startup */
@media (min-width:901px){
  body.device-desktop .topbar{height:96px!important;grid-template-columns:230px minmax(0,1fr)!important;grid-template-rows:48px 48px!important;align-items:center!important;padding:0 14px!important;gap:0 12px!important}
  body.device-desktop .brand{grid-column:1;grid-row:1}
  body.device-desktop .project-strip{grid-column:2;grid-row:1;min-width:0;overflow:visible}
  body.device-desktop .view-strip{grid-column:1/-1;grid-row:2;justify-content:flex-start!important;gap:6px;overflow-x:auto;overflow-y:hidden;padding:6px 0;border-top:1px solid rgba(255,255,255,.08);scrollbar-width:thin}
  body.device-desktop .view-strip>button,body.device-desktop .view-strip>.seg{flex:0 0 auto;white-space:nowrap}
  body.device-desktop .workspace{height:calc(100dvh - 96px)!important;min-height:0}
  body.device-desktop #projectMenuBtn,body.device-desktop #helpBtn{display:inline-flex!important;align-items:center;justify-content:center}
  body.device-desktop .project-meta{max-width:340px!important;flex:1 1 260px}
  body.device-desktop .canvas-area,body.device-desktop .stage-wrap,body.device-desktop .plan-pane{min-height:0}
  body.device-desktop .stage-wrap{isolation:isolate}
  body.device-desktop .plan-svg{min-height:240px;visibility:visible!important;opacity:1!important}
}
@media (min-width:901px) and (max-width:1180px){
  body.device-desktop .topbar{grid-template-columns:180px minmax(0,1fr)!important}
  body.device-desktop .brand-subtitle{display:none}
  body.device-desktop .project-meta{max-width:240px!important}
  body.device-desktop .view-strip{gap:4px}
  body.device-desktop .view-strip .mode-btn,body.device-desktop .view-strip .seg,body.device-desktop .view-strip .primary-btn{font-size:10px;padding:7px 8px}
}
.menu-dialog{max-height:min(78dvh,680px);overflow:auto}
dialog[open]{display:block}
.help-dialog{width:min(980px,94vw);max-height:90dvh;overflow:auto;border:0;border-radius:16px;padding:20px;box-shadow:0 25px 80px rgba(15,23,42,.30)}
.help-dialog::backdrop{background:rgba(15,23,42,.58)}
.help-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:20px}
.help-quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 18px}
.help-quick-grid article{border:1px solid var(--line);border-radius:10px;padding:12px;background:#f8fafc}
.help-quick-grid b{display:block;font-size:12px;margin-bottom:5px}.help-quick-grid span{font-size:11px;line-height:1.45;color:#667085}
.help-main h3,.help-docs h3{font-size:13px;margin:16px 0 8px}.help-steps{font-size:11px;line-height:1.55;padding-left:20px}.help-steps li{margin:6px 0}.help-note{border:1px solid #b2ddff;background:#eff8ff;border-radius:10px;padding:11px;font-size:11px;line-height:1.5}.help-copy{font-size:11px;line-height:1.55;color:#475467}
.help-docs{border-left:1px solid var(--line);padding-left:18px}.help-link{display:block!important;text-decoration:none;text-align:center;margin:8px 0}.help-status{margin-top:14px;border:1px solid var(--line);border-radius:10px;padding:11px;background:#f8fafc}.help-status b,.help-status span{display:block}.help-status span{font-size:10px;color:#667085;line-height:1.45;margin-top:4px}
@media(max-width:900px){.help-layout{grid-template-columns:1fr}.help-docs{border-left:0;border-top:1px solid var(--line);padding:12px 0 0}.help-quick-grid{grid-template-columns:1fr}.help-dialog{width:calc(100vw - 14px);max-height:88dvh;margin:auto 7px 7px;border-radius:18px 18px 0 0;padding:14px}}

/* V5.2.1 mobile canvas width guard */
body.device-phone #quickDeleteBtn,
body.device-phone #pdfOverlayBtn{display:none!important}
body.device-phone .canvas-toolbar,
body.device-phone .quick-controls,
body.device-phone .zoom-controls{min-width:0;max-width:100%;width:100%}
body.device-phone .quick-controls{overflow:hidden}
body.device-phone .zoom-controls{justify-content:space-between}
body.device-phone .zoom-controls #fitBtn{max-width:78px;min-width:64px}

/* V5.3 – Fehler melden / Rechtliches */
.bug-report-fab{position:fixed;right:16px;bottom:34px;z-index:80;display:flex;align-items:center;gap:7px;min-height:38px;padding:8px 12px;border:1px solid #fca5a5;border-radius:999px;background:#fff1f2;color:#991b1b;box-shadow:0 10px 26px rgba(15,23,42,.18);font-size:12px;font-weight:850;cursor:pointer}.bug-report-fab:hover{background:#ffe4e6}.bug-report-fab span{font-size:15px}.bug-report-dialog .dialog-head,.legal-dialog .dialog-head{position:sticky;top:0;z-index:3;background:#fff}.bug-report-form{padding:0 18px 18px}.bug-report-form textarea{min-height:100px;resize:vertical}.bug-report-form .bug-diagnostics{display:flex;align-items:flex-start;gap:9px;border:1px solid #dbeafe;background:#eff6ff;border-radius:10px;padding:10px;color:#1e3a8a}.bug-report-form .bug-diagnostics input{width:20px;height:20px;flex:0 0 auto;margin-top:1px}.bug-report-status{min-height:24px;padding:2px 0 6px;font-size:12px;font-weight:700;color:#475569}.bug-report-status.ok{color:#166534}.bug-report-status.error{color:#991b1b}.hp-field{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important}.legal-dialog{width:min(980px,96vw);max-height:94vh}.legal-nav{position:sticky;top:66px;z-index:2;display:flex;gap:8px;padding:8px 18px;background:#f8fafc;border-bottom:1px solid var(--line)}.legal-content{padding:16px 20px 28px;max-height:74vh;overflow:auto;scroll-behavior:smooth}.legal-content section{scroll-margin-top:120px}.legal-content h3{font-size:20px;margin:8px 0 14px}.legal-content h4{margin:18px 0 6px}.legal-content p,.legal-content address{font-size:12px;line-height:1.65;color:#344054}.legal-content address{font-style:normal}.legal-content a{color:#1d4ed8}.gate-legal-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:14px}.link-btn{border:0;background:transparent;color:#1d4ed8;text-decoration:underline;font-size:11px;font-weight:750;cursor:pointer;padding:4px}.danger-link{color:#b42318}.gate-copyright{text-align:center;font-size:10px;color:#667085;margin-top:6px}.copyright-status{font-size:9px;color:#98a2b3}.statusbar #legalStatusBtn{min-width:auto}.project-strip #legalBtn{white-space:nowrap}
@media(max-width:900px){.bug-report-fab{right:10px;bottom:50px;min-width:42px;min-height:42px;padding:9px 10px}.bug-report-fab b{display:none}.bug-report-fab span{font-size:17px}.copyright-status{display:none!important}.legal-nav{top:58px}.legal-content{max-height:72vh;padding:14px}.bug-report-dialog .form-grid{grid-template-columns:1fr}.bug-report-form{padding:0 12px 14px}}
@media(max-width:420px){.bug-report-fab{right:8px;bottom:48px}.legal-nav{gap:5px;padding:7px 10px}.legal-nav button{flex:1}.legal-content p,.legal-content address{font-size:11px}}
@media print{.bug-report-fab{display:none!important}}
\n/* V5.4.0 – robust Rechtliches / click reliability */
.legal-fallback-link,.gate-legal-links a,.menu-dialog a{box-sizing:border-box;text-decoration:none}
.menu-dialog a{display:block;width:100%;padding:10px 12px;color:inherit;border:0;border-bottom:1px solid var(--line);background:#fff;font:inherit;text-align:left;cursor:pointer}
.menu-dialog a:hover{background:#f8fafc}
.mobile-menu-dialog a{min-height:52px;font-size:13px;display:flex;align-items:center}
.legal-nav .legal-page-link{margin-left:auto;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
@media (min-width:901px){body.device-desktop #legalBtn{display:inline-flex!important;align-items:center;justify-content:center}}
@media (min-width:901px) and (max-width:1180px){body.device-desktop #legalStatusBtn{display:none!important}}


/* V5.4.0 – erweiterter Gewerke- und eigener Bauteilkatalog */
.catalog-form{padding:4px 0 16px}.catalog-list{display:grid;gap:8px;max-height:42vh;overflow:auto;border-top:1px solid var(--line,#e5e7eb);padding-top:12px}.catalog-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line,#e5e7eb);border-radius:10px;background:#fff}.catalog-row>div{display:grid;gap:2px;min-width:0}.catalog-row span,.catalog-row small{color:#667085}.catalog-row b,.catalog-row span,.catalog-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.catalog-dialog{width:min(900px,94vw)}
