/* Small, bounded decorative layers; only transform and opacity animate. */
.ambient-petals{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:8}
.ambient-petals i{position:absolute;left:8%;top:-35px;width:11px;height:20px;border-radius:100% 5% 100% 5%;background:linear-gradient(140deg,#d7e9ae,#91b899);opacity:0;animation:leaf-fall 18s linear infinite;animation-delay:-3s}
.ambient-petals i:nth-child(2){left:25%;width:8px;height:14px;background:#edb3ce;animation-duration:23s;animation-delay:-12s}
.ambient-petals i:nth-child(3){left:45%;width:9px;height:18px;animation-duration:21s;animation-delay:-18s}
.ambient-petals i:nth-child(4){left:63%;background:#e7badb;animation-duration:25s;animation-delay:-7s}
.ambient-petals i:nth-child(5){left:80%;width:8px;height:14px;animation-duration:19s;animation-delay:-11s}
.ambient-petals i:nth-child(6){left:94%;background:#edc5a3;animation-duration:24s;animation-delay:-20s}
.ambient-petals i:nth-child(7){left:2%;width:7px;height:13px;animation-duration:22s;animation-delay:-15s}
.ambient-petals i:nth-child(8){left:71%;width:7px;height:13px;background:#f2bdd2;animation-duration:27s;animation-delay:-24s}
@keyframes leaf-fall{0%{opacity:0;transform:translate3d(-20px,-30px,0) rotate(-25deg)}8%{opacity:.55}35%{transform:translate3d(38px,35vh,0) rotate(100deg)}65%{transform:translate3d(-16px,69vh,0) rotate(210deg)}92%{opacity:.45}100%{opacity:0;transform:translate3d(55px,calc(100vh + 60px),0) rotate(340deg)}}
.hero .scene-image{animation:world-drift 22s ease-in-out infinite alternate;transform-origin:65% 45%}
@keyframes world-drift{from{transform:scale(1.025) translate3d(0,0,0)}to{transform:scale(1.055) translate3d(-.6%,.3%,0)}}
.hero .scroll-cue b{display:inline-block;animation:scroll-nudge 2.5s ease-in-out infinite}
@keyframes scroll-nudge{0%,100%{transform:translateY(0)}50%{transform:translateY(5px)}}
.hero.ambient-outside .scene-image,.hero.ambient-outside .scroll-cue b{animation-play-state:paused}
.ambient-reveal{transition:opacity .65s ease,translate .65s cubic-bezier(.2,.7,.2,1)}
.ambient-ready .ambient-reveal:not(.ambient-visible){opacity:0;translate:0 22px}
.ambient-reveal:focus-within{opacity:1!important;translate:0 0!important}
.ambient-paused .ambient-reveal,.motion-paused .ambient-reveal{opacity:1!important;translate:0 0!important;transition:none!important}
.button.primary{position:relative;overflow:hidden;isolation:isolate}
.button.primary:after{content:"";position:absolute;inset:-70% auto -70% -65%;width:35%;background:linear-gradient(90deg,transparent,#ffffff40,transparent);transform:rotate(25deg);pointer-events:none}
.button.primary:is(:hover,:focus-visible):after{animation:button-glimmer .65s ease-out}
@keyframes button-glimmer{to{transform:translateX(600%) rotate(25deg)}}
.site-header nav a{position:relative}
.site-header nav a:after{content:"";position:absolute;left:0;right:0;bottom:-5px;height:2px;border-radius:2px;background:#c87fae;transform:scaleX(0);transform-origin:left;transition:transform .25s}
.site-header nav a:is(:hover,:focus-visible):after{transform:scaleX(1)}
.game-gallery img{transition:transform .5s}
.game-gallery button:is(:hover,:focus-visible) img{transform:scale(1.025)}
.mode-picture.scene-arrived img{animation:scene-arrive .55s ease-out}
@keyframes scene-arrive{from{opacity:.65;transform:scale(1.025)}to{opacity:1;transform:scale(1)}}
.companion{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));width:112px;z-index:20;display:flex;flex-direction:column;align-items:center;gap:2px}
.companion-cat{position:relative;display:block;width:108px;height:108px;padding:0;border:0;background:transparent;transform-origin:50% 90%;transition:transform .25s;cursor:pointer}
.companion-cat img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 4px #48334b29);animation:cat-breathe 4.2s ease-in-out infinite}
@keyframes cat-breathe{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-5px) rotate(1deg)}}
.companion[data-look="left"] .companion-cat{transform:rotate(-5deg)}
.companion[data-look="right"] .companion-cat{transform:rotate(5deg)}
.companion.greeting .companion-cat img{animation:cat-greeting .75s ease-in-out}
@keyframes cat-greeting{0%,100%{transform:translateY(0) rotate(0)}25%{transform:translateY(-12px) rotate(-8deg)}60%{transform:translateY(-3px) rotate(8deg)}}
.companion-message{position:absolute;right:0;bottom:145px;width:210px;max-width:calc(100vw - 40px);padding:12px 15px;background:#fffdf8;border:1px solid #e5cde9;border-radius:18px 18px 4px 18px;box-shadow:0 10px 24px #38244715;color:#655074;font-size:12px;line-height:1.7;opacity:0;translate:0 8px;transition:opacity .2s,translate .2s;pointer-events:none}
.companion:is(:hover,:focus-within,.greeting) .companion-message{opacity:1;translate:0 0}
.companion-close{position:absolute;right:-2px;top:-7px;width:26px;height:26px;border:1px solid #e4d7e8;border-radius:50%;background:#fffaf4;color:#8e7698;font-size:17px;line-height:1;padding:0;z-index:1}
.companion-motion{min-height:30px;margin:0;padding:4px 10px;background:#fffaf3eF;border:1px solid #dfcde4;border-radius:20px;color:#70557f;font-size:10px;white-space:nowrap}
.companion-restore{display:none;min-width:48px;min-height:42px;border:1px solid #decce3;border-radius:18px;background:#fffaf3;color:#795b88;font-size:12px}
.hero .location-tag{right:160px}
.companion-motion:disabled{opacity:.65;cursor:default}
.motion-paused *,.motion-paused *:before,.motion-paused *:after{transition:none!important;scroll-behavior:auto!important}
.companion.compact{width:auto}
.companion.compact :is(.companion-cat,.companion-close,.companion-message){display:none}
.companion.compact .companion-restore{display:block}
.motion-paused .ambient-petals i,.motion-paused .scene-image,.motion-paused .scroll-cue b,.motion-paused .companion-cat img{animation-play-state:paused!important}
.motion-paused .companion-cat{transform:none!important;transition:none}
.motion-paused .scene-arrived img,.motion-paused .button.primary:after{animation:none!important}
.motion-paused .game-gallery img{transition:none!important}
@media(max-width:700px){.ambient-petals i:nth-child(n+5){display:none}.ambient-petals i:nth-child(2){left:94%}.ambient-petals i:nth-child(3){left:1%}.ambient-petals i:nth-child(4){left:86%}.companion{right:8px;width:78px}.companion-cat{width:76px;height:76px}.companion-message{bottom:111px;font-size:11px;width:185px}.companion-close{width:24px;height:24px;right:-3px}.companion-motion{font-size:9px;padding:3px 6px;min-height:28px}.hero .scene-image{animation-duration:28s}}
@media(prefers-reduced-motion:reduce){.ambient-petals{display:none}.ambient-reveal{opacity:1!important;translate:0 0!important;transition:none!important}.companion-cat{transform:none!important}.scene-image,.scroll-cue b,.companion-cat img{animation:none!important}}
