.wf-route-editor{max-width:1100px;margin:24px auto;padding:0 16px}.wf-route-editor section{margin:24px 0;padding:20px;border:1px solid #ccd2db;border-radius:8px}.wf-route-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin-bottom:20px}.wf-route-fields label{display:flex;flex-direction:column;gap:6px}.wf-route-fields input,.wf-route-fields select{max-width:100%;padding:8px}.wf-route-tools{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.wf-route-map{position:relative;background:#efe8d5;border:1px solid #8b8170;aspect-ratio:16/9;overflow:hidden;margin:16px 0}.wf-route-map:has(img:not([hidden])){aspect-ratio:auto}.wf-route-map img{width:100%;display:block}.wf-route-map img[hidden]{display:none}.wf-route-map svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.wf-route-map line{stroke:#273955;stroke-width:3;vector-effect:non-scaling-stroke}.wf-route-map line.wf-map-blocked{stroke-dasharray:7 5;stroke:#737373}.wf-route-map circle{fill:#fff;stroke:#273955;stroke-width:2;vector-effect:non-scaling-stroke}.wf-route-map text{fill:#192a45;paint-order:stroke;stroke:#fff;stroke-width:3px;font:bold 14px system-ui;pointer-events:none}.wf-route-map [data-map-node]{cursor:grab;touch-action:none;outline:none}.wf-route-map [data-map-node]:focus circle{stroke:#006ac0;stroke-width:4}.wf-route-map [data-map-edge]{cursor:pointer}.wf-route-map .wf-map-player{fill:#ffc44e;stroke:#1a2638;stroke-width:3}.wf-route-error{color:#a12626}.wf-map-dialog{width:min(900px,92vw);max-height:90vh;border:1px solid #8a94a4;border-radius:12px;padding:20px}.wf-map-dialog::backdrop{background:#17243699}.wf-route-blocked{font-size:.9em}.wayfarer-action-list button.wf-route-choice{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px}.wf-route-choice:not(:disabled) small{white-space:nowrap}.wf-route-choice small{font-size:.85em;font-weight:normal}

.wf-route-map [data-map-node].wf-map-selected circle{stroke:#b34717;stroke-width:4}.wf-route-tools [data-map-remove]:disabled{opacity:.45;cursor:not-allowed}

.wf-route-map .wf-map-trail{stroke:#1976c5;stroke-width:5;stroke-linecap:round;pointer-events:none}
.wf-route-map .wf-map-visited circle{fill:#1976c5}
.wf-route-map:not([data-map-editable]) [data-map-node]{cursor:default}
.wayfarer-game-dock>.wayfarer-action-utility-row{display:flex;justify-content:center;gap:12px;padding:8px}
.wf-map-dialog{color:var(--wf-text,inherit);background:var(--wf-bg,#f7f4ee)}


/* Player map gets the viewport; editor sizing and gestures remain independent. */
.wf-player-map-dialog{box-sizing:border-box;width:min(1100px,96vw);height:92vh;height:92dvh;max-width:none;max-height:96vh;max-height:96dvh;padding:16px;overflow:hidden;}
.wf-player-map-dialog[open]{display:flex;flex-direction:column;gap:10px;}
.wf-player-map-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;}
.wf-player-map-header h2{margin:0;font-size:1.4rem;}
.wf-player-map-dialog button{min-width:44px;min-height:44px;padding:8px 12px;font:inherit;cursor:pointer;}
.wf-player-map-tools{display:flex;flex-wrap:wrap;gap:6px;flex:none;}
.wf-player-map-dialog .wf-route-map{flex:1 1 auto;min-height:80px;width:100%;box-sizing:border-box;aspect-ratio:auto;margin:0;touch-action:none;overscroll-behavior:contain;cursor:grab;user-select:none;}
.wf-player-map-dialog .wf-route-map:active{cursor:grabbing;}
.wf-player-map-dialog .wf-route-map img{position:absolute;max-width:none;pointer-events:none;}
.wf-player-map-dialog .wf-route-map [data-map-node]{cursor:pointer;}
.wf-player-map-dialog .wf-route-map .wf-map-player{pointer-events:none;}
.wf-player-map-dialog .wf-route-map:focus-visible{outline:3px solid #1976c5;outline-offset:-3px;}
.wf-player-map-selection{flex:none;min-height:1.3em;margin:0;font-size:.85rem;overflow-wrap:anywhere;}
.wf-player-map-dialog details{flex:none;font-size:.85rem;}
.wf-player-map-dialog summary{cursor:pointer;min-height:28px;}
.wf-player-map-dialog details p{margin:4px 0;}
@media(max-width:620px){
 .wf-player-map-dialog{width:calc(100vw - 12px);height:calc(100vh - 12px);height:calc(100dvh - 12px);max-height:none;margin:6px;padding:10px;border-radius:8px;}
 .wf-player-map-dialog[open]{gap:8px;}
 .wf-player-map-dialog button{font-size:.9rem;padding:8px 10px;}
}
.wf-player-map-dialog .wf-route-map .wf-map-hit{fill:transparent;stroke:none;}
.wf-player-map-dialog .wf-map-inspected circle:not(.wf-map-hit){stroke:#b34717;stroke-width:3;}
