:root{--control-width:148px;--control-left:20px;--content-left:188px}
header{padding:24px 30px;min-height:90px}header .prototype{margin-left:auto}header{flex-wrap:nowrap}
#gameControls{position:fixed;left:var(--control-left);top:104px;width:var(--control-width);z-index:25;display:flex;flex-direction:column;gap:9px;max-height:calc(100dvh - 210px);overflow-y:auto;scrollbar-width:thin;padding:10px;background:#112c37eb;border:1px solid #dfca9c38;border-radius:13px;box-shadow:0 6px 20px #0002;backdrop-filter:blur(10px)}
#gameControls button{width:100%;margin:0;min-height:40px;text-align:left;white-space:normal;font-size:12px;line-height:1.35;padding:10px 11px;background:#244b51dc;border-radius:7px;flex-shrink:0}
#gameControls button:hover{background:#386267}#gameControls button:focus-visible{outline:2px solid #f0cf8e;outline-offset:2px}
#gameControlButtons,#contextControls{display:flex;flex-direction:column;gap:8px}#contextControls:empty{display:none}#contextControls #warehouseClose,#contextControls #skiLeave{display:none}
#gameControls #fullscreenToggle{border-color:#cdb57a66;background:#4a584bd9}#gameControls #controlsToggle{display:none}
.headline{left:var(--content-left);top:116px}.headline h1{font-size:34px}.headline p{max-width:285px}
.dashboard{left:var(--content-left);gap:22px;padding:16px 20px}#prompt{bottom:110px;left:60%;transform:translateX(-30%)}.bottom{left:var(--content-left)}
#displayNotice{position:fixed;z-index:90;left:var(--content-left);bottom:30px;max-width:min(430px,calc(100vw - 220px));padding:13px 16px;border:1px solid #d8bb7b77;border-radius:10px;background:#17383cf5;color:#fff1cf;font-size:13px;line-height:1.5;box-shadow:0 6px 25px #0004}#displayNotice[hidden]{display:none}
body.warehouse #gameControls{top:24px;max-height:calc(100dvh - 48px)}body.warehouse #gameControls #pause,body.warehouse #gameControls #warehouseOpen,body.warehouse #gameControls #skiOpen{display:none!important}body.warehouse #contextControls #warehouseClose{display:block}
#warehousePanel{left:var(--content-left);right:24px}#warehousePanel h2{font-size:25px}#warehouseHud{left:var(--content-left);max-width:min(540px,calc(100vw - 225px))}#packingChecklist{top:180px}
body.skiing #contextControls #skiLeave{display:block}body.skiing #gameControls{top:100px}#skiHud{left:var(--content-left);right:22px}#skiTop{justify-content:flex-start}#skiRouteCard{max-width:100%}#skiBuddyText{max-width:calc(100vw - 220px);left:calc(50% + 75px)}
@media(max-width:1100px){:root{--control-width:134px;--control-left:16px;--content-left:168px}.headline h1{font-size:28px}.headline p{font-size:11px;max-width:220px}.dashboard{gap:15px;padding:13px 15px}.dashboard small{letter-spacing:1px}#prompt{left:var(--content-left);bottom:205px;transform:none}.bottom{font-size:9px}#warehousePanel{padding:16px}#warehousePanel h2{font-size:22px}#skiRouteCard{width:265px}#skiRouteCard h2{font-size:20px}}
@media(max-width:700px){:root{--control-width:122px;--control-left:12px;--content-left:146px}header{padding:17px 14px;min-height:70px}.brand{font-size:16px}.brand small{font-size:7px;letter-spacing:2px}.prototype{display:none}#gameControls{top:79px;padding:7px;gap:7px;max-height:calc(100dvh - 250px)}#gameControls button{font-size:11px;min-height:38px;padding:9px 8px}#gameControls #controlsToggle{display:block}#gameControls[data-expanded="false"] #gameControlButtons{display:none}.headline{display:none}aside{top:79px;right:12px;width:175px;padding:12px;max-height:calc(100dvh - 310px);overflow:auto}aside h2{font-size:17px;margin:9px 0}.stop{padding:8px 0;gap:7px}.stop b{font-size:10px}.stop small,.stop .wish-status{font-size:9px}.route-note{font-size:9px;margin-top:12px}.dashboard{left:12px;right:12px;bottom:90px;padding:12px;gap:8px;justify-content:space-between}.dashboard strong{font-size:19px}.dashboard small{font-size:7px;letter-spacing:.5px}#mode{font-size:12px}#prompt,body.indoors #prompt{left:12px;right:12px;bottom:163px;max-width:none;font-size:11px;padding:9px 12px;transform:none}.bottom{left:12px;right:12px;bottom:12px}.bottom>div{max-width:calc(100% - 70px)}#touch{bottom:220px}#displayNotice{left:12px;bottom:20px;max-width:calc(100vw - 24px)}body.warehouse #gameControls{top:12px;max-height:calc(100dvh - 220px)}#warehousePanel{left:146px;top:12px;right:12px;padding:12px}#warehousePanel .eyebrow{font-size:7px;letter-spacing:1px}#warehousePanel h2{font-size:18px}#warehousePanel p{font-size:10px;line-height:1.4}#warehousePanel .warehouseHelp{font-size:9px}#warehouseHud{left:12px;right:12px;max-width:none;bottom:12px}#packingChecklist{top:190px;right:12px;width:175px;max-height:calc(100dvh - 400px)}body.skiing #gameControls{top:79px}#skiHud{inset:79px 12px 14px 146px}#skiRouteCard{width:100%;padding:10px;max-width:100%}#skiRouteCard .eyebrow{font-size:7px;letter-spacing:1px}#skiRouteCard h2{font-size:16px;margin:6px 0 9px}#skiObjective{font-size:11px}#skiStats{gap:9px;flex-wrap:wrap}#skiStats small{font-size:7px}#skiStats strong{font-size:12px}#skiBottom{position:fixed;left:12px;right:12px;bottom:12px}#skiActions{margin-left:auto;justify-content:flex-end;max-width:55%}#skiBuddyText{left:50%;max-width:calc(100vw - 24px);bottom:190px}#skiControls{max-width:100%;font-size:10px}}
@media(max-height:570px){#gameControls,body.skiing #gameControls{top:76px;max-height:calc(100dvh - 95px)}.headline{display:none}aside{top:77px;max-height:calc(100dvh - 180px);overflow:auto}.dashboard{bottom:66px;padding:9px 14px}.dashboard small{margin-bottom:5px}#prompt,body.indoors #prompt{bottom:133px}.bottom{bottom:9px}#skiHud{top:76px}#skiRouteCard{padding:10px}#skiRouteCard h2{display:none}#skiBuddyText{bottom:130px}#warehousePanel .warehouseHelp{display:none}#packingChecklist{top:150px;max-height:calc(100dvh - 310px)}}

header a.brand:focus-visible{outline:2px solid #f0cf8e;outline-offset:8px;border-radius:3px}

/* Coarse-pointer and small-screen layout; desktop layout above stays intact. */
#routeToggle,#routeClose,#stockToggle,#packingToggle,#touchZoom{display:none}
#touch button,#skiTouch button{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
body.touch-ui{--touch-bottom:max(12px,env(safe-area-inset-bottom));--touch-left:max(12px,env(safe-area-inset-left));--touch-right:max(12px,env(safe-area-inset-right))}
body.touch-ui header{padding:14px 16px;min-height:58px}body.touch-ui header .brand{font-size:13px;letter-spacing:1px;max-width:132px}body.touch-ui header .brand small{font-size:6px;letter-spacing:1px;margin-left:15px}body.touch-ui header .prototype,body.touch-ui .headline,body.touch-ui .bottom>div{display:none}
body.touch-ui #gameControls,body.touch-ui.warehouse #gameControls,body.touch-ui.skiing #gameControls{top:64px;left:var(--touch-left);width:136px;padding:6px;gap:6px;max-height:calc(100dvh - 235px);z-index:35}
body.touch-ui #gameControls button{min-height:44px;font-size:12px;padding:10px;line-height:1.25}
body.touch-ui #gameControls #controlsToggle,body.touch-ui #routeToggle{display:block}
body.touch-ui.warehouse #routeToggle,body.touch-ui.skiing #routeToggle{display:none}
body.touch-ui #gameControls[data-expanded="false"] #gameControlButtons,body.touch-ui #gameControls[data-expanded="false"] #fullscreenToggle{display:none}
body.touch-ui #gameControls[data-expanded="true"]{width:174px}
body.touch-ui #contextControls #warehouseClose,body.touch-ui #contextControls #skiLeave{font-size:11px}
body.touch-ui aside{display:none;position:fixed;top:64px;right:var(--touch-right);width:min(260px,calc(100vw - 172px));max-height:calc(100dvh - 230px);overflow:auto;z-index:34;padding:14px;background:#102b38f5}
body.touch-ui[data-route-open="true"] aside{display:block}body.touch-ui #routeClose{display:block;min-height:44px;width:100%;margin-top:10px}
body.touch-ui aside .stop b{font-size:12px}body.touch-ui aside .stop small,body.touch-ui aside .route-note{font-size:11px}
body.touch-ui .dashboard{left:160px;right:var(--touch-right);top:14px;bottom:auto;width:auto;gap:8px;padding:8px 10px;min-height:40px;border-radius:8px;z-index:20}
body.touch-ui .dashboard>div{min-width:0}body.touch-ui .dashboard>div:last-child{display:none}body.touch-ui .dashboard small{font-size:7px;letter-spacing:0;margin-bottom:3px;white-space:normal}body.touch-ui .dashboard strong{font-size:16px}body.touch-ui .dashboard em{font-size:12px}
body.touch-ui #touch,body.touch-ui.warehouse #touch{display:block!important;position:fixed;inset:0;pointer-events:none;width:auto;z-index:30}
body.touch-ui.skiing #touch{display:none!important}
body.touch-ui #touchMove{position:absolute;left:var(--touch-left);bottom:var(--touch-bottom);display:grid;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:5px;pointer-events:auto}
body.touch-ui #touchMove [data-key="w"]{grid-area:1/2}body.touch-ui #touchMove [data-key="a"]{grid-area:2/1}body.touch-ui #touchMove [data-key="s"]{grid-area:2/2}body.touch-ui #touchMove [data-key="d"]{grid-area:2/3}
body.touch-ui #touchActions{position:absolute;right:var(--touch-right);bottom:var(--touch-bottom);width:168px;display:grid;grid-template-columns:1fr 1fr;gap:5px;pointer-events:auto}
body.touch-ui #touch button{min-width:44px;min-height:44px;padding:8px 6px;font-size:12px;background:#173b40f5;border-color:#b8cdc66b;box-shadow:0 2px 7px #0003}
body.touch-ui #touchMove button{font-size:22px}body.touch-ui #sitToggle{grid-column:1/-1}
body.touch-ui[data-travel-mode="fly"] #touchDoor{display:none}body.touch-ui[data-travel-mode="fly"] #touchE{grid-column:1/-1}
body.touch-ui:not([data-travel-mode="fly"]) #touch [data-key="q"],body.touch-ui:not([data-travel-mode="fly"]) #touch [data-key="r"],body.touch-ui:not([data-travel-mode="fly"]) #sitToggle,body.touch-ui.warehouse #touchActions{display:none}
body.touch-ui #touchZoom{display:flex;position:fixed;right:var(--touch-right);top:66px;gap:5px;z-index:31}body.touch-ui #touchZoom button{width:44px;height:44px;padding:4px;font-size:22px;background:#173b40eb}
body.touch-ui[data-route-open="true"] #touchZoom,body.touch-ui.warehouse #touchZoom,body.touch-ui.skiing #touchZoom{display:none}
body.touch-ui #prompt,body.touch-ui.indoors #prompt{position:fixed;left:var(--touch-left);right:var(--touch-right);bottom:calc(var(--touch-bottom) + 154px);max-width:none;font-size:11px;padding:8px 11px;line-height:1.4;transform:none;pointer-events:none}
body.touch-ui .bottom{bottom:calc(var(--touch-bottom) + 106px);left:var(--touch-left);right:auto}body.touch-ui .bottom button{min-height:40px;font-size:11px;padding:7px 10px}
body.touch-ui dialog{padding:22px;max-height:calc(100dvh - 32px);overflow:auto}body.touch-ui dialog button{min-height:44px}
body.touch-ui #displayNotice{left:12px;bottom:176px;max-width:calc(100vw - 24px);z-index:90}
body.touch-ui.warehouse #gameControls{top:12px}
body.touch-ui.warehouse #warehousePanel{left:160px;right:var(--touch-right);top:12px;padding:10px;max-height:145px;overflow:hidden}body.touch-ui #warehousePanel h2{font-size:17px;margin:0 0 6px}body.touch-ui #warehousePanel p{font-size:10px;line-height:1.4;margin:4px 0}body.touch-ui #warehousePanel .eyebrow,body.touch-ui #warehousePanel .warehouseHelp{display:none}
body.touch-ui #warehouseHud{left:170px;right:var(--touch-right);bottom:var(--touch-bottom);max-width:none;max-height:50dvh;overflow:auto;padding:9px;z-index:31;background:#173d34f5}
body.touch-ui #warehouseHud button{min-height:44px;width:100%;padding:8px;font-size:11px}body.touch-ui #stockToggle,body.touch-ui #packingToggle{display:block;margin-bottom:5px}
body.touch-ui #warehouseStock{display:none;grid-template-columns:1fr 1fr;gap:10px;padding:8px 0}body.touch-ui[data-stock-open="true"] #warehouseStock{display:grid}
body.touch-ui #warehouseStock b,body.touch-ui #warehouseStock span{font-size:10px}
body.touch-ui #warehouseStatus{font-size:11px;line-height:1.4;margin:7px 0}
body.touch-ui #packingChecklist{display:none!important;top:150px;right:var(--touch-right);width:min(250px,calc(100vw - 172px));max-height:calc(50dvh - 170px);padding:10px;overflow:auto;pointer-events:auto;z-index:32;background:#173d34f5}
body.touch-ui.warehouse[data-packing-open="true"] #packingChecklist{display:block!important}body.touch-ui #packingChecklist .eyebrow,body.touch-ui #packingTip{display:none}body.touch-ui #packingProgress{font-size:15px;margin:0 0 8px}body.touch-ui #packingList b,body.touch-ui #packingList small{font-size:11px}
body.touch-ui #skiHud{inset:64px var(--touch-right) var(--touch-bottom) 160px}body.touch-ui #skiRouteCard{width:100%;max-width:none;padding:10px}body.touch-ui #skiRouteCard h2,body.touch-ui #skiRouteCard>.eyebrow{display:none}body.touch-ui #skiObjective{font-size:11px;line-height:1.4}body.touch-ui #skiStats{gap:8px;flex-wrap:wrap;margin-top:6px}body.touch-ui #skiStats strong{font-size:12px}body.touch-ui #skiStats small{font-size:7px}
body.touch-ui #skiBottom{position:fixed;left:var(--touch-left);right:var(--touch-right);bottom:var(--touch-bottom);display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end}
body.touch-ui #skiControls{padding:0;background:none;max-width:100%}body.touch-ui #skiControls>strong,body.touch-ui #skiControls .ski-keyboard{display:none}body.touch-ui #skiTouch{display:grid;grid-template-columns:repeat(4,44px);gap:5px}body.touch-ui #skiTouch button{width:44px;min-height:44px;padding:6px;font-size:14px;background:#173b40f5}body.touch-ui #skiBrake{font-size:10px!important}
body.touch-ui #skiActions{max-width:100%;gap:5px;margin-left:auto}body.touch-ui #skiActions button{min-height:44px;padding:8px;font-size:11px}body.touch-ui #skiWave{display:none}body.touch-ui #skiBuddyText{bottom:126px;left:50%;max-width:calc(100vw - 24px);font-size:12px;padding:8px 12px}
@media(max-height:570px){body.touch-ui .dashboard{left:auto;width:220px}body.touch-ui #gameControls,body.touch-ui.skiing #gameControls{top:60px;max-height:calc(100dvh - 175px)}body.touch-ui #prompt,body.touch-ui.indoors #prompt{left:160px;right:192px;bottom:var(--touch-bottom);max-height:80px;overflow:hidden}body.touch-ui #touchActions{width:168px}body.touch-ui #sitToggle{display:none}body.touch-ui .bottom{bottom:110px}body.touch-ui aside{max-height:calc(100dvh - 180px)}body.touch-ui #warehousePanel{max-height:82px}body.touch-ui #warehouseHud{left:auto;width:220px;max-height:calc(100dvh - 110px)}body.touch-ui #packingChecklist{top:110px;right:246px;width:230px;max-height:calc(100dvh - 128px)}body.touch-ui #skiHud{top:12px;left:160px;right:12px}body.touch-ui #skiRouteCard{max-width:340px}body.touch-ui #skiBuddyText{bottom:75px;max-width:calc(100vw - 310px)}body.touch-ui #skiStats{flex-wrap:nowrap}body.touch-ui #skiBottom{flex-wrap:nowrap}}
@media(max-width:370px){body.touch-ui #touchActions{width:148px}body.touch-ui #warehouseHud{left:152px}}
/* Leave the home link clear when starting the ski trail on a landscape phone. */
@media(max-height:570px) and (orientation:landscape){
 body.touch-ui:not(.ski-race) #skiHud{left:auto;right:var(--touch-right);width:min(250px,calc(100vw - 330px))}
}
header a.return-home{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;margin-left:8px;border:1px solid #c6ae7e;border-radius:6px;background:#173535;color:#fff5dd;font:600 14px/1.2 Arial,sans-serif;letter-spacing:normal;text-decoration:none;white-space:nowrap;pointer-events:auto}header a.return-home:hover,header a.return-home:focus-visible{background:#335550;outline:2px solid #f0cf8e;outline-offset:2px}
#skiLevel{display:block;margin:.25rem 0;font:600 1.15rem/1.2 Georgia,serif}
#skiGoal{color:#ffe3a5;font-weight:600}
body.touch-ui #skiLevel{font-size:.88rem}
#skiRaceHud{position:fixed;bottom:20px;left:0;right:0;display:grid;grid-template-columns:1fr 1fr;gap:16px;pointer-events:none;text-align:center}
#skiRaceHud[hidden],#skiControls[hidden],#skiActions[hidden]{display:none}
#skiRaceHud>div{margin:auto;padding:10px 16px;border-radius:10px;background:#112c37eb;color:#fff2d5;max-width:90%}
body.ski-race #skiHud{top:82px;left:50%;right:auto;width:min(500px,calc(100vw - 350px));bottom:auto}
body.ski-race #skiRouteCard{transform:translateX(-50%);width:100%;padding:12px 16px}
body.ski-race #skiStats,body.ski-race #skiTrailName{display:none}
body.ski-race #skiBuddyText{white-space:pre-line}
body.ski-versus #world:after{content:"";position:fixed;top:0;bottom:0;left:50%;border-left:2px solid #fff8;pointer-events:none}
#skiResultText{white-space:pre-line}
#skiPodium{color:#8e5c13;font:800 28px/1.3 Georgia,serif;letter-spacing:1px;margin:16px 0}
#skiPodium[hidden]{display:none}
#skiResult.ski-winner{border:2px solid #d5b263;background:linear-gradient(150deg,#fff9e7,#f5e7bd);box-shadow:0 0 0 9px #eccb7522,0 20px 80px #0008;animation:skiPodiumReveal .45s ease-out}
#skiResult.ski-winner .eyebrow{display:none}
@keyframes skiPodiumReveal{from{opacity:0;transform:translate(-50%,-46%) scale(.94)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@media(prefers-reduced-motion:reduce){#skiResult.ski-winner{animation:none}}

/* The game and crawlable guide occupy separate areas of the page. */
body{overflow-x:hidden;overflow-y:auto}
#gameViewport{position:relative;height:calc(100dvh - 44px);min-height:280px;overflow:hidden;isolation:isolate;transform:translateZ(0)}
#gameViewport:fullscreen{width:100%;height:100dvh}
#gameViewport:focus{outline:none}
.headline p{margin-top:12px}
.game-page-nav{min-height:44px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;background:#173b40;border-top:1px solid #dfca9c38}
.game-page-nav a{display:inline-flex;align-items:center;min-height:44px;color:#f4ddb4;font-size:13px;text-underline-offset:4px}
.game-page-nav span{font-size:12px;color:#baccd3}
.game-summary{max-width:900px;margin:auto;padding:56px 32px 64px;line-height:1.8;scroll-margin-top:20px}
.game-summary-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}
.game-summary h1{font-size:38px;line-height:1.2;margin:22px 0 36px}
.game-summary-copy h2{font:25px/1.3 Georgia,serif;color:#fff6de;margin:32px 0 14px}
.game-summary p{font-size:16px;color:#d2dedb;margin:0 0 20px}
.game-summary .guide-links{display:flex;flex-wrap:wrap;gap:8px 24px;border-top:1px solid #dfca9c38;padding-top:20px;margin-top:32px}
.game-summary a{display:inline-flex;align-items:center;min-height:44px;color:#f4ddb4;text-underline-offset:4px}
.game-summary a:focus-visible,.game-page-nav a:focus-visible{outline:2px solid #f0cf8e;outline-offset:3px}
.game-summary:focus{outline:none}
@media(max-width:700px){
 .game-page-nav{padding:0 16px}.game-page-nav span{display:none}
 .game-summary{padding:32px 20px 44px}.game-summary h1{font-size:29px;margin:20px 0 28px}
 .game-summary-copy h2{font-size:23px}.game-summary-heading{align-items:flex-start}
 .game-summary-heading .eyebrow{line-height:44px;letter-spacing:1px}
}

/* Frosted touch controls reveal the scene while keeping labels crisp. */
body.touch-ui{
 --touch-control-fill:rgba(19,49,56,.82);
 --touch-control-blur:none;
}
@supports ((backdrop-filter:blur(8px)) or (-webkit-backdrop-filter:blur(8px))){
 body.touch-ui{--touch-control-fill:rgba(19,49,56,.42);--touch-control-blur:blur(8px) saturate(115%)}
}
body.touch-ui #gameControls{
 background:transparent;border-color:transparent;box-shadow:none;
 -webkit-backdrop-filter:none;backdrop-filter:none;
}
body.touch-ui :is(#touch button,#touchZoom button,#gameControls button,#gameControls #fullscreenToggle,.bottom button,#skiTouch button,#skiActions button,header a.return-home){
 background:var(--touch-control-fill);color:#fff9ed;
 border-color:rgba(239,247,244,.4);
 -webkit-backdrop-filter:var(--touch-control-blur);backdrop-filter:var(--touch-control-blur);
 box-shadow:inset 0 1px 0 #ffffff1c,0 2px 8px #071e2424;
 text-shadow:0 1px 3px #061b2ba6;
}
body.touch-ui :is(#touch button,#touchZoom button,#gameControls button,#gameControls #fullscreenToggle,.bottom button,#skiTouch button,#skiActions button,header a.return-home):active{
 background:rgba(19,49,56,.72);border-color:#fff1c6;
}

/* Direct entries wait for a deliberate start so countdown and music begin together. */
#skiReady{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:105;width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 130px);overflow:auto;box-sizing:border-box;padding:24px;border:1px solid #d7bd84;border-radius:18px;background:#f8f0e8f5;color:#24463e;box-shadow:0 16px 48px #071a2644;pointer-events:auto;text-align:center}
#skiReady[hidden]{display:none}
#skiReady h2{margin:0 0 12px;font:26px/1.2 Georgia,serif}
#skiReady p{font-size:14px;line-height:1.5;margin:10px 0}
#skiReady button{margin-top:8px;min-height:44px;padding:11px 28px;background:#32634f;color:#fff4dc}
#skiReady button:focus-visible{outline:3px solid #ae8139;outline-offset:3px}
#skiReady button:disabled{opacity:.5;cursor:default}
@media(max-height:570px){#skiReady{padding:16px;max-height:calc(100dvh - 80px)}#skiReady h2{font-size:22px}#skiReady p{font-size:12px;margin:7px 0}}
body.ski-race:not(.ski-versus) #skiBottom{position:fixed;left:var(--content-left);right:22px;bottom:74px;pointer-events:none}
body.touch-ui.ski-race #skiHud{top:64px;left:160px;right:var(--touch-right);bottom:auto;width:auto}
body.touch-ui.ski-race #skiRouteCard{transform:none;box-sizing:border-box;width:100%}
body.touch-ui.ski-race:not(.ski-versus) #skiBottom{left:var(--touch-left);right:var(--touch-right);bottom:var(--touch-bottom)}
body.touch-ui.ski-race #skiRaceHud{bottom:74px;left:12px;right:12px;gap:8px;font-size:11px}
body.touch-ui.ski-race #skiRaceHud>div{padding:7px 9px}
@media(max-height:570px) and (orientation:landscape){body.touch-ui.ski-race #skiHud{top:12px;left:auto;width:min(310px,calc(100vw - 330px))}}

/* On phones, keep a small edge tab available while the game stays clear. */
body.touch-ui #gameControls[data-expanded="false"]{left:env(safe-area-inset-left,0px);width:44px;padding:0;border:0;gap:0;overflow:visible}
body.touch-ui #gameControls[data-expanded="false"] :is(#gameControlButtons,#contextControls,#fullscreenToggle){display:none}
body.touch-ui #gameControls[data-expanded="false"] #controlsToggle{width:44px;min-height:52px;padding:0;border-radius:0 12px 12px 0;text-align:center;font-size:23px;background:rgba(19,49,56,.72)}
body.touch-ui #gameControls[data-expanded="true"] #controlsToggle{position:sticky;top:0;z-index:1;background:rgba(19,49,56,.9)}
@media(orientation:portrait){body.touch-ui.ski-race #skiHud{left:68px}}

/* A readable preview for browsers without the graphics API used by the game. */
#gameFallback[hidden]{display:none}
body.game-preview-only #gameViewport{height:auto;min-height:0;padding:100px 24px 32px}
body.game-preview-only #gameViewport>:not(header):not(#gameFallback){display:none!important}
body.game-preview-only header button,body.game-preview-only header .prototype{display:none}
#gameFallback{max-width:900px;margin:auto;display:grid;grid-template-columns:1.3fr 1fr;gap:28px;align-items:center}
#gameFallback img{display:block;width:100%;height:auto;border-radius:12px}
#gameFallback h2{font:30px/1.2 Georgia,serif;margin:0 0 16px}
#gameFallback p{font-size:15px;line-height:1.7;color:#d2dedb;margin:0 0 16px}
#gameFallback a{display:inline-flex;align-items:center;min-height:44px;color:#f4ddb4;text-underline-offset:4px}
#gameFallback button{min-height:44px;margin:0 12px 12px 0}
#gameFallback #gameStart{background:#bd3540;border-color:#df747b;padding:12px 20px}
#gameFallback a:focus-visible{outline:2px solid #f0cf8e;outline-offset:3px}
.game-festive-decor{position:absolute;inset:0;pointer-events:none}
.game-festive-decor span{display:none;position:absolute;aspect-ratio:1;background:url("/game-festive-decor.png") no-repeat;background-size:200% 200%;opacity:.68}
.game-festive-decor .festive-hat{display:block;width:48px;top:10px;right:20px;background-position:100% 100%;transform:rotate(9deg)}
@media(min-width:1180px){
 .game-festive-decor span{display:block}
 .game-festive-decor .festive-apple{width:100px;left:calc((100% - 900px)/4 + 16px);top:30%;background-position:0 0;transform:translate(-50%,-50%) rotate(-9deg)}
 .game-festive-decor .festive-cane{width:76px;left:calc((100% - 900px)/4 + 30px);top:77%;background-position:100% 0;opacity:.55;transform:translate(-50%,-50%) rotate(-14deg)}
 .game-festive-decor .festive-ribbon{width:87px;right:calc((100% - 900px)/4 + 2px);top:76%;background-position:0 100%;opacity:.58;transform:translate(50%,-50%) rotate(13deg)}
 .game-festive-decor .festive-hat{width:106px;right:calc((100% - 900px)/4 + 22px);top:22%;background-position:100% 100%;transform:translate(50%,-50%) rotate(11deg)}
}
@media(max-width:700px){body.game-preview-only #gameViewport{padding:80px 20px 24px}#gameFallback{grid-template-columns:1fr;gap:24px}#gameFallback h2{font-size:26px}}
