:root{--panel-w:340px;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--sheet-handle:56px}html,body{color:#1d2329;-webkit-text-size-adjust:100%;height:100%;margin:0;font:14px/1.4 system-ui,-apple-system,sans-serif;overflow:hidden}#app{top:0;left:0;right:var(--panel-w);height:100dvh;position:fixed}#app canvas{touch-action:none;display:block}.labels{pointer-events:none;position:absolute;inset:0;overflow:hidden}#status{top:calc(var(--safe-top) + 12px);background:#fff;border-radius:6px;padding:6px 10px;position:fixed;left:12px}#panel{width:var(--panel-w);color:#dde1e4;box-sizing:border-box;height:100dvh;padding-bottom:var(--safe-bottom);background:#1f2326;position:fixed;top:0;right:0;overflow-y:auto}.sheet-handle{display:none}.section{border-bottom:1px solid #30363b}.section summary{cursor:pointer;min-height:20px;padding:12px 14px;font-weight:600}.section-body{padding:0 14px 12px}.row{align-items:center;gap:10px;min-height:40px;display:flex}.row>span{flex:1}.row-number{flex-wrap:wrap}.row-stacked{flex-direction:column;align-items:stretch;gap:6px;padding-bottom:6px}.row-stacked select{max-width:100%}.presets{gap:8px;display:flex}.presets button{color:#eef;background:#2b3136;border:1px solid #444c53;border-radius:8px;flex:1;min-height:40px;margin:4px 0 8px}.row-number>span{flex-basis:100%;margin-top:6px}.row-number input[type=range]{flex:1}.row input[type=number]{width:72px}.row input[type=checkbox]{width:22px;height:22px}input,select,button{font:inherit}select,input[type=number]{color:#eef;background:#2b3136;border:1px solid #444c53;border-radius:6px;max-width:60%;min-height:36px;padding:6px 8px}input[type=color]{background:0 0;border:none;width:48px;height:32px}.section-body>button{color:#fff;background:#2f6fb2;border:0;border-radius:8px;width:100%;min-height:40px;margin:6px 0}.note{color:#9aa3ab;margin:6px 0;font-size:12px}.note.small{margin-top:-4px}.readout{color:#ffd38a;margin:6px 0;font-weight:600}.warn{color:#f5b041;margin-top:4px}.toolbar{top:calc(var(--safe-top) + 8px);left:8px;right:calc(var(--panel-w) + 260px);scrollbar-width:none;z-index:5;gap:6px;display:flex;position:fixed;overflow-x:auto}.toolbar button{color:#fff;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#1f2326d1;border:0;border-radius:22px;flex:none;min-width:52px;min-height:44px;padding:0 14px;font-weight:600}.toolbar button.on,.actions button.on{background:#2f6fb2}.actions{top:calc(var(--safe-top) + 8px);right:calc(var(--panel-w) + 8px);z-index:5;gap:6px;display:flex;position:fixed}.actions button{color:#fff;background:#1f2326d1;border:0;border-radius:22px;min-height:44px;padding:0 14px;font-weight:600}.toast{top:calc(var(--safe-top) + 60px);max-width:min(520px, calc(100vw - var(--panel-w) - 16px));color:#fff;z-index:5;background:#d0021beb;border-radius:10px;padding:8px 12px;font-weight:600;position:fixed;left:8px}.toast[hidden],.joystick[hidden],.divider[hidden]{display:none}.joystick{left:20px;bottom:calc(var(--safe-bottom) + 24px);touch-action:none;z-index:6;background:#1f232659;border:2px solid #fff9;border-radius:50%;width:128px;height:128px;position:fixed}.joystick .knob{pointer-events:none;background:#ffffffe6;border-radius:50%;width:48px;height:48px;position:absolute;top:40px;left:40px}.divider{z-index:4;touch-action:none;cursor:ew-resize;background:#fff;width:3px;margin-left:-1.5px;position:fixed;top:0;bottom:0}.divider .grip{background:#fff;border-radius:50%;width:44px;height:44px;margin-top:-22px;position:absolute;top:50%;left:-21px;box-shadow:0 1px 4px #0006}.divider .tag{top:calc(var(--safe-top) + 64px);color:#fff;white-space:nowrap;background:#1f2326d1;border-radius:6px;padding:3px 8px;font-size:12px;position:absolute}.divider .tag.left{right:10px}.divider .tag.right{left:10px}.label{white-space:nowrap;background:#ffffffe0;border-radius:3px;padding:1px 5px;font-size:11px}.label.small{color:#444;font-size:10px}.label.site{background:#fffae1e0;font-style:italic}.label.dim.proposed{color:#1b4f9c;font-weight:600}.label.dim.scan{color:#9c3b1b;font-weight:600}.label.dim.measure{color:#fff;background:#d0021b;font-size:13px;font-weight:700}@media (width<=699px){:root{--panel-w:0px}#app{right:0}#panel{width:100%;height:auto;max-height:calc(var(--sheet-handle) + var(--safe-bottom));z-index:7;border-radius:14px 14px 0 0;flex-direction:column;transition:max-height .25s;display:flex;top:auto;bottom:0;left:0;overflow:hidden;box-shadow:0 -4px 16px #0000004d}#panel.open{max-height:72dvh}.sheet-handle{width:100%;min-height:var(--sheet-handle);color:#fff;text-align:left;background:0 0;border:0;flex:none;align-items:center;gap:10px;padding:0 16px;font-weight:600;display:flex;position:relative}.sheet-handle .grip{background:#59626a;border-radius:2px;width:40px;height:4px;margin-left:-20px;position:absolute;top:6px;left:50%}.sheet-handle .handle-note{color:#9aa3ab;text-overflow:ellipsis;white-space:nowrap;text-align:right;flex:1;font-size:12px;font-weight:400;overflow:hidden}.panel-body{-webkit-overflow-scrolling:touch;padding-bottom:calc(var(--safe-bottom) + 12px);overflow-y:auto}.row{min-height:48px}.row input[type=checkbox]{width:26px;height:26px}.row input[type=range]{height:32px}select,input[type=number]{min-height:40px;font-size:16px}.section summary{padding:14px 16px;font-size:15px}.toolbar{gap:4px;right:8px}.toolbar button{flex:1;min-width:0;padding:0 6px;font-size:14px}.actions{top:auto;right:12px;bottom:calc(var(--sheet-handle) + var(--safe-bottom) + 16px);flex-direction:column;align-items:flex-end}.actions button{min-height:48px;box-shadow:0 2px 8px #0000004d}.toast{max-width:calc(100vw - 16px);font-size:13px}.joystick{bottom:calc(var(--sheet-handle) + var(--safe-bottom) + 20px)}.label{padding:1px 4px;font-size:10px}.label.small{font-size:9px}.label.dim.measure{font-size:12px}}
