/* Motion lives inside each character's fixed layout box. */
.chibi{animation:none!important}
.q-motion{display:block;width:100%;height:100%;transform-origin:50% 94%;animation:little-breath 4.8s ease-in-out infinite}
.q-motion>img,.q-motion>svg{display:block;width:100%;height:100%;object-fit:contain;object-position:center;transform:none!important}
.chibi-I .q-motion{animation-duration:5.6s;animation-delay:-1.7s}
.chibi-L .q-motion{animation-duration:4.3s;animation-delay:-2.3s}
.chibi-E .q-motion,.chibi-M .q-motion{animation-delay:-.9s}
.mood-happy .q-motion{animation:little-joy 1.5s ease-in-out infinite}
.mood-sad .q-motion{animation:little-sigh 5s ease-in-out infinite}
.mood-angry .q-motion{animation:little-shake .55s ease-in-out 3}
.q-greeting .q-motion{animation:little-greeting .85s ease-in-out both!important}
.ref-fitting-stage .q-motion{animation-name:little-breath}
.ref-fitting-stage .chibi{pointer-events:auto!important}
.ref-outfit-art .q-motion,.mini-avatar .q-motion,.v2-helper-pick .q-motion{animation:none}
@keyframes little-breath{0%,100%{transform:translateY(0) rotate(-.6deg) scaleY(1)}50%{transform:translateY(-3px) rotate(.8deg) scaleY(1.012)}}
@keyframes little-joy{0%,100%{transform:translateY(0) rotate(-1deg)}45%{transform:translateY(-6px) rotate(2deg)}70%{transform:translateY(-2px)}}
@keyframes little-sigh{0%,100%{transform:rotate(0)}50%{transform:translateY(2px) rotate(-1.6deg)}}
@keyframes little-shake{25%{transform:rotate(-2deg)}75%{transform:rotate(2deg)}}
@keyframes little-greeting{0%,100%{transform:translateY(0)}35%{transform:translateY(-9px) rotate(-3deg)}65%{transform:translateY(-3px) rotate(3deg)}}
/* Short local paths preserve all character/label/interaction clearances. */
.ref-shop-helper{animation:shop-helper-stroll 19s ease-in-out infinite}
.ref-shop-customer{animation:shop-guest-step 23s ease-in-out infinite}
.ref-shop-helper.phase-craft{animation-play-state:paused}
.ref-shop-helper.phase-craft .q-motion{animation:little-work 1.8s ease-in-out infinite}
@keyframes little-work{0%,100%{transform:rotate(-1deg)}50%{transform:translateY(-2px) rotate(2deg)}}
@keyframes shop-helper-stroll{0%,20%,100%{transform:translateX(0)}42%,65%{transform:translateX(15px)}85%{transform:translateX(5px)}}
@keyframes shop-guest-step{0%,30%,100%{transform:translateX(0)}55%,75%{transform:translateX(9px)}}
.ref-home-life{margin:24px 0 8px;border:1px solid #8498a555;outline:1px solid #8498a522;outline-offset:4px;overflow:hidden}
.ref-home-life .life-scene{height:220px;min-height:220px;isolation:isolate;background:linear-gradient(#26384d44,#1b2c4577),url('/assets/integrated/bg-room.webp') center/cover}
.ref-home-life .life-label{top:12px;left:16px;color:#d4dcd9;background:#26384dbb;border:1px solid #9aa8b055;font-size:12px}
.ref-home-life .life-actors{position:absolute;left:5%;right:5%;bottom:10px;display:flex;justify-content:space-evenly;gap:10px}
.ref-home-life .actor{position:relative;width:100px;max-width:22%;display:grid;justify-items:center;background:none;border:0;color:#d9dfdc;padding:0;animation:home-stroll 21s ease-in-out infinite}
.ref-home-life .actor:nth-child(2){animation-duration:27s;animation-delay:-8s}
.ref-home-life .actor:nth-child(3){animation-duration:23s;animation-delay:-13s}
.ref-home-life .actor:nth-child(4){animation-delay:-17s}
.ref-home-life .actor:has(.chibi):hover{animation-play-state:paused}
.ref-home-life .actor:not(:has(.chibi)){display:none}
.ref-home-life .actor .chibi{position:relative;inset:auto;margin:0;width:85px;height:105px;transform:none!important}
.ref-home-life .actor>span{font-size:11px;background:#26384dbb;border:1px solid #8a9ba744;padding:2px 8px;white-space:nowrap}
@keyframes home-stroll{0%,18%,100%{transform:translateX(-8px)}42%,65%{transform:translateX(10px)}82%{transform:translateX(2px)}}
/* A few clear, drawn objects on the foreground counter. */
.shop-little-things{position:absolute;inset:0;pointer-events:none;color:#aab8bd}
.shop-little-things svg{position:absolute;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 3px 2px #18243755)}
.shop-iris{left:4%;bottom:15%;height:104px;width:92px;color:#96aab6!important}
.iris-petal{fill:#8797ac;fill-opacity:.45}.iris-vase{fill:#778c99;fill-opacity:.65}
.shop-teacup{right:8%;bottom:20%;width:94px;height:80px;color:#b5beb8!important}
.shop-teacup path:not(.cup-steam){fill:#758a98;fill-opacity:.65}
.cup-steam{opacity:.55;animation:cup-warmth 4s ease-in-out infinite}
@keyframes cup-warmth{0%,100%{opacity:.2;transform:translateY(2px)}50%{opacity:.6;transform:translateY(-3px)}}
.shop-recipe-book{position:absolute;left:24%;bottom:25%;width:85px;height:49px;transform:rotate(-8deg);border:1px solid #8ea0a4;background:#415465;box-shadow:3px 4px 0 #9da8a1,4px 5px 0 #43576a;display:grid;place-items:center;outline:1px solid #7d919855;outline-offset:-5px;color:#bfc7bf}
.shop-recipe-book i{font:italic 13px Georgia}.shop-recipe-book small{font-size:12px;line-height:1}
.shop-linen{position:absolute;right:4%;bottom:0;width:20%;height:32%;border:1px solid #97a4a444;border-radius:1px;background:repeating-linear-gradient(90deg,#9da9ac33 0 1px,transparent 1px 5px),#697d8c66;transform:skewX(-6deg);z-index:-1}
/* Touch devices receive the landscape gate, including portrait iPads. */
#rotate-device{display:none!important}
@media(orientation:portrait) and (hover:none) and (pointer:coarse){
 #rotate-device{display:flex!important;position:fixed;z-index:9999;inset:0;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:max(28px,env(safe-area-inset-top)) 24px;background:radial-gradient(circle at 50% 35%,#46556a,#27374d 65%,#1e2c42);color:#dce2dc}
 #rotate-device::before{content:'';position:absolute;inset:18px;border:1px solid #9caeb055;pointer-events:none}
 #rotate-device h2{font-size:28px;margin:23px 0 10px}#rotate-device p{font-size:15px;line-height:1.9}#rotate-device small{margin-top:22px;letter-spacing:.2em;font-size:9px;color:#aebec5}
 .rotate-orbit{position:relative;width:120px;height:86px;border:1px solid #a1b2b7;border-radius:25px;animation:landscape-turn 3s ease-in-out infinite}
 .rotate-orbit span{font-size:32px;line-height:86px}.rotate-orbit b{position:absolute;right:-12px;top:-11px;color:#c2c0ae}.rotate-orbit i{position:absolute;inset:-14px;border:1px dashed #8599ab88;border-radius:36px}
 #app,#modal-root,#toast{visibility:hidden;pointer-events:none}
 body{overflow:hidden}
}
/* Undo the legacy width-only gate on small desktop windows. */
@media(orientation:portrait) and (hover:hover){#app,#modal-root,#toast{visibility:visible;pointer-events:auto}}
@keyframes landscape-turn{0%,15%{transform:rotate(0)}60%,100%{transform:rotate(90deg)}}
.agreement-backdrop{z-index:9500;background:#142238c9;backdrop-filter:blur(5px)}
.agreement-modal{border:1px solid #9baeb7;background:#e0e4dd url('/assets/ui-parts/paper-grain.webp') center/cover;box-shadow:inset 0 0 0 6px #d9dfd8,inset 0 0 0 7px #8da2ad66,0 15px 70px #101d3380;color:#42576c}
.agreement-modal .agreement-text{border:1px solid #899ea466;background:#f1f0e744;color:#435669}
@media(max-width:1050px) and (orientation:landscape){
 .shop-iris{height:75px;width:67px}.shop-teacup{height:58px;width:68px}.shop-recipe-book{width:61px;height:37px}.shop-recipe-book i{font-size:10px}
 .ref-home-life .life-scene{height:180px;min-height:180px}
 .agreement-modal{max-height:92dvh;padding:22px 26px}.agreement-modal h2{font-size:23px;margin:8px 0}.agreement-modal .agreement-text{max-height:42dvh;font-size:12px;padding:12px}.agreement-actions{margin-top:12px;gap:10px}.agreement-modal .check-row{margin:10px 0;font-size:12px}
}
.reduce-motion .q-motion,.reduce-motion .ref-shop-helper,.reduce-motion .ref-shop-customer,.reduce-motion .ref-home-life .actor,.reduce-motion .cup-steam{animation:none!important}
@media(prefers-reduced-motion:reduce){.q-motion,.ref-shop-helper,.ref-shop-customer,.ref-home-life .actor,.cup-steam,.rotate-orbit{animation:none!important}}
