.birdhouse-screen{max-width:1200px;padding-bottom:15px}.bh-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:4px 0 10px}.bh-heading h1{color:#557d62;margin:2px 0;font-size:clamp(24px,3vw,34px)}.bh-heading .home-kicker{color:#6b9d88}.bh-scene-name{font-weight:800;color:#5f826d;background:#fff9df;padding:10px 18px;border:3px solid white;border-radius:22px}
.bh-scene{position:relative;width:min(100%,calc((100svh - 185px)*5/3));margin-inline:auto;aspect-ratio:5/3;max-height:none;min-height:0;overflow:hidden;border:5px solid #fff7df;border-radius:32px;background:#b7e4ed center/cover;box-shadow:0 7px 0 #92b997,0 16px 30px #48785830;isolation:isolate;touch-action:manipulation}.bh-scene:before{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#47664f20,transparent 35%);z-index:0;pointer-events:none}.bh-scene[data-weather=autumn]{filter:sepia(.12)}.bh-scene[data-weather=rain]:before{background:linear-gradient(#a7c5ed44,#daedf930)}.bh-scene[data-weather=snow]:before{background:linear-gradient(#e9faff33 65%,#ffffffbb)}
.bh-hint{position:absolute;top:3%;left:3%;max-width:40%;padding:12px 18px;border:3px solid white;border-radius:21px;background:#fff8dae8;color:#65714d;box-shadow:0 4px 0 #afba9a70;font-size:clamp(16px,2vw,24px);font-weight:900;z-index:5;pointer-events:none}.bh-house{position:absolute;left:56%;top:52%;width:24%;padding:0;border:0;background:transparent;cursor:pointer;z-index:4;touch-action:manipulation;filter:drop-shadow(0 9px 4px #44553255);transition:top .1s linear}.bh-house svg{display:block;width:100%;height:100%;overflow:visible}.bh-house:disabled{opacity:1;cursor:default}.bh-scene[data-phase=fallen] .bh-house{animation:bh-house-invite 2.3s ease-in-out infinite}.bh-scene[data-phase=settling] .bh-house{animation:bh-house-settle 1.3s ease-out}.bh-house:focus-visible,.bh-wheel:focus-visible{outline:5px solid #fff09a;outline-offset:8px;border-radius:25px}
.bh-ropes{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}.bh-rope{fill:none;stroke:#e9cf91;stroke-width:7;stroke-linecap:round;stroke-dasharray:5 3;filter:drop-shadow(1px 2px 0 #785c3c)}.bh-scene[data-phase=fallen] .bh-ropes{display:none}.bh-scene[data-phase=throwing] .bh-rope{stroke-dasharray:800;animation:bh-rope-toss 1.3s ease-out both}.bh-pulley{fill:#d4b270;stroke:#876847;stroke-width:4}.bh-pulley-inner{fill:#789fa6;stroke:#e6f7ee;stroke-width:3}.bh-wheel{position:absolute;left:23%;top:55%;width:20%;aspect-ratio:1;min-width:110px;padding:0;background:transparent;border:0;cursor:grab;touch-action:none;z-index:6;filter:drop-shadow(0 9px 4px #334c3655);user-select:none;-webkit-user-select:none}.bh-wheel:active{cursor:grabbing}.bh-wheel:disabled{opacity:1;cursor:default}.bh-wheel-art{display:block;width:100%;height:100%;transition:transform .09s linear}.bh-wheel-art svg{display:block;width:100%;height:100%}.bh-turning .bh-wheel-art{transition:none}.bh-wheel-help{position:absolute;left:25%;top:91%;font-weight:900;color:#465e46;background:#fff5d7d9;padding:4px 13px;border-radius:15px;z-index:6;pointer-events:none;font-size:clamp(12px,1.4vw,17px)}.bh-scene:not([data-phase=ready]) .bh-wheel-help{display:none}.bh-direction{position:absolute;left:22%;top:48%;width:22%;text-align:center;color:#fff8cb;text-shadow:0 2px 2px #40694c;font-size:42px;z-index:5;pointer-events:none}.bh-scene:not([data-phase=ready]) .bh-direction{display:none}
.bh-progress{position:absolute;left:4%;bottom:4%;width:15%;height:12px;background:#fafbe3;border:3px solid white;border-radius:14px;box-shadow:0 3px 0 #6e9478;overflow:hidden;z-index:5}.bh-progress span{display:block;width:0;height:100%;border-radius:12px;background:linear-gradient(90deg,#79b68b,#c0e19b);transition:width .1s}
.bh-bird{position:absolute;width:12%;z-index:3;filter:drop-shadow(0 5px 3px #3e623c44);animation:bh-bird-bob 3s ease-in-out infinite;animation-delay:var(--delay);transition:left 1.1s ease-in-out,top 1.1s ease-in-out}.bh-bird svg{width:100%;height:100%;overflow:visible}.bh-bird-0{left:9%;top:61%}.bh-bird-1{left:76%;top:60%}.bh-bird-2{left:84%;top:24%}.bh-bird-eyes{transform-box:fill-box;transform-origin:center;animation:bh-blink 3.6s infinite;animation-delay:var(--delay)}.bh-bird-wing{transform-origin:85px 135px;animation:bh-wing 4s ease-in-out infinite;animation-delay:var(--delay)}.bh-scene[data-phase=settling] .bh-bird-0,.bh-scene[data-phase=done] .bh-bird-0{left:50%;top:32%}.bh-scene[data-phase=settling] .bh-bird-1,.bh-scene[data-phase=done] .bh-bird-1{left:76%;top:27%}.bh-scene[data-phase=settling] .bh-bird-wing{animation:bh-wing .23s ease-in-out infinite alternate}
.bh-cloud{position:absolute;left:10%;top:14%;width:18%;height:8%;border-radius:50%;background:#fff9;filter:blur(1px);z-index:1;pointer-events:none;animation:bh-cloud-drift 25s ease-in-out infinite alternate}.bh-cloud:before,.bh-cloud:after{content:'';position:absolute;width:55%;height:150%;border-radius:50%;background:#fffc;left:15%;top:-60%}.bh-cloud:after{left:45%;top:-25%;width:40%;height:110%}.bh-cloud-two{left:39%;top:27%;width:12%;opacity:.7;animation-delay:-12s;animation-duration:32s}
.bh-leaves{position:absolute;right:-2%;top:-3%;width:28%;height:19%;pointer-events:none;z-index:3;transform-origin:100% 0;animation:bh-leaf-sway 5s ease-in-out infinite alternate}.bh-leaves i{position:absolute;width:20%;height:36%;background:radial-gradient(ellipse at 35% 25%,#d2e89b,#85b066 55%,#4d8051);border-radius:5% 90% 5% 90%;box-shadow:inset 2px 2px 0 #f5ffc844,0 4px 4px #45684933;rotate:35deg}.bh-leaves i:nth-child(2){left:21%;top:15%;rotate:-20deg}.bh-leaves i:nth-child(3){left:42%;top:4%}.bh-leaves i:nth-child(4){left:62%;top:22%;rotate:-45deg}.bh-leaves i:nth-child(5){left:79%;top:3%}.bh-weather{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}.bh-weather i{position:absolute;left:var(--x);top:-8%;width:7px;height:7px;background:#fff;opacity:.7;border-radius:50%;animation:bh-fall var(--time) linear infinite;animation-delay:var(--delay)}[data-weather=rain] .bh-weather i{width:2px;height:17px;background:#e5f6ff;opacity:.65;animation-duration:2s}[data-weather=autumn] .bh-weather i,[data-weather=garden] .bh-weather i{width:12px;height:7px;border-radius:80% 10%;background:#eac180}[data-weather=garden] .bh-weather i{background:#ffc1d3}.bh-sparkles{position:absolute;left:57%;top:15%;width:23%;height:39%;z-index:5;pointer-events:none;display:none}.bh-scene[data-phase=settling] .bh-sparkles{display:block}.bh-sparkles i{position:absolute;color:#fff4a2;font-size:32px;animation:bh-sparkle 1.3s ease-out both}.bh-sparkles i:nth-child(2){left:80%;top:30%;animation-delay:.2s}.bh-sparkles i:nth-child(3){left:10%;top:80%;animation-delay:.3s}
.bh-paused *{animation-play-state:paused!important}.bh-cover{position:relative;overflow:hidden;background:#bce6ea url('birdhouse-art/park.webp') center/cover}.bh-cover-house{position:absolute;width:55%;left:33%;top:6%;filter:drop-shadow(0 5px 3px #395c3b55)}.bh-cover-bird{position:absolute;width:36%;left:4%;bottom:4%}.bh-cover svg{width:100%;height:100%}
@keyframes bh-house-invite{0%,100%{transform:rotate(-2deg)}50%{transform:rotate(2deg) translateY(-4px)}}@keyframes bh-house-settle{0%{transform:rotate(-6deg)}35%{transform:rotate(4deg)}70%{transform:rotate(-2deg)}100%{transform:none}}@keyframes bh-rope-toss{from{stroke-dashoffset:800;opacity:.5}to{stroke-dashoffset:0;opacity:1}}@keyframes bh-bird-bob{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-6px) rotate(2deg)}}@keyframes bh-blink{0%,42%,48%,100%{transform:scaleY(1)}44%,46%{transform:scaleY(.08)}}@keyframes bh-wing{0%,85%,100%{transform:rotate(0)}90%{transform:rotate(-14deg)}}@keyframes bh-cloud-drift{to{transform:translateX(80px)}}@keyframes bh-leaf-sway{to{transform:rotate(-4deg)}}@keyframes bh-fall{to{transform:translate(-35px,680px) rotate(140deg)}}@keyframes bh-sparkle{0%{opacity:0;transform:scale(.4)}30%{opacity:1;transform:scale(1.3)}100%{opacity:0;transform:translateY(-40px) scale(.8)}}
@media(max-width:700px){.bh-scene{width:100%;aspect-ratio:5/4;min-height:310px;max-height:none;background-position:65% center}.bh-heading{margin-bottom:8px}.bh-scene-name{font-size:12px;padding:7px 10px}.bh-hint{font-size:15px;padding:8px 10px;max-width:48%}.bh-wheel{left:18.5%;top:55%;width:29%}.bh-house{left:53.5%;width:29%}.bh-direction{left:19%;top:48%;font-size:33px}.bh-wheel-help{left:17%;top:89%;font-size:12px}.bh-progress{width:12%;left:3%}.bh-bird{width:16%}.bh-bird-0{left:3%;top:34%}.bh-bird-1{left:79%;top:66%}}
@media(prefers-reduced-motion:reduce){.birdhouse-screen *{animation:none!important;transition:none!important}}

/* Polished toy controls and grounded wildlife, scoped to this game. */
.bh-wheel{left:19%;top:44%;width:28%;min-width:0;filter:drop-shadow(0 12px 5px #334c3650)}
.bh-wheel:before{content:'';position:absolute;left:24%;right:24%;top:44%;height:62%;background:linear-gradient(90deg,#745739,#c29b65 48%,#80603d);border:3px solid #795b3c;border-radius:22px 22px 12px 12px;box-shadow:inset 3px 0 #ffefb94d;z-index:-1}
.bh-wheel:after{content:'';position:absolute;left:7%;right:7%;top:99%;height:7%;border-radius:50%;background:#334c3633;filter:blur(3px);z-index:-2}
.bh-wheel-art{position:relative;filter:drop-shadow(0 3px 1px #5d453044)}
.bh-direction{left:19%;top:37%;width:28%;font-size:clamp(38px,5vw,60px);font-weight:900;animation:bh-clockwise-hint 3s ease-in-out infinite}
.bh-wheel-help{left:33%;top:92%;transform:translateX(-50%);white-space:nowrap;border:2px solid #fff8e6;box-shadow:0 3px 0 #57774a40;padding:5px 16px}
.bh-hint{border-radius:22px;background:linear-gradient(#fffdf1f5,#fff0cdf0);color:#416351;box-shadow:0 5px 0 #99b09466,0 7px 16px #53765015;line-height:1.25}
.bh-rope-shadow{fill:none;stroke:#6f5138;stroke-width:10;stroke-linecap:round;opacity:.75}
.bh-rope{stroke:#f4db9e;stroke-width:6;stroke-dasharray:3 5;filter:none}
.bh-scene[data-phase=throwing] .bh-rope-shadow{animation:bh-rope-shadow-in 1.4s ease-out both}
#bh-pulley-spin{transition:transform .09s linear}.bh-turning #bh-pulley-spin{transition:none}
.bh-pulley{fill:#d6bb82;stroke:#7d603d;stroke-width:3}.bh-pulley-inner{fill:#7faab1;stroke:#e0f5ee;stroke-width:2}
.bh-perches{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}.bh-perches path:last-child{transform-origin:bottom;animation:bh-grass 4s ease-in-out infinite alternate}
.bh-house{transform-origin:50% 3%;transition:top .1s linear;filter:drop-shadow(4px 11px 4px #44553245)}
.bh-scene[data-phase=ready] .bh-house svg{transform-origin:50% 3%;animation:bh-lift-sway 4.2s ease-in-out infinite}
.bh-scene.bh-turning .bh-house svg{animation:bh-lift-sway 1.5s ease-in-out infinite}
.bh-scene[data-phase=settling] .bh-house{animation:bh-lock-in 1.8s ease-out both}
.bh-bird{width:11%;animation:bh-ground-bob 4s ease-in-out infinite;animation-delay:var(--delay);transition:left 1.1s cubic-bezier(.3,.1,.2,1),top 1.1s cubic-bezier(.3,.1,.2,1);transform-origin:50% 88%;filter:drop-shadow(0 3px 2px #3e623c33)}
.bh-bird-0{left:5%;top:76%}.bh-bird-1{left:85%;top:74%}.bh-bird-2{left:81%;top:5.5%;width:12%}
.bh-bird-head{transform-origin:135px 115px;animation:bh-head-tilt 6s ease-in-out infinite;animation-delay:var(--delay)}
.bh-bird-wing{transform-origin:85px 135px;animation:bh-wing-flutter 4.5s ease-in-out infinite;animation-delay:var(--delay)}
.bh-bird-eyes{animation-duration:3.1s}.bh-bird-feet{transform-origin:120px 200px;animation:bh-feet 4s ease-in-out infinite;animation-delay:var(--delay)}
.bh-scene[data-phase=settling] .bh-bird-0,.bh-scene[data-phase=done] .bh-bird-0{left:57%;top:35%}
.bh-scene[data-phase=settling] .bh-bird-1,.bh-scene[data-phase=done] .bh-bird-1{left:70%;top:35%}
.bh-scene[data-phase=settling] .bh-bird{animation:bh-happy-hop .65s ease-in-out infinite;animation-delay:1.1s}
.bh-scene[data-phase=settling] .bh-bird-wing{animation:bh-wing-flutter .45s ease-in-out infinite}
.bh-sparkles{left:53%;top:17%;width:32%;height:38%}.bh-sparkles i{filter:drop-shadow(0 0 6px #fff3a0);animation-duration:2.2s}
.bh-cloud{opacity:.65}.bh-leaves{animation-duration:6s}
@keyframes bh-ground-bob{0%,55%,76%,100%{transform:none}60%{transform:translateY(1px) scaleY(.97)}67%{transform:translateY(-7px)}72%{transform:translateY(1px)}}
@keyframes bh-feet{0%,60%,76%,100%{transform:none}66%,70%{transform:translateY(3px) rotate(-4deg)}}
@keyframes bh-head-tilt{0%,45%,70%,100%{transform:none}53%,61%{transform:rotate(-7deg)}}
@keyframes bh-wing-flutter{0%,70%,100%{transform:none}76%,88%{transform:rotate(-26deg) scaleX(1.08)}82%,94%{transform:rotate(6deg)}}
@keyframes bh-happy-hop{0%,100%{transform:none}18%{transform:scaleY(.95)}50%{transform:translateY(-10px) rotate(3deg)}80%{transform:scaleY(.97)}}
@keyframes bh-lift-sway{0%,100%{transform:rotate(-1.5deg)}50%{transform:rotate(1.5deg)}}
@keyframes bh-lock-in{0%{transform:rotate(-4deg) translateY(4px)}25%{transform:rotate(3deg) translateY(-3px)}50%{transform:rotate(-1.5deg)}75%{transform:rotate(.7deg)}100%{transform:none}}
@keyframes bh-clockwise-hint{0%,100%{transform:rotate(-12deg);opacity:.75}60%{transform:rotate(22deg);opacity:1}}
@keyframes bh-rope-shadow-in{0%,25%{opacity:0}100%{opacity:.75}}
@keyframes bh-grass{to{transform:skewX(3deg)}}
@media(max-width:700px){.bh-wheel{left:16%;top:47%;width:34%}.bh-direction{left:16%;top:39%;width:34%;font-size:38px}.bh-wheel-help{left:33%;top:93%;font-size:12px}.bh-progress{bottom:3%;width:12%}.bh-bird-0{left:3%;top:82%;width:13%}.bh-bird-1{left:84%;top:80%;width:14%}.bh-bird-2{left:81%;top:9%;width:13%}.bh-scene[data-phase=settling] .bh-bird-0,.bh-scene[data-phase=done] .bh-bird-0{left:55%;top:34.5%}.bh-scene[data-phase=settling] .bh-bird-1,.bh-scene[data-phase=done] .bh-bird-1{left:72%;top:33.5%}}
@media(prefers-reduced-motion:reduce){.birdhouse-screen *{animation:none!important;transition:none!important}}

/* Actual soft-3D sprite frames: folded wings, raised wings and closed eyelids. */
.bh-house-model{display:block;width:100%;aspect-ratio:1;background:url('birdhouse-art/houses-v2.webp') var(--house-design) 0/300% 100% no-repeat;transform-origin:50% 4.5%}
.bh-bird-model{display:block;width:100%;aspect-ratio:1;background:url('birdhouse-art/bird-frames-v2.webp') 0 var(--bird-row)/300% 400% no-repeat;animation:bh-bird-frames 5s step-end infinite;animation-delay:var(--delay,0s)}
.bh-scene[data-phase=ready] .bh-house-model{animation:bh-lift-sway 4.2s ease-in-out infinite}.bh-scene.bh-turning .bh-house-model{animation:bh-lift-sway 1.5s ease-in-out infinite}
.bh-scene[data-phase=fallen] .bh-house:before{content:'';position:absolute;inset:3% -6% -3%;border:4px solid #fff2a0;border-radius:38%;background:radial-gradient(ellipse,#ffec8a22,transparent 70%);box-shadow:0 0 15px 8px #ffed8870,inset 0 0 16px #fff6b777;animation:bh-tap-halo 1.7s ease-in-out infinite;pointer-events:none;z-index:-1}
.bh-scene[data-phase=fallen] .bh-house:after{content:'👆 Tap!';position:absolute;left:50%;bottom:-4%;transform:translateX(-50%);padding:5px 15px;white-space:nowrap;background:linear-gradient(#fffdf0,#ffe496);border:3px solid #fff;border-radius:22px;font-size:clamp(16px,2vw,23px);font-weight:900;color:#526b40;box-shadow:0 4px 0 #ad935b55;animation:bh-tap-cue 1.7s ease-in-out infinite;pointer-events:none}
.bh-bird{z-index:8;pointer-events:none;transition:left 1.1s ease-in-out,top 1.1s ease-in-out,width 1.1s ease-in-out;filter:drop-shadow(1px 4px 2px #3e623c44)}
.bh-scene[data-phase=settling] .bh-bird-0,.bh-scene[data-phase=done] .bh-bird-0{left:63%;top:29.5%;width:8%}
.bh-scene[data-phase=settling] .bh-bird-1,.bh-scene[data-phase=done] .bh-bird-1{left:72%;top:38.5%;width:8%}
.bh-scene[data-phase=settling] .bh-bird-model{animation:bh-happy-frames .48s step-end infinite}
.bh-scene[data-phase=settling] .bh-bird{animation:bh-front-landing 1.25s ease-out both}
.birdhouse-tile .bh-cover{width:100%;height:210px;border-radius:24px;box-shadow:inset 0 0 0 3px #fff8;isolation:isolate;background-position:67% center}
.bh-cover-house{width:52%;left:40%;top:7%;z-index:2}.bh-cover-wheel{position:absolute;left:8%;top:37%;width:37%;filter:drop-shadow(1px 5px 2px #335a3b60);z-index:3}.bh-cover-rope{position:absolute;inset:0;width:100%;height:100%;z-index:1}.bh-cover-bird{width:23%;left:44%;bottom:3%;z-index:4}.bh-cover-bird-two{left:76%;bottom:6%;width:22%}
@keyframes bh-bird-frames{0%,29%,35%,69%,78%,87%,100%{background-position-x:0}30%,34%{background-position-x:100%}70%,77%,82%,86%{background-position-x:50%}}
@keyframes bh-happy-frames{0%,100%{background-position-x:0}50%{background-position-x:50%}}
@keyframes bh-tap-halo{0%,100%{opacity:.75;scale:1}50%{opacity:1;scale:1.045}}
@keyframes bh-tap-cue{0%,100%{translate:0 0}50%{translate:0 -5px}}
@keyframes bh-front-landing{0%{transform:translateY(-12px) rotate(-7deg)}55%{transform:translateY(-17px) rotate(4deg)}80%{transform:translateY(2px) scaleY(.96)}100%{transform:none}}
@media(max-width:700px){.birdhouse-tile .bh-cover{height:155px;border-radius:18px}.bh-scene[data-phase=settling] .bh-bird-0,.bh-scene[data-phase=done] .bh-bird-0{left:62.5%;top:27.9%;width:10%}.bh-scene[data-phase=settling] .bh-bird-1,.bh-scene[data-phase=done] .bh-bird-1{left:73%;top:36.5%;width:10%}.bh-scene[data-phase=fallen] .bh-house:after{font-size:16px;padding:4px 10px}}
@media(prefers-reduced-motion:reduce){.birdhouse-screen *,.birdhouse-tile *{animation:none!important;transition:none!important}}
