:root{--bg:#eef1f4;--surface:#fff;--surface-strong:#f8fafc;--text:#20242c;--muted:#647084;--border:#cfd6df;--border-strong:#9aa8b7;--control:#f7f9fb;--control-hover:#e8edf2;--accent:#0d6b7d;--accent-soft:#d7edf1;--danger:#b42318;--danger-soft:#fee4df;--shadow:0 14px 40px #1f293724;color:var(--text);background:var(--bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html,body,#app{min-width:320px;min-height:100svh;margin:0}body{overflow:hidden}button,input,select{font:inherit;letter-spacing:0}button{border:0}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,.stop-node:focus-visible,.legend-entry:focus-visible{outline-offset:2px;outline:3px solid #0d6b7d59}.app-shell{flex-direction:column;height:100svh;min-height:100svh;display:flex;overflow:hidden}.app-shell.is-visualizing{background:#fff}.toolbar{border-bottom:1px solid var(--border);background:var(--surface);justify-content:space-between;align-items:center;gap:16px;min-height:64px;padding:10px 14px;display:flex;box-shadow:inset 0 1px #ffffffe6}.toolbar-title{white-space:nowrap;align-items:baseline;gap:10px;min-width:148px;display:flex}.toolbar-title strong{font-size:17px}.toolbar-title span{color:var(--muted);font-size:13px}.tool-groups,.tool-group{align-items:center;gap:8px;display:flex}.tool-groups{flex-wrap:wrap;justify-content:flex-end}.tool-group{border-left:1px solid var(--border);padding-left:8px}.tool-group:first-child{border-left:0;padding-left:0}.tool-button,.plain-action{border:1px solid var(--border);background:var(--control);min-height:36px;color:var(--text);cursor:pointer;border-radius:6px;justify-content:center;align-items:center;gap:7px;font-size:14px;font-weight:650;line-height:1;transition:background .14s,border-color .14s,color .14s;display:inline-flex}.tool-button{padding:0 11px}.tool-button svg{flex:none;width:17px;height:17px}.tool-button.icon-only{width:36px;padding:0}.tool-button:hover:not(:disabled),.plain-action:hover:not(:disabled){border-color:var(--border-strong);background:var(--control-hover)}.tool-button[aria-pressed=true]{background:var(--accent-soft);color:#064f5e;border-color:#89bfca}.tool-button.danger,.plain-action.danger{color:var(--danger)}.tool-button.danger:hover:not(:disabled),.plain-action.danger:hover:not(:disabled){background:var(--danger-soft);border-color:#f1a29a}.tool-button:disabled,.plain-action:disabled{cursor:not-allowed;opacity:.48}.workspace{flex:1;grid-template-columns:minmax(0,1fr) 340px;min-height:0;display:grid;overflow:hidden}.app-shell.is-visualizing .workspace{background:#fff;flex:0 0 100svh;width:100vw;height:100svh;display:flex}.map-region{justify-content:center;align-items:center;min-width:0;min-height:0;padding:18px;display:flex;overflow:hidden}.app-shell.is-visualizing .map-region{background:#fff;width:100vw;height:100svh;padding:0}.map-canvas{aspect-ratio:16/9;border:1px solid var(--border-strong);width:min(100%,177.778svh - 177.778px);max-width:100%;max-height:calc(100svh - 100px);box-shadow:var(--shadow);touch-action:none;background:#fbfbf8;border-radius:8px}.app-shell.is-visualizing .map-canvas{width:min(100vw,177.778svh);max-width:100vw;max-height:100svh;box-shadow:none;pointer-events:none;background:#fff;border:0;border-radius:0}.map-canvas.is-editing{cursor:crosshair}.map-canvas.is-dragging{cursor:grabbing}.map-background{fill:#fbfbf8}.app-shell.is-visualizing .map-background{fill:#fff}.grid-layer{pointer-events:none}.grid-layer line{stroke:#d9dedf;stroke-width:1px}.grid-layer line.major{stroke:#bcc8ca;stroke-width:1.4px}.line-hit-target{cursor:pointer;pointer-events:stroke}.subway-line{pointer-events:stroke;transition:opacity .18s,stroke .18s,stroke-width .12s}.subway-line.selected{filter:drop-shadow(0 0 5px #11182747)}.line-segment.dimmed{opacity:.72}.line-segment.highlighted{opacity:1}.stop-node{cursor:grab}.stop-node circle{transition:fill .18s,stroke .18s}.stop-node:active,.legend-entry:active{cursor:grabbing}.stop-node .selection-ring{fill:none;stroke:#0d6b7dbf;stroke-dasharray:5 5;stroke-width:3px}.invisible-hit-target{fill:#0000;stroke:#0000;pointer-events:fill}.legend-layer{cursor:default}.legend-title{fill:#26313f;paint-order:stroke;pointer-events:none;stroke:#fbfbf8;stroke-linejoin:round;stroke-width:5px;font-size:24px;font-weight:800}.legend-box{fill:none;pointer-events:none}.legend-entry{cursor:grab}.legend-name{fill:#26313f;paint-order:stroke;pointer-events:none;stroke:#fbfbf8;stroke-linejoin:round;stroke-width:4px;text-anchor:middle;font-size:16px;font-weight:700}.legend-hit-target{fill:#0000;pointer-events:all;stroke:#0000}.legend-selection{fill:#0d6b7d1f;stroke:#0d6b7dcc;stroke-dasharray:6 4;stroke-width:2px}.visual-hotspot{z-index:20;justify-content:flex-end;align-items:flex-start;width:72px;height:72px;padding:10px;display:flex;position:fixed;top:0;right:0}.visual-exit-button{color:#20242c;cursor:pointer;opacity:0;background:#ffffffe6;border:1px solid #9aa8b780;border-radius:6px;justify-content:center;align-items:center;width:34px;height:34px;transition:background .14s,border-color .14s,opacity .14s;display:inline-flex}.visual-hotspot:hover .visual-exit-button,.visual-exit-button:focus-visible{opacity:1}.visual-exit-button:hover{border-color:var(--border-strong);background:#fff}.visual-exit-button svg{width:17px;height:17px}.visual-group-list{z-index:15;pointer-events:auto;gap:8px;min-width:180px;display:grid;position:fixed;bottom:20px;right:20px}.visual-group-button{color:#26313f;cursor:pointer;text-align:left;background:#ffffffb8;border:1px solid #606e8066;border-radius:10px;min-height:38px;padding:0 14px;font-size:14px;font-weight:800;line-height:1.1;transition:background .14s,border-color .14s,box-shadow .14s}.visual-group-button:hover,.visual-group-button:focus-visible,.visual-group-button.active{background:#fff;border-color:#0d6b7dcc;box-shadow:0 8px 24px #1f293724}.inspector{border-left:1px solid var(--border);background:var(--surface);min-height:0;max-height:100%;padding:16px;overflow-y:auto}.panel-section{border-top:1px solid var(--border);padding:16px 0}.panel-section:first-child{border-top:0;padding-top:0}.panel-section h2{color:#2a313b;margin:0 0 12px;font-size:15px;line-height:1.2}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.form-grid label{gap:5px;min-width:0;display:grid}.form-grid label.wide,.form-grid .wide,.form-grid .plain-action,.meta-line{grid-column:1/-1}.form-grid span,.meta-line{color:var(--muted);font-size:12px;font-weight:700;line-height:1.2}.form-grid input,.form-grid select{border:1px solid var(--border);background:var(--surface-strong);width:100%;min-height:34px;color:var(--text);border-radius:6px;padding:6px 8px;font-size:14px;line-height:1.2}.form-grid input[type=color]{min-width:0;padding:3px}.plain-action{padding:0 12px}.meta-line{margin:0}.empty-state{color:var(--muted);margin:0;font-size:13px}.stop-groups{gap:7px;display:grid}.membership-list{gap:6px;display:grid}.membership-row{align-items:center;gap:8px;min-height:28px;display:flex!important}.membership-row input{width:16px;min-height:16px}.membership-row span{color:var(--text);font-size:13px}.group-editor{gap:10px;display:grid}.group-row{border:1px solid var(--border);background:var(--surface-strong);border-radius:6px;grid-template-columns:minmax(0,1fr) 78px 74px;align-items:end;gap:8px;padding:8px;display:grid}.group-row label{gap:5px;min-width:0;display:grid}.group-row span{color:var(--muted);font-size:12px;font-weight:700;line-height:1.2}.group-row input{border:1px solid var(--border);background:var(--surface);width:100%;min-height:34px;color:var(--text);border-radius:6px;padding:6px 8px;font-size:14px;line-height:1.2}.group-row .plain-action{min-height:34px;padding:0 10px}details{border-top:1px solid var(--border);padding:10px 0}details:first-of-type{border-top:0;padding-top:0}summary{cursor:pointer;margin-bottom:10px;font-size:13px;font-weight:800;list-style-position:outside}.node-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.checkbox-row{align-content:end;align-items:center;gap:8px;min-height:34px;display:flex}.checkbox-row input{width:17px;min-height:17px}.checkbox-row span{color:var(--text)}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}@media (width<=980px){body{overflow:auto}.toolbar{flex-direction:column;align-items:flex-start}.tool-groups{justify-content:flex-start}.workspace{grid-template-rows:minmax(320px,1fr) auto;grid-template-columns:1fr}.map-region{min-height:360px;padding:12px}.map-canvas{width:min(100%,177.778svh - 298.667px);max-height:calc(100svh - 168px)}.inspector{border-top:1px solid var(--border);border-left:0;max-height:none}}@media (width<=620px){.tool-group{border-left:0;padding-left:0}.tool-button span:not(.sr-only){display:none}.tool-button{width:36px;padding:0}.form-grid{grid-template-columns:1fr}}
