#terrain-map{position:absolute;inset:0;width:100%;height:100%;overscroll-behavior:auto;touch-action:pan-y pinch-zoom;background:#547067}#terrain-map[hidden],.terrain-controls[hidden]{display:none}.terrain-controls{position:absolute;left:12px;top:12px;z-index:4;display:flex;gap:4px}.terrain-controls button{height:36px;display:flex;align-items:center;justify-content:center;gap:5px;border:1px solid #ffffffa6;border-radius:6px;background:#f7f7eef0;color:#173d34;padding:0 9px;font-family:inherit;font-size:12px;font-weight:600;line-height:1.2;cursor:pointer}.terrain-controls i{font-size:19px}.terrain-controls button:focus-visible{outline:3px solid #42a9e4;outline-offset:2px}#terrain-map .maplibregl-ctrl-top-right{top:56px;right:3px}#terrain-map .maplibregl-ctrl-attrib{font-size:10px;line-height:15px;max-width:95%;background:#f7f7eef2}#terrain-map .maplibregl-marker{will-change:transform}#terrain-map .traveler{color:#092820;z-index:3}#terrain-map .route-pin{width:12px;height:12px}#terrain-map .maplibregl-ctrl-attrib-button{width:26px;height:26px}#terrain-map .maplibregl-canvas:focus-visible{outline:3px solid #42a9e4;outline-offset:-3px}.map-shell:has(#terrain-map:not([hidden])) .route-endpoints{bottom:40px}.map-shell:has(#terrain-map:not([hidden])) .map-top{top:55px;right:53px;left:auto}.map-shell:has(#terrain-map:not([hidden])) .map-top>div{gap:4px}.map-shell:has(#terrain-map:not([hidden])) .map-top button{background:#f7f7eef2}@media(max-width:599px){.terrain-controls{left:9px;top:9px}.terrain-controls button{height:36px}.map-shell:has(#terrain-map:not([hidden])) .map-top{top:54px}.map-shell:has(#terrain-map:not([hidden])) .route-endpoints>span{font-size:10px;padding:8px;max-width:48%}}@media(prefers-reduced-motion:reduce){#terrain-map *{scroll-behavior:auto}}

@media(max-height:560px) and (min-width:600px){.map-shell:has(#terrain-map:not([hidden])) .route-endpoints{display:none}#terrain-map .maplibregl-ctrl-bottom-left{max-width:calc(100% - 120px)}#terrain-map .maplibregl-ctrl-attrib{max-width:100%}}

.terrain-controls [data-terrain-follow][aria-pressed="true"]{background:#173d34;color:#fff}.terrain-controls [data-terrain-follow]:disabled{opacity:.45;cursor:default}
.terrain-distance{display:none}@media(max-width:599px){.terrain-distance{display:block;position:absolute;top:45px;left:0;padding:6px 8px;border-radius:5px;background:#f7f7eef0;color:#173d34;white-space:nowrap;font-size:11px;line-height:1.3}}

.terrain-approximation{position:absolute;top:45px;left:0;padding:6px 8px;border-radius:5px;background:#f7f7eef0;color:#173d34;white-space:nowrap;font-size:11px;line-height:1.3}.terrain-approximation[hidden]{display:none}@media(max-width:599px){.terrain-approximation{display:none}}

 .terrain-surface-note{display:block;flex:none;padding:5px 7px;border-radius:5px;background:#f7f7eef0;color:#173d34;font-size:12px;line-height:1.45}.terrain-surface-note[hidden]{display:none}
/* Leave the middle of short railway maps clear as the route bends. */
@media(max-height:560px) and (min-width:600px){.map-shell:has(#terrain-map[data-profile="hokuriku"]:not([hidden])) .terrain-controls:not([hidden]){display:grid;grid-template-columns:36px 36px}.map-shell:has(#terrain-map[data-profile="hokuriku"]:not([hidden])) .terrain-controls button{padding:0}.map-shell:has(#terrain-map[data-profile="hokuriku"]:not([hidden])) [data-terrain-toggle] span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
/* Keep all three native navigation controls above the floating Next action. */
@media(max-height:560px) and (min-width:600px){
 #terrain-map .maplibregl-ctrl-top-right .maplibregl-ctrl-group{display:flex}
 #terrain-map .maplibregl-ctrl-top-right .maplibregl-ctrl-group button+button{border-top:0;border-left:1px solid #ddd}
}

.land-continue{position:absolute;z-index:8;bottom:115px;left:50%;transform:translateX(-50%);max-width:calc(100% - 40px);padding:10px 16px;border-radius:12px;background:#092820;color:#fff;border:1px solid #7fa898;font:inherit;cursor:pointer}.land-continue:focus-visible{outline:3px solid #fff;outline-offset:3px}

.terrain-attribution{flex:none;font:12px/17px Arial,sans-serif;color:#173d34}.terrain-attribution[hidden]{display:none}.terrain-attribution .maplibregl-ctrl-attrib{float:none;margin:0;background:#f7f7eef0;border-radius:5px;padding:4px 7px}.terrain-attribution .maplibregl-ctrl-attrib a{color:inherit}
/* Short landscape viewports scroll the map column and its complete credits;
   the clock and controls must not consume the whole camera viewport. */
@media(max-height:560px) and (min-width:600px){#visual:has(#terrain-map:not([hidden])){overflow-y:auto;justify-content:flex-start;overscroll-behavior:contain;padding-bottom:64px}#visual>.map-shell:has(#terrain-map:not([hidden])){height:360px;min-height:360px;flex:0 0 360px}}

.terrain-surface-note summary{cursor:pointer;min-height:28px;padding:4px 0}.terrain-surface-note summary:focus-visible,.terrain-attribution a:focus-visible{outline:3px solid #1673a3;outline-offset:2px}.terrain-surface-note ul{margin:6px 0 4px;padding-left:19px}.terrain-surface-note li+li{margin-top:6px}.terrain-attribution{overflow-wrap:anywhere}

/* Distance haze on tilted, zoomed-out Colorado maps; journey-terrain.js sets its opacity (hazeStrength). */
#terrain-map .terrain-haze{position:absolute;inset:0;pointer-events:none;opacity:0;background:linear-gradient(to bottom,#d6e2dfe6 0%,#d6e2dfb8 10%,#d6e2df75 20%,#d6e2df33 30%,#d6e2df00 42%)}
