/* Independent paper pieces keep the approved watercolor texture intact. */
.subject{perspective:700px;transform:translate3d(var(--scene-x,0px),var(--scene-y,0px),0);transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.paper-figure{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;transform-origin:50% 85%;animation:paper-float 5.5s ease-in-out infinite}
.paper-part,.paper-sway{transform-box:view-box;transition:transform .65s cubic-bezier(.2,.8,.2,1)}
.paper-core{pointer-events:none}
.landmark{--look-x:0;--look-y:0;transition:transform .65s cubic-bezier(.2,.8,.2,1)}
.is-looking .landscape{transition-duration:.28s}
.is-dragging .landscape{transition:none}
.landmark.is-near,.landmark.is-awake{z-index:4}
.landmark-aura{position:absolute;inset:-10%;border-radius:50%;background:radial-gradient(ellipse,var(--theme),transparent 66%);opacity:0;transform:scale(.8);transition:opacity .5s,transform .65s;pointer-events:none;filter:blur(9px)}
.landmark.is-near .landmark-aura,.landmark.is-awake .landmark-aura{opacity:.12;transform:scale(1.12)}
.landmark-label{transition:color .3s,text-shadow .3s,filter .3s}
.landmark.is-near .landmark-label,.landmark:focus-visible .landmark-label{filter:brightness(.8);text-shadow:0 0 13px #fff,0 0 4px #fff}
.landmark.is-near .entry-star{animation:entry-spark 1.5s ease-in-out infinite}
.landmark:active .paper-figure{filter:brightness(1.06)}

/* Owl: the head and wing move separately; eyelids actually cover the eyes. */
.owl-head{transform-origin:61% 48%}
.owl-head-sway{transform-origin:61% 48%;animation:owl-listen 6s ease-in-out infinite}
.owl-wing,.owl-wing-sway{transform-origin:49% 56%}
.owl-wing-sway{animation:wing-rest 6s ease-in-out infinite}
.is-near .owl-head,.is-awake .owl-head{transform:translate(calc(var(--look-x)*1.5px),calc(var(--look-y)*1px)) rotate(calc(var(--look-x)*9deg))}
.is-near .owl-wing,.is-awake .owl-wing{transform:rotate(8deg) translate(-1px,-1px)}
.owl-shutters{fill:#b5b0c3;opacity:0;animation:paper-blink 5.1s infinite}
.owl-shutters path{fill:none;stroke:#615c7d;stroke-width:.75;stroke-linecap:round}
.is-near .owl-shutters{animation-duration:2.8s}
.is-awake .owl-head-sway{animation:owl-hello 1.4s ease-in-out both}
.constellation{animation:star-listen 4s ease-in-out infinite;transition:transform .5s,opacity .5s}
.is-near .constellation,.is-awake .constellation{opacity:1;transform:rotate(calc(var(--look-x)*5deg)) scale(1.08)}

/* Lighthouse: a real sweep at rest, a light beam following the visitor nearby. */
.guidance .paper-figure{animation:none}
.beacon-sweep{position:absolute;left:50.5%;top:30.5%;width:190%;height:82%;transform-origin:0 0;animation:beacon-scan 6.4s ease-in-out infinite;pointer-events:none}
.beacon-ray{position:absolute;left:0;top:-25%;width:100%;height:50%;clip-path:polygon(0 50%,100% 0,100% 100%);background:linear-gradient(90deg,#f1bd6a90,#efc37830 45%,#f4d79c00);transform-origin:0 50%;transition:transform .4s;filter:blur(.3px)}
.is-near .beacon-sweep,.is-awake .beacon-sweep{animation:none;transform:rotate(0deg)}
.is-near .beacon-ray,.is-awake .beacon-ray{transform:rotate(var(--beam-angle,-25deg));background:linear-gradient(90deg,#f6bd5dcc,#f2c67945 50%,#f4d79c00)}
.tower-lantern{transform-origin:50.5% 39%}
.lantern-glow{fill:#ffe9ae;opacity:.1;animation:lantern-light 3.2s ease-in-out infinite;mix-blend-mode:screen}
.is-near .lantern-glow,.is-awake .lantern-glow{opacity:.9;animation:none}

/* Mirror: the reflection moves within its fixed frame and catches light. */
.psychology .paper-figure{animation:none}
.mirror-reflection{transform-origin:48% 55%}
.is-near .mirror-reflection,.is-awake .mirror-reflection{transform:translate(calc(var(--look-x)*2.7px),calc(var(--look-y)*1.3px))}
.mirror-glimmer{fill:none;stroke:#fff6e5;stroke-width:15;opacity:0;transform-origin:center;animation:mirror-pass 7s ease-in-out infinite}
.is-near .mirror-glimmer,.is-awake .mirror-glimmer{animation:none;opacity:.38;transform:translate(calc(var(--look-x)*22px),0)}
.mirror-thread{fill:none;stroke:#d6a996;stroke-width:.45;opacity:.2;stroke-dasharray:2 4;animation:mirror-trace 9s linear infinite}

/* Moon: individual pendants have different lengths and swing independently. */
.dream .paper-figure{inset:0 10% 10%;width:80%;height:90%;animation:moon-rise 4.8s ease-in-out infinite}
.moon-charm,.moon-charm-sway{transform-origin:56% 28%}
.moon-charm-sway{animation:charm-swing 3.4s ease-in-out infinite}
.charm-two{transform-origin:71% 28%}
.charm-three{transform-origin:86% 28%}
.dream .paper-sway:nth-of-type(3){animation-duration:3.9s;animation-delay:-.9s}
.dream .paper-sway:nth-of-type(4){animation-duration:2.8s;animation-delay:-1.7s}
.is-near .moon-charm,.is-awake .moon-charm{transform:rotate(calc(var(--look-x)*13deg))}
.is-awake .moon-charm-sway{animation:charm-answer 1.6s ease-in-out both}
.lake-rings ellipse{animation:water-out 4.2s ease-out infinite;stroke-width:.8}
.lake-rings ellipse:nth-child(2){animation-delay:-1.4s}
.lake-rings ellipse:nth-child(3){animation-delay:-2.8s}
.is-near .lake-rings ellipse,.is-awake .lake-rings ellipse{stroke-width:1.25;stroke:#628da0}

/* Fox: three overlapping folds of the tail fan breathe around a fixed body. */
.spirit .paper-figure{animation:fox-breathe 5s ease-in-out infinite}
.fox-tail,.fox-tail-sway{transform-origin:68% 70%}
.tail-low{transform-origin:63% 77%}
.fox-tail-sway{animation:tail-fan 4.8s ease-in-out infinite}
.spirit .paper-sway:nth-of-type(3){animation-delay:-1.1s}
.spirit .paper-sway:nth-of-type(4){animation-delay:-2.1s}
.is-near .tail-high,.is-awake .tail-high{transform:rotate(-9deg) translateY(-1px)}
.is-near .tail-middle,.is-awake .tail-middle{transform:rotate(-4deg) translateX(-1px)}
.is-near .tail-low,.is-awake .tail-low{transform:rotate(6deg) translateX(-1px)}
.is-awake .fox-tail-sway{animation:tail-answer 1.6s ease-in-out both}

/* Lotus: paper petals open around the still center on a visible breath cycle. */
.sleep .paper-figure{animation:lotus-center-breathe 5.4s ease-in-out infinite}
.lotus-petal,.lotus-petal-sway{transform-origin:51% 88%}
.lotus-petal-sway{animation:petal-breathe 5.4s ease-in-out infinite}
.sleep .paper-sway:nth-of-type(3){animation-direction:reverse}
.is-near .petal-left,.is-awake .petal-left{transform:rotate(-7deg) translate(-1px,-1px)}
.is-near .petal-right,.is-awake .petal-right{transform:rotate(7deg) translate(1px,-1px)}
.lotus-orbit{animation:breath-halo 5.4s ease-in-out infinite;opacity:.4}
.is-near .lotus-orbit,.is-awake .lotus-orbit{border-color:#c99d69;opacity:.8}

/* Scroll: the painted paper shifts inside the rolls; a new ink line unfolds. */
.scroll .paper-figure{animation:scroll-drift 6s ease-in-out infinite}
.scroll-landscape{transform-origin:62% 23%}
.is-near .scroll-landscape,.is-awake .scroll-landscape{transform:translate(calc(var(--look-x)*1.2px),1.5px) scaleY(1.025)}
.scroll-ink{fill:none;stroke:#5b7a83;stroke-width:.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:145;stroke-dashoffset:145;opacity:0;animation:ink-unfold 7s ease-in-out infinite}
.is-near .scroll-ink,.is-awake .scroll-ink{animation:ink-arrive 1.5s ease-out forwards}

.touch-ripple{width:30px;height:16px;margin:-8px 0 0 -15px;border-color:#9a998b80;border-width:1px;animation:ink-water .95s ease-out forwards}
.touch-ripple:after{inset:4px;border-color:#a9a58d66}
.is-touching .landmark.is-near .landmark-aura{opacity:.19}
.asset-failed .paper-figure{opacity:0}

@keyframes paper-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@keyframes owl-listen{0%,100%{transform:rotate(-2deg)}40%{transform:rotate(3deg)}70%{transform:rotate(0deg)}}
@keyframes owl-hello{0%,100%{transform:rotate(0deg)}28%{transform:rotate(-8deg)}65%{transform:rotate(5deg)}}
@keyframes wing-rest{0%,100%{transform:rotate(0deg)}45%{transform:rotate(3deg)}}
@keyframes paper-blink{0%,36%,42%,74%,80%,100%{opacity:0}38%,40%,76%,78%{opacity:1}}
@keyframes star-listen{0%,100%{opacity:.5;transform:scale(.98)}50%{opacity:.95;transform:scale(1.04)}}
@keyframes beacon-scan{0%,100%{opacity:.38;transform:rotate(-50deg)}50%{opacity:.8;transform:rotate(48deg)}}
@keyframes lantern-light{0%,100%{opacity:.14}50%{opacity:.7}}
@keyframes mirror-pass{0%,24%,100%{opacity:0;transform:translateX(-35px)}42%{opacity:.4}63%{opacity:0;transform:translateX(35px)}}
@keyframes mirror-trace{to{stroke-dashoffset:-48}}
@keyframes moon-rise{0%,100%{transform:translateY(2px) rotate(-1deg)}50%{transform:translateY(-4px) rotate(1deg)}}
@keyframes charm-swing{0%,100%{transform:rotate(-5deg)}50%{transform:rotate(5deg)}}
@keyframes charm-answer{0%,100%{transform:rotate(0deg)}25%{transform:rotate(-13deg)}62%{transform:rotate(10deg)}}
@keyframes water-out{0%{opacity:.05;transform:scale(.7)}25%{opacity:.48}100%{opacity:0;transform:scale(1.22)}}
@keyframes fox-breathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-1.5px)}}
@keyframes tail-fan{0%,100%{transform:rotate(-1.5deg)}50%{transform:rotate(3deg)}}
@keyframes tail-answer{0%,100%{transform:rotate(0deg)}35%{transform:rotate(-5deg)}70%{transform:rotate(3deg)}}
@keyframes lotus-center-breathe{0%,100%{transform:translateY(1px) scale(.98)}50%{transform:translateY(-2px) scale(1.025)}}
@keyframes petal-breathe{0%,100%{transform:rotate(-2deg)}50%{transform:rotate(3deg)}}
@keyframes breath-halo{0%,100%{transform:rotate(-22deg) scale(.96,.83);opacity:.25}50%{transform:rotate(-22deg) scale(1.09,.95);opacity:.65}}
@keyframes scroll-drift{0%,100%{transform:rotate(.5deg)}50%{transform:translateY(-2px) rotate(-1.5deg)}}
@keyframes ink-unfold{0%,12%,100%{stroke-dashoffset:145;opacity:0}30%{opacity:.4}62%,85%{stroke-dashoffset:0;opacity:.3}95%{opacity:0;stroke-dashoffset:0}}
@keyframes ink-arrive{from{stroke-dashoffset:145;opacity:.1}to{stroke-dashoffset:0;opacity:.55}}
@keyframes ink-water{from{opacity:.7;transform:scale(.4)}to{opacity:0;transform:scale(4)}}
@keyframes entry-spark{0%,100%{opacity:.5;transform:rotate(45deg) scale(.8)}50%{opacity:1;transform:rotate(45deg) scale(1.3)}}

/* Explicit interactions remain available; quiet mode removes continuous motion. */
.motion-paused .paper-figure,.motion-paused .paper-sway,.motion-paused .owl-shutters,.motion-paused .constellation,.motion-paused .beacon-sweep,.motion-paused .lantern-glow,.motion-paused .mirror-glimmer,.motion-paused .mirror-thread,.motion-paused .scroll-ink,.motion-paused .entry-star{animation:none!important}
.motion-paused .owl-shutters{opacity:0}
.motion-paused .paper-part{transform:none!important;transition:none}
.motion-paused .paper-figure{transform:none}
.motion-paused .subject{transform:none;transition:none}
.motion-paused .landmark-aura{opacity:0!important}
.motion-paused .beacon-sweep{transform:rotate(-25deg);opacity:.3}
@media(prefers-reduced-motion:reduce){.paper-part,.landmark-aura,.beacon-ray{transition:none}}
