/* Soft 3D artwork, layered without changing the matching coordinates or saves. */
#firefly-screen .fw-lantern{width:clamp(92px,15vw,160px);height:auto;aspect-ratio:804/1536;display:block;background:none;border:0;transform-origin:50% 9%;filter:drop-shadow(0 10px 6px #07132570)}
.fw-lantern-model{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:2;pointer-events:none}
.fw-lantern-aura{position:absolute;inset:40% 24% 18%;border-radius:35%;background:radial-gradient(ellipse,var(--glow),transparent 70%);opacity:calc(.25 + var(--filled,0)*.2);filter:blur(8px);animation:fw-model-lantern-light 3.8s ease-in-out infinite;animation-delay:var(--sway-delay);pointer-events:none}
#firefly-screen .fw-lantern .fw-glass{position:absolute;left:28%;top:42%;width:44%;height:36%;margin:0;border:0;border-radius:15%;display:block;background:radial-gradient(ellipse at 50% 72%,color-mix(in srgb,var(--glow),transparent 32%),#ffffff0a 85%);box-shadow:inset 2px 0 5px #fff3,inset -3px 0 7px #0002;z-index:1;overflow:hidden}
#firefly-screen .fw-glass>strong{position:absolute;top:7%;left:0;width:100%;margin:0;text-align:center;font-size:clamp(23px,3.1vw,38px);line-height:1.1;color:#fffbe1;text-shadow:0 2px #9b704d,0 0 10px var(--glow)}
#firefly-screen .fw-count{inset:44% 2% 0}#firefly-screen .fw-captured{left:calc(1% + var(--orbit)*32%);top:0;width:33%;height:100%;animation-duration:2.8s}
#firefly-screen .fw-lantern.ready{filter:drop-shadow(0 0 15px var(--glow)) drop-shadow(0 8px 4px #07132577)}#firefly-screen .fw-lantern.fw-hover-target .fw-glass{outline:3px solid #fff8b7;outline-offset:3px}#firefly-screen .fw-lantern.full .fw-lantern-aura{box-shadow:0 0 28px 8px var(--glow)}
.fw-critter{position:absolute;inset:0;display:block;pointer-events:none;--lid:#ffe9b2;--blink-delay:var(--delay,-1.2s)}.fw-kind-1{--lid:#ffdfdf}.fw-kind-2{--lid:#c9f1f4}
.fw-critter .fw-body-shell{position:absolute;top:0;left:18%;width:64%;aspect-ratio:350/560;z-index:2;animation:fw-model-breathe 3.6s ease-in-out infinite;animation-delay:var(--delay);transform-origin:50% 70%}
.fw-critter .fw-body-model{display:block;width:100%;height:100%;object-fit:contain;mask-image:radial-gradient(ellipse 77% 90% at center,#000 60%,transparent 100%);-webkit-mask-image:radial-gradient(ellipse 77% 90% at center,#000 60%,transparent 100%)}
.fw-critter .fw-wing-model{position:absolute;top:10%;left:0;width:53%;height:50%;object-fit:contain;transform-origin:95% 72%;animation:fw-model-wing-left .24s ease-in-out infinite alternate;animation-delay:var(--delay);z-index:1;filter:drop-shadow(0 0 3px #e4ffff70);mask-image:radial-gradient(ellipse 85% 90%,#000 60%,transparent 100%)}
.fw-critter .fw-wing-model.right{left:auto;right:0;transform-origin:5% 72%;animation-name:fw-model-wing-right;animation-delay:calc(var(--delay,0s) - .1s)}
.fw-critter .fw-abdomen-glow{position:absolute;left:22%;right:22%;top:60%;height:28%;border-radius:50%;background:var(--glow);mix-blend-mode:screen;opacity:.3;filter:blur(3px);animation:fw-model-belly 2.8s ease-in-out infinite;animation-delay:var(--delay)}
.fw-critter .fw-shape{position:absolute;left:9%;right:9%;top:66%;font-style:normal;font-weight:1000;line-height:1.1;font-size:clamp(18px,2.4vw,29px);text-align:center;color:#65506e;text-shadow:0 1px #fff,0 0 5px #fff9;z-index:3}
.fw-critter .fw-lids{position:absolute;inset:0;z-index:4}.fw-lids i{position:absolute;left:19%;top:31%;width:24%;height:18%;border-radius:60%;background:radial-gradient(ellipse at 45% 20%,#fff5,var(--lid) 65%);transform:scaleY(0);transform-origin:50% 10%;animation:fw-model-blink 5.3s ease-in-out infinite;animation-delay:var(--blink-delay)}.fw-lids i+i{left:57%}
#firefly-screen .fw-firefly{height:110px;min-height:90px;filter:drop-shadow(0 0 8px var(--glow))}#firefly-screen .fw-firefly.selected{outline:3px dashed #fff9c4;outline-offset:2px;filter:drop-shadow(0 0 15px var(--glow))}.fw-drag{width:100px;height:125px;filter:drop-shadow(0 0 12px var(--glow))}.fw-flight{width:80px;height:105px;border-radius:0;background:none;box-shadow:none;filter:drop-shadow(0 0 8px var(--glow));pointer-events:none}
.fw-captured .fw-critter .fw-body-shell{left:10%;width:80%;top:0}.fw-captured .fw-critter .fw-wing-model{top:6%;width:60%}.fw-captured .fw-critter .fw-shape,.fw-captured .fw-critter .fw-lids{display:none}
body.roomy-play #firefly-screen .fw-lantern{height:min(300px,calc(var(--play-height,600px)*.43));width:auto;aspect-ratio:804/1536}body.roomy-play #firefly-screen #fw-lanterns{padding:12px 12% 0;gap:5%}body.roomy-play #firefly-screen #fw-bugs{margin-top:18px}body.roomy-play #firefly-screen .fw-firefly{height:105px}
#home-firefly .fw-cover{display:block!important;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 70%,#7a9b7220,transparent),linear-gradient(#27265b88,#183c5477),url('birdhouse-art/lake.webp') center/cover!important}
#home-firefly .fw-cover-lantern{position:absolute;left:33%;top:-3%;width:36%;height:104%;object-fit:contain;filter:drop-shadow(0 0 15px #ffe48d88);animation:fw-lantern-sway 6.5s ease-in-out infinite;transform-origin:50% 8%}
#home-firefly .fw-cover-bug{position:absolute;width:38%;height:84%;left:1%;top:18%;animation:fw-hover 4s ease-in-out infinite;--glow:#ffdc69;--delay:-.7s}#home-firefly .fw-cover-bug:last-child{left:auto;right:0;top:3%;--glow:#89eaff;--delay:-1.5s;animation-delay:-2s}
#home-firefly .fw-critter .fw-body-model{width:100%;height:100%;filter:none}#home-firefly .fw-critter .fw-wing-model{width:53%;height:50%;filter:none}#home-firefly .fw-critter .fw-shape{font-size:16px}
.fw-paused .fw-critter *,.fw-paused .fw-lantern-aura,#home-screen[hidden] .fw-cover *,.home-scene-paused .fw-cover *{animation-play-state:paused!important}
@keyframes fw-model-wing-left{from{transform:rotate(-9deg) rotateY(0) scaleY(1)}to{transform:rotate(15deg) rotateY(48deg) scaleY(.8)}}@keyframes fw-model-wing-right{from{transform:rotate(9deg) rotateY(0) scaleY(1)}to{transform:rotate(-15deg) rotateY(-48deg) scaleY(.8)}}
@keyframes fw-model-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-1px) scale(1.025)}}@keyframes fw-model-blink{0%,39%,44%,100%{transform:scaleY(0)}41%,42%{transform:scaleY(1)}}@keyframes fw-model-belly{50%{opacity:.7;transform:scale(1.1)}}@keyframes fw-model-lantern-light{50%{opacity:calc(.4 + var(--filled,0)*.2);transform:scale(1.06)}}
@media(max-width:700px){#firefly-screen .fw-world{min-height:690px}#firefly-screen #fw-lanterns{padding:16px 4% 0;gap:8px}#firefly-screen .fw-lantern{width:min(29vw,114px);height:auto}#firefly-screen .fw-glass>strong{font-size:26px}#firefly-screen #fw-bugs{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:18px 4% 20px 18%}#firefly-screen .fw-firefly{height:94px;min-height:90px}.fw-critter .fw-shape{font-size:20px}#firefly-screen #fw-helper{width:24%;height:25%;bottom:2%}}
@media(min-width:700px) and (max-height:740px) and (orientation:landscape){body.roomy-play #firefly-screen #fw-hint{margin-top:54px}body.roomy-play #firefly-screen .fw-firefly{height:90px}body.roomy-play #firefly-screen .fw-lantern{height:calc(var(--play-height,430px)*.41)}body.roomy-play #firefly-screen #fw-bugs{margin-top:8px}}
@media(prefers-reduced-motion:reduce){.fw-critter *,#home-firefly .fw-cover *,#firefly-screen .fw-lantern-aura{animation:none!important}.fw-lids i{transform:scaleY(0)}}
/* Stable hit targets: only the artwork floats/sways, never its touch geometry. */
#firefly-screen .fw-firefly{animation:none}#firefly-screen .fw-firefly>.fw-critter{animation:fw-hover var(--hover-time,3.6s) ease-in-out infinite;animation-delay:var(--delay)}
#firefly-screen .fw-lantern,#firefly-screen .fw-lantern.fw-pop{animation:none}#firefly-screen .fw-lantern.ready{transform:none}.fw-lantern-visual{position:absolute;inset:0;transform-origin:50% 9%;animation:fw-lantern-sway 6.5s ease-in-out infinite;animation-delay:var(--sway-delay)}#firefly-screen .fw-lantern.fw-pop .fw-lantern-visual{animation:fw-pop .55s ease,fw-lantern-sway 6.5s .55s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){#firefly-screen .fw-firefly>.fw-critter,.fw-lantern-visual{animation:none!important}}
.fw-flight{margin-left:-40px;margin-top:-52.5px}
