/* Individual fronds form the entrance; their silhouettes are the curtains. */
.welcome-shade{background:#203e2f;transition:opacity 1.5s ease .18s}
.jungle-canopy,.jungle-fall{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.canopy-leaf{position:absolute;left:var(--lx);top:var(--ly);width:var(--size,42vmax);height:calc(var(--size,42vmax)*1.7);transform:translate(-50%,-50%);color:var(--leaf-color,#52764b);transition:transform 1.85s cubic-bezier(.55,.04,.22,1);transition-delay:var(--delay,0s);will-change:transform}
.canopy-leaf svg{width:100%;height:100%;overflow:visible;transform:rotate(var(--angle));transform-origin:50% 78%;animation:jungle-breathe var(--sway,5s) ease-in-out infinite;animation-delay:var(--phase,-1s);filter:drop-shadow(0 8px 12px #122b2124)}
.canopy-leaf:nth-child(1){--lx:0%;--ly:5%;--angle:140deg;--size:49vmax;--leaf-color:#325b3d;--exit-x:-65vw;--exit-y:-60vh;--delay:.1s}
.canopy-leaf:nth-child(2){--lx:-3%;--ly:45%;--angle:62deg;--size:37vmax;--leaf-color:#698151;--exit-x:-65vw;--exit-y:-12vh;--sway:6s;--delay:.25s}
.canopy-leaf:nth-child(3){--lx:0%;--ly:94%;--angle:38deg;--size:43vmax;--leaf-color:#456e45;--exit-x:-65vw;--exit-y:60vh;--phase:-3s}
.canopy-leaf:nth-child(4){--lx:30%;--ly:112%;--angle:15deg;--size:34vmax;--leaf-color:#8c9d65;--exit-x:-26vw;--exit-y:80vh;--sway:4.3s;--delay:.3s}
.canopy-leaf:nth-child(5){--lx:100%;--ly:5%;--angle:-140deg;--size:49vmax;--leaf-color:#3b6341;--exit-x:65vw;--exit-y:-60vh;--phase:-2.5s;--delay:.15s}
.canopy-leaf:nth-child(6){--lx:103%;--ly:45%;--angle:-62deg;--size:37vmax;--leaf-color:#6f8857;--exit-x:65vw;--exit-y:-12vh;--sway:5.8s;--delay:.3s}
.canopy-leaf:nth-child(7){--lx:100%;--ly:94%;--angle:-38deg;--size:43vmax;--leaf-color:#4c7549;--exit-x:65vw;--exit-y:60vh;--phase:-3.5s}
.canopy-leaf:nth-child(8){--lx:72%;--ly:112%;--angle:-15deg;--size:34vmax;--leaf-color:#8d9e68;--exit-x:26vw;--exit-y:80vh;--sway:4.6s;--delay:.25s}
.canopy-leaf:nth-child(9){--lx:30%;--ly:-15%;--angle:173deg;--size:30vmax;--leaf-color:#6f8957;--exit-x:-22vw;--exit-y:-75vh;--sway:5.4s;--delay:.1s}
.canopy-leaf:nth-child(10){--lx:70%;--ly:-13%;--angle:-160deg;--size:36vmax;--leaf-color:#79925e;--exit-x:22vw;--exit-y:-75vh;--phase:-4s;--delay:.2s}
.canopy-leaf:nth-child(11){--lx:-4%;--ly:70%;--angle:75deg;--size:27vmax;--leaf-color:#92a36c;--exit-x:-75vw;--exit-y:28vh;--sway:4s;--delay:.05s}
.canopy-leaf:nth-child(12){--lx:104%;--ly:70%;--angle:-75deg;--size:27vmax;--leaf-color:#a0ad77;--exit-x:75vw;--exit-y:28vh;--sway:4.7s;--delay:.1s}
.welcome-scene.is-opening .canopy-leaf{transform:translate(calc(-50% + var(--exit-x)),calc(-50% + var(--exit-y)))}
.jungle-fall svg{position:absolute;width:24px;height:44px;left:var(--fall-x,15%);top:-70px;color:#b5c28b;opacity:0;animation:leaf-tumble var(--fall-time,5s) linear infinite;animation-delay:var(--fall-delay,-2s)}
.jungle-fall svg:nth-child(2){--fall-x:83%;--fall-time:6s;--fall-delay:-4s;width:30px;height:51px;color:#819958}
.jungle-fall svg:nth-child(3){--fall-x:28%;--fall-time:5.8s;--fall-delay:-4.5s;width:18px;height:32px}
.jungle-fall svg:nth-child(4){--fall-x:68%;--fall-time:4.8s;--fall-delay:-1s;color:#a1b67c}
.jungle-fall svg:nth-child(5){--fall-x:5%;--fall-time:6.4s;--fall-delay:-5s;width:34px;height:60px}
.jungle-fall svg:nth-child(6){--fall-x:95%;--fall-time:5.4s;--fall-delay:-3s;width:27px;height:47px}
.welcome-copy{text-shadow:0 2px 24px #102d21,0 1px 8px #102d2188}
.welcome-copy button{text-shadow:none}
.welcome-scene.is-opening .welcome-copy{transform:translateY(-12px) scale(1.07)}
.welcome-animals{z-index:1}
.welcome-scene.is-opening .jungle-fall{opacity:0;transition:opacity .8s .6s}
@keyframes jungle-breathe{0%,100%{transform:rotate(calc(var(--angle) - 3deg)) scale(1)}50%{transform:rotate(calc(var(--angle) + 4deg)) scale(1.035)}}
@keyframes leaf-tumble{0%{translate:-20px -30px;rotate:-35deg;opacity:0}10%{opacity:.65}50%{translate:35px 48vh;rotate:90deg}90%{opacity:.55}100%{translate:-15px 110vh;rotate:230deg;opacity:0}}

/* A single visitor peeks in, waves, and retreats. The overlay never catches clicks. */
.edge-guests{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:8;contain:layout paint}
.peek-window{position:absolute;width:130px;height:150px;transform:translate(var(--hide-x,0),var(--hide-y,0));--paw-color:#d9b578}
.peek-character{position:relative;width:100%;height:100%;transform:rotate(var(--face-angle,0deg));transform-origin:center}
.peek-animal{width:100%;height:100%;filter:drop-shadow(0 3px 2px #304e3c1a)}
.peek-window[data-edge="left"]{left:-47px;top:var(--peek-position);--hide-x:-115%;--hide-y:0%;--face-angle:85deg}
.peek-window[data-edge="right"]{right:-47px;top:var(--peek-position);--hide-x:115%;--hide-y:0%;--face-angle:-85deg}
.peek-window[data-edge="top"]{top:-63px;left:var(--peek-position);--hide-x:0%;--hide-y:-115%;--face-angle:180deg}
.peek-window[data-edge="bottom"]{bottom:-66px;left:var(--peek-position);--hide-x:0%;--hide-y:115%;--face-angle:0deg}
.peek-paw{position:absolute;right:3%;top:26%;width:31px;height:31px;color:var(--paw-color);transform-origin:20% 90%;opacity:0}
.peek-hello{position:absolute;top:7%;left:6%;font:600 12px/1 var(--serif);color:#4b633e;background:#f7f3e8;padding:7px 10px;border:1px solid #aebb8d;border-radius:12px 14px 2px 14px;opacity:0;transform:rotate(-10deg)}
.peek-window.is-visiting{animation:peek-visit 5.2s cubic-bezier(.35,.7,.25,1) both}
.is-visiting .peek-paw{animation:hello-wave .42s ease-in-out 6 alternate 1.2s,hello-appear 5.2s both}
.is-visiting .peek-hello{animation:hello-appear 5.2s both}
.is-visiting .peek-animal{animation:peek-nod 1.1s ease-in-out 2 1.3s}
@keyframes peek-visit{0%,100%{transform:translate(var(--hide-x),var(--hide-y))}17%{transform:translate(0,0)}25%{transform:translate(calc(var(--hide-x)*.15),calc(var(--hide-y)*.15))}38%,76%{transform:translate(0,0)}86%{transform:translate(calc(var(--hide-x)*.08),calc(var(--hide-y)*.08))}}
@keyframes hello-wave{from{rotate:-15deg}to{rotate:27deg}}
@keyframes hello-appear{0%,23%,82%,100%{opacity:0}30%,74%{opacity:1}}
@keyframes peek-nod{50%{translate:0 -3px;rotate:4deg}}

/* Safari crew: individual greetings and a short, untimed matching game. */
.safari-game{display:flex;align-items:center;justify-content:space-between;gap:24px;max-width:900px;margin:0 auto 39px;padding:23px 27px;text-align:left;background:#e8edda;border:1px dashed #a9b68c;border-radius:24px 29px 23px 28px}
.game-eyebrow{display:block;font-size:7px;letter-spacing:1.65px;font-weight:600;color:var(--brown);margin-bottom:8px}
.game-copy h3{font:500 25px/1.2 var(--serif);letter-spacing:-.6px;color:var(--forest);margin:0 0 8px}
.game-copy p{font-size:11px;color:#617253;margin:0;line-height:1.7;max-width:470px}
.game-actions{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;flex:none;flex-wrap:wrap;max-width:100%}
.game-actions .button{border:0;font-family:var(--sans);min-height:42px;padding:10px 20px;font-size:11px;cursor:pointer}
.game-progress{font:500 17px/1.4 var(--serif);color:var(--forest);white-space:nowrap}
.game-stop{font:400 10px/1.5 var(--sans);border:0;padding:5px 2px;color:var(--brown);background:none;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
.animal-crew{position:relative}
.animal-friend .animal-blob{isolation:isolate}
.animal-friend .hello-paw{position:absolute;right:3%;top:32%;width:27%;height:27%;color:var(--paw-color,#d9b578);transform-origin:20% 85%;animation:none;opacity:0;z-index:2}
.animal-friend[data-animal="elephant"]{--paw-color:#b9c5af}.animal-friend[data-animal="giraffe"]{--paw-color:#e1c18a}.animal-friend[data-animal="monkey"]{--paw-color:#ddc49b}.animal-friend[data-animal="zebra"]{--paw-color:#f1e7ce}.animal-friend[data-animal="tortoise"]{--paw-color:#b6c590}
.friend-bubble{position:absolute;left:50%;top:-18px;translate:-50% 0;white-space:nowrap;z-index:3;font:500 13px/1 var(--serif);color:var(--brown);background:#fffbed;border:1px solid #c9bb9c;padding:9px 12px;border-radius:13px 16px 15px 3px;opacity:0;pointer-events:none}
.is-hello .friend-bubble{animation:friend-speech 2.8s both}
.animal-friend.is-hello .hello-paw{opacity:1;animation:hello-wave .38s ease-in-out 6 alternate}
.animal-friend.is-hello .animal-blob>svg:first-child{animation:friend-jump .65s ease-in-out 3}
.animal-friend[data-animal="elephant"].is-hello .animal-blob>svg:first-child{animation:friend-sway .8s ease-in-out 3}
.animal-friend[data-animal="giraffe"].is-hello .animal-blob>svg:first-child{animation:friend-nod .75s ease-in-out 3}
.animal-friend[data-animal="monkey"].is-hello .animal-blob>svg:first-child{animation:friend-swing .7s ease-in-out 3}
.animal-friend[data-animal="tortoise"].is-hello .animal-blob>svg:first-child{animation:friend-sway 1.1s ease-in-out 2}
.animal-friend.is-found .animal-blob{background:#d8e5c0;outline:2px solid #95ad70;outline-offset:3px}
.friend-found{position:absolute;right:2px;bottom:-2px;display:none;width:24px;height:24px;align-items:center;justify-content:center;color:#f7f3e8;background:#49663c;border:2px solid var(--cream);border-radius:50%;font-size:12px;z-index:3}
.is-found .friend-found{display:flex}
.crew-sparkles{position:absolute;inset:0;pointer-events:none;overflow:visible;z-index:4}
.crew-sparkles span{position:absolute;left:50%;top:45%;font-size:17px;color:var(--spark-color,#a48b4f);animation:friend-spark 1.1s ease-out both;translate:0 0}
@keyframes friend-speech{0%{opacity:0;transform:translateY(7px) scale(.85)}12%,82%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-5px)}}
@keyframes friend-jump{0%,100%{translate:0 0;rotate:0deg}40%{translate:0 -14px;rotate:-5deg}70%{translate:0 -3px;rotate:4deg}}
@keyframes friend-sway{0%,100%{rotate:-7deg;translate:-3px 0}50%{rotate:7deg;translate:3px -5px}}
@keyframes friend-nod{0%,100%{rotate:0deg;translate:0 0}40%{rotate:9deg;translate:0 5px}70%{rotate:-4deg;translate:0 -4px}}
@keyframes friend-swing{0%,100%{rotate:-10deg;translate:-4px -2px}50%{rotate:12deg;translate:5px -13px}}
@keyframes friend-spark{0%{opacity:0;transform:translate(0,0) scale(.4)}18%{opacity:1}100%{opacity:0;transform:translate(var(--spark-x),var(--spark-y)) rotate(110deg) scale(1.1)}}
@media(max-width:760px){.canopy-leaf{width:calc(var(--size)*.92);height:calc(var(--size)*1.56)}.canopy-leaf:nth-child(2){--lx:-12%}.canopy-leaf:nth-child(6){--lx:112%}.canopy-leaf:nth-child(4),.canopy-leaf:nth-child(8){--ly:113%}.canopy-leaf:nth-child(9),.canopy-leaf:nth-child(10){--ly:-22%}.jungle-fall svg{width:17px;height:32px}.welcome-copy{z-index:2}.safari-game{padding:20px;gap:17px;flex-direction:column;text-align:center;margin-bottom:43px}.game-copy h3{font-size:23px}.game-copy p{font-size:10px;max-width:270px}.game-actions{flex-direction:row;gap:17px;min-height:36px}.game-progress{font-size:15px}.game-stop{font-size:9px}.friend-bubble{font-size:11px;padding:7px 9px;top:-14px}.friend-found{width:21px;height:21px;font-size:10px}.peek-window{width:100px;height:116px}.peek-window[data-edge="left"]{left:-42px}.peek-window[data-edge="right"]{right:-42px}.peek-window[data-edge="top"]{top:-48px}.peek-window[data-edge="bottom"]{bottom:-49px}.peek-paw{width:25px;height:25px}.peek-hello{font-size:10px;padding:5px 7px}}
html[data-motion="off"] .edge-guests{display:none!important}
html[data-motion="off"] .animal-friend.is-hello .animal-blob>svg,html[data-motion="off"] .animal-friend.is-hello .hello-paw{animation:none!important}
html[data-motion="off"] .is-hello .friend-bubble{opacity:1}
@media(prefers-reduced-motion:reduce){.edge-guests{display:none!important}.animal-friend.is-hello .animal-blob>svg,.animal-friend.is-hello .hello-paw{animation:none!important}.is-hello .friend-bubble{opacity:1}}
@media print{.edge-guests,.safari-game,.hello-paw,.friend-bubble,.crew-sparkles{display:none!important}}
