/* Expedition interface: overlays stay readable against both snow and sky. */
:root{color-scheme:dark;--panel:#102833ed;--line:#ffffff45;--warm:#e8c38d}
button,select,input{touch-action:manipulation}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #ffda9a;outline-offset:3px}
#start{overflow:auto;padding:max(24px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:linear-gradient(180deg,#0a1b28b8,#071924e8)}
.start-card{width:min(100%,480px);max-height:100%;overflow:auto;text-align:left;padding:clamp(24px,5vh,48px);background:#0e2734ec;border:1px solid var(--line);border-radius:12px;box-shadow:0 20px 70px #07131d88}
.start-card h2{font-size:clamp(32px,6vw,45px);line-height:1.05;margin:14px 0}
.start-card p{margin:0 0 20px;max-width:none;font-size:15px;line-height:1.55}
.start-card button{width:100%;min-height:48px;margin:10px 0;font-weight:650}
.start-card .small,.start-card .note{font-size:12px;line-height:1.55}
.start-card .small{margin-top:20px}.start-card .note{margin-bottom:12px}
.credits-link{color:#f1d3a0}
#hud{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:12px 15px;top:max(18px,env(safe-area-inset-top));left:max(18px,env(safe-area-inset-left));text-shadow:none}
#hud h1{font-size:26px;margin:4px 0}#distance{font-size:12px}#progress{margin-top:8px}
#objective{display:none;position:fixed;left:max(18px,env(safe-area-inset-left));top:145px;background:var(--panel);border-left:3px solid var(--warm);border-radius:4px;padding:9px 13px;max-width:min(310px,55vw);z-index:10}
body.exploring:not(.preview) #objective{display:grid;gap:3px}#objective span{text-transform:uppercase;letter-spacing:.12em;font-size:10px;color:#e5c99c}#objective strong{font-size:13px;line-height:1.3}
#pause{top:max(18px,env(safe-area-inset-top));right:max(18px,env(safe-area-inset-right));min-width:44px;min-height:44px}
#travelControls{bottom:max(85px,env(safe-area-inset-bottom));left:max(18px,env(safe-area-inset-left));z-index:12}
#follow,#pace,#reset{min-height:44px;font-size:12px}
#help{bottom:max(20px,env(safe-area-inset-bottom));left:max(18px,env(safe-area-inset-left));font-size:11px}
#error{bottom:auto;top:20px;left:50%;transform:translateX(-50%);width:min(500px,90%);padding:16px 18px;border:1px solid #f1bda9;border-radius:8px;background:#642f29;color:white;z-index:10000}
#retryLoad{position:fixed;top:95px;left:50%;transform:translateX(-50%);z-index:10001;min-height:44px}
#touchControls{display:none}
.guide-overlay{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));background:#061722cc}
.guide-dialog{width:min(100%,520px);max-height:100%;overflow:auto;padding:clamp(22px,5vw,36px);background:#102b38;color:#f7f3ea;border:1px solid #ffffff55;border-radius:12px;box-shadow:0 20px 70px #0009;line-height:1.55}
.guide-dialog h2{font:clamp(27px,5vw,36px) Georgia,serif;line-height:1.1;margin:0 0 14px}.guide-dialog p{font-size:15px}
.guide-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.guide-actions button,.guide-choice{min-height:48px}.guide-choice{text-align:left}.guide-status{font-size:13px;color:#f2d6a5}
@media (pointer:coarse){
 #help{display:none}#touchControls{position:fixed;inset:auto max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:none;justify-content:space-between;align-items:end;pointer-events:none;z-index:14}
 body.exploring:not(.preview) #touchControls{display:flex}.touch-pad{display:grid;justify-items:center;gap:3px;pointer-events:auto}.touch-pad span{font-size:10px;text-transform:uppercase;letter-spacing:.1em;text-shadow:0 1px 4px #000}.touch-pad div{display:flex;gap:3px}.touch-pad button{width:44px;height:44px;min-width:44px;padding:0;background:#102b39d9;color:white;border:1px solid #fff9;font-size:20px;touch-action:none;user-select:none}.touch-pad button.pressed{background:#e8c38d;color:#102833}
 #travelControls{bottom:125px;left:max(12px,env(safe-area-inset-left))}#reset{bottom:125px;right:max(12px,env(safe-area-inset-right))}#action{bottom:180px}#openSummitPhoto{bottom:180px}
}
@media(max-width:600px){#hud{top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));padding:8px 10px}#hud h1{font-size:21px}#progress{width:140px}#objective{top:115px;left:max(12px,env(safe-area-inset-left));max-width:60vw}#audioControls{top:max(12px,env(safe-area-inset-top));right:66px}#notice{top:185px}.start-card{padding:24px}.start-card h2{font-size:32px}.start-card button{width:100%}}
@media(max-height:500px){.start-card{padding:18px}.start-card h2{font-size:27px;margin:7px 0}.start-card p{margin-bottom:8px}.start-card .small,.start-card .note{display:none}#objective{top:90px}#action{bottom:100px}.touch-pad button{width:38px;height:38px;min-width:38px}#travelControls,#reset{bottom:90px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}}
/* The journal creates its own high stacking layer; dialogs must sit above it. */
.guide-overlay{z-index:9500}
.guide-overlay[hidden]{display:none!important}
@media (pointer:coarse){
 #openJournal{bottom:180px}
}

/* Keep sound controls on their own row on narrow screens. */
@media(max-width:600px){#hud{top:max(66px,calc(env(safe-area-inset-top) + 54px));max-width:calc(100vw - 24px)}#objective{top:172px;max-width:calc(100vw - 24px)}#notice{top:260px}.guide-dialog a{color:#f1d3a0}#objective button{min-height:44px;margin-top:6px;padding:8px 10px;font-size:12px}}

/* Route navigation stays separate from the action button and touch pads. */
#navigationHud{position:fixed;right:max(18px,env(safe-area-inset-right));top:88px;width:230px;padding:12px 14px;background:#102833ed;border:1px solid #ffffff45;border-radius:8px;z-index:12;line-height:1.45}
#navMode{display:block;color:#e8c38d;font-size:11px;margin-bottom:5px}#navigationHud strong{display:block;font-size:16px}#navDistance{font-variant-numeric:tabular-nums;color:#e5eaeb}#navInstruction{margin:8px 0;font-size:12px}#arrowToggle{min-height:44px;padding:8px 12px;font-size:12px;width:100%}
#routeArrow{position:fixed;left:50%;top:40%;transform:translateX(-50%);display:grid;justify-items:center;gap:10px;pointer-events:none;z-index:11;text-align:center}
#arrowNeedle{display:block;width:52px;height:52px;font-size:48px;line-height:52px;color:#ffe0a1;text-shadow:0 2px 4px #061722,0 0 12px #061722;rotate:-90deg;transform-origin:center}
#arrowLabel{max-width:230px;background:#102833e8;color:#fff4de;padding:7px 12px;border-radius:20px;font-size:12px}
@media(max-width:600px){#navigationHud{top:auto;bottom:285px;right:12px;width:175px;padding:8px 10px;font-size:11px}#navigationHud strong{font-size:14px}#navInstruction{margin:4px 0}#arrowToggle{min-height:44px}#routeArrow{top:42%;left:25%}#arrowLabel{max-width:145px;font-size:11px}}
@media(max-height:500px){#navigationHud{top:70px;bottom:auto;right:12px;width:180px}#routeArrow{top:38%;left:50%}#navInstruction{display:none}#objective{max-width:220px}#objective button{padding:6px;font-size:11px}}

.checkpoint-start-label{display:block;margin-top:15px;margin-bottom:6px;color:#e8c38d;font-size:13px}#startCheckpoint{width:100%;min-height:48px;padding:10px;background:#19343e;color:#fff;border:1px solid #ffffff70;border-radius:5px}.start-card .checkpoint-start-note{font-size:12px;margin:8px 0 12px;color:#c9d7dd}
#travelControls{flex-direction:column;align-items:stretch;background:#102833ed;border:1px solid #ffffff45;border-radius:8px;padding:8px;gap:8px}#travelControls.is-following{border-color:#e8c38d;box-shadow:0 0 0 1px #e8c38d55}#paceStatus{display:block;color:#e8c38d;font-size:11px;margin-bottom:5px}.pace-buttons{display:flex;align-items:center;gap:6px}#paceValue{min-width:125px;text-align:center;font-size:13px;font-variant-numeric:tabular-nums}.pace-buttons button{min-height:44px;padding:8px 10px;font-size:12px}.pace-buttons button:disabled{cursor:default}
@media(pointer:coarse){#travelControls{bottom:125px;max-width:calc(100vw - 24px)}#action{bottom:260px}#reset{bottom:242px}}
@media(max-width:600px){#paceValue{min-width:112px;font-size:12px}#navigationHud{bottom:355px}#travelControls{max-width:calc(100vw - 24px)}.pace-buttons button{padding:8px}#routeArrow{top:38%}}
@media(max-height:500px){#travelControls{bottom:12px;left:12px;max-width:340px}#touchControls{bottom:12px}#navigationHud{top:68px;bottom:auto}#action{bottom:135px}#reset{bottom:112px}}

@media(max-height:500px) and (pointer:coarse){#travelControls{left:50%;transform:translateX(-50%);bottom:12px}#action{bottom:145px}}

#routeMinimap{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));width:240px;z-index:14;background:#102833f2;border:1px solid #9abbba88;border-radius:10px;overflow:hidden;box-shadow:0 5px 24px #0005}
.minimap-heading{display:flex;justify-content:space-between;padding:8px 10px;font-size:10px;letter-spacing:.08em;color:#d7e9e7}.minimap-you{color:#89efff}#minimapCanvas{width:100%;height:auto;aspect-ratio:4/3}#minimapCaption{padding:5px 10px;font-size:11px;color:#ffe4ae;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.minimap-buttons{display:flex;border-top:1px solid #ffffff30}.minimap-buttons button{flex:1;min-height:44px;padding:6px;font-size:11px;border:0;border-radius:0;background:#1c3d49;color:#fff}.minimap-buttons button+button{border-left:1px solid #ffffff30}
#openJournal{right:18px;bottom:310px}#reset{right:18px;bottom:362px}
@media(max-width:600px){#routeMinimap{width:150px;right:12px;bottom:12px}.minimap-heading{font-size:9px;padding:5px 7px}#minimapCaption{font-size:10px;padding:3px 7px}.minimap-buttons button{font-size:10px}#openJournal{right:12px;bottom:324px}#reset{right:12px;bottom:372px}#navigationHud{bottom:424px;width:150px}#navInstruction{display:none}#travelControls{width:calc(100vw - 180px);max-width:220px}.pace-buttons{flex-wrap:wrap}.pace-buttons output{order:-1;flex-basis:100%}.pace-buttons button{flex:1}#action{bottom:330px}}
@media(max-width:600px) and (pointer:coarse){#touchControls .touch-pad:last-child{transform:translateY(-215px)}}
@media(max-height:500px){#routeMinimap{width:160px;right:12px;bottom:12px}#minimapCanvas{height:100px;aspect-ratio:auto}#openJournal{right:185px;bottom:12px}#reset{right:185px;bottom:64px}#navigationHud{right:12px;top:12px;bottom:auto;width:160px}#navMode,#navInstruction{display:none}#navigationHud strong{font-size:12px}#arrowToggle{min-height:36px}}
@media(max-height:500px) and (pointer:coarse){#touchControls .touch-pad:last-child{transform:translate(-180px,-100px)}#travelControls{left:12px;bottom:120px;transform:none;width:210px}.pace-buttons{flex-wrap:wrap}.pace-buttons output{order:-1;flex-basis:100%}#action{bottom:20px;left:46%;width:240px}}
