:root{--ink:#263f47;--muted:#859590;--teal:#167c70;--teal-light:#e4f2ed;--border:#e0e8e2;--paper:#fbfcfb;--panel:#ffffff;--bg:#f2f5f1;--shadow:0 8px 30px #213e3320;--safe-bottom:env(safe-area-inset-bottom,0px);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);font-size:13px;color-scheme:light}
*{box-sizing:border-box}html,body,#app{margin:0;width:100%;height:100%;overflow:hidden}body{background:var(--bg)}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;border:0;background:transparent;display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:8px;min-height:36px;padding:8px 12px;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:hover{background:#edf3ee}button:active{transform:translateY(1px)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #369788;outline-offset:2px}button:disabled{opacity:.35;cursor:default}input,select,textarea{min-width:0;max-width:100%;border:1px solid var(--border);border-radius:7px;background:white;padding:10px;outline:none}input[type=checkbox]{accent-color:var(--teal)}input[type=color]{padding:3px;width:36px;height:32px}input::placeholder{color:#a1ada8}textarea{resize:vertical;min-height:80px}.icon{width:19px;height:19px;flex-shrink:0}.icon-btn{padding:8px;min-width:36px}.btn{border:1px solid var(--border);background:white;font-weight:550}.primary{background:var(--teal);color:white;border-color:var(--teal)}.primary:hover{background:#116b60}.quiet{color:var(--muted)}.danger{color:#b6504e}.pill{font-size:10px;letter-spacing:.7px;text-transform:uppercase;border:1px solid #dfe9e1;padding:5px 7px;border-radius:6px;color:#658075;background:#f5f8f4;white-space:nowrap}.dot{width:6px;height:6px;background:#5da38c;border-radius:100%;display:inline-block}.app{height:100dvh;display:flex;flex-direction:column;overscroll-behavior:none}.appbar{height:64px;flex-shrink:0;border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 21px;gap:22px;background:#fff;z-index:30}.brand{display:flex;align-items:center;gap:10px;min-width:201px;font-size:23px;letter-spacing:-1.1px;font-weight:650}.brand .logo{width:34px;height:34px;background:var(--teal);color:white;border-radius:10px;padding:4px}.brand small{font-size:10px;letter-spacing:1.1px;color:#859c90;margin-left:3px;font-weight:550}.document-title{display:flex;align-items:center;gap:11px;min-width:0;flex:1}.document-title .divider{height:25px;width:1px;background:var(--border);margin-right:5px}.doc-title-button{font-weight:600;padding:7px 2px;min-width:0}.doc-title-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:35vw}.save-status{font-size:11px;color:#93a298;white-space:nowrap;display:flex;align-items:center;gap:5px}.appbar-actions{display:flex;gap:8px;align-items:center}.avatar{height:31px;width:31px;background:#f0eee4;border:2px solid white;border-radius:50%;color:#93866a;font-weight:600;font-size:10px;display:grid;place-items:center;margin-left:4px}.workbar{display:flex;flex-shrink:0;height:48px;align-items:center;padding:0 18px;border-bottom:1px solid var(--border);gap:8px;background:#fbfcfa;z-index:25}.workspace-label{display:flex;align-items:center;gap:9px;min-width:213px;font-size:11px;color:#8c9b91;letter-spacing:1.3px;text-transform:uppercase}.workbar .tab{height:48px;border-radius:0;padding:0 15px;border-bottom:2px solid transparent;font-size:12px;color:#7b8d83}.workbar .tab.active{border-bottom-color:var(--teal);color:var(--teal);font-weight:650}.workbar .spacer{flex:1}.workbar .compact{font-size:11px;min-height:29px;padding:5px 8px}.workbar .separator{height:19px;width:1px;background:var(--border);margin:0 6px}.workspace{display:flex;flex:1;min-height:0;position:relative}.library{width:238px;flex-shrink:0;background:var(--panel);border-right:1px solid var(--border);display:flex;flex-direction:column;z-index:22;min-height:0}.panel-heading{display:flex;align-items:center;justify-content:space-between;padding:18px 17px 9px}.panel-heading h2{margin:0;font-size:14px;letter-spacing:-.3px}.panel-heading small{font-weight:400;font-size:10px;letter-spacing:0;color:#91a199;margin-left:5px}.panel-subtitle{margin:0 17px 15px;font-size:11px;color:#9aa69f}.searchbox{margin:0 14px 12px;position:relative}.searchbox .icon{position:absolute;left:10px;top:10px;width:16px;height:16px;color:#95a49b}.searchbox input{width:100%;padding:10px 10px 10px 32px;font-size:11px;background:#f7f9f6;border-color:#e9eeea}.category-tabs{display:flex;gap:4px;margin:0 14px 14px;background:#f0f4ef;padding:3px;border-radius:8px}.category-tabs button{flex:1;font-size:10px;min-height:30px;padding:5px 6px;border-radius:5px;color:#829488}.category-tabs button.active{background:white;color:#346b5e;box-shadow:0 1px 3px #20372514;font-weight:650}.library-scroll{overflow-y:auto;flex:1;overscroll-behavior:contain;padding:0 14px 15px;scrollbar-width:thin;scrollbar-color:#d5dfd6 transparent}.library-group{margin:0 0 18px}.section-label{font-size:9px;letter-spacing:1.25px;color:#97a599;margin:3px 0 10px;font-weight:650;text-transform:uppercase;display:flex;justify-content:space-between}.symbol-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.symbol-card{min-height:96px;padding:10px 5px 8px;display:flex;flex-direction:column;justify-content:center;gap:5px;border:1px solid #e8ede8;border-radius:9px;background:#fff;user-select:none;touch-action:pan-y}.symbol-card:hover{border-color:#acd4c7;background:#f7fbf8}.symbol-card.selected{border-color:#53a892;background:#eef8f2}.symbol-card svg{height:47px;width:73px;overflow:visible}.symbol-card span{font-size:9px;line-height:1.3;color:#71847a;text-align:center;max-width:96px}.library-footer{padding:12px 16px;border-top:1px solid var(--border);font-size:10px;display:flex;align-items:center;gap:8px;color:#8c9f92;background:#fbfcfa}.canvas-area{position:relative;flex:1;min-width:0;overflow:hidden;background:var(--paper)}.viewport{position:absolute;inset:0;outline:none;touch-action:none;user-select:none;-webkit-user-select:none;overflow:hidden;cursor:default}.viewport.drawing{cursor:crosshair}.viewport.panning{cursor:grab}.canvas-head{position:absolute;left:40px;right:18px;top:38px;display:flex;justify-content:space-between;align-items:center;z-index:5;pointer-events:none}.canvas-head>*{pointer-events:auto}.canvas-head .undo-group{display:flex;background:#fffffff0;border:1px solid #e4ebe2;border-radius:10px;padding:2px;box-shadow:0 3px 8px #38503b05}.undo-group button{min-width:33px;height:32px;min-height:32px;padding:7px;color:#5e796b}.undo-group .icon{width:16px;height:16px}.render-badge{display:flex;align-items:center;gap:7px;color:#6c8577;font-size:10px;background:#ffffffdb;padding:8px 10px;border:1px solid #e2eae1;border-radius:7px}.view-label{position:absolute;top:41px;left:50%;transform:translateX(-50%);z-index:3;font-size:10px;letter-spacing:1.3px;color:#9baaa0;pointer-events:none;white-space:nowrap}.zoom-controls{position:absolute;right:20px;bottom:113px;display:flex;align-items:center;background:#fff;border:1px solid #dfe8df;border-radius:9px;box-shadow:0 3px 14px #304d3610;padding:2px;z-index:10}.zoom-controls button{min-width:30px;min-height:32px;padding:6px}.zoom-controls span{min-width:44px;font-size:10px;color:#738a79;text-align:center;font-variant-numeric:tabular-nums}.zoom-controls .separator{height:17px;width:1px;background:var(--border)}.zoom-controls .icon{width:15px;height:15px}.axis{position:absolute;bottom:113px;left:41px;font:9px ui-monospace,monospace;color:#9aaba0;pointer-events:none;z-index:3}.axis svg{width:38px;height:38px;display:block;margin-bottom:4px}.tool-dock{position:absolute;bottom:41px;left:50%;transform:translateX(-50%);display:flex;gap:3px;padding:6px;background:#ffffffed;backdrop-filter:blur(15px);border:1px solid #dce7dc;box-shadow:0 8px 28px #26463412;border-radius:14px;z-index:20}.tool-dock button{width:45px;height:49px;min-height:49px;flex-direction:column;gap:3px;border-radius:9px;padding:6px 4px;color:#8a9b8f;position:relative}.tool-dock button .icon{width:20px;height:20px}.tool-dock button span{font-size:8px;letter-spacing:.1px}.tool-dock button.active{background:var(--teal);color:white;box-shadow:0 2px 5px #17776024}.tool-dock .dock-divider{width:1px;background:#e2e9e0;margin:6px 3px}.tool-hint{position:absolute;left:50%;bottom:107px;transform:translateX(-50%);padding:7px 12px;border-radius:7px;background:#f8fbf6df;color:#89a08d;font-size:10px;line-height:1.4;white-space:nowrap;z-index:9;pointer-events:none;max-width:90%;overflow:hidden;text-overflow:ellipsis}.tool-hint.working{color:#237e6e;background:#e9f7ee}.finish-button{position:absolute;bottom:160px;left:50%;transform:translateX(-50%);z-index:20;border:1px solid var(--teal);background:white;color:var(--teal)}.statusbar{height:29px;flex-shrink:0;background:#f9fbf7;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 16px;gap:12px;font-size:9px;color:#94a48f;z-index:24}.statusbar .left,.statusbar .right{display:flex;align-items:center;gap:14px}.statusbar button{min-height:23px;padding:2px 4px;font-size:9px;color:#90a08b}.statusbar .on{color:#328c70;font-weight:650}.statusbar .coords{min-width:112px;font-variant-numeric:tabular-nums;font-family:ui-monospace,monospace}.statusbar .layout-select{font-size:9px;border:0;background:transparent;padding:2px 3px;max-width:125px}.inspector{width:263px;flex-shrink:0;border-left:1px solid var(--border);background:white;display:flex;flex-direction:column;z-index:22;min-height:0}.inspector-tabs{display:flex;border-bottom:1px solid var(--border);padding:6px 12px 0;gap:8px}.inspector-tabs button{border-radius:0;border-bottom:2px solid transparent;padding:10px 8px;font-size:11px;color:#8a9a8d}.inspector-tabs button.active{border-color:var(--teal);color:var(--teal);font-weight:600}.inspector-content{flex:1;overflow:auto;overscroll-behavior:contain;padding:17px;scrollbar-width:thin}.object-card{border:1px solid #e3ebe1;border-radius:10px;overflow:hidden;margin-bottom:20px}.object-preview{height:93px;background:radial-gradient(#cbdace .65px,transparent .65px);background-size:11px 11px;display:flex;align-items:center;justify-content:center;color:var(--teal)}.object-preview svg{width:112px;height:72px}.object-meta{padding:12px;background:#f8faf6;border-top:1px solid #e5eee0}.object-meta strong{display:block;font-size:12px;margin-bottom:5px}.object-meta small{font-size:9px;color:#8e9e8e}.inspector-section{border-top:1px solid var(--border);padding-top:15px;margin-top:18px}.inspector-section:first-child{border-top:0;padding-top:0;margin-top:0}.inspector-section h3{font-size:10px;text-transform:uppercase;letter-spacing:1px;font-weight:600;color:#849682;margin:0 0 14px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field{display:flex;flex-direction:column;gap:5px;font-size:10px;color:#8b9a8a;min-width:0}.field.full{grid-column:1/-1}.field input,.field select{padding:9px 8px;font-size:11px;min-height:35px;color:#536b58;background:#fafcf8;border-color:#e4ecdf}.field textarea{font-size:11px;min-height:66px}.field .unit{float:right;color:#a5b19f}.property-list{display:flex;flex-direction:column;gap:12px}.property-row{display:flex;justify-content:space-between;gap:10px;font-size:10px;color:#90a08b}.property-row b{font-weight:500;color:#536c57}.hint-box{font-size:10px;line-height:1.7;padding:12px;background:#f5f9f1;border-radius:8px;color:#8a9c7c;margin-top:15px}.hint-box strong{font-weight:550;color:#638263}.operation-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.operation-grid button{font-size:10px;padding:8px 7px;justify-content:flex-start;min-height:38px;border:1px solid #e6ede1;border-radius:7px;color:#789172}.operation-grid .icon{width:15px;height:15px}.layer-row{display:flex;align-items:center;gap:6px;padding:8px 0;border-bottom:1px solid #edf1e9}.layer-row input[type=color]{height:20px;width:23px;border:0;padding:0;background:none;flex-shrink:0}.layer-row span{flex:1;overflow:hidden;text-overflow:ellipsis;font-size:11px}.layer-row button{padding:5px;min-width:28px;min-height:29px;color:#a5b19b}.layer-row button.active{color:#428b67}.layer-row .icon{width:15px;height:15px}.list-empty{text-align:center;padding:30px 12px;color:#98a88e;font-size:12px;line-height:1.8}.issue{padding:12px;border:1px solid #e5eadd;border-radius:8px;display:flex;align-items:flex-start;gap:8px;margin-bottom:8px;font-size:11px;line-height:1.6;width:100%;text-align:left;justify-content:flex-start}.issue .icon{width:16px;height:16px;margin-top:2px;color:#ae955d}.issue small{display:block;color:#9aa58d}.constraint-item{border-bottom:1px solid #e5eddf;padding:8px 0;display:flex;align-items:center;gap:7px;font-size:10px;color:#738f68}.constraint-item span{flex:1}.constraint-item button{padding:3px;min-height:26px}.mobile-only{display:none!important}.modal-backdrop{position:fixed;inset:0;z-index:100;background:#153b3159;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:24px}.modal{width:500px;max-width:100%;max-height:85dvh;background:#fff;border-radius:17px;box-shadow:0 20px 90px #14372e44;display:flex;flex-direction:column;overflow:hidden}.modal.wide{width:680px}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:20px 23px 14px;border-bottom:1px solid var(--border)}.modal-head h2{font-size:18px;letter-spacing:-.5px;margin:0}.modal-body{padding:22px;overflow:auto;line-height:1.7;color:#71816c;min-height:0}.modal-body p{font-size:12px;margin:0 0 15px}.modal-body input,.modal-body textarea,.modal-body select{width:100%;margin-bottom:12px}.modal-foot{padding:14px 22px 19px;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #edf1e8}.export-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.export-option{border:1px solid #e2ecdc;border-radius:10px;display:flex;align-items:flex-start;justify-content:flex-start;text-align:left;padding:15px;gap:10px;min-height:92px}.export-option .icon{color:#3a977c;margin-top:1px}.export-option strong{display:block;font-size:12px;font-weight:600;margin-bottom:5px;color:#43654e}.export-option small{font-size:10px;line-height:1.6;display:block;color:#92a188}.modal .operation-grid{grid-template-columns:repeat(3,1fr)}.modal .operation-grid button{flex-direction:column;justify-content:center;min-height:75px;text-align:center;font-size:11px;gap:8px}.modal .operation-grid .icon{width:24px;height:24px}.toast{position:fixed;left:50%;bottom:110px;transform:translateX(-50%) translateY(12px);opacity:0;pointer-events:none;z-index:120;background:#294d3f;color:#f5fff0;padding:12px 17px;border-radius:10px;box-shadow:var(--shadow);font-size:12px;transition:opacity .2s,transform .2s;max-width:90vw;text-align:center;line-height:1.6}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.toast.error{background:#874b43}.sheet-backdrop{display:none}.context-menu{position:absolute;background:#fff;border:1px solid #dce8d5;border-radius:13px;box-shadow:var(--shadow);z-index:60;display:grid;grid-template-columns:repeat(2,1fr);padding:5px;width:205px}.context-menu button{font-size:10px;min-height:54px;flex-direction:column;gap:5px}.command-input{display:flex;align-items:center;gap:12px;background:#f6faf0;border:1px solid #dce8d1;padding:7px 12px;border-radius:10px}.command-input input{border:0;background:transparent;margin:0!important;font-family:ui-monospace,monospace;font-size:14px;padding:7px 0;flex:1;min-width:0}.command-input .icon{color:#589473}.keyboard-table{font-size:11px;border-collapse:collapse;width:100%;line-height:1.5}.keyboard-table td{padding:7px 0;border-bottom:1px solid #edf2e7;vertical-align:top}.keyboard-table td:last-child{text-align:right;color:#91a580;font-family:ui-monospace,monospace}.param-row{display:grid;grid-template-columns:1fr 1.5fr 30px;gap:6px;margin-bottom:7px}.param-row input{width:100%;font-size:11px;margin-bottom:0}.param-result{font-size:10px;color:#8ba777;margin:0 0 12px}.line-style-list button{width:100%;justify-content:flex-start;border:1px solid #e0ecd6;padding:12px;margin-bottom:7px;gap:12px;font-size:11px}.line-style-list svg{width:70px;height:18px}.loading{position:fixed;inset:0;background:#f6f9f3e8;z-index:150;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;color:#729869;font-size:13px}.spinner{width:26px;height:26px;border:2px solid #e0ead9;border-top-color:#24846a;border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.error-text{color:#b85846;font-size:12px;padding-top:9px}.muted-note{font-size:10px;color:#a4ae9a;line-height:1.7;margin-top:15px}.about-stats{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;margin:17px 0}.about-stats div{padding:12px 7px;background:#f6faf1;border-radius:8px;text-align:center}.about-stats b{display:block;font-size:19px;font-weight:500;color:#557849}.about-stats small{font-size:9px;color:#8ca37b}.hide{display:none!important}
@media(min-width:1600px){.library{width:264px}.inspector{width:288px}.brand{min-width:227px}.workspace-label{min-width:239px}.symbol-card{min-height:108px}.symbol-card svg{height:52px}.symbol-card span{font-size:10px}}
@media(max-width:1150px){.inspector{width:230px}.library{width:206px}.brand{min-width:169px}.workspace-label{min-width:181px}.appbar{gap:16px;padding:0 15px}.brand{font-size:21px}.brand small{display:none}.symbol-card span{font-size:8px}.symbol-card svg{width:65px}.symbol-grid{gap:5px}.workbar .tab{padding:0 10px}.workbar .compact.optional{display:none}.tool-dock button{width:39px}.tool-dock{gap:1px}.tool-hint{font-size:9px}.view-label{display:none}}
@media(max-width:960px){.inspector{display:none}.inspector.open{display:flex;position:absolute;top:0;right:0;bottom:0;width:290px;box-shadow:-8px 0 35px #2b503024}.inspector.open .mobile-only{display:inline-flex!important}.workbar .compact.inspector-toggle{display:inline-flex}.appbar-actions .avatar{display:none}.tool-dock button{width:44px}.library{width:213px}.brand{min-width:178px}.workspace-label{min-width:188px}}
@media(max-width:720px), (max-height:540px) and (pointer:coarse){:root{font-size:14px}.appbar{height:58px;padding:0 10px;gap:10px}.brand{min-width:0;gap:0}.brand .logo{height:31px;width:31px;border-radius:9px}.brand .brand-name,.brand small{display:none}.document-title{gap:0}.document-title .divider,.save-status,.appbar-actions .desktop-only{display:none!important}.doc-title-button span{font-size:13px;max-width:calc(100vw - 180px);letter-spacing:-.3px}.doc-title-button .icon{width:12px}.appbar-actions{gap:4px}.appbar-actions button{min-width:39px;min-height:40px;padding:9px;border:0}.appbar-actions button span{display:none}.appbar-actions .primary{background:#e6f3e8;color:var(--teal)}.workbar{height:42px;padding:0 9px;gap:4px}.workspace-label{display:none}.workbar .tab{height:42px;font-size:11px;padding:0 10px}.workbar .tab .icon{width:16px}.workbar .compact{font-size:10px;min-height:33px;padding:6px 7px}.workbar .separator{margin:0 1px}.workbar .optional,.desktop-only{display:none!important}.mobile-only{display:inline-flex!important}.workspace{min-height:0}.library,.inspector{display:none;position:fixed;left:0;right:0;bottom:calc(83px + var(--safe-bottom));top:auto;width:100%!important;max-height:59dvh;border-radius:20px 20px 0 0;border:1px solid #dce9d5;box-shadow:0 -10px 45px #274f342a;z-index:55;overflow:hidden}.library.open,.inspector.open{display:flex;top:auto;left:0;right:0;bottom:calc(83px + var(--safe-bottom));width:100%;max-height:62dvh}.panel-heading{padding:15px 20px 4px}.panel-heading h2{font-size:15px}.panel-subtitle{margin:0 20px 10px}.library .searchbox{margin:0 17px 9px}.searchbox input{font-size:16px;padding:10px 10px 10px 35px}.searchbox .icon{top:13px}.category-tabs{margin:0 17px 10px}.category-tabs button{font-size:11px;min-height:34px}.library-scroll{padding:0 17px 13px}.symbol-grid{grid-template-columns:repeat(3,1fr);gap:7px}.symbol-card{min-height:91px;touch-action:pan-y}.symbol-card svg{width:77px;height:45px}.symbol-card span{font-size:9px}.library-footer{display:none}.inspector-tabs{padding:4px 18px 0}.inspector-tabs button{font-size:12px;min-height:43px;padding:10px 13px}.inspector-content{padding:15px 19px}.inspector-content .object-card{display:none}.inspector .fields{grid-template-columns:1fr 1fr}.field input,.field select{font-size:16px;min-height:41px}.field textarea{font-size:16px}.operation-grid button{font-size:12px;min-height:44px}.field{font-size:11px}.sheet-backdrop.visible{display:block;position:fixed;inset:100px 0 calc(83px + var(--safe-bottom));z-index:52;background:#21482c22;backdrop-filter:blur(1px)}.canvas-head{top:33px;left:32px;right:12px}.canvas-head .undo-group{border-radius:9px}.undo-group button{width:37px;height:35px;min-height:35px}.render-badge{padding:8px;font-size:9px}.render-badge .stats-text{display:none}.tool-dock{position:fixed;left:0;right:0;bottom:0;transform:none;border-radius:17px 17px 0 0;justify-content:space-around;border:1px solid #dce6d4;padding:8px 5px calc(11px + var(--safe-bottom));gap:0;background:#ffffffed;box-shadow:0 -3px 22px #29472b12;z-index:60}.tool-dock button{width:calc((100vw - 28px)/7);max-width:63px;min-height:49px;height:49px;gap:5px}.tool-dock button .icon{width:21px;height:21px}.tool-dock button span{font-size:9px}.tool-dock .dock-divider{display:none}.tool-dock button.mobile-hidden{display:none}.statusbar{height:25px;margin-bottom:calc(77px + var(--safe-bottom));font-size:8px;padding:0 9px}.statusbar .left,.statusbar .right{gap:6px}.statusbar .coords{display:none}.statusbar button{font-size:8px}.statusbar .stats,.statusbar .status-extra{display:none}.zoom-controls{bottom:25px;right:12px}.zoom-controls button{min-height:37px;min-width:32px}.zoom-controls span{font-size:10px;min-width:42px}.tool-hint{bottom:76px;left:50%;font-size:10px;max-width:calc(100% - 30px);padding:8px 11px;background:#f7fbf1e5}.axis{bottom:22px;left:32px;font-size:8px}.axis svg{height:29px;width:29px}.finish-button{bottom:112px;min-height:42px}.modal-backdrop{padding:12px 12px calc(14px + var(--safe-bottom));align-items:flex-end;background:#163a2f66}.modal{border-radius:19px;width:100%;max-height:88dvh}.modal-head{padding:17px 19px 12px}.modal-head h2{font-size:17px}.modal-body{padding:18px;line-height:1.65}.modal-body input,.modal-body textarea,.modal-body select{font-size:16px;min-height:45px}.modal .modal-foot button{min-height:44px}.modal-foot{padding:13px 18px 16px}.export-option{padding:13px 10px;min-height:108px;gap:7px}.export-option strong{font-size:12px}.export-option small{font-size:10px}.export-grid{gap:8px}.modal .operation-grid{gap:8px;grid-template-columns:repeat(3,1fr)}.modal .operation-grid button{min-height:87px;font-size:11px}.toast{bottom:calc(105px + var(--safe-bottom));font-size:12px;width:max-content;max-width:90vw}.context-menu{width:210px}.context-menu button{min-height:64px;font-size:11px}.param-row input{font-size:14px}.inspector-section h3{font-size:11px}.issue{font-size:12px}.layer-row{min-height:48px}.layer-row span{font-size:12px}.layer-row button{min-width:38px;min-height:39px}.layer-row .icon{width:18px;height:18px}}
@media(max-width:400px){.workbar .tab{padding:0 8px}.workbar .compact{padding:5px}.render-badge .renderer-extra{display:none}.symbol-card{min-height:85px}.symbol-card svg{height:40px}.statusbar .left .status-document{display:none}.tool-dock button{padding:6px 1px}.tool-hint{font-size:9px}.export-option{min-height:108px}.export-option .icon{width:16px}}
@media(max-height:540px) and (orientation:landscape) and (pointer:coarse){.appbar{height:45px}.workbar{height:35px}.workbar .tab{height:35px}.statusbar{height:24px;margin-bottom:0}.tool-dock{position:absolute;left:auto;right:7px;top:47px;bottom:auto;transform:none;flex-direction:column;padding:4px;gap:2px;border-radius:12px}.tool-dock button{width:39px;height:36px;min-height:36px}.tool-dock button span{display:none}.tool-dock .dock-divider{display:none}.tool-dock button.mobile-hidden,.tool-dock .desktop-only{display:none}.zoom-controls{right:60px;bottom:14px}.tool-hint{bottom:18px;max-width:48%;font-size:9px}.axis{bottom:13px}.library,.inspector,.library.open,.inspector.open{bottom:24px;top:80px;right:auto;left:0;max-height:none;width:340px!important;border-radius:0}.sheet-backdrop.visible{inset:80px 0 24px}.modal-backdrop{align-items:center}.modal{max-height:94dvh}.modal .operation-grid{grid-template-columns:repeat(4,1fr)}}
@media(prefers-reduced-motion:reduce){*{animation-duration:.001ms!important;transition:none!important;scroll-behavior:auto!important}}

@media(max-width:720px){.workbar .inspector-toggle{display:none!important}.workbar .tab{flex:0 0 auto}.workbar .spacer{min-width:0}.workbar .compact[aria-label="Symbols"] span{display:none}.workbar .compact[aria-label="Command palette"]{display:none!important}}

@media(max-height:540px) and (orientation:landscape) and (pointer:coarse){
 .library,.inspector{display:none}.library.open,.inspector.open{display:flex;position:fixed}
 .tool-dock{top:43px;gap:3px;padding:5px}.tool-dock button{height:44px;min-height:44px;width:44px}
 .tool-dock>.mobile-only{display:none!important}.tool-dock .dock-divider{display:none}
 .canvas-head{right:68px;top:28px}.render-badge .stats-text{display:none}.tool-hint{display:none}
 .workbar .inspector-toggle{display:inline-flex!important}.statusbar .status-document{display:none}
}

/* Viewport isolation, accessible touch targets, and grab handles preserve native library scrolling. */
.viewport{isolation:isolate;contain:layout paint;overscroll-behavior:none;touch-action:none}
.canvas-area{min-width:0;min-height:0;overflow:hidden}
.zoom-controls .separator{min-width:1px;width:1px;flex:0 0 1px;align-self:stretch;margin:8px 2px;background:var(--border,#d8e1df)}
.symbol-card{position:relative}
.symbol-drag-handle{position:absolute;right:0;top:0;width:44px;height:44px;display:flex;align-items:center;justify-content:center;touch-action:none;cursor:grab;opacity:.35;font-size:20px}
.symbol-drag-handle:hover{opacity:1}
.symbol-card>span:not(.symbol-drag-handle){pointer-events:none}
.library-scroll,.inspector-content{overscroll-behavior:contain;scrollbar-gutter:stable;scroll-padding-bottom:24px}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #13816f;outline-offset:2px}
@media(pointer:coarse){.icon-btn,.zoom-controls button,.layer-row button{min-width:44px;min-height:44px}.symbol-drag-handle{opacity:.7}.field input,.field select{font-size:16px}.tool-dock button{min-width:44px;min-height:48px}}
@media(max-width:900px){.zoom-controls{gap:0;max-width:calc(100% - 48px)}.zoom-controls .zoom-value{min-width:48px}.library-scroll{padding-bottom:max(28px,env(safe-area-inset-bottom))}.modal{max-height:calc(100dvh - 24px);overscroll-behavior:contain}.modal-body{min-height:0;overflow:auto;overscroll-behavior:contain}.tool-hint{max-width:calc(100% - 56px)}}

/* Large mobile-first engineering catalogue; selectors remain native and keyboard accessible. */
.category-tabs { padding:0; background:none; margin-bottom:6px; }
.category-tabs select { width:100%; min-height:44px; font-size:12px; background:var(--panel); }
.library-summary { margin:0 16px 10px; color:#74857b; font-size:10px; }
.symbol-card { min-width:0; min-height:119px; }
.symbol-card .symbol-convention { font-size:8px; color:#82958c; line-height:1.3; max-width:100%; overflow-wrap:anywhere; }
.library-footer { padding:4px 7px; }
.library-footer button { width:100%; min-height:44px; font-size:10px; }
.template-count { margin:8px 0 14px; color:var(--muted); font-size:11px; }
.template-card { min-height:200px; align-items:stretch; }
.template-content { display:flex; flex-direction:column; gap:7px; width:100%; min-width:0; }
.template-industry { color:var(--teal)!important; text-transform:uppercase; letter-spacing:.5px; font-size:9px!important; }
.template-preview { display:flex; gap:14px; height:52px; margin:7px 0; color:#456e68; }
.template-preview svg { width:72px; max-width:28%; height:52px; }
.template-grid [hidden] { display:none!important; }
.convention-list { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:18px 0; }
.convention-list section { border:1px solid var(--border); border-radius:9px; padding:12px; }
.convention-list p { margin:5px 0; font-size:11px; }
.convention-list small { color:var(--teal); font-size:10px; }
.symbol-provenance p { overflow-wrap:anywhere; }
@media (max-width:600px) {
    .category-tabs select { min-height:44px; font-size:14px; }
    .library-summary { margin-bottom:6px; }
    .convention-list { grid-template-columns:1fr; }
    .template-card { min-height:188px; }
}
@media(max-width:720px){.library-footer{display:flex;padding:4px 14px;flex-shrink:0}.library-footer button{width:100%;font-size:11px}.library-scroll{min-height:0}}

/* Keep checkbox geometry distinct from full-width touch text inputs. */
.dxf-strict-option {display:flex;align-items:center;gap:10px;min-height:44px;margin:8px 0;cursor:pointer;}
.dxf-strict-option input[type="checkbox"] {width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:0;accent-color:#167c70;}

/* CAD editing controls remain reachable above generic object properties. */
.cad-editing{padding:12px 0 15px;border-bottom:1px solid var(--border);margin-bottom:14px}
.cad-editing .fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cad-editing .field{min-width:0}.cad-editing input,.cad-editing select{width:100%;min-width:0}
.cad-editing .btn{min-height:44px;white-space:normal;width:100%;margin-top:8px}
.cad-editing .muted-note{color:#64775d}.modal-body textarea{min-height:150px}
@media(max-width:720px),(pointer:coarse){.cad-editing input,.cad-editing select{min-height:44px;font-size:16px}.cad-editing .field span{font-size:11px}}
/* Graphical block authoring and parametric inspection. */
.block-editor-bar{display:flex;flex-shrink:0;gap:10px;align-items:center;padding:7px 14px;border-bottom:1px solid #c9b0db;background:#f6f0fb;z-index:24}.block-editor-bar strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;max-width:24vw;white-space:nowrap}.block-editor-bar>div{display:flex;gap:5px;flex:1;overflow-x:auto;scrollbar-width:thin}.block-editor-bar button{white-space:nowrap;min-height:38px;font-size:11px}.author-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.author-grid .field{min-width:0}.solve-summary{background:#edf6f1;border:1px solid #caddce;padding:12px;margin:10px 0;border-radius:8px;line-height:1.6;font-variant-numeric:tabular-nums}.solver-list{display:grid;gap:8px;max-height:45vh;overflow:auto}.solver-list section{display:grid;gap:5px;padding:10px;border:1px solid var(--border);border-radius:8px}.solver-list small{color:var(--muted)}.solver-list section>div{display:flex;gap:5px}.parametric-tools p{line-height:1.5}.parametric-tools .operation-grid{grid-template-columns:1fr 1fr}.param-row{grid-template-columns:minmax(75px,1fr) minmax(90px,2fr) minmax(55px,1fr) 34px!important}.param-row output{font-variant-numeric:tabular-nums;align-self:center;overflow-wrap:anywhere;padding:4px}.param-head{display:grid;grid-template-columns:1fr 2fr 1fr;gap:8px;color:var(--muted);font-size:11px;padding-right:34px}.calculation-table{display:grid;gap:5px}.calculation-table>div{padding:8px;background:#f7faf7;border-radius:5px;display:grid;gap:4px}.calculation-table small{color:var(--muted)}#author-schema{width:100%;height:230px;font:12px ui-monospace,monospace}.param-result{color:var(--teal)}
@media(max-width:720px){.block-editor-bar{display:block;padding:4px 8px}.block-editor-bar strong{display:block;max-width:90vw;margin-bottom:3px;font-size:10px}.block-editor-bar button{min-height:44px}.author-grid{grid-template-columns:1fr}.param-row{grid-template-columns:minmax(65px,1fr) minmax(95px,1.7fr) 55px 30px!important;gap:4px!important}.param-row input{padding:8px 5px;font-size:12px}.param-row button{padding:4px;min-width:28px}.parametric-tools button{min-height:44px}.solver-list button{min-height:44px}}

/* Point-driven CAD command UI: viewport-local, scrollable touch targets. */
.drawing-session-controls { position:absolute; bottom:130px; left:50%; transform:translateX(-50%); display:flex; gap:4px; max-width:calc(100% - 24px); overflow-x:auto; padding:5px; border:1px solid var(--border,#d7e1dc); border-radius:12px; background:var(--surface,#fff); box-shadow:0 3px 14px #15352a15; z-index:12; }
.drawing-session-controls button { min-height:44px; flex-shrink:0; display:flex; align-items:center; gap:5px; padding:8px 10px; font-size:12px; }
.drawing-session-controls .icon { width:17px;height:17px; }
.drawing-session-controls button:disabled { opacity:.45;cursor:default; }
.drawing-tool-group h3 { margin:18px 0 8px; font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.drawing-tool-search { margin-top:18px; }
.drawing-tool-group button { min-height:48px; text-align:left; }
.drawing-tool-group button[hidden],.drawing-tool-group[hidden] { display:none; }
.native-entity-editor textarea { width:100%;min-height:90px;resize:vertical; }
.native-entity-editor button { min-height:44px;display:flex;align-items:center;gap:8px;margin-top:8px; }
.native-vertex-scroll { max-height:50vh;overflow:auto; }
.native-vertex-scroll table { width:100%;table-layout:fixed;border-collapse:collapse; }
.native-vertex-scroll th:first-child { width:35px; }
.native-vertex-scroll td { padding:3px; }
.native-vertex-scroll input { min-width:0;width:100%;min-height:44px; }
@media(max-width:720px) {
 .drawing-session-controls { bottom:125px;max-width:calc(100% - 12px); }
 .drawing-session-controls button { padding:8px; }
 .drawing-session-controls .icon { display:none; }
 .drawing-session-controls:not(.hide) ~ .finish-button { bottom:178px; }
 .tool-hint.working { max-width:calc(100% - 24px);white-space:normal; }
}
@media(max-height:500px) and (orientation:landscape) {
 .drawing-session-controls { bottom:58px;max-width:calc(100% - 110px); }
 .drawing-session-controls:not(.hide) ~ .finish-button { bottom:112px; }
}

.drawing-session-controls:not(.hide) ~ .finish-button { bottom:190px;min-height:44px; }
@media(max-height:500px) and (orientation:landscape) {
 .drawing-session-controls:not(.hide) ~ .finish-button { bottom:112px; }
 .tool-hint.working { display:block;bottom:12px;max-width:calc(100% - 180px);white-space:normal; }
}

/* Multi-document chrome: one live CAD canvas, independently retained sessions. */
.document-bar { display:flex; align-items:stretch; gap:4px; padding:5px 12px 0; min-height:48px; flex:0 0 auto; min-width:0; background:#eef3f0; border-bottom:1px solid var(--border); z-index:29; }
.document-tabs { display:flex; flex:1 1 0; min-width:0; gap:4px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; touch-action:pan-x; scroll-padding-inline:4px; }
.document-tab-item { display:flex; flex:0 0 auto; min-width:100px; max-width:260px; align-items:stretch; border:1px solid transparent; border-bottom:0; border-radius:8px 8px 0 0; }
.document-tab-item.active { background:#fff; border-color:var(--border); box-shadow:inset 0 2px 0 var(--teal); }
.document-tab-item [role=tab] { border-radius:7px 0 0 0; min-width:0; min-height:40px; text-align:left; justify-content:flex-start; padding:8px 10px; gap:7px; font-size:12px; }
.document-tab-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.document-indicator { flex:none; color:#65877c; font-size:12px; }
.document-indicator.dirty { color:#a77321; }.document-indicator.error { color:#b04132; }
.document-tab-close { flex:none; width:32px; min-width:32px; padding:6px; min-height:40px; border-radius:0 7px 0 0; }.document-tab-close .icon{width:15px;height:15px}
.document-editing { font-size:9px; border-radius:4px; padding:2px 4px; background:#f1e8f7; color:#7b4294; }
.document-new,.document-switcher { flex:none; min-height:40px; min-width:40px; padding:7px; }
.document-count { font-size:10px; min-width:15px; border-radius:5px; padding:2px; background:#ddeae3; }
.document-list { display:grid; gap:8px; margin:14px 0; }.document-list section{min-width:0;padding:10px;border:1px solid var(--border);border-radius:12px;}
.document-list [hidden]{display:none}.document-list-open{width:100%;display:flex;flex-direction:column;align-items:flex-start;text-align:left;min-width:0;}
.document-list-open strong{max-width:100%;overflow-wrap:anywhere}.document-list-open small{color:#677d73;font-size:11px;line-height:1.6;}
.document-list-actions,.document-list-footer,.document-close-actions{display:flex;gap:8px;flex-wrap:wrap}.document-list-actions button{font-size:11px;min-height:44px;}.document-list-footer{position:sticky;bottom:-18px;background:#fff;padding:12px 0;}.document-close-actions button{min-height:44px;}
.first-document { visibility:hidden; }.sheet-handle{display:none;}
.save-status { font-variant-numeric:tabular-nums; }.document-bar button:focus-visible{outline-offset:-3px}
@media(max-width:720px),(max-height:540px) and (pointer:coarse){
 .app.mobile-workspace { height:var(--workspace-vh,100dvh); padding-top:env(safe-area-inset-top,0px); }
 .appbar{height:50px;gap:8px;padding-inline:max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right));}
 .appbar-actions button{min-width:44px;min-height:44px;}.document-title{min-width:0;flex:1;}.doc-title-button{min-width:0;padding:4px;}.doc-title-button span{max-width:calc(100vw - 172px);}
 .app.mobile-workspace>.workbar{display:none}.document-bar{min-height:49px;padding:3px 4px 0;gap:2px;padding-left:max(4px,env(safe-area-inset-left));padding-right:max(4px,env(safe-area-inset-right));}
 .document-tabs{scrollbar-width:none;gap:2px}.document-tab-item{min-width:100px;max-width:215px;}.document-tab-item [role=tab]{min-height:44px;padding:8px;min-width:64px;max-width:170px;}.document-tab-name{font-size:11px}
 .document-tab-close{min-height:44px;min-width:44px;width:44px;}.document-new,.document-switcher{min-height:44px;min-width:44px;padding:5px;}.document-switcher{gap:3px}.document-editing{display:none}
 .document-list-open{min-height:60px}.document-list-footer{gap:6px}.document-list-footer button{min-height:44px;flex:1;font-size:12px;}
 .tool-dock{padding:5px 3px calc(6px + var(--safe-bottom));}.tool-dock button{min-width:44px;min-height:48px;width:calc((100vw - 8px)/7);max-width:none;}
 .statusbar{margin-bottom:calc(64px + var(--safe-bottom));height:31px;min-height:31px;padding-inline:8px}.statusbar .layout-select{min-height:28px;max-width:100px;font-size:10px;padding:3px 5px;}
 .statusbar .right{gap:2px}.statusbar .right button{min-width:37px;min-height:28px;font-size:9px;padding:3px;}.statusbar .status-document{display:none}
 .sheet-handle{display:flex;align-items:center;justify-content:center;flex:none;min-height:44px;width:100%;padding:5px;touch-action:none;border-radius:0}.sheet-handle>span{width:36px;height:4px;border-radius:3px;background:#c0cfc6;}
 .library,.inspector,.library.open,.inspector.open{top:auto;bottom:calc(66px + var(--safe-bottom));max-height:calc(var(--workspace-vh,100dvh) * .58);border-radius:18px 18px 0 0;}
 .library.open.expanded,.inspector.open.expanded{height:calc(var(--workspace-vh,100dvh) - var(--sheet-top,100px) - 68px - var(--safe-bottom));max-height:calc(var(--workspace-vh,100dvh) - var(--sheet-top,100px) - 68px - var(--safe-bottom));}
 .sheet-backdrop.visible{top:var(--sheet-top,100px);bottom:calc(66px + var(--safe-bottom));}
 .panel-heading{padding:3px 14px 4px}.panel-heading button{min-width:44px;min-height:44px;}.panel-subtitle{margin:0 14px 8px;font-size:11px}.inspector-tabs{padding:0 8px;gap:0;}.inspector-tabs button{min-height:44px;min-width:44px;flex:1;padding:8px;font-size:11px;}
 .inspector-content{padding:12px 14px;scroll-padding-bottom:28px;}.library-scroll{padding:0 12px 18px;}.library .searchbox{margin:0 12px 8px}.library .category-tabs{margin:0 12px 6px;}
 .modal-backdrop{top:var(--workspace-top,0px);height:var(--workspace-vh,100dvh);bottom:auto;padding:8px 8px calc(8px + var(--safe-bottom));}
 .modal{max-height:calc(var(--workspace-vh,100dvh) - 16px - var(--safe-bottom));border-radius:16px;}.modal-head{padding:10px 14px;}.modal-head .icon-btn{min-width:44px;min-height:44px;}.modal-body{padding:14px;}.modal-foot{padding:10px 14px;}.modal-body input,.modal-body select,.modal-body textarea{font-size:16px;}
 .canvas-head{top:29px;left:28px;right:8px}.undo-group button{min-height:44px;min-width:44px;}.render-badge{max-width:calc(100% - 108px);font-size:9px;padding:6px;}.backend-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
 .zoom-controls{bottom:12px;right:8px}.zoom-controls button{min-width:44px;min-height:44px;}.axis{bottom:17px;left:27px;}.tool-hint{bottom:65px;}.drawing-session-controls{bottom:110px;}.drawing-session-controls:not(.hide)~.finish-button{bottom:180px;}
 .block-editor-bar{padding:3px 6px;}.block-editor-bar strong{font-size:10px;margin-bottom:2px}.block-editor-bar button{min-height:44px;}.toast{bottom:calc(92px + var(--safe-bottom));}
 .workspace-keyboard .tool-dock,.workspace-keyboard .zoom-controls,.workspace-keyboard .tool-hint{display:none!important;}.workspace-keyboard .statusbar{margin-bottom:0;}
 .workspace-keyboard .library.open,.workspace-keyboard .inspector.open{bottom:0;max-height:calc(var(--workspace-vh,100dvh) - 60px);height:calc(var(--workspace-vh,100dvh) - 60px);}.workspace-keyboard .sheet-backdrop.visible{bottom:0;}
}
@media(max-height:540px) and (orientation:landscape) and (pointer:coarse){
 .appbar{height:44px;}.document-bar{min-height:45px;padding-top:0}.document-tab-item [role=tab],.document-tab-close,.document-new,.document-switcher{min-height:44px;}
 .tool-dock{position:absolute;right:6px;left:auto;top:28px;bottom:auto;transform:none;flex-direction:column;padding:3px;max-height:calc(100% - 32px);overflow-y:auto;justify-content:flex-start;}
 .tool-dock button{width:44px;height:44px;min-height:44px;flex:none;}.tool-dock>.mobile-only{display:flex!important;}.tool-dock button.mobile-hidden,.tool-dock .desktop-only{display:none!important;}
 .statusbar{margin-bottom:0;height:29px;min-height:29px;}.canvas-head{right:62px;}.zoom-controls{right:60px;bottom:9px;}.tool-hint{display:none}
 .library.open,.inspector.open,.library.open.expanded,.inspector.open.expanded{top:var(--sheet-top,90px);bottom:29px;max-height:none;height:auto;left:0;right:auto;width:min(370px,80vw)!important;border-radius:0 14px 14px 0;}
 .sheet-backdrop.visible{top:var(--sheet-top,90px);bottom:29px}.drawing-session-controls{left:50%;bottom:8px;max-width:calc(100% - 240px);}.drawing-session-controls:not(.hide)~.finish-button{bottom:62px;}
 .block-editor-bar{display:flex}.block-editor-bar strong{max-width:120px;}.block-editor-bar>div{min-width:0}
}

.document-recent-list>div{display:flex;gap:10px;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid var(--border)}.document-recent-list span{overflow-wrap:anywhere;min-width:0}.document-recent-list button{flex:none;min-height:44px}.document-recent summary{cursor:pointer;padding:12px 0;min-height:44px}

@media(max-width:720px),(max-height:540px) and (pointer:coarse){
 .doc-title-button{min-height:44px;min-width:44px}.statusbar{height:44px;min-height:44px}.statusbar .layout-select{min-height:44px;font-size:12px}.statusbar .right button{min-width:44px;min-height:44px;font-size:10px}
}
@media(max-height:540px) and (orientation:landscape) and (pointer:coarse){
 .library.open,.inspector.open,.library.open.expanded,.inspector.open.expanded{bottom:44px}.sheet-backdrop.visible{bottom:44px}
}
/* On short landscape screens, file actions share the document row rather than consuming a second header. */
@media(max-height:540px) and (orientation:landscape) and (pointer:coarse){
 .app.mobile-workspace>.appbar{height:0;min-height:0;padding:0;border:0;position:relative;overflow:visible;}
 .app.mobile-workspace>.appbar .brand,.app.mobile-workspace>.appbar .document-title{display:none;}
 .app.mobile-workspace>.appbar .appbar-actions{position:absolute;top:0;right:max(4px,env(safe-area-inset-right));height:44px;background:#eef3f0;gap:2px;}
 .app.mobile-workspace>.document-bar{padding-right:calc(96px + env(safe-area-inset-right,0px));}
}

/* Adaptive touch workspace. Scoped classes also apply in tablet/split-screen hosts. */
.document-bar { gap:6px; padding:5px 8px; border-bottom:1px solid #d4e2dc; background:#eef4f1; }
.document-tabs { gap:6px; scroll-padding-inline:4px; }
.document-tab-item { border:1px solid #dbe6e0; border-radius:10px; background:#e7eeea; max-width:280px; transition:background .12s,border-color .12s; }
.document-tab-item.active { background:#fff; border-color:#218474; box-shadow:inset 0 -3px #167c70,0 1px 4px #1847390d; }
.document-tab-item [role=tab] { flex:1; border-radius:9px 0 0 9px; color:#4a635a; font-weight:500; }
.document-tab-item.active [role=tab] { color:#125f55; font-weight:700; }
.document-tab-close { border-radius:0 9px 9px 0; color:#657f75; }
.document-tab-close:hover { background:#f6e5e2; color:#943e35; }
.document-tab-item[data-recovery-error=true] { border-color:#ad4539; }
.document-tab-item [role=tab]:focus-visible { outline:3px solid #147b6e; outline-offset:-4px; }
.document-indicator { width:12px; text-align:center; }
.document-new,.document-switcher { border:1px solid #dbe6e0; border-radius:10px; background:#f9fcfa; }
.document-switcher { position:relative; gap:4px; }
.document-count { color:#174d40; background:#dcece4; }
.document-list section:has([aria-current=true]) { border-color:#167c70; background:#f1f8f4; }
.document-list-actions button { flex:1 1 auto; }
.document-list-footer { margin:0; padding:0; position:static; background:transparent; width:100%; }
.document-list-footer button { flex:1 1 auto; min-height:44px; }
.document-list-open small { color:#49675b; }
.document-close-actions { display:grid; grid-template-columns:1fr; }
.document-close-actions button { white-space:normal; }
.modal-head,.modal-foot { flex-shrink:0; }
.modal-head h2 { min-width:0; overflow-wrap:anywhere; line-height:1.35; }
.modal-head h2:focus { outline:none; }
.modal-body { min-width:0; min-height:0; overflow-x:hidden; overscroll-behavior:contain; scroll-padding:16px; }
.modal .field,.modal .fields,.modal .author-grid,.inspector .field { min-width:0; }
.modal .fields,.modal .author-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.modal-body p,.modal-body small,.modal-body output,.hint-box,.issue { overflow-wrap:anywhere; }
.touch-table-region { max-width:100%; overflow:auto; overscroll-behavior:contain; border:1px solid var(--border); border-radius:8px; margin:12px 0; scrollbar-width:thin; }
.touch-table-region:focus-visible { outline:3px solid #167c70; outline-offset:-3px; }
.touch-table-region table { margin:0; }
.touch-table-region th { position:sticky; top:0; background:#f1f6f3; z-index:1; }
.touch-table-region :is(td,th) { padding:10px; }
.modal .operation-grid button { overflow-wrap:anywhere; min-width:0; }
.drawing-tool-group[hidden], [data-tool-search][hidden] { display:none!important; }
.drawing-tool-search { position:sticky; top:-14px; padding:8px 0; background:#fff; z-index:2; margin:0 0 12px; }
.drawing-search-status { min-height:0; font-size:12px; color:#48685a; line-height:1.5; }
.drawing-search-status:empty { display:none; }

.app.mobile-workspace { --touch-size:44px; height:var(--workspace-vh,100dvh); padding-top:env(safe-area-inset-top,0px); }
.mobile-workspace :is(button,summary),.mobile-dialog :is(button,summary) { min-height:44px; }
.mobile-workspace :is(input,select,textarea),.mobile-dialog :is(input,select,textarea) { font-size:16px; }
.mobile-workspace :is(input,select):not([type=checkbox]):not([type=radio]),.mobile-dialog :is(input,select):not([type=checkbox]):not([type=radio]) { min-height:44px; }
.mobile-workspace :is(button,input,select,textarea):focus-visible,.mobile-dialog :is(button,input,select,textarea):focus-visible { outline:3px solid #147b6e; outline-offset:-2px; }
.mobile-workspace .desktop-only { display:none!important; }
.mobile-workspace .mobile-only { display:inline-flex!important; }
.mobile-workspace>.workbar { display:none; }
.mobile-workspace .appbar { height:50px; min-height:50px; gap:8px; padding:0 max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left)); }
.mobile-workspace .brand { min-width:0; gap:0; }
.mobile-workspace .brand :is(.brand-name,small),.mobile-workspace .document-title .divider,.mobile-workspace .save-status,.mobile-workspace .avatar { display:none!important; }
.mobile-workspace .brand .logo { width:30px; height:30px; }
.mobile-workspace .document-title { flex:1; min-width:0; }
.mobile-workspace .doc-title-button { max-width:100%; }
.mobile-workspace .doc-title-button span { max-width:calc(100vw - 160px); font-size:13px; }
.mobile-workspace .appbar-actions { gap:2px; }
.mobile-workspace .appbar-actions button { min-width:44px; padding:8px; }
.mobile-workspace .appbar-actions button span { display:none; }
.mobile-workspace .document-bar { flex:0 0 52px; min-height:52px; gap:4px; padding:4px max(4px,env(safe-area-inset-right)) 4px max(4px,env(safe-area-inset-left)); }
.mobile-workspace .document-tabs { gap:5px; scrollbar-width:none; align-items:stretch; }
.mobile-workspace .document-tab-item { min-width:138px; max-width:240px; flex-shrink:0; }
.mobile-workspace .document-tab-item [role=tab] { min-height:44px; max-width:192px; padding:8px 10px; }
.mobile-workspace .document-tab-name { font-size:12px; }
.mobile-workspace .document-tab-close { min-height:44px; min-width:44px; width:44px; }
.mobile-workspace .document-editing { display:none; }
.mobile-workspace :is(.document-new,.document-switcher) { min-width:44px; min-height:44px; padding:5px; }
.mobile-workspace .workspace { min-width:0; }
.mobile-workspace .library,.mobile-workspace .inspector { display:none; position:fixed; flex-direction:column; left:0; right:0; top:auto; bottom:var(--sheet-bottom,108px); width:100%!important; max-height:min(62vh,calc(var(--workspace-vh,100dvh) - var(--sheet-top,102px) - var(--sheet-bottom,108px))); border:1px solid #d5e3dd; border-radius:18px 18px 0 0; box-shadow:0 -8px 32px #163d322b; z-index:55; overflow:hidden; }
.mobile-workspace .library.open,.mobile-workspace .inspector.open { display:flex; }
.mobile-workspace .library.open.expanded,.mobile-workspace .inspector.open.expanded { top:var(--sheet-top,102px); bottom:var(--sheet-bottom,108px); height:auto; max-height:none; }
.mobile-workspace .sheet-backdrop.visible { position:fixed; display:block; top:var(--sheet-top,102px); bottom:var(--sheet-bottom,108px); left:0; right:0; z-index:52; background:#173e302a; }
.mobile-workspace .sheet-handle { display:flex; position:relative; min-height:44px; flex:none; justify-content:space-between; gap:12px; padding:12px 14px 4px; touch-action:none; color:#284f41; }
.mobile-workspace .sheet-handle>span { width:auto; height:auto; background:none; border-radius:0; }
.mobile-workspace .sheet-handle .sheet-grip { position:absolute; top:5px; left:calc(50% - 18px); width:36px; height:4px; border-radius:4px; background:#a8beb3; }
.mobile-workspace .sheet-name { font-size:12px; font-weight:650; }
.mobile-workspace .sheet-size { font-size:11px; color:#126d60; }
.mobile-workspace .panel-heading { padding:0 12px; }
.mobile-workspace .panel-heading :is(button,.icon-btn) { min-width:44px; }
.mobile-workspace .panel-subtitle { font-size:11px; margin:0 12px 8px; }
.mobile-workspace .inspector-tabs { padding:0 6px; gap:2px; flex:none; }
.mobile-workspace .inspector-tabs button { flex:1; min-width:44px; padding:8px; font-size:12px; }
.mobile-workspace .inspector-tabs button.active { background:#e3f1ea; border-radius:8px; color:#105e52; }
.mobile-workspace .inspector-content { min-height:0; overflow:auto; padding:12px 14px 24px; scroll-padding-block:18px; }
.mobile-workspace .inspector-content .object-card { display:none; }
.mobile-workspace .inspector-section h3 { color:#53695d; }
.mobile-workspace .inspector .fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
.mobile-workspace .library .searchbox { margin:0 12px 8px; }
.mobile-workspace .library .category-tabs { margin:0 12px 8px; }
.mobile-workspace .library .category-tabs select { font-size:16px; }
.mobile-workspace .library-scroll { min-height:0; padding:0 12px 24px; }
.mobile-workspace .symbol-grid { grid-template-columns:repeat(auto-fill,minmax(94px,1fr)); gap:8px; }
.mobile-workspace .symbol-card { min-height:110px; }
.mobile-workspace .symbol-card>span:not(.symbol-drag-handle) { font-size:11px; color:#465e53; }
.mobile-workspace .symbol-card .symbol-convention { font-size:9px!important; }
.mobile-workspace .library-footer { display:flex; padding:4px 12px; flex-shrink:0; }
.mobile-workspace .library-footer button { width:100%; white-space:normal; font-size:11px; }
.mobile-workspace .tool-dock { position:fixed; top:auto; right:0; bottom:0; left:0; transform:none; flex-direction:row; border-radius:16px 16px 0 0; padding:5px 3px calc(7px + var(--safe-bottom)); gap:0; justify-content:space-around; }
.mobile-workspace .tool-dock button { flex:1; width:auto; max-width:88px; min-width:44px; height:48px; padding:4px 1px; }
.mobile-workspace .tool-dock button span { display:block; font-size:10px; }
.mobile-workspace .tool-dock .dock-divider,.mobile-workspace .tool-dock button.mobile-hidden { display:none!important; }
.mobile-workspace .statusbar { height:44px; min-height:44px; margin-bottom:calc(64px + var(--safe-bottom)); padding-inline:max(6px,env(safe-area-inset-left)) max(6px,env(safe-area-inset-right)); }
.mobile-workspace .statusbar .left { min-width:0; flex:1; }
.mobile-workspace .statusbar .right { flex:none; gap:0; }
.mobile-workspace .statusbar .layout-select { width:100%; max-width:132px; min-width:44px; padding:6px; font-size:12px; }
.mobile-workspace .statusbar button { min-width:44px; min-height:44px; padding:5px; font-size:10px; }
.mobile-workspace .statusbar :is(.coords,.stats,.status-extra,.status-document) { display:none; }
.mobile-workspace .canvas-head { top:28px; left:28px; right:8px; }
.mobile-workspace .canvas-head .undo-group button { min-width:44px; min-height:44px; }
.mobile-workspace .render-badge { max-width:calc(100% - 112px); font-size:10px; padding:6px; }
.mobile-workspace .render-badge .stats-text { display:none; }
.mobile-workspace .zoom-controls { bottom:10px; right:8px; }
.mobile-workspace .zoom-controls button { min-width:44px; min-height:44px; }
.mobile-workspace .zoom-controls .zoom-value { min-width:48px; }
.mobile-workspace .tool-hint { bottom:64px; font-size:11px; max-width:calc(100% - 48px); color:#486553; }
.mobile-workspace .drawing-session-controls { left:28px; right:8px; bottom:10px; transform:none; max-width:none; width:auto; display:flex; justify-content:flex-start; overflow-x:auto; flex-wrap:nowrap; overscroll-behavior-x:contain; touch-action:pan-x; padding:4px; gap:4px; scrollbar-width:thin; }
.mobile-workspace .drawing-session-controls button { flex:none; white-space:nowrap; min-height:44px; min-width:44px; font-size:12px; padding:8px 12px; }
.mobile-workspace .drawing-active .zoom-controls,.mobile-workspace .drawing-active .axis { display:none; }
.mobile-workspace .drawing-active .tool-hint { display:block; bottom:70px; left:28px; right:8px; transform:none; max-width:none; width:auto; text-align:left; white-space:normal; }
.mobile-workspace .drawing-session-controls:not(.hide)~.finish-button { bottom:116px; right:8px; min-height:44px; }
.mobile-workspace .block-editor-bar { display:block; padding:3px 6px; }
.mobile-workspace .block-editor-bar strong { max-width:100%; font-size:11px; margin:0 0 3px; }
.mobile-workspace .block-editor-bar>div { overflow-x:auto; touch-action:pan-x; overscroll-behavior-x:contain; scrollbar-width:none; }
.mobile-workspace .block-editor-bar button { min-height:44px; min-width:44px; flex:none; }
.mobile-workspace .layer-row { min-height:52px; gap:6px; }
.mobile-workspace .layer-row button { min-width:44px; min-height:44px; }
.mobile-workspace .layer-row input[type=color] { min-width:44px; height:44px; }
.mobile-workspace .context-menu { max-width:calc(100% - 16px); }
.mobile-workspace .toast { bottom:calc(115px + var(--safe-bottom)); font-size:12px; }

.modal-backdrop.mobile-dialog { inset:var(--workspace-top,0px) 0 auto; height:var(--workspace-vh,100dvh); padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); align-items:flex-end; }
.mobile-dialog .modal { width:100%; max-width:760px; max-height:100%; min-width:0; border-radius:18px; margin-inline:auto; }
.mobile-dialog .modal-head { padding:8px 12px; gap:8px; min-height:60px; }
.mobile-dialog .modal-head h2 { font-size:17px; }
.mobile-dialog .modal-head button { min-width:44px; min-height:44px; }
.mobile-dialog .modal-body { padding:12px; line-height:1.6; font-size:13px; }
.mobile-dialog .modal-foot { padding:8px 12px; gap:8px; border-top:1px solid #d5e3dc; }
.mobile-dialog .modal-foot>.btn { flex:1; min-width:44px; min-height:48px; white-space:normal; }
.mobile-dialog .modal-body .fields,.mobile-dialog .author-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.mobile-dialog .field { font-size:12px; line-height:1.5; }
.mobile-dialog .modal :is(input,select,textarea) { font-size:16px; }
.mobile-dialog .modal textarea { width:100%; min-height:130px; }
.mobile-dialog #author-schema { font-size:16px; min-height:180px; max-height:none; }
.mobile-dialog .modal :is(button,input,select,textarea) { min-width:0; }
.mobile-dialog .modal button { min-width:44px; min-height:44px; }
.mobile-dialog .modal :is(input[type=checkbox],input[type=radio]) { width:22px; height:22px; min-height:22px; min-width:22px; flex:none; }
.mobile-dialog .modal label:has(>input[type=checkbox]),.mobile-dialog .modal label:has(>input[type=radio]) { min-height:44px; }
.mobile-dialog .operation-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.mobile-dialog .modal .operation-grid button { min-height:80px; font-size:12px; line-height:1.35; padding:10px 6px; }
.mobile-dialog .export-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.mobile-dialog .export-option { min-height:108px; padding:12px; }
.mobile-dialog .export-option strong { font-size:13px; }
.mobile-dialog .export-option small { font-size:11px; color:#597166; }
.mobile-dialog .line-style-list button { font-size:13px; text-align:left; white-space:normal; min-height:56px; }
.mobile-dialog .line-style-list svg { flex:0 0 72px; }
.mobile-dialog .solver-list { max-height:none; overflow:visible; }
.mobile-dialog .solver-list section>div { flex-wrap:wrap; }
.mobile-dialog .solver-list button { flex:1; }
.mobile-dialog .touch-table-region table:has(input),.mobile-dialog .touch-table-region table:has(select) { min-width:540px; }
.mobile-dialog .keyboard-table { min-width:440px; font-size:12px; }
.mobile-dialog .keyboard-table input,.mobile-dialog .keyboard-table select { width:100%; }
.mobile-dialog .param-head { display:none; }
.mobile-dialog .param-row { grid-template-columns:minmax(0,1fr) 44px!important; gap:6px!important; padding:10px; border:1px solid var(--border); border-radius:10px; background:#f8fbf9; }
.mobile-dialog .param-row input { font-size:16px; padding:10px; grid-column:1; }
.mobile-dialog .param-row button { grid-column:2; grid-row:1; padding:8px; }
.mobile-dialog .param-row output { grid-column:1/-1; font-size:13px; }
.mobile-dialog .param-row output::before { content:'Calculated: '; color:#536e60; }
.mobile-dialog .document-list-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.mobile-dialog .document-list-actions button { padding:8px 5px; font-size:12px; }
.mobile-dialog .document-list-footer { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.mobile-dialog .document-list-footer button { padding:8px 6px; font-size:12px; white-space:normal; line-height:1.35; }
.mobile-workspace.workspace-keyboard :is(.tool-dock,.zoom-controls,.tool-hint,.drawing-session-controls,.finish-button) { display:none!important; }
.mobile-workspace.workspace-keyboard .statusbar { margin-bottom:0; }
.mobile-workspace.workspace-keyboard .library.open,.mobile-workspace.workspace-keyboard .inspector.open { top:var(--sheet-top,102px); bottom:var(--sheet-bottom,44px); height:auto; max-height:none; }
.mobile-dialog.keyboard-dialog { padding-top:4px; padding-bottom:4px; }
.mobile-dialog.keyboard-dialog .modal-head { min-height:48px; padding:2px 10px; }
.mobile-dialog.keyboard-dialog .modal-foot { padding:4px 10px; }
.mobile-dialog.keyboard-dialog .modal-body { padding:8px 12px; }
@media(max-width:380px) {
 .mobile-dialog .modal .fields,.mobile-dialog .author-grid,.mobile-dialog .export-grid { grid-template-columns:1fr; }
 .mobile-dialog .modal .operation-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .mobile-dialog .export-option { flex-direction:row; min-height:80px; text-align:left; justify-content:flex-start; }
 .mobile-dialog .export-option>span { min-width:0; }
 .mobile-workspace .document-tab-item { min-width:124px; max-width:200px; }
}
/* Landscape reserves a rail on the right while panels use the left side of the drawing. */
.mobile-workspace.mobile-landscape .appbar { height:0; min-height:0; padding:0; border:0; position:relative; overflow:visible; }
.mobile-workspace.mobile-landscape .appbar :is(.brand,.document-title) { display:none; }
.mobile-workspace.mobile-landscape .appbar-actions { position:absolute; top:4px; right:max(4px,env(safe-area-inset-right)); height:44px; background:#eef4f1; }
.mobile-workspace.mobile-landscape .document-bar { padding-right:calc(98px + env(safe-area-inset-right,0px)); }
.mobile-workspace.mobile-landscape .statusbar { margin-bottom:0; }
.mobile-workspace.mobile-landscape .tool-dock { position:absolute; left:auto; right:max(4px,env(safe-area-inset-right)); top:28px; bottom:4px; width:52px; flex-direction:column; justify-content:flex-start; padding:4px; overflow-y:auto; max-height:none; border-radius:10px; }
.mobile-workspace.mobile-landscape .tool-dock button { width:44px; min-height:44px; height:44px; flex:none; }
.mobile-workspace.mobile-landscape .tool-dock button span { display:none; }
.mobile-workspace.mobile-landscape .canvas-head { right:64px; }
.mobile-workspace.mobile-landscape .zoom-controls { right:64px; }
.mobile-workspace.mobile-landscape :is(.library.open,.inspector.open,.library.open.expanded,.inspector.open.expanded) { top:var(--sheet-top,52px); bottom:var(--sheet-bottom,44px); left:max(0px,env(safe-area-inset-left)); right:auto; width:min(370px,64vw)!important; height:auto; max-height:none; border-radius:0 12px 12px 0; }
.mobile-workspace.mobile-landscape .sheet-handle { display:none; }
.mobile-workspace.mobile-landscape .drawing-session-controls { left:28px; right:164px; bottom:8px; }
.mobile-workspace.mobile-landscape .drawing-active .tool-hint { left:28px; right:64px; bottom:66px; font-size:11px; padding:6px 10px; }
.mobile-workspace.mobile-landscape .drawing-session-controls:not(.hide)~.finish-button { right:64px; bottom:12px; }
.mobile-workspace.mobile-landscape .block-editor-bar { display:flex; align-items:center; }
.mobile-workspace.mobile-landscape .block-editor-bar strong { max-width:120px; }
.mobile-workspace.mobile-landscape .block-editor-bar>div { min-width:0; }
@media (min-width:721px) and (min-height:541px) {
 .mobile-workspace .library.open,.mobile-workspace .inspector.open { left:16px; right:16px; width:calc(100% - 32px)!important; max-width:760px; margin-inline:auto; }
 .mobile-workspace .library .symbol-grid { grid-template-columns:repeat(auto-fill,minmax(112px,1fr)); }
 .mobile-dialog .modal { max-width:760px; }
}
@media (prefers-reduced-motion:reduce) { .document-tabs,.document-tab-item,.modal,.sheet-handle { transition:none; scroll-behavior:auto; } }

.mobile-dialog .operation-grid button,.mobile-workspace .tool-dock button { color:#365e4e; }
.mobile-workspace .tool-dock button.active { color:#fff; }
.mobile-dialog .operation-grid button.primary { color:#fff; }
.mobile-dialog .muted-note,.mobile-workspace .muted-note { color:#536c5f; }

/* Spatial modeling shares document chrome, dialogs, inspector sheets and touch targets. */
.model3d-stage[hidden]{display:none!important}.model3d-stage{position:absolute;inset:0;overflow:hidden;background:#f0f5f5;z-index:2}.viewport3d{position:absolute;inset:0;outline:none;touch-action:none;overflow:hidden}.model3d-render,.model3d-labels{position:absolute;inset:0;width:100%;height:100%;display:block}.canvas-area[data-view="3d"]>.viewport{visibility:hidden}.canvas-area[data-view="3d"]>.canvas-head,.canvas-area[data-view="3d"]>.view-label,.canvas-area[data-view="3d"]>.axis,.canvas-area[data-view="3d"]>.zoom-controls,.canvas-area[data-view="3d"]>.tool-hint,.canvas-area[data-view="3d"]>.drawing-session-controls,.canvas-area[data-view="3d"]>.finish-button,.canvas-area[data-view="3d"]>.tool-dock{display:none!important}.model3d-top{position:absolute;top:12px;left:12px;right:12px;display:flex;gap:8px;align-items:flex-start;justify-content:space-between;pointer-events:none}.model3d-mode,.model3d-views{pointer-events:auto;display:flex;align-items:center;gap:4px;background:#ffffffee;border:1px solid #dce5e3;border-radius:10px;padding:4px;box-shadow:0 4px 16px #2646340a}.model3d-mode{padding:9px;font-size:10px;gap:8px}.model3d-backend{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model3d-views button{font-size:11px;padding:6px 10px;min-width:40px}.model3d-info{position:absolute;left:16px;top:66px;font-size:10px;color:#5f7980;max-width:calc(100% - 32px);pointer-events:none}.model3d-bottom{position:absolute;left:12px;right:12px;bottom:8px;display:flex;flex-direction:column;gap:6px;align-items:center;pointer-events:none}.model3d-timeline{max-width:100%;min-width:0;display:flex;overflow-x:auto;overscroll-behavior:contain;gap:4px;padding:4px 6px;background:#ffffffed;border:1px solid #dce5e3;border-radius:8px;pointer-events:auto;scrollbar-width:thin}.model3d-timeline>span{font-size:11px;padding:8px}.model3d-feature{white-space:nowrap;border:1px solid #dce5e3;min-height:34px;border-radius:6px;font-size:10px;flex-shrink:0}.model3d-feature.active,.model3d-body-list .active{background:#167c70;color:white}.model3d-feature.suppressed{opacity:.5;text-decoration:line-through}.model3d-dock{display:flex;gap:4px;padding:5px;max-width:100%;overflow-x:auto;background:#ffffffed;border:1px solid #dce5e3;border-radius:12px;box-shadow:0 6px 22px #26463414;pointer-events:auto;scrollbar-width:thin;overscroll-behavior:contain}.model3d-dock button{white-space:nowrap;flex-shrink:0;font-size:11px;min-height:42px}.model3d-dock button:first-child{background:#167c70;color:#fff}.model3d-hint{font-size:10px;color:#6f8585;text-align:center;margin:0;line-height:1.5}.model3d-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.model3d-properties{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:11px}.model3d-properties dt{color:#85958d}.model3d-properties dd{margin:0;font-variant-numeric:tabular-nums;text-align:right;overflow-wrap:anywhere}.model3d-inspector-actions{display:grid;gap:6px}.model3d-body-list{display:flex;flex-direction:column;margin:10px 0}.model3d-body-list button{justify-content:flex-start;text-align:left;overflow-wrap:anywhere;font-size:12px;min-height:38px}.model3d-example-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.model3d-example{border:1px solid #d8e3df;align-items:flex-start;justify-content:flex-start;text-align:left;padding:14px;gap:12px;background:#fbfdfc}.model3d-example>span:last-child{display:flex;flex-direction:column;gap:7px;min-width:0}.model3d-example small{font-size:10px;color:#718780}.model3d-example strong{font-size:14px}.model3d-example span span{font-size:11px;line-height:1.6;color:#80938a}.model3d-example-icon{font-size:32px;color:#318b81;width:36px;flex-shrink:0}.model3d-vertex-table{max-height:220px;overflow:auto;overscroll-behavior:contain}.model3d-vertex-table table{width:100%;font-size:11px;font-variant-numeric:tabular-nums}.model3d-vertex-table td,.model3d-vertex-table th{padding:5px;text-align:right}.model3d-preview-state{font-size:12px;color:#167c70;margin:10px 0}
@media(max-width:760px),(pointer:coarse) and (max-width:1100px){.model3d-top{top:6px;left:6px;right:6px;flex-wrap:wrap;gap:4px}.model3d-mode{font-size:9px;padding:3px 6px;min-height:26px;max-width:100%}.model3d-mode .pill{font-size:9px;padding:3px}.model3d-views{max-width:100%;overflow-x:auto;scrollbar-width:none;padding:2px}.model3d-views button{min-width:44px;min-height:44px;padding:6px 8px;flex-shrink:0}.model3d-info{top:91px;font-size:9px}.model3d-bottom{left:6px;right:6px;bottom:max(5px,env(safe-area-inset-bottom));gap:4px}.model3d-dock,.model3d-timeline{width:100%;justify-content:flex-start}.model3d-dock button,.model3d-feature,.model3d-body-list button,.model3d-inspector-actions button{min-height:44px}.model3d-dock button{font-size:11px}.model3d-hint{font-size:9px;max-width:100%}.model3d-fields,.model3d-example-grid{grid-template-columns:1fr}.model3d-example{min-height:96px}.model3d-example span span{font-size:12px}.model3d-operation-dialog input,.model3d-operation-dialog select{font-size:16px;min-height:44px}.model3d-inspector-actions{grid-template-columns:1fr 1fr}.workbar .tab{min-width:48px}}
@media(max-height:500px) and (orientation:landscape){.model3d-top{flex-wrap:nowrap}.model3d-mode{display:none}.model3d-info{top:60px}.model3d-hint{display:none}.model3d-bottom{left:6px;right:6px}.model3d-timeline{max-height:44px}.model3d-dock{padding:2px}.model3d-dock button{min-height:44px}.model3d-example-grid{grid-template-columns:1fr 1fr}}

@media(min-width:900px){.modal-backdrop:has(.model3d-operation-dialog){justify-content:flex-end;align-items:center;padding:20px;background:#26463422}.modal.model3d-operation-dialog{max-width:390px;margin:0;max-height:calc(100vh - 40px)}}
.mobile-dialog .modal.model3d-operation-dialog{max-height:78%;}.model3d-example small{font-size:11px;line-height:1.5}

/* Shared 3D authoring: explicit selection modes and contextual commands, not additional panels. */
.model3d-selection-tools{position:absolute;top:62px;left:12px;display:flex;gap:3px;max-width:calc(100% - 24px);padding:3px;background:#fffffff2;border:1px solid #dce5e3;border-radius:9px;overflow-x:auto;overscroll-behavior:contain;scrollbar-width:none}
.model3d-selection-tools button{white-space:nowrap;flex-shrink:0;min-height:34px;min-width:42px;font-size:11px;padding:6px 9px}
.model3d-selection-tools button[aria-pressed=true]{background:#e0f1ec;color:#115c51;box-shadow:inset 0 0 0 1px #77b5a6}
.model3d-info{top:110px}
.model3d-dock>.model3d-context{display:flex;align-items:center;gap:4px;width:auto;max-width:none;overflow:visible;flex-shrink:0;pointer-events:auto;border:0;border-right:1px solid #dce5e3;border-radius:0;background:none;padding:0 5px 0 0;box-shadow:none}
.model3d-context button{white-space:nowrap;min-height:34px;font-size:11px;flex-shrink:0}
.model3d-selection-label{font-size:11px;color:#4b655f;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 8px;flex-shrink:0}
.model3d-operation-dialog [data-model-row][hidden],.model3d-operation-dialog [data-model-target-row][hidden]{display:none!important}
.model3d-reattach{display:flex;gap:8px;align-items:center;font-size:12px;padding:8px 0}
.model3d-dock button:disabled{opacity:.45;cursor:not-allowed}
.model3d-operation-help{font-size:12px;line-height:1.6;color:#526e64}
.model3d-context button:focus-visible,.model3d-selection-tools button:focus-visible,.model3d-feature:focus-visible{outline:2px solid #167c70;outline-offset:-2px}
@media(max-width:760px),(pointer:coarse) and (max-width:1100px){
 .model3d-top{display:block}.model3d-mode{display:none}.model3d-views{width:max-content;max-width:100%;margin-left:auto}
 .model3d-selection-tools{top:62px;left:6px;max-width:calc(100% - 12px)}
 .model3d-selection-tools button,.model3d-dock .model3d-context button{min-height:44px;min-width:44px}
 .model3d-selection-tools button{padding:6px 8px}.model3d-info{top:116px}
 .model3d-dock .model3d-selection-label{display:none}
 .model3d-operation-dialog .model3d-fields{grid-template-columns:1fr}
 .model3d-operation-dialog .model3d-reattach{min-height:44px}
}
@media(max-height:500px) and (orientation:landscape){
 .model3d-selection-tools{top:6px;right:auto;max-width:48%}.model3d-views{max-width:49%;margin-left:auto}
 .model3d-info{top:61px;max-width:50%}.model3d-bottom{gap:2px}
 .model3d-timeline{display:flex;max-height:54px;width:100%}.model3d-feature{min-height:44px}
 .model3d-context button{min-height:44px}.model3d-selection-label{display:none}
}
/* 3D owns an in-canvas command strip; 2D regains its reserved fixed dock on mode return. */
.app.mobile-workspace:has(.canvas-area[data-view="3d"]) .statusbar{margin-bottom:0;padding-bottom:var(--safe-bottom)}

/* Unified vector affordances. Presentation never changes the underlying command. */
.icon { width:20px; height:20px; flex:none; vertical-align:middle; pointer-events:none; }
.icon * { pointer-events:none; }
.command-label { min-width:0; }
:is(.operation-grid,.model3d-inspector-actions) .command-icon { width:22px; height:22px; }
.model3d-inspector-actions .btn { justify-content:flex-start; text-align:left; padding-inline:12px; gap:10px; }
.model3d-inspector-actions .command-label { overflow-wrap:anywhere; }
.model3d-body-list .consumed { padding-inline-start:22px; color:var(--muted); }
.model3d-body-list .suppressed { text-decoration:line-through; opacity:.7; }
.model3d-body-list .active { color:white; }
.model3d-body-list .command-label { text-align:left; overflow-wrap:anywhere; }
.model3d-selection-tools button { gap:6px; }
.model3d-views button { gap:6px; }
.model3d-feature .command-icon { width:19px; height:19px; }
.model3d-feature .command-label { max-width:185px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.model3d-example-icon { width:40px; height:40px; background:#e7f2ef; border:1px solid #d5e6e0; border-radius:10px; display:grid; place-items:center; }
.model3d-example-icon .icon { width:28px; height:28px; }
.model3d-properties dt { display:flex; align-items:center; gap:6px; color:#5d766b; }
.model3d-properties dt .icon { width:16px; height:16px; }
.field-caption { display:flex; align-items:center; gap:6px; }
.field-caption .icon { width:16px; height:16px; color:#547c6f; }
.icon-heading { display:flex; align-items:center; gap:9px; }
.icon-heading > .icon { width:21px; height:21px; color:#398579; }
.modal-head .icon-heading { min-width:0; overflow-wrap:anywhere; }
.document-indicator { display:inline-flex; width:19px; align-items:center; justify-content:center; }
.document-indicator .icon { width:16px; height:16px; }
.document-tab-close .icon { width:16px; height:16px; }
.document-tab-item.active .document-indicator { color:var(--teal); }
.document-tab-item[data-dirty=true] .document-indicator { color:#aa7331; }
.document-tab-item[data-recovery-error=true] .document-indicator { color:#b33d3d; }
.save-status .icon { width:15px; height:15px; }
.template-industry { display:flex; align-items:center; gap:7px; }
.template-industry .icon { width:20px; height:20px; }
.inspector-tabs button { gap:5px; padding-inline:8px; }
.inspector-tabs .command-icon { width:17px; height:17px; }
.icon-preferences { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; padding:10px 0 14px; border-bottom:1px solid var(--border); margin-bottom:12px; }
.icon-preferences > label { display:flex; align-items:center; gap:8px; font-size:12px; min-width:0; flex:1; }
.icon-preferences select { flex:1; min-width:115px; max-width:210px; }
.icon-preferences .btn { flex:none; }
.icon-guide-grid section { margin-block:16px; }
.icon-guide-items { display:grid; grid-template-columns:repeat(auto-fill,minmax(100px,1fr)); gap:8px; }
.icon-guide-item { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; padding:14px 6px; background:#f5f9f7; border:1px solid var(--border); border-radius:8px; text-align:center; font-size:11px; min-height:80px; }
.icon-guide-item .icon { width:26px; height:26px; color:#236b60; }
.icon-guide-item[hidden],.icon-guide-grid section[hidden] { display:none; }
.command-tooltip { position:fixed; z-index:1000; max-width:min(310px,calc(100vw - 16px)); border:1px solid #49615b; border-radius:7px; padding:8px 11px; background:#173c36; color:#fff; font-size:12px; line-height:1.45; box-shadow:0 4px 15px #183b3326; overflow-wrap:anywhere; pointer-events:auto; }
/* Explicit compact preference affects toolbars, never document names, fields or forms. */
[data-icon-labels=compact] :is(.tool-dock,.workbar,.appbar-actions,.model3d-views,.model3d-selection-tools,.model3d-dock,.model3d-timeline,.drawing-session-controls,.block-editor-bar) .command-label {
 display:block!important; position:absolute!important; width:1px!important; height:1px!important; margin:-1px!important; padding:0!important; overflow:hidden!important; clip-path:inset(50%); clip:rect(0,0,0,0); white-space:nowrap!important; border:0!important;
}
[data-icon-labels=compact] :is(.model3d-views,.model3d-selection-tools,.model3d-dock,.model3d-timeline,.drawing-session-controls,.block-editor-bar) button { min-width:38px; padding-inline:9px; gap:0; }
[data-icon-labels=labels] :is(.tool-dock,.workbar,.appbar-actions,.model3d-views,.model3d-selection-tools,.model3d-dock,.drawing-session-controls,.block-editor-bar) .command-label { display:block!important; }
[data-icon-labels=labels] .tool-dock { max-width:calc(100% - 16px); overflow:auto; justify-content:flex-start; }
[data-icon-labels=labels] .tool-dock button { width:auto; min-width:54px; flex:none; }
[data-icon-labels=labels] .appbar-actions button { flex:none; }
[data-icon-labels=labels] .appbar-actions { flex:none; }
[data-icon-labels=labels] .appbar { overflow-x:auto; }
[data-icon-labels=labels] .document-title { min-width:48px; }
@media(max-width:760px),(pointer:coarse) and (max-width:1100px) {
 .command-icon { width:21px; height:21px; }
 .model3d-inspector-actions .btn { gap:8px; font-size:12px; }
 .model3d-inspector-actions .command-label { line-height:1.35; }
 .model3d-selection-tools { padding:3px; gap:2px; }
 .model3d-selection-tools button { min-width:44px; min-height:48px; flex-direction:column; gap:3px; padding:4px 7px; }
 .model3d-selection-tools .command-label { font-size:9px; line-height:1.2; }
 .model3d-info { top:122px; }
 .model3d-views { scrollbar-width:thin; }
 .model3d-body-list button { min-height:44px; }
 .mobile-dialog .operation-grid .command-icon { width:25px; height:25px; }
 .mobile-dialog .operation-grid .command-label { display:block; font-size:12px; line-height:1.3; }
 .mobile-workspace .inspector-tabs button { padding-inline:9px; gap:6px; }
 .mobile-workspace .inspector-tabs .command-label { font-size:12px; }
 .icon-preferences { align-items:stretch; }
 .icon-preferences > label { flex-basis:100%; }
 .icon-preferences select { max-width:none; }
 .icon-preferences button { min-height:44px; }
 [data-icon-labels=compact] :is(.model3d-views,.model3d-selection-tools,.model3d-dock,.model3d-timeline,.drawing-session-controls,.block-editor-bar) button { min-width:44px; min-height:44px; }
 /* Familiar navigation is compact; creation, contextual actions and form captions stay labeled. */
 [data-icon-labels=auto] .model3d-views button:not([data-action="3d-2d"]) .command-label,
 [data-icon-labels=auto] .model3d-dock > :is([data-action="3d-undo"],[data-action="3d-redo"],[data-action="3d-bodies"],[data-action="3d-examples"]) .command-label,
 [data-icon-labels=auto] .model3d-feature:not(.active) .command-label,
 [data-icon-labels=auto] .appbar-actions .command-label,
 [data-icon-labels=auto] .mobile-landscape .tool-dock .command-label {
  display:block!important; position:absolute!important; width:1px!important; height:1px!important; margin:-1px!important; padding:0!important; overflow:hidden!important; clip-path:inset(50%); clip:rect(0,0,0,0); white-space:nowrap!important; border:0!important;
 }
 [data-icon-labels=auto] .model3d-views button:not([data-action="3d-2d"]) { width:44px; min-width:44px; padding:8px; gap:0; }
 .model3d-feature { padding-inline:10px; }
 [data-icon-labels=labels] .mobile-landscape .tool-dock button { width:44px; min-width:44px; height:auto; min-height:58px; padding:4px 2px; }
 [data-icon-labels=labels] .mobile-landscape .tool-dock .command-label { max-width:40px; white-space:normal; overflow-wrap:normal; text-align:center; font-size:8px; }
}
@media(max-height:500px) and (orientation:landscape) {
 .model3d-info { top:65px; }
 .model3d-selection-tools button { flex-direction:row; min-height:44px; }
 [data-icon-labels=auto] .model3d-selection-tools .command-label {
  display:block!important; position:absolute!important; width:1px!important; height:1px!important; margin:-1px!important; padding:0!important; overflow:hidden!important; clip-path:inset(50%); clip:rect(0,0,0,0); white-space:nowrap!important; border:0!important;
 }
}
@media(forced-colors:active) { .icon { forced-color-adjust:auto; } .command-tooltip { background:Canvas; color:CanvasText; border-color:CanvasText; } }

.document-indicator { position:relative; flex-shrink:0; }
.document-state { position:absolute; inset:auto -3px -4px auto; width:10px; height:10px; border-radius:50%; background:#f8fcfa; display:flex; align-items:center; justify-content:center; }
.document-state .icon { width:10px; height:10px; }
.document-tab-item[data-recovery-error=true] .document-state { width:13px; height:13px; background:Canvas; }
.document-tab-item[data-recovery-error=true] .document-state .icon { width:13px; height:13px; }
.symbol-drag-handle .icon { width:13px; height:13px; }
@media(max-width:760px),(pointer:coarse) and (max-width:1100px) { .model3d-feature,.model3d-dock button { min-width:44px; min-height:44px; } }
/* Preference controls use one compact row; the guide stays a labeled action. */
.mobile-dialog .icon-preferences { flex-wrap:nowrap; gap:6px; }
.mobile-dialog .icon-preferences > label { flex:1 1 0; gap:5px; font-size:11px; }
.mobile-dialog .icon-preferences select { min-width:95px; width:0; padding-inline:6px; font-size:16px; }
.mobile-dialog .icon-preferences > button { padding:8px; gap:5px; font-size:11px; }
.mobile-dialog .icon-preferences > button .command-label { max-width:35px; line-height:1.25; text-align:left; }
