/* The walk directory and map form a single, framed atlas spread. */
body.ts-map *, body.ts-map *::before, body.ts-map *::after { box-sizing:border-box; }
body.ts-map { margin:0; padding:0; color:#203f2b; background:#f1ead9 url('/assets/atlas-art/paper-v1.webp') repeat; background-size:512px; }
body.ts-map .map-topbar { height:84px; padding:12px clamp(20px,4vw,64px); }
body.ts-map .map-layout { display:grid; grid-template-columns:minmax(300px,380px) minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); gap:24px; max-width:1600px; height:auto; margin:auto; padding:34px clamp(20px,4vw,64px) 48px; align-items:start; }
body.ts-map .map-directory-heading { grid-column:1/-1; padding:0 0 24px; border-bottom:1px solid #9a804d66; }
body.ts-map .map-directory-heading h1 { margin:0 0 12px; font-size:clamp(40px,4.5vw,64px); line-height:1; }
body.ts-map .map-directory-heading p { margin:0; font-size:14px; }
body.ts-map .map-directory { background:none; border:0; overflow:auto; max-height:680px; scrollbar-width:thin; scrollbar-color:#a98e58 transparent; padding:2px 8px 12px 2px; }
body.ts-map #map-routes { display:grid; gap:14px; }
body.ts-map .map-route { position:relative; display:grid; grid-template-columns:76px minmax(0,1fr) 36px; gap:12px; align-items:center; padding:18px 14px; border:8px solid transparent; border-image:var(--atlas-label-frame) 64 fill / 8px / 0 stretch; background:#efe4ca; box-shadow:0 3px 10px #5946200c; transition:box-shadow .2s; }
body.ts-map .map-route:hover,body.ts-map .map-route.is-selected,body.ts-map .map-route:focus-within { background:#f7edda; box-shadow:0 4px 16px #59462020; outline:1px solid #957744; outline-offset:1px; }
body.ts-map .map-route > img { width:76px; height:94px; object-fit:cover; border:1px solid #a68b53; padding:3px; border-radius:0; filter:saturate(.75); }
body.ts-map .map-route h2 { font-size:25px; line-height:1.05; margin:0 0 9px; overflow-wrap:anywhere; }
body.ts-map .map-route h2 a { color:#203f2b; }
body.ts-map .map-route p { font-size:11px; line-height:1.6; margin:0 0 8px; }
body.ts-map .map-route-link { color:#784530; font-size:11px; border:0; }
body.ts-map .map-show { align-self:start; width:36px; min-height:44px; padding:0; border:1px solid #ad925d; border-radius:50% 50% 3px 3px; color:#f7e8c8; background:#203f2b; font:500 18px var(--atlas-serif); cursor:pointer; }
body.ts-map .map-show:hover { background:#923e31; }
body.ts-map .map-canvas { order:initial; height:680px; min-height:0; padding:18px; border:1px solid #9f854f; background:#203f2b; box-shadow:0 8px 28px #453b2518; isolation:isolate; }
body.ts-map .map-canvas::after { content:''; position:absolute; inset:5px; border:1px solid #c4a464; pointer-events:none; z-index:500; }
body.ts-map #map { width:100%; height:100%; border:1px solid #b69c65; border-radius:0; box-shadow:none; background:#e3dcc8; }
body.ts-map .atlas-map-tiles { filter:sepia(.55) saturate(.42) contrast(.92); }
body.ts-map .map-compass { position:absolute; right:35px; bottom:52px; z-index:450; width:48px; text-align:center; pointer-events:none; color:#294735; text-shadow:0 1px #fff7db; font:600 12px Georgia,serif; }
body.ts-map .map-compass span { display:block; font-size:48px; line-height:1; }
body.ts-map .heritage-marker span { width:34px; height:34px; border:2px solid #f3dfb2; outline:1px solid #785332; border-radius:50%; background:#923e31; color:#fff4d9; box-shadow:0 3px 8px #28311f55; font:600 16px var(--atlas-serif); }
body.ts-map .leaflet-control-layers,body.ts-map .leaflet-bar { border:1px solid #9f854f; border-radius:0; background:#f1ead9; color:#203f2b; }
body.ts-map .leaflet-control-attribution { background:#faf0dbe8; font-size:10px; }
body.ts-map .popup-content { text-align:left; padding:4px; background:#f1ead9; color:#203f2b; }
body.ts-map .popup-content h3 { margin:10px 0; color:#203f2b; font-size:27px; line-height:1.1; }
body.ts-map .popup-content .details { color:#59634d; margin-bottom:12px; }
body.ts-map .popup-content a { display:inline-block; padding:9px 12px; background:#203f2b; color:#fff0ce; text-decoration:none; }
body.ts-map #map-status { border:1px solid #a88a4d; border-radius:0; color:#203f2b; }
body.ts-map :is(a,button):focus-visible { outline:2px solid #923e31; outline-offset:3px; }
@media (max-width:1000px) { body.ts-map .map-layout { grid-template-columns:minmax(280px,340px) minmax(0,1fr); gap:18px; padding-inline:20px; } body.ts-map .map-route { grid-template-columns:60px minmax(0,1fr) 32px; gap:9px; padding:14px 10px; } body.ts-map .map-route > img { width:60px; height:82px; } body.ts-map .map-route h2 { font-size:23px; } body.ts-map .map-show { width:32px; } }
@media (max-width:760px) { body.ts-map .map-topbar { height:76px; padding:12px 18px; } body.ts-map .map-layout { display:flex; flex-direction:column; gap:22px; padding:26px 18px 36px; } body.ts-map .map-directory-heading { width:100%; padding:0 0 20px; order:0; } body.ts-map .map-canvas { order:1; width:100%; height:48svh; min-height:330px; max-height:480px; padding:12px; } body.ts-map .map-directory { order:2; width:100%; max-height:none; overflow:visible; padding:0; } body.ts-map .map-route { grid-template-columns:76px minmax(0,1fr) 36px; padding:18px 14px; gap:14px; } body.ts-map .map-route > img { width:76px; height:90px; } body.ts-map .map-route h2 { font-size:27px; } }
@media (prefers-reduced-motion:reduce) { body.ts-map .map-route { transition:none; } }

/* ImageGen ornaments contain no text: route data stays in the HTML. */
body.ts-map .heritage-marker span { width:48px; height:56px; display:flex; align-items:flex-start; justify-content:center; padding-top:13px; border:0; outline:0; border-radius:0; background:transparent url('/assets/atlas-art/map-pin-v1.png') center/100% 100% no-repeat; color:#fff3cd; font:600 18px/1 var(--atlas-serif); box-shadow:none; filter:drop-shadow(0 3px 2px #142c2655); transition:filter .18s; }
body.ts-map .heritage-marker:hover span,body.ts-map .heritage-marker:focus-visible span,body.ts-map .heritage-marker.is-active span { filter:brightness(1.3) drop-shadow(0 0 4px #f4ce77); }
body.ts-map .atlas-marker-tooltip { background:#203f2b; color:#fff0ce; border:1px solid #bd9555; border-radius:2px; padding:7px 12px; font:500 13px var(--atlas-sans); }
body.ts-map .atlas-map-tools { display:grid; gap:6px; }
body.ts-map .atlas-map-tools :is(button,select) { min-height:42px; width:150px; padding:8px 13px; border:7px solid transparent; border-image:var(--atlas-label-frame) 64 fill / 7px stretch; background:#f1ead9; color:#203f2b; font:500 12px var(--atlas-sans); cursor:pointer; box-shadow:0 3px 8px #203f2b20; }
body.ts-map .atlas-map-tools button:hover { filter:brightness(1.06); }
body.ts-map .leaflet-control-zoom { border:0; box-shadow:0 3px 8px #203f2b25; }
body.ts-map .leaflet-control-zoom a { width:44px; height:44px; line-height:30px; border:7px solid transparent; border-image:var(--atlas-label-frame) 64 fill / 7px stretch; border-radius:0; font-size:24px; }
body.ts-map .atlas-walk-popup .leaflet-popup-content-wrapper { padding:0; border:0; background:none; box-shadow:none; }
body.ts-map .atlas-walk-popup .leaflet-popup-content { margin:0; width:270px !important; max-width:calc(100vw - 84px); }
body.ts-map .atlas-walk-popup .popup-content { max-width:none; padding:28px 24px 26px; background:transparent url('/assets/atlas-art/map-popup-v1.png') center/100% 100% no-repeat; text-align:left; filter:drop-shadow(0 5px 7px #142c2640); }
body.ts-map .atlas-walk-popup .popup-content img { display:block; width:100%; height:105px; object-fit:cover; padding:3px; border:1px solid #a68b53; border-radius:0; box-shadow:none; }
body.ts-map .atlas-walk-popup .popup-content h3 { font-size:28px; line-height:1.05; margin:12px 0 7px; overflow-wrap:anywhere; }
body.ts-map .atlas-walk-popup .popup-start { font:400 11px/1.45 var(--atlas-sans); color:#59634d; margin:0 0 8px; }
body.ts-map .atlas-walk-popup .details { font:500 12px/1.4 var(--atlas-sans); margin:0 0 12px; color:#203f2b; }
body.ts-map .atlas-walk-popup .popup-content a { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; padding:10px 12px; border:1px solid #a68b53; border-radius:0; font:500 12px var(--atlas-sans); }
body.ts-map .atlas-walk-popup .leaflet-popup-close-button { top:8px; right:9px; width:32px; height:32px; line-height:30px; border:1px solid #b39962; border-radius:50%; background:#f4e9d1; color:#203f2b; z-index:1; }
body.ts-map .atlas-walk-popup .leaflet-popup-tip { background:#f1ead9; border:1px solid #a68b53; }
@media(max-width:760px) { body.ts-map .map-canvas { min-height:440px; height:58svh; max-height:560px; } body.ts-map .atlas-map-tools :is(button,select) { width:135px; font-size:11px; } }
@media(prefers-reduced-motion:reduce) { body.ts-map .heritage-marker span { transition:none; } }
@media(max-width:760px) {
 body.ts-map .has-popup .leaflet-top { top:auto; bottom:24px; }
 body.ts-map .has-popup .map-compass { display:none; }
}
