*,:before,:after{box-sizing:border-box;margin:0;padding:0}body{color:#fff;background:#1a1a1a;flex-direction:column;height:100dvh;font-family:Arial,sans-serif;display:flex;overflow:hidden}canvas#canvas{touch-action:none;-webkit-user-select:none;user-select:none;flex:1;width:100%;height:100%;display:block}#toolbar{z-index:100;background:#222;border-bottom:1px solid #333;flex-shrink:0;align-items:center;gap:4px;height:48px;padding:0 6px;display:flex;position:relative;overflow:hidden}.bar-left,.bar-centre,.bar-right{flex-shrink:0;align-items:center;gap:4px;display:flex}.bar-centre{flex:1;justify-content:center;min-width:0}.bar-right{margin-left:auto}#toolbar button{color:#fff;cursor:pointer;white-space:nowrap;-webkit-tap-highlight-color:transparent;touch-action:manipulation;background:#333;border:1px solid #444;border-radius:8px;min-width:36px;min-height:36px;padding:7px 14px;font-size:13px;transition:background .15s}#toolbar button:hover{background:#444}#toolbar button.active{background:#ff9500;border-color:#ff9500}.tb-icon{min-width:36px!important;padding:6px 8px!important;font-size:15px!important}#btn-undo,#btn-redo{min-width:36px;padding:6px 8px;font-size:14px}#btn-undo:disabled,#btn-redo:disabled{opacity:.35;cursor:not-allowed}#btn-undo:disabled:hover,#btn-redo:disabled:hover{background:#333}#btn-total-pill{font-size:12px;font-weight:700;color:#ff9500!important;min-width:unset!important;background:0 0!important;border:1.5px solid #ff950099!important;border-radius:20px!important;padding:5px 12px!important;transition:background .2s!important}#btn-total-pill:hover,#btn-total-pill:active{background:#ff950026!important}@media (width<=430px){#toolbar{-webkit-overflow-scrolling:touch;gap:2px;height:44px;padding:0 3px;overflow:auto hidden}#toolbar::-webkit-scrollbar{display:none}#toolbar button{border-radius:7px;flex-shrink:0;min-width:34px;min-height:34px;padding:5px 7px;font-size:11px}.tb-icon{min-width:34px!important;padding:5px 6px!important;font-size:14px!important}#btn-draw-wall,#btn-toggle-view,#btn-import-glb{padding:5px 7px;font-size:11px}#btn-undo,#btn-redo{min-width:34px;padding:5px 6px;font-size:13px}#btn-total-pill{font-size:11px;padding:4px 8px!important}}#main-area{flex:1;display:flex;position:relative;overflow:hidden}#product-panel{z-index:50;background:#252525;border-right:1px solid #333;flex-direction:column;flex-shrink:0;width:180px;transition:transform .25s;display:flex;overflow-y:auto}#product-panel h3{color:#ff9500;flex-shrink:0;padding:12px 14px 8px;font-size:13px;font-weight:700}.product-item{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;border-bottom:1px solid #2e2e2e;align-items:center;min-height:44px;padding:10px 14px;font-size:13px;transition:background .15s;display:flex}.product-item:hover,.product-item:active{background:#ff9500}@media (width<=768px){#product-panel{width:240px;height:100%;position:absolute;top:0;left:0;transform:translate(-100%);box-shadow:4px 0 20px #00000080}#product-panel.open{transform:translate(0)}}#drawer-backdrop{z-index:40;background:#00000080;display:none;position:fixed;inset:0}#drawer-backdrop.visible{display:block}#room-area{color:#aaa;pointer-events:none;white-space:nowrap;z-index:20;background:#00000080;border-radius:10px;padding:3px 10px;font-size:11px;position:absolute;top:8px;left:50%;transform:translate(-50%)}#pricing-panel{z-index:200;background:#252525;border-left:1px solid #333;flex-direction:column;width:280px;max-height:calc(100dvh - 48px);transition:transform .25s;display:flex;position:fixed;top:48px;right:0;overflow:hidden;transform:translate(100%)}#pricing-panel.open{transform:translate(0)}#pricing-panel.elevation-open{transition:right .2s;right:520px;transform:translate(0)}@media (width<=430px){#pricing-panel{border-top:2px solid #ff9500;border-left:none;border-radius:16px 16px 0 0;width:100%;max-height:72dvh;transition:transform .25s;inset:auto 0 0;transform:translateY(100%)}#pricing-panel.open{transform:translateY(0)}#pricing-panel.elevation-open{right:0;transform:translateY(0)}}#quote-header{border-bottom:1px solid #333;flex-shrink:0;justify-content:space-between;align-items:center;padding:14px 16px 10px;display:flex}#quote-header span{color:#ff9500;font-size:15px;font-weight:700}#btn-quote-close{color:#aaa;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;min-width:44px;min-height:44px;padding:0 4px;font-size:20px;line-height:1;display:flex}#item-list{-webkit-overflow-scrolling:touch;flex:1;padding:10px 14px;overflow-y:auto}.quote-item{color:#ccc;border-bottom:1px solid #2e2e2e;padding:10px 0;font-size:12px;line-height:1.5}#quote-footer{padding:12px 16px;padding-bottom:max(12px, env(safe-area-inset-bottom));border-top:1px solid #333;flex-shrink:0}.total-line{justify-content:space-between;align-items:center;margin-bottom:10px;display:flex}.total-line span:first-child{color:#aaa;font-size:13px}#total-price{color:#ff9500;font-size:16px;font-weight:700}#btn-export{color:#fff;cursor:pointer;touch-action:manipulation;background:#ff9500;border:none;border-radius:8px;width:100%;min-height:44px;padding:11px;font-size:14px;font-weight:700;transition:background .15s}#btn-export:hover{background:#fa3}#btn-export:active{background:#e08000}#wall-dim-input{z-index:500;pointer-events:all;background:#1a1a1a;border:2px solid #ff9500;border-radius:8px;flex-direction:row;align-items:center;gap:6px;padding:6px 10px;display:none;position:fixed}#wall-dim-value{color:#fff;background:#2a2a2a;border:1px solid #ff9500;border-radius:6px;width:80px;min-height:36px;padding:6px 8px;font-size:15px;font-weight:700}@media (width<=430px){#wall-dim-input{border-radius:12px;gap:10px;padding:8px 14px;transform:translate(-50%);bottom:max(16px, env(safe-area-inset-bottom))!important;top:auto!important;left:50%!important}#wall-dim-value{width:88px;min-height:40px;font-size:16px}}#draw-mode-menu{z-index:600;bottom:max(80px, calc(60px + env(safe-area-inset-bottom)));background:#1e1e1e;border:2px solid #ff9500;border-radius:14px;flex-direction:column;gap:6px;min-width:240px;padding:12px 10px;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 8px 32px #0009}.dmm-btn{color:#fff;cursor:pointer;text-align:left;touch-action:manipulation;-webkit-tap-highlight-color:transparent;background:#2a2a2a;border:1px solid #444;border-radius:8px;width:100%;min-height:44px;padding:10px 14px;font-size:13px;transition:background .15s}.dmm-btn:active{background:#3a3a3a}@media (width<=430px){#draw-mode-menu{min-width:unset;left:8px;right:8px;bottom:max(8px, env(safe-area-inset-bottom));transform:none}.dmm-btn{min-height:48px;padding:12px 14px;font-size:14px}}#draw-confirm-bar{bottom:max(16px, env(safe-area-inset-bottom));z-index:500;white-space:nowrap;background:#1a1a1a;border:2px solid #ff9500;border-radius:12px;align-items:center;gap:8px;padding:8px 12px;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 4px 20px #00000080}#draw-confirm-hint{color:#aaa;font-family:Arial;font-size:12px}#draw-confirm-bar button{color:#fff;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;background:#ff9500;border:none;border-radius:8px;min-width:36px;min-height:36px;padding:7px 14px;font-size:16px;font-weight:700}#draw-confirm-bar button:last-child{background:#444}@media (width<=430px){#draw-confirm-bar{left:8px;right:8px;bottom:max(8px, env(safe-area-inset-bottom));white-space:normal;border-radius:14px;justify-content:space-between;padding:10px 12px;transform:none}#draw-confirm-hint{white-space:normal;flex:1;font-size:11px}#draw-confirm-bar button{flex-shrink:0;min-width:44px;min-height:44px;font-size:15px}}#draw-preset-picker{z-index:600;bottom:max(80px, calc(60px + env(safe-area-inset-bottom)));background:#1e1e1e;border:2px solid #ff9500;border-radius:14px;align-items:flex-start;gap:16px;padding:14px 16px;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 8px 32px #0009}.dpp-card{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;border:2px solid #333;border-radius:10px;padding:8px;transition:border-color .15s}.dpp-card:hover,.dpp-card:active{border-color:#ff9500}@media (width<=430px){#draw-preset-picker{left:8px;right:8px;bottom:max(8px, env(safe-area-inset-bottom));justify-content:center;transform:none}}#touch-model-overlay{bottom:max(16px, env(safe-area-inset-bottom));z-index:400;pointer-events:none;position:fixed;left:50%;transform:translate(-50%)}#touch-overlay-inner{pointer-events:all;background:#1e1e1eeb;border:1px solid #444;border-radius:30px;gap:8px;padding:8px 12px;display:flex;box-shadow:0 4px 20px #00000080}#touch-overlay-inner button{color:#fff;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;white-space:nowrap;background:#ffffff1a;border:1px solid #555;border-radius:22px;min-height:40px;padding:8px 14px;font-size:13px;transition:background .15s}#touch-overlay-inner button:active{background:#ff95004d}@media (width<=430px){#touch-model-overlay{bottom:max(12px, env(safe-area-inset-bottom));width:auto;left:8px;right:8px;transform:none}#touch-overlay-inner{border-radius:14px;justify-content:space-between;gap:4px;padding:6px 8px}#touch-overlay-inner button{text-align:center;border-radius:10px;flex:1;min-height:44px;padding:8px 10px;font-size:12px}}#touch-float-panel{z-index:401;background:#1e1e1e;border:1px solid #444;border-radius:12px;width:180px;position:fixed;top:60px;right:12px;overflow:hidden;box-shadow:0 4px 20px #00000080}#touch-float-handle{color:#ff9500;cursor:grab;-webkit-user-select:none;user-select:none;background:#2a2a2a;border-bottom:1px solid #333;justify-content:space-between;align-items:center;min-height:44px;padding:10px 12px;font-size:12px;font-weight:700;display:flex}#touch-float-close{color:#aaa;cursor:pointer;text-align:center;min-width:32px;padding:4px 6px;font-size:18px}#touch-float-body{flex-direction:column;gap:4px;padding:6px;display:flex}#touch-float-body button{color:#fff;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;text-align:left;background:#2a2a2a;border:1px solid #333;border-radius:8px;min-height:40px;padding:9px 12px;font-size:12px;transition:background .15s}#touch-float-body button:active{background:#3a3a3a}#tfp-ruler-readout{background:#111;border-top:1px solid #222;padding:8px 12px}#tfp-ruler-text{color:#aaa;font-size:11px}.tfp-btn-active{background:#ff9500!important;border-color:#ff9500!important}.tfp-btn-hidden{opacity:.5}@media (width<=430px){#touch-float-panel{top:auto;bottom:max(72px, calc(60px + env(safe-area-inset-bottom)));border-radius:14px;width:auto;left:8px;right:8px}#touch-float-body{flex-flow:wrap;gap:6px;padding:8px}#touch-float-body button{text-align:center;border-radius:10px;flex:calc(50% - 6px);min-height:44px;font-size:13px}}#glb-setup-modal{padding:8px}#glb-step-1,#glb-step-2{-webkit-overflow-scrolling:touch;max-height:90dvh;overflow-y:auto}@media (width<=430px){#glb-setup-modal{align-items:flex-end!important;padding:4px!important}#glb-step-1,#glb-step-2{border-bottom:none!important;border-left:none!important;border-right:none!important;border-radius:16px 16px 0 0!important;width:100%!important;max-height:92dvh!important;padding:12px!important}#glb-step-1 div[style*=display\:flex][style*=gap\:10px]{flex-direction:column!important;align-items:stretch!important}#glb-w,#glb-h,#glb-d{width:100%!important}#glb-preview-canvas{height:160px!important}#glb-photo-canvas{height:200px!important}.glb-rot-btn,.glb-flip-btn{text-align:center!important;flex:1!important;min-height:40px!important;padding:9px 6px!important;font-size:12px!important}body>div[style*=width\:520px]{-webkit-overflow-scrolling:touch!important;border-top:2px solid #ff9500!important;border-left:none!important;border-radius:16px 16px 0 0!important;width:100vw!important;height:58dvh!important;top:auto!important;bottom:0!important;right:0!important;overflow-y:auto!important}body>div[style*=width\:260px]{-webkit-overflow-scrolling:touch!important;width:100%!important;max-height:86dvh!important;padding-bottom:max(16px, env(safe-area-inset-bottom))!important;border:none!important;border-top:2px solid #ff9500!important;border-radius:16px 16px 0 0!important;position:fixed!important;inset:auto 0 0!important;overflow-y:auto!important}body>div[style*=z-index\:500]{top:auto!important;left:8px!important;right:8px!important;bottom:max(16px, env(safe-area-inset-bottom))!important;border-radius:12px!important;flex-wrap:wrap!important;justify-content:center!important;gap:8px!important;width:auto!important;padding:10px 12px!important}body>div[style*=z-index\:500] input[type=number]{width:100px!important;min-height:40px!important;font-size:16px!important}body>div[style*=z-index\:500] button{min-height:40px!important;padding:8px 12px!important;font-size:13px!important}body>div[style*=min-width\:100px]{padding:8px 14px;font-size:14px!important}}
