@font-face{
  font-family:'Roboto';
  src:url('assets/fonts/Roboto-Regular.ttf') format('truetype');
  font-style:normal;
  font-weight:400;
  font-display:swap;
}
@font-face{
  font-family:'Roboto';
  src:url('assets/fonts/Roboto-Medium.ttf') format('truetype');
  font-style:normal;
  font-weight:500;
  font-display:swap;
}
@font-face{
  font-family:'Roboto';
  src:url('assets/fonts/Roboto-Bold.ttf') format('truetype');
  font-style:normal;
  font-weight:700;
  font-display:swap;
}

:root{--cad-border:#ded8cf;--cad-panel:#f8f6f2;--cad-accent:#a88b61;--cad-dark:#292a28}.cad-page{height:100vh;overflow:hidden;background:#ece9e3}.cad-site-header{position:relative;height:70px;padding-left:28px;padding-right:28px;background:#f6f2eb}.cad-site-header .nav a.active{font-weight:700}.cad-app{height:calc(100vh - 82px);display:flex;flex-direction:column;min-height:0}.cad-commandbar{height:62px;flex:0 0 62px;background:#fff;border-bottom:1px solid var(--cad-border);display:grid;grid-template-columns:minmax(250px,1fr) auto auto minmax(250px,1fr);align-items:center;padding:0 16px;gap:16px}.project-block{display:flex;align-items:center;gap:12px;min-width:0}.back-link{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--cad-border);border-radius:9px}.project-block>div{display:grid;min-width:0}.project-block input{font:650 15px/1.2 inherit;border:0;background:transparent;outline:0;width:220px;padding:0;color:#292a28}.project-block span{font-size:10px;color:#999;margin-top:2px}.history-actions,.command-actions,.view-switch{display:flex;gap:6px;align-items:center}.cad-commandbar button{border:1px solid var(--cad-border);background:#fff;border-radius:9px;min-height:34px;padding:0 11px;cursor:pointer;color:#555}.history-actions button{width:34px;padding:0;font-size:18px}.view-switch{background:#f0ede8;padding:3px;border-radius:10px}.view-switch button{border:0;background:transparent;min-width:82px}.view-switch button.active{background:#fff;color:#222;background:#f7f1e7}.command-actions .save{background:var(--cad-dark);color:#fff;border-color:var(--cad-dark);padding:0 17px}.cad-workspace{display:grid;grid-template-columns:76px minmax(0,1fr) 272px;min-height:0;flex:1}.tool-rail{background:#fff;border-right:1px solid var(--cad-border);padding:10px 7px;display:flex;flex-direction:column;gap:4px;z-index:2}.tool{border:0;background:transparent;border-radius:10px;height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;color:#5e5e5a}.tool b{font-size:20px;line-height:20px;font-weight:500}.tool span{font-size:10px}.tool:hover{background:#f5f2ed}.tool.active{background:#eee7dc;color:#806742}.rail-separator{height:1px;background:#eeeae4;margin:4px 7px}.viewport-shell{position:relative;overflow:hidden;background:#f7f7f5;min-width:0}.viewport-shell canvas{display:block;width:100%;height:100%;cursor:default}.tool-hint{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:#2c2d2b;color:#fff;border-radius:999px;padding:7px 13px;font-size:11px;pointer-events:none;left:50%;top:48%;transform:translate(-50%,-50%);display:grid;text-align:center;gap:4px;pointer-events:none;color:#777}.empty-help b{font-family:'Roboto',Arial,sans-serif;color:#555}.empty-help span{font-size:12px}.coords{position:absolute;left:12px;bottom:10px;background:#ffffffdb;border:1px solid var(--cad-border);border-radius:8px;padding:6px 9px;font:11px ui-monospace,Consolas,monospace;display:flex;gap:18px;color:#666}.zoom-box{position:absolute;right:12px;bottom:10px;display:flex;background:#fff;border:1px solid var(--cad-border);border-radius:9px;overflow:hidden}.zoom-box button{width:36px;height:34px;border:0;background:#fff;font-size:18px;cursor:pointer}.zoom-box button+button{border-left:1px solid var(--cad-border)}.properties{background:var(--cad-panel);border-left:1px solid var(--cad-border);padding:18px;overflow:auto}.properties-head{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--cad-border);padding-bottom:14px;margin-bottom:16px}.properties-head small{font-size:9px;letter-spacing:.14em;color:#9b8b76}.properties-head h2{font-family:'Roboto',Arial,sans-serif;margin:3px 0 0}.properties-head button{border:0;background:transparent;font-size:20px;color:#aaa}.property-content{display:grid;gap:15px}.property-content label{display:grid;gap:6px;font-size:11px;font-weight:650;color:#666}.input-unit{display:flex;background:#fff;border:1px solid var(--cad-border);border-radius:9px;overflow:hidden}.input-unit input,.property-content select{min-width:0;width:100%;height:38px;border:0;background:#fff;padding:0 10px;outline:0;font:13px inherit}.input-unit span{display:grid;place-items:center;padding:0 10px;color:#aaa;font-size:11px;border-left:1px solid #eee}.property-content select{border:1px solid var(--cad-border);border-radius:9px}.property-note{margin-top:8px;border-top:1px solid var(--cad-border);padding-top:14px;display:grid;gap:5px;font-size:10px;color:#888}.property-note b{font-size:11px;color:#555;margin-bottom:3px}.object-badge{font-size:11px;background:#ebe3d7;color:#796343;padding:7px 9px;border-radius:8px}.wide{height:38px;border:1px solid var(--cad-border);background:#fff;border-radius:9px;cursor:pointer}.wide.danger{color:#a24d45}.view3d{position:absolute;inset:0;background:radial-gradient(circle at 50% 30%,#f5f2eb,#dcd8d0);display:grid;place-items:center}.view3d[hidden]{display:none}.placeholder3d{text-align:center;max-width:480px;padding:30px}.placeholder3d .cube{font-size:100px;line-height:1;color:#a68b66;transform:rotate(30deg)}.placeholder3d h2{font-family:'Roboto',Arial,sans-serif;margin:10px}.placeholder3d p{font-size:13px;color:#777}.placeholder3d button{border:0;background:#292a28;color:#fff;border-radius:999px;padding:11px 18px;cursor:pointer}@media(max-width:1050px){.cad-workspace{grid-template-columns:70px minmax(0,1fr) 230px}.cad-commandbar{grid-template-columns:1fr auto auto}.history-actions{display:none}.command-actions button:not(.save){display:none}.cad-site-header .header-actions{display:none}}@media(max-width:800px){.properties{display:none}.cad-workspace{grid-template-columns:64px 1fr}.cad-site-header .nav{display:none}}

.endpoint-coords{border-top:1px solid var(--cad-border);border-bottom:1px solid var(--cad-border);padding:12px 0;display:grid;gap:8px}.endpoint-coords[hidden]{display:none}.endpoint-coords>b{font-size:11px;color:#555}.endpoint-coords small{font-size:9px;line-height:1.35;color:#999}.coord-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}.coord-pair label{font-size:10px}.command-actions #orthoBtn.active{background:#eee7dc;color:#806742;border-color:#cbb99f;font-weight:700}
.snap-control{position:relative;display:flex}.snap-menu{position:absolute;right:0;top:40px;z-index:30;min-width:180px;padding:6px;background:#fff;border:1px solid var(--cad-border);border-radius:10px;display:none}.snap-menu.open{display:grid;gap:3px}.command-actions .snap-menu button{width:100%;min-height:32px;border:0;background:transparent;text-align:left;border-radius:7px;padding:0 10px;color:#555;white-space:nowrap}.command-actions .snap-menu button:hover{background:#f3eee6;color:#6f5a3c}
.snap-menu-title{padding:7px 10px 5px;font-size:11px;font-weight:700;color:#7d756a;letter-spacing:.02em}.command-actions .snap-menu button.enabled{background:#f5efe6;color:#6d583b}.osnap-menu{min-width:195px}

.furniture-library{position:absolute;z-index:20;left:12px;top:12px;width:330px;max-height:calc(100% - 24px);background:#fff;border:1px solid var(--cad-border);border-radius:14px;display:flex;flex-direction:column;overflow:hidden}.furniture-library[hidden]{display:none}.furniture-library-head{display:flex;align-items:flex-start;justify-content:space-between;padding:15px 15px 12px;border-bottom:1px solid #eeeae4}.furniture-library-head>div{display:grid;gap:2px}.furniture-library-head small{font-size:9px;letter-spacing:.14em;color:#a08c72}.furniture-library-head b{font-family:'Roboto',Arial,sans-serif;color:#444}.furniture-library-head button{border:0;background:transparent;font-size:22px;color:#999;cursor:pointer}.furniture-tabs{display:flex;gap:4px;padding:9px 10px;overflow-x:auto;border-bottom:1px solid #f0ece6}.furniture-tabs button{border:0;background:#f5f2ed;color:#777;border-radius:999px;padding:7px 10px;font-size:10px;white-space:nowrap;cursor:pointer}.furniture-tabs button.active{background:#e9dfd1;color:#725d40;font-weight:700}.furniture-items{padding:10px;display:grid;grid-template-columns:1fr 1fr;gap:8px;overflow:auto}.furniture-card{min-height:94px;border:1px solid #e4ded5;background:#faf9f7;border-radius:11px;padding:9px;display:grid;grid-template-rows:30px auto auto;align-items:center;text-align:left;cursor:pointer;color:#555}.furniture-card:hover{border-color:#cdbda6;background:#f8f3eb}.furniture-card.active{border-color:#b59b75;background:#f2eadf;color:#89775e}.furniture-card b{font-size:11px}.furniture-card small{font-size:9px;color:#999}.furniture-library-foot{border-top:1px solid #eeeae4;padding:10px 13px;font-size:9px;line-height:1.4;color:#999;background:#faf9f7}

.furniture-search{display:flex;align-items:center;gap:7px;padding:9px 10px 0}.furniture-search span{color:#9a8b78;font-size:16px}.furniture-search input{width:100%;border:1px solid #e4ded5;background:#faf9f7;border-radius:9px;padding:8px 10px;font-family:'Roboto',Arial,sans-serif;color:#555;outline:none}.furniture-search input:focus{border-color:#bca98d;padding:24px 8px;text-align:center;color:#999;font-size:11px}
.area-palette{position:absolute;z-index:18;left:12px;top:12px;width:280px;background:#fff;border:1px solid var(--cad-border);border-radius:12px;padding:12px 13px;display:grid;gap:9px}.area-palette[hidden]{display:none}.area-palette-title{font-size:11px;font-weight:700;color:#625e58}.area-colors{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.area-colors button,.area-colors input[type=color]{width:28px;height:28px;border:1px solid #d8d2c9;border-radius:7px;background:var(--sw,#fff);padding:0;cursor:pointer}.area-colors button.active{outline:2px solid #9d8159;outline-offset:2px}.area-colors .area-none{background:#fff;color:#777;font-size:17px}.area-colors input[type=color]{padding:2px;background:#fff}.area-palette small{font-size:9px;line-height:1.4;color:#8d8880}

.area-opacity{display:grid;grid-template-columns:1fr auto;gap:5px 8px;align-items:center;font-size:10px;color:#716c65}.area-opacity input{grid-column:1/-1;width:100%;accent-color:#9d8159}.area-opacity b{font-size:10px;color:#625e58}

.area-name{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#666;margin:8px 0 10px}.area-name input{height:32px;border:1px solid #d8d4cc;border-radius:7px;padding:0 9px;background:#fff;color:#333;font:inherit}.area-name input:focus{outline:1px solid #bca889;border-color:#bca889}

.cad-edit-row{margin-top:10px;padding-top:10px;border-top:1px solid #e8e1d7}.cad-move-title{font-size:12px;font-weight:700;margin:0 0 7px;color:#5f584f}.cad-button-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}.cad-button-grid button{min-width:0;padding:8px 5px;border:1px solid #ddd3c4;background:#fff;border-radius:8px;font-size:11px;cursor:pointer}.cad-button-grid button:hover{background:#f7f2ea}

.dynamic-move{position:absolute;z-index:35;display:grid;grid-template-columns:auto 82px auto;grid-template-rows:28px 16px;align-items:center;gap:0 6px;padding:5px 8px 4px;background:#fff;border:1px solid #bfae93;border-radius:9px;color:#665c50;pointer-events:none;transform:translate(14px,14px)}.dynamic-move[hidden]{display:none}.dynamic-move>span{font-size:16px;color:#9d8159}.dynamic-move input{width:82px;height:25px;border:1px solid #d8cdbd;border-radius:6px;background:#fff;padding:0 7px;text-align:right;font:600 12px ui-monospace,Consolas,monospace;color:#403b35;outline:none}.dynamic-move b{font-size:10px;font-weight:600;color:#8b8175}.dynamic-move small{grid-column:1/-1;font-size:8px;color:#9b9186;white-space:nowrap}.dynamic-move.typing input{border-color:#9d8159;background:#fffaf2}.dynamic-move .negative{}

.wall-joint-row{border-bottom:1px solid var(--cad-border);padding:12px 0;display:grid;gap:8px}.wall-joint-row[hidden]{display:none}.wall-joint-row>b{font-size:11px;color:#555}.wall-joint-row>span{font-size:10px;color:#8a7557}.wall-joint-row small{font-size:9px;line-height:1.35;color:#999}.wall-joint-row button:disabled{opacity:.45;cursor:default}

.annotation-editor{position:absolute;z-index:45;display:flex;align-items:center;gap:5px;padding:5px;background:#fff;border:1px solid #cfc5b7;border-radius:9px;transform:translate(12px,12px)}.annotation-editor[hidden]{display:none}.annotation-editor input{width:210px;height:30px;border:1px solid #ddd4c8;border-radius:7px;padding:0 9px;outline:none;font-family:'Roboto',Arial,sans-serif;color:#3e3a35}.annotation-editor input:focus{border-color:#aa906b}.annotation-editor button{height:30px;border:1px solid #ddd4c8;background:#f8f5f0;border-radius:7px;padding:0 9px;cursor:pointer;color:#665c50}.annotation-editor #annotationOk{background:#eee7dc;color:#6f5a3c}.annotation-editor #annotationCancel{width:30px;padding:0;font-size:16px}

.resize-anchor-row{margin:10px 0;padding:10px 0;border-top:1px solid #e8e1d7;border-bottom:1px solid #e8e1d7;display:grid;gap:7px}.resize-anchor-row[hidden]{display:none}.resize-anchor-row>b{font-size:11px;color:#555}.resize-anchor-row small{font-size:9px;line-height:1.35;color:#999}.resize-anchor-grid{width:72px;height:72px;padding:7px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:5px;border:1px solid #d9d0c3;border-radius:8px;background:#faf8f4}.resize-anchor-grid button{position:relative;border:0;background:transparent;padding:0;cursor:pointer}.resize-anchor-grid button:before{content:'';position:absolute;width:7px;height:7px;border:1px solid #9d8159;background:#fff;border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%)}.resize-anchor-grid button.active:before{width:9px;height:9px;background:#9d8159;border:1px solid #9d8159;border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%);padding:0;display:block}.wall-create-panel[hidden]{display:none}.wall-create-panel>span{font-size:10px;font-weight:700;white-space:nowrap}.wall-axis-choice{display:flex;background:#f3efe9;border-radius:8px;padding:2px}.wall-axis-choice button{height:27px;padding:0 9px;border:0;background:transparent;border-radius:6px;font-family:'Roboto',Arial,sans-serif;color:#766c61;cursor:pointer}.wall-axis-choice button.active{background:#fff;color:#765d3c}.wall-length-box{position:absolute;z-index:36;display:grid;grid-template-columns:auto auto auto;align-items:center;gap:7px;padding:6px 8px;background:#fff;border:1px solid #bfae93;border-radius:9px;color:#665c50;transform:translate(14px,14px);pointer-events:auto}.wall-length-box[hidden]{display:none}.wall-length-box>span{font-size:16px;color:#9d8159}.wall-length-box label{display:grid;gap:2px}.wall-length-box label>small{font-size:8px;color:#978c80;line-height:1}.wall-length-box label>div{display:flex;align-items:center;gap:5px}.wall-length-box input{width:82px;height:25px;border:1px solid #d8cdbd;border-radius:6px;background:#fff;padding:0 7px;text-align:right;font:600 12px ui-monospace,Consolas,monospace;color:#403b35;outline:none}.wall-length-box input:focus,.wall-length-box.typing input{border-color:#9d8159;background:#fffaf2}.wall-length-box b{font-size:10px;font-weight:600;color:#8b8175}.wall-length-box em{font-style:normal;font-size:8px;color:#9b9186;border:1px solid #ddd4c8;border-radius:5px;padding:3px 5px}.wall-length-box.invalid input{border-color:#b65d56;background:#fff6f5}

.save-project-popover{position:fixed;z-index:80;right:18px;top:126px;width:310px;padding:14px;background:#fff;border:1px solid #d9d1c5;border-radius:12px;display:grid;gap:10px}.save-project-popover[hidden]{display:none}.save-project-popover>div:first-child{display:grid;gap:2px}.save-project-popover b{font-size:13px;color:#4d4943}.save-project-popover small{font-size:9px;color:#999}.save-project-popover>input{height:36px;border:1px solid #d8d1c7;border-radius:8px;padding:0 10px;outline:none;font-family:'Roboto',Arial,sans-serif;color:#3f3b36}.save-project-popover>input:focus{border-color:#aa906b;justify-content:flex-end;gap:7px}.save-project-popover-actions button{height:33px;border:1px solid #ddd5ca;background:#fff;border-radius:8px;padding:0 12px;cursor:pointer;color:#625c54}.save-project-popover-actions button.primary{background:#292a28;color:#fff;border-color:#292a28}.save-project-popover>span{font-size:9px;color:#b24f48}

/* Automatic room-area schedule */
.area-schedule{
  position:absolute;top:16px;right:16px;z-index:16;width:230px;max-height:calc(100% - 32px);
  background:rgba(250,249,246,.96);border:1px solid #d9d3c8;border-radius:12px;
  overflow:hidden;color:#514d47;
  backdrop-filter:blur(5px);font-family:'Roboto',Arial,sans-serif;
}
.area-schedule-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px 8px;border-bottom:1px solid #e4dfd6}
.area-schedule-head b{font-size:13px}.area-schedule-head span{font-size:10px;color:#948c81}
.area-schedule-rows{max-height:260px;overflow:auto;padding:4px 0}
.area-schedule-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:6px 12px;font-size:11px}
.area-schedule-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.area-schedule-row b{font-size:11px;font-weight:600;font-variant-numeric:tabular-nums}
.area-schedule-row.manual span::before{content:'•';margin-right:6px;color:#a88b61}
.area-schedule-total{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;border-top:1px solid #d9d3c8;background:#f2efe9;font-size:12px}
.area-schedule-total b{font-size:12px}

.area-schedule[hidden]{display:none!important}

#colorModeBtn{min-width:72px}
#colorModeBtn.active{background:#eee7dc;color:#806742}

/* Area schedule: clean flat white panel */
.area-schedule{
  background:#fff;
  
  backdrop-filter:none;
}
.area-schedule-total{background:#fff}

.object-color-palette{display:grid;gap:8px;padding-top:2px}
.object-color-palette[hidden]{display:none!important}
.object-color-palette .area-colors button.active{outline:2px solid #7f6b4f;outline-offset:2px}

.sheet-layout-screen{position:fixed;inset:0;z-index:10010;background:#dedbd5;display:flex;flex-direction:column;font-family:'Roboto',Arial,sans-serif;color:#383530}
.sheet-layout-screen[hidden]{display:none!important}
.sheet-layout-top{height:58px;background:#fff;border-bottom:1px solid #d3cec5;display:flex;align-items:center;gap:18px;padding:0 18px;flex:0 0 auto}
.sheet-layout-top>button{border:1px solid #d1cbc1;background:#fff;border-radius:8px;padding:8px 12px;cursor:pointer}
.sheet-layout-top strong{font-size:15px}.sheet-controls{margin-left:auto;display:flex;gap:12px}.sheet-controls label{display:flex;align-items:center;gap:6px;font-size:11px;color:#777}
.sheet-controls select{border:1px solid #ccc5bb;border-radius:7px;background:#fff;padding:6px 8px}
.sheet-stage{flex:1;min-height:0;overflow:auto;display:flex;align-items:center;justify-content:center;padding:28px}
.sheet-paper{position:relative;background:#fff;width:min(1050px,88vw);aspect-ratio:420/297;flex:0 0 auto;overflow:hidden}
.sheet-border{position:absolute;inset:3.5%;border:1.5px solid #222;pointer-events:none}
.sheet-viewport{position:absolute;left:4%;top:4%;right:4%;bottom:64mm;overflow:hidden;cursor:grab;display:flex;align-items:center;justify-content:center}
.sheet-viewport.dragging{cursor:grabbing}.sheet-viewport img{max-width:none;max-height:none;object-fit:contain;user-select:none;pointer-events:none}
.sheet-titleblock{position:absolute;right:3.5%;bottom:3.5%;width:43%;height:18%;border:1.5px solid #222;display:grid;grid-template-columns:1.2fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr;background:#fff;font-size:10px}
.sheet-brand{grid-row:1/4;display:flex;align-items:center;justify-content:center;border-right:1px solid #222;font-weight:700;font-size:14px;letter-spacing:.3px}
.sheet-field{border-right:1px solid #222;border-bottom:1px solid #222;padding:3px 5px;min-width:0}.sheet-field.wide{grid-column:2/4}.sheet-field small{display:block;font-size:7px;color:#777}
.sheet-field input{border:0;outline:0;width:100%;font-family:'Roboto',Arial,sans-serif;background:transparent;padding:1px 0}.sheet-meta{grid-column:2/4;display:flex;align-items:center;justify-content:space-around;padding:3px}
.sheet-layout-bottom{height:36px;background:#fff;border-top:1px solid #d3cec5;display:flex;justify-content:space-between;align-items:center;padding:0 18px;font-size:11px;color:#777;flex:0 0 auto}

.sheet-layer-wrap{position:relative}
#sheetLayersBtn{border:1px solid #ccc5bb;border-radius:7px;background:#fff;padding:7px 10px;cursor:pointer;font-size:11px;color:#4f4a43;white-space:nowrap}
.sheet-layers-panel{position:absolute;right:0;top:calc(100% + 7px);z-index:30;width:205px;background:#fff;border:1px solid #d3cec5;border-radius:10px;padding:8px;display:grid;gap:3px}
.sheet-layers-panel[hidden]{display:none!important}
.sheet-layers-panel label{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:7px;font-size:11px;color:#4f4a43;cursor:pointer}
.sheet-layers-panel label:hover{background:#f5f2ed}
.sheet-layers-panel input{accent-color:#a88b61}

/* Flat drafting UI: no shadows */
.sheet-paper,
.sheet-layers-panel,
.main-layers-panel,
.area-schedule,
.sheet-layout-top,
.sheet-layout-bottom,
.sheet-layout-screen,
#sheetLayersBtn,
#mainLayersBtn,
#sheetRotateViewBtn{
  
}

/* Main-screen layer menu */
.main-layer-wrap{position:relative;display:inline-flex}
#mainLayersBtn{border:1px solid #ccc5bb;border-radius:7px;background:#fff;padding:7px 10px;cursor:pointer;font-size:11px;color:#4f4a43;white-space:nowrap}
.main-layers-panel{position:absolute;right:0;top:calc(100% + 7px);z-index:40;width:205px;background:#fff;border:1px solid #d3cec5;border-radius:10px;padding:8px;display:grid;gap:3px}
.main-layers-panel[hidden]{display:none!important}
.main-layers-panel label{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:7px;font-size:11px;color:#4f4a43;cursor:pointer}
.main-layers-panel label:hover{background:#f5f2ed}
.main-layers-panel input{accent-color:#a88b61}

/* Sheet navigation */
.sheet-stage{cursor:grab;position:relative}
.sheet-stage.dragging{cursor:grabbing}
.sheet-paper{transform-origin:center center;transition:none}
#sheetRotateViewBtn{border:1px solid #ccc5bb;border-radius:7px;background:#fff;padding:7px 10px;cursor:pointer;font-size:11px;color:#4f4a43;white-space:nowrap}

/* Restore planner dark contextual hint to its original position */
.tool-hint{
  position:absolute!important;
  top:12px!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  background:#2c2d2b!important;
  color:#fff!important;
  border-radius:999px!important;
  padding:7px 13px!important;
  font-size:11px!important;
  display:block!important;
  text-align:left!important;
  gap:initial!important;
  pointer-events:none!important;
}

/* Dark planner hints: restore high-contrast white text */
.tool-hint,
.tool-hint *,
#toolHint,
#toolHint *{
  color:#fff!important;
}

/* Structured command bar: navigation / layers / tools / save */
.cad-commandbar{
  height:62px;
  flex:0 0 62px;
  display:flex!important;
  align-items:center;
  padding:0 14px;
  gap:0!important;
  overflow:visible;
}
.project-block{flex:0 0 255px;margin-right:14px}
.toolbar-nav-group{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.toolbar-layer-group{display:flex;align-items:center;flex:0 0 auto;margin-left:28px}
.toolbar-tools-group{display:flex;align-items:center;gap:6px;flex:0 1 auto;margin-left:28px;min-width:0}
.toolbar-save-group{display:flex;align-items:center;gap:6px;flex:0 0 auto;margin-left:auto;padding-left:24px}
.cad-commandbar button,
.cad-commandbar .view-switch button,
#mainLayersBtn{
  height:34px!important;
  min-height:34px!important;
  max-height:34px!important;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1!important;
}
.history-actions{display:flex;align-items:center;gap:5px}
.history-actions button{width:34px!important;height:34px!important;padding:0!important}
.view-switch{height:40px;box-sizing:border-box;display:flex;align-items:center;gap:3px;padding:3px;border-radius:10px}
.view-switch button{min-width:76px}
.toolbar-save-group .save{background:var(--cad-dark);color:#fff;border-color:var(--cad-dark);padding:0 17px}
.toolbar-save-group button{white-space:nowrap}
.toolbar-tools-group>button,
.toolbar-tools-group .snap-control>button{white-space:nowrap}
.main-layer-wrap{height:34px;align-items:center}
#mainLayersBtn{white-space:nowrap}
@media (max-width:1500px){
  .project-block{flex-basis:215px}
  .project-block input{width:170px}
  .toolbar-layer-group{margin-left:18px}
  .toolbar-tools-group{margin-left:18px;gap:4px}
  .toolbar-save-group{padding-left:14px;gap:4px}
  .cad-commandbar button{padding-left:8px;padding-right:8px;font-size:10px}
  .view-switch button{min-width:66px}
}

/* Professional editable title block v2 — crisp grid, no rounded input backgrounds */
.sheet-titleblock{
  position:absolute!important;
  right:3.5%!important;
  bottom:3.5%!important;
  width:47%!important;
  height:21%!important;
  border:1.5px solid #222!important;
  display:grid!important;
  grid-template-columns:1.25fr 1.15fr 1fr .72fr!important;
  grid-template-rows:1fr 1fr 1fr 1fr!important;
  background:#fff!important;
  border-radius:0!important;
  overflow:hidden!important;
  font-size:10px!important;
}
.sheet-titleblock>*{box-sizing:border-box!important;border-radius:0!important}
.sheet-brand{
  grid-column:1!important;grid-row:1/5!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  border:0!important;border-right:1px solid #222!important;
  background:#fff!important;font-weight:700!important;font-size:14px!important;
  outline:none!important;padding:6px!important;text-align:center!important;
}
.sheet-field{
  position:relative!important;padding:3px 5px!important;min-width:0!important;
  border:0!important;border-right:1px solid #222!important;border-bottom:1px solid #222!important;
  background:#fff!important;border-radius:0!important;
}
.sheet-field small{
  display:block!important;font-size:7px!important;line-height:1!important;color:#777!important;
  background:transparent!important;border:0!important;border-radius:0!important;padding:0!important;margin:0 0 2px!important;
}
.sheet-field input{
  display:block!important;width:100%!important;height:auto!important;min-height:0!important;
  border:0!important;outline:0!important;box-shadow:none!important;border-radius:0!important;
  background:transparent!important;padding:0!important;margin:0!important;
  color:#222!important;font-family:'Roboto',Arial,sans-serif;
}
.sheet-field input:focus{background:#faf8f4!important}
.sheet-field.project{grid-column:2/5;grid-row:1}
.sheet-field.sheetname{grid-column:2/3;grid-row:2}
.sheet-field.author{grid-column:3/4;grid-row:2}
.sheet-field.checker{grid-column:4/5;grid-row:2;border-right:0!important}
.sheet-field.address{grid-column:2/3;grid-row:3}
.sheet-field.stage{grid-column:3/4;grid-row:3}
.sheet-field.date{grid-column:4/5;grid-row:3;border-right:0!important}
.sheet-field.scale{grid-column:2/3;grid-row:4;border-bottom:0!important}
.sheet-field.number{grid-column:3/5;grid-row:4;border-right:0!important;border-bottom:0!important}

/* GOST-like professional title block, physical proportions: 185 x 55 mm */
.sheet-titleblock.gost-titleblock{
 position:absolute!important;right:5mm!important;bottom:5mm!important;
 width:185mm!important;height:55mm!important;
 border:0.35mm solid #222!important;background:#fff!important;border-radius:0!important;
 display:grid!important;
 grid-template-columns:10mm 10mm 10mm 10mm 15mm 10mm 70mm 15mm 15mm 20mm!important;
 grid-template-rows:5mm 5mm 5mm 5mm 5mm 5mm 10mm 15mm!important;
 overflow:hidden!important;font-family:'Roboto',Arial,sans-serif;
}
.gost-titleblock>*{box-sizing:border-box!important;border-radius:0!important;background:#fff!important;color:#222!important}
.g-rev-head,.g-rev-cell,.g-role,.g-name,.g-sign,.g-date,.g-main{
 border-right:.25mm solid #222!important;border-bottom:.25mm solid #222!important;
 padding:.7mm!important;font-size:2.2mm!important;line-height:1.05!important;overflow:hidden!important;
}
.g-rev-head{grid-row:1;text-align:center;font-size:1.9mm!important}
.g-rev-cell{grid-row:2;min-height:0}
.g-role{grid-column:1/3}
.g-name{grid-column:3/5}
.g-sign{grid-column:5}
.g-date{grid-column:6}
.g-role:nth-of-type(13),.g-name:nth-of-type(14),.g-sign:nth-of-type(15),.g-date:nth-of-type(16){grid-row:3}
.g-role:nth-of-type(17),.g-name:nth-of-type(18),.g-sign:nth-of-type(19),.g-date:nth-of-type(20){grid-row:4}
.g-role:nth-of-type(21),.g-name:nth-of-type(22),.g-sign:nth-of-type(23),.g-date:nth-of-type(24){grid-row:5}
.g-main{grid-column:7/11}
.g-project{grid-row:1/3}
.g-sheet{grid-row:3/5}
.g-address{grid-row:5/7}
.g-stage{grid-column:8!important;grid-row:7}
.g-number{grid-column:9!important;grid-row:7}
.g-count{grid-column:10!important;grid-row:7;border-right:0!important}
.g-brand{grid-column:7/9!important;grid-row:7/9!important;display:flex!important;align-items:center!important;justify-content:center!important;font-weight:700!important;font-size:3.4mm!important}
.g-scale{grid-column:9/11!important;grid-row:8;border-bottom:0!important;border-right:0!important}
.g-main small{display:block!important;background:transparent!important;color:#666!important;font-size:1.7mm!important;padding:0!important;margin:0 0 .5mm!important}
.gost-titleblock input{
 width:100%!important;border:0!important;outline:0!important;background:transparent!important;
 box-shadow:none!important;border-radius:0!important;padding:0!important;margin:0!important;
 font-family:'Roboto',Arial,sans-serif;color:#222!important;
}
.gost-titleblock [contenteditable="true"]:focus,.gost-titleblock input:focus{background:#faf8f4!important;outline:none!important}
.sheet-side-stamp{
 position:absolute!important;left:5mm!important;bottom:5mm!important;width:17mm!important;height:100mm!important;
 border:.35mm solid #222!important;background:#fff!important;display:grid!important;
 grid-template-columns:5mm 5mm 7mm!important;grid-template-rows:25mm 35mm 25mm 15mm!important;
 writing-mode:vertical-rl!important;transform:rotate(180deg)!important;border-radius:0!important;
}
.sheet-side-stamp>div{border-left:.25mm solid #222!important;padding:1mm!important;font-size:2mm!important;background:#fff!important;outline:0!important}


/* Physical paper-space geometry */
.sheet-paper{
  position:relative!important;
  flex:0 0 auto!important;
  background:#fff!important;
  box-shadow:none!important;
  transform-origin:center center!important;
  overflow:hidden!important;
}
.sheet-border{
  position:absolute!important;
  left:20mm!important;
  top:5mm!important;
  right:5mm!important;
  bottom:5mm!important;
  border:.35mm solid #222!important;
  box-sizing:border-box!important;
}
.sheet-viewport{
  position:absolute!important;
  left:22mm!important;
  top:7mm!important;
  right:7mm!important;
  bottom:62mm!important;
  overflow:hidden!important;
  cursor:grab!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.sheet-viewport img{
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  user-select:none!important;
  pointer-events:none!important;
}

.sheet-side-stamp{
  left:5mm!important;
  bottom:5mm!important;
  width:12mm!important;
  height:100mm!important;
}

/* Exact A3 template transferred from supplied DXF: all coordinates are physical mm */
.a3-dxf-template{position:absolute;inset:0;width:420mm;height:297mm;pointer-events:none;z-index:4}
.a3-edit{position:absolute;z-index:5;background:transparent!important;border:0!important;border-radius:0!important;padding:.8mm 1mm!important;box-sizing:border-box!important;overflow:hidden!important;color:#222!important;font-family:'Roboto',Arial,sans-serif}
.a3-edit small{display:block!important;font-size:1.7mm!important;line-height:1!important;color:#666!important;background:transparent!important;margin:0 0 .6mm!important;padding:0!important}
.a3-edit input{display:block!important;width:100%!important;border:0!important;border-radius:0!important;box-shadow:none!important;outline:0!important;background:transparent!important;color:#222!important;padding:0!important;margin:0!important;font-family:'Roboto',Arial,sans-serif}
.a3-edit input:focus,.a3-edit[contenteditable="true"]:focus{background:#faf8f4!important;outline:none!important}
/* Overlay fields aligned to cells in the DXF main stamp */
.a3-project{left:295mm;top:237mm;width:120mm;height:15mm}
.a3-sheet{left:295mm;top:252mm;width:120mm;height:15mm}
.a3-author{left:230mm;top:262mm;width:40mm;height:10mm}
.a3-check{left:230mm;top:272mm;width:40mm;height:10mm}
.a3-date{left:270mm;top:262mm;width:25mm;height:10mm}
.a3-stage{left:365mm;top:267mm;width:15mm;height:10mm}
.a3-number{left:380mm;top:267mm;width:15mm;height:10mm}
.a3-count{left:395mm;top:267mm;width:20mm;height:10mm}
.a3-scale{left:365mm;top:277mm;width:50mm;height:15mm}
.a3-brand{left:295mm;top:267mm;width:70mm;height:25mm;display:flex!important;align-items:center!important;justify-content:center!important;font-weight:700!important;font-size:3.2mm!important;text-align:center!important}
/* Retire old percentage/mm CSS title blocks; SVG is the sole line template */
.sheet-titleblock,.sheet-side-stamp{display:none!important}
/* Drawing viewport uses the maximum clean rectangle above the exact 55mm stamp */
.sheet-viewport{left:22mm!important;top:9mm!important;right:7mm!important;bottom:62mm!important;z-index:2!important;overflow:hidden!important}

/* Resize anchor selector: selected point must remain a simple centered dot */
.resize-anchor-grid button.active:before{
  content:''!important;
  position:absolute!important;
  width:9px!important;height:9px!important;
  left:50%!important;top:50%!important;
  transform:translate(-50%,-50%)!important;
  padding:0!important;margin:0!important;
  display:block!important;
  background:#9d8159!important;
  border:1px solid #9d8159!important;
  border-radius:50%!important;
  box-shadow:none!important;
  z-index:auto!important;
}

/* A3 title block editable overlay: every cell is independently editable */
.a3-edit-grid,.a3-side-edit-grid{position:absolute;inset:0;z-index:6;pointer-events:none}
.a3-cell,.a3-side-cell{
  position:absolute!important;
  box-sizing:border-box!important;
  padding:.7mm .9mm!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#222!important;
  outline:none!important;
  overflow:hidden!important;
  white-space:pre-line!important;
  font-family:'Roboto',Arial,sans-serif;
  font-size:2.15mm!important;
  line-height:1.05!important;
  pointer-events:auto!important;
  cursor:text!important;
}
.a3-cell:focus,.a3-side-cell:focus{
  background:rgba(245,241,233,.55)!important;
  outline:none!important;
}
.a3-cell[data-a3-cell^="rev_h"]{font-size:1.8mm!important;text-align:center!important;padding:.8mm .3mm!important}
.a3-cell[data-a3-cell^="rev_"]{text-align:center!important}
.a3-cell[data-a3-cell^="staff_role"]{font-size:2mm!important}
.a3-cell[data-a3-cell="project"],
.a3-cell[data-a3-cell="sheet"]{font-size:2.35mm!important}
.a3-cell[data-a3-cell="brand"]{
  display:flex!important;align-items:center!important;justify-content:center!important;
  text-align:center!important;font-weight:700!important;font-size:3.1mm!important;
}
.a3-cell[data-a3-cell="stage"],
.a3-cell[data-a3-cell="number"],
.a3-cell[data-a3-cell="count"],
.a3-cell[data-a3-cell="scale"]{font-size:1.9mm!important}
.a3-side-cell{
  writing-mode:vertical-rl!important;
  transform:rotate(180deg)!important;
  text-align:center!important;
  font-size:1.8mm!important;
  padding:.8mm .5mm!important;
}
/* Legacy A3 overlays are disabled permanently */
.a3-edit{display:none!important}

/* A3 stamp correction from marked reference */
.a3-cell[data-a3-cell^="rev_h"]{top:252mm!important;height:5mm!important}
.a3-cell[data-a3-cell^="rev_1_"]{top:237mm!important}
.a3-cell[data-a3-cell^="rev_2_"]{top:242mm!important}
.a3-cell[data-a3-cell^="rev_3_"]{top:247mm!important}
.a3-cell[data-a3-cell^="rev_4_"]{top:257mm!important}
/* keep staff text cleanly inside its cells */
.a3-cell[data-a3-cell^="staff_"]{padding:.8mm .7mm!important}

/* A3 stamp correction #2 from marked screenshot */
.a3-cell[data-a3-cell^="rev_h"]{top:257mm!important;height:5mm!important}
.a3-cell[data-a3-cell^="rev_1_"]{top:237mm!important}
.a3-cell[data-a3-cell^="rev_2_"]{top:242mm!important}
.a3-cell[data-a3-cell^="rev_3_"]{top:247mm!important}
.a3-cell[data-a3-cell^="rev_4_"]{top:252mm!important}
.a3-cell[data-a3-cell="address"],
.a3-cell[data-a3-cell="stage"],
.a3-cell[data-a3-cell="number"],
.a3-cell[data-a3-cell="count"]{top:262mm!important}

/* A3: only the DXF-derived frame is drawn; do not duplicate it with CSS frame. */
.sheet-paper.a3-exact .sheet-border{display:none!important}

/* Exact cell hit areas: their boxes are the same rectangles as the DXF linework. */
.a3-edit-grid,.a3-side-edit-grid{position:absolute!important;inset:0!important;z-index:7!important;pointer-events:none!important}
.a3-cell,.a3-side-cell{
  position:absolute!important;box-sizing:border-box!important;
  margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  background:transparent!important;color:#222!important;outline:none!important;
  overflow:hidden!important;white-space:pre-line!important;
  font-family:'Roboto',Arial,sans-serif;font-size:2.15mm!important;line-height:1.05!important;
  padding:.55mm .65mm!important;pointer-events:auto!important;cursor:text!important;
}
.a3-cell:focus,.a3-side-cell:focus,.a3-cell.sheet-cell-selected,.a3-side-cell.sheet-cell-selected{
  background:rgba(203,185,154,.12)!important;
  outline:.35mm solid #a88b61!important;
  outline-offset:-.35mm!important;
}
.a3-cell[data-sheet-cell^="rev_h"]{font-size:1.8mm!important;text-align:center!important;padding:.7mm .2mm!important}
.a3-cell[data-sheet-cell^="rev_"]{text-align:center!important;padding:.65mm .2mm!important}
.a3-cell[data-sheet-cell^="staff_"]{font-size:1.9mm!important;padding:.6mm .55mm!important}
.a3-cell[data-sheet-role="project"],.a3-cell[data-sheet-role="sheet"]{font-size:2.3mm!important}
.a3-cell[data-sheet-role="brand"]{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;font-size:3.1mm!important;font-weight:700!important}
.a3-cell[data-sheet-role="scale"]{font-size:1.9mm!important}
.a3-side-cell{writing-mode:vertical-rl!important;transform:rotate(180deg)!important;text-align:center!important;font-size:1.8mm!important;padding:.6mm .35mm!important}
.a3-edit{display:none!important}

/* Sheet cell typography toolbar */
.sheet-text-tools{display:flex;align-items:center;gap:4px;padding-left:8px;border-left:1px solid #ddd7ce}
.sheet-text-tools[hidden]{display:none!important}
.sheet-text-tools label{display:flex!important;align-items:center!important;gap:4px!important;font-size:10px!important;color:#666!important}
.sheet-text-tools input{width:48px;height:30px;border:1px solid #ccc5bb;border-radius:7px;background:#fff;padding:0 5px;font-size:10px}
.sheet-text-tools label span{font-size:9px;color:#888}
.sheet-text-tools button,#sheetViewGridBtn{height:34px;min-height:34px;border:1px solid #ccc5bb;border-radius:7px;background:#fff;padding:0 8px;cursor:pointer;color:#4f4a43}
.sheet-text-tools button.active,#sheetViewGridBtn.active{background:#eee7dc;color:#806742}

.sheet-text-tools-sep{width:1px;height:22px;background:#ddd7ce;margin:0 2px}
.a3-cell.sheet-vflex,.a3-side-cell.sheet-vflex{
  display:flex!important;
  flex-direction:column!important;
}

/* Default appearance for A3 "Scale" cell */
.a3-cell[data-sheet-cell="scale"]{
  font-size:3mm!important;
  font-weight:400!important;
  text-align:center!important;
  justify-content:center!important;

  white-space:nowrap!important;}

/* Sheet area schedule: draggable annotation, flat/no shadow */
.sheet-area-schedule{
  position:absolute;
  z-index:9;
  right:8mm;
  top:10mm;
  width:58mm;
  box-sizing:border-box;
  background:#fff;
  border:.3mm solid #9c978f;
  border-radius:0;
  box-shadow:none!important;
  color:#3f3b36;
  font-family:'Roboto',Arial,sans-serif;
  font-size:2.3mm;
  user-select:none;
  cursor:grab;
}
.sheet-area-schedule[hidden]{display:none!important}
.sheet-area-schedule.dragging{cursor:grabbing}
.sheet-area-schedule-head{
  display:flex;justify-content:space-between;align-items:center;
  min-height:8mm;padding:1.4mm 2mm;
  border-bottom:.25mm solid #c9c4bb;
}
.sheet-area-schedule-head b{font-size:2.7mm}
.sheet-area-schedule-head span{font-size:1.9mm;color:#777}
.sheet-area-schedule-rows{display:grid}
.sheet-area-schedule-row{
  display:grid;grid-template-columns:1fr auto;gap:3mm;
  align-items:center;min-height:6.5mm;padding:1mm 2mm;
  border-bottom:.2mm solid #ded9d1;
}
.sheet-area-schedule-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sheet-area-schedule-row b{font-weight:500;white-space:nowrap}
.sheet-area-schedule-total{
  display:grid;grid-template-columns:1fr auto;gap:3mm;
  align-items:center;min-height:7mm;padding:1.2mm 2mm;
  font-weight:500;
}

/* Scale title-block cell is intentionally always one line. */
[data-sheet-role="scale"]{
  white-space:nowrap!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
}

/* Rebuilt right-hand A3 title-block cells: one real editable field per drawn rectangle. */
.a3-cell.a3-combined-cell{
  white-space:pre-line!important;
  padding:.9mm .8mm!important;
  line-height:1.18!important;
}

.sheet-area-schedule{min-width:32mm;min-height:20mm;max-width:calc(100% - 4mm);max-height:calc(100% - 4mm);overflow:hidden}
.sheet-area-schedule-rows{overflow:auto;max-height:none}
.sheet-area-resize-handle{position:absolute;right:0;bottom:0;width:4mm;height:4mm;cursor:nwse-resize;z-index:3}
.sheet-area-resize-handle::after{content:'';position:absolute;right:.7mm;bottom:.7mm;width:2.2mm;height:2.2mm;border-right:.3mm solid #8f8980;border-bottom:.3mm solid #8f8980}

/* Area schedule: furniture-style selection and resize handles */
.sheet-area-schedule{--area-scale:1}
.sheet-area-schedule .sheet-area-resize-handle{display:none;position:absolute;width:9px;height:9px;border:1px solid #a98450;background:#fff;border-radius:50%;z-index:20;box-sizing:border-box}
.sheet-area-schedule.selected{outline:1px solid #b08a55;outline-offset:2px}
.sheet-area-schedule.selected .sheet-area-resize-handle{display:block}
.sheet-area-resize-handle.nw{left:-5px;top:-5px;cursor:nwse-resize}
.sheet-area-resize-handle.n{left:50%;top:-5px;transform:translateX(-50%);cursor:ns-resize}
.sheet-area-resize-handle.ne{right:-5px;top:-5px;cursor:nesw-resize}
.sheet-area-resize-handle.e{right:-5px;top:50%;transform:translateY(-50%);cursor:ew-resize}
.sheet-area-resize-handle.se{right:-5px;bottom:-5px;cursor:nwse-resize}
.sheet-area-resize-handle.s{left:50%;bottom:-5px;transform:translateX(-50%);cursor:ns-resize}
.sheet-area-resize-handle.sw{left:-5px;bottom:-5px;cursor:nesw-resize}
.sheet-area-resize-handle.w{left:-5px;top:50%;transform:translateY(-50%);cursor:ew-resize}
.sheet-area-schedule.selected .sheet-area-resize-handle::after{display:none}
.sheet-area-schedule-title{font-size:calc(3.2mm * var(--area-scale))}
.sheet-area-schedule-row,.sheet-area-schedule-total{font-size:calc(2.7mm * var(--area-scale))}

/* Area schedule selection: four clearly separated corner handles */
#sheetAreaSchedule.selected .sheet-area-resize-handle{display:none!important}
#sheetAreaSchedule.selected .sheet-area-resize-handle.nw,
#sheetAreaSchedule.selected .sheet-area-resize-handle.ne,
#sheetAreaSchedule.selected .sheet-area-resize-handle.se,
#sheetAreaSchedule.selected .sheet-area-resize-handle.sw{
  display:block!important;
  position:absolute!important;
  width:10px!important;height:10px!important;
  margin:0!important;transform:none!important;
  background:#fff!important;border:1px solid #a98450!important;
  border-radius:50%!important;z-index:30!important;
}
#sheetAreaSchedule.selected .sheet-area-resize-handle.nw{left:-6px!important;right:auto!important;top:-6px!important;bottom:auto!important;cursor:nwse-resize!important}
#sheetAreaSchedule.selected .sheet-area-resize-handle.ne{left:auto!important;right:-6px!important;top:-6px!important;bottom:auto!important;cursor:nesw-resize!important}
#sheetAreaSchedule.selected .sheet-area-resize-handle.se{left:auto!important;right:-6px!important;top:auto!important;bottom:-6px!important;cursor:nwse-resize!important}
#sheetAreaSchedule.selected .sheet-area-resize-handle.sw{left:-6px!important;right:auto!important;top:auto!important;bottom:-6px!important;cursor:nesw-resize!important}
#sheetAreaSchedule .sheet-area-resize-handle::after{display:none!important}

/* Default formatting for A3 sheet-number cells */
#a3DummyNeverUsed{}
.a3-cell[data-sheet-cell="number"],
.a3-cell[data-sheet-cell="count"]{
  font-size:3mm!important;
  text-align:center!important;
  justify-content:center!important;
}

/* HARD FIX: area schedule must always show 4 separate corner resize handles when selected */
#sheetAreaSchedule{
  position:absolute!important;
  overflow:visible!important;
}
#sheetAreaSchedule .sheet-area-resize-handle{
  display:none!important;
  position:absolute!important;
  width:10px!important;
  height:10px!important;
  padding:0!important;
  margin:0!important;
  background:#fff!important;
  border:1px solid #a98450!important;
  border-radius:50%!important;
  box-sizing:border-box!important;
  z-index:999!important;
  transform:none!important;
}
#sheetAreaSchedule.selected .sheet-area-resize-handle.nw,
#sheetAreaSchedule.selected .sheet-area-resize-handle.ne,
#sheetAreaSchedule.selected .sheet-area-resize-handle.se,
#sheetAreaSchedule.selected .sheet-area-resize-handle.sw{
  display:block!important;
}
#sheetAreaSchedule.selected .sheet-area-resize-handle.nw{
  left:-6px!important;right:auto!important;top:-6px!important;bottom:auto!important;cursor:nwse-resize!important;
}
#sheetAreaSchedule.selected .sheet-area-resize-handle.ne{
  left:auto!important;right:-6px!important;top:-6px!important;bottom:auto!important;cursor:nesw-resize!important;
}
#sheetAreaSchedule.selected .sheet-area-resize-handle.se{
  left:auto!important;right:-6px!important;top:auto!important;bottom:-6px!important;cursor:nwse-resize!important;
}
#sheetAreaSchedule.selected .sheet-area-resize-handle.sw{
  left:-6px!important;right:auto!important;top:auto!important;bottom:-6px!important;cursor:nesw-resize!important;
}
#sheetAreaSchedule .sheet-area-resize-handle::before,
#sheetAreaSchedule .sheet-area-resize-handle::after{
  display:none!important;
  content:none!important;
}
#sheetAreaSchedule.selected{
  outline:1px solid #b08a55!important;
  outline-offset:2px!important;
}

/* Default typography requested for the three primary title-block fields */
.a3-cell.stamp-default-primary{
  font-size:3mm;
  font-weight:400;
  text-align:left;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  white-space:pre-line;
  line-height:1.12;
  overflow:hidden;
  padding:0 1mm;
  box-sizing:border-box;
}

/* All sheet formats use the A3 reference drafting template at true physical mm size. */
.sheet-paper.a3-exact .a3-dxf-template{position:absolute;left:0;top:0;pointer-events:none;z-index:4}
.sheet-paper.a3-exact .a3-edit-grid,.sheet-paper.a3-exact .a3-side-edit-grid{transform-origin:0 0!important}

/* Sheet-format adaptations: A3 remains the reference. */
#sheetPaper[data-sheet-format="A4"] .a3-edit-grid,
#sheetPaper[data-sheet-format="A4"] .a3-side-edit-grid{transform-origin:0 0}

/* Keep all format-specific stamp overlays inside the physical sheet. */
.sheet-paper{overflow:hidden}

/* Sheet toolbar: display/PDF controls */
#sheetColorModeBtn,#sheetAreaScheduleBtn,#sheetSavePdfBtn{height:32px;white-space:nowrap}
#sheetColorModeBtn.active,#sheetAreaScheduleBtn.active{background:#eee5d6;border-color:#d5c5aa}
#sheetSavePdfBtn{background:#2f312f;color:#fff;border-color:#2f312f;font-weight:600}
#sheetSavePdfBtn:hover{background:#242624}
#sheetSavePdfBtn:disabled{opacity:.6;cursor:wait}

/* Unified professional sheet toolbar */
.sheet-controls{align-items:center;gap:8px;flex-wrap:nowrap}
.sheet-controls>button,
.sheet-controls .sheet-layer-wrap>button,
.sheet-text-tools>button{
  height:32px;box-sizing:border-box;border:1px solid #d1cbc1;background:#fff;
  border-radius:8px;padding:0 11px;cursor:pointer;font-family:'Roboto',Arial,sans-serif;
  color:#4f4a43;white-space:nowrap;box-shadow:none;transition:background .12s,border-color .12s,color .12s;
}
.sheet-controls>button:hover,
.sheet-controls .sheet-layer-wrap>button:hover,
.sheet-text-tools>button:hover{background:#f6f3ee;border-color:#c8bca9}
#sheetColorModeBtn.active,#sheetAreaScheduleBtn.active,#sheetViewGridBtn.active{
  background:#eee5d6;border-color:#d8c6a8;color:#6f5b3f;
}
#sheetSavePdfBtn{
  background:#30312f!important;border-color:#30312f!important;color:#fff!important;font-weight:600!important;padding:0 14px!important;
}
#sheetSavePdfBtn:hover{background:#222321!important;border-color:#222321!important}
#sheetSavePdfBtn:disabled{opacity:.58;cursor:wait}
.sheet-controls label select{height:32px;box-sizing:border-box}
.sheet-pdf-notice{position:fixed;left:50%;bottom:28px;z-index:12000;transform:translate(-50%,12px);opacity:0;pointer-events:none;background:#30312f;color:#fff;border-radius:9px;padding:10px 15px;font-family:'Roboto',Arial,sans-serif;transition:.18s}
.sheet-pdf-notice.show{opacity:1;transform:translate(-50%,0)}
.sheet-pdf-notice.error{background:#743d36}
/* --- 3D sketch: first real geometry prototype --- */
.view3d{overflow:hidden;perspective:1400px;user-select:none;touch-action:none;background:linear-gradient(#f2efe9 0 58%,#ddd9d1 58%)}
.three-stage{position:absolute;inset:0;overflow:hidden;perspective:1400px;cursor:grab}.three-stage.dragging{cursor:grabbing}
.three-camera{position:absolute;left:50%;top:50%;width:0;height:0;transform-style:preserve-3d;will-change:transform}
.three-world{position:absolute;left:0;top:0;transform-style:preserve-3d;will-change:transform}
.three-floor{position:absolute;transform-origin:0 0;background:#eee9df;border:1px solid #cfc8bd;backface-visibility:visible}
.three-wall{position:absolute;width:0;height:0;transform-style:preserve-3d}
.three-wall-face{position:absolute;left:0;top:0;transform-origin:0 0;background:#e6e2da;border:1px solid #a9a59d;box-sizing:border-box;backface-visibility:visible}
.three-wall-top{position:absolute;left:0;top:0;transform-origin:0 0;background:#d6d1c8;border:1px solid #aaa59c;box-sizing:border-box}
.three-opening{position:absolute;left:0;top:0;transform-origin:0 0;box-sizing:border-box;border:2px solid #777;background:#f7f5f1}
.three-opening.window{background:rgba(190,220,226,.65);border-color:#76969c}
.three-object{position:absolute;transform-origin:50% 50%;background:#d8d1c7;border:1px solid #8f887e;box-sizing:border-box;box-shadow:inset 0 0 0 1px #eee8df}
.three-object[data-kind="balcony"]{background:#e8dfcf;border-color:#a6977f}
.three-toolbar{position:absolute;z-index:5;left:16px;top:14px;display:flex;align-items:center;gap:7px;padding:7px;background:#ffffffde;border:1px solid var(--cad-border);border-radius:11px;box-shadow:0 5px 18px #00000012}.three-toolbar button{height:32px;padding:0 12px;border:1px solid var(--cad-border);border-radius:8px;background:#fff;cursor:pointer}.three-toolbar span{font-size:10px;color:#777;padding:0 7px}
.three-badge{position:absolute;z-index:5;right:16px;bottom:16px;background:#ffffffdf;border:1px solid var(--cad-border);border-radius:10px;padding:9px 12px;display:grid;gap:2px}.three-badge b{font-size:12px}.three-badge span{font-size:10px;color:#777}

/* Unified planner typography */
html,body,.cad-app,.cad-app button,.cad-app input,.cad-app select,.cad-app textarea,
.sheet-layout-screen,.sheet-layout-screen button,.sheet-layout-screen input,
.sheet-layout-screen select,.sheet-layout-screen textarea,
.properties,.properties button,.properties input,.properties select,
.furniture-library,.furniture-library button,.save-project-popover,
.wall-length-box,.tool-hint,.area-schedule,.sheet-area-schedule,
.a3-cell,.a3-side-cell{
  font-family:'Roboto',Arial,sans-serif;
}
button,input,select,textarea{font-family:inherit}

html,body,button,input,select,textarea,
.cad-app,.cad-app *, .sheet-layout-screen,.sheet-layout-screen *,
.properties,.properties *, .furniture-library,.furniture-library *{
  font-family:'Roboto',Arial,sans-serif;
}

/* === FINAL TYPOGRAPHY LOCK: the planner uses one typeface everywhere === */
html body.cad-page,
body.cad-page,
body.cad-page *,
#sheetLayoutScreen,
#sheetLayoutScreen *,
#quickPdfPreview,
#quickPdfPreview * {
  font-family:'Roboto',Arial,sans-serif;
}

/* Form controls sometimes keep browser/system fonts unless explicitly inherited. */
body.cad-page button,
body.cad-page input,
body.cad-page select,
body.cad-page textarea,
body.cad-page option,
#sheetLayoutScreen button,
#sheetLayoutScreen input,
#sheetLayoutScreen select,
#sheetLayoutScreen textarea {
  font-family:'Roboto',Arial,sans-serif;
}

/* Explicitly protect the two project-name areas and properties headings from
   generic site heading rules (Georgia/serif). */
#propTitle,
.cad-project-title,
.cad-project-name,
.project-summary-title,
.properties h1,
.properties h2,
.properties h3,
.properties strong,
.properties b {
  font-family:'Roboto',Arial,sans-serif;
}

/* ===== 3D sketch stage 2 ===== */
.three-room-floor,.three-balcony-floor{position:absolute;left:0;top:0;transform-origin:0 0;background:#eeeae3;border:1px solid #cbc4b9;box-sizing:border-box;backface-visibility:visible}
.three-balcony-floor{background:#e8dfcf}
.three-wall{position:absolute;width:0;height:0;transform-style:preserve-3d}
.three-wall-piece{position:absolute;left:0;top:0;transform-origin:0 0;transform-style:preserve-3d}
.three-wall-face{position:absolute;left:0;top:0;transform-origin:0 0;background:#e6e2da;border:1px solid #a9a59d;box-sizing:border-box;backface-visibility:visible}
.three-wall-top{position:absolute;left:0;top:0;transform-origin:0 0;background:#d6d1c8;border:1px solid #aaa59c;box-sizing:border-box}
.three-wall-end{position:absolute;left:0;top:0;transform-origin:0 0;background:#ddd8cf;border:1px solid #aaa59c;box-sizing:border-box}
.three-opening-frame{position:absolute;left:0;top:0;transform-origin:0 0;box-sizing:border-box;background:transparent;border:2px solid #817b72;pointer-events:none}
.three-opening-frame.window{border-color:#72939a;background:rgba(190,220,226,.16)}
.three-opening-frame.door{border-color:#8c8174}
.three-object-box{position:absolute;transform-origin:50% 50%;transform-style:preserve-3d;background:#d8d1c7;border:1px solid #8f887e;box-sizing:border-box}
.three-object-top{position:absolute;inset:0;background:#ddd6cc;border:1px solid #918a80;box-sizing:border-box}
.three-object-side{position:absolute;background:#cec7bc;border:1px solid #918a80;box-sizing:border-box;transform-origin:0 0}
.three-object-side.front,.three-object-side.back{left:0;width:100%;height:var(--h)}
.three-object-side.front{top:100%;transform:rotateX(90deg)}
.three-object-side.back{top:0;transform:rotateX(90deg)}
.three-object-side.left,.three-object-side.right{top:0;width:100%;height:var(--h)}
.three-object-side.left{left:0;transform:rotateY(90deg) rotateX(90deg)}
.three-object-side.right{left:100%;transform:rotateY(90deg) rotateX(90deg)}

/* 3D launch reliability */
.view3d{z-index:20}
.three-stage{z-index:1}
.three-camera{transform-style:preserve-3d}
.three-world{transform-style:preserve-3d}


/* Roboto: keep the color-mode button label comfortably inside the toolbar button. */
#colorModeBtn{min-width:124px;width:auto;white-space:nowrap;padding-left:12px;padding-right:12px;box-sizing:border-box}

/* ===== Guaranteed visible 3D baseline ===== */
.three-safe-floor{
  position:absolute;left:0;top:0;transform-origin:0 0;
  background:#ece8df;border:1px solid #c8c0b4;box-sizing:border-box;
}
.three-safe-wall{
  position:absolute;left:0;top:0;transform-origin:0 50%;
  transform-style:preserve-3d;background:#ddd8cf;border:1px solid #9f9a91;
  box-sizing:border-box;
}
.three-safe-wall-top{
  position:absolute;inset:0;background:#d4cec4;border:1px solid #aaa39a;
  box-sizing:border-box;
}
.three-safe-wall-face{
  position:absolute;left:0;width:100%;background:#e5e1da;border:1px solid #aaa59d;
  box-sizing:border-box;transform-origin:0 0;
}
.three-safe-wall-face.a{top:0;transform:rotateX(90deg)}
.three-safe-wall-face.b{top:100%;transform:rotateX(90deg)}
.three-safe-furniture{
  position:absolute;left:0;top:0;transform-origin:50% 50%;
  transform-style:preserve-3d;background:#d5cec4;border:1px solid #8f887e;
  box-sizing:border-box;
}
.three-safe-furniture-top{
  position:absolute;inset:0;background:#ded7cd;border:1px solid #918a80;box-sizing:border-box;
}

/* ===== 3D diagnostic baseline: floor + raw walls only ===== */
.three-min-floor{
  position:absolute;left:0;top:0;transform-origin:0 0;
  background:#ece8df;border:1px solid #c9c1b6;box-sizing:border-box;
}
.three-min-wall{
  position:absolute;left:0;top:0;transform-origin:0 50%;
  transform-style:preserve-3d;background:#ddd8d0;border:1px solid #99948c;
  box-sizing:border-box;
}
.three-min-wall-top{
  position:absolute;inset:0;background:#cbc5bb;border:1px solid #99948c;
  box-sizing:border-box;
}
.three-min-wall-face{
  position:absolute;left:0;width:100%;background:#e5e1da;border:1px solid #aaa59d;
  box-sizing:border-box;transform-origin:0 0;
}
.three-min-wall-face.front{top:0;transform:rotateX(90deg)}
.three-min-wall-face.back{top:100%;transform:rotateX(90deg)}

/* Create-new-project action */
.project-block{gap:8px}
.new-project-btn{
  flex:0 0 auto;height:31px;padding:0 11px;border:1px solid var(--cad-border);
  border-radius:8px;background:#fff;color:#555;font:500 10px 'Roboto',Arial,sans-serif;
  white-space:nowrap;cursor:pointer;
}
.new-project-btn:hover{background:#f2ede5;border-color:#cdbda5;color:#554936}

/* ===== Independent 3D renderer ===== */
.three-ex-floor{
  position:absolute;left:0;top:0;transform-origin:0 0;
  background:#ebe7de;border:1px solid #beb7ad;box-sizing:border-box;
}
.three-ex-wall{
  position:absolute;left:0;top:0;transform-origin:0 50%;
  transform-style:preserve-3d;background:#d9d4cc;
  border:1px solid #8e8a83;box-sizing:border-box;
}
.three-ex-wall-top{
  position:absolute;inset:0;background:#c9c3b9;
  border:1px solid #969189;box-sizing:border-box;
}
.three-ex-wall-face{
  position:absolute;left:0;width:100%;background:#e4e0d9;
  border:1px solid #9d9890;box-sizing:border-box;transform-origin:0 0;
}
.three-ex-wall-face.front{top:0;transform:rotateX(90deg)}
.three-ex-wall-face.back{top:100%;transform:rotateX(90deg)}
.three-ex-wall-end{
  position:absolute;top:0;background:#d5d0c8;border:1px solid #99948c;
  box-sizing:border-box;transform-origin:0 0;
}
.three-ex-wall-end.a{left:0;transform:rotateY(90deg) rotateX(90deg)}
.three-ex-wall-end.b{left:100%;transform:rotateY(90deg) rotateX(90deg)}

/* Artifact correction: auxiliary end faces are disabled until rebuilt correctly. */
.three-ex-wall-end,
.three-ex-wall-end.a,
.three-ex-wall-end.b {
  display: none !important;
}

/* 3D wall corner join */
.three-ex-wall,
.three-ex-wall-top,
.three-ex-wall-face{
  outline:0;
}

/* Exact 2D wall-joint geometry transferred into 3D */
.three-ex-joint{
  position:absolute;left:0;top:0;transform-origin:0 0;
  transform-style:preserve-3d;pointer-events:none;
}
.three-ex-joint-top{
  position:absolute;inset:0;background:#c9c3b9;
  border:1px solid #969189;box-sizing:border-box;
}
.three-ex-joint-face{
  position:absolute;left:0;top:0;transform-origin:0 0;
  background:#e4e0d9;border:1px solid #9d9890;box-sizing:border-box;
}


/* 3D joint union v3: exact 2D joint polygons fill wall intersections.
   No border is drawn on the filler itself, otherwise a correct union looks
   like a crack/step in perspective. */
.three-ex-joint-top,
.three-ex-joint-face{
  border:0 !important;
  outline:0 !important;
}
.three-ex-joint-top{ background:#c9c3b9 !important; }
.three-ex-joint-face{ background:#e4e0d9 !important; }

html{scroll-behavior:smooth;}

#download-app{scroll-margin-top:110px;}

/* v5: walls with openings stay a single 3D object; holes are alpha-masked. */
.three-ex-wall-single{background:transparent!important;border:0!important;}
.three-ex-wall-single .three-ex-wall-face{backface-visibility:visible;-webkit-mask-position:0 0;mask-position:0 0;}

/* v7: readable opening edges on boolean wall holes. These are only outlines,
   not solids, so they cannot create the old floating-plane/beam artifacts. */
.three-ex-opening-outline{
  position:absolute;
  box-sizing:border-box;
  transform-origin:0 0;
  pointer-events:none;
  background:transparent;
  border:2px solid rgba(102,98,92,.72);
  border-bottom-color:rgba(102,98,92,.72);
  backface-visibility:visible;
}
.three-ex-opening-outline.door{
  border-bottom:0;
}
.three-ex-opening-outline.window{
  border-bottom:2px solid rgba(102,98,92,.72);
}

.three-webgl-canvas{display:block;width:100%;height:100%;outline:none;}

.area-edit-actions{display:flex;gap:8px;margin-top:10px}
.area-edit-actions button{flex:1;border:1px solid #ded8cf;background:#fff;color:#4b4945;border-radius:8px;padding:8px 9px;font:600 11px Roboto,Arial,sans-serif;cursor:pointer}
.area-edit-actions button:hover,.area-edit-actions button.active{border-color:#b99b72;background:#f2e9dc;color:#71593b}

.floor-palette select{width:100%;margin-top:6px;padding:8px 10px;border:1px solid #d7d0c5;border-radius:8px;background:#fff;color:#4f4b45;font:inherit}.floor-palette{z-index:8}

/* v36 — adaptive planner workspace */
.cad-workspace{grid-template-columns:124px minmax(0,1fr) 272px}
.tool-rail{
  padding:8px 6px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-rows:54px;
  align-content:start;
  gap:4px;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
}
.tool-rail .tool{height:54px;min-width:0;padding:2px}
.tool-rail .tool b{font-size:18px;line-height:18px}
.tool-rail .tool span{font-size:9px;line-height:1.05;text-align:center;max-width:100%}
.tool-rail .rail-separator{grid-column:1/-1;height:1px;margin:2px 6px;align-self:center}
.properties{min-height:0;overscroll-behavior:contain}
.viewport-shell{min-height:0}

/* Medium and small-height monitors: spend pixels on the drawing, not chrome. */
@media (max-height:900px){
  .cad-site-header{height:58px;padding-left:22px;padding-right:22px}
  .cad-app{height:calc(100vh - 58px)}
  .cad-commandbar{height:52px;flex-basis:52px;padding:0 12px;gap:10px}
  .cad-commandbar button{min-height:32px}
  .tool-rail{grid-auto-rows:48px;padding:6px 5px;gap:3px}
  .tool-rail .tool{height:48px}
  .tool-rail .tool b{font-size:17px;line-height:17px}
  .tool-rail .tool span{font-size:8.5px}
  .properties{padding:12px}
  .properties-head{padding-bottom:10px;margin-bottom:11px}
  .property-content{gap:10px}
  .area-palette{max-height:calc(100% - 24px);overflow:auto}
}
@media (max-height:720px){
  .cad-site-header{height:50px}
  .cad-app{height:calc(100vh - 50px)}
  .cad-commandbar{height:46px;flex-basis:46px}
  .tool-rail{grid-auto-rows:42px}
  .tool-rail .tool{height:42px}
  .tool-rail .tool b{font-size:15px;line-height:15px}
  .tool-rail .tool span{font-size:8px}
  .properties{padding:9px}
  .property-content{gap:8px}
  .property-note{padding-top:8px;margin-top:4px}
}
/* Width adaptation keeps the drawing usable on laptops. */
@media (max-width:1200px){
  .cad-workspace{grid-template-columns:112px minmax(0,1fr) 238px}
  .tool-rail{grid-auto-rows:48px}
  .tool-rail .tool{height:48px}
  .properties{padding:12px}
}
@media (max-width:900px){
  .cad-workspace{grid-template-columns:104px minmax(0,1fr) 220px}
  .cad-commandbar{grid-template-columns:minmax(180px,1fr) auto auto}
  .history-actions{display:none}
  .command-actions button:not(.save){display:none}
}

@media(max-width:1050px){
  .cad-workspace{grid-template-columns:108px minmax(0,1fr) 230px}
}
@media(max-width:800px){
  .properties{display:none}
  .cad-workspace{grid-template-columns:104px minmax(0,1fr)}
}

.floor-palette select{width:100%;height:34px;border:1px solid #d8d4cc;border-radius:7px;padding:0 9px;background:#fff;color:#333;font:inherit}.floor-colors{margin:2px 0 4px}

.rotate-tool-panel{width:245px;z-index:16}
.rotate-tool-panel select,.rotate-tool-panel input[type=number]{width:100%;height:34px;border:1px solid #d8d4cc;border-radius:7px;padding:0 9px;background:#fff;color:#333;font:inherit}
.rotate-tool-panel>button{width:100%;min-height:34px;border:1px solid #d4cec3;border-radius:7px;background:#fff;cursor:pointer}
.rotate-tool-panel .floor-angle-presets button{min-width:0;flex:1}

.appearance3d-props .appearance3d-color-row{display:flex;gap:8px;align-items:center}
.appearance3d-props input[type=color]{width:54px;height:36px;padding:2px;border:1px solid #d8d4cc;border-radius:7px;background:#fff}
.appearance3d-props .appearance3d-color-row button{height:36px;padding:0 12px;border:1px solid #d8d4cc;border-radius:7px;background:#fff;cursor:pointer}

.appearance3d-palette{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin:7px 0 9px}
.appearance3d-palette button{aspect-ratio:1;border:1px solid #cfc9bf;border-radius:7px;background:var(--swatch);cursor:pointer;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
.appearance3d-palette button.active{outline:2px solid #9e8059;outline-offset:2px}
.appearance3d-palette button:disabled{opacity:.5;cursor:default}
.appearance3d-props .appearance3d-color-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:7px;align-items:center}
.appearance3d-props .appearance3d-hex{height:36px;min-width:0;border:1px solid #d8d4cc;border-radius:7px;padding:0 9px;font:600 12px ui-monospace,SFMono-Regular,Consolas,monospace;text-transform:uppercase}
.appearance3d-props .appearance3d-hex.invalid{border-color:#b35f55;background:#fff5f3}
.appearance3d-props .appearance3d-reset{width:100%;height:34px;margin-top:8px;border:1px solid #d8d4cc;border-radius:7px;background:#fff;cursor:pointer}

.baseboard3d-section{margin-top:12px;padding-top:12px;border-top:1px solid #ded9d0}
.baseboard-toggle-row{display:flex!important;flex-direction:row!important;justify-content:space-between;align-items:center;gap:12px}
.baseboard-toggle-row input{width:18px;height:18px}
.baseboard3d-section .appearance3d-palette{margin-top:8px}

.three-camera-views{
  position:absolute;right:14px;top:14px;z-index:12;
  display:grid;grid-template-columns:repeat(3,34px);grid-template-rows:repeat(3,34px);
  gap:2px;padding:5px;border:1px solid rgba(122,115,104,.28);
  border-radius:10px;background:rgba(250,249,246,.92);
  box-shadow:0 5px 18px rgba(58,51,43,.10);backdrop-filter:blur(4px)
}
.three-camera-views button{
  width:34px;height:34px;border:1px solid #d7d2ca;background:#fff;color:#57534d;
  border-radius:6px;font:600 12px Roboto,Arial,sans-serif;cursor:pointer;padding:0
}
.three-camera-views button:hover{background:#f1ede6}
.three-camera-views button.active{border-color:#a88b61;box-shadow:inset 0 0 0 1px #a88b61;color:#7c6041}
.three-camera-views .camera-top{font-size:16px;background:#f7f3ec}

#threeCameraViews.three-camera-views{
  position:absolute!important; right:16px!important; top:16px!important;
  z-index:1000!important; display:grid!important; visibility:visible!important;
  opacity:1!important; box-shadow:none!important;
}
.three-toolbar{box-shadow:none!important}
.bed3d-section{margin-top:12px;padding-top:12px;border-top:1px solid #ded9d0}

#view3d{position:absolute!important;inset:0!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important}
#threeCameraViewsFloating.three-camera-views-floating{
 position:absolute!important;
 right:18px!important;
 top:18px!important;
 z-index:10000!important;
 display:grid!important;
 grid-template-columns:repeat(3,34px)!important;
 grid-template-rows:repeat(3,34px)!important;
 gap:2px!important;
 padding:5px!important;
 border:1px solid rgba(122,115,104,.30)!important;
 border-radius:9px!important;
 background:rgba(250,249,246,.96)!important;
 box-shadow:none!important;
 pointer-events:auto!important;
}
#threeCameraViewsFloating button{
 width:34px!important;height:34px!important;
 border:1px solid #d7d2ca!important;border-radius:6px!important;
 background:#fff!important;color:#57534d!important;
 font:600 12px Roboto,Arial,sans-serif!important;
 padding:0!important;cursor:pointer!important;box-shadow:none!important;
}
#threeCameraViewsFloating button:hover{background:#f1ede6!important}
#threeCameraViewsFloating button.active{outline:2px solid #a88b61!important;outline-offset:-2px!important}
.three-toolbar{box-shadow:none!important}

.appearance3d-select-all{
  width:100%;
  margin:10px 0 2px;
  min-height:34px;
  border:1px solid #d8d0c4;
  border-radius:8px;
  background:#fff;
  color:#34312d;
  font:inherit;
  cursor:pointer;
}
.appearance3d-select-all:hover{background:#f6f2eb}
.appearance3d-select-all.active{background:#eee7da;border-color:#cbb99a}

/* 3D-only export controls: deliberately live inside the 3D viewport toolbar,
   never in the shared 2D command bar. */
.three-toolbar{display:flex;align-items:center;gap:8px}
.three-toolbar-nav{display:flex;gap:6px;flex:0 0 auto}
.three-toolbar-help{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.62}
.three-export-actions{margin-left:auto;display:flex;gap:6px;flex:0 0 auto;padding-left:10px;border-left:1px solid rgba(40,37,32,.12)}
.three-export-actions button{white-space:nowrap}
@media(max-width:1180px){
  .three-toolbar-help{display:none}
}




/* 3D mode: all tools that edit or export the 2D plan are genuinely disabled. */
body.planner-mode-3d .history-actions,
body.planner-mode-3d .toolbar-layer-group,
body.planner-mode-3d .toolbar-tools-group,
body.planner-mode-3d .tool-rail{
  opacity:.32 !important;
  filter:saturate(.35);
}
body.planner-mode-3d .history-actions button:disabled,
body.planner-mode-3d .toolbar-layer-group button:disabled,
body.planner-mode-3d .toolbar-tools-group button:disabled button:disabled,
body.planner-mode-3d .tool-rail button:disabled{
  cursor:not-allowed !important;
  pointer-events:none !important;
}


/* Actual 3D mode. The WebGL view switch sets planner-mode-3d directly. */
body.planner-mode-3d .tool-rail,
body.planner-mode-3d .history-actions,
body.planner-mode-3d .toolbar-layer-group,
body.planner-mode-3d .toolbar-tools-group{
  opacity:.28 !important;
  filter:grayscale(.35) saturate(.35) !important;
}
body.planner-mode-3d .tool-rail button:disabled,
body.planner-mode-3d .history-actions button:disabled,
body.planner-mode-3d .toolbar-layer-group button:disabled,
body.planner-mode-3d .toolbar-tools-group button:disabled button:disabled{
  pointer-events:none !important;
  cursor:not-allowed !important;
}


/* Hard WebGL-owned 3D disabling. These groups are truly inert, not just dimmed. */
body.planner-mode-3d-hard .disabled-in-3d{
  opacity:.26 !important;
  filter:grayscale(.55) saturate(.2) !important;
  transition:opacity .14s ease,filter .14s ease;
  user-select:none !important;
}
body.planner-mode-3d-hard .disabled-in-3d,
body.planner-mode-3d-hard .disabled-in-3d *{
  cursor:default !important;
}
body.planner-mode-3d-hard .disabled-in-3d button,
body.planner-mode-3d-hard .disabled-in-3d input,
body.planner-mode-3d-hard .disabled-in-3d select{
  pointer-events:none !important;
}

/* Extra orthographic top-view button in the 3x3 camera pad. */
.three-camera-views-floating [data-camera-view="flatTop"]{
  font-weight:700;
}


/* In 3D, project persistence remains available.
   Only the 2D sheet/PDF actions are disabled in the right save group. */
body.planner-mode-3d #sheetLayoutBtn:disabled,
body.planner-mode-3d #quickPdfBtn:disabled,
body.planner-mode-3d-hard #sheetLayoutBtn:disabled,
body.planner-mode-3d-hard #quickPdfBtn:disabled,
body.planner-mode-3d-hard .disabled-in-3d-single{
  opacity:.28 !important;
  filter:grayscale(.55) saturate(.2) !important;
  pointer-events:none !important;
  cursor:default !important;
}
body.planner-mode-3d #saveBtn,
body.planner-mode-3d #saveAsBtn,
body.planner-mode-3d-hard #saveBtn,
body.planner-mode-3d-hard #saveAsBtn{
  opacity:1 !important;
  filter:none !important;
  pointer-events:auto !important;
  cursor:pointer !important;
}


/* Camera selector: stable 3x3 compass plus a separate orthographic mode. */
#threeCameraViewsFloating.three-camera-views-floating{
  position:absolute!important;
  right:18px!important;
  top:18px!important;
  z-index:10000!important;
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  width:auto!important;
  padding:5px!important;
  border:1px solid rgba(122,115,104,.30)!important;
  border-radius:9px!important;
  background:rgba(250,249,246,.96)!important;
  box-shadow:none!important;
  pointer-events:auto!important;
}
#threeCameraViewsFloating .three-camera-grid{
  display:grid!important;
  grid-template-columns:repeat(3,34px)!important;
  grid-template-rows:repeat(3,34px)!important;
  gap:2px!important;
}
#threeCameraViewsFloating .three-camera-grid button{
  width:34px!important;
  height:34px!important;
}
#threeCameraViewsFloating .three-camera-flat-top{
  width:106px!important;
  height:28px!important;
  padding:0 7px!important;
  white-space:nowrap!important;
  font:500 10px Roboto,Arial,sans-serif!important;
}

.three-view-camera-panel{position:absolute;left:18px;top:58px;z-index:10020;width:285px;padding:10px;border:1px solid rgba(122,115,104,.28);border-radius:10px;background:rgba(250,249,246,.98);box-shadow:0 8px 24px rgba(43,39,34,.08);color:#3d3934;font:12px Roboto,Arial,sans-serif}
.three-view-camera-panel[hidden]{display:none!important}
.three-view-camera-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:9px}
.three-view-camera-panel-head div{display:flex;flex-direction:column;gap:2px}.three-view-camera-panel-head b{font-size:13px}.three-view-camera-panel-head small{font-size:10px;color:#8a847b}
.three-view-camera-panel-head>button{width:26px;height:26px;padding:0;border:1px solid #ddd6ca;border-radius:6px;background:#fff;cursor:pointer}
.three-view-camera-add{width:100%;height:34px;border:1px solid #b98b4f;border-radius:7px;background:#fff7e9;color:#51483d;cursor:pointer;font-weight:700}
.three-view-camera-add::before{content:'●';color:#f0a438;margin-right:6px}
.three-camera-place-hint{margin:7px 0;padding:8px;border:1px solid #d9ad69;border-radius:6px;background:#fff4df;color:#6f5129;font-size:10px;font-weight:600;line-height:1.45}
.three-view-camera-list{display:flex;flex-direction:column;gap:4px;max-height:150px;overflow:auto;margin-top:8px}
.three-view-camera-list-item{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:30px;padding:5px 8px;border:1px solid #ddd7cd;border-radius:6px;background:#fff;color:#49443d;cursor:pointer}
.three-view-camera-list-item.active{border-color:#b99a6d;background:#f4eee4}.three-view-camera-list-item small{color:#8b8277}
.three-view-camera-props{margin-top:10px;padding-top:9px;border-top:1px solid #e0dbd2;display:flex;flex-direction:column;gap:8px}.three-view-camera-props[hidden]{display:none!important}
.three-view-camera-props label{display:flex;flex-direction:column;gap:4px;color:#6e675e;font-size:10px}.three-view-camera-props input{height:30px;padding:0 8px;border:1px solid #d8d2c8;border-radius:6px;background:#fff;color:#37332e;font:12px Roboto,Arial,sans-serif}
.three-view-camera-two{display:grid;grid-template-columns:1fr 1fr;gap:7px}.three-view-camera-help{color:#8a847b;line-height:1.35}
.three-view-camera-actions{display:grid;grid-template-columns:1fr auto;gap:6px}.three-view-camera-actions button{min-height:32px;border:1px solid #d6cec0;border-radius:7px;background:#fff;color:#48423a;cursor:pointer}.three-view-camera-actions .danger{color:#9a514d}

.three-cameras-main-btn{
  border:1px solid #b78645!important;
  background:#fff8ed!important;
  font-weight:700!important;
}
.camera-btn-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:17px;height:14px;margin-right:4px;
  border:2px solid #a76d2c;border-radius:3px;color:#a76d2c;
  font-size:8px;line-height:1;
}
#threeStage.placing-target-camera,
#threeStage.placing-target-camera canvas{cursor:crosshair!important}
#threeStage.placing-target-camera::after{
  content:'TARGET CAMERA · ЗАЖМИТЕ ЛКМ И ПОТЯНИТЕ';
  position:absolute;left:50%;top:14px;transform:translateX(-50%);
  z-index:10015;padding:8px 14px;border-radius:7px;
  border:1px solid #d39a4c;background:rgba(255,247,231,.96);
  color:#79501e;font:700 11px Roboto,Arial,sans-serif;
  pointer-events:none;box-shadow:0 3px 12px rgba(70,50,25,.10)
}

.three-camera-placement-overlay{
 position:absolute;left:50%;top:16px;transform:translateX(-50%);z-index:10030;
 display:flex;align-items:center;gap:10px;padding:9px 14px;
 background:rgba(255,249,238,.97);border:1px solid #c99755;border-radius:9px;
 box-shadow:0 5px 18px rgba(70,50,25,.12);pointer-events:none;
 font-family:Roboto,Arial,sans-serif;color:#55442e;white-space:nowrap
}
.three-camera-placement-overlay[hidden]{display:none!important}
.three-camera-placement-overlay b{font-size:12px;color:#8b5d24}
.three-camera-placement-overlay span{font-size:11px}
.three-camera-placement-overlay small{font-size:10px;color:#8f877c}

#threeStage.placing-target-camera{
  outline:2px solid rgba(201,151,85,.42);
  outline-offset:-2px;
}

#threeViewCameraPanel[hidden]{
  display:none!important;
}

/* Dedicated Target Camera input plane. It physically covers only the 3D viewport,
   so camera-creation clicks can never leak into orbit/pan handlers. */
#threeCameraInputLayer.three-camera-input-layer{
  position:absolute;
  inset:0;
  z-index:10018;
  background:transparent;
  cursor:crosshair;
  pointer-events:auto;
}
#threeCameraInputLayer[hidden]{display:none!important}

#threeCameraPlacementOverlay.three-camera-placement-overlay{
  z-index:10035!important;
  pointer-events:auto!important;
}
.three-camera-placement-text{
  display:flex;
  align-items:center;
  gap:10px;
}
#threeCameraPlacementCancel{
  flex:0 0 auto;
  width:26px;
  height:26px;
  padding:0;
  border:1px solid #cfa66f;
  border-radius:6px;
  background:#fff;
  color:#6f5129;
  cursor:pointer;
  font-size:16px;
  line-height:1;
}
#threeViewCameraPanel[hidden]{display:none!important}


/* 2D: created furniture/object list */
.toolbar-layer-group{display:flex;align-items:center;gap:6px}
.object-list-wrap{position:relative}
#objectListBtn{white-space:nowrap}
.object-list-panel{
  position:absolute;top:42px;left:0;z-index:80;width:290px;max-height:min(520px,calc(100vh - 165px));
  overflow:hidden;background:#fff;border:1px solid var(--cad-border);border-radius:12px;
  box-shadow:0 10px 28px rgba(45,40,34,.13);padding:10px;
}
.object-list-panel[hidden]{display:none}
.object-list-head{display:flex;align-items:center;justify-content:space-between;padding:2px 2px 7px}
.object-list-head strong{font-size:13px;color:#393733}
.object-list-head button{width:28px;height:28px;min-height:28px;padding:0;border:0;background:transparent;font-size:20px;color:#8b877f}
.object-list-note{font-size:10px;color:#99938a;padding:0 2px 8px;border-bottom:1px solid #eee9e1}
.object-list-items{display:grid;gap:4px;max-height:430px;overflow:auto;padding-top:7px}
.object-list-item{display:grid!important;grid-template-columns:26px 1fr;align-items:center;text-align:left!important;width:100%;
  min-height:36px!important;padding:5px 8px!important;border:0!important;background:#fff!important;border-radius:8px!important}
.object-list-item:hover{background:#f4efe7!important}
.object-list-item:focus{outline:2px solid #c8b18d;outline-offset:-2px}
.object-list-num{display:grid;place-items:center;width:21px;height:21px;border-radius:6px;background:#eee7dc;color:#806742;font-size:10px}
.object-list-name{font-size:12px;color:#494641;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.object-list-empty{padding:16px 8px;text-align:center;font-size:11px;color:#999}
body.planner-mode-3d #objectListBtn:disabled{opacity:.28;cursor:default}

/* Prominent object-list control at the top of the left 2D toolbar */
.object-list-wrap-left{position:relative;padding:6px 5px 8px;margin-bottom:5px;border-bottom:1px solid #eee9e1}
.object-list-wrap-left #objectListBtn{
 width:100%;min-height:48px;padding:26px 2px 4px;position:relative;
 border:1px solid #c9b28d;background:#f7f1e7;color:#4b443a;border-radius:8px;
 font-size:9px;font-weight:600;line-height:1.05;white-space:normal
}
.object-list-wrap-left #objectListBtn::before{
 content:"☷";position:absolute;top:5px;left:50%;transform:translateX(-50%);
 font-size:19px;line-height:1;color:#9b7c4c
}
.object-list-wrap-left .object-list-panel{top:4px;left:calc(100% + 7px);width:290px}


/* "Список объектов" — exactly in the free strip above the plan, right of the left rail. */
.viewport-shell{position:relative}
.object-list-wrap-viewport{
  position:absolute !important;
  top:10px !important;
  left:16px !important;
  z-index:75 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}
.object-list-wrap-viewport #objectListBtn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:170px !important;
  height:34px !important;
  min-height:34px !important;
  padding:0 16px !important;
  margin:0 !important;
  border:1px solid var(--cad-border) !important;
  border-radius:7px !important;
  background:#fff !important;
  color:var(--cad-text) !important;
  font:500 11px Roboto,Arial,sans-serif !important;
  line-height:1 !important;
  white-space:nowrap !important;
  box-shadow:none !important;
}
.object-list-wrap-viewport #objectListBtn::before{
  content:none !important;
  display:none !important;
}
.object-list-wrap-viewport #objectListBtn:hover{
  background:#f7f5f1 !important;
}
.object-list-wrap-viewport .object-list-panel{
  position:absolute !important;
  top:40px !important;
  left:0 !important;
  width:290px !important;
}

/* Neutralize any previous left-rail special styling if an older CSS rule remains. */
.object-list-wrap-viewport.object-list-wrap-left{
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
}


/* Shared object list button for 2D and 3D */
.viewport-shell{position:relative}

.object-list-wrap-viewport{
  position:absolute!important;
  top:12px!important;
  left:16px!important;
  z-index:10012!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}

/* In 3D move it below the 3D command panel instead of overlapping it. */
body.planner-mode-3d .object-list-wrap-viewport,
body.planner-mode-3d-hard .object-list-wrap-viewport{
  top:78px!important;
  z-index:10015!important;
}

.object-list-wrap-viewport #objectListBtn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:170px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0 16px!important;
  margin:0!important;
  border:1px solid var(--cad-border)!important;
  border-radius:7px!important;
  background:#fff!important;
  color:var(--cad-text)!important;
  font:500 11px Roboto,Arial,sans-serif!important;
  line-height:1!important;
  white-space:nowrap!important;
  box-shadow:none!important;
  opacity:1!important;
  filter:none!important;
  pointer-events:auto!important;
  cursor:pointer!important;
}

.object-list-wrap-viewport #objectListBtn::before{
  content:none!important;
  display:none!important;
}

.object-list-wrap-viewport #objectListBtn:hover{
  background:#f7f5f1!important;
  cursor:pointer!important;
}

.object-list-wrap-viewport #objectListBtn:disabled{
  opacity:1!important;
  pointer-events:auto!important;
  cursor:pointer!important;
}

.object-list-wrap-viewport .object-list-panel{
  position:absolute!important;
  top:40px!important;
  left:0!important;
  width:310px!important;
  z-index:10020!important;
}

.object-list-item,
.object-list-item *{
  cursor:pointer!important;
}


/* Created objects: identical position in 2D and 3D */
.viewport-shell{position:relative!important}

.object-list-wrap-viewport{
  position:absolute!important;
  top:78px!important;
  left:16px!important;
  z-index:12000!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  pointer-events:auto!important;
}

/* Do NOT move it between modes: same coordinates in 2D and 3D. */
body.planner-mode-3d .object-list-wrap-viewport,
body.planner-mode-3d-hard .object-list-wrap-viewport{
  top:58px!important;
  left:16px!important;
}

.object-list-wrap-viewport #objectListBtn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:210px!important;
  width:auto!important;
  height:34px!important;
  min-height:34px!important;
  padding:0 16px!important;
  margin:0!important;
  border:1px solid var(--cad-border)!important;
  border-radius:7px!important;
  background:#fff!important;
  color:var(--cad-text)!important;
  font:500 11px Roboto,Arial,sans-serif!important;
  line-height:1!important;
  white-space:nowrap!important;
  box-shadow:none!important;
  opacity:1!important;
  filter:none!important;
  pointer-events:auto!important;
  cursor:pointer!important;
}

.object-list-wrap-viewport #objectListBtn:hover{
  background:#f7f5f1!important;
  cursor:pointer!important;
}

.object-list-wrap-viewport #objectListBtn::before{
  content:none!important;
  display:none!important;
}

.object-list-wrap-viewport .object-list-panel{
  position:absolute!important;
  top:40px!important;
  left:0!important;
  width:310px!important;
  max-height:min(520px,calc(100vh - 210px))!important;
  z-index:12010!important;
  pointer-events:auto!important;
}

.object-list-wrap-viewport .object-list-panel[hidden]{
  display:none!important;
}

.object-list-item,
.object-list-item *{
  cursor:pointer!important;
}


/* Final placement: same coordinates in 2D and 3D, with clear space below the 3D toolbar. */
.object-list-wrap-viewport,
body.planner-mode-3d .object-list-wrap-viewport,
body.planner-mode-3d-hard .object-list-wrap-viewport{
  top:66px!important;
  left:16px!important;
}


/* Final vertical rhythm for 3D controls:
   toolbar -> equal gap -> "Список созданных объектов" -> equal gap -> "Видовые камеры" panel.
   Object button Y chosen by user: 66px; button height: 34px; gap: 14px. */
.object-list-wrap-viewport,
body.planner-mode-3d .object-list-wrap-viewport,
body.planner-mode-3d-hard .object-list-wrap-viewport{
  top:66px!important;
  left:16px!important;
}

/* Camera panel sits 14px below the 34px-high object-list button:
   66 + 34 + 14 = 114px. */
#threeViewCameraPanel.three-view-camera-panel{
  top:114px!important;
  left:18px!important;
}


/* Camera-tool input is exclusive while active. */
#threeCameraInputLayer.three-camera-input-layer{
  z-index:10018!important;
  pointer-events:auto!important;
  cursor:crosshair!important;
  touch-action:none!important;
}
#threeViewCameraPanel.three-view-camera-panel{
  pointer-events:auto!important;
}
#threeViewCameraPanel button,
#threeViewCameraPanel input{
  pointer-events:auto!important;
}

.view-camera-3d-props label{display:block;margin:0 0 12px}
.view-camera-3d-props .property-note{margin-top:16px}

#threeStage.camera-handle-hover,
#threeStage.camera-handle-hover canvas{
  cursor:pointer!important;
}

.three-ai-visualization{
  width:100%;
  min-height:36px;
  margin-top:8px;
  border:1px solid #b98b4f;
  border-radius:7px;
  background:#2f2d2a;
  color:#fff;
  cursor:pointer;
  font-weight:700;
}
.three-ai-visualization:hover{background:#24221f}
.three-ai-visualization[hidden]{display:none!important}

/* Unified Save As / export menu */
.export-project-popover{position:fixed;z-index:95;right:18px;top:126px;width:360px;padding:12px;background:#fff;border:1px solid #d9d1c5;border-radius:12px;box-shadow:0 12px 34px rgba(48,43,36,.14);display:grid;gap:7px}
.export-project-popover[hidden]{display:none}.export-project-head{display:flex;align-items:flex-start;justify-content:space-between;padding:2px 2px 6px}.export-project-head>div{display:grid;gap:2px}.export-project-head b{font-size:13px;color:#403c37}.export-project-head small{font-size:9px;color:#999}.export-project-head>button{border:0;background:transparent;font-size:20px;line-height:20px;color:#8d867d;cursor:pointer;padding:0 2px}.export-project-option{width:100%;min-height:52px;border:1px solid #e0d9cf;border-radius:9px;background:#fff;padding:8px 10px;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;cursor:pointer;font-family:'Roboto',Arial,sans-serif;color:#4c4741}.export-project-option:hover{background:#faf7f2;border-color:#cdbb9f}.export-project-option span{display:grid;gap:2px}.export-project-option b{font-size:11px}.export-project-option small{font-size:9px;color:#8f887f;font-weight:400}.export-project-option em{font-style:normal;font-size:9px;color:#9a8a73;background:#f4eee5;border-radius:6px;padding:4px 6px}.export-project-option.primary-option{border-color:#cbb99a;background:#fbf8f2}

#threeAiVisualization.three-ai-visualization{
  background:#CBB99A!important;border-color:#BDA783!important;color:#fff!important;box-shadow:none!important;
}
#threeAiVisualization.three-ai-visualization:hover{
  background:#BEA984!important;border-color:#B29973!important;color:#fff!important;
}

/* Tariff / 3D access dialog */
.planner-access-modal[hidden]{display:none!important}.planner-access-modal{position:fixed;inset:0;z-index:50000;display:grid;place-items:center;padding:20px}.planner-access-backdrop{position:absolute;inset:0;background:rgba(30,27,23,.42);backdrop-filter:blur(5px)}.planner-access-card{position:relative;width:min(470px,calc(100vw - 32px));background:#f8f4ed;border:1px solid rgba(130,115,95,.22);border-radius:24px;padding:30px;box-shadow:0 24px 80px rgba(28,24,19,.25);font-family:Roboto,Arial,sans-serif}.planner-access-brand{font-size:12px;font-weight:800;letter-spacing:.06em;color:#b69d77;margin-bottom:20px}.planner-access-card h2{margin:0 40px 10px 0;font:700 27px/1.15 Roboto,Arial,sans-serif;color:#292725}.planner-access-card p{margin:0;color:#726c65;font-size:14px;line-height:1.55}.planner-access-close{position:absolute;right:14px;top:12px;border:0;background:transparent;font-size:26px;color:#777;cursor:pointer}.planner-access-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.planner-access-actions button{border:1px solid #d8d0c5;background:#fff;border-radius:11px;padding:11px 16px;font:700 13px Roboto,Arial,sans-serif;cursor:pointer}.planner-access-actions button.primary{background:#c7a267;color:#fff;border-color:#c7a267}

.header-actions .button-ghost{gap:8px}.header-account-name{display:inline-block}.header-plan-badge{font-size:10px;line-height:1;font-weight:800;letter-spacing:.12em;color:#b39b76;border-left:1px solid rgba(179,155,118,.35);padding-left:8px}

/* Unified site header: planner uses the exact same global header as every page. */
@media(max-width:680px){.cad-app{height:calc(100vh - 70px)}}


.three-camera-move-pad{
  position:absolute;z-index:31;left:50%;bottom:22px;transform:translateX(-50%);
  display:grid;grid-template-columns:42px 58px 42px;grid-template-rows:38px 38px 38px;
  gap:4px;align-items:center;justify-items:center;
  padding:8px;border:1px solid rgba(120,110,96,.26);border-radius:12px;background:rgba(247,244,238,.92);
  backdrop-filter:blur(4px);
}
.three-camera-move-pad[hidden]{display:none!important}
.three-camera-move-pad button{
  width:42px;height:38px;border:1px solid #d8d0c4;border-radius:8px;background:#fff;color:#3f3a34;
  font:600 20px/1 Roboto,Arial,sans-serif;cursor:pointer;
}
.three-camera-move-pad button:hover{background:#eee8de;border-color:#bda47d}
.three-camera-move-pad [data-camera-move="forward"]{grid-column:2;grid-row:1}
.three-camera-move-pad [data-camera-move="left"]{grid-column:1;grid-row:2}
.three-camera-move-pad [data-camera-move="right"]{grid-column:3;grid-row:2}
.three-camera-move-pad [data-camera-move="back"]{grid-column:2;grid-row:3}
.three-camera-move-label{grid-column:2;grid-row:2;font-size:10px;color:#83796b;white-space:nowrap}

/* Saved Target Camera: the real WebGL canvas is the exact camera/AI frame. */
#threeStage.saved-camera-aspect-view{
  overflow:hidden;
  background:#d6d1c8;
}
#threeStage.saved-camera-aspect-view canvas.three-webgl-canvas{
  z-index:2;
  display:block;
}
