/* Offline geographic atlas. Coordinate projection and coastlines share one aspect ratio. */
dialog[data-kind="map"]{width:min(1160px,calc(100% - 48px));max-width:1160px}
.map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.map-scales{display:flex;gap:4px;background:var(--bg);padding:4px;border-radius:12px}
.map-scales button{min-height:44px;padding:10px 16px;border-radius:9px;font-size:14px;color:var(--soft)}
.map-scales button[aria-pressed="true"]{background:var(--panel-2);color:var(--ink)}
.map-context{max-width:760px;font-size:15px;line-height:1.6;color:var(--soft);margin:0 0 14px}
.map-position{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 6px;font-size:14px;line-height:1.5;margin:0 0 18px;color:var(--soft)}
.map-position strong{color:var(--accent);font-weight:600}
.map-position>span{font-size:12px;color:var(--muted);margin-left:auto}
.map-layout{display:grid;gap:26px;align-items:start}
.map-overview,.map-detail{min-width:0}
.map-viewport{overflow-x:auto;border:1px solid var(--line);border-radius:16px;background:#172b35;scrollbar-color:#647776 #172b35;scrollbar-width:thin;overscroll-behavior-x:contain}
.travel-map{--map-water:#172b35;--map-land:#4d6258;--map-shore:#a7b5a0;--map-type:#d3d9c8;--map-route:#dfbd8c;position:relative;isolation:isolate;aspect-ratio:var(--map-aspect);min-width:660px;background:radial-gradient(ellipse at 45% 40%,#29424a80,transparent 75%),var(--map-water);overflow:hidden}
.map-geography{display:block;width:100%;height:100%}
.geo-land{fill:var(--map-land);stroke:var(--map-shore);stroke-width:.7;stroke-linejoin:round}
.geo-graticule{fill:none;stroke:var(--map-type);stroke-opacity:.12;stroke-width:.6}
.geo-labels text{fill:var(--map-type);font-size:17px;letter-spacing:2px;text-anchor:middle;opacity:.68;font-family:Georgia,serif}
.geo-reference{fill:var(--map-type);font-size:18px;text-anchor:middle;dominant-baseline:middle;paint-order:stroke;stroke:var(--map-water);stroke-width:5px;stroke-linejoin:round}
.geo-reference-dot{fill:var(--map-shore)}
.geo-routes{fill:none;stroke-linecap:round;stroke-linejoin:round}
.geo-route{color:var(--map-route);opacity:.7}
.geo-route.latest,.geo-route.selected{color:var(--accent);opacity:1}
.geo-route.dimmed{opacity:.16}
.geo-route-line{stroke:currentColor;stroke-width:1.8;stroke-dasharray:4 5}
.geo-route.selected .geo-route-line,.geo-route.latest .geo-route-line{stroke-width:2.5}
.geo-route-bed{stroke:var(--map-water);stroke-width:5;stroke-opacity:.45}
.geo-arrow-bed{stroke:var(--map-water);stroke-width:5}
.geo-arrow{stroke:currentColor;stroke-width:1.9}
.geo-leaders{fill:none;stroke:var(--map-type);stroke-width:.8;stroke-opacity:.6}
.geo-point circle{fill:var(--map-route);stroke:var(--map-water);stroke-width:2}
.geo-point.current circle{fill:var(--accent)}
.geo-point.reference circle:not(.geo-area){fill:var(--map-water);stroke:var(--map-type);stroke-width:2}
.geo-point .geo-area{fill:var(--map-route);fill-opacity:.08;stroke:var(--map-route);stroke-dasharray:3 4;stroke-width:1.2}
.geo-point.current .geo-halo{fill:none;stroke:var(--accent);stroke-width:1.8}
.geo-compass{fill:none;stroke:var(--map-type);stroke-width:1.4}
.geo-compass text{fill:var(--map-type);stroke:none;font:16px Georgia,serif;text-anchor:middle}
.map-node{position:absolute;left:var(--map-x);top:var(--map-y);transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:44px;max-width:130px;padding:4px;border-radius:8px;color:var(--map-type);text-align:center;gap:2px;z-index:1}
.map-node:active:not(:disabled){transform:translate(-50%,-50%) scale(.98)}
.map-node-label{font-size:13px;font-weight:600;line-height:1.3;background:var(--map-water);padding:4px 6px;border-radius:4px;max-width:100%;box-shadow:0 0 8px var(--map-water)}
.map-node[aria-pressed="true"] .map-node-label{background:var(--accent);color:var(--accent-ink)}
.map-node:hover .map-node-label{outline:1px solid var(--accent)}
.map-here{font-size:11px;line-height:1.2;color:var(--accent);background:var(--map-water);padding:2px 4px;border-radius:3px}
.map-legend{display:flex;gap:18px;flex-wrap:wrap;margin-top:14px;font-size:12px;color:var(--soft)}
.map-legend>span{display:flex;align-items:center;gap:7px}
.map-legend-dot{width:9px;height:9px;border-radius:50%;background:var(--accent)}
.map-legend-line{width:24px;color:var(--accent);font-style:normal;font-size:18px;line-height:9px;text-align:center;position:relative}
.map-legend-line:before{content:'';position:absolute;left:0;right:0;top:50%;border-top:1px dashed var(--accent)}
.map-legend-area{width:14px;height:14px;border-radius:50%;border:1px dashed var(--muted)}
.map-caption{font-size:12px;color:var(--muted);line-height:1.6;margin:12px 0}
.map-caption a{color:inherit;text-underline-offset:3px;white-space:nowrap}
.map-pan-hint{display:none}
.map-route-controls{padding:0 0 15px}
.map-route-picker{display:flex;align-items:center;gap:14px}
.map-route-picker label{font-size:13px;color:var(--soft);flex-shrink:0}
.map-route-inputs{display:flex;align-items:center;gap:6px;min-width:0;flex:1}
.map-route-inputs select{width:0;min-width:0;flex:1;min-height:44px;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--ink);padding:8px 12px;font:inherit;font-size:13px;text-overflow:ellipsis}
.map-route-inputs button{width:44px;height:44px;flex-shrink:0;border:1px solid var(--line);border-radius:9px;color:var(--accent);font-size:19px}
.map-route-inputs button:disabled{opacity:.3;cursor:default}
#map-route-description{margin:9px 0 0;min-height:20px;font-size:12px;line-height:1.6;color:var(--muted)}
.map-place-list{display:flex;flex-wrap:wrap;gap:7px;margin:18px 0 8px}
.map-place-list button{min-height:44px;padding:8px 13px;border:1px solid var(--line);border-radius:8px;font-size:13px;color:var(--soft)}
.map-place-list button[aria-pressed="true"]{color:var(--accent);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 7%,transparent)}
.map-place-list i{font-size:9px;font-style:normal;color:var(--accent)}
.map-place-heading .map-geographic-note{max-width:720px;margin:14px 0 0;font-size:15px;line-height:1.6;color:var(--soft)}
.map-approximate{display:inline-block;margin-top:10px;font-size:12px;color:var(--muted)}
:root[data-theme="light"] .travel-map{--map-water:#dce9e8;--map-land:#e2d6b6;--map-shore:#7b876e;--map-type:#3d5c5c;--map-route:#8d5a34;background:var(--map-water)}
:root[data-theme="light"] .map-viewport{background:#dce9e8;scrollbar-color:#90aaa6 #dce9e8}
.map-place-heading{border-bottom:1px solid var(--line);padding:0 0 19px;margin-bottom:20px}
.map-back{display:inline-flex;margin-bottom:12px}
#map-place-title:focus{outline:none}
.map-place-heading h3{font-size:25px;letter-spacing:-.6px;line-height:1.2;margin:9px 0}
.map-place-heading p{font-size:15px;line-height:1.5;color:var(--soft);margin:0 0 6px}
.map-place-heading small{font-size:12px;line-height:1.5;color:var(--muted)}
.map-section-label{font-size:14px;font-weight:600;margin:22px 0 15px}
.map-threads{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.map-thread{border:1px solid var(--line);background:var(--bg);padding:16px;border-radius:14px}
.map-thread h4{font-size:17px;line-height:1.4;font-weight:550;margin:8px 0 10px}
.map-thread p{font-size:15px;line-height:1.6;color:var(--soft);margin:0 0 10px}
.map-thread summary,.map-itinerary summary{padding:10px 0;min-height:44px;font-size:13px;line-height:1.5;color:var(--accent);cursor:pointer}
.map-thread ol{padding-left:18px;margin:5px 0 0;color:var(--soft)}
.map-thread li{font-size:14px;line-height:1.5;padding:5px 0}
.map-thread li small{display:block;font-size:12px;color:var(--muted);margin-top:3px}
.map-thread li[aria-current]{color:var(--accent)}
.map-itinerary{border-top:1px solid var(--line);margin-top:18px}
.map-itinerary ol{list-style:none;padding:0;margin:0}
.map-itinerary li+li{border-top:1px solid var(--line)}
.map-itinerary button{display:flex;align-items:center;gap:12px;text-align:left;min-height:52px;width:100%;padding:8px 0;font-size:14px;color:var(--soft)}
.map-itinerary b{color:var(--accent);width:20px;font-weight:500}
.map-itinerary small{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.map-entry{display:inline-flex;align-items:center;gap:7px;min-height:44px;font-size:13px;color:var(--accent);text-align:left;margin:0 0 6px}
.map-entry svg{width:16px;height:16px;flex-shrink:0}
.map-links{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.large-text .map-thread p,.large-text .map-thread li{font-size:18px}
@media(max-width:760px){
 dialog[data-kind="map"]{width:100%;max-width:100%}
 .map-layout{gap:22px}
 .map-node{max-width:115px}
 .map-node-label{font-size:12px}
 .map-scales button{padding:10px 12px;font-size:13px}
 .map-toolbar{gap:6px}
 .map-toolbar .text-button{font-size:12px}
 .map-detail{scroll-margin-top:20px}
 .map-back{display:inline-flex;margin-bottom:12px}
 .map-place-heading h3{font-size:23px}
 .map-pan-hint{display:block;font-size:12px;color:var(--muted);line-height:1.5;margin:10px 0}
 .map-position>span{width:100%;margin-left:0}
 .map-threads{grid-template-columns:1fr}
 .map-context{font-size:14px}
 .map-route-picker{align-items:stretch;flex-direction:column;gap:7px}
 .map-route-inputs select{font-size:12px;padding:8px}
}
@media(max-width:360px){.map-scales button{padding:9px}.map-toolbar .text-button{font-size:11px}}
