/* Scoped, touch-first animated scenes for games 01–04. */
.ga-root{--ga-accent:#145447;--ga-ink:#163d36;--ga-pale:#f2fbef;display:grid;gap:.65rem;color:var(--ga-ink);min-width:0}
.ga-title,.ga-note,.ga-status,.ga-equation,.ga-code{margin:0}.ga-title,.ga-equation,.ga-code{font-weight:900;line-height:1.2}.ga-title{font-size:clamp(1.16rem,4vw,1.7rem)}
.ga-note,.ga-status{font-size:1rem;line-height:1.45}.ga-status{min-height:1.5rem;color:#415c53;font-weight:750}
.ga-actions{display:flex;flex-wrap:wrap;gap:.55rem}.ga-button{background:#fff;color:var(--ga-ink);font-family:inherit;font-weight:850;font-size:clamp(.93rem,3vw,1.08rem);min-height:47px;padding:.58rem .81rem;border:2px solid #bdddcf;border-bottom-width:4px;border-radius:.82rem;cursor:pointer;touch-action:manipulation}
.ga-button:not(:disabled):hover{background:#e7faea}.ga-button:not(:disabled):active{transform:translateY(2px)}.ga-button:focus-visible{outline:3px solid var(--ga-accent);outline-offset:2px}.ga-button:disabled{opacity:.53;cursor:default}
.ga-jungle,.ga-race-scene,.ga-palace-scene,.ga-cook-scene{position:relative;isolation:isolate;overflow:hidden;border:1px solid #c9e3cb;border-radius:1.2rem;perspective:560px;display:grid;place-items:center}
.ga-jungle{background:radial-gradient(ellipse at 50% 100%,#aaf0ab 15%,#dbf9b8 58%,#eefabd);padding:12px 8px;min-height:164px}
.ga-map{transform:rotateX(17deg);width:min(100%,415px);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.ga-cell{position:relative;min-height:34px;height:clamp(35px,10vw,55px);background:#fff6c8;box-shadow:0 3px 0 #74985b;display:grid;place-items:center;border-radius:8px;border:1px solid #bedc9d}
.ga-tree{background:#8bd799}.ga-object,.ga-scout{font-size:clamp(1.18rem,5vw,2rem);line-height:1}.ga-target{background:#fff19a;border:2px dashed #b96b09;animation:ga-target 1.5s ease-in-out infinite alternate}
.ga-scout{position:absolute;right:5%;bottom:-8%;display:inline-grid;place-items:center;transform:translateZ(10px);animation:ga-entry .3s ease-out}
.ga-race{--ga-ink:#203b65;--ga-accent:#264a98}.ga-race-scene{background:linear-gradient(#d7f1fc 62%,#91d6a0 62%);height:clamp(115px,20vw,172px)}
.ga-road{background:#435476;position:absolute;inset:45% 4% 12%;border:4px solid #fff4d1;border-radius:14px;transform:rotateX(35deg);box-shadow:0 6px 0 #637c76;transform-style:preserve-3d}
.ga-road:after{position:absolute;content:'';border-top:3px dashed #fff;width:90%;left:5%;top:51%}
.ga-mile{position:absolute;color:white;left:calc(7% + var(--mile) * 17%);top:12%;font-size:clamp(1rem,4vw,2rem);z-index:1;transform:translateX(-50%)}
.ga-mile:empty{height:8px;width:8px;border-radius:50%;background:#fff}
.ga-car{position:absolute;bottom:16%;z-index:3;left:calc(7% + var(--leg) * 17%);font-size:clamp(1.55rem,8vw,3.75rem);transform:translateX(-50%) translateZ(20px) scaleX(-1)}
.ga-boost{animation:ga-drive .45s ease-out both}
.ga-equation,.ga-code{display:table;background:#eef4ff;border-radius:.7rem;padding:.45rem .65rem;color:#293d66;font-size:clamp(1.22rem,5vw,1.65rem)}
.ga-gear{background:#eef4ff;border-color:#c3d6f5;min-width:55px}
.ga-palace{--ga-ink:#502254;--ga-accent:#8a338d}.ga-palace-scene{height:clamp(120px,24vw,185px);background:linear-gradient(#f8e6ff 0 72%,#d1b7f0 73%)}
.ga-palace-scene:before{content:'';position:absolute;width:50%;height:45%;background:#f9dce9;border-radius:50%;right:5%;top:-12%;z-index:-1}
.ga-plaza{display:flex;align-items:flex-end;gap:clamp(18px,5vw,42px);transform:rotateX(10deg);transform-style:preserve-3d;padding:20px 10px}
.ga-tower{--wall:#ae7bd8;--side:#8356b4;position:relative;background:var(--wall);border-radius:6px 6px 2px 2px;display:grid;place-items:end center;width:clamp(38px,12vw,80px);height:clamp(52px,14vw,85px);transform:rotateY(-17deg);transform-style:preserve-3d;box-shadow:inset 0 0 0 2px #fff5}
.ga-tower:nth-child(2){height:clamp(63px,17vw,108px)}.ga-tower:before{content:'';position:absolute;top:-22px;height:26px;left:-6%;width:112%;background:#be5a96;clip-path:polygon(50% 0,100% 100%,0 100%)}.ga-tower:after{content:'';position:absolute;left:100%;top:2px;width:14px;height:99%;transform:skewY(20deg);transform-origin:top left;background:var(--side)}
.ga-now{--wall:#d69fe7;--side:#af76c8}.ga-open{--wall:#f3c28c;--side:#cd8b5b}.ga-open .ga-portal{animation:ga-entry .4s ease-out}
.ga-portal{display:grid;place-items:center;width:58%;height:60%;border-radius:51% 51% 1px 1px;background:#6f4489;margin:0 auto;color:#fff;font-size:clamp(.86rem,4vw,1.75rem)}.ga-open .ga-portal{background:#fff1ca}
.ga-cook{--ga-ink:#563323;--ga-accent:#975525}.ga-cook-scene{height:clamp(104px,23vw,154px);background:linear-gradient(140deg,#fff4d1,#ffd6c3)}
.ga-counter{transform:rotateX(31deg);width:min(76%,310px);height:70%;display:grid;place-items:center;border-radius:1rem;position:relative;background:radial-gradient(ellipse,#fbd6a6,#df9e70);box-shadow:0 9px 0 #b76d45;transform-style:preserve-3d}
.ga-pan{font-size:clamp(2rem,10vw,4rem);z-index:1;animation:ga-entry .3s ease-out}.ga-steam{position:absolute;left:26%;top:10%;font-size:clamp(1rem,5vw,2rem);color:#8c4d31;animation:ga-steam 2s ease-in-out infinite}.ga-steam-two{left:auto;right:24%;animation-delay:.65s}
.ga-recipe{margin:.05rem 0;padding-left:1.3rem;display:flex;gap:.65rem;flex-wrap:wrap}.ga-recipe li{color:#5d3d24;padding:.35rem .55rem;margin-right:.7rem;border-radius:.5rem;min-width:2.2rem;background:#fff3e3;font-weight:850}
.ga-win{border:1px solid #d3eed3;border-radius:1.1rem;background:#f0faf0;display:grid;justify-items:start;gap:.5rem;padding:1rem}.ga-win-icon{font-size:2.4rem;animation:ga-entry .4s ease-out}
@keyframes ga-entry{from{scale:.78;opacity:.54}to{scale:1;opacity:1}}@keyframes ga-target{from{box-shadow:0 3px 0 #c29247}to{box-shadow:0 3px 8px #b97a27}}
@keyframes ga-drive{from{translate:-34px 0;opacity:.65}to{translate:0 0;opacity:1}}@keyframes ga-steam{0%,100%{transform:translateY(5px);opacity:.25}45%{transform:translateY(-10px);opacity:1}}
@media(prefers-reduced-motion:reduce){.ga-root *,.ga-root *::before,.ga-root *::after{animation:none!important;transition:none!important}}
