@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;600;700;800;900&family=Rye&display=swap');
.audio-check{margin:14px 0 18px}.audio-check button{border:0;background:transparent;color:#987045;font-size:12px;font-weight:800;padding:9px}.audio-check span{display:block;font-size:10px;color:#9b8974}.finished .scene-message{background:#fff5c9;color:#9a5a26;font-size:15px;padding:12px 20px;box-shadow:0 4px 20px #b7793330}.finished .clock strong{color:#ad622b}.party .scene-message{animation:celebration-pop .65s cubic-bezier(.2,1.7,.4,1) both}.party .badge{animation:star-turn 1s ease-out}.finished .landscape:after{content:'★';position:absolute;right:16px;top:67px;color:#f0bc4d;font-size:42px;text-shadow:0 3px 0 white;animation:star-turn 1s ease-out}.party .landscape{animation:finish-glow 2s ease-in-out 3}@keyframes celebration-pop{from{opacity:0;scale:.5}to{opacity:1;scale:1}}@keyframes star-turn{from{transform:rotate(-140deg) scale(.3)}to{transform:rotate(0) scale(1)}}@keyframes finish-glow{50%{box-shadow:0 0 0 4px #ecc367,0 0 34px #ecc36770}}@media(prefers-reduced-motion:reduce){.party .scene-message,.party .badge,.party .landscape,.finished .landscape:after{animation:none}}
:root{font-family:Nunito,ui-rounded,system-ui,sans-serif;color:#483323;background:#fbf5e8}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible,input:focus-visible{outline:3px solid #21978e;outline-offset:4px}main{max-width:1020px;margin:auto;padding:28px 30px 22px}header{display:flex;justify-content:space-between;align-items:center}.brand{font-weight:900;font-size:21px;text-decoration:none;color:inherit;display:flex;gap:10px;align-items:center}.badge{background:#eac265;border-radius:50%;padding:5px 10px;font-size:25px}.sound{border:1px solid #dfd3bc;background:transparent;color:#725c44;border-radius:24px;padding:10px 15px;font-size:13px;font-weight:800}.intro{text-align:center;margin:38px 0 28px}.eyebrow{font-size:10px;font-weight:900;letter-spacing:2.3px;color:#a16f43}h1{font-family:Rye,Georgia,serif;font-weight:400;font-size:clamp(36px,6vw,54px);margin:12px 0 8px}.intro p{margin:0;color:#8b7662;font-size:15px}.landscape{height:330px;position:relative;overflow:hidden;border-radius:22px;border:5px solid white;box-shadow:0 6px 24px #704e2210}.scenery{width:100%;height:100%;position:absolute}.trail{position:absolute;left:18px;right:18px;bottom:37px;height:185px}.sign{position:absolute;bottom:20px;font-weight:900;font-size:11px;letter-spacing:1px;background:#996742;color:#fff1d1;padding:7px;border-radius:4px;box-shadow:0 3px #67462b}.sign:after{content:'';position:absolute;top:100%;height:22px;width:5px;background:#89603e;left:50%}.start{left:0}.finish{right:0}.finish b{font-size:25px;position:absolute;bottom:35px;right:8px;color:#443125}#horse{position:absolute;width:145px;height:145px;bottom:7px;left:0;filter:drop-shadow(0 6px 2px #75502f22)}.scene-message{position:absolute;top:18px;left:50%;transform:translateX(-50%);background:#fff9e4e6;border-radius:30px;padding:8px 16px;font-size:12px;font-weight:900;white-space:nowrap}.progress{position:absolute;bottom:0;left:0;right:0;height:8px;background:#b7986c55}.progress div{height:100%;width:0;background:#e29441;transition:width .25s}.controls{text-align:center;max-width:430px;margin:25px auto 0}.clock{display:flex;flex-direction:column}.clock>span{color:#91775d;font-size:12px;font-weight:800}.clock strong{font-size:58px;line-height:1.15;font-weight:900;letter-spacing:1px;font-variant-numeric:tabular-nums}.clock #hint{font-size:11px;font-weight:600}.presets{display:flex;gap:9px;margin:22px 0 14px}.presets button{flex:1;background:#fffaf0;border:1px solid #dfd1b9;padding:12px 6px;border-radius:12px;color:#75573e;font-size:14px;font-weight:900}.presets .selected{background:#f4ddb2;border:2px solid #c6904f;padding:11px 5px;color:#6a4326}.custom{display:flex;justify-content:center;align-items:center;gap:9px;font-size:12px;color:#90765e;margin-bottom:20px}.custom input{width:60px;border:1px solid #dbcdb7;border-radius:8px;padding:7px;background:#fffaf0;text-align:center;color:#65472f;font-weight:800}.primary{width:100%;border:0;border-radius:14px;background:#b66336;color:white;font-weight:900;padding:17px 12px;box-shadow:0 4px #854829;font-size:16px}.primary:active{transform:translateY(2px);box-shadow:0 2px #854829}.reset{display:block;margin:17px auto 0;border:0;background:none;font-size:12px;color:#8b7055;padding:8px}.reset[hidden]{display:none}footer{text-align:center;margin-top:32px;color:#b2926e;font-size:11px;font-weight:800}footer small{display:block;font-weight:500;font-size:10px;margin-top:13px}#confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden}.piece{position:absolute;top:-25px;width:10px;height:15px;animation:fall 3.5s ease-in forwards}@keyframes fall{to{transform:translate(var(--drift),110vh) rotate(760deg)}}body.finished .landscape{box-shadow:0 0 0 3px #e9bc60}body.finished h1{color:#ad622b}@media(max-width:550px){main{padding:20px 16px max(20px,env(safe-area-inset-bottom))}.brand{font-size:17px}.sound{font-size:11px;padding:9px 10px}.intro{margin:30px 0 24px}.eyebrow{font-size:8px;letter-spacing:1.8px}.intro p{font-size:13px}.landscape{height:290px}.trail{left:10px;right:10px}#horse{width:115px;height:115px}.controls{margin-top:24px}.clock strong{font-size:54px}footer{margin-top:29px}}@media(prefers-reduced-motion:reduce){.piece{animation-duration:6s}}







#horse{height:auto;aspect-ratio:1;overflow:hidden;bottom:-10px;transition:left .1s linear}#horse .horse-sheet{width:1024px;height:1024px;animation:none;transform:none}

#horse{width:185px;aspect-ratio:240 / 230}#horse .horse-sheet{width:1024px;height:1024px}@media(max-width:550px){#horse{width:140px}} 


#horse{width:200px;height:auto;aspect-ratio:401 / 351;bottom:-10px;object-fit:contain}@media(max-width:550px){#horse{width:150px}} 


/* Compact play surface, designed for phones held sideways. */
.intro,footer,.scene-message,.clock>span,.audio-check span,.custom label{display:none}
main{padding:12px;max-width:1200px}header{margin-bottom:12px}.brand{font-size:16px}.badge{font-size:18px;padding:3px 7px}.sound{min-height:44px}
.controls{margin:14px auto 0}.presets{margin:12px 0;gap:6px}.presets button{min-height:44px}.custom{margin-bottom:12px}.custom input{min-height:44px}.audio-check{margin:6px 0}.audio-check button{min-height:44px}.reset{min-height:44px;margin-top:6px}#horse{aspect-ratio:400 / 360}
@media (orientation:landscape) and (max-height:600px){
 body{height:100svh;overflow:hidden}
 main{height:100svh;max-width:none;display:grid;grid-template-columns:minmax(0,1fr) clamp(210px,29vw,285px);grid-template-rows:44px minmax(0,1fr);gap:8px 12px;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
 header{grid-column:1/-1;margin:0}.brand{font-size:15px}.sound{padding:6px 12px}
 .landscape{height:100%;min-height:0;border-radius:18px;grid-column:1;grid-row:2}
 .controls{grid-column:2;grid-row:2;width:100%;max-width:none;margin:0;display:flex;flex-direction:column;justify-content:center;min-height:0}
 .clock strong{font-size:clamp(36px,10vh,56px);line-height:1.05}
 .presets{margin:8px 0;gap:5px}.presets button{font-size:12px;padding:8px 2px;border-radius:10px}.presets .selected{padding:7px 1px}
 .custom{margin:0;gap:7px}.custom input{padding:5px;width:66px}.audio-check{margin:0}.audio-check button{font-size:11px;padding:5px}
 .primary{min-height:44px;padding:10px 6px;font-size:15px}.reset{padding:4px;margin:5px auto 0}
 .trail{height:75%;left:12px;right:12px;bottom:28px}#horse{width:clamp(145px,43vh,220px);bottom:-7px}.sign{font-size:9px;padding:6px;bottom:7px}.finish b{font-size:20px;bottom:30px}
}
@media (orientation:landscape) and (max-height:350px){main{grid-template-rows:40px minmax(0,1fr);gap:5px 10px}.clock strong{font-size:32px}.audio-check{display:none}.presets{margin:5px 0}.custom{margin-bottom:5px}}


header{display:none}
#exitAdventure{position:fixed;z-index:30;right:max(14px,env(safe-area-inset-right));top:max(14px,env(safe-area-inset-top));width:48px;height:48px;border:1px solid #ffffffaa;border-radius:50%;background:#fff9e4e8;color:#65472f;font-size:34px;line-height:1;box-shadow:0 3px 12px #48332322}
#exitAdventure[hidden]{display:none}
body.adventure{overflow:hidden;background:#c2e6ee}
body.adventure main{padding:0;display:block;width:100%;height:100svh;max-width:none}
body.adventure .landscape{position:fixed;inset:0;width:100%;height:100svh;border:0;border-radius:0;box-shadow:none}
body.adventure .controls{display:none}
body.adventure .trail{left:max(24px,env(safe-area-inset-left));right:max(24px,env(safe-area-inset-right));bottom:9vh;height:70%}
body.adventure #horse{width:clamp(170px,48vh,340px)}
body.adventure .finished .landscape{box-shadow:none}
@media (orientation:landscape) and (max-height:600px){main{grid-template-rows:minmax(0,1fr)}.landscape,.controls{grid-row:1}}

#horse{visibility:hidden;transition:none}
body.adventure #horse{bottom:-3px}

.landscape{background:#a6d9eb;isolation:isolate}
.scenery{display:none}
.landscape:before{content:'';position:absolute;inset:-2% -4%;background:url('images/backgrounds/prairie.webp?v=23') center 58% / cover no-repeat;z-index:-1;}
.trail{z-index:2}.progress{z-index:5}

@media(prefers-reduced-motion:reduce){.landscape:before,.prairie-foreground{animation:none}}

/* Keep the rider at a believable scale against the distant prairie. */
body.adventure #horse{width:clamp(190px,62vh,370px)}
body.adventure .trail{bottom:7vh}
body.adventure #horse{max-width:calc(100vw - 80px)}

.finish-title{position:fixed;left:50%;top:45%;transform:translate(-50%,-50%) rotate(-4deg);z-index:20;pointer-events:none;text-align:center;width:max-content;max-width:94vw;perspective:700px}
.finish-title[hidden]{display:none}
.finish-title span{display:block;font-family:Rye,Georgia,serif;font-size:clamp(38px,12vh,88px);line-height:1.13;letter-spacing:1px;color:#ffe8a3;-webkit-text-stroke:1px #75401f;text-shadow:1px 1px 0 #b97332,2px 2px 0 #b97332,3px 3px 0 #a85f2c,4px 4px 0 #a85f2c,5px 5px 0 #8f4c24,6px 6px 0 #8f4c24,7px 7px 0 #683820,0 12px 18px #49311f66;transform-origin:50% 80%;animation:western-title-pop 1s both;animation-delay:.35s}
.finish-title span+span{color:#fff5d8;font-size:clamp(40px,13vh,94px);animation-delay:.52s}
@keyframes western-title-pop{0%{opacity:0;transform:translateY(75px) translateZ(-200px) rotateX(-30deg) scale(.2)}45%{opacity:1;transform:translateY(-15px) translateZ(35px) rotateX(5deg) scale(1.12)}65%{transform:translateY(7px) translateZ(-10px) rotateX(-3deg) scale(.95)}82%{transform:translateY(-4px) translateZ(8px) rotateX(1deg) scale(1.03)}100%{opacity:1;transform:translateY(0) translateZ(0) rotateX(0) scale(1)}}
@media(prefers-reduced-motion:reduce){.finish-title span{animation:none}}

/* Separate seamless terrain bands, rooted at fixed depths. */
.landscape:before{animation:none;transform:none}
.terrain-strip{position:absolute;left:0;right:0;pointer-events:none;background-repeat:repeat-x;background-position:0 bottom;background-size:var(--tile-width,1600px) 100%;animation:terrain-loop var(--tile-seconds,40s) linear infinite;animation-play-state:paused}
.terrain-rear{z-index:0;bottom:14%;height:17%;background-image:url('images/parallax/terrain-rear.webp?v=23')}
.terrain-road{z-index:1;bottom:0;height:20%;background-image:url('images/parallax/terrain-road.webp?v=23')}
.terrain-front{z-index:3;bottom:-1px;height:8%;background-image:url('images/parallax/terrain-front.webp?v=23')}
.riding .terrain-strip{animation-play-state:running}
@keyframes terrain-loop{from{background-position-x:0}to{background-position-x:calc(-1 * var(--tile-width,1600px))}}
.near-camera{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:4;opacity:0}
.adventure .near-camera{opacity:1}
.near-camera img{position:absolute;left:100%;bottom:-14vh;width:min(65vh,300px);height:auto;filter:blur(.5px);animation:near-camera-pass 8s linear infinite;animation-delay:-2s;animation-play-state:paused}
.riding .near-camera img{animation-play-state:running}
@keyframes near-camera-pass{0%{opacity:1;transform:translateX(0)}14.1667%{opacity:1;transform:translateX(calc(-100vw - 100% - 64px))}14.168%,100%{opacity:0;transform:translateX(calc(-100vw - 100% - 64px))}}
@media(prefers-reduced-motion:reduce){.terrain-strip,.near-camera img{animation:none}.near-camera{display:none}}

/* The sand fades through an irregular grassy edge rather than a straight cut. */
.terrain-road{height:24%;mask-image:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNjAwIiBoZWlnaHQ9IjI0MCIgdmlld0JveD0iMCAwIDE2MDAgMjQwIj48ZGVmcz48bGluZWFyR3JhZGllb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M+PHBhdGggZmlsbD0idXJsKCNmYWRlKSIgZD0iTTAgMTJDNzAgMTIgODAgNSAxNTAgOVMyNTAgMjQgMzEwIDE1UzQxMCA0IDQ3MCAxMlM1NzAgMjQgNjMwIDEwUzc0MCA4IDgwMCAxNVM5MDAgMjMgOTcwIDEwUzEwODAgNSAxMTQwIDEzUzEyNjAgMjYgMTMyMCAxNFMxNDQwIDUgMTUwMCAxMFMxNTcwIDEyIDE2MDAgMTJWMjQwSDBaIi8+PC9zdmc+Cg==');mask-size:var(--tile-width,1600px) 100%;-webkit-mask-size:var(--tile-width,1600px) 100%;mask-repeat:repeat-x;-webkit-mask-repeat:repeat-x;mask-position:0 bottom;-webkit-mask-position:0 bottom}
@keyframes terrain-loop{from{background-position-x:0;mask-position-x:0;-webkit-mask-position-x:0}to{background-position-x:calc(-1 * var(--tile-width,1600px));mask-position-x:calc(-1 * var(--tile-width,1600px));-webkit-mask-position-x:calc(-1 * var(--tile-width,1600px))}}
.near-camera .close-bush{width:min(105vh,650px);bottom:-8vh}
.near-camera .close-tree{width:auto;height:135vh;bottom:-10vh;animation-name:near-tree-pass;animation-duration:8s;animation-delay:5s;filter:brightness(.87) blur(.4px)}
@keyframes near-tree-pass{0%{opacity:1;transform:translateX(0)}21.25%{opacity:1;transform:translateX(calc(-100vw - 100% - 64px))}21.252%,100%{opacity:0;transform:translateX(calc(-100vw - 100% - 64px))}}

.terrain-front{filter:blur(1.6px)}
.near-camera .close-bush{filter:blur(3px);animation-delay:1s}
.near-camera .close-tree{filter:brightness(.87) blur(2.8px)}

.motion-filters{position:fixed;width:0;height:0;pointer-events:none}
.terrain-front{filter:url(#foregroundMotion)}
.near-camera .close-bush{filter:url(#closeMotion)}
.near-camera .close-tree{filter:brightness(.87) url(#closeMotion)}

body.finished .landscape:after{content:'';position:absolute;inset:0;background:rgba(35,25,23,.32);z-index:6;pointer-events:none;animation:finish-dim .45s ease-out both;text-shadow:none}
#confetti{z-index:15}
@keyframes finish-dim{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){body.finished .landscape:after{animation:none}}

/* A portrait phone must be turned before using the timer. */
.rotate-notice{display:none}
@media (orientation:portrait) and (any-pointer:coarse){
 body{overflow:hidden}
 .rotate-notice{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:max(24px,env(safe-area-inset-top)) 24px max(24px,env(safe-area-inset-bottom));background:#fbf5e8;color:#65472f}
 .rotate-notice>span{font-size:72px;line-height:1.2}
 .rotate-notice strong{font-size:26px}
 .rotate-notice p{font-size:16px}
 .rotate-notice button{margin:12px 0 24px;border:0;border-radius:14px;background:#b66336;color:white;padding:16px 20px;font:inherit;font-weight:800;min-height:48px}
 .rotate-notice small{font-size:12px;line-height:1.7;max-width:290px}
 main,#exitAdventure,#finishTitle{visibility:hidden}
}
@supports(height:100dvh){body.adventure main,body.adventure .landscape{height:100dvh}}
