@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&display=swap');
:root{font-family:'DM Sans',system-ui,sans-serif;color:#e7ebee;background:#101419;font-size:16px;font-synthesis:none;--accent:#6de9bd;--muted:#8e9aa6;--line:#303941;--paper:#fff;--ink-filter:none}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;overflow:hidden}button,input,select{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.35}button,a,input,select{outline-offset:3px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent)}button{transition:background .12s,color .12s}svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}#stage{position:fixed;inset:0;overflow:hidden;outline:none;touch-action:none}#frame{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}#mat-viewport{position:relative;width:100%;height:100%;overflow:hidden;background:var(--paper);touch-action:none}body[data-mode=calibrate] #mat-viewport{background:#151c20}#pattern-layer{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}#tiles{position:absolute;inset:0}.tile{position:absolute;overflow:hidden;background:var(--paper)}.tile canvas{position:absolute;display:block;filter:var(--ink-filter);pointer-events:none}.tile-label{position:absolute;font:10px system-ui;color:#999;left:5px;top:5px}#grid,#overlays,#marks{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}#grid{color:var(--accent)}#overlays,#marks{color:#ffb965}#outline{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}#polygon{fill:none;stroke:#6de9bd99;stroke-width:1}.corner-handle{position:absolute;transform:translate(-50%,-50%);padding:0;width:36px;height:36px;background:transparent;border:0;touch-action:none;cursor:move}.corner-handle:after{content:'';position:absolute;inset:10px;border:2px solid var(--accent);background:#13241e;border-radius:50%;box-shadow:0 0 0 5px #10141988}.corner-handle.selected:after,.corner-handle:hover:after{background:var(--accent);box-shadow:0 0 0 6px #6de9bd22}.corner-handle span{position:absolute;top:34px;left:8px;font-size:11px;color:var(--accent);white-space:nowrap}.filter-defs{position:absolute;width:0;height:0;pointer-events:none}.topbar{position:fixed;top:16px;left:20px;right:20px;display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:64px;padding:10px 14px 10px 18px;border:1px solid var(--line);border-radius:14px;background:#1b2229ee;backdrop-filter:blur(20px);box-shadow:0 8px 24px #0002;z-index:20}.brand{display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none;font-size:21px;letter-spacing:-.7px;font-weight:650}.brand svg{width:25px;height:25px;color:var(--accent)}.brand small{display:block;font-size:10px;font-weight:400;letter-spacing:1px;text-transform:uppercase;color:var(--muted);margin-top:1px}.steps{display:flex;align-items:center;gap:16px}.steps button{border:0;background:none;color:#8b969f;font-size:14px;display:flex;align-items:center;gap:8px;padding:6px}.steps button span{display:grid;place-items:center;border:1px solid #59636b;border-radius:50%;width:25px;height:25px;font-size:12px}.steps button[aria-current=step]{color:#fff}.steps button[aria-current=step] span{background:var(--accent);border-color:var(--accent);color:#102219}.steps i{width:40px;height:1px;background:#45505b}.global-actions{display:flex;gap:5px;align-items:center}.icon-button{display:inline-flex;align-items:center;justify-content:center;border:0;background:none;width:36px;height:36px;border-radius:7px;font-size:23px;flex-shrink:0}.icon-button:hover:enabled,.tool-button:hover:enabled{background:#ffffff12}.panel{position:fixed;top:102px;right:20px;width:302px;padding:23px;background:#1b2229f5;border:1px solid var(--line);border-radius:14px;box-shadow:0 12px 35px #0003;z-index:15;max-height:calc(100dvh - 178px);overflow:auto;scrollbar-width:thin;scrollbar-color:#4b5967 transparent}.eyebrow{font-size:10px;letter-spacing:1.6px;font-weight:650;color:var(--accent);margin-bottom:14px}h1{font-size:29px;letter-spacing:-1px;line-height:1.15;margin:0 0 13px;font-weight:550}.panel p,dialog p{font-size:14px;line-height:1.6;color:#a7b1ba;margin:0 0 20px}.panel h3{font-size:13px;font-weight:550;margin:22px 0 12px;color:#ccd4d9}.panel h3 .unit-label{color:var(--muted);font-weight:400;font-size:12px;margin-left:4px}label{display:block;font-size:12px;line-height:1.4;color:#b0bac3;margin-bottom:13px}input,select{display:block;width:100%;height:39px;border:1px solid #3d4852;border-radius:6px;background:#12181e;color:#f1f4f6;font-size:14px;margin-top:7px;padding:0 10px;min-width:0}select{padding-right:4px}.field-row{display:flex;align-items:flex-end;gap:10px}.field-row>*{flex:1;min-width:0}.field-row .unit-field{flex:1.18}.panel .field-help,.field-help{display:block;font-size:12px;line-height:1.6;color:#8d99a4;margin:0 0 16px}.divider{height:1px;background:var(--line);margin:22px 0}.primary,.subtle{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:40px;padding:9px 14px;border-radius:7px;font-size:14px;font-weight:550;text-decoration:none}.primary{background:var(--accent);color:#0e3023;border:1px solid var(--accent)}.primary:hover:enabled{background:#93f3d0}.primary span{margin-left:auto}.subtle{background:#ffffff05;border:1px solid #3a454e;color:#cbd3da}.subtle:hover:enabled{background:#ffffff0d}.full{width:100%;margin-bottom:9px}.nudge-controls{display:flex;gap:6px;margin:12px 0}.nudge-controls button{border:1px solid #3d4852;background:#263039;border-radius:6px;min-width:36px;height:36px}.nudge-controls button:last-child{font-size:12px;flex:1}.panel .status-copy{font-size:12px;color:var(--accent);margin:0 0 16px}.banner{position:fixed;top:89px;left:50%;transform:translateX(-50%);background:#5c4220;color:#ffe3b7;border:1px solid #a57636;border-radius:8px;padding:11px 18px;font-size:13px;z-index:25;max-width:80vw}.empty-state{position:fixed;left:50%;top:50%;transform:translate(-50%,-42%);text-align:center;padding:32px 40px;border:1px solid #333e46;border-radius:18px;background:#1b2229f5;z-index:10;max-width:90vw;min-width:330px}.empty-state h1{font-size:34px}.empty-state p{color:#9aa7b0;font-size:14px;line-height:1.7;margin:0 0 24px}.empty-symbol{display:grid;place-items:center;width:60px;height:60px;margin:0 auto 25px;background:#6de9bd0f;border:1px solid #6de9bd25;border-radius:15px;color:var(--accent)}.empty-symbol svg{width:30px;height:30px}.empty-state .field-help{margin:18px 0 0;font-size:11px}.projection-toolbar{position:fixed;left:20px;top:94px;max-width:calc(100vw - 40px);display:flex;align-items:center;gap:3px;padding:7px;background:#1b2229ed;border:1px solid var(--line);border-radius:10px;backdrop-filter:blur(20px);z-index:20;flex-wrap:wrap}.tool-button{background:none;border:0;border-radius:6px;padding:9px 10px;min-height:36px;white-space:nowrap;font-size:13px}.tool-button[aria-pressed=true],.icon-button[aria-pressed=true]{background:#6de9bd1c;color:var(--accent)}.tool-button span{display:block;font-size:9px;line-height:1;color:#93a39e}.tool-divider{height:24px;width:1px;margin:0 5px;background:var(--line)}.file-button{display:flex;align-items:center;gap:8px;border:0;background:#29333c;padding:9px 12px;border-radius:6px;font-size:13px;height:38px}.file-button svg{width:17px;height:17px;color:var(--accent)}.file-button span{max-width:165px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-panel{top:157px;max-height:calc(100dvh - 235px)}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px}.panel-heading h2{font-size:20px;letter-spacing:-.5px;margin:0;font-weight:550}.panel-heading .icon-button{margin-right:-8px}.check{display:flex;align-items:center;gap:9px;font-size:14px;margin-bottom:14px}.check input{width:16px;height:16px;margin:0;accent-color:var(--accent);flex-shrink:0}.bottom-bar{position:fixed;bottom:18px;left:20px;right:20px;display:flex;align-items:center;justify-content:space-between;gap:16px;z-index:20;pointer-events:none;font-size:12px;color:#8e9aa6}.bottom-bar>*{pointer-events:auto}.document-navigation,.view-controls{display:flex;align-items:center;gap:4px;border:1px solid var(--line);border-radius:9px;padding:5px 7px;background:#1b2229ed;backdrop-filter:blur(20px);color:#d4dce1}.document-navigation input{width:40px;height:27px;padding:2px;text-align:center;margin:0;font-size:12px;appearance:textfield}.document-navigation input::-webkit-inner-spin-button{appearance:none}.document-navigation select{width:99px;font-size:11px;margin:0 3px;height:29px}.document-navigation span{font-size:12px;margin-right:3px}.document-navigation .icon-button{width:25px;height:27px}.view-controls .icon-button{width:27px;height:28px}.view-controls output{min-width:50px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px}.view-controls .tool-button{min-height:28px;padding:6px;font-size:12px}.scale-changed #scale-status{color:#ffc983}.restore-button{position:fixed;top:16px;right:16px;z-index:50;background:#1b2229dd;border:1px solid #3d4c57;border-radius:7px;color:#cad4dd;padding:9px 14px;font-size:12px;opacity:.3}.restore-button:hover,.restore-button:focus-visible{opacity:1}.controls-hidden .chrome{display:none!important}kbd{font:10px system-ui;border:1px solid #46545e;border-radius:4px;padding:2px 5px;margin-left:5px;color:#a7b4be}.notice{position:fixed;bottom:83px;left:50%;transform:translateX(-50%);background:#2b3c35;color:#daf9eb;border:1px solid #517b68;padding:12px 20px;border-radius:8px;z-index:70;font-size:13px;max-width:80vw;text-align:center;margin:0}.notice:empty{display:none}.notice.error-notice{background:#4c2828;border-color:#975656;color:#ffdddd}.error{color:#ffaaa3!important;font-size:12px!important;margin-top:8px!important}.error:empty{display:none}.measurement-readout{background:#12181e;border:1px solid #3a454e;padding:12px;border-radius:7px;color:#ffd69d!important;margin:14px 0!important;font-size:13px!important}.stitch-preview{height:130px;border:1px solid var(--line);background:#10171c;border-radius:6px;margin:15px 0 8px;display:flex;align-items:center;justify-content:center}.stitch-preview svg{width:100%;height:100%;stroke:none}.stitch-preview text{fill:#bac8d1;stroke:none;font-family:system-ui}.layer-empty{padding:10px 0;font-size:13px;color:#8d99a4;line-height:1.6}.layer-label{word-break:break-word}dialog{background:#1b2229;color:#e5ebee;border:1px solid #45525e;border-radius:15px;width:540px;max-width:calc(100vw - 32px);padding:28px;max-height:85dvh;overflow:auto}dialog::backdrop{background:#0009;backdrop-filter:blur(4px)}dialog ol{padding-left:23px;color:#c1ccd5;font-size:14px;line-height:1.7}dialog li{margin-bottom:12px}.shortcut-list{display:grid;grid-template-columns:1fr 1fr;gap:12px;font-size:12px;margin:20px 0 28px}dialog a{color:var(--accent)}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap}.drag-over #polygon{stroke:#fff;stroke-width:3}body[data-tool=line] #stage,body[data-tool=square] #stage{cursor:crosshair}body[data-tool=pan][data-mode=project] #stage{cursor:grab}body.dragging[data-tool=pan][data-mode=project] #stage{cursor:grabbing}body[data-tool=magnify] #stage{cursor:zoom-in}.unit-label{font-size:11px;color:#8d99a4}#layers-list{margin-top:18px}
@media(max-width:900px){.brand small{display:none}.brand{font-size:19px}.steps{gap:8px}.steps i{width:20px}.topbar{padding:10px;gap:12px}.panel{width:270px;padding:19px}.projection-toolbar{gap:0}.tool-button{padding:7px;font-size:12px}.file-button span{max-width:110px}.tool-divider{margin:0 3px}#workspace-hint{max-width:230px;font-size:11px}.project-panel{top:151px}}@media(max-width:650px){.topbar{top:10px;left:10px;right:10px;min-height:53px}.brand{gap:7px;font-size:16px}.brand svg{width:20px;height:20px}.steps{gap:4px}.steps i{display:none}.steps button{font-size:11px;padding:4px;gap:4px}.steps button span{width:19px;height:19px;font-size:10px}.global-actions{gap:0}.global-actions .icon-button{width:27px;height:30px;font-size:19px}#help-button{display:none}.panel{right:10px;top:78px;width:250px;max-height:calc(100dvh - 139px);padding:18px;background:#1b2229fa}.panel h1{font-size:25px}.panel p{font-size:12px}.panel .field-help{font-size:11px}.project-panel{top:164px;max-height:calc(100dvh - 233px)}.projection-toolbar{top:73px;left:10px;max-width:calc(100vw - 20px);gap:0;padding:5px}.projection-toolbar .icon-button{width:30px}.tool-button{font-size:11px;min-height:30px}.projection-toolbar .tool-divider{display:none}.file-button{height:32px;padding:6px}.file-button span{max-width:85px}.file-button svg{display:none}.empty-state{padding:28px 20px;min-width:310px}.empty-state h1{font-size:28px}.bottom-bar{left:10px;right:10px;bottom:10px;gap:7px;flex-wrap:wrap;justify-content:center}#workspace-hint{max-width:none;width:100%;text-align:center;font-size:10px}.document-navigation,.view-controls{gap:1px;padding:4px}.document-navigation input{width:28px}.document-navigation select{width:78px}.view-controls .tool-button{font-size:10px;padding:5px}.view-controls output{min-width:39px}.view-controls .icon-button{width:20px}.banner{font-size:11px;top:69px;max-width:calc(100vw - 24px);width:max-content;z-index:30}.notice{bottom:97px;max-width:90vw;font-size:12px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

#calibration-panel{display:flex;flex-direction:column;max-height:calc(100dvh - 124px)}#calibration-panel>*{flex-shrink:0}#calibration-form{min-height:0;overflow:auto;flex:1 1 auto;padding-right:3px;scrollbar-width:thin;scrollbar-color:#4b5967 transparent;margin-bottom:16px}#calibration-panel>.primary{margin-bottom:0}#calibration-panel p{margin-bottom:12px}#calibration-panel .divider{margin:16px 0}@media(max-width:650px){#calibration-panel{max-height:calc(100dvh - 139px)}}

.field-row .unit-field{flex:0 0 60px}

@media(max-width:650px){.project-panel{max-height:calc(100dvh - 285px)}}

#mark-actions>.field-row{margin-bottom:12px}
@media(max-width:480px){.topbar{gap:6px;padding:8px}.brand span{display:none}.steps{gap:2px}.steps button{padding:3px;gap:3px}}
