/* Endless Slope — the interface is the inside of the lodge, drawn in the same
   pixels as the mountain. Art is pixel art at two CSS pixels to the art pixel.
   Frames and buttons are nine-slices, and the whole layer is zoomed so an art
   pixel is a whole number of screen pixels. */
@font-face{font-family:Hearth;src:url("./assets/ui/hearth.woff2") format("woff2");font-weight:400;font-display:block}
@font-face{font-family:Hearth;src:url("./assets/ui/hearth-bold.woff2") format("woff2");font-weight:700;font-display:block}
@font-face{font-family:"Hearth Display";src:url("./assets/ui/hearth-display.woff2") format("woff2");font-weight:400;font-display:block}
:root{color-scheme:dark;--zoom:1;--ink:#3b2416;--soft:#8a6240;--cream:#fde9c1;--gold:#ffc866;--night:#14132b;--edge:#0b0a1e;--accent:#c8432b;
 --pixel:Hearth,ui-monospace,Menlo,Consolas,monospace;--display:"Hearth Display",Hearth,ui-monospace,monospace;
 --outline:2px 0 0 var(--edge),-2px 0 0 var(--edge),0 2px 0 var(--edge),0 -2px 0 var(--edge),2px 2px 0 var(--edge),-2px 2px 0 var(--edge),2px -2px 0 var(--edge),-2px -2px 0 var(--edge),0 4px 0 var(--edge)}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--night);color:var(--ink);font:400 16px/20px var(--pixel)}
