:root{--bg:#070d11;--surface:#0d151a;--surface-2:#111b21;--surface-3:#162229;--border:#29363d;--border-soft:#202c32;--text:#f2f5f7;--muted:#8f9ba2;--muted-2:#657178;--blue:#2f7df6;--blue-soft:#113565;--red:#ff4d57;--green:#58c96a;--yellow:#f5c842;--orange:#f08a45;--font-ui:"Segoe UI", Arial, sans-serif;--font-mono-ui:Consolas, "Courier New", monospace;--text-caption:11px;--text-secondary:12px;--text-control:13px;--text-section:14px}*{box-sizing:border-box}html,body{background:var(--bg);min-height:100%;color:var(--text);font-family:var(--font-ui);margin:0}.php-startup-error{border:1px solid var(--border);background:var(--surface);border-radius:6px;width:min(560px,100% - 40px);margin:12vh auto 0;padding:28px}.php-startup-error img{width:min(260px,100%)}.php-startup-error h1{margin:24px 0 8px;font-size:20px}.php-startup-error p{color:var(--muted)}.php-startup-error code{border:1px solid var(--border-soft);background:var(--bg);padding:10px 12px;display:block}button,input,select{font:inherit}button{color:inherit}button:focus-visible,input:focus-visible,select:focus-visible{outline-offset:2px;outline:2px solid #4c93ff}.flow-app{background:var(--bg);width:100%;min-width:320px;min-height:100vh;overflow:hidden}.topbar{border-bottom:1px solid var(--border);z-index:20;background:#091116;grid-template-columns:320px minmax(0,1fr) auto;align-items:center;height:60px;padding:0 18px;display:grid;position:relative}.brand,.top-actions,.top-tools{align-items:center;display:flex}.brand{gap:10px;min-width:0}.brand-logo{object-fit:contain;object-position:left center;flex:none;width:174px;height:36px;display:block}.brand-subtitle{color:var(--muted-2);font-size:var(--text-secondary);border-left:1px solid var(--border);padding-left:10px}.top-actions{gap:4px}.top-actions button,.top-tools button{color:#dbe1e4;height:36px;font-size:var(--text-control);cursor:pointer;white-space:nowrap;background:0 0;border:1px solid #0000;border-radius:5px;justify-content:center;align-items:center;gap:8px;padding:0 12px;display:inline-flex}.top-actions button:hover:not(:disabled),.top-tools button:hover:not(:disabled){background:var(--surface-2);border-color:var(--border)}.top-actions button:disabled{color:#5e686e;cursor:not-allowed}.top-tools{gap:3px}.top-tools .icon-button{width:34px;padding:0}.app-grid{grid-template-rows:minmax(0,1fr);grid-template-columns:318px minmax(460px,1fr) 360px;height:calc(100vh - 60px);display:grid;overflow:hidden}.side-panel{background:var(--surface);scrollbar-width:thin;scrollbar-color:#34434b transparent;min-width:0;height:100%;min-height:0;overflow-y:auto}.left-panel{border-right:1px solid var(--border)}.right-panel{border-left:1px solid var(--border);flex-direction:column;display:flex;overflow:hidden}.right-panel-scroll{scrollbar-width:thin;scrollbar-color:#34434b transparent;flex:auto;min-height:0;overflow-y:auto}.panel-section{border-bottom:1px solid var(--border);padding:16px}.section-title{color:#ccd4d8;align-items:center;gap:8px;margin-bottom:12px;display:flex}.section-title svg{color:#7c8b93}.section-title h2{font-size:var(--text-section);text-transform:uppercase;margin:0;font-weight:760;line-height:1.2}.file-card{border:1px solid var(--border-soft);background:#10191e;border-radius:6px;margin-bottom:8px;padding:9px}.file-card-heading{color:#cbd3d7;min-height:24px;font-size:var(--text-control);border-bottom:1px solid #253239;justify-content:space-between;align-items:center;margin-bottom:7px;padding-bottom:6px;font-weight:650;display:flex}.file-card.file-a.has-file{border-left:2px solid var(--red)}.file-card.file-b.has-file{border-left:2px solid var(--blue)}.file-info{grid-template-columns:30px minmax(0,1fr) 26px;align-items:center;gap:8px;display:grid}.file-badge{color:#fff;background:#be3039;border-radius:5px;place-items:center;width:30px;height:34px;font-size:13px;font-weight:760;display:grid}.file-b .file-badge{background:#235bb8}.file-copy{flex-direction:column;gap:3px;min-width:0;display:flex}.file-copy strong{font-size:var(--text-control);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.file-copy span,.file-copy small{color:var(--muted);font-size:var(--text-caption);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.file-copy small{color:var(--muted-2)}.icon-button{border:1px solid var(--border);cursor:pointer;background:#101a1f;border-radius:5px;place-items:center;display:inline-grid}.icon-button.small{color:#a9b3b8;width:26px;height:26px;padding:0}.icon-button:hover{background:var(--surface-3);color:#fff}.file-empty{color:#9ba7ad;width:100%;min-height:44px;font-size:var(--text-control);cursor:pointer;background:#0c1418;border:1px dashed #3a484f;border-radius:5px;justify-content:center;align-items:center;gap:8px;display:flex}.file-empty:hover:not(:disabled){color:#fff;background:#111d22;border-color:#56727f}.drop-zone{color:#a3adb2;min-height:68px;font-size:var(--text-secondary);border:1px dashed #3a484f;border-radius:6px;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:4px 8px;padding:10px 12px;display:grid}.drop-zone svg{color:#68777f;grid-row:1/3}.drop-zone button{color:#6fa8ff;width:fit-content;font-size:var(--text-caption);cursor:pointer;background:0 0;border:0;padding:0}.message{min-height:34px;font-size:var(--text-secondary);border-radius:5px;align-items:center;gap:6px;margin-top:8px;padding:8px 9px;line-height:1.45;display:flex}.success-message{color:#6bdb7d;background:#10271a;border:1px solid #285a35}.error-message{color:#ff8990;background:#2a1519;border:1px solid #67343a}.field-label,.rotation-field>span{color:#aeb8bd;font-size:var(--text-secondary);margin:0 0 5px;display:block}.select-wrap{position:relative}.select-wrap select{appearance:none;color:#e5e9eb;width:100%;height:38px;font-size:var(--text-control);background:#121c21;border:1px solid #344249;border-radius:5px;padding:0 32px 0 9px}.select-wrap svg{color:#869299;pointer-events:none;position:absolute;top:11px;right:9px}.alignment-status{color:#829097;background:#111a1f;border:1px solid #39464c;border-radius:5px;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:8px;min-height:54px;margin:9px 0 10px;padding:8px 9px;display:grid}.alignment-status.ready{color:#65d276;background:#10261a;border-color:#255b35}.alignment-status div{flex-direction:column;gap:3px;min-width:0;display:flex}.alignment-status strong{font-size:var(--text-secondary)}.alignment-status span{color:#789087;font-size:var(--text-caption)}.manual-grid{grid-template-columns:1fr 1fr;gap:8px;display:grid}.manual-grid label>span{font-size:var(--text-secondary);color:var(--muted);margin-bottom:4px;display:block}.unit-input{background:#10191e;border:1px solid #334148;border-radius:5px;grid-template-columns:minmax(0,1fr) auto;align-items:center;height:36px;display:grid;overflow:hidden}.unit-input input{color:#e8ecee;width:100%;min-width:0;height:34px;font-family:var(--font-mono-ui);font-size:var(--text-control);text-align:right;background:0 0;border:0;outline:0;padding:0 5px}.unit-input small{color:#8f9ba1;font-size:var(--text-caption);padding-right:7px}.rotation-field{margin-top:9px;display:block}.alignment-actions{grid-template-columns:36px minmax(0,1fr);gap:7px;margin-top:8px;display:grid}.secondary-button,.primary-button,.report-button{height:40px;font-size:var(--text-control);cursor:pointer;border-radius:5px;justify-content:center;align-items:center;gap:7px;font-weight:680;display:inline-flex}.secondary-button{color:#d7dde0;background:#121c21;border:1px solid #344249}.secondary-button:hover:not(:disabled){background:#18262d}.secondary-button.wide{width:100%}.primary-button{color:#fff;background:#12428a;border:1px solid #2f70d3}.primary-button:hover:not(:disabled){background:#1852aa}.primary-button:disabled,.secondary-button:disabled,.report-button:disabled{cursor:not-allowed;color:#67737a;background:#151e23;border-color:#303d43}.option-line{color:#b9c1c5;min-height:36px;font-size:var(--text-secondary);justify-content:space-between;align-items:center;gap:10px;display:flex}.tolerance-line{margin-bottom:3px}.unit-input.compact{width:102px}.switch{cursor:pointer;background:#263137;border:1px solid #3b484f;border-radius:9px;flex:none;width:31px;height:18px;padding:2px}.switch span{background:#7b878d;border-radius:50%;width:12px;height:12px;transition:transform .15s,background .15s;display:block}.switch.is-on{background:#1d5cbd;border-color:#347df0}.switch.is-on span{background:#fff;transform:translate(13px)}.options-section .primary-button{width:100%;margin-top:10px}.workspace-panel{background:#071015;grid-template-rows:56px 42px minmax(0,1fr);min-width:0;height:100%;display:grid}.workspace-toolbar{border-bottom:1px solid var(--border);background:#0d161b;justify-content:space-between;align-items:center;gap:12px;padding:0 14px;display:flex}.view-tabs{align-items:center;gap:3px;display:flex}.view-tabs button{color:#aeb8bd;height:36px;font-size:var(--text-secondary);cursor:pointer;white-space:nowrap;background:0 0;border:1px solid #0000;border-radius:5px;align-items:center;gap:7px;padding:0 10px;display:flex}.view-tabs button:hover{background:#162127}.view-tabs button.active{color:#edf4ff;background:#123c78;border-color:#1e579d}.zoom-control{color:#8e9aa0;font-size:var(--text-caption);align-items:center;gap:3px;display:flex}.zoom-control>span{margin-right:5px}.zoom-control button,.zoom-control strong{color:#bdc6ca;background:#10191e;border:1px solid #29363d;place-items:center;min-width:34px;height:34px;display:grid}.zoom-control button{cursor:pointer}.zoom-control strong{min-width:58px;font-family:var(--font-mono-ui);font-size:var(--text-secondary);font-weight:520}.zoom-control button:first-of-type{border-radius:5px 0 0 5px}.zoom-control button:nth-last-child(2){border-radius:0 5px 5px 0}.zoom-control button:last-child{border-radius:5px;margin-left:6px}.legend-bar{background:#081217;border-bottom:1px solid #1c292f;align-items:center;gap:24px;padding:0 20px;display:flex;overflow-x:auto}.legend-bar button,.legend-bar span{color:#b2bcc1;font-size:var(--text-secondary);white-space:nowrap;background:0 0;border:0;align-items:center;gap:7px;display:inline-flex}.legend-bar button{cursor:pointer;padding:0}.legend-bar button.muted{opacity:.4}.legend-line{border-radius:2px;width:24px;height:3px;display:inline-block}.legend-line.reference{background:var(--red)}.legend-line.compared{background:var(--blue)}.legend-line.overlap{background:#eef2f3}.legend-line.difference{background:var(--yellow)}.drawing-stage{background:#071015;min-height:0;position:relative;overflow:hidden}.drawing-canvas{cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;display:block}.drawing-stage.is-panning .drawing-canvas{cursor:grabbing}.drawing-stage.tool-measure .drawing-canvas{cursor:crosshair}.drawing-stage.tool-move .drawing-canvas{cursor:move}.drawing-stage.is-moving-drawing .drawing-canvas{cursor:grabbing}.grid-minor,.grid-major{fill:none;vector-effect:non-scaling-stroke}.grid-minor{stroke:#132129;stroke-width:.45px}.grid-major{stroke:#1c2d35;stroke-width:.7px}.axis-line{stroke:#52616a;stroke-width:.7px;stroke-dasharray:7 6;opacity:.55;vector-effect:non-scaling-stroke}.drawing-a,.drawing-b{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.45px;vector-effect:non-scaling-stroke}.drawing-a{stroke:var(--red);opacity:.93}.drawing-b{stroke:var(--blue);opacity:.92;mix-blend-mode:screen}.diff-box,.diff-line{fill:none;stroke:var(--yellow);vector-effect:non-scaling-stroke}.diff-box{fill:#f5c84205;stroke-width:1px;stroke-dasharray:5 4}.diff-line{stroke-width:.8px}.diff-label{fill:var(--yellow);font-family:var(--font-ui);paint-order:stroke;stroke:#071015;stroke-width:2px;stroke-linejoin:round;font-weight:720}.severity-large .diff-box,.severity-large .diff-line{stroke:var(--orange)}.severity-large .diff-label{fill:#ff9b58}.measurement-overlay{pointer-events:none}.measurement-line,.measurement-point{stroke:var(--yellow);vector-effect:non-scaling-stroke}.measurement-line{fill:none;stroke-width:1.2px;stroke-dasharray:5 3}.measurement-point{fill:#071015;stroke-width:1.2px}.measurement-label{fill:#fff1a8;font-family:var(--font-ui);paint-order:stroke;stroke:#071015;stroke-width:2px;stroke-linejoin:round;font-weight:720}.measurement-overlay.preview{opacity:.78}.snap-candidate{fill:#2f7df647;stroke:#73aaff;stroke-width:1.8px;vector-effect:non-scaling-stroke;pointer-events:none}.empty-stage{text-align:center;pointer-events:none;flex-direction:column;justify-content:center;align-items:center;padding:24px;display:flex;position:absolute;inset:0}.empty-icon{color:#6f8490;background:#0d1920;border:1px solid #30434d;border-radius:8px;place-items:center;width:58px;height:58px;margin-bottom:16px;display:grid}.empty-stage h1{color:#e1e7e9;margin:0;font-size:20px;font-weight:680}.empty-stage p{color:#7e8b92;max-width:420px;font-size:var(--text-control);margin:8px 0 18px;line-height:1.5}.empty-actions{pointer-events:auto;align-items:center;gap:8px;display:flex}.empty-actions .primary-button,.empty-actions .secondary-button{padding:0 13px}.canvas-tools{background:#10191eee;border:1px solid #2b383f;border-radius:6px;align-items:center;height:42px;padding:4px;display:flex;position:absolute;bottom:18px;left:50%;transform:translate(-50%)}.canvas-tools button{color:#94a1a7;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:4px;place-items:center;width:36px;height:32px;display:grid}.canvas-tools button:hover,.canvas-tools button.active{color:#fff;background:#154999;border-color:#2867bf}.canvas-tools button:disabled{color:#4d5b62;cursor:not-allowed;background:0 0;border-color:#0000}.summary-section{flex:none}.similarity-wrap{justify-content:center;padding:4px 0 12px;display:flex}.similarity-ring{border-radius:50%;place-items:center;width:128px;height:128px;display:grid;position:relative}.similarity-ring:after{content:"";background:#0e181d;border:1px solid #1d2a30;border-radius:50%;position:absolute;inset:10px}.similarity-ring>div{z-index:1;flex-direction:column;align-items:center;display:flex;position:relative}.similarity-ring strong{font-family:var(--font-mono-ui);font-size:24px}.similarity-ring span{color:#91a69a;font-size:var(--text-secondary)}.stats-list{border-top:1px solid #253239;padding-top:7px}.metric-row{color:#aeb8bd;min-height:30px;font-size:var(--text-secondary);justify-content:space-between;align-items:center;gap:10px;display:flex}.metric-row strong{color:#eef2f3;font-family:var(--font-mono-ui);font-size:var(--text-secondary);font-weight:620}.metric-row .tone-correct{color:var(--green)}.metric-row .tone-small{color:var(--yellow)}.metric-row .tone-large{color:#ff705f}.details-section{flex-direction:column;display:flex}.filter-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-bottom:10px;display:grid}.filter-tabs button{color:#bdc5c9;min-width:0;height:34px;font-size:var(--text-secondary);cursor:pointer;white-space:nowrap;text-overflow:ellipsis;background:#141f25;border:1px solid #2b383f;border-radius:5px;font-weight:650;overflow:hidden}.filter-tabs button.active{color:#fff;background:#123d79;border-color:#235aa3}.filter-tabs span{color:#7e8c93;font-family:var(--font-mono-ui)}.difference-header,.difference-row{grid-template-columns:minmax(0,1fr) 82px 26px;align-items:center;gap:6px;display:grid}.difference-header{color:#6f7c83;font-size:var(--text-caption);padding:0 3px 7px}.difference-header span:last-child{text-align:right}.difference-list{min-height:130px;max-height:360px;overflow-y:auto}.difference-row{color:#aeb8bd;min-height:38px;font-size:var(--text-secondary);border-top:1px solid #1e2a30;padding:0 3px;transition:background .15s,box-shadow .15s}.difference-row>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.difference-row strong{text-align:right;font-family:var(--font-mono-ui);font-size:var(--text-secondary);font-weight:580}.difference-row svg{justify-self:end}.difference-row.is-focused{background:#122333;box-shadow:inset 2px 0 #4c93ff}.difference-focus{color:currentColor;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:4px;justify-self:end;place-items:center;width:26px;height:26px;padding:0;display:grid}.difference-focus:hover,.difference-focus:focus-visible{color:#fff;background:#1a2c37;border-color:#446174}.difference-mark.is-focused .diff-box{stroke-width:2px;animation:.85s ease-out 2 difference-focus-pulse}@keyframes difference-focus-pulse{0%{fill:#4c93ff1a;stroke:#8fc0ff}to{fill:#f5c84205}}.difference-row.severity-correct{color:var(--green)}.difference-row.severity-small{color:var(--yellow)}.difference-row.severity-large{color:#ff745f}.empty-list{color:#65737a;text-align:center;min-height:124px;font-size:var(--text-secondary);flex-direction:column;justify-content:center;align-items:center;gap:9px;padding:16px;line-height:1.5;display:flex}.geometry-section{flex:none}.geometry-head,.geometry-row{grid-template-columns:minmax(0,1fr) 76px 76px;align-items:center;gap:6px;display:grid}.geometry-head{color:#65737a;font-size:var(--text-caption);padding-bottom:5px}.geometry-head b,.geometry-row b{text-align:right}.geometry-head b:first-of-type{color:var(--red)}.geometry-head b:last-child{color:#6fa3ff}.geometry-row{color:#9eaaaf;min-height:30px;font-size:var(--text-caption);border-top:1px solid #1d282e}.geometry-row b{color:#ccd4d8;font-family:var(--font-mono-ui);font-size:var(--text-caption);font-weight:520}.report-button{color:#c9d0d4;background:#172127;border:1px solid #334148;flex:0 0 44px;margin:12px 14px}.report-button:hover:not(:disabled){color:#fff;background:#174a8b;border-color:#3978d3}@media (width<=1240px){.topbar{grid-template-columns:280px minmax(0,1fr) auto}.brand-subtitle{display:none}.app-grid{grid-template-columns:280px minmax(420px,1fr) 320px}.top-actions button{padding:0 8px}.legend-bar{gap:16px}}@media (width<=1020px){.topbar{grid-template-columns:220px minmax(0,1fr) auto}.top-actions button{width:34px;padding:0;font-size:0}.top-actions button svg{width:17px}.app-grid{grid-template-columns:250px minmax(390px,1fr) 292px}.view-tabs button{justify-content:center;width:34px;padding:0;font-size:0}}@media (width<=860px){.flow-app{overflow:auto}.topbar{grid-template-columns:minmax(160px,1fr) auto auto;position:sticky;top:0}.app-grid{grid-template-rows:minmax(560px,72vh) auto auto;grid-template-columns:1fr;height:auto;min-height:calc(100vh - 60px)}.workspace-panel{grid-row:1;height:72vh;min-height:560px}.side-panel{height:auto;overflow:visible}.left-panel,.right-panel{border:0}.left-panel{border-top:1px solid var(--border);grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;display:grid}.left-panel .panel-section{border-right:1px solid var(--border);height:100%}.right-panel{display:block}.right-panel-scroll{border-top:1px solid var(--border);grid-template-columns:280px minmax(300px,1fr) minmax(280px,1fr);align-items:start;display:grid;overflow:visible}.report-button{width:calc(100% - 28px)}}@media (width<=640px){.topbar{grid-template-columns:minmax(0,1fr) auto;padding:0 10px}.top-actions{justify-content:flex-end}.top-tools{display:none}.brand-logo{width:148px;height:32px}.workspace-panel{grid-template-rows:52px 42px minmax(0,1fr)}.workspace-toolbar{padding:0 8px}.zoom-control>span,.zoom-control strong{display:none}.legend-bar{gap:14px;padding:0 12px}.empty-actions{flex-direction:column}.left-panel,.right-panel,.right-panel-scroll{display:block}.left-panel .panel-section{border-right:0}.canvas-tools{bottom:10px}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition:none!important}.difference-mark.is-focused .diff-box{animation:none}}
