#cg-stage.arriving #cg-frame{animation:none!important}
.cg-motion{position:absolute;inset:0;pointer-events:none;z-index:2}
.cg-motion img{display:block;width:100%;height:100%;object-fit:contain}
.cg-motion[data-scene="pillow-close"]{opacity:0;animation:quietBlink 7.2s linear infinite}
@keyframes quietBlink{0%,42%,48%,100%{opacity:0}44%,46%{opacity:1}}
.cg-motion[data-scene="welcome-hug"]{opacity:0;animation:welcomeEmbrace 2s ease .7s forwards}
@keyframes welcomeEmbrace{0%{opacity:0;transform:translateY(3px)}100%{opacity:1;transform:none}}
.cg-motion[data-scene="five-over-sea"]{opacity:1;animation:figuresArrive calc(7s / var(--scene-rate,1)) ease forwards}
@keyframes figuresArrive{0%,23%{opacity:1}70%,100%{opacity:0}}
.cg-motion[data-scene="tibo-summon"]{inset:auto;left:27.8%;top:-7.4%;width:28%;aspect-ratio:1;transform:perspective(700px) rotateX(56deg);transform-origin:50% 50%;filter:drop-shadow(0 0 6px #ffe09a77)}
.cg-motion[data-scene="tibo-summon"] img{animation:adaptationWheel 5.5s cubic-bezier(.45,0,.3,1) infinite}
@keyframes adaptationWheel{0%,20%{transform:rotate(0)}45%,70%{transform:rotate(45deg)}100%{transform:rotate(90deg)}}
[data-motion="off"] .cg-motion img{animation:none!important}
#game-shell[data-effect="card-slam"] #cg-stage{animation:cardHit .32s ease-out both}
@keyframes cardHit{0%{transform:translateY(-6px);filter:brightness(1.2)}35%{transform:translateY(3px)}100%{transform:none;filter:none}}
#game-shell[data-effect="domain"] #cg-stage::after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 74% 47%,#fff8dfb0,transparent 65%);pointer-events:none;animation:domainLight 1.8s ease-out both}
@keyframes domainLight{0%{opacity:0;transform:scale(.3)}22%{opacity:.75}100%{opacity:0;transform:scale(1.8)}}
.relay-arrival{position:relative;width:min(96%,1200px);height:95%;overflow:hidden;background:url('assets/polish/night-street.webp') center/cover;box-shadow:inset 0 0 90px #0a131c}
.relay-arrival img{position:absolute;left:8%;bottom:0;height:91%;width:auto;filter:drop-shadow(0 20px 10px #070c1299);animation:relayRoll 4s cubic-bezier(.2,.6,.3,1) both;transform-origin:50% 85%}
@keyframes relayRoll{0%{transform:translateX(-75%) rotate(-52deg) scale(.8)}55%{transform:translateX(6%) rotate(7deg)}75%{transform:translateX(0) rotate(-2deg)}100%{transform:none}}
.model-reset{position:relative;width:min(58cqh,350px);height:auto;aspect-ratio:3/4;transform:rotate(-3deg);filter:drop-shadow(0 15px 25px #08151e99);animation:resetCard .8s cubic-bezier(.18,.8,.2,1.1) both}
.model-reset>img{width:100%;height:100%;object-fit:contain}.model-reset strong{position:absolute;left:8%;right:8%;top:67%;font:clamp(19px,2vw,28px) GalgameWenKai;color:#433c25;text-align:center;line-height:1.3}.model-reset small{display:block;font:13px GalgameUI;letter-spacing:.2em;color:#67714b;margin-bottom:5px}
.reset-gauge{position:absolute;left:-28%;right:-28%;bottom:-35px;background:#12353d;padding:9px 14px;border:1px solid #d6bd7e;color:#ffedbb;font:13px GalgameUI;display:flex;gap:15px;align-items:center}.reset-gauge i{display:block;width:160px;height:6px;background:#304c4c;overflow:hidden;flex:1}.reset-gauge i::after{content:'';display:block;background:#c4e2b1;width:100%;height:100%;transform-origin:left;animation:resetFill 1.5s ease-out both}.reset-gauge b{font-weight:400;color:#bdddab}
@keyframes resetFill{from{transform:scaleX(.01)}to{transform:scaleX(1)}}@keyframes resetCard{from{opacity:0;transform:translateY(60px) rotateY(80deg) rotate(-12deg)}to{opacity:1;transform:rotate(-3deg)}}
.prop-stage[data-prop="reset-card"]{container-type:size;padding-bottom:40px;background:radial-gradient(ellipse,#54847b66,transparent 65%)}
#battle-callout{top:auto;bottom:calc(var(--stage-bottom) + 25px);left:7%;max-width:70%;padding:12px 22px 15px;border-left:2px solid #e7c18c;background:linear-gradient(90deg,#102c38db,transparent);animation:battleName .4s ease both}
#battle-callout strong{font-size:clamp(24px,3.2vw,48px);max-width:none}#game-shell[data-cinematic="true"] #battle-callout{bottom:16%}
#game-shell[data-cg="five-over-sea"] #weather{z-index:3;mix-blend-mode:screen;pointer-events:none}
#game-shell[data-cg="cup-tremor"] #cg-frame{filter:saturate(.8)}
#postlude[data-phase="embers"] .postlude-art{animation:emberBreath 4s ease-in-out infinite}
@keyframes emberBreath{50%{filter:brightness(1.045) saturate(1.03)}}
#postlude[data-phase="grace"] .postlude-art,#postlude[data-phase="answer"] .postlude-art{animation:crabWarmth 3.5s ease-in-out infinite}
@keyframes crabWarmth{50%{filter:brightness(1.07)}}
@media(max-width:700px) and (orientation:portrait){#battle-callout{top:auto;bottom:36%;left:5%;max-width:90%;padding:8px 14px}#battle-callout strong{font-size:26px}#battle-callout small{font-size:10px}#game-shell[data-cinematic="true"] #battle-callout{bottom:26%}.model-reset{width:min(56vw,260px);height:auto;aspect-ratio:3/4}.model-reset strong{font-size:22px}.reset-gauge{left:-15%;right:-15%;font-size:11px}.relay-arrival{height:70%;width:100%}.relay-arrival img{left:0;height:95%;max-width:90%;object-fit:contain}}
@media(orientation:landscape) and (max-height:560px){#battle-callout{padding:5px 12px;bottom:calc(var(--stage-bottom) + 6px)}#battle-callout small{font-size:9px}#battle-callout strong{font-size:25px;margin-top:4px}.model-reset{height:85%;width:auto;aspect-ratio:3/4}.model-reset strong{font-size:15px}.model-reset small{font-size:9px}.reset-gauge{bottom:-24px;padding:5px 8px;font-size:9px}}
.motion-css-marker{--revision:3}
/* Camera inserts keep their native proportions. Text is printed onto the blank paper. */
.prop-stage[data-prop="letter"]{container-type:size;overflow:hidden;background:#192b30;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.letter-frame{position:relative;flex:none;height:min(100cqh,calc(100cqw * .78));aspect-ratio:16/9;container-type:size;animation:letterLift .7s ease both}
.letter-frame>img{display:block;width:100%;height:100%;object-fit:contain}
.letter-frame .white-letter{position:absolute;inset:12% 34% auto 34%;width:auto;max-width:none;padding:0;margin:0;box-shadow:none;transform:none;background:transparent;animation:none;color:#39332e;font:2.5cqh/1.48 GalgameUI}
.letter-frame .white-letter::before{display:none}
.letter-frame .white-letter header{font:4.8cqh/1.2 GalgameWenKai;margin:0 0 3cqh;text-align:center;color:#33322d}
.letter-frame .white-letter p{margin:1.6cqh 0}.letter-frame .white-letter p:last-of-type{margin-top:2.5cqh}.letter-frame .letter-flower{width:4.6cqh;height:4.6cqh}
@keyframes letterLift{from{opacity:0;transform:translateY(25px) rotate(-1deg)}to{opacity:1;transform:none}}
.memory-page,.policy-page{color:#343c35}.memory-page .notion-mark{color:#30352f}.memory-lines p{border-color:#91866e55}
.gallery-art-stage{position:relative;width:100%;height:68vh;min-height:300px}.gallery-art-stage .prop-stage{inset:0!important}.prop-stage.still *{animation:none!important}.prop-stage.still .phone-response p{opacity:1}
.cg-motion[data-scene="tibo-summon"]{left:30%;top:-13.3%;width:24%;transform:perspective(700px) rotateX(70deg)}
.model-reset strong{top:65%;font-size:clamp(18px,3cqh,26px);line-height:1.25}.model-reset small{font-size:11px;line-height:1.1;margin-bottom:2px}
#game-shell[data-postlude="true"][data-screen="title"] #room{filter:saturate(.95) brightness(1)}
#game-shell[data-effect="otherworld"] #cg-stage::after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,transparent 35%,#d0dbe313 52%,transparent 53%);mix-blend-mode:screen;animation:seaDistortion 7s ease both;pointer-events:none}
@keyframes seaDistortion{0%,20%{opacity:0;transform:translateY(3px)}45%{opacity:.6;transform:none}100%{opacity:.25;transform:translateY(-2px)}}
.phone-frame{position:relative;width:min(100cqw,133.33cqh);height:min(100cqh,75cqw);container-type:size}.phone-frame>img{width:100%;height:100%;object-fit:contain}.phone-response{position:absolute;left:40%;right:40%;top:36%;text-align:center;color:#e2d2b7}.phone-response .pixel-crab{width:36%;height:auto;animation:crabAnswer 2s steps(6,end) both}.phone-response p{font:3.1cqw GalgameWenKai;animation:phoneReply .5s 1.5s both;margin-top:12%}@keyframes crabAnswer{0%{transform:translateX(-70%) translateY(0)}15%,45%,75%{transform:translateX(-55%) translateY(-3px)}30%{transform:translateX(-45%)}60%{transform:translateX(-20%)}100%{transform:none}}@keyframes phoneReply{from{opacity:0}to{opacity:1}}
.playing-card.model{background:linear-gradient(145deg,#e5d8bd,#fff8e8);color:#66503a;border:2px solid #bd9966}.playing-card.model b{font:19px GalgameWenKai}.playing-card.model span{font:34px GalgameWenKai}
@media(max-width:700px) and (orientation:portrait){
 .letter-frame{height:min(100cqh,calc(100cqw * 1.45))}
 .letter-frame .white-letter{font-size:2.35cqh;line-height:1.5}
 .letter-frame .white-letter header{margin-bottom:3cqh}
 .letter-frame .white-letter p{margin:2.2cqh 0}
}
@media(prefers-reduced-motion:reduce){.cg-motion,.cg-motion img,.letter-frame,.relay-arrival img,.model-reset,.reset-gauge i::after{animation:none!important}.cg-motion[data-scene="five-over-sea"]{display:none}}
