* { margin:0; padding:0; box-sizing:border-box; user-select:none; -webkit-user-select:none;
    -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent; -webkit-user-drag:none; }
html, body { position:fixed; inset:0; overflow:hidden; touch-action:none; overscroll-behavior:none;
    background:#bfe9f5; transition:filter 2s; }
#stage { position:absolute; inset:env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
    display:flex; flex-direction:column; align-items:center; }
#monster { position:relative; margin:auto auto 0; width:min(96vw, 60vh); aspect-ratio:1; z-index:1;
    transform-origin:50% 100%; animation:breathe 3.5s ease-in-out infinite; }
#monster > svg { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; overflow:visible; }
#mouth-open, #mouth-shut, #lids, #zzz { display:none; }
#monster.open #mouth-smile, #monster.shut #mouth-smile, #monster.asleep #mouth-smile { display:none; }
#monster.open #mouth-open, #monster.shut #mouth-shut, #monster.asleep #mouth-shut,
#monster.asleep #lids { display:inline; }
#monster.asleep #zzz { display:block; }
#monster.asleep { animation:breathe 6s ease-in-out infinite; }
#monster.mmm { animation:mmm 1.2s ease-in-out; }
#monster.burp { animation:burp .9s ease-out; }
#monster.giggle { animation:giggle 1s ease-in-out; }
#monster.dance { animation:dance 1.8s ease-in-out; }
#zzz { position:absolute; right:4%; top:0; font:bold 8vmin sans-serif; color:#fff; }
#zzz span { display:inline-block; animation:float 3s ease-in-out infinite; }
#zzz span:nth-child(2) { animation-delay:.5s; font-size:1.25em; }
#zzz span:nth-child(3) { animation-delay:1s; font-size:1.5em; }
#fruits { position:relative; z-index:2; width:100%; max-width:900px; height:min(36vw, 25vh); min-height:110px;
    display:flex; padding:0 1vw; margin-bottom:3vh; }
