/* A readable horizontal map, with a separate lane for alternate routes. */
.map-panel,.panel-content:has(>.scenario-map){display:flex;flex-direction:column;overflow:hidden!important;min-height:0}
.map-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;flex-shrink:0;margin-bottom:12px}
.map-route-nav{display:flex;gap:8px;flex-wrap:wrap}.map-route-nav button{padding:9px 16px;border:1px solid #ffffff38;border-radius:6px;background:#242a2d;color:#f0ede6;min-height:40px;font-size:13px}
.map-route-nav button:hover{background:#42494c}.map-legend{display:flex;gap:18px;color:#b6bcbd;font-size:12px}.map-legend .legend-current{color:#ead9ad}
.map-scroll-controls{margin:0 0 12px;justify-content:space-between;gap:12px}.map-scroll-controls button{min-width:48px;min-height:40px;background:#292f32;border:1px solid #ffffff38;color:#eee;border-radius:6px}.map-scroll-controls span{color:#b9bfc0;font-size:12px;text-align:center}
.modal .scenario-map,.fullscreen-panel .scenario-map{flex:1;min-height:0;max-height:none;overflow:auto;padding:24px 20px 32px;background:#111719e8;border:1px solid #ffffff15;border-radius:10px;scrollbar-color:#858b89 #202629;scrollbar-gutter:stable;touch-action:pan-x pan-y}
.scenario-map .map-track{gap:48px;padding:0 180px 16px 0;align-items:flex-start}
.scenario-map .map-column{width:174px;flex:0 0 174px}.map-step-number{display:block;color:#9da5a5;font-size:12px;letter-spacing:.15em;margin:0 0 10px 2px;font-variant-numeric:tabular-nums}
.scenario-map .map-square{width:174px;height:124px;border:1px solid #778180;border-radius:8px;padding:15px 12px;gap:9px;background:#262e30;color:#f5f3ee;line-height:1.55;box-shadow:none;font-size:15px}
.scenario-map button.map-square{cursor:pointer;transition:background .15s,border-color .15s}.scenario-map button.map-square:hover{background:#394346;border-color:#dedbd0;transform:none}.scenario-map button.map-square:focus-visible{outline:3px solid #e9d6a9;outline-offset:4px}
.map-node-title{font-size:15px;font-weight:500;word-break:normal;overflow-wrap:anywhere}.scenario-map .map-square small{font-size:11px;color:#b4bdbc;line-height:1.4}.scenario-map .map-square.unread{width:124px;height:124px;margin:auto;font-size:30px;color:#737e7f;background:#171e20;border:1px dashed #4a5557}
.scenario-map .map-square[aria-current="step"]{background:#e8dfca;color:#1d2528;border:2px solid #f6e4b5;box-shadow:0 0 0 4px #dfc98e24;gap:5px}.scenario-map .map-square[aria-current="step"] small{color:#49534f}.map-current-label{background:#2f3938;color:#f5edd9;font-size:10px;padding:2px 10px;border-radius:10px}
.scenario-map .map-column:not(:last-child) .map-main:after{left:174px;top:62px;width:48px;background:#758482}.scenario-map .map-branch{margin-top:42px}.scenario-map .map-branch:before{left:87px;bottom:124px;height:42px;background:#758482}
.scenario-map .bad-node{background:#30272a;border-color:#86666b}.scenario-map .bad-node:hover{background:#46353a}.map-end-code{font-size:11px;letter-spacing:.08em;color:#d9a7ab}.scenario-map .bad-node[aria-current="step"] .map-end-code{color:#5c3438}
.map-endings{display:flex;gap:24px;position:relative}.map-endings:before{content:'';position:absolute;left:87px;right:-87px;top:21px;height:1px;background:#758482}.map-endings .map-branch{flex:0 0 174px}.map-endings .map-branch:before{height:21px}.map-endings:after{content:'';position:absolute;left:87px;top:0;height:21px;width:1px;background:#758482}
.map-side-entry{color:#c9bb9c;font-size:12px;line-height:1.6;margin:18px 0 0}
.scenario-map .incident-flow{margin:32px 0 0;padding:24px;border-color:#53615f;background:#192123;border-radius:10px;min-width:0;width:max-content}.incident-flow h3{font-size:18px;font-weight:500}.incident-flow>p{font-size:13px;color:#bec7c4;max-width:800px}.incident-lane{gap:16px;margin-top:22px}.incident-lane .lane-label{width:120px;font-size:13px;color:#d5d9d5}.incident-lane p{font-size:13px}.incident-flow .flow-arrow{color:#919e9b}.incident-flow .map-square small{font-size:11px}.incident-flow .map-square.unread{margin:0}
.title-tree{display:flex;flex-direction:column;min-height:0;overflow:hidden!important}.title-tree .scenario-map{min-height:180px}.title-tree>h2{margin-bottom:16px}.title-tree>[data-title-back]{align-self:flex-end;margin-bottom:12px}
@media(max-height:500px){.map-modal.fullscreen-panel .panel-heading{height:54px}.map-modal.fullscreen-panel>.close{top:9px;min-height:34px;padding:6px 14px}.fullscreen-panel .map-panel{padding:10px 16px 12px}.map-toolbar{margin-bottom:6px;gap:8px}.map-route-nav button{min-height:32px;padding:5px 10px;font-size:11px}.map-legend{font-size:10px;gap:10px}.map-scroll-controls{margin-bottom:6px}.map-scroll-controls button{min-height:30px;padding:4px 12px}.map-scroll-controls span{font-size:10px}.modal .scenario-map{padding:16px 12px 24px}.scenario-map .map-square{height:108px;font-size:14px}.scenario-map .map-square.unread{height:108px;width:108px}.scenario-map .map-branch:before{bottom:108px}.scenario-map .map-column:not(:last-child) .map-main:after{top:54px}.map-node-title{font-size:14px}.scenario-map .map-branch{margin-top:32px}.scenario-map .map-branch:before{height:32px}.map-endings:before{top:16px}.map-endings:after,.map-endings .map-branch:before{height:16px}}
.map-endings:before{right:auto;width:198px}
.panel-content:has(>.scenario-map)>.scenario-map{flex:1 1 0;height:0}
@media(max-height:500px){.fullscreen-panel:has(.scenario-map) .panel-heading{height:54px}.fullscreen-panel:has(.scenario-map)>.close{top:9px;min-height:34px;padding:6px 14px}.fullscreen-panel .panel-content:has(>.scenario-map){padding:10px 16px 12px}}
@media(prefers-reduced-motion:reduce){.scenario-map button.map-square{transition:none}}
/* Compact connected overview. */
.panel-content:has(>.scenario-map){padding:12px 24px 16px}
.map-toolbar{margin-bottom:6px;gap:8px}.map-route-nav{gap:6px}.map-route-nav button{min-height:32px;padding:5px 11px;font-size:12px}.map-legend{font-size:11px;gap:12px}.map-scroll-controls{margin-bottom:6px}.map-scroll-controls button{min-height:30px;padding:4px 12px}.map-scroll-controls span{font-size:11px}
.modal .scenario-map,.fullscreen-panel .scenario-map{padding:10px 12px;background:#101719ed;border-radius:6px}
.scenario-map .graph-canvas{position:relative;display:block;gap:0;padding:0;margin:0;flex:none;zoom:1}
.graph-lines{position:absolute;inset:0;overflow:visible;pointer-events:none}.graph-lines path{fill:none;stroke:#778782;stroke-width:1.4}.graph-lines .branch-line{stroke:#c4b28c;stroke-width:1.7}.graph-lines .report-line{stroke:#92b5ac;stroke-dasharray:4 4}.graph-lines .return-line{stroke:#a5cdc0;stroke-width:2;stroke-dasharray:6 4}
.graph-node{position:absolute;width:138px;height:84px;z-index:1}.scenario-map .graph-node .map-square{width:138px;height:84px;box-sizing:border-box;gap:5px;border:1px solid #768580;border-radius:5px;padding:8px;background:#283132;color:#f1f0e8;font-size:13px;line-height:1.4;margin:0;box-shadow:none}.graph-node .map-node-title{font-size:13px;font-weight:500}.scenario-map .graph-node small{font-size:10px;color:#b8c3be;line-height:1.3}
.scenario-map .graph-node .unread{width:84px;margin:auto;font-size:26px;background:#182022;border:1px dashed #52615c;color:#82938c}.scenario-map .graph-node .bad-node{background:#33292d;border-color:#8b6c72}.graph-node .map-end-code{font-size:10px;letter-spacing:.05em;color:#d8afb5}.scenario-map .graph-node button:hover{background:#424d4b;border-color:#ddd5be;transform:none}
.scenario-map .graph-node [aria-current="step"]{background:#e6ddc4;color:#192521;border:2px solid #f2e5c4;box-shadow:0 0 0 3px #dbc58d22;gap:3px}.scenario-map .graph-node [aria-current="step"] small,.scenario-map .graph-node [aria-current="step"] .map-end-code{color:#47564f}.graph-node .map-current-label{background:#32413b;color:#f3ebd7;border-radius:10px;font-size:9px;padding:1px 8px;line-height:1.4}
.graph-label{position:absolute;color:#cebb95;font-size:11px;line-height:1.5;white-space:nowrap;background:#101719;padding:1px 5px;z-index:2}.graph-label.return-caption{color:#a5cdc0;background:transparent}
.graph-lines .return-line{marker-end:url(#map-return-arrow)}
.panel-content:has(>.scenario-map)>.scenario-map,.title-tree>.scenario-map{flex:0 1 auto;height:auto;max-height:100%}
.fullscreen-panel:has(.scenario-map) .panel-heading{height:62px}.fullscreen-panel:has(.scenario-map)>.close{top:12px;min-height:34px;padding:6px 14px}
@media(max-height:500px){.fullscreen-panel:has(.scenario-map) .panel-heading{height:45px}.fullscreen-panel:has(.scenario-map) .panel-heading h2{font-size:16px!important}.fullscreen-panel:has(.scenario-map)>.close{top:6px;min-height:30px}.fullscreen-panel .panel-content:has(>.scenario-map){padding:6px 12px 8px}.map-route-nav button{font-size:10px;min-height:28px;padding:4px 9px}.map-legend{font-size:9px}.map-scroll-controls button{min-height:26px}.map-scroll-controls span{font-size:10px}}
