.story-scene-picture{display:block;width:100%;height:auto;aspect-ratio:16/9;max-height:420px;overflow:hidden;image-rendering:pixelated;pointer-events:none;user-select:none;background:#f4eddb}
.story-scene-picture image{image-rendering:pixelated}
.story-scene-picture .story-scene-dog{isolation:isolate}
.story-scene-living-motion{animation:story-scene-breathe 3.8s ease-in-out infinite}
.story-scene-companion-motion{animation-duration:4.4s;animation-delay:-1.2s}
.story-scene-living-motion.story-expression-happy{animation:story-happy-bounce 1.9s ease-in-out infinite}
.has-interactive-dog .story-scene-actor[data-dog-actor="selected"] .story-scene-living-motion{animation:story-interactive-breathe 3.8s ease-in-out infinite}
.story-scene-turn-motion{transform-box:view-box;transform-origin:0 0;animation:story-scene-look-around 7s steps(1,end) infinite}
.story-response-happy-face,.story-response-heart{opacity:0;pointer-events:none}
.story-scene-actor[data-interaction-emotion="happy"] .story-response-happy-face,.story-scene-actor[data-interaction-emotion="happy"] .story-response-heart{opacity:1}
.story-scene-actor[data-interaction-facing="right"] .story-scene-turn-motion{animation:none;transform:translateX(var(--dog-turn-x)) scaleX(-1)}
.story-scene-actor[data-interaction-facing="left"] .story-scene-turn-motion{animation:none;transform:scaleX(1)}
.story-scene-emotion-icon{transform-box:fill-box;transform-origin:center bottom}
.story-scene-emotion-happy{animation:story-emotion-heart 1.5s ease-in-out infinite}
.story-scene-emotion-unwell{animation:story-emotion-sweat 2.4s ease-in-out infinite}
.story-scene-emotion-angry{animation:story-emotion-anger .8s steps(2,end) infinite}
@keyframes story-happy-bounce{0%,100%{transform:translate(0,0)}25%{transform:translate(5px,-2px)}50%{transform:translate(0,-4px)}75%{transform:translate(-5px,-2px)}}
@keyframes story-interactive-breathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-1px)}}
@keyframes story-scene-look-around{0%,43%,100%{transform:scaleX(1)}50%,87%{transform:translateX(var(--dog-turn-x)) scaleX(-1)}}
@keyframes story-emotion-heart{0%,100%{opacity:1}50%{opacity:.7}}
@keyframes story-emotion-sweat{0%,100%{opacity:1}50%{opacity:.6}}
@keyframes story-emotion-anger{50%{opacity:.65}}
.story-pose-motion-panting{animation:story-panting 1.1s ease-in-out infinite;transform-box:fill-box;transform-origin:center bottom}
.story-pose-motion-retching{animation:story-retching 2.4s ease-in-out infinite;transform-box:fill-box;transform-origin:center bottom}
.story-pose-motion-tremor{animation:story-tremor .3s steps(2,end) infinite}
.story-pose-motion-weak,.story-pose-motion-fearful,.story-pose-motion-resting,.story-pose-motion-limp{animation:none}
.story-pose-motion-scratch{animation:story-scratch 1.8s steps(3,end) infinite;transform-box:fill-box;transform-origin:center bottom}
@keyframes story-panting{50%{transform:scaleY(1.018)}}
@keyframes story-retching{40%,60%{transform:rotate(-2deg) translateY(2px)}}
@keyframes story-tremor{50%{transform:translateX(1.5px)}}
@keyframes story-scratch{35%,55%{transform:rotate(1deg)}45%,65%{transform:rotate(-1deg)}}
.story-scene-leaves-motion{transform-box:fill-box;transform-origin:center bottom;animation:story-scene-leaves 7s ease-in-out infinite}
.story-scene-grass-motion{animation:story-scene-grass 6s ease-in-out infinite}
.story-scene-light-motion{animation:story-scene-light 8s ease-in-out infinite}
.story-scene-photo-motion,.story-scene-picture[data-scene-id="memorial"] .story-scene-living-motion{animation:none;transform:none}
@keyframes story-scene-breathe{0%,100%{transform:translate(0,0)}25%{transform:translate(5px,-1px)}50%{transform:translate(0,-2px)}75%{transform:translate(-5px,-1px)}}
@keyframes story-scene-leaves{0%,100%{transform:rotate(-.3deg)}50%{transform:rotate(.3deg)}}
@keyframes story-scene-grass{0%,100%{transform:translateX(0)}50%{transform:translateX(1px)}}
@keyframes story-scene-light{0%,100%{opacity:.23}50%{opacity:.34}}
@media(max-width:700px){.story-scene-picture{max-height:none}}
@media(prefers-reduced-motion:reduce){.story-scene-picture .story-scene-living-motion,.story-scene-picture .story-scene-turn-motion,.story-scene-picture .story-scene-emotion-icon,.story-scene-picture .story-scene-leaves-motion,.story-scene-picture .story-scene-grass-motion,.story-scene-picture .story-scene-light-motion{animation:none;transform:none}}
@media print{.story-scene-picture{break-inside:avoid}.story-scene-picture .story-scene-living-motion,.story-scene-picture .story-scene-turn-motion,.story-scene-picture .story-scene-emotion-icon,.story-scene-picture .story-scene-leaves-motion,.story-scene-picture .story-scene-grass-motion,.story-scene-picture .story-scene-light-motion{animation:none;transform:none}}
/* Situation motion stays inside the existing illustration, never changes layout. */
.story-scene-picture[data-activity] [data-dog-actor="selected"] .story-scene-living-motion{transform-box:fill-box;transform-origin:center bottom}
.story-scene-picture[data-activity="food"] [data-dog-actor="selected"] .story-scene-living-motion,.story-scene-picture[data-activity="sniff"] [data-dog-actor="selected"] .story-scene-living-motion{animation:situation-sniff 4.5s ease-in-out infinite}
.story-scene-picture[data-activity="walk"] [data-dog-actor="selected"] .story-scene-living-motion{animation:situation-step 3.8s ease-in-out infinite}
.story-scene-picture[data-activity="greet"] [data-dog-actor="selected"] .story-scene-living-motion{animation:situation-listen 5s ease-in-out infinite}
.story-scene-picture[data-activity="toy"] [data-dog-actor="selected"] .story-scene-living-motion{animation:situation-play 4s ease-in-out infinite}
.story-scene-picture[data-activity="alone"] [data-dog-actor="selected"] .story-scene-living-motion{animation:situation-listen 7s ease-in-out infinite}
.story-scene-picture[data-activity="rest"] [data-dog-actor="selected"] .story-scene-living-motion,.story-scene-picture[data-activity="watch"] [data-dog-actor="selected"] .story-scene-living-motion{animation:story-interactive-breathe 5s ease-in-out infinite}
.story-scene-picture[data-activity="unwell"] [data-dog-actor="selected"] .story-scene-living-motion{animation:story-interactive-breathe 6s ease-in-out infinite}
.story-scene-picture[data-activity="unwell"] .story-pose-motion-tremor{animation:story-tremor .3s steps(2,end) infinite!important}
.story-scene-picture[data-activity="unwell"] .story-pose-motion-panting{animation:story-panting 1.1s ease-in-out infinite!important}
.situation-cue{animation:situation-cue 4.5s ease-in-out infinite;pointer-events:none}
[data-action="remove"] [data-story-prop]{opacity:.3;transition:opacity .6s}
@keyframes situation-sniff{0%,18%,65%,100%{transform:rotate(0)}30%,44%{transform:rotate(-3deg)}37%{transform:rotate(-1deg)}}
@keyframes situation-step{0%,65%,100%{transform:translate(0,0)}20%{transform:translate(-3px,-2px)}40%{transform:translate(-6px,0)}}
@keyframes situation-listen{0%,25%,75%,100%{transform:rotate(0)}40%,60%{transform:rotate(2deg)}}
@keyframes situation-play{0%,65%,100%{transform:translateY(0)}25%{transform:translateY(-5px)}40%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@keyframes situation-cue{0%,15%,70%,100%{opacity:0}30%,50%{opacity:.7}}
@media(prefers-reduced-motion:reduce){.story-scene-picture[data-activity] *{animation:none!important;transition:none!important}}
@media(max-width:700px){.game-shell .dog-panel .world{max-height:112px}.game-shell .story-scene-picture{height:112px;max-height:112px;object-fit:contain}.game-shell .companion-fold{margin-top:2px}.game-shell .companion-fold summary{min-height:28px}}
.story-scene-picture[data-activity]:not([data-activity=""]) .story-scene-turn-motion{animation:none}
