/* Reversible Home-only layout trial. Original tile markup/order and click handlers remain. */
body:has(#home-screen:not([hidden])){overflow:hidden;background:#b9e3ee}
body:has(#home-screen:not([hidden]))>header{position:relative;z-index:5;max-width:none;background:linear-gradient(100deg,#c7e9ee,#d3eaf0 50%,#dcd5ef);border-bottom:2px solid #a8c6d5;box-shadow:0 3px 14px #26483324}
#home-screen.home-scene{--rail:clamp(250px,29vw,380px);--home-preview-height:148px;box-sizing:border-box;position:relative;max-width:none;width:100%;height:calc(100dvh - var(--home-header,68px));min-height:0;margin:0;padding:0;overflow:hidden;text-align:center;background:#94c9d9 url('birdhouse-art/park.webp') center/cover no-repeat;isolation:isolate}
#home-screen.home-scene:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#24586145,transparent 48%),linear-gradient(0deg,#25472b55,transparent 35%);z-index:0}
.home-scene>.home-sun,.home-scene>.home-cloud{display:none}
#home-screen.home-scene .home-welcome{position:absolute;left:calc(var(--rail) + 4%);right:4%;top:8%;z-index:2;pointer-events:none}
.home-scene .home-kicker{color:#fff;letter-spacing:4px;text-shadow:0 2px 5px #326070}
.home-scene .home-welcome h1{font-size:clamp(36px,5.8vw,86px);color:#fff5ca;text-shadow:0 4px 0 #7d5c9c,0 7px 12px #304c5055;margin:12px 0}
.home-scene .home-welcome p{display:inline-block;margin:12px 0;padding:10px 24px;border:2px solid #ffffffc9;border-radius:30px;background:#fff8e7ed;color:#665089;font-size:clamp(16px,2vw,23px);box-shadow:0 4px 0 #54744728}
#home-screen.home-scene .game-tiles{box-sizing:border-box;position:absolute;inset:0 auto 0 0;width:var(--rail);margin:0;padding:20px 19px 34px;display:flex;flex-direction:column;gap:17px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#a8d4c9 #fff3;scroll-snap-type:y proximity;background:linear-gradient(160deg,#d3f0e23b,#d8d0ee33);backdrop-filter:blur(16px) saturate(.85);-webkit-backdrop-filter:blur(16px) saturate(.85);border-right:3px solid #e8f5f3c9;box-shadow:8px 0 28px #284f4933;z-index:3}
#home-screen.home-scene .game-tile{position:relative;flex:none;min-height:0;width:100%;box-sizing:border-box;margin:0;padding:7px 7px 11px;border:3px solid #fff;border-radius:24px;gap:0;box-shadow:0 5px 0 #547d6b30,0 8px 16px #42645b20;scroll-snap-align:start;cursor:pointer;touch-action:pan-y;transition:transform .15s,box-shadow .15s}
#home-screen.home-scene .game-tile:hover{transform:translateY(-2px);box-shadow:0 6px 0 #547d6b30,0 10px 18px #42645b30}
#home-screen.home-scene .game-tile:active{transform:scale(.97)}
#home-screen.home-scene .game-tile:focus-visible{outline:4px solid #8062c2;outline-offset:2px}
#home-screen.home-scene .game-tile>.tile-picture{height:var(--home-preview-height);min-height:var(--home-preview-height);border-radius:17px}
#home-screen.home-scene .game-tile>strong{font-size:clamp(16px,1.65vw,22px);line-height:1.15;margin:9px 2px 0}
#home-screen.home-scene .game-tile>small{display:none}
#home-screen.home-scene #home-coming-soon>small{display:block;font-size:16px}
.home-scene-friends{position:absolute;z-index:1;left:calc(var(--rail) + 3%);right:3%;bottom:9%;height:49%;pointer-events:none}
.home-scene-friend{position:absolute;bottom:0;width:52%;height:100%;filter:drop-shadow(0 13px 7px #36502c55)}
.home-scene-friend:first-child{left:0;transform:rotate(-3deg)}
.home-scene-friend:last-child{right:0;height:88%;transform:rotate(3deg)}
.home-scene-friend svg{width:100%;height:100%;overflow:visible}
.home-scene-friends:before{content:'';position:absolute;left:7%;right:7%;bottom:-2%;height:8%;border-radius:50%;background:#25412630;filter:blur(7px)}
.home-scene-firefly{position:absolute;width:7px;height:7px;border-radius:50%;background:#fff4a0;box-shadow:0 0 12px 4px #fffbb46e;animation:home-scene-float 7s ease-in-out infinite;left:var(--x);top:var(--y);animation-delay:var(--delay);pointer-events:none;z-index:1}
@keyframes home-scene-float{0%,100%{transform:translate(0,0);opacity:.25}50%{transform:translate(12px,-24px);opacity:.9}}
@media(max-width:760px){#home-screen.home-scene{--rail:42%;--home-preview-height:118px}.home-scene .home-welcome h1{font-size:clamp(30px,6vw,47px)}.home-scene .home-kicker{font-size:10px;letter-spacing:2px}.home-scene .home-welcome p{font-size:15px;padding:9px 13px}.home-scene-friends{height:48%;bottom:10%}.home-scene-friend{width:78%;height:78%}.home-scene-friend:first-child{bottom:19%;left:-6%}.home-scene-friend:last-child{height:66%;right:-7%}#home-screen.home-scene .game-tiles{padding:12px 10px 25px;gap:13px}#home-screen.home-scene .game-tile{padding:5px 5px 9px;border-radius:20px}}
@media(max-width:430px){#home-screen.home-scene{--rail:46%;--home-preview-height:96px}.home-scene .home-welcome{left:calc(var(--rail) + 2%);right:2%;top:9%}.home-scene .home-welcome h1{font-size:32px}.home-scene .home-welcome p{font-size:13px;padding:8px}.home-scene .home-kicker{font-size:9px;letter-spacing:1px}#home-screen.home-scene .game-tile>strong{font-size:14px}.home-scene-friends{left:calc(var(--rail) + 1%);right:2%;height:49%}}
@media(max-height:520px) and (min-width:600px){#home-screen.home-scene{--rail:30%;--home-preview-height:105px}.home-scene .home-welcome{top:3%}.home-scene .home-welcome h1{font-size:39px;margin:4px}.home-scene .home-welcome p{margin:5px;padding:5px 15px;font-size:15px}.home-scene-friends{height:56%;bottom:3%}}
@media(prefers-reduced-motion:reduce){.home-scene-firefly{animation:none;opacity:.4}}

/* Six complete compositions crossfade; the game rail never moves or resets. */
.home-scene-layer{position:absolute;inset:0;background-position:center;background-size:cover;opacity:0;transition:opacity 1.3s ease;pointer-events:none;z-index:0}
.home-scene-layer.is-current{opacity:1;z-index:1}
.home-scene-layer:not(.is-current) *,.home-scene-paused .home-scene-layer *,.home-scene-paused .home-scene-firefly{animation-play-state:paused!important}
.home-scene-layer .home-scene-friends{height:48%;bottom:9%;left:calc(var(--rail) + 2%);right:2%}
.home-scene-layer .home-scene-friend{height:80%;width:31%;bottom:0;transform:none;right:auto;filter:drop-shadow(0 9px 5px #334b3440)}
.home-scene-layer .home-scene-friend:first-child{left:0;bottom:9%;height:80%;transform:none}
.home-scene-layer .home-guest-1{left:23%;bottom:16%;height:92%}
.home-scene-layer .home-guest-2{left:47%;height:76%;bottom:0}
.home-scene-layer .home-scene-friend:last-child{left:70%;right:auto;height:69%;bottom:13%;transform:none}
.home-action-hop>svg{animation:home-friend-hop 9s ease-in-out infinite;animation-delay:var(--gesture-delay);transform-origin:50% 100%}
.home-action-rest>svg{animation:home-friend-look 11s ease-in-out infinite;animation-delay:var(--gesture-delay);transform-origin:50% 95%}
.home-action-flutter>svg{animation:home-bird-hop 8s ease-in-out infinite;animation-delay:var(--gesture-delay)}
/* Stable opaque body, localized hand poses: never crossfade entire characters. */
.home-scene-layer .lisa-clap-closed{opacity:1;animation:none}
.home-scene-layer .lisa-clap-open{opacity:1;animation:home-hands-clap 5.6s steps(1,end) infinite}
@keyframes home-hands-clap{0%,12%,24%,36%,100%{opacity:1}6%,18%,30%{opacity:0}}
/* One continuous image mesh moves the arms; no separated cutout edges. */
.home-arm-wave,.home-arm-wave .lisa-character-idle{animation:none!important}
.home-scene-friend>.lisa-character{position:relative;z-index:1}
.home-scene-atmosphere{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.home-scene-atmosphere i{position:absolute;left:var(--leaf-x);top:-5%;width:12px;height:7px;border-radius:90% 0 90% 0;background:var(--leaf-color);box-shadow:inset 0 1px 2px #fff8;animation:home-leaf-drift 24s linear infinite;animation-delay:var(--leaf-delay);opacity:0}
@keyframes home-leaf-drift{0%{transform:translate(0,0) rotate(0);opacity:0}10%,75%{opacity:.65}100%{transform:translate(-100px,85vh) rotate(280deg);opacity:0}}
.home-scene-layer:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(0deg,#34492b32,transparent 40%)}
.home-scene-layer .home-scene-friend:before{content:'';position:absolute;left:22%;right:22%;bottom:0;height:5%;border-radius:50%;background:#28432335;filter:blur(5px)}
@keyframes home-friend-hop{0%,70%,86%,100%{transform:translateY(0)}73%{transform:translateY(2px) scaleY(.98)}77%{transform:translateY(-13px)}81%{transform:translateY(1px)}}
@keyframes home-friend-look{0%,35%,65%,100%{transform:rotate(0)}43%,54%{transform:rotate(2deg)}}
@keyframes home-bird-hop{0%,60%,82%,100%{transform:translateY(0)}65%,74%{transform:translateY(-8px)}69%,78%{transform:translateY(0)}}
.home-scene-switcher{position:absolute;left:calc(var(--rail) + 2%);right:2%;bottom:2%;z-index:2;display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.home-scene-switcher button{width:46px;height:44px;border:2px solid #fff;border-radius:50%;background:#fff6deeb;color:#7656a5;box-shadow:0 3px 0 #42613955;font-size:24px;font-weight:900;cursor:pointer}
.home-scene-switcher button[aria-pressed=true]{background:#ffdd78;box-shadow:0 0 0 3px #fff8,0 3px 0 #42613955}
.home-scene-switcher button:focus-visible{outline:3px solid #7952bd;outline-offset:3px}
@media(max-width:850px) and (min-height:521px){.home-scene-layer .home-scene-friends{height:55%;bottom:10%}.home-scene-layer .home-scene-friend{width:57%}.home-scene-layer .home-scene-friend:first-child{left:-2%;bottom:42%;height:59%}.home-scene-layer .home-guest-1{left:46%;bottom:43%;height:61%}.home-scene-layer .home-guest-2{left:0;bottom:0;height:52%}.home-scene-layer .home-scene-friend:last-child{left:47%;bottom:0;height:53%}}
@media(max-height:520px) and (min-width:600px){.home-scene-layer .home-scene-friends{height:49%;bottom:16%}.home-scene-switcher{bottom:1%}.home-scene-switcher button{height:36px;width:40px}}
@media(prefers-reduced-motion:reduce){.home-scene-layer{transition:none}.home-scene-layer *{animation:none!important}}

@media(max-width:430px){.home-scene-switcher{gap:8px;max-width:156px;margin:auto}.home-scene-switcher button{width:44px;height:40px}.home-scene-layer .home-scene-friends{bottom:17%;height:49%}}
