/* Painted, registered animation frames. The same artwork is used in every view. */
.hen-art{display:inline-block;position:relative;isolation:isolate;flex-shrink:0;width:143px;height:143px;vertical-align:middle}
.hen-art:before{content:'';position:absolute;z-index:0;left:23%;right:22%;top:79%;height:10%;border-radius:50%;background:radial-gradient(ellipse,#4f502c63, #5e623331 44%,transparent 72%);filter:blur(1px)}
.hen-sprite{position:absolute;inset:0;display:block;background-image:url('./assets/hen-cartoon-atlas.webp');background-size:400% 400%;background-position:0 100%;background-repeat:no-repeat;transform-origin:50% 81%;filter:saturate(1);backface-visibility:hidden}
.hen-art.hen-warm .hen-sprite{filter:saturate(1)}
.hen-art.hen-ivory .hen-sprite{filter:saturate(.9) brightness(1.025)}
.hen-art.hen-honey .hen-sprite{filter:sepia(.12) saturate(1.1) brightness(.97)}
.scene-hen{filter:none;transition:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;will-change:translate}
.scene-hen .hen-wander,.scene-hen.hungry .hen-wander{animation:none;translate:none;line-height:0}
.scene-hen .hen-art{overflow:visible;translate:0 var(--step-lift,0px)}
.scene-hen[data-facing="left"] .hen-sprite{scale:-1 1}
.scene-hen[data-motion="idle"] .hen-art{animation:painted-breathe 3.8s ease-in-out infinite;animation-delay:var(--hen-delay)}
.scene-hen[data-motion="pet"] .hen-art,.scene-hen[data-motion="happy"] .hen-art{animation:painted-hop .8s ease-out}
.scene-hen[data-laying]:not([data-laying=""]) .hen-art,.scene-hen[data-collecting="true"] .hen-art{animation:none;transform-origin:50% 84%}
.scene-hen[data-laying="nest"] .hen-art{animation:feather-settle 2.6s ease-in-out infinite;animation-delay:var(--hen-delay)}
.scene-hen .hen-bubble{z-index:4;pointer-events:none}
.scene-hen .hen-name{z-index:5;pointer-events:none}
.scene-hen.ready .hen-bubble{animation:ready-bubble 4s infinite}
.scene-hen .egg-nest{left:46%;bottom:12%;z-index:3;rotate:-5deg;width:43px;height:17px;background:repeating-linear-gradient(14deg,#bc9453 0 1px,#d9bb79 1px 3px,#b99353 3px 4px);box-shadow:0 2px 3px #52502c40,inset 0 2px 2px #86633166;opacity:0;scale:.7;transform-origin:center}
.scene-hen[data-nest-visible="true"] .egg-nest{opacity:var(--nest-reveal,1);scale:1}
.scene-hen .egg-nest i{background:radial-gradient(ellipse at 35% 25%,#fff5d9,#eed7a6 70%,#c8a875);box-shadow:inset -2px -2px 2px #b8975d35,1px 2px 2px #5c4e2c40;border:1px solid #c8ae7a}
.scene-hen .egg-nest i{opacity:var(--egg-reveal,0);translate:calc((1 - var(--egg-reveal,0))*-7px) calc((1 - var(--egg-reveal,0))*-9px);scale:calc(.65 + var(--egg-reveal,0)*.35);transform-origin:bottom center}
.scene-hen .egg-nest i+i{opacity:var(--egg-reveal-second,0);translate:calc((1 - var(--egg-reveal-second,0))*-5px) calc((1 - var(--egg-reveal-second,0))*-7px);scale:calc(.65 + var(--egg-reveal-second,0)*.35)}
.scene-hen .hen-sprite{transform:scaleY(var(--pose-stretch,1));transform-origin:50% 94%}
.scene-hen[data-laying]:not([data-laying=""]):not([data-laying="ready"]) .hen-bubble{animation:none}
.ground-grain{position:absolute;inset:0;z-index:2;pointer-events:none;opacity:0;transition:opacity .3s}
.ground-grain i{position:absolute;left:70%;top:82%;width:4px;height:2px;border-radius:60%;rotate:25deg;background:#e4bd5f;box-shadow:0 1px 1px #785d32}
.ground-grain i:nth-child(2){translate:7px -3px;rotate:80deg}.ground-grain i:nth-child(3){translate:-3px 5px;rotate:-40deg}.ground-grain i:nth-child(4){translate:10px 4px}.ground-grain i:nth-child(5){translate:2px -6px;rotate:110deg}.ground-grain i:nth-child(6){translate:15px -1px}
.scene-hen[data-facing="left"] .ground-grain{scale:-1 1}
.scene-hen[data-motion="peck"] .ground-grain{opacity:1}
.scene-hen[data-motion="peck"] .ground-grain i{animation:grain-nibble 1s steps(1,end) infinite}
.scene-hen[data-motion="peck"] .ground-grain i:nth-child(even){animation-delay:.45s}
.is-dusk .scene-hen .hen-art{filter:brightness(.76) saturate(.85)}
.scene-hen.selected:after{border-color:#fff0af80;background:#efd78a0d}
@keyframes painted-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.009,.994)}}
@keyframes painted-hop{0%,100%{transform:translateY(0)}25%{transform:translateY(2px) scale(1.02,.98)}54%{transform:translateY(-8px) rotate(-2deg)}80%{transform:translateY(0)}}
@keyframes feather-settle{0%,100%{transform:translateY(1px)}50%{transform:translateY(2px) scale(1.012,.987)}}
@keyframes grain-nibble{0%,100%{opacity:1}55%{opacity:.2}}
@media(prefers-reduced-motion:reduce){.scene-hen{will-change:auto}.scene-hen .hen-art,.scene-hen .egg-nest i,.ground-grain i{animation:none!important}.scene-hen .egg-nest{transition:none}}
