/* Zakzak's day (js/day.js): routine calls, toys to tidy, bedtime, bath, the quiet house */
.zd-call { animation: zd-call 1s ease-in-out infinite; }
.zd-call::before { content: ''; position: absolute; inset: -14%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(rgba(255, 236, 120, .7), transparent 65%); }
@keyframes zd-call { 50% { transform: translateX(-50%) scale(1.1); } }

.zd-toy { position: absolute; bottom: 3vh; width: clamp(40px, 9vmin, 64px); transform: translateX(-50%); z-index: 4; cursor: pointer;
  transition: left .6s ease-in, bottom .6s cubic-bezier(.3, -0.6, .7, 1), transform .6s; animation: zd-bob 1.4s ease-in-out infinite; }
.zd-toy svg { display: block; width: 100%; height: auto; }
.zd-toy.is-away { transform: translateX(-50%) scale(.4); animation: none; }
@keyframes zd-bob { 50% { transform: translateX(-50%) translateY(-1.2vh) rotate(8deg); } }

/* Bedtime */
.zh-zak.zd-lying { bottom: 24vh; }
.zh-zak.zd-lying .pl-zak-body { transform: rotate(-82deg); transition: transform .5s; }
.zd-blanket { position: absolute; bottom: 23vh; width: clamp(110px, 26vmin, 180px); transform: translateX(-30%); z-index: 4; pointer-events: none; animation: zd-breathe 3s ease-in-out infinite; }
.zd-blanket svg { display: block; width: 100%; height: auto; }
@keyframes zd-breathe { 50% { transform: translateX(-30%) scaleY(1.06); } }
.zd-zzz { position: absolute; bottom: 44vh; z-index: 4; pointer-events: none; font: 700 clamp(18px, 5vmin, 34px) sans-serif; color: #fff; }
.zd-zzz span { display: inline-block; opacity: 0; animation: zd-z 3s infinite; }
.zd-zzz span:nth-child(2) { animation-delay: 1s; font-size: 1.3em; }
.zd-zzz span:nth-child(3) { animation-delay: 2s; font-size: 1.6em; }
@keyframes zd-z { 20% { opacity: 1; } 100% { opacity: 0; transform: translate(2vmin, -6vh); } }
.zd-turn { animation: zd-turn .8s; }
@keyframes zd-turn { 50% { transform: rotate(-70deg) translateX(1vmin) scaleX(-1); } }
.zd-yawn { animation: zd-yawn 1.2s; }
@keyframes zd-yawn { 40% { transform: scale(1.05, .92); } }
.zd-plate { position: absolute; bottom: 2vh; width: clamp(60px, 14vmin, 100px); transform: translateX(-50%); z-index: 4; pointer-events: none; animation: zh-drop .8s; }
.zd-plate svg { display: block; width: 100%; }

/* Day: the bath */
.zh-zak.zd-bathing { bottom: 4vh; }
.zd-tub { position: absolute; bottom: 1vh; width: clamp(150px, 34vmin, 240px); transform: translateX(-50%); z-index: 4; pointer-events: none; }
.zd-tub svg { display: block; width: 100%; overflow: visible; }
.zd-bubbles { animation: zd-bubble 2s ease-in-out infinite; }
@keyframes zd-bubble { 50% { transform: translateY(-4px) scale(1.03); } }

/* The quiet house: no planet, books, music or lessons; the salon is darker */
body.zd-quiet :is(.zh-home, #books-btn, .music-btn) { display: none !important; }
body.zd-quiet .zh-door, body.zd-quiet .zh-toys, body.zd-quiet .zh-item.is-shadow { opacity: .55; }
body.zd-sleep .zh::after { content: ''; position: fixed; inset: 0; pointer-events: none; background: rgba(20, 30, 70, .35); }
body.zd-sleep .zh-window svg rect:nth-child(2) { fill: #26336b; }
.zd-panel select { margin-inline-start: .5em; font: inherit; }

@media (prefers-reduced-motion: reduce) {
  .zd-call, .zd-toy, .zd-blanket, .zd-zzz span, .zd-bubbles { animation: none !important; }
}
