*{box-sizing:border-box}html,body{margin:0;padding:0;height:100%;overflow:hidden;font-family:Courier New,monospace}#app{display:flex;flex-direction:column;height:100vh;height:100dvh;width:100vw}#toolbar{flex:0 0 auto;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;justify-content:safe center;gap:2px;padding:4px 8px;background:#252526;border-bottom:1px solid #3c3c3c;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;flex-shrink:0}#toolbar::-webkit-scrollbar{display:none}@media (pointer: fine){#toolbar{gap:1px;padding:4px}}#toolbar button{flex:0 0 auto;font-family:Courier New,monospace;font-size:12px;font-weight:700;color:#d4d4d4;background:#2d2d30;border:1px solid #3c3c3c;border-radius:3px;padding:4px 8px;cursor:pointer}#toolbar button.icon-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0}@media (pointer: fine){#toolbar button.icon-btn{width:24px;height:24px}}#toolbar button.icon-btn canvas{display:block;pointer-events:none}#toolbar button:hover{background:#3c3c3c}#toolbar button:active,#toolbar button.active{background:#094771}#toolbar .toolbar-gap{flex:0 0 auto;width:10px}@media (pointer: fine){#toolbar .toolbar-gap{width:5px}}#tab-bar{flex:0 0 auto;display:flex;align-items:center;gap:2px;padding:4px 8px;background:#1e1e1e;border-bottom:1px solid #3c3c3c;overflow-x:auto}.tab{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:4px 6px 4px 10px;border:1px solid #3c3c3c;border-radius:3px 3px 0 0;background:#2d2d30;cursor:pointer;max-width:160px}.tab.active{background:#094771;border-color:#007acc}.tab.grouped{border-top:3px solid var(--group-color);background:color-mix(in srgb,var(--group-color) 14%,#2d2d30)}.tab.grouped.active{background:color-mix(in srgb,var(--group-color) 30%,#094771);border-color:var(--group-color)}.tab.drawing .tab-name:before{content:"▭ ";color:var(--group-color, #9a9a9a)}.tab-name{font-family:Courier New,monospace;font-size:12px;color:#d4d4d4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tab-close{flex:0 0 auto;font-family:Courier New,monospace;font-size:12px;line-height:1;color:#9a9a9a;background:transparent;border:none;border-radius:2px;width:16px;height:16px;padding:0;cursor:pointer}.tab-close:hover{background:#3c3c3c;color:#fff}.tab-new{flex:0 0 auto;font-family:Courier New,monospace;font-size:14px;font-weight:700;color:#d4d4d4;background:#2d2d30;border:1px solid #3c3c3c;border-radius:3px;width:26px;height:26px;padding:0;cursor:pointer}.tab-new:hover{background:#3c3c3c}#canvas-wrapper{position:relative;flex:1 1 auto;min-height:0}#cad-canvas{display:block;width:100%;height:100%;cursor:crosshair;outline:none;background:#1e1e1e;touch-action:none}#home-btn{position:absolute;top:10px;right:10px;width:28px;height:28px;padding:0;font-size:15px;color:#ddd;background:#282828c7;border:1px solid #555555;border-radius:4px;cursor:pointer;outline:none}#home-btn:hover{background:#3c3c3cdb;border-color:#888}#mobile-touch-ui{display:none;position:absolute;left:50%;bottom:10px;transform:translate(-50%);flex-direction:column;align-items:center;gap:8px}@media (any-pointer: coarse){#mobile-touch-ui{display:flex}}#mobile-controls{display:flex;gap:8px}#mobile-touch-ui button{width:44px;height:44px;padding:0;font-size:18px;font-weight:700;color:#ddd;background:#282828d9;border:1px solid #555555;border-radius:6px;cursor:pointer;outline:none;touch-action:manipulation}#mobile-touch-ui button:active{background:#3c3c3ce6}#mobile-escape{color:#ff8080}#mobile-enter{color:#80ff80}#mobile-delete{color:#ff8080}#mobile-ortho{color:#ffff80}#mobile-numpad{display:none;grid-template-columns:repeat(4,44px);gap:6px}#mobile-numpad.visible{display:grid}#mobile-numpad button{font-size:16px}#command-bar{position:relative;flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px 8px;background:#252526;border-top:1px solid #3c3c3c}@media (pointer: fine){#command-bar{flex-wrap:nowrap}}@media (max-width: 900px){#command-bar{gap:4px!important;padding:4px 6px!important}#command-bar .prompt-label{font-size:11px!important;min-width:0!important}#command-bar input[type=text]{font-size:11px!important;min-width:40px!important}#command-bar .angle-marker{font-size:11px!important}#command-bar .snap-label{min-width:55px!important;font-size:10px!important}#command-bar .ortho-label{font-size:10px!important;padding:0 2px!important}}#command-bar .suggestions-list{position:absolute;left:8px;right:8px;bottom:100%;max-height:220px;overflow-y:auto;background:#2d2d30;border:1px solid #3c3c3c;border-bottom:none;box-shadow:0 -4px 12px #0006}#command-bar .suggestion-row{padding:8px 10px;font-family:Courier New,monospace;font-size:13px;color:#d4d4d4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;border-bottom:1px solid #3c3c3c}#command-bar .suggestion-row:last-child{border-bottom:none}#command-bar .suggestion-row.active{background:#094771;color:#fff}#command-bar .prompt-label{font-size:13px;font-weight:700;color:#0ff;white-space:normal;min-width:120px}#command-bar input[type=text]{font-family:Courier New,monospace;font-size:13px;color:#fff;background:#252526;border:none;outline:none;flex:1 1 auto;min-width:60px}#command-bar input[type=text]:disabled{color:#888}#command-bar .angle-marker{font-size:13px;color:#ff0;display:none}#command-bar .angle-marker.visible{display:inline}#command-bar input.angle-field{display:none;flex:1 1 auto}#command-bar input.angle-field.visible{display:inline-block}#command-bar .snap-label{min-width:100px;text-align:right;font-size:12px;font-weight:700;color:#ff0}#command-bar .ortho-label{font-size:12px;color:#666;cursor:pointer;padding:0 4px}#command-bar .overlay-label.enabled{color:#c586c0;font-weight:400}#command-bar .ortho-label.enabled{color:#0f8;font-weight:700}#dynamic-input-tooltip{position:fixed;z-index:50;display:none;pointer-events:none;font-family:Courier New,monospace;font-size:12px;background:#252526eb;border:1px solid #555555;border-radius:3px;padding:3px 6px;color:#d4d4d4;white-space:nowrap;box-shadow:0 2px 6px #00000080}#dynamic-input-tooltip.visible{display:block}#dynamic-input-tooltip .dit-value{color:#fff;padding:0 3px}#dynamic-input-tooltip .dit-angle-marker,#dynamic-input-tooltip .dit-angle{display:none;color:#ff0}#dynamic-input-tooltip .dit-value.dit-active,#dynamic-input-tooltip .dit-angle.dit-active{background:#0e5a8a;color:#fff}#dynamic-input-tooltip .dit-angle-marker.visible,#dynamic-input-tooltip .dit-angle.visible{display:inline}#toast{position:fixed;bottom:60px;left:50%;transform:translate(-50%);background:#2d2d30;color:#fff;border:1px solid #3c3c3c;border-radius:4px;padding:8px 16px;font-size:13px;opacity:0;transition:opacity .3s ease;pointer-events:none;z-index:1000}#toast.visible{opacity:1}.model-busy{position:absolute;top:12px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:10px;background:#2d2d30;color:#fff;border:1px solid #3c3c3c;border-radius:4px;padding:8px 16px;font-size:13px;opacity:0;pointer-events:none;z-index:20;will-change:opacity}.model-busy.visible{opacity:1;transition:opacity .15s linear .2s}.model-busy-spin{width:14px;height:14px;border:2px solid #5a5a5a;border-top-color:#fff;border-radius:50%;will-change:transform;animation:model-busy-spin .8s linear infinite}@keyframes model-busy-spin{to{transform:rotate(360deg)}}#restore-prompt{position:fixed;top:12px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:10px;background:#2d2d30;color:#fff;border:1px solid #3c3c3c;border-radius:4px;padding:8px 12px;font-size:13px;box-shadow:0 4px 12px #0006;z-index:1000}#restore-prompt button{font-size:12px;padding:4px 10px;border-radius:3px;border:1px solid #3c3c3c;background:#3c3c3c;color:#fff;cursor:pointer}#restore-prompt button:first-of-type{background:#094771;border-color:#0e639c}#cloud-panel{position:fixed;top:44px;right:10px;width:min(360px,calc(100vw - 20px));max-height:calc(100vh - 60px);overflow-y:auto;background:#252526;border:1px solid #3c3c3c;border-radius:4px;padding:10px;color:#d4d4d4;font-size:12px;z-index:900;box-shadow:0 4px 16px #0006}#cloud-panel[hidden]{display:none}.cloud-panel-header{font-weight:700;font-size:13px;color:#fff;margin-bottom:8px}.cloud-panel-section{margin-bottom:10px}.cloud-panel-section:last-child{margin-bottom:0}.cloud-panel-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}#cloud-panel input[type=text],#cloud-panel input[type=email],#cloud-panel input[type=password],#cloud-panel input[type=search]{font-family:Courier New,monospace;font-size:12px;color:#fff;background:#1e1e1e;border:1px solid #3c3c3c;border-radius:3px;padding:4px 6px;flex:1 1 auto;min-width:80px}.cloud-panel-search{width:100%;box-sizing:border-box}#cloud-panel button{font-family:Courier New,monospace;font-size:12px;font-weight:700;color:#d4d4d4;background:#2d2d30;border:1px solid #3c3c3c;border-radius:3px;padding:4px 8px;cursor:pointer;flex:0 0 auto}#cloud-panel button:hover{background:#3c3c3c}.cloud-panel-status{color:#fc6;margin-top:4px;font-size:11px}.cloud-panel-email{flex:1 1 auto;color:#0ff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cloud-panel-list{display:flex;flex-direction:column;gap:4px}.cloud-panel-drawing-row{padding:4px;border-radius:3px}.cloud-panel-drawing-row.active{background:#094771}.cloud-panel-drawing-name{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:60px}#toolbar .ws-group,#toolbar .ws-switcher,#toolbar .ws-sketch-banner{display:contents}#toolbar .ws-group[hidden],#toolbar .ws-switcher[hidden],#toolbar .ws-sketch-banner[hidden]{display:none}#toolbar button.ws-btn{min-width:36px;height:32px;padding:0 10px;font-weight:600;font-size:13px;letter-spacing:.5px}#toolbar button.ws-btn.active{background:#0e639c;color:#fff}#command-bar .file-menu-wrap[hidden],.file-menu-popover[hidden]{display:none}#command-bar .file-menu-wrap{flex:0 0 auto;margin-left:auto}#command-bar .file-menu-trigger{padding:2px 8px;color:#d4d4d4;background:#2d2d30;border:1px solid #3c3c3c;border-radius:3px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}#command-bar .file-menu-trigger:hover,#command-bar .file-menu-trigger:focus-visible{background:#3c3c3c;outline:none}.file-menu-popover{position:fixed;z-index:10000;display:flex;flex-direction:column;min-width:190px;max-width:min(300px,calc(100vw - 16px));max-height:min(70vh,560px);overflow:auto;padding:4px;color:#d4d4d4;background:#252526;border:1px solid #454545;border-radius:4px;box-shadow:0 6px 20px #00000080}.file-menu-popover .file-menu-item{flex:0 0 auto;width:100%;min-height:32px;padding:6px 9px;color:inherit;background:transparent;border:0;border-radius:3px;text-align:left;font:inherit;font-weight:400;cursor:pointer}.file-menu-popover .file-menu-item:hover,.file-menu-popover .file-menu-item:focus-visible{background:#3c3c3c;outline:none}#toolbar button.finish-sketch{background:#2e7d32;color:#fff}#toolbar button.finish-sketch:hover{background:#388e3c}#toolbar .ws-sketch-label{align-self:center;margin:0 6px;color:#9cdcfe;font-size:12px;white-space:nowrap}#gl-canvas{display:block;width:100%;height:100%;outline:none;background:#1e1e1e;touch-action:none}#gl-canvas[hidden],#cad-canvas[hidden]{display:none}#model-browser{position:absolute;top:34px;left:10px;min-width:190px;max-width:340px;max-height:calc(100% - 20px);overflow-y:auto;padding:6px 0;background:#252526eb;border:1px solid #3c3c3c;border-radius:4px;color:#d4d4d4;font-size:12px;-webkit-user-select:none;user-select:none}#model-browser[hidden]{display:none}#model-browser .mb-title{padding:2px 10px 6px;font-weight:600;color:#fff;border-bottom:1px solid #3c3c3c;margin-bottom:4px}#model-browser .mb-hint{padding:4px 10px;color:#8a8a8a;font-style:italic}#model-browser .mb-row{display:flex;align-items:center;gap:6px;padding:3px 10px;cursor:default}#model-browser .mb-row:hover{background:#2a2d2e}#model-browser .mb-row.selected{background:#094771}#model-browser .mb-row.error .mb-name{color:#f48771}#model-browser .mb-icon{width:14px;text-align:center;color:#9cdcfe}#model-browser .mb-detail{margin-left:auto;color:#8a8a8a}#model-browser .mb-eye{display:flex;color:#8a8a8a;cursor:pointer;visibility:hidden}#model-browser .mb-row:hover .mb-eye,#model-browser .mb-row.suppressed .mb-eye,#model-browser .mb-row.unseen .mb-eye{visibility:visible}#model-browser .mb-row.unseen .mb-name,#model-browser .mb-row.unseen .mb-icon{opacity:.6}#model-browser .mb-eye:hover{color:#fff}#model-browser .mb-row.suppressed .mb-name,#model-browser .mb-row.suppressed .mb-icon,#model-browser .mb-row.suppressed .mb-detail{opacity:.45}#model-browser .mb-row.suppressed .mb-name{text-decoration:line-through}.mb-menu{position:fixed;z-index:1000;min-width:110px;padding:4px 0;background:#252526;border:1px solid #454545;box-shadow:0 2px 8px #00000080;color:#ccc;font:12px Consolas,Menlo,monospace}.mb-menu-item{padding:4px 14px;cursor:default}.mb-menu-item:hover{background:#094771;color:#fff}#gl-canvas[hidden]~.v3d-overlay{display:none}.view-label{position:absolute;top:8px;left:10px;color:#c8c8c8;font-size:12px;pointer-events:none;-webkit-user-select:none;user-select:none}.view-cube-wrap{position:absolute;top:40px;right:0;width:138px;height:138px}.view-cube{position:absolute;top:14px;left:14px;width:110px;height:110px}.vc-arrow{position:absolute;width:18px;height:18px;padding:0;border:none;background:transparent;color:#9aa3ad;font-size:12px;line-height:18px;cursor:pointer}.vc-arrow:hover{color:#fff}.vc-arrow.up{top:0;left:60px}.vc-arrow.down{bottom:0;left:60px}.vc-arrow.left{left:0;top:60px}.vc-arrow.right{right:0;top:60px}.vc-arrow.ccw{top:0;left:4px;font-size:15px}.vc-arrow.cw{top:0;right:4px;font-size:15px}#model-browser .mb-row.indent{padding-left:24px}.feature-dialog{position:absolute;top:10px;right:128px;width:320px;max-height:calc(100% - 20px);display:flex;flex-direction:column;background:#2b2b2c;border:1px solid #454545;border-radius:6px;box-shadow:0 6px 24px #00000073;color:#dcdcdc;font-size:12px;z-index:20;-webkit-user-select:none;user-select:none}#gl-canvas[hidden]~.feature-dialog{display:none}.feature-dialog .orient-cube{display:flex;justify-content:center;margin:4px 0 6px}.feature-dialog .oc-grid{display:grid;grid-template-columns:30px 112px 30px;grid-template-rows:26px 112px 26px;gap:3px;align-items:center;justify-items:center}.feature-dialog .oc-canvas{cursor:pointer;border-radius:4px;background:#1e1e1e}.feature-dialog .oc-btn{width:100%;height:100%;padding:0;background:#1e1e1e;color:#cfcfcf;border:1px solid #4a4a4a;border-radius:3px;font-size:13px;cursor:pointer}.feature-dialog .oc-btn:hover{border-color:#6a6a6a;color:#fff}.feature-dialog .oc-btn.active{background:#094771;border-color:#007acc}.feature-dialog .oc-iso{font-size:10px}.feature-dialog .oc-left,.feature-dialog .oc-right{height:60px}.feature-dialog .oc-up,.feature-dialog .oc-down{width:60px}body[data-workspace=drawing] #gl-canvas[hidden]~.feature-dialog{display:flex}.feature-dialog .fd-title{padding:8px 12px;font-weight:600;font-size:13px;color:#fff;background:#333337;border-bottom:1px solid #454545;border-radius:6px 6px 0 0}.feature-dialog .fd-body{padding:8px 12px 4px;overflow-y:auto;min-height:0}.feature-dialog .fd-row{display:flex;align-items:center;gap:8px;margin:5px 0}.feature-dialog .fd-row[hidden]{display:none}.feature-dialog .fd-label{flex:0 0 76px;color:#b8b8b8}.feature-dialog .fd-slot{flex:1 1 auto;display:flex;align-items:center;gap:6px;min-width:0}.feature-dialog .fd-input{width:90px;padding:4px 6px;background:#1e1e1e;color:#fff;border:1px solid #555555;border-radius:3px;font:inherit}.feature-dialog .fd-input.fd-wide{width:110px}.feature-dialog .fd-input:focus{outline:none;border-color:#0e639c}.feature-dialog .fd-unit{color:#8a8a8a}.feature-dialog .fd-selection{padding:3px 8px;border-radius:3px;background:#e8b04a26;color:#e8b04a}.value-editor{position:fixed;transform:translate(-50%,-50%);z-index:60;width:72px;padding:2px 4px;font:12px Consolas,Menlo,monospace;text-align:center;color:#fff;background:#101418;border:1px solid #5aa0ff;border-radius:3px;outline:none}.feature-dialog .fd-selection.clickable{cursor:pointer}.feature-dialog .fd-selection.active{outline:1px solid #5aa0ff}.feature-dialog .fd-selection.done{background:#4caf5026;color:#7fd07f}.feature-dialog .fd-choice{display:flex;flex:1 1 auto;flex-wrap:wrap;gap:4px}.feature-dialog .fd-choice-btn{display:flex;flex-direction:column;align-items:center;gap:2px;flex:1 1 0;min-width:44px;padding:3px 2px;background:#1e1e1e;color:#cfcfcf;border:1px solid #4a4a4a;border-radius:4px;font:inherit;font-size:11px;cursor:pointer}.feature-dialog .fd-choice-btn:hover{border-color:#6a6a6a}.feature-dialog .fd-choice-btn.active{background:#094771;border-color:#0e639c;color:#fff}.feature-dialog .fd-small-btn{padding:3px 8px;background:#3a3a3d;color:#dcdcdc;border:1px solid #555555;border-radius:3px;font:inherit;cursor:pointer}.feature-dialog .fd-small-btn:hover{background:#45454a}.feature-dialog .fd-hint{margin:8px 0 2px;color:#8a8a8a;font-size:11px;line-height:1.35}.feature-dialog .fd-message{min-height:16px;padding:0 12px;color:#f48771;font-size:11px}.feature-dialog .fd-buttons{display:flex;justify-content:flex-end;gap:8px;padding:8px 12px 10px}.feature-dialog .fd-buttons button{min-width:72px;padding:5px 12px;border-radius:4px;font:inherit;cursor:pointer}.feature-dialog .fd-ok{background:#0e639c;color:#fff;border:1px solid #1177bb}.feature-dialog .fd-ok:disabled{background:#2f3b45;color:#7c8a96;border-color:#3a4652;cursor:default}.feature-dialog .fd-cancel{background:#3a3a3d;color:#dcdcdc;border:1px solid #555555}.feature-dialog .fd-holes{margin:4px 0 6px;padding:4px 6px;background:#242425;border:1px solid #3a3a3a;border-radius:4px;max-height:190px;overflow-y:auto}.feature-dialog .fd-hole-head{padding:3px 4px;color:#cfcfcf;border-radius:3px;cursor:pointer}.feature-dialog .fd-hole-head.active{background:#094771;color:#fff}.feature-dialog .fd-hole-dim{display:flex;align-items:center;gap:5px;padding:2px 0 2px 14px}.feature-dialog .fd-hole-ref{flex:0 0 72px;color:#e8d27a}.feature-dialog .fd-hole-dim .fd-input{width:64px}.feature-dialog .fd-icon-btn{padding:1px 6px}.dim-layer{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;overflow:hidden}#gl-canvas[hidden]~.dim-layer{display:none}.dim-label{position:absolute;transform:translate(-50%,-50%);padding:1px 5px;background:#1e1e1ee0;border:1px solid #ffd400;border-radius:3px;color:#ffd400;font-size:12px;font-weight:600;pointer-events:auto;cursor:pointer;white-space:nowrap}.dim-label.selected{border-color:#4fc3ff;color:#4fc3ff}.dim-label .dim-input{width:58px;background:#1e1e1e;color:#fff;border:none;outline:none;font:inherit}.feature-dialog .fd-toggle{display:block;width:100%;margin:6px 0;padding:6px;background:#1e1e1e;color:#dcdcdc;border:1px solid #4a4a4a;border-radius:4px;font:inherit;cursor:pointer}.feature-dialog .fd-toggle.active{background:#094771;border-color:#0e639c;color:#fff}#toolbar button.measure-more{width:12px;margin-left:-2px;padding:0;color:#b8b8b8;background:transparent;border:none;font-size:10px;cursor:pointer}#toolbar button.measure-more:hover{color:#fff}.feature-dialog .measure-results{display:flex;flex-direction:column;gap:4px;margin:6px 0 2px}.feature-dialog .measure-row{display:flex;align-items:center;gap:8px}.feature-dialog .measure-label{flex:0 0 96px;color:#a8a8a8}.feature-dialog .measure-value{flex:1 1 auto;color:#ffd400;font-weight:600;font-size:14px;-webkit-user-select:text;user-select:text}.feature-dialog .measure-hint{color:#a8a8a8}.feature-dialog .sheet-bends{display:flex;flex-direction:column;gap:4px;margin:2px 0 6px}.feature-dialog .sheet-bend-row{display:flex;align-items:center;gap:4px}.feature-dialog .sheet-bend-row>span:first-child{flex:0 0 50px;color:#a8a8a8}.feature-dialog .sheet-bend-row .fd-small-btn.active{background:#0e639c;color:#fff}.feature-dialog .sheet-angle{width:44px;padding:2px 4px;color:#d4d4d4;background:#1e1e1e;border:1px solid #3c3c3c;font:inherit}.feature-dialog .sheet-info{margin:4px 0;color:#ffd400}.cloud-panel-item{margin-bottom:4px}.cloud-panel-item-name{font-weight:600}.cloud-panel-file-row{padding-left:14px}.cloud-panel-company{flex:1;min-width:0}
