.page-map{position:fixed;inset:0;z-index:30;display:flex;flex-direction:column;background:#11151d;color:#e8ecf5;font:13px 'DM Sans',sans-serif;animation:fade-reveal 180ms ease}
.map-header{height:80px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid #2b3140;background:#171c26;gap:20px;z-index:3}
.map-heading{display:flex;align-items:center;gap:14px;min-width:0}.map-heading>.icon{width:24px;height:24px;color:#a4b2ff}.map-heading strong{font-size:16px;font-weight:600}.map-heading small{display:block;color:#8993a9;font-size:11px;margin-top:3px}.map-heading>span{font-size:11px;color:#a1abc0;border:1px solid #343c50;border-radius:20px;padding:4px 9px;margin-left:10px;white-space:nowrap}
.map-actions{display:flex;align-items:center;gap:8px}.map-button{border:1px solid #343c50;background:#202736;color:#dae1f1;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:9px 12px;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap;transition:background 150ms,border-color 150ms,transform 150ms}.map-button .icon{width:16px;height:16px}.map-button:hover{background:#2e374b;border-color:#55607b}.map-button:active{transform:scale(.97)}.map-button:disabled{opacity:.35;cursor:default}.map-primary{background:#7184f5;border-color:#8293fc;color:#0e1429;font-weight:600}.map-primary:hover{background:#95a4ff;border-color:#a8b3ff}.map-danger{color:#fca9b0}.map-button:focus-visible,.map-socket:focus-visible,.map-node-header:focus-visible,.map-wire-hit:focus-visible,.map-edit:focus-visible,.map-node-settings:focus-visible{outline:2px solid #b8c2ff;outline-offset:4px}
.map-viewport{position:relative;flex:1;min-height:0;overflow:hidden;touch-action:none;outline:none;cursor:grab;background-image:radial-gradient(#394155 1px,transparent 1px);background-size:24px 24px}.map-viewport.gesturing{cursor:grabbing}.map-world{position:absolute;left:0;top:0;width:1px;height:1px;transform-origin:0 0;will-change:transform}.map-wires{position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;z-index:1}.map-nodes{position:absolute;left:0;top:0;z-index:2}.map-wire-line{fill:none;stroke:#7d90dd;stroke-width:2.5;pointer-events:none}.map-wire-hit{fill:none;stroke:transparent;stroke-width:18;cursor:pointer;pointer-events:stroke}.map-edge:hover .map-wire-line,.map-edge.selected .map-wire-line{stroke:#c3ccff;stroke-width:4;filter:drop-shadow(0 0 5px #7e91ff88)}.map-wire-draft{fill:none;stroke:#bdc8ff;stroke-width:2.5;stroke-dasharray:8 6;pointer-events:none}
.map-node{position:absolute;width:272px;box-sizing:border-box;background:#202735;border:1px solid #3c465b;border-radius:13px;box-shadow:0 12px 32px #0005;color:#e8ecf5;user-select:none}.map-node.current{border-color:#7c8ee9}.map-node.drop-target{outline:3px solid #9cafff;box-shadow:0 0 30px #8b9cff44}.map-node.connecting{border-color:#b3c0ff}.map-node-header{height:72px;box-sizing:border-box;display:flex;align-items:center;padding:14px 15px;gap:10px;cursor:grab;border-bottom:1px solid #343e52;border-radius:13px 13px 0 0;background:#252e40}.map-node-header:active{cursor:grabbing}.map-page-icon{width:29px;height:34px;border:1px solid #6174b6;border-radius:6px;display:grid;place-items:center;color:#b3c0ff;background:#34446b;flex:none}.map-page-icon .icon{width:17px;height:17px}.map-node-header>div{min-width:0;flex:1}.map-node-header strong{display:block;font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.map-node-header small{display:block;color:#97a4bc;font-size:10px;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.map-home{color:#bad9c8;font-size:9px;background:#344f45;border-radius:5px;padding:3px 6px;flex:none}.map-node-settings{border:0;padding:4px;color:#97a4bc;background:transparent;cursor:pointer;display:grid;place-items:center}.map-node-settings .icon{width:14px;height:14px}
.map-node-meta{height:52px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.map-node-meta>span{font-size:10px;color:#8f9bb2}.map-edit{font:inherit;font-size:11px;border:0;background:transparent;color:#b8c4ff;cursor:pointer;display:flex;gap:6px;align-items:center}.map-edit .icon{width:13px;height:13px}.map-edit:hover{color:white}.map-link-heading{height:24px;padding:0 16px;box-sizing:border-box;font-size:8px;letter-spacing:1.5px;color:#8c9ab5;display:flex;align-items:center}.map-link-row{height:40px;box-sizing:border-box;padding:0 18px 0 16px;display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #303a4e}.map-link-row span{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.map-link-row small{font-size:9px;color:#a1afc9;max-width:98px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.map-new-link{height:48px;border-top:1px solid #3a455b;box-sizing:border-box;display:flex;align-items:center;gap:8px;padding:0 16px;font-size:11px;color:#bec9ff}.map-new-link>.icon{width:13px;height:13px}.map-more-links{height:24px;padding:5px 16px;font-size:9px;color:#9ba8bf;box-sizing:border-box}.map-socket{position:absolute;width:16px;height:16px;box-sizing:border-box;border:3px solid #252e40;border-radius:50%;background:#90a5ff;box-shadow:0 0 0 1px #7488cd;cursor:crosshair;padding:0;z-index:4;touch-action:none;transition:box-shadow 130ms,background 130ms}.map-socket:hover{background:#d3dcff;box-shadow:0 0 0 3px #91a7ff55}.map-input{left:-8px;top:88px;background:#b8c4e5}.map-output{right:-8px}.map-new-link .map-output{bottom:16px}
.map-empty-hint{position:absolute;bottom:34px;left:50%;transform:translateX(-50%);color:#818ea9;font-size:12px;pointer-events:none;text-align:center;width:260px;line-height:1.6}.map-empty-hint[hidden]{display:none}.map-footer{height:58px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:#171c26;border-top:1px solid #2b3140;z-index:3}.map-instructions{font-size:11px;color:#8993a9}.map-zoom{display:flex;align-items:center;gap:8px}.map-zoom>span{min-width:43px;text-align:center;font-size:11px;color:#acb7ce}.map-zoom .map-button{padding:6px 10px}.map-status{position:absolute;left:28px;bottom:72px;color:#b4c2eb;background:#1d2639e8;border:1px solid #394867;border-radius:7px;font-size:11px;max-width:calc(100% - 56px);padding:8px 12px;pointer-events:none;z-index:4}.map-status:empty{display:none}
.map-panel{position:absolute;right:18px;top:98px;width:300px;max-height:calc(100% - 182px);overflow:auto;box-sizing:border-box;border:1px solid #45516b;background:#202837;border-radius:13px;padding:18px;color:#d8e0f3;box-shadow:0 15px 50px #0008;z-index:5;animation:panel-reveal 180ms ease}.map-panel[hidden]{display:none}.map-panel>header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:20px}.map-panel>header strong{font-size:14px;font-weight:500}.map-panel>header .map-button{padding:5px;background:transparent;border:0}.map-panel label{display:block;margin:14px 0}.map-panel label>span{display:block;margin-bottom:7px;font-size:11px;color:#a4b2cc}.map-panel input,.map-panel select{width:100%;box-sizing:border-box;min-width:0;min-height:37px;font:inherit;font-size:12px;border:1px solid #475570;border-radius:6px;padding:9px 10px;background:#151d2b;color:#e2e9fb;outline:none}.map-panel input:focus,.map-panel select:focus{border-color:#94a8ff;box-shadow:0 0 0 2px #94a8ff22}.map-panel input[type=color]{padding:3px;height:38px}.map-panel p{color:#9eacc8;font-size:11px;line-height:1.6;margin:14px 0}.map-panel p strong{color:#d6dffa}.map-panel form>.map-button{width:100%;margin:8px 0}.map-page-operations{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px;border-top:1px solid #3a465e;padding-top:16px}
@media(max-width:700px){.map-header{height:68px;padding:0 12px;gap:8px}.map-heading{gap:8px}.map-heading>.icon,.map-heading small,.map-heading>span{display:none}.map-heading strong{font-size:13px;white-space:nowrap}.map-actions{gap:5px}.map-actions .map-button{padding:8px}.map-actions [data-map-action=save] span{display:none}.map-actions [data-map-action=undo],.map-actions [data-map-action=redo]{display:none}.map-footer{height:48px;padding:0 12px}.map-instructions{max-width:150px;line-height:1.5;font-size:9px}.map-panel{top:80px;right:10px;width:min(300px,calc(100% - 20px));max-height:calc(100% - 146px)}.map-status{left:12px;bottom:60px;max-width:calc(100% - 24px)}}
@media(prefers-reduced-motion:reduce){.page-map,.map-panel{animation:none}.map-button,.map-socket{transition:none}}
