/* scroll scenes (test page only) */
#page{width:auto;height:auto!important;margin:0!important;padding-top:var(--hh,0px)}
.desk{overflow-x:clip}
.act{position:relative}
.view{position:sticky;top:var(--hh,0px);overflow:hidden}
.bg{position:absolute;inset:0}
.bgi{position:absolute;max-width:none;pointer-events:none}
.act-room .bg{background:#373ca1 url(/assets/tile.webp) center top/calc(205.7px*var(--k,1)) calc(249px*var(--k,1))}
.floor{left:calc(-40px*var(--k,1));bottom:calc(-40px*var(--k,1));width:calc(1520px*var(--k,1));height:calc(296px*var(--k,1))}
.act-hills .bg{background:linear-gradient(#2b76f0,#94ccfb 82%)}
.bgi.hills{left:calc(-325px*var(--k,1));bottom:calc(-201px*var(--k,1));width:calc(1805px*var(--k,1));height:calc(461px*var(--k,1))}
.bgi.grass{left:calc(537px*var(--k,1));bottom:calc(-170px*var(--k,1));width:calc(1150px*var(--k,1));height:calc(346px*var(--k,1))}
.act-wall .bg{background:#373ca1 url(/assets/tile.webp) center top/calc(330px*var(--k,1)) calc(400px*var(--k,1))}
.cv{position:absolute;left:0;top:0;width:1440px;transform-origin:0 0;pointer-events:none}
.ly{position:absolute;inset:0;will-change:transform,opacity}
.ly.live{pointer-events:auto}
.ly.live .part{pointer-events:auto}
.part{position:absolute;inset:0;pointer-events:none}
.part>*{pointer-events:auto}
.part>.tv{pointer-events:auto}
.tv .tvf,.part .tvf{pointer-events:none}
.s3src{transform-origin:1060px 380px}
.s4src{transform-origin:1060px 380px}
.ly.s3,.ly.s4{background:none}
.anc{position:absolute;left:0;width:1px;height:1px;scroll-margin-top:var(--hh,0px)}
.norm{position:relative;overflow:hidden}
.norm>*{transform-origin:0 0}
#hra,#khvylia{scroll-margin-top:var(--hh,0px)}

/* TV hangs over the yellow block; the spiral stays above everything */
.act-wall{z-index:3}
.norm.norm-wave{overflow:visible}
.wave-top{position:absolute;left:0;top:0;width:1440px;height:809px;z-index:6;pointer-events:none}
.wave-top .slink-r{top:-30px!important;margin-left:115px}
#khvylia>.t,#khvylia>.btn{margin-top:52px}
.wave-top .slink-r img{scale:1.06;animation:slroll 7s ease-in-out infinite alternate}
@keyframes slroll{0%{translate:-18px 18px;rotate:-3deg}100%{translate:18px -18px;rotate:3deg}}
/* floating calendar */
#donate.widget{animation:calfloat 5.5s ease-in-out infinite alternate}
@keyframes calfloat{0%{translate:0 9px;rotate:-.8deg}100%{translate:0 -9px;rotate:.8deg}}
@media (max-width:900px){
.mact-wall>.m-sec.m-s6{overflow-x:clip;overflow-y:visible}
.mact-wall .m-tvbox{margin-bottom:-34px}
.m-s7.m-sec{overflow-x:clip;overflow-y:visible}
.m-s7 .m-in{padding-top:20px}
.m-slinky{overflow:visible;z-index:5;margin-bottom:-17vw;pointer-events:none}
.m-slinky img{width:128%;margin-left:-14%;animation:slrollm 7s ease-in-out infinite alternate}
@keyframes slrollm{0%{translate:-8px 8px;rotate:-3deg}100%{translate:8px -8px;rotate:3deg}}
#m-donate{animation:calfloatm 5.5s ease-in-out infinite alternate}
@keyframes calfloatm{0%{translate:0 5px;rotate:-.5deg}100%{translate:0 -5px;rotate:.5deg}}
}
@media (prefers-reduced-motion:reduce){.wave-top .slink-r img,.m-slinky img,#donate.widget,#m-donate{animation:none}}

@media (max-width:900px){
.mact{position:relative}
.mbg{position:sticky;top:0;height:100vh;height:100lvh;margin-bottom:-100vh;margin-bottom:-100lvh;overflow:hidden;z-index:0}
.mact>.m-sec{position:relative;z-index:1;background:transparent;box-shadow:none}
.mact-room .mbg{background:#373ca1 url(/assets/tile.webp) 0 0/160px 194px}
.mact-room .m-wall{display:none}
/* the green strip at the very bottom guarantees no sky ever shows under the hills */
.mact-hills .mbg{background:linear-gradient(#2b76f0,#94ccfb 82%,#94ccfb calc(100% - 6vw),#577b27 calc(100% - 6vw))}
.mbg img{position:absolute;max-width:none;height:auto}
/* the hills must stop at the end of their act: a negative margin on the sticky layer itself would let it
   stay pinned past the act and hide under the next block, so the first section is pulled up instead */
.mact-hills .mbg{margin-bottom:0}
.mact-hills>.mbg+.m-sec{margin-top:-100vh;margin-top:-100lvh}
/* bottom offsets are larger than the transparent margin of each PNG (15.3vw / 14.5vw), so the hills run past the edge */
.mbg .mh1{width:230vw;left:-80vw;bottom:-17vw}
.mbg .mh2{width:160vw;left:8vw;bottom:-17vw}
.mact-hills .m-hills{display:none}
/* .m-sec clips by default, which cut the dialog's shadow at the section edge */
.mact-hills .m-s3.m-sec{padding-bottom:12px;overflow-x:clip;overflow-y:visible}
.mact-hills .m-s4{padding:44px 12px 0}
/* whichever window comes last, the hills get room to show under it */
.mact-hills>.m-sec:last-child{padding-bottom:min(25vw,120px)}
.mact-wall .mbg{background:#373ca1 url(/assets/tile.webp) 0 0/220px 266px}
.mact-wall .m6{display:none}
}

/* big XP cursor over the whole windows scene, empty hills included */
@media (min-width:901px){
.act-hills,.act-hills *{cursor:url(/assets/cursor-xp-arrow.svg) 0 0,default}
.act-hills a,.act-hills a *,.act-hills button,.act-hills button *,.act-hills .xp-ctl i,.act-hills .folder,.act-hills .folder *,.act-hills .card,.act-hills .card *{cursor:url(/assets/cursor-xp-hand.svg) 14 2,pointer}
}

.xp-dock{position:absolute;right:calc(26px*var(--k,1));bottom:calc(20px*var(--k,1));display:flex;align-items:flex-end;gap:10px;transform:scale(var(--k,1));transform-origin:100% 100%}
.act-hills .ly.s3.live{pointer-events:none}.act-hills .ly.s3.live>*{pointer-events:auto}
.norm.norm-wave{margin-top:-2px}