.slot { flex:1; display:flex; align-items:center; justify-content:center; position:relative; }
.slot::before { content:""; position:absolute; width:min(31vw, 24vh); aspect-ratio:1; border-radius:50%;
    background:radial-gradient(circle at 35% 30%, #fff 0 8%, #fffaf0 40%, #ffe3a8); box-shadow:0 8px 0 #d99a45, 0 14px 16px #0b4f7a55; }
.slot svg { position:relative; width:76%; height:80%; pointer-events:none; filter:drop-shadow(0 6px 4px #0003); }
.slot svg.new { animation:pop .45s ease-out; }
.flying { position:fixed; pointer-events:none; z-index:5; }
.confetti { position:fixed; top:-8vmin; width:6vmin; height:6vmin; border-radius:50%; pointer-events:none;
    animation:fall 2.6s ease-in forwards; }
body.sleeping { filter:brightness(.65); }
#fruits { transition:opacity 2s; }
body.sleeping #fruits { opacity:.25; }
#wake { position:fixed; top:env(safe-area-inset-top); right:0; width:90px; height:90px; padding:20px; display:none; }
body.sleeping #wake { display:block; }
#wake svg { width:50px; height:50px; transform:rotate(-90deg); }
#wake circle { fill:#fff3; stroke:#fff; stroke-width:5; stroke-dasharray:101; stroke-dashoffset:101; }
#wake.holding circle { stroke-dashoffset:0; transition:stroke-dashoffset 3s linear; }
@keyframes breathe { 50% { transform:scale(1.02,1.03); } }
@keyframes mmm { 30% { transform:rotate(-5deg) scale(1.05); } 70% { transform:rotate(5deg) scale(1.05); } }
@keyframes burp { 30% { transform:scale(1.12,.9); } 60% { transform:scale(.96,1.06); } }
@keyframes giggle { 20%,60% { transform:translateX(-3%) rotate(-2deg); } 40%,80% { transform:translateX(3%) rotate(2deg); } }
@keyframes dance { 20% { transform:translateY(-6%) rotate(-8deg); } 40% { transform:none; }
  60% { transform:translateY(-6%) rotate(8deg); } 80% { transform:none; } }
@keyframes pop { 0% { transform:scale(0); } 70% { transform:scale(1.15); } }
@keyframes float { 50% { transform:translateY(-30%); opacity:.5; } }
@keyframes fall { to { transform:translateY(115vh) rotate(300deg); } }

/* bathroom: tiled wall, drifting bubbles, bath water */
#scene { position:fixed; inset:0; background-color:#bfe9f5;
    background-image:linear-gradient(#ffffffb0 3px, transparent 3px), linear-gradient(90deg, #ffffffb0 3px, transparent 3px),
      radial-gradient(circle at 50% 35%, #fffbe8cc, transparent 65%);
    background-size:76px 76px, 76px 76px, 100% 100%; }
#scene i { position:absolute; width:9vmin; height:9vmin; border-radius:50%; border:2px solid #fff;
    background:radial-gradient(circle at 32% 30%, #fff 0 10%, #ffffff30 30% 65%, #ffffff90); animation:drift 9s ease-in-out infinite; }
#scene i:nth-child(1) { left:6%; top:12%; } #scene i:nth-child(2) { left:80%; top:7%; width:13vmin; height:13vmin; animation-delay:-3s; }
#scene i:nth-child(3) { left:88%; top:42%; width:5vmin; height:5vmin; animation-delay:-5s; }
#scene i:nth-child(4) { left:3%; top:46%; width:6vmin; height:6vmin; animation-delay:-2s; }
#scene i:nth-child(5) { left:26%; top:4%; width:4vmin; height:4vmin; animation-delay:-6s; }
#scene i:nth-child(6) { left:68%; top:19%; width:3vmin; height:3vmin; animation-delay:-1s; }
#water { position:relative; z-index:1; width:100%; height:13vh; margin:-9vh 0 -1px; pointer-events:none; }
#water svg { position:absolute; inset:0; width:100%; height:100%; }
#water::after { content:""; position:absolute; top:100%; left:0; right:0; height:60vh; background:#2f9fd6; }
#water b { position:absolute; top:0; width:14vmin; height:14vmin; border-radius:50%;
    background:radial-gradient(circle at 35% 30%, #fff 0 45%, #dbf3fb); animation:float 4s ease-in-out infinite; }
#water b:nth-of-type(1) { left:-3%; } #water b:nth-of-type(2) { left:8%; top:20%; width:10vmin; height:10vmin; animation-delay:-1s; }
#water b:nth-of-type(3) { left:19%; top:32%; width:7vmin; height:7vmin; animation-delay:-2s; }
#water b:nth-of-type(4) { right:-3%; animation-delay:-1.5s; } #water b:nth-of-type(5) { right:9%; top:24%; width:9vmin; height:9vmin; }
#water b:nth-of-type(6) { right:20%; top:36%; width:6vmin; height:6vmin; animation-delay:-3s; }
#water b:nth-of-type(7) { left:38%; top:48%; width:5vmin; height:5vmin; } #water b:nth-of-type(8) { left:56%; top:50%; width:7vmin; height:7vmin; animation-delay:-2s; }
#water b:nth-of-type(9) { left:48%; top:56%; width:4vmin; height:4vmin; }
.eye { transform-box:fill-box; transform-origin:center; animation:blink 4.6s infinite; }
.pupil { transition:transform .25s ease-out; }
.arm.wave { transform-origin:465px 440px; animation:wave 3.2s ease-in-out infinite; }
#monster.dance .arm.wave, #monster.giggle .arm.wave { animation:wave .45s ease-in-out infinite; }
#monster.asleep .arm.wave, #monster.asleep .eye { animation:none; }
#mouth-open { transform-origin:300px 300px; animation:gape .16s ease-out; }
@keyframes blink { 0%,94%,100% { transform:none; } 97% { transform:scaleY(.1); } }
@keyframes wave { 50% { transform:rotate(11deg); } }
@keyframes gape { from { transform:scaleY(.5); } }
@keyframes drift { 50% { transform:translate(2vmin,-4vmin); } }
