:root{--bg:#0f1419;--panel:#1a2332;--text:#e7e9ea;--muted:#8b98a5;--accent:#1d9bf0;--warn:#f7931a;--danger:#f4212e}*{box-sizing:border-box}body,html{margin:0;padding:0;background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;min-height:100%}a{color:var(--accent)}.layout{width:100%;max-width:none;margin:0;padding:1rem clamp(.75rem,2vw,2.25rem);position:relative}.app-busy-card{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:1.25rem 1.75rem;max-width:min(90vw,22rem);border-radius:12px;background:var(--panel);border:1px solid hsla(0,0%,100%,.1);box-shadow:0 12px 40px rgba(0,0,0,.5);pointer-events:auto}.segment-pick-row{position:relative;z-index:1}.app-busy-spinner{width:44px;height:44px;border-radius:50%;border:3px solid hsla(0,0%,100%,.12);border-top:3px solid var(--accent);animation:app-busy-spin .75s linear infinite}.app-busy-label{font-size:.95rem;color:var(--text)}@keyframes app-busy-spin{to{transform:rotate(1turn)}}.grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,min(22vw,400px));grid-gap:1.25rem;gap:1.25rem;align-items:start}@media (max-width:1100px){.grid{grid-template-columns:1fr}}.panel{background:var(--panel);border-radius:10px;padding:1rem;border:1px solid hsla(0,0%,100%,.06)}h1{font-size:1.35rem;font-weight:600;margin:0 0 .35rem}.sub{color:var(--muted);font-size:.9rem;margin:0 0 1rem}.row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:.75rem}.btn,button{background:var(--accent);color:#fff;border:none;padding:.45rem .85rem;border-radius:6px;cursor:pointer;font-size:.875rem}button.secondary{background:#38444d}button:disabled{opacity:.5;cursor:not-allowed}input[type=number],input[type=text],select{background:#0f1419;border:1px solid #38444d;color:var(--text);padding:.35rem .5rem;border-radius:6px;font-size:.875rem}.issue-list{list-style:none;padding:0;margin:0;max-height:42vh;overflow:auto}.issue-list li{padding:.55rem 0;border-bottom:1px solid hsla(0,0%,100%,.06);font-size:.82rem}.issue-kind{display:inline-block;padding:.1rem .35rem;border-radius:4px;font-size:.7rem;text-transform:uppercase;margin-right:.35rem}.kind-junction{background:#7856ff}.kind-crossing{background:var(--danger)}.kind-gap{background:var(--warn)}.kind-open_end{background:#536471}.pdf-stage{width:100%}.pdf-stage-scroll.canvas-wrap{width:100%;height:min(82vh,860px);max-height:min(82vh,860px)}.canvas-wrap{position:relative;background:#fff;border-radius:8px;overflow:auto;max-height:min(82vh,860px)}.canvas-wrap canvas{display:block}.three-wrap{height:360px;border-radius:8px;overflow:hidden;background:#0b1522}.badge{display:inline-block;padding:.2rem .5rem;border-radius:4px;background:#38444d;font-size:.78rem;margin-right:.35rem}.analyze-status-row{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;margin-bottom:.5rem;min-height:1.25rem}.analyze-status-text{font-size:.8rem;color:var(--muted)}.analyze-status-text--active{color:var(--accent)}.analyze-meta{font-size:.75rem;color:var(--muted);background:rgba(56,68,77,.35);border:1px solid hsla(0,0%,100%,.08);border-radius:4px;padding:.1rem .35rem}.analyze-progress{flex:1 1;min-width:120px;max-width:360px;height:5px;background:rgba(56,68,77,.85);border-radius:3px;overflow:hidden}.analyze-progress--hidden{visibility:hidden}.analyze-progress-bar{height:100%;border-radius:3px;background:linear-gradient(90deg,var(--accent),#7c5cff);animation:analyze-progress-indet 1.1s ease-in-out infinite}.analyze-progress-bar--determinate{animation:none;transition:width .2s linear}@keyframes analyze-progress-indet{0%{transform:translateX(-120%)}to{transform:translateX(340%)}}.debug-console-fab{position:fixed;z-index:10050;right:14px;bottom:14px;width:44px;height:44px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:10px;border:1px solid hsla(0,0%,100%,.12);background:var(--panel);color:var(--text);cursor:pointer;box-shadow:0 4px 18px rgba(0,0,0,.45)}.debug-console-fab--debug{right:64px;width:52px;font-size:10px;font-weight:700;letter-spacing:.04em;color:#9fe1ff}.debug-console-fab--debug.is-active{background:#1b3558;border-color:#5ea3ff;color:#d6e9ff}.debug-console-fab--verbose{right:122px;width:58px;font-size:10px;font-weight:700;letter-spacing:.04em;color:#c8f7a6}.debug-console-fab--verbose.is-active{background:#21462a;border-color:#4ea85f;color:#d4ffdb}.debug-console-fab:hover{background:#243044;color:var(--accent)}.debug-console-panel{position:fixed;z-index:10060;left:0;right:0;bottom:0;height:0;overflow:hidden;display:flex;flex-direction:column;background:#0b0f14;border-top:1px solid hsla(0,0%,100%,.1);box-shadow:0 -8px 32px rgba(0,0,0,.5);transition:height .22s ease-out}.debug-console-panel--open{height:min(50vh,480px)}.debug-console-head{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:.35rem .55rem;background:rgba(26,35,50,.98);border-bottom:1px solid hsla(0,0%,100%,.06)}.debug-console-title{font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.debug-console-actions{display:flex;gap:.35rem}.debug-console-btn{font-size:.68rem;padding:.2rem .45rem;border-radius:4px;border:none;cursor:pointer;background:#38444d;color:var(--text)}.debug-console-btn:hover{background:#4a5b68}.debug-console-body{flex:1 1;margin:0;padding:.4rem .55rem .55rem;overflow:auto;font-family:ui-monospace,Cascadia Code,Segoe\.UI Mono,Consolas,monospace;font-size:11px;line-height:1.4;color:#b8c2cc;white-space:pre-wrap;word-break:break-word}.debug-console-line{border-left:2px solid transparent;padding-left:.35rem;margin-bottom:.1rem}.debug-console-line:nth-child(5n){border-left-color:rgba(29,155,240,.35)}.debug-console-empty{color:var(--muted);font-style:italic}