/* Motion stays inside the illustration and never moves an input target. */
.night-atmosphere{position:absolute;inset:0;z-index:2;pointer-events:none;overflow:hidden;border-radius:inherit}
.night-lamp-glow{position:absolute;inset:-8%;background:radial-gradient(ellipse at 22% 20%,#ffd17b22,transparent 58%);opacity:.55;animation:night-lamp 6s ease-in-out infinite}
.night-tension{position:absolute;inset:0;box-shadow:inset 0 0 40px 8px #dd715b44;opacity:0;transition:opacity .6s}
.night-danger .night-tension{opacity:.8;animation:night-tension 2s ease-in-out infinite}
.sleep-drift{position:absolute;right:12%;top:12%;width:24%;height:42%;opacity:0;transition:opacity .6s;color:#bbeced;text-shadow:0 2px 12px #07131d}
.sleep-drift span{position:absolute;left:10%;bottom:0;font:600 clamp(1rem,4vw,1.6rem)/1 system-ui;opacity:0;animation:night-sleep 3.9s ease-out infinite}
.sleep-drift span:nth-child(2){left:35%;animation-delay:1.3s;font-size:1.125rem}
.sleep-drift span:nth-child(3){left:60%;animation-delay:2.6s}
[data-night-mood="sleeping"] .sleep-drift,[data-night-mood="soothing"] .sleep-drift{opacity:1}
.soothe-waves{position:absolute;inset:8% 5%;opacity:0;transition:opacity .35s}
.soothe-waves i{position:absolute;left:50%;top:50%;width:62%;height:62%;border:1px solid #8fe1c875;border-radius:50%;opacity:0;transform:translate(-50%,-50%);animation:night-soothe 2.6s ease-out infinite}
.soothe-waves i:nth-child(2){animation-delay:.85s}.soothe-waves i:nth-child(3){animation-delay:1.7s}
[data-night-mood="soothing"] .soothe-waves{opacity:.8}
.rhythm-pad{position:relative}
.wriggle-controls .rocking-pad-arena>.rhythm-pad,.self-pad-arena>.rhythm-pad{position:absolute}
.rhythm-pad{isolation:isolate}
.rhythm-pad::after{content:"";position:absolute;inset:3px;border:1px solid #9af4d377;border-radius:inherit;opacity:0;pointer-events:none}
.night-held .rhythm-pad::after{animation:night-hold 1.8s ease-in-out infinite}
.night-input-ripple{position:absolute;inset:5px;border:2px solid #c2ffdfaa;border-radius:inherit;pointer-events:none}
.rhythm-pad strong,.rhythm-pad>span:not(.night-input-ripple){position:relative;z-index:1}
.night-comfortable .rhythm-band{box-shadow:inset 0 0 15px #8fe1c822;animation:night-comfort 2.4s ease-in-out infinite}
.night-float{position:absolute;z-index:4;bottom:10%;left:50%;transform:translateX(-50%);max-width:90%;padding:6px 12px;border:1px solid #8fe1c877;border-radius:100px;background:#0a253be8;color:#b5ffe1;white-space:nowrap;font-size:clamp(.875rem,3.6vw,1.0625rem);font-weight:700;pointer-events:none;box-shadow:0 4px 18px #0003}
.night-float-wriggle{color:#ffe0a8;border-color:#ffd17b77;background:#332514e8}
[data-night-mood="sleeping"] .baby-sprite,[data-night-mood="soothing"] .baby-sprite,[data-night-mood="sleeping"] .self-baby-sprite,[data-night-mood="soothing"] .self-baby-sprite{animation:night-baby-breathe 3.2s ease-in-out infinite;transform-origin:50% 60%}
[data-night-mood="fussing"] .baby-sprite,[data-night-mood="fussing"] .self-baby-sprite{animation:night-baby-fuss 1.5s ease-in-out infinite;transform-origin:50% 65%}
.night-tired .dad-motion{animation:night-tired-dad 4.8s ease-in-out infinite}
[data-night-phase="EVENT"] .event-image>img,[data-night-phase="BOSS_READY"] .scene>img{animation:night-event-arrive .7s ease-out both}
[data-night-phase="EVENT"] .event-copy,[data-night-phase="BOSS_READY"] .boss-copy,.feedback{animation:night-copy-arrive .35s ease-out both}
.night-shock .event-image>img{animation:night-startle .5s ease-out both}
.night-success .night-lamp-glow{background:radial-gradient(ellipse at 50% 65%,#8fe1c83b,transparent 65%);opacity:1}
.night-success .feedback-icon{animation:night-success-pop .5s ease-out both}
[data-night-phase="PAUSED"] .night-atmosphere *{animation-play-state:paused}
.night-urgent .event-copy .eyebrow,.night-urgent #boss-seconds{color:#ffd17b;animation:night-countdown 1.3s ease-in-out infinite}
[data-night-phase="TRANSFER_SETTLE"] .countdown-scene>img{animation:night-settle 5s ease-in-out infinite}
[data-night-phase="TRANSFER_SETTLE"] .soothe-waves{display:none}
[data-night-phase="TRANSFER_SETTLE"] .sleep-drift{right:6%;top:8%;height:28%}
[data-night-incident="outage"]>img{animation:night-outage 1s ease-out both}
[data-night-incident="coffee"]>img{animation:night-coffee 1.2s ease-out both}
@keyframes night-lamp{0%,100%{opacity:.4}50%{opacity:.8}}
@keyframes night-tension{0%,100%{opacity:.55}50%{opacity:.9}}
@keyframes night-sleep{0%{opacity:0;translate:0 12px;scale:.7}20%{opacity:.8}70%{opacity:.65}100%{opacity:0;translate:14px -58px;scale:1.1}}
@keyframes night-soothe{0%{opacity:0;scale:.5}20%{opacity:.5}100%{opacity:0;scale:1.2}}
@keyframes night-hold{0%,100%{opacity:.25;scale:1}50%{opacity:.8;scale:.98}}
@keyframes night-comfort{0%,100%{opacity:.8}50%{opacity:1}}
@keyframes night-baby-breathe{0%,100%{scale:1;translate:0 0}50%{scale:1.008 1.014;translate:0 -1px}}
@keyframes night-baby-fuss{0%,65%,100%{rotate:0deg;translate:0 0}12%{rotate:-.7deg;translate:-1px 0}24%{rotate:.7deg;translate:1px -1px}36%{rotate:-.4deg;translate:-1px 0}48%{rotate:.3deg}}
@keyframes night-tired-dad{0%,100%{translate:0 0;rotate:0deg}55%{translate:0 3px;rotate:-.7deg}70%{translate:0 -1px;rotate:.2deg}}
@keyframes night-event-arrive{from{scale:1.045;translate:0 5px;opacity:.7}to{scale:1;translate:0 0;opacity:1}}
@keyframes night-copy-arrive{from{translate:0 8px;opacity:.65}to{translate:0 0;opacity:1}}
@keyframes night-startle{0%,100%{translate:0 0}18%{translate:-3px 0}38%{translate:3px -1px}62%{translate:-1px 0}}
@keyframes night-success-pop{0%{scale:.75;opacity:.5}65%{scale:1.12;opacity:1}100%{scale:1}}
@keyframes night-countdown{0%,100%{opacity:1}50%{opacity:.68}}
@keyframes night-settle{0%,100%{scale:1}50%{scale:1.025}}
@keyframes night-outage{0%{filter:brightness(1)}35%{filter:brightness(.25)}100%{filter:brightness(.7)}}
@keyframes night-coffee{0%{scale:1.035;filter:brightness(.85)}100%{scale:1;filter:brightness(1)}}
.reduced-motion .sleep-drift,.reduced-motion .soothe-waves,.reduced-motion .rhythm-pad::after{display:none}
.reduced-motion .night-atmosphere *{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.sleep-drift,.soothe-waves,.rhythm-pad::after{display:none}}
