/* Keep search in a separate stacking context above the entire map stage. */
.portal-map__toolbar { position:relative; z-index:3; }
.portal-map__stage { isolation:isolate; z-index:0; }
.map-search-results { z-index:10; max-height:min(50dvh,22rem); overflow-y:auto; overscroll-behavior:contain; }
.map-search-results[hidden] { display:none !important; }
.map-search-hit:focus-visible { outline:2px solid var(--amber,#c4a574); outline-offset:-3px; }
.map-node-card__location { display:flex; flex-wrap:wrap; gap:.35rem; flex-shrink:0; margin:0 0 .5rem; }
.map-node-card__location a { text-decoration:none; display:inline-flex; align-items:center; }
.map-node-card__location small { flex-basis:100%; font-size:.64rem; color:var(--text-muted,#b5a996); line-height:1.35; }
.map-node-card__location-note { margin:0 0 .5rem; font-size:.7rem; line-height:1.4; color:var(--text-muted,#b5a996); }
.map-route-panel { min-height:0; overflow:auto; overscroll-behavior:contain; }
.map-route-explanation { margin:.5rem 0; font-size:.7rem; line-height:1.5; color:var(--text-muted,#b5a996); }
.map-position-history { margin:.5rem 0 .75rem; padding:.6rem 0; border-block:1px solid var(--line-soft,#463a2b); }
.map-position-history h4 { margin:0 0 .5rem; font-size:.85rem; }
.map-position-history__periods { display:flex; flex-wrap:wrap; gap:.3rem; }
.map-position-history__periods [aria-pressed=true],.map-position-history__list [aria-pressed=true] { border-color:var(--amber,#c4a574); background:#493c24; }
.map-position-history p { font-size:.72rem; line-height:1.5; margin:.5rem 0; }
.map-position-history__note { color:var(--text-muted,#b5a996); }
.map-position-history__list { padding:0; margin:.5rem 0; list-style:none; max-height:10rem; overflow:auto; overscroll-behavior:contain; }
.map-position-history__list button { width:100%; display:flex; flex-wrap:wrap; gap:.25rem .5rem; justify-content:space-between; padding:.45rem .3rem; border:1px solid transparent; border-bottom-color:var(--line-soft,#463a2b); background:transparent; color:inherit; font:inherit; font-size:.68rem; cursor:pointer; text-align:left; }
.map-position-history button:focus-visible { outline:2px solid var(--amber,#c4a574); outline-offset:-2px; }
.portal-map__canvas-wrap .portal-map__dock:has(.map-position-history) { max-height:min(32rem,70%); width:min(22rem,calc(100% - 1.5rem)); }
.map-node-card__location [data-position-history][aria-expanded=true] { border-color:var(--amber,#c4a574); background:#493c24; }
@media(max-width:768px) { .portal-map__canvas-wrap .portal-map__dock:has(.map-position-history) { width:calc(100% - 1rem); max-height:66%; } }
