:root{--ink:#16221f;--paper:#f2efe6;--acid:#e9ff4b;--orange:#ff5d36;--muted:#78817c;--grid:#d8d8ca}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:Arial,"PingFang SC","Microsoft YaHei",sans-serif;min-height:100vh}.masthead{display:flex;justify-content:space-between;align-items:flex-end;padding:32px 4vw 26px;border-bottom:2px solid var(--ink)}.eyebrow,.section-no{font-family:"Courier New",monospace;font-size:11px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;margin:0 0 13px}.masthead h1{font-size:clamp(45px,6vw,84px);line-height:.79;letter-spacing:-.08em;margin:0}.masthead h1 em{font-style:normal;color:var(--orange)}.intro{font-size:14px;line-height:1.7;text-align:right;margin:0;max-width:310px}main{display:grid;grid-template-columns:minmax(0,1fr) 380px;min-height:calc(100vh - 192px)}.board-shell{border-right:2px solid var(--ink);min-width:0}.toolbar{height:62px;display:flex;align-items:center;gap:22px;padding:0 22px;border-bottom:1px solid var(--ink)}.mode-switch{display:flex;border:1px solid var(--ink);padding:3px}.mode{border:0;background:transparent;padding:7px 12px;color:var(--ink);cursor:pointer;font-weight:700}.mode.active{background:var(--ink);color:var(--acid)}.toolbar p{font-size:12px;color:var(--muted);margin:0;flex:1}.text-button{background:transparent;border:0;text-decoration:underline;cursor:pointer}.canvas-wrap{position:relative;height:calc(100vh - 254px);min-height:480px;background-color:#e7e6da;background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);background-size:30px 30px;overflow:hidden}#map{width:100%;height:100%;display:block;touch-action:none}.edge-hit{stroke:transparent;stroke-width:22;cursor:pointer}.edge{stroke:#64706b;stroke-width:4;fill:none;transition:.2s}.edge.blocked{stroke:#a39e91;stroke-dasharray:10 10}.edge.selected{stroke:var(--orange);stroke-width:6}.weight-label{font:700 13px "Courier New",monospace;fill:var(--ink);paint-order:stroke;stroke:#e7e6da;stroke-width:6px}.route{stroke:var(--acid);stroke-width:11;fill:none;stroke-linecap:round;filter:url(#glow);marker-end:url(#arrow);pointer-events:none}.node{cursor:grab}.node:active{cursor:grabbing}.node circle{fill:var(--paper);stroke:var(--ink);stroke-width:3}.node .ring{fill:none;stroke:var(--orange);stroke-width:4}.node.route-node circle{fill:var(--acid)}.node.edge-source circle{stroke:var(--orange);stroke-width:7}.node text{font-size:14px;font-weight:800;text-anchor:middle;paint-order:stroke;stroke:var(--paper);stroke-width:5px}.node text.number{font:700 12px "Courier New",monospace;stroke:none;fill:var(--ink)}.legend{position:absolute;left:20px;bottom:18px;background:rgba(242,239,230,.94);border:1px solid var(--ink);display:flex;gap:15px;padding:9px 12px;font:11px "Courier New",monospace}.legend span{display:flex;align-items:center;gap:6px}.dot{width:9px;height:9px;border-radius:50%;border:2px solid var(--ink)}.dot.start{background:var(--acid)}.dot.end{border-color:var(--orange)}.line{width:20px;height:4px;background:var(--acid);border:1px solid var(--ink)}.control-panel{background:#faf8f0}.run-card,.edge-editor,.journal{padding:23px 25px;border-bottom:1px solid var(--ink)}label{font-size:12px;font-weight:700;display:block}select,input[type=text],dialog input{display:block;width:100%;border:1px solid var(--ink);background:#fffdf5;border-radius:0;padding:10px;margin-top:7px;color:var(--ink)}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:20px}input[type=range]{display:block;width:100%;accent-color:var(--orange);margin-top:9px}.primary{width:100%;margin-top:20px;background:var(--ink);color:var(--acid);border:1px solid var(--ink);padding:15px 16px;display:flex;justify-content:space-between;font-weight:800;font-size:14px;cursor:pointer}.primary:hover{background:var(--orange);color:white}.primary:disabled{opacity:.45;cursor:not-allowed}.status{font:11px "Courier New",monospace;color:var(--muted);margin:10px 0 0}.section-head{display:flex;align-items:center;justify-content:space-between}.section-head .section-no{margin:0}.section-head button{border:0;background:none;font-size:25px;cursor:pointer}.edge-editor{background:var(--acid)}.edge-editor h2{font-size:23px;margin:15px 0 18px}.check{display:flex;align-items:center;gap:8px;margin-top:18px}.check input{width:20px;height:20px;accent-color:var(--orange)}.danger{margin-top:18px;background:transparent;border:0;padding:0;text-decoration:underline;color:#a32c1d;cursor:pointer}.journal{border:0}.journal ol{list-style:none;padding:0;margin:18px 0}.step{border-top:1px solid #b9b9ae}.step summary{display:grid;grid-template-columns:28px 1fr auto;gap:8px;align-items:center;padding:14px 0;cursor:pointer;font-size:13px}.step-no{font:700 11px "Courier New",monospace;color:var(--orange)}.step-arrow{color:var(--muted)}.choice-list{padding:0 0 12px 36px}.choice{display:grid;grid-template-columns:1fr auto;gap:10px;font:12px "Courier New",monospace;margin:8px 0}.choice b{font-weight:400}.bar{height:3px;background:#d4d2c8;grid-column:1/-1}.bar i{display:block;height:100%;background:var(--orange)}.choice.picked{font-weight:800}.empty{text-align:center;color:var(--muted);padding:35px 20px}.empty span{display:inline-grid;place-items:center;border:1px solid var(--muted);width:42px;height:42px;border-radius:50%;font:24px Georgia}.empty p{font-size:12px;line-height:1.6}.route-stop{background:var(--ink);color:white;padding:12px;margin-top:8px;font-size:12px}footer{height:54px;border-top:2px solid var(--ink);display:flex;justify-content:space-between;align-items:center;padding:0 4vw;font:11px "Courier New",monospace}dialog{border:2px solid var(--ink);border-radius:0;background:var(--paper);padding:0;width:min(400px,calc(100vw - 30px));box-shadow:12px 12px 0 var(--orange)}dialog::backdrop{background:rgba(22,34,31,.65)}dialog form{padding:25px}dialog form>div{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}.small{width:auto;margin:0;padding:10px 15px}.cancel{border:0;background:transparent;cursor:pointer}
.node.start-node circle{fill:var(--acid)}
@media(max-width:850px){.masthead{align-items:flex-start}.intro{display:none}main{display:block}.board-shell{border-right:0;border-bottom:2px solid var(--ink)}.canvas-wrap{height:58vh;min-height:390px}.control-panel{display:grid;grid-template-columns:1fr 1fr}.journal{grid-column:1/-1}.edge-editor{grid-column:1/-1}.toolbar p{display:none}footer{display:none}}
@media(max-width:560px){.masthead{padding:24px 18px 20px}.masthead h1{font-size:46px}.toolbar{padding:0 10px;gap:5px}.mode{padding:7px 8px;font-size:11px}.text-button{margin-left:auto}.canvas-wrap{height:52vh;min-height:360px}.control-panel{display:block}.legend{left:10px;bottom:10px;flex-wrap:wrap}.run-card,.edge-editor,.journal{padding:20px 18px}}