html,body,#game{height:100dvh}
body{overscroll-behavior:none}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0;text-align:inherit;-webkit-tap-highlight-color:transparent}
button:disabled{cursor:default}
strong,b{font-weight:700}
small{font-size:inherit}
h1,h2,p{margin:0;font-size:inherit;font-weight:400}
[hidden]{display:none!important}
:focus-visible{outline:4px solid var(--gold);outline-offset:2px}
/* Every piece of art in the interface, including nine-slice borders, is drawn pixel for pixel. */
.ui{image-rendering:pixelated}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
svg{display:block;width:34px;height:34px;flex-shrink:0}
svg.big{width:68px;height:68px}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#game{position:relative;width:100%;isolation:isolate;overflow:hidden}
#world{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;background:var(--night)}
#world:focus{outline:none}
#world:focus-visible{outline:4px solid var(--gold);outline-offset:-4px}
body[data-ready=true] #world{animation:reveal 1.5s cubic-bezier(.2,.6,.2,1) both}
body[data-ready=true] #world.swap{animation:swap .7s cubic-bezier(.2,.6,.2,1) both}
.atmosphere{position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,#0b0a1e66 0%,#0b0a1e00 22%,#0b0a1e00 84%,#0b0a1e40)}
.ui{position:absolute;inset:0;z-index:2;zoom:var(--zoom);container-type:size;pointer-events:none}
@keyframes reveal{from{opacity:0}to{opacity:1}}
@keyframes swap{from{opacity:0}to{opacity:1}}
@keyframes arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes load{from{transform:translateX(-100%)}to{transform:translateX(260%)}}
@keyframes glow{from{filter:brightness(1)}to{filter:brightness(1.18)}}

/* Art. */
.hud-panel,.daily-card,.recovery-banner{border:12px solid transparent;border-image:url("./assets/ui/btn-walnut.png") 6 fill/12px/0 stretch;color:var(--cream)}
.toast,.play-hint,.photo-light,.lodge-action,.result-stats>div,.control-sheet,.help-field-note,.setting-note,.condition-fieldset{border:12px solid transparent;border-image:url("./assets/ui/btn-paper.png") 6 fill/12px/0 stretch;color:var(--ink)}
.primary,.lodge-prompt{border:20px solid transparent;border-image:url("./assets/ui/btn-amber.png") 10 fill/20px/0 stretch;color:#4a2408}
.primary:active,.lodge-prompt:active{border-image-source:url("./assets/ui/btn-amber-down.png")}
.secondary{border-style:solid;border-color:transparent;border-width:0 20px;border-image:url("./assets/ui/btn-pine.png") 0 10 fill/0 20px/0 stretch;color:var(--ink)}
.icon-button,.small-icon,.mark,.touch-controls button,.gear{border:16px solid transparent;border-image:url("./assets/ui/tile-wood.png") 8 fill/16px/0 stretch;color:var(--ink)}
.gear.selected,.touch-controls button.held,.touch-controls button:active{border-width:20px;border-image:url("./assets/ui/tile-amber.png") 10 fill/20px/0 stretch}
.hero,.modal,.lodge-card{border-style:solid;border-color:transparent;border-width:72px 60px 68px;border-image:url("./assets/ui/frame.png") 36 30 34 30 fill/72px 60px 68px 60px/0 stretch}
.postcard,.photo-tools{border-style:solid;border-color:transparent;border-width:36px 30px 34px;border-image:url("./assets/ui/frame-s.png") 18 15 17 15 fill/36px 30px 34px 30px/0 stretch}
.deco{position:absolute;display:block;pointer-events:none;background:0 0/100% 100% no-repeat}
.deco.cat{width:76px;height:48px;background-image:url("./assets/ui/cat.png")}
.deco.cocoa{width:54px;height:68px;background-image:url("./assets/ui/cocoa.png")}
.deco.ribbon{width:36px;height:62px;background-image:url("./assets/ui/ribbon.png")}
.deco.garland{width:342px;height:50px;background-image:url("./assets/ui/garland.png")}
.deco.skis{width:64px;height:80px;background-image:url("./assets/ui/skis.png")}
.deco.snowman{width:64px;height:70px;background-image:url("./assets/ui/snowman.png")}
.deco.pinecone{width:86px;height:60px;background-image:url("./assets/ui/pinecone.png")}
.deco.lantern{width:38px;height:76px;background-image:url("./assets/ui/lantern.png")}
.logo{display:block;width:272px;height:146px;pointer-events:none}

/* Buttons. */
.primary,.secondary,.daily-card{position:relative;width:100%;display:flex;align-items:center;gap:8px;white-space:nowrap;transition:transform .1s,filter .1s}
.primary{height:54px;font-weight:700}
.secondary{height:48px;margin-top:8px}
.daily-card{height:50px;margin-top:8px}
.primary>span:first-child,.secondary>span:first-of-type,.daily-card>span:nth-child(2){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.primary small,.secondary small,.daily-card small{display:none}
.daily-card strong{font-weight:400}
.daily-date{color:var(--gold)}
.primary>svg,.secondary>svg,.daily-card svg,.round-arrow{margin:0 -8px}
.primary:hover,.secondary:hover,.daily-card:hover,.icon-button:hover,.small-icon:hover,.gear:hover,.lodge-action:hover:not(:disabled),.photo-light:hover{filter:brightness(1.1);transform:translateY(-2px)}
.primary:active,.secondary:active,.daily-card:active,.icon-button:active,.small-icon:active,.gear:active,.lodge-action:active:not(:disabled),.photo-light:active{filter:none;transform:translateY(2px)}
.primary:disabled{filter:grayscale(.7) brightness(.9)}
.text-button{min-height:40px;padding:0 8px;color:var(--soft);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.text-button:hover{color:var(--accent)}
.icon-button,.small-icon,.mark{display:grid;place-items:center;width:60px;height:54px;transition:transform .1s,filter .1s}
.icon-button svg,.small-icon svg,.mark svg{margin:-8px}

/* Top of the screen. */
.topbar{position:absolute;z-index:5;left:0;right:0;top:0;display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))}
.wordmark{display:flex;align-items:center;gap:10px;color:var(--cream);font-weight:700;text-shadow:var(--outline)}
.wordmark-light{color:var(--gold)}
.wordmark small{display:none}
.top-actions{display:flex;gap:6px;margin-left:auto;pointer-events:auto}
body[data-state=home] .wordmark,body[data-state=loading] .topbar,body[data-state=photo] .topbar,body[data-state=photo] .footer,body[data-state=photo] .atmosphere{visibility:hidden}

/* Base camp. */
.home{position:absolute;inset:0;z-index:3;display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:0 clamp(12px,round(4cqw,4px),64px) 6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8a6240 transparent;background:linear-gradient(90deg,#0b0a1e99,#0b0a1e33 46%,#0b0a1e00 66%)}
.hero{position:relative;flex-shrink:0;width:min(440px,100%);margin:116px 0 auto;padding:0 2px;pointer-events:auto;animation:arrive .3s steps(3) both}
.hero .logo{position:absolute;left:50%;top:-188px;margin-left:-136px}
.hero .cat{right:-42px;top:-96px}
.hero-copy,.hero-footer,#gear-description{display:none}
.equipment-label{color:var(--soft);margin:0 0 6px}
.equipment{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
.gear{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-width:0;padding:4px;white-space:nowrap;text-align:center;transition:transform .1s,filter .1s}
.gear{color:var(--cream);text-shadow:var(--outline)}
.gear.selected{padding:0;color:#fff6dc}
.gear small,.gear i,.gear svg.tiny{display:none}
.help-link{display:flex;align-items:center;gap:6px;width:100%;min-height:40px;margin-top:6px;color:var(--soft);white-space:nowrap}
.help-link>span{flex:1;font-size:0}
.help-link strong{font-size:16px;font-weight:400;color:var(--ink);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.help-link>svg:first-child{margin:0 -4px 0 -8px}
.help-link .end-arrow{margin:0 -8px}
.postcard{position:relative;align-self:flex-end;flex-shrink:0;width:300px;margin-bottom:34px;padding:0 4px 2px;pointer-events:none;animation:arrive .3s .1s steps(3) both}
.postcard .ribbon{right:-24px;top:-30px}
.postcard-head{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--soft)}
.postcard-head>span:first-child{display:flex;align-items:center;gap:4px;min-width:0;overflow:hidden;white-space:nowrap}
.postcard-head svg{margin:-6px -4px -6px -8px}
#postcard-region-number{display:none}
.postcard h2{font-weight:700;margin:6px 0 2px}
.postcard p{color:var(--soft)}
.postcard-rule{border-top:2px dashed #b98a58;margin:8px 0}
.postcard-stat{display:flex;justify-content:space-between;gap:8px}
.postcard-stat span{color:var(--soft)}
.postcard-stat strong{color:var(--accent)}
.footer{position:absolute;z-index:2;left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));bottom:max(6px,env(safe-area-inset-bottom));display:flex;justify-content:space-between;gap:12px;color:var(--cream);text-shadow:var(--outline);pointer-events:none;white-space:nowrap}
.footer a{pointer-events:auto;color:var(--gold)}
.footer-divider{margin:0 4px}
.footer>span:first-child{display:none}
body[data-state=playing] .footer,body[data-state=paused] .footer,body[data-state=lodge] .footer,body[data-state=results] .footer{display:none}

/* Riding. */
.hud{position:absolute;inset:0;z-index:2}
.hud-panel{position:absolute;padding:0 2px}
.eyebrow{display:flex;align-items:center;gap:8px;color:var(--soft)}
.hud-panel .eyebrow{color:#e0b47a}
.dot{display:none}
.distance-panel{top:calc(74px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));width:232px}
#mode-label{margin-left:auto;color:var(--gold)}
.distance-value{font:400 32px/36px var(--display);margin:2px 0;white-space:nowrap}
.distance-value small{font:400 16px/20px var(--pixel);margin-left:6px;color:#e0b47a}
.hud-sub{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.resolve{margin-top:6px;padding-top:6px;border-top:2px dashed #8a5a36}
.resolve-row{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px}
#resolve-meter{display:inline-flex;gap:6px}
.resolve-pip{display:block;width:12px;height:12px;background:#ff5b45;box-shadow:0 0 0 2px var(--edge),inset 2px 2px 0 #ff9f8a}
.resolve-pip.spent,.resolve-pip[data-active=false]{background:#5a3a26;box-shadow:0 0 0 2px var(--edge)}
#resolve-label{color:var(--cream)}
.resolve-track{height:6px;margin-top:6px;background:#3b2416;box-shadow:0 0 0 2px var(--edge)}
#resolve-progress{display:block;height:100%;width:0;background:var(--gold)}
.weather-panel{top:calc(74px + env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));display:flex;align-items:center;gap:8px;max-width:calc(100% - 268px)}
.weather-panel svg{margin:-4px -2px -4px -8px}
.weather-panel div{min-width:0}
.weather-panel strong{display:block;font-weight:400}
.weather-panel small{display:block;color:#e0b47a;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.bottom-hud{position:absolute;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:calc(40px + env(safe-area-inset-bottom));display:flex;justify-content:space-between;align-items:flex-end;gap:10px}
.bottom-hud .hud-panel{position:relative}
.speed-panel,.score-panel{width:168px}
.speed-panel strong,.score-panel strong{font:400 32px/36px var(--display)}
.speed-panel span{color:#e0b47a}
.score-panel #combo{position:absolute;right:2px;top:0;color:var(--gold)}
.score-panel small{display:none}
.speed-meter{height:6px;margin:4px 0 2px;background:#3b2416;box-shadow:0 0 0 2px var(--edge)}
.speed-meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--gold),#ff7a3d)}
.toast,.play-hint,.recovery-banner{position:absolute;left:50%;width:max-content;max-width:calc(100% - 24px);padding:0 6px;text-align:center;pointer-events:none}
.bottom-hud>.toast{bottom:100%;margin-bottom:10px;opacity:0;transform:translate(-50%,8px);transition:opacity .15s steps(3),transform .15s steps(3)}
.bottom-hud>.toast.visible{opacity:1;transform:translate(-50%,0)}
.play-hint,.recovery-banner{bottom:calc(132px + env(safe-area-inset-bottom));transform:translateX(-50%)}
.keyboard-hint{position:absolute;left:0;right:0;bottom:max(8px,env(safe-area-inset-bottom));display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 6px;padding:0 10px;color:var(--cream);text-shadow:var(--outline)}
.keyboard-hint span{margin:0 2px}
kbd{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 4px;font:400 16px/20px var(--pixel);color:var(--ink);background:#fde9c1;box-shadow:0 0 0 2px var(--edge),inset -2px -2px 0 #d9b27a;text-shadow:none}
.lodge-prompt{position:absolute;left:50%;bottom:calc(184px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;gap:8px;height:54px;white-space:nowrap;pointer-events:auto;animation:glow .8s steps(4) infinite alternate}
.lodge-prompt:active{transform:translate(-50%,2px)}
.lodge-prompt>svg{margin:0 -4px 0 -10px}
.lodge-prompt span{font-size:0}
.lodge-prompt strong{font-size:16px}
.lodge-prompt kbd{margin-right:-8px}
.touch-controls{display:none}
body[data-state=paused] .touch-controls,body[data-state=settings] .touch-controls,body[data-state=paused] .play-hint,body[data-state=paused] .recovery-banner,body[data-state=settings] .recovery-banner,body[data-state=paused] .lodge-prompt,body[data-state=settings] .lodge-prompt{display:none}

/* Boards that stand in front of the picture. */
.overlay{position:absolute;inset:0;z-index:8;display:flex;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:#0b0a1eb0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8a6240 transparent;pointer-events:auto}
.modal{position:relative;flex-shrink:0;width:min(440px,100%);margin:auto;padding:0 2px;text-align:center;animation:arrive .2s steps(3) both}
.modal .eyebrow{justify-content:center}
.modal h2,.lodge-card h2{font:400 32px/36px var(--display);margin:4px 0 8px}
h1 span,h2 span{color:var(--accent)}
.modal>p:not(.eyebrow){color:var(--soft);margin-bottom:12px}
.emblem{position:absolute;left:50%;top:-112px;transform:translateX(-50%)}
svg.emblem{top:-116px}
.modal .garland{left:50%;top:-52px;margin-left:-171px}
.pause-links{display:flex;flex-wrap:wrap;justify-content:center;gap:0 4px;margin-top:6px}
.result-stats{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:8px;text-align:left}
.result-stats>div{padding:0 2px;min-width:0}
.result-stats small{display:block;color:var(--soft);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.result-stats strong{display:block;font:400 32px/36px var(--display);white-space:nowrap}
.result-recoveries{display:flex;justify-content:space-between;margin:0 4px 10px;color:var(--soft)}
.share-status{color:var(--accent);margin:8px 0 0;overflow-wrap:anywhere}
.share-status:empty{display:none}
.settings-modal,.help-modal{width:min(560px,100%);text-align:left}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:8px}
.modal-head .eyebrow{justify-content:flex-start}
.setting-label{display:block;margin-top:8px}
.setting-label small,.toggle small,.condition-note,.lens-endpoints,.lens-setting p,.help-daily{display:none}
select{appearance:none;-webkit-appearance:none;display:block;width:100%;min-width:0;min-height:44px;margin:4px 0 0;padding:0 40px 0 10px;border:0;border-radius:0;color:var(--ink);text-overflow:ellipsis;cursor:pointer;
 background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M0 0h12v2H0zM2 2h8v2H2zM4 4h4v2H4z' fill='%233b2416'/%3E%3C/svg%3E") right 12px center/12px 6px no-repeat,#fff3d6;box-shadow:0 0 0 2px var(--ink),inset -2px -2px 0 #e3c48f}
select option{color:#3b2416;background:#fff3d6}
input[type=range]{appearance:none;-webkit-appearance:none;display:block;width:100%;min-height:44px;margin:0;background:none;cursor:pointer}
input[type=range]::-webkit-slider-runnable-track{height:8px;background:#6b4326;box-shadow:0 0 0 2px var(--ink)}
input[type=range]::-moz-range-track{height:8px;background:#6b4326;box-shadow:0 0 0 2px var(--ink)}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:24px;margin-top:-8px;border:0;border-radius:0;background:var(--gold);box-shadow:0 0 0 2px var(--ink),inset -2px -2px 0 #d98a2b}
input[type=range]::-moz-range-thumb{width:16px;height:24px;border:0;border-radius:0;background:var(--gold);box-shadow:0 0 0 2px var(--ink),inset -2px -2px 0 #d98a2b}
input[type=range]:disabled{opacity:.45;cursor:default}
.condition-fieldset{min-width:0;margin:12px 0 4px;padding:0 4px 4px}
.condition-fieldset legend{padding:0 6px;color:var(--soft)}
.condition-heading{display:none}
.condition-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 12px}
.condition-grid>div{min-width:0}
.condition-grid .setting-label{margin-top:0}
.lens-setting{margin-top:8px}
.lens-setting .setting-label{display:flex;justify-content:space-between;gap:12px}
.lens-setting output,.photo-range output{color:var(--accent)}
.mix-setting{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.toggle{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;border-top:2px dashed #b98a58;cursor:pointer}
.toggle input{position:absolute;right:0;top:50%;width:48px;height:28px;margin:-14px 0 0;opacity:0;cursor:pointer}
.toggle i{position:relative;flex-shrink:0;width:44px;height:24px;margin-right:2px;background:#6b4326;box-shadow:0 0 0 2px var(--ink);pointer-events:none}
.toggle i:after{content:"";position:absolute;left:4px;top:4px;width:16px;height:16px;background:#fde9c1;box-shadow:inset -2px -2px 0 #d9b27a}
.toggle input:checked+i{background:#e2702c}
.toggle input:checked+i:after{left:24px}
.toggle input:focus-visible+i{outline:4px solid var(--gold);outline-offset:2px}
.setting-note{display:flex;align-items:center;gap:6px;margin:8px 0 10px;padding:0 4px;color:var(--soft)}
.setting-note svg{margin:-6px -4px -6px -8px}
.help-intro{color:var(--soft);margin-bottom:8px}
.control-sheet{padding:0 4px}
.control-sheet>div{display:grid;grid-template-columns:168px 1fr;align-items:center;gap:8px;min-height:36px}
.control-sheet>div+div{border-top:2px dashed #c79a66}
.control-sheet>div>span{display:flex;align-items:center;gap:6px;white-space:nowrap}
.control-sheet strong{font-weight:400}
.control-alt{color:var(--soft)}
.help-platforms{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:10px 0}
.help-platforms p{color:var(--soft)}
.help-field-note{display:flex;align-items:flex-start;gap:6px;margin-bottom:10px;padding:0 4px}
.help-field-note svg{margin:-4px -4px 0 -8px}
.help-modal .skis{right:-36px;top:-104px}

/* A visit to a refuge. */
.lodge{position:absolute;inset:0;z-index:4;display:flex;padding:8px clamp(12px,round(4cqw,4px),64px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8a6240 transparent;background:linear-gradient(90deg,#0b0a1e99,#0b0a1e33 44%,#0b0a1e00 62%)}
.lodge-card{position:relative;flex-shrink:0;width:min(440px,100%);margin:auto 0;padding:0 2px;pointer-events:auto;animation:arrive .3s steps(3) both}
.lodge-card .cat{right:-30px;top:-96px}
.lodge-place{margin-left:auto;color:var(--soft);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.lodge-copy{display:none}
.lodge-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.lodge-action{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:112px;padding:0;white-space:nowrap;text-align:center;transition:transform .1s,filter .1s}
.lodge-action strong{font-weight:400}
.lodge-action small{display:none}
.lodge-action:disabled{filter:saturate(.35) brightness(.92)}
.lodge-status{min-height:20px;margin-bottom:8px;color:var(--accent);text-align:center}

/* The photo desk. */
.photo-mode{position:absolute;inset:0;z-index:6}
.photo-header{position:absolute;left:0;right:0;top:0;display:flex;justify-content:space-between;align-items:flex-start;gap:8px;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))}
.photo-brand{display:flex;align-items:center;gap:10px;min-width:0;color:var(--cream);text-shadow:var(--outline)}
.photo-brand strong{display:block;white-space:nowrap}
.photo-brand small{display:block;color:var(--gold);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.photo-actions{display:flex;gap:6px;pointer-events:auto}
.photo-light{display:flex;align-items:center;gap:4px;min-height:44px;padding:0 2px;white-space:nowrap;transition:transform .1s,filter .1s}
.photo-light svg{margin:-8px -4px -8px -8px}
.photo-tools{position:absolute;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:min(344px,calc(100% - 24px));max-height:calc(100cqh - 86px);padding:0 4px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8a6240 transparent;pointer-events:auto}
.photo-tools h2{font-weight:700;margin:2px 0}
.photo-tools>p{color:var(--soft);margin-bottom:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.photo-range{margin-top:6px}
.photo-range label{display:flex;justify-content:space-between;gap:8px}
.photo-condition-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 8px}
.photo-condition-grid>div{min-width:0}
.photo-tip{display:none}
.photo-tools .primary{margin-top:10px}
.photo-tools .text-button{display:block;margin:2px auto 0}
#photo-status{color:var(--accent);text-align:center}
.photo-reticle{position:absolute;inset:13% 15%;pointer-events:none}
.photo-reticle i{position:absolute;width:24px;height:24px;border:solid var(--cream);border-width:0;filter:drop-shadow(2px 2px 0 var(--edge))}
.photo-reticle i:nth-child(1){top:0;left:0;border-top-width:4px;border-left-width:4px}
.photo-reticle i:nth-child(2){top:0;right:0;border-top-width:4px;border-right-width:4px}
.photo-reticle i:nth-child(3){bottom:0;left:0;border-bottom-width:4px;border-left-width:4px}
.photo-reticle i:nth-child(4){bottom:0;right:0;border-bottom-width:4px;border-right-width:4px}
.photo-mode.preview .photo-tools,.photo-mode.preview .photo-reticle{display:none}

/* Finding the snow. */
.loading{position:absolute;inset:0;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:16px;text-align:center;color:var(--cream);background:radial-gradient(90% 70% at 50% 44%,#3b2c52 0%,#1f1c40 48%,#0f0f26 100%);pointer-events:auto}
.loading .eyebrow{display:none}
.loading h1{font:400 32px/36px var(--display);text-shadow:0 4px 0 var(--edge)}
.loading p{color:#f1cf95;max-width:440px;overflow-wrap:anywhere}
.loader{width:176px;height:12px;background:#3b2416;box-shadow:0 0 0 2px var(--edge),0 0 0 4px #8a5a36;overflow:hidden}
.loader i{display:block;width:40%;height:100%;background:var(--gold);animation:load 1.2s steps(12) infinite}
.loading.error .loader{display:none}
.loading-retry{width:min(400px,100%)}
.no-script{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px;text-align:center;color:var(--cream);background:var(--night)}
.no-script p{max-width:400px}

/* Touch. */
@media(any-pointer:coarse){
 .keyboard-hint,.lodge-prompt kbd,.touch-hint{display:none}
 .touch-controls{position:absolute;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));bottom:calc(10px + env(safe-area-inset-bottom));display:flex;justify-content:space-between;align-items:flex-end;gap:8px;pointer-events:none;user-select:none;-webkit-user-select:none}
 .touch-controls button{display:grid;place-items:center;width:60px;height:54px;flex-shrink:0;touch-action:none;pointer-events:auto}
 .touch-controls button svg{margin:-12px}
 .touch-controls button span{display:none}
 .touch-steering>div,.touch-actions{display:flex;gap:6px}
 .bottom-hud{bottom:calc(74px + env(safe-area-inset-bottom))}
 .play-hint,.recovery-banner{bottom:calc(166px + env(safe-area-inset-bottom))}
 .lodge-prompt{bottom:calc(240px + env(safe-area-inset-bottom))}
}

/* Narrow screens. */
@container (max-width:900px){.postcard{display:none}}
@container (min-width:761px){.lodge-action svg.tiny{display:none}}
@container (max-width:760px){
 .home{justify-content:center}
 .lodge{align-items:flex-end;justify-content:center;padding:66px 10px 8px;background:linear-gradient(180deg,#0b0a1e00 30%,#0b0a1ea8)}
 .lodge-card{margin:auto 0 0}
 .lodge-action{min-height:0;flex-direction:row;justify-content:flex-start;gap:6px;height:56px}
 .lodge-action svg.big{display:none}
 .lodge-action svg.tiny{display:block;margin:-8px -6px -8px -10px}
 .distance-panel{width:184px}
 .distance-panel .eyebrow>:first-child{display:none}
 .weather-panel{max-width:calc(100% - 208px)}
 .weather-panel svg,.weather-panel small{display:none}
 .speed-panel,.score-panel{width:136px}
 .help-platforms{grid-template-columns:1fr}
 .control-sheet>div{grid-template-columns:1fr;gap:0;padding:4px 0}
}
@container (max-width:520px){
 .hero,.modal,.lodge-card{border-width:36px 30px 34px;border-image:url("./assets/ui/frame-s.png") 18 15 17 15 fill/36px 30px 34px 30px/0 stretch}
 .home{padding-top:58px}
 .hero{margin-top:128px}
 .lodge-actions{grid-template-columns:1fr}
 .hero .logo{top:-164px}
 .hero .cat{right:-24px;top:-62px}
 .lodge-card .cat{right:-18px;top:-62px}
 .emblem{top:-78px}
 svg.emblem{top:-82px}
 .modal .garland{top:-30px}
 .help-modal .skis{display:none}
 .wordmark{display:none}
 body[data-state=home] .top-actions{margin-top:0}
 .mix-setting,.condition-grid,.photo-condition-grid{grid-template-columns:minmax(0,1fr)}
 .photo-brand .mark,.photo-brand small{display:none}
 .daily-date{display:none}
}
@container (max-width:372px){
 .top-actions{gap:2px}
 .touch-controls{gap:4px;left:6px;right:6px}
 .touch-controls button{width:52px}
 .touch-steering>div,.touch-actions{gap:4px}
 .result-stats strong{font:700 16px/20px var(--pixel)}
}
/* Short screens. */
@container (max-height:640px){
 .gear svg.big{display:none}
 .gear svg.tiny{display:block;margin:-4px 0}
 .lodge-action{min-height:0;flex-direction:row;justify-content:flex-start;gap:6px;height:56px}
 .lodge-action svg.big{display:none}
 .lodge-action svg.tiny{display:block;margin:-8px -6px -8px -10px}
}
@container (max-height:560px) and (min-width:600px){
 .home{padding-top:64px}
 .hero{width:min(680px,100%);margin-top:0;display:grid;grid-template-columns:1fr 1fr;gap:0 16px;align-content:start;border-width:36px 30px 34px;border-image:url("./assets/ui/frame-s.png") 18 15 17 15 fill/36px 30px 34px 30px/0 stretch}
 .hero .logo,.hero .cat{display:none}
 body[data-state=home] .wordmark{visibility:visible}
 .equipment-label,.equipment,.help-link{grid-column:1}
 .equipment{margin-bottom:0}
 .hero #start{grid-column:2;grid-row:1/3;align-self:end}
 .hero #zen{grid-column:2;grid-row:3}
 .hero #daily{grid-column:2;grid-row:4}
 .help-link{grid-row:3/5;align-self:center}
 .distance-panel,.weather-panel{top:calc(66px + env(safe-area-inset-top))}
 .lodge{align-items:flex-start;justify-content:flex-start;padding:66px 10px 8px}
 .lodge-card{margin:0;border-width:36px 30px 34px;border-image:url("./assets/ui/frame-s.png") 18 15 17 15 fill/36px 30px 34px 30px/0 stretch}
 .lodge-card .cat{display:none}
 .lodge-card h2{font:700 16px/20px var(--pixel);margin:2px 0 6px}
 .play-hint{display:none}
}
@container (max-height:430px){
 .distance-panel .resolve,.hud-sub{display:none}
 .bottom-hud .hud-panel{display:none}
}
body.reduced *,body.reduced *:before,body.reduced *:after{animation-duration:.001ms!important;transition-duration:.001ms!important}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;transition-duration:.001ms!important}}
