:root{--screen-transition-duration:1s}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#063d32;font-family:Arial,sans-serif;color:#fff;touch-action:manipulation}body{overscroll-behavior:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}button,img{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}button{font:inherit;color:inherit;border:0;cursor:pointer}.hidden{display:none!important}#app{position:fixed;inset:0;overflow:hidden}.world-bg{position:absolute;inset:0;background:url('assets/jungle_bg.png') center top/cover no-repeat;z-index:-2}.world-bg:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#063e3260,#064e4090 55%,#032f2795)}.screen{position:absolute;inset:0;display:flex;flex-direction:column;min-height:0}.topHud,.gameHud{height:64px;flex:0 0 64px;display:flex;align-items:center;gap:8px;padding:7px 14px;z-index:20}.topHud{justify-content:space-between}.coin-pill{height:50px;min-width:170px;display:flex;align-items:center;justify-content:center;gap:8px;padding:4px 8px;background:linear-gradient(#a95f2e,#6f3417);border:3px solid #e1a052;border-radius:16px;box-shadow:0 4px 0 #4e260f,0 5px 10px #0006;font-size:23px}.coinIcon{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 30%,#fff6a8,#ffd22e 55%,#c88a0a);color:#fff7ad;border:2px solid #ffe781;text-shadow:0 1px #8b5d00;font-size:14px;box-shadow:inset 0 2px 2px #fff7}.coin-pill button{width:34px;height:34px;border-radius:50%;background:#20bd58;border:2px solid #a4ffb7;color:white;font-size:27px;line-height:26px;font-weight:900;box-shadow:0 3px 0 #087b32}.gear,.pause,.back{width:54px;height:54px;border-radius:15px;background:linear-gradient(#a75b2a,#6e3418);border:3px solid #df9d51;box-shadow:0 4px 0 #4c240e;font-size:28px;font-weight:900}.back{font-size:38px;line-height:35px}.spacer{width:54px}.wood-title{width:min(92%,560px);margin:5px auto 8px;text-align:center;padding:12px 10px;background:linear-gradient(#a65d2c,#713616);border:4px solid #dfaa5e;border-radius:18px;box-shadow:0 5px 0 #51260f,0 7px 16px #0005;font-size:22px;font-weight:1000;text-shadow:0 2px #5b260f}.homeScroll,.modeScroll{width:100%;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 0 18px;scrollbar-width:none}.homeScroll::-webkit-scrollbar,.modeScroll::-webkit-scrollbar{display:none}.hero-title{margin-top:2px}.selected-animal-card{width:min(92%,430px);margin:0 auto 6px;background:linear-gradient(#8e4c25,#5f2c15d9);border:3px solid #d89b55;border-radius:18px;box-shadow:0 5px 0 #47210f;padding:5px;text-align:center}.hero-stage{height:215px;display:grid;grid-template-columns:48px 1fr 48px;align-items:center}.hero-art{height:210px;display:grid;place-items:center;overflow:hidden}.hero-art img{width:210px;height:210px;object-fit:contain;mix-blend-mode:normal}.arrow-btn{width:44px;height:68px;border-radius:14px;background:linear-gradient(#a7602d,#693116);border:3px solid #e0a45b;box-shadow:0 4px 0 #4a220d;font-size:48px;line-height:45px}.hero-name{display:flex;align-items:center;justify-content:center;gap:9px;margin-top:-3px}.hero-name strong{font-size:22px}.hero-name span{color:#ffe04f;font-weight:1000;font-size:17px}.hero-upgrade,.continue-btn{margin:5px auto 2px;padding:9px 12px;border-radius:11px;background:linear-gradient(#5de874,#1b9f40);border:3px solid #a5ffa5;box-shadow:0 4px 0 #126229;font-weight:1000;font-size:14px;text-align:center}
.hero-actions{display:flex;align-items:center;justify-content:center;gap:10px;width:min(100%,330px);margin:4px auto 3px}
.hero-actions .hero-upgrade,.hero-actions .continue-btn{flex:1 1 0;min-width:0;width:auto;height:48px;min-height:48px;max-height:48px;align-self:stretch;margin:0;padding:9px 6px;display:flex;align-items:center;justify-content:center;white-space:nowrap;box-sizing:border-box}.compact-section-title{text-align:center;font-weight:1000;font-size:17px;margin:5px 0}.animal-grid{width:min(94%,430px);display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:0 auto}.animal-shop{height:86px;padding:3px;background:linear-gradient(#71452e,#452a20);border:3px solid #a77b5b;border-radius:14px;box-shadow:0 4px 0 #281912;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden}.animal-shop.selected{border-color:#ffe05b;box-shadow:0 0 0 2px #ffda4544,0 4px 0 #5d340f}.animal-shop.locked{filter:brightness(.48) saturate(.35)}.animal-shop .ani{height:61px;width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.animal-shop img{width:70px;height:70px;object-fit:contain}.animal-shop strong{font-size:10px;line-height:11px}.animal-shop small{font-size:9px;color:#ffd86c;font-weight:1000}.continue-btn{display:block;width:min(94%,430px);margin:10px auto 0;font-size:16px}.modeScroll{padding-bottom:24px}.current-animal-banner{width:min(92%,430px);margin:0 auto 8px;display:flex;align-items:center;gap:10px;padding:5px 10px;background:#5f321cdd;border:3px solid #d99b55;border-radius:15px;box-shadow:0 4px 0 #47210f}.current-animal-banner>div:first-child{width:65px;height:65px;display:grid;place-items:center;overflow:hidden}.current-animal-banner img{width:70px;height:70px;object-fit:contain}.current-animal-banner b{font-size:18px;display:block}.current-animal-banner small{font-size:11px;color:#ffd86c}.mode-grid{width:min(92%,430px);margin:auto;display:grid;grid-template-columns:1fr;gap:7px}.mode-card{min-height:62px;border-radius:15px;background:linear-gradient(135deg,#a9612e,#6f3418);border:3px solid #d99b55;box-shadow:0 4px 0 #4e250f;display:flex;align-items:center;gap:10px;padding:6px 12px;text-align:left}.mode-card>span{flex:1}.mode-card strong{display:block;font-size:18px}.mode-card small{display:block;font-size:10px;opacity:.95;margin-top:2px}.mode-card>b{font-size:30px;color:#ffd45b}.mode-symbol{width:48px;height:48px;display:grid;place-items:center;font-weight:1000;font-size:29px;flex:0 0 48px}.colors-symbol i{width:13px;height:13px;border-radius:50%;display:inline-block;margin:1px}.colors-symbol i:nth-child(1){background:#ef4b50}.colors-symbol i:nth-child(2){background:#3ba9e8}.colors-symbol i:nth-child(3){background:#45bd59}.shapes-symbol{color:#ffdf43}.icons-symbol{color:#ff75a8}.numbers-symbol{color:#59caff;font-size:20px}.words-symbol{color:#fff}.math-symbol{color:#71ef77}.baby-mode{width:min(92%,430px);margin:8px auto 0;display:flex;align-items:center;gap:9px;padding:9px 12px;background:linear-gradient(#8e5229,#693316);border:3px solid #d99b55;border-radius:14px;box-shadow:0 4px 0 #51250f}.baby-face{width:36px;height:36px;border-radius:50%;background:#ffd27d;color:#7a3b15;display:grid;place-items:center;font-size:19px}.baby-mode span:nth-child(2){text-align:left;flex:1}.baby-mode b,.baby-mode small{display:block}.baby-mode b{font-size:13px}.baby-mode small{font-size:9px}.baby-mode i{font-style:normal;font-weight:1000;background:#5b4b3a;border-radius:10px;padding:6px 9px;font-size:10px}.baby-mode.on i{background:#22b85c}.game-screen{display:flex;flex-direction:column;overflow:hidden}.gameHud{height:58px;flex-basis:58px;padding:5px 8px;gap:6px}.gameHud .coin-pill{height:47px;min-width:138px;font-size:20px;flex:1}.gameHud .back,.gameHud .pause{width:48px;height:48px}.lives{height:47px;min-width:92px;display:flex;align-items:center;justify-content:center;gap:2px;background:linear-gradient(#8f4e28,#643017);border:3px solid #d99b55;border-radius:14px;box-shadow:0 4px 0 #4d250f;color:#ff5270;font-size:24px;letter-spacing:1px}.objective-card{width:min(94%,520px);margin:0 auto 5px;background:linear-gradient(#955027,#6c3216);border:3px solid #d99b55;border-radius:15px;box-shadow:0 4px 0 #54270f;padding:7px 9px}.objective-heading{display:flex;justify-content:space-between;align-items:center;font-size:15px}.targets{display:flex;gap:5px;margin-top:6px;justify-content:center;flex-wrap:nowrap}.target{width:38px;height:38px;border-radius:10px;border:2px solid #b8855e;box-shadow:inset 0 0 0 1px #ffffff33;display:grid;place-items:center;font-weight:1000;font-size:22px;background:#6a4835;overflow:hidden}.target.done{filter:grayscale(1);opacity:.3}.target img{width:35px;height:35px;object-fit:contain;border-radius:7px}.playfield-wrap{position:relative;width:min(94%,520px);flex:1;min-height:0;margin:0 auto}.playfield{position:absolute;inset:0;border-radius:21px;border:4px solid #e3aa5b;background:rgba(3,95,78,.56);box-shadow:inset 0 0 0 2px #176e59,0 5px 0 #543018,0 8px 18px #0005;overflow:hidden;z-index:3}.playfield:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#1b9d8335,#00634c12);pointer-events:none;z-index:1}.bubble{position:absolute;border-radius:50%;display:grid;place-items:center;border:0;box-shadow:0 6px 10px #0007,user-select:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;z-index:10;animation:floatIn .22s ease-out;overflow:hidden}.bubble-png{width:100%;height:100%;display:block;pointer-events:none}.bubble.selected{outline:4px solid #ffe25b;transform:scale(1.06)}.bubble.joker{outline:3px solid #ffe65d;box-shadow:0 0 0 3px #ffe65d66,0 7px 13px #0007}.bubble.joker img{width:72%;height:72%;object-fit:contain}.popping{animation:pop .28s ease forwards}.danger-flash{position:absolute;inset:0;z-index:20;border-radius:21px;pointer-events:none;opacity:0;border:7px solid #ff2d3f}.playfield-wrap.danger .danger-flash{animation:danger .65s infinite}.combo{position:absolute;z-index:30;top:42%;left:50%;transform:translate(-50%,-50%) scale(.5);font-size:29px;font-weight:1000;text-shadow:0 3px #7c2f13;opacity:0}.combo.show{animation:combo .8s ease-out}.gameBottom{width:min(94%,520px);margin:5px auto 4px;height:68px;flex:0 0 68px;display:grid;grid-template-columns:1.25fr 82px 1.35fr;gap:6px}.animal-mini,.joker-btn,.goal-box{border-radius:13px;border:3px solid #d99b55;background:linear-gradient(#9b5428,#6e3416);box-shadow:0 4px 0 #54270f}.animal-mini{display:flex;align-items:center;gap:5px;text-align:left;padding:3px 6px;overflow:hidden}.animal-mini #miniArt{width:52px;height:60px;display:grid;place-items:center;overflow:hidden;flex:0 0 52px}.animal-mini img{width:58px;height:58px;object-fit:contain}.animal-mini b,.animal-mini small{display:block;white-space:nowrap}.animal-mini b{font-size:11px}.animal-mini small{font-size:9px;color:#ffd56c;font-weight:900}.joker-btn{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1px}.joker-btn #jokerArt{height:34px}.joker-btn img{width:34px;height:34px;object-fit:contain}.joker-btn span{font-weight:1000;font-size:9px}.joker-btn em{position:absolute;right:-5px;top:-8px;background:#8f6b52;border:2px solid #d6b093;border-radius:50%;min-width:22px;height:22px;display:grid;place-items:center;font-style:normal;font-size:11px;font-weight:1000}.goal-box{display:flex;flex-direction:column;justify-content:center;padding:5px 8px;overflow:hidden}.goal-box small{font-size:10px;color:#ffd56c;font-weight:1000}.goal-box b{font-size:11px;line-height:13px}.modal{position:fixed;inset:0;z-index:1000;pointer-events:auto;touch-action:auto;background:#001c17aa;backdrop-filter:blur(5px);display:grid;place-items:center;padding:10px}.modal-card{position:relative;z-index:1;pointer-events:auto;touch-action:pan-y;width:min(92%,430px);max-height:90dvh;overflow:auto;background:linear-gradient(#9c5529,#6b3215);border:3px solid #e2a85c;border-radius:19px;box-shadow:0 6px 0 #4c220e,0 18px 40px #0008;padding:12px;text-align:center}.modal-card h2{margin:0 0 6px;font-size:22px;text-shadow:0 2px #4d210e}.upgrade-art{height:150px}.upgrade-art img{width:160px;height:150px;object-fit:contain}.joker-preview{display:flex;justify-content:center;align-items:center;gap:12px;margin:4px}.joker-preview img{width:60px;height:60px;object-fit:contain}.upgrade-row{display:flex;align-items:center;justify-content:space-between;background:#5d331e;border:2px solid #b77a4b;border-radius:10px;padding:7px;margin:5px 0}.upgrade-row b{font-size:12px}.upgrade-row small{display:block;color:#ffd56c;font-size:9px}.upgrade-row button{background:linear-gradient(#58dc6b,#1d9c40);padding:7px 9px;border-radius:8px;border:2px solid #a4ffa0;font-weight:1000;font-size:10px}.closex{background:#b84235!important;border:2px solid #ff9b82!important;padding:5px 9px!important;border-radius:9px!important;float:right}.modal-actions{display:flex;gap:6px;justify-content:center;margin-top:8px}.confirm,.secondary{background:linear-gradient(#52dc69,#1e9d42);border:2px solid #9aff9b;border-radius:10px;padding:8px 13px;font-weight:1000;box-shadow:0 3px 0 #146326}.secondary{background:linear-gradient(#a36a38,#75421f);border-color:#d8a36c;box-shadow:0 3px 0 #4c2813}.gold-reward{font-size:20px;color:#ffd64e;font-weight:1000}.toast{position:fixed;z-index:200;left:50%;bottom:75px;transform:translateX(-50%) translateY(25px);opacity:0;background:#4d2a18;border:2px solid #d99b55;border-radius:12px;padding:7px 11px;font-weight:1000;transition:.2s;max-width:90%;text-align:center;pointer-events:none}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
@keyframes floatIn{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}@keyframes pop{to{transform:scale(1.35);opacity:0}}@keyframes combo{0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}35%{opacity:1;transform:translate(-50%,-50%) scale(1.05)}100%{opacity:0;transform:translate(-50%,-70%) scale(1)}}@keyframes danger{0%,100%{opacity:0}50%{opacity:.85}}
@media(max-width:390px){.topHud{height:58px;flex-basis:58px;padding:5px 8px}.coin-pill{min-width:145px;height:46px;font-size:20px}.gear,.back{width:48px;height:48px}.hero-stage{height:185px}.hero-art{height:180px}.hero-art img{width:180px;height:180px}.selected-animal-card{width:94%}.animal-grid{width:94%;gap:5px}.animal-shop{height:78px}.animal-shop .ani{height:54px}.animal-shop img{width:62px;height:62px}.wood-title{font-size:20px;padding:10px}.mode-card{min-height:59px}.mode-card strong{font-size:17px}.gameHud .coin-pill{min-width:0}.lives{min-width:82px;font-size:22px}.objective-heading{font-size:14px}.target{width:35px;height:35px}.playfield-wrap{width:94%}.gameBottom{height:62px;flex-basis:62px;grid-template-columns:1.15fr 72px 1.25fr}.animal-mini #miniArt{width:45px;height:54px;flex-basis:45px}.animal-mini img{width:52px;height:52px}.goal-box b{font-size:10px}}
.lives span.off{opacity:.18;filter:grayscale(1)}.unlock-art{height:220px;display:grid;place-items:center;overflow:hidden}.unlock-art img{width:220px;height:220px;object-fit:contain}.number-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:8px 4px}.number-btn{background:linear-gradient(#45bde2,#2876ae);border:2px solid #a7edff;border-radius:10px;padding:9px;font-size:20px;font-weight:1000}.word-target,.math-target{background:#67381f;border:2px solid #bd855c;border-radius:10px;padding:5px 14px;font-size:19px;font-weight:1000}.gold-reward{font-size:20px;color:#ffd64e;font-weight:1000}

/* v9 visual corrections */
.screen{min-height:0}
.gameHud{height:58px;flex-basis:58px;padding:5px 10px;gap:7px}
.gameHud .coin-pill{min-width:145px;height:46px;font-size:21px}
.gameHud .coinIcon{width:26px;height:26px}
.gameHud .lives{height:46px;min-width:104px;padding:0 10px;font-size:24px}
.gameHud .back,.gameHud .pause{width:50px;height:50px}
.objective-card{margin:0 12px 6px!important;padding:8px 10px!important;border-radius:17px!important}
.objective-heading{font-size:17px!important;line-height:20px!important}
.targets{gap:7px!important}
.targets .target{width:43px!important;height:43px!important}
.playfield-wrap{margin:0 12px!important;min-height:0!important;flex:1!important}
.bubble{filter:drop-shadow(0 4px 4px rgba(0,0,0,.35));touch-action:none!important;-webkit-touch-callout:none!important}
.bubble-png{width:100%!important;height:100%!important;object-fit:contain!important;pointer-events:none!important}
.gameBottom{height:76px!important;flex:0 0 76px!important;padding:5px 9px!important;gap:6px!important}
.animal-mini{min-width:0!important;flex:1.25!important;height:66px!important}
.joker-btn{flex:.75!important;height:66px!important}
.goal-box{flex:1!important;height:66px!important}
.goal-box b{font-size:12px!important;line-height:15px!important}
.modal-card{max-height:84dvh!important;overflow:auto!important}
.hero-art img,.current-animal-banner img,.animal-shop img,.unlock-art img,.upgrade-art img{object-fit:cover!important}
.animal-shop .ani{height:66px!important}
.animal-shop img{width:82px!important;height:66px!important;border-radius:9px}
.hero-art img{width:220px!important;height:220px!important;border-radius:18px}
.current-animal-banner img{width:66px!important;height:66px!important;border-radius:10px}

/* v10 fixes: complete animal framing, readable targets, clean bubbles */
.animal-shop img,
.hero-art img,
.current-animal-banner img,
.unlock-art img,
.upgrade-art img,
.animal-mini img{object-fit:contain!important;object-position:center center!important;}
.animal-shop .ani{overflow:hidden!important;display:grid!important;place-items:center!important;}
.animal-shop img{width:100%!important;height:100%!important;border-radius:8px!important;}
.animal-mini #miniArt{overflow:hidden!important;display:grid!important;place-items:center!important;}
.animal-mini img{width:100%!important;height:100%!important;}
.bubble{filter:none!important;}
.bubble.joker{outline:2px solid #ffe65d!important;box-shadow:0 6px 10px rgba(0,0,0,.45)!important;}
.bubble.selected{outline:3px solid #ffe25b!important;box-shadow:0 6px 10px rgba(0,0,0,.45)!important;}
.objective-card{padding:8px 10px 10px!important;}
.objective-heading{font-size:18px!important;font-weight:1000!important;}
.objective-heading #progressText{font-size:18px!important;}
.targets{margin-top:7px!important;gap:6px!important;}
.targets .target{width:48px!important;height:48px!important;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:50%!important;}
.targets .target img{width:100%!important;height:100%!important;object-fit:contain!important;border-radius:50%!important;}
.word-target,.math-target{font-size:25px!important;padding:5px 18px!important;min-width:80px!important;display:inline-block!important;}
/* Give the actual goal/target more vertical emphasis without adding another title. */
.game-screen .objective-card{min-height:0!important;}

/* V11 visual and interaction pass */
.mode-card .mode-art{width:58px;height:58px;object-fit:contain;flex:0 0 58px;display:block;filter:drop-shadow(0 3px 3px rgba(0,0,0,.35));}
.objective-heading #objectiveTitle{display:none!important}
.objective-heading{justify-content:flex-end!important;min-height:22px}
.objective-heading #progressText{font-size:19px!important;letter-spacing:.2px}
.targets{width:100%;gap:5px!important;margin-top:4px!important;justify-content:space-between!important;flex-wrap:nowrap!important}
.targets .target{width:48px!important;height:48px!important;flex:0 0 48px!important}
.target.done{filter:grayscale(1);opacity:.26}
.target img{pointer-events:none!important}
.hero-art img,.animal-shop img,.current-animal-banner img,.unlock-art img,.upgrade-art img,.animal-mini img{object-fit:contain!important;object-position:center!important;}
.hero-art,.animal-shop .ani,.current-animal-banner>div:first-child,.unlock-art,.upgrade-art,.animal-mini #miniArt{display:grid!important;place-items:center!important;overflow:hidden!important}
.hero-art img{max-width:100%!important;max-height:100%!important}
.animal-shop .ani{padding:2px!important}
.animal-shop img{max-width:100%!important;max-height:100%!important}
.animal-mini img{max-width:100%!important;max-height:100%!important}
.hero-upgrade:disabled{opacity:.55;filter:grayscale(.35)}
.joker-btn em{min-width:30px!important;height:22px!important;border-radius:10px!important;font-size:10px!important;padding:0 4px!important}
.joker-btn{overflow:visible!important}
@media(max-width:390px){
 .mode-card .mode-art{width:52px;height:52px;flex-basis:52px}
 .objective-card{padding:7px 8px 9px!important}
 .objective-heading{min-height:19px!important}
 .targets .target{width:41px!important;height:41px!important;flex-basis:41px!important}
}

/* V16: restore the original CSS-rendered glossy bubbles. No PNG bubble shells/reflection. */
.bubble{border:2px solid rgba(255,255,255,.42)!important;background:radial-gradient(circle at 32% 28%,rgba(255,255,255,.18) 0 10%,transparent 11%),linear-gradient(145deg,rgba(255,255,255,.18),rgba(0,0,0,.18)) var(--bubble-color,#4aa9d9)!important;box-shadow:inset 0 2px 2px rgba(255,255,255,.28),inset 0 -4px 7px rgba(0,0,0,.22),0 6px 10px rgba(0,0,0,.45)!important;overflow:hidden!important}
.bubble:after{display:none!important}
.bubble.color-red{--bubble-color:#ef4b50}.bubble.color-blue{--bubble-color:#3ba9e8}.bubble.color-green{--bubble-color:#45bd59}.bubble.color-yellow{--bubble-color:#ffd23e}.bubble.color-purple{--bubble-color:#9a63dc}.bubble.color-orange{--bubble-color:#ff8b32}.bubble.color-pink{--bubble-color:#ef5da8}.bubble.color-cyan{--bubble-color:#58d6d7}
.bubble.number,.bubble.letter,.bubble.operator{--bubble-color:#4aa9d9}.bubble.operator{--bubble-color:#9a63dc}.bubble.letter{--bubble-color:#c94b86}
.bubble.shape-circle{--bubble-color:#3ba9e8}.bubble.shape-triangle{--bubble-color:#45bd59}.bubble.shape-star{--bubble-color:#ffd23e}.bubble.shape-square{--bubble-color:#ef4b50}.bubble.shape-diamond{--bubble-color:#ff8b32}.bubble.shape-hex{--bubble-color:#58d6d7}.bubble.shape-heart{--bubble-color:#ef5da8}.bubble.shape-sun{--bubble-color:#9a63dc}
.bubble .bubble-label{font-size:30px!important;font-weight:1000!important;color:#fff!important;text-shadow:0 2px 1px rgba(0,0,0,.55),0 -1px 0 rgba(255,255,255,.25)!important;line-height:1}
.bubble .shape-glyph{font-size:31px!important;color:#fff!important;text-shadow:0 2px 1px rgba(0,0,0,.5)!important;line-height:1}
.bubble .animal-bubble-img{width:72%!important;height:72%!important;object-fit:contain!important;border-radius:50%!important;pointer-events:none!important;filter:drop-shadow(0 2px 2px rgba(0,0,0,.35))!important}
.bubble.selected{outline:3px solid #ffe25b!important}
.bubble.joker{outline:2px solid #ffe65d!important}
.bubble-png{display:none!important}

/* V16 goal strip: target art only; progress counter removed completely. */
.objective-heading{display:none!important}
.objective-card{padding:8px 10px!important;min-height:64px!important}
.targets{margin:0!important;width:100%!important;gap:5px!important;justify-content:center!important;align-items:center!important;flex-wrap:nowrap!important}
.targets .target{width:clamp(36px,8.7vw,48px)!important;height:clamp(36px,8.7vw,48px)!important;flex:0 0 clamp(36px,8.7vw,48px)!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
.target-bubble{width:100%;height:100%;border-radius:50%;border:2px solid rgba(255,255,255,.45);box-shadow:inset 0 2px 2px rgba(255,255,255,.25),inset 0 -3px 5px rgba(0,0,0,.2),0 4px 7px rgba(0,0,0,.32);position:relative}
.target-bubble:after{content:'';position:absolute;left:15%;top:11%;width:23%;height:13%;border-radius:50%;background:rgba(255,255,255,.48)}
.target-red{background:#ef4b50}.target-blue{background:#3ba9e8}.target-green{background:#45bd59}.target-yellow{background:#ffd23e}.target-purple{background:#9a63dc}.target-orange{background:#ff8b32}.target-pink{background:#ef5da8}.target-cyan{background:#58d6d7}
.shape-target{background:#7d55c4;display:grid;place-items:center}.shape-target span{font-size:25px;color:#fff;text-shadow:0 2px 1px #0008}
.number-target{background:#3ba9e8;display:grid;place-items:center;color:#fff;font-weight:1000;font-size:25px;text-shadow:0 2px 1px #0008}
.animal-target{background:#3ba9e8;display:grid;place-items:center;overflow:hidden}.animal-target img{width:82%;height:82%;object-fit:contain!important;border-radius:50%;filter:none!important}
.target.done{filter:grayscale(1);opacity:.25}

/* Keep complete animals comfortably inside their framing. */
.hero-art img,.unlock-art img,.upgrade-art img,.current-animal-banner img{width:90%!important;height:90%!important;max-width:90%!important;max-height:90%!important;object-fit:contain!important;object-position:center!important}
.animal-shop img{width:90%!important;height:90%!important;max-width:90%!important;max-height:90%!important;object-fit:contain!important;object-position:center!important}
.hero-art,.unlock-art,.upgrade-art,.current-animal-banner>div:first-child{display:grid!important;place-items:center!important;overflow:hidden!important}
.animal-shop .ani{display:grid!important;place-items:center!important;overflow:hidden!important}

/* Symmetrical unlock dialog. */
.unlock-actions{gap:12px!important;justify-content:center!important;align-items:center!important}
.unlock-actions button{min-width:120px!important;float:none!important}
.unlock-art{height:190px!important}
.unlock-art img{width:190px!important;height:190px!important}

@media(max-width:390px){
 .objective-card{min-height:56px!important;padding:6px 7px!important}
 .targets .target{width:clamp(34px,9vw,42px)!important;height:clamp(34px,9vw,42px)!important;flex-basis:clamp(34px,9vw,42px)!important}
 .bubble .bubble-label{font-size:27px!important}.bubble .shape-glyph{font-size:28px!important}
 .unlock-art{height:165px!important}.unlock-art img{width:165px!important;height:165px!important}
 .unlock-actions button{min-width:105px!important}
}

/* V13: animal framing + polished modal symmetry + bubble motion */
/* The source animal art is intentionally scaled inside its frame so the complete
   animal (including feet, ears, tails and ground) remains visible. */
.hero-art img,
.current-animal-banner img{width:78%!important;height:78%!important;max-width:78%!important;max-height:78%!important;object-fit:contain!important;object-position:center!important;}
.upgrade-art img,
.unlock-art img{width:80%!important;height:80%!important;max-width:80%!important;max-height:80%!important;object-fit:contain!important;object-position:center!important;}
.animal-shop img{width:74%!important;height:74%!important;max-width:74%!important;max-height:74%!important;object-fit:contain!important;object-position:center!important;}
.animal-shop .ani{padding:5px!important;}
.animal-mini img{width:82%!important;height:82%!important;max-width:82%!important;max-height:82%!important;object-fit:contain!important;object-position:center!important;}

/* Upgrade modal follows the same centered/symmetric action treatment as unlock. */
.closex{float:none!important;}
.upgrade-actions{margin:12px auto 2px!important;justify-content:center!important;}
.upgrade-actions button{min-width:120px!important;}
.upgrade-art{height:175px!important;}

/* New bubbles enter with a small scale/settle animation. */
.bubble{animation:bubbleSpawn .34s cubic-bezier(.2,.85,.3,1.18) both!important;}
@keyframes bubbleSpawn{
  0%{transform:scale(.35);opacity:0;filter:brightness(1.5)}
  65%{transform:scale(1.08);opacity:1;filter:brightness(1.08)}
  100%{transform:scale(1);opacity:1;filter:brightness(1)}
}
/* Pop animation: expand, flash, then collapse instead of simply disappearing. */
.bubble.popping{animation:bubblePop .34s cubic-bezier(.2,.7,.2,1) forwards!important;z-index:50!important;}
.bubble.popping::after{display:block!important;content:"";position:absolute;inset:-4px;border-radius:50%;border:3px solid rgba(255,255,255,.8);opacity:0;pointer-events:none;animation:bubbleBurst .34s ease-out forwards!important;}
@keyframes bubblePop{
  0%{transform:scale(1);opacity:1}
  35%{transform:scale(1.16);opacity:1;filter:brightness(1.25)}
  100%{transform:scale(.18) rotate(10deg);opacity:0;filter:brightness(1.6)}
}
@keyframes bubbleBurst{
  0%{transform:scale(.72);opacity:.85}
  100%{transform:scale(1.65);opacity:0}
}

@media(max-width:390px){
 .hero-art img,.current-animal-banner img{width:75%!important;height:75%!important;max-width:75%!important;max-height:75%!important;}
 .unlock-art img,.upgrade-art img{width:76%!important;height:76%!important;max-width:76%!important;max-height:76%!important;}
 .animal-shop img{width:70%!important;height:70%!important;max-width:70%!important;max-height:70%!important;}
 .upgrade-art{height:155px!important;}
 .upgrade-actions button{min-width:105px!important;}
}

/* V14 gameplay/menu polish */
.mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(94%,520px)}
.mode-card{min-height:92px;padding:8px 9px;gap:8px;position:relative}
.mode-card .mode-art{width:64px!important;height:64px!important;flex:0 0 64px!important;filter:none!important}
.mode-card strong{font-size:16px}.mode-card small{font-size:9px;line-height:11px}.mode-card>b{font-size:27px}
.objective-card{padding:6px 8px;min-height:50px;display:flex;align-items:center;justify-content:center}
.objective-heading{display:none!important}
.targets{margin:0;gap:7px;width:100%;align-items:center;justify-content:center;min-height:44px}
.target{width:44px;height:44px;flex:0 0 44px;border-radius:50%;font-size:24px}
.target img{width:40px;height:40px;border-radius:50%}
.shape-target{width:44px!important;height:44px!important;border-radius:50%!important}
.shape-target span{font-size:27px!important;line-height:1!important}
.word-target,.math-target{font-size:27px!important;min-width:70px!important;padding:4px 18px!important}
.hero-art img,.current-animal-banner img,.animal-shop img,.animal-mini img,.unlock-art img,.upgrade-art img{object-fit:contain!important;object-position:center!important}
.hero-art img{width:72%!important;height:72%!important}.current-animal-banner img{width:72%!important;height:72%!important}
.animal-shop img{width:66%!important;height:66%!important}.animal-mini img{width:76%!important;height:76%!important}
.unlock-art{height:190px!important}.unlock-art img{width:72%!important;height:72%!important}
.upgrade-art{height:175px!important}.upgrade-art img{width:72%!important;height:72%!important}
.modal-card .upgrade-actions{justify-content:center!important}.upgrade-actions .secondary{min-width:120px!important}
@media(max-width:390px){.mode-card{min-height:84px}.mode-card .mode-art{width:58px!important;height:58px!important;flex-basis:58px!important}.mode-card strong{font-size:15px}.target{width:39px;height:39px;flex-basis:39px}.target img{width:35px;height:35px}.shape-target{width:39px!important;height:39px!important}.shape-target span{font-size:24px!important}.hero-art img{width:68%!important;height:68%!important}.unlock-art img,.upgrade-art img{width:68%!important;height:68%!important}}

/* V15 hotfix: reliable game start and uncropped animal artwork. */
.hero-art img,.unlock-art img,.upgrade-art img,.current-animal-banner img,.animal-shop img,.animal-mini img{object-fit:contain!important;object-position:center center!important;}
.hero-art img{width:88%!important;height:88%!important;max-width:100%!important;max-height:100%!important;}
.unlock-art{height:210px!important;}
.unlock-art img{width:88%!important;height:88%!important;max-width:100%!important;max-height:100%!important;}
.upgrade-art{height:190px!important;}
.upgrade-art img{width:88%!important;height:88%!important;max-width:100%!important;max-height:100%!important;}
.animal-shop .ani{height:61px!important;}
.animal-shop img{width:92%!important;height:92%!important;max-width:100%!important;max-height:100%!important;}
.current-animal-banner img{width:88%!important;height:88%!important;max-width:100%!important;max-height:100%!important;}
.animal-mini img{width:88%!important;height:88%!important;max-width:100%!important;max-height:100%!important;}
@media(max-width:390px){.hero-art img{width:88%!important;height:88%!important}.unlock-art img,.upgrade-art img{width:88%!important;height:88%!important}}

/* V16: 16 distinct color targets and uncropped, aspect-ratio-preserving animal art. */
.bubble.color-lime{--bubble-color:#a6d928}.bubble.color-teal{--bubble-color:#159f91}.bubble.color-navy{--bubble-color:#3156a6}.bubble.color-coral{--bubble-color:#ff7058}.bubble.color-magenta{--bubble-color:#c936a8}.bubble.color-indigo{--bubble-color:#6252c7}.bubble.color-mint{--bubble-color:#6be0a1}.bubble.color-amber{--bubble-color:#d99b18}
.target-lime{background:#a6d928}.target-teal{background:#159f91}.target-navy{background:#3156a6}.target-coral{background:#ff7058}.target-magenta{background:#c936a8}.target-indigo{background:#6252c7}.target-mint{background:#6be0a1}.target-amber{background:#d99b18}
/* Let the image retain its own intrinsic proportions; size the frame, never crop the animal. */
.hero-art img,.unlock-art img,.upgrade-art img,.current-animal-banner img,.animal-shop img,.animal-mini img,.animal-target img{object-fit:contain!important;object-position:center!important;border-radius:0!important}
.hero-art,.unlock-art,.upgrade-art,.current-animal-banner>div:first-child,.animal-shop .ani,.animal-mini #miniArt{overflow:hidden!important}
.hero-art img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}
.unlock-art img,.upgrade-art img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}
.animal-shop .ani{width:100%;height:61px}.animal-shop img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}
.current-animal-banner img,.animal-mini img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}

.targets.color-targets{display:grid!important;grid-template-columns:repeat(8,minmax(25px,1fr))!important;gap:4px!important;justify-items:center!important;align-items:center!important;flex-wrap:initial!important}
.targets.color-targets .target{width:clamp(25px,5.4vw,38px)!important;height:clamp(25px,5.4vw,38px)!important;flex:none!important}
.targets.color-targets .target-bubble{width:100%;height:100%}

/* V17: responsive animal artwork uses its intrinsic aspect ratio; never stretch/crop it. */
.unlock-art,.upgrade-art{width:min(100%,280px)!important;height:auto!important;aspect-ratio:1/1!important;margin:0 auto!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important}
.unlock-art img,.upgrade-art img{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;flex:0 1 auto!important}
.hero-art{display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important}
.hero-art img{display:block!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important}
.current-animal-banner>div:first-child{display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important}
.current-animal-banner img,.animal-mini img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important}
.animal-shop .ani{display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important}
.animal-shop img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important}
.difficulty-panel{width:min(94%,520px);margin:8px auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border:2px solid #d9a15a;border-radius:16px;background:linear-gradient(135deg,#8b451f,#633016);box-shadow:0 4px 0 #482312;color:#fff;font-weight:800}
.difficulty-panel select{min-width:130px;padding:9px 12px;border:2px solid #f0c078;border-radius:10px;background:#f6d69b;color:#512b16;font-weight:800;font-size:15px}
.objective-card{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important}
.targets{display:flex;align-items:center;justify-content:center;margin-inline:auto!important;text-align:center!important}
.math-target{display:flex!important;align-items:center!important;justify-content:center!important;margin-inline:auto!important;text-align:center!important;min-width:110px!important}


/* V18 surgical changes: compact RPG-style single-step Joker upgrade and centered color goals. */
.targets.color-targets{display:flex!important;justify-content:center!important;align-items:center!important;flex-wrap:nowrap!important;width:100%!important;gap:clamp(3px,1vw,7px)!important}
.targets.color-targets .target{flex:0 1 clamp(25px,5.4vw,38px)!important}
.upgrade-art{height:clamp(100px,19vh,150px)!important;margin-bottom:0!important}
.upgrade-art img{width:82%!important;height:82%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important}
.joker-preview{margin:0 auto!important;height:52px!important}
.joker-preview img{width:46px!important;height:46px!important}
.upgrade-description{margin:2px 0 8px!important;line-height:1.25!important}
.joker-skill{background:#5d331e;border:2px solid #c58b57;border-radius:12px;padding:10px;margin:7px 0 4px;text-align:left}
.skill-heading,.skill-detail{display:flex;align-items:center;justify-content:space-between;gap:8px}
.skill-heading b{font-size:14px}.skill-heading strong{color:#ffdc68;font-size:13px}
.skill-levels{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:9px 0}
.skill-pip{height:27px;display:grid;place-items:center;border-radius:7px;border:2px solid #9b7658;background:#3f2a20;color:#b9a18c;font-weight:1000}
.skill-pip.filled{background:linear-gradient(#ffe58b,#d49b2d);border-color:#fff0a3;color:#63370f;text-shadow:0 1px #fff5bd}
.skill-detail{font-size:11px;color:#ffdf94}.upgrade-next-row{display:flex;justify-content:center;margin-top:9px}
.upgrade-next{min-width:165px;background:linear-gradient(#58dc6b,#1d9c40);padding:9px 15px;border-radius:9px;border:2px solid #a4ffa0;font-weight:1000;font-size:14px;box-shadow:0 3px 0 #146326}
.upgrade-max{padding:8px 15px;color:#ffe17a;font-weight:1000}
@media(max-height:740px){.upgrade-art{height:clamp(80px,15vh,115px)!important}.upgrade-art img{width:78%!important;height:78%!important}.joker-preview{height:42px!important}.joker-preview img{width:38px!important;height:38px!important}.upgrade-description{font-size:13px;margin-bottom:5px!important}.joker-skill{padding:7px}}

/* V21 surgical polish: make the active bubble unmistakable without changing layout. */
.bubble.selected{outline:5px solid #39ff72!important;outline-offset:1px;box-shadow:0 0 0 4px #073f20,0 7px 14px rgba(0,0,0,.55)!important;filter:brightness(1.12);z-index:25!important}
.upgrade-next-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;min-height:44px}
.upgrade-balance{min-width:0;flex:1;display:grid;grid-template-columns:22px auto;grid-template-rows:auto auto;align-items:center;justify-content:start;column-gap:5px;padding:5px 8px;border:2px solid #a97742;border-radius:9px;background:linear-gradient(#704122,#4e2b19);color:#ffe49a;box-sizing:border-box}
.upgrade-coin{grid-row:1 / span 2;display:grid;place-items:center;width:21px;height:21px;border-radius:50%;background:linear-gradient(#ffe88b,#e8a91d);border:1px solid #fff0a4;color:#986014;font-size:13px;text-shadow:0 1px #fff4bd}
.upgrade-balance strong{font-size:14px;line-height:16px;white-space:nowrap}
.upgrade-balance small{font-size:8px;line-height:10px;color:#e5c18a;letter-spacing:.5px}
.upgrade-next{flex:0 0 auto;min-width:0;padding:9px 12px;font-size:13px}
@media(max-width:360px){.upgrade-balance{padding:4px 5px;column-gap:3px;grid-template-columns:18px auto}.upgrade-coin{width:18px;height:18px}.upgrade-balance strong{font-size:12px}.upgrade-next{padding:8px 9px;font-size:12px}}


/* V23: clean standalone game-type symbols; keep the existing rectangular cards. */
.mode-card .mode-art{display:none!important}
.mode-symbol{width:54px;height:54px;flex:0 0 54px;display:grid;place-items:center;font-weight:1000;line-height:1;text-shadow:0 2px 2px #51240f;filter:drop-shadow(0 2px 1px #0003)}
.mode-symbol-colors{font-size:39px}
.mode-symbol-shapes{font-size:39px;color:#ffe18a}
.mode-symbol-icons{font-size:39px}
.mode-symbol-numbers{font-size:23px;letter-spacing:-2px;color:#8fe4ff;-webkit-text-stroke:1px #286d9d}
.mode-symbol-words{font-size:22px;letter-spacing:-1px;color:#fff1b0;-webkit-text-stroke:1px #a85a29}
.mode-symbol-math{font-size:22px;letter-spacing:-2px;color:#a6ff9e}
.current-animal-banner{position:relative;width:min(92%,430px);font:inherit;color:inherit;text-align:left;cursor:pointer}
.current-animal-banner:active{filter:brightness(1.12)}
.mode-animal-edit{margin-left:auto;color:#ffe078;font-size:21px;text-shadow:0 2px #5b2b12}
.unlock-balance{width:min(100%,270px);margin:8px auto 10px;min-height:42px}
.unlock-actions button{min-width:120px}
#unlockBtn:disabled{opacity:.55;filter:saturate(.5);cursor:not-allowed}
@media(max-width:390px){.mode-symbol{width:48px;height:48px;flex-basis:48px}.mode-symbol-colors,.mode-symbol-shapes,.mode-symbol-icons{font-size:34px}.mode-symbol-numbers,.mode-symbol-words,.mode-symbol-math{font-size:20px}}

/* V24: consistent, larger goal markers for every mode; geometry uses clean vector silhouettes. */
.targets .target,
.targets.color-targets .target {
  width:clamp(32px,8.6vw,42px)!important;
  height:clamp(32px,8.6vw,42px)!important;
  flex:0 0 clamp(32px,8.6vw,42px)!important;
  display:grid!important;
  place-items:center!important;
}
.targets.color-targets .target { flex-basis:clamp(32px,8.6vw,42px)!important; }
.shape-svg { display:block;width:76%;height:76%;overflow:visible;pointer-events:none; }
.shape-target .shape-svg { width:76%;height:76%; }
.bubble .shape-svg { width:72%;height:72%; }


/* V26: clearer shape targets and a controlled larger goal row; keep eight targets fitting on mobile. */
.objective-card{min-height:68px!important;padding:7px 8px!important;box-sizing:border-box!important;overflow:visible!important}
.targets{gap:clamp(2px,0.8vw,5px)!important;min-height:48px!important;overflow:visible!important}
.targets .target,.targets.color-targets .target{width:clamp(32px,10vw,38px)!important;height:clamp(32px,10vw,38px)!important;flex:0 0 clamp(32px,10vw,38px)!important;overflow:visible!important}
.target-bubble{display:grid!important;place-items:center!important;overflow:visible!important}
.shape-target .shape-svg{width:90%!important;height:90%!important;max-width:100%!important;max-height:100%!important;overflow:visible!important}
.targets .animal-target img{width:88%!important;height:88%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}
.number-target{font-size:clamp(19px,6vw,25px)!important}
.settings-actions{display:flex;flex-direction:column;gap:10px;margin:16px 0}
.settings-actions button,.danger-action{width:100%;min-height:46px;border-radius:11px;font-weight:1000;padding:10px 12px}
.danger-action{background:linear-gradient(#e46b4e,#b93422);border:2px solid #ffb49b;color:#fff;box-shadow:0 3px 0 #6e2015}


/* V27: compact animal-selection framing without changing portrait dimensions, plus touch swiping. */
.hero-title{font-size:clamp(19px,5vw,24px)!important;padding:8px 12px!important;min-height:0!important;margin:4px auto 8px!important;line-height:1.1!important}
.selected-animal-card{padding-top:8px!important;padding-bottom:8px!important;margin-top:6px!important;margin-bottom:6px!important}
.hero-stage{margin-top:0!important;margin-bottom:0!important}
.hero-name{margin-top:2px!important;margin-bottom:3px!important}
.hero-upgrade{margin-top:4px!important;margin-bottom:0!important}
#heroArt{touch-action:pan-y;cursor:grab}
#heroArt:active{cursor:grabbing}
/* Target markers use more of the existing objective strip; the strip and playfield heights stay fixed. */
.targets .target,.targets.color-targets .target{width:clamp(34px,10.5vw,42px)!important;height:clamp(34px,10.5vw,42px)!important;flex:0 0 clamp(34px,10.5vw,42px)!important}
.targets{gap:clamp(1px,0.55vw,4px)!important}
.shape-target .shape-svg{width:92%!important;height:92%!important}
.targets .animal-target img{width:90%!important;height:90%!important;object-fit:contain!important}
@media(max-width:390px){
 .hero-title{font-size:18px!important;padding:7px 10px!important;margin:3px auto 6px!important}
 .selected-animal-card{padding-top:6px!important;padding-bottom:6px!important;margin-top:4px!important;margin-bottom:4px!important}
 .hero-name{margin-top:1px!important;margin-bottom:2px!important}
 .hero-upgrade{margin-top:3px!important}
 .targets .target,.targets.color-targets .target{width:clamp(33px,10.2vw,39px)!important;height:clamp(33px,10.2vw,39px)!important;flex-basis:clamp(33px,10.2vw,39px)!important}
}


/* V28: fit all eight objective markers on narrow mobile viewports without clipping.
   Marker size is viewport-driven, so every game type uses the same marker dimensions. */
#targets.targets{width:100%!important;box-sizing:border-box!important;display:flex!important;flex-wrap:nowrap!important;justify-content:center!important;align-items:center!important;gap:2px!important;overflow:visible!important;padding-inline:2px!important;}
#targets.targets .target{width:min(43px,calc((100vw - 58px)/8))!important;height:min(43px,calc((100vw - 58px)/8))!important;min-width:0!important;flex:0 1 min(43px,calc((100vw - 58px)/8))!important;box-sizing:border-box!important;overflow:visible!important;}
#targets .target-bubble{width:100%!important;height:100%!important;display:grid!important;place-items:center!important;box-sizing:border-box!important;}
#targets .shape-target .shape-svg{width:92%!important;height:92%!important;max-width:100%!important;max-height:100%!important;}
#targets .animal-target img{width:92%!important;height:92%!important;object-fit:contain!important;}
#targets .number-target{font-size:clamp(16px,5.5vw,24px)!important;}
/* V28: bright, readable full-board warning with the existing auto-dismissing toast behavior. */
.playfield-wrap.danger .danger-flash{border-color:#ff102f!important;box-shadow:inset 0 0 0 3px #ff6b78,0 0 18px #ff173dcc!important;}
.toast.warning{background:linear-gradient(180deg,#ff5261,#c90024)!important;border:3px solid #ffe1a1!important;color:#fff!important;text-shadow:0 2px 2px #730015!important;box-shadow:0 0 0 2px #ff173d88,0 6px 18px #0009!important;font-size:clamp(15px,4.2vw,19px)!important;padding:11px 16px!important;max-width:92vw!important;}

/* V31: directional character-swap animation; portrait geometry/aspect-ratio rules are unchanged. */
#heroArt.hero-swap-left img{animation:characterSwapLeft .24s ease-out both}
#heroArt.hero-swap-right img{animation:characterSwapRight .24s ease-out both}
@keyframes characterSwapLeft{0%{opacity:.25;transform:translateX(18px) scale(.985)}100%{opacity:1;transform:translateX(0) scale(1)}}
@keyframes characterSwapRight{0%{opacity:.25;transform:translateX(-18px) scale(.985)}100%{opacity:1;transform:translateX(0) scale(1)}}
.completion-actions{flex-wrap:nowrap;align-items:center;justify-content:center}.completion-actions button{min-width:105px;min-height:42px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}

/* V34: per-animal gameplay backgrounds with a configurable darkness layer. */
.playfield{background-position:center;background-size:cover;background-repeat:no-repeat;background-color:#063d32}
.playfield:after{content:"";position:absolute;inset:0;background:rgba(0,0,0,var(--background-darkness,.4));z-index:2;pointer-events:none;border-radius:inherit}
.darkness-setting{margin:12px 0 14px;padding:12px;background:#4f2a19;border:2px solid #c78c52;border-radius:13px;text-align:left}
.darkness-label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}
.darkness-label strong{font-size:20px;color:#ffe06a}
#darknessSlider{width:100%;margin:16px 0 6px;accent-color:#69e77b;cursor:pointer;touch-action:pan-y}
.darkness-scale{display:flex;justify-content:space-between;font-size:10px;opacity:.9}
.darkness-reset{width:100%;margin-top:12px;min-height:38px}


/* V0.37 startup splash: exact user-approved jungle artwork and locked title logo. */
.startup-screen{position:fixed;inset:0;z-index:300;overflow:hidden;background:#063d32 url('assets/startup/splash_jungle.png') center center/100% 100% no-repeat;display:flex;align-items:flex-start;justify-content:center;isolation:isolate}
.startup-screen:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,26,28,.10),rgba(0,32,28,.04) 48%,rgba(0,22,18,.28));z-index:-1}
.startup-logo{position:absolute;top:25%;left:50%;width:min(78vw,470px);height:auto;max-height:27vh;object-fit:contain;opacity:0;transform:translate(-50%,calc(100vh + 40px));filter:drop-shadow(0 5px 6px rgba(0,0,0,.4));animation:startupLogoRise 3.8s cubic-bezier(.2,.72,.24,1) .15s forwards;pointer-events:none}
.startup-play{position:absolute;top:71%;left:50%;transform:translate(-50%,12px) scale(.92);opacity:0;pointer-events:none;min-width:min(43vw,190px);padding:7px 18px;border-radius:14px;background:linear-gradient(#65ed55,#29bd32 52%,#168b27);border:3px solid #d5ff83;box-shadow:0 5px 0 #07591d,0 9px 18px rgba(0,0,0,.35),inset 0 2px 2px rgba(255,255,255,.45);color:#173b16;font-weight:1000;font-size:clamp(17px,4vw,21px);letter-spacing:1px;text-shadow:0 1px rgba(255,255,255,.35);transition:opacity .35s ease,transform .35s ease;z-index:2}
.startup-play.ready{opacity:1;pointer-events:auto;transform:translate(-50%,0) scale(1)}
.startup-play:active{transform:translate(-50%,3px) scale(.98);box-shadow:0 2px 0 #07591d,0 4px 10px rgba(0,0,0,.3)}
.startup-version{position:absolute;right:8px;bottom:max(6px,env(safe-area-inset-bottom));font-size:10px;line-height:1;color:rgba(255,255,255,.82);text-shadow:0 1px 3px #000,0 0 4px #000;font-weight:700;letter-spacing:.2px}
@keyframes startupLogoRise{0%{opacity:0;transform:translate(-50%,calc(100vh + 40px))}34%{opacity:0;transform:translate(-50%,45vh)}48%{opacity:.45}62%{opacity:1;transform:translate(-50%,-5px)}82%{opacity:1;transform:translate(-50%,-5px)}100%{opacity:1;transform:translate(-50%,0)}}
.startup-screen.leaving{opacity:0;transition:opacity var(--screen-transition-duration) ease;pointer-events:none}
@media(max-height:650px){.startup-logo{top:23%;width:min(70vw,410px);max-height:24vh}.startup-play{top:72%;min-width:min(40vw,172px);padding:6px 16px;font-size:clamp(16px,3.8vw,20px)}}
/* Fast fade between primary screens; no gameplay logic or layout behavior changes. */
.screen.screen-fade-in{animation:screenFadeIn var(--screen-transition-duration) ease both}
@keyframes screenFadeIn{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.startup-logo{animation-duration:.01ms;animation-delay:0s}.startup-play,.screen.screen-fade-in{transition:none;animation:none;opacity:1}}

/* V0.39 polish: keep the Gold balance centered in every screen header. */
.topHud,.gameHud{position:relative;justify-content:space-between}
.topHud>.coin-pill,.gameHud>.coin-pill{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2;flex:none;width:max-content;min-width:170px}
.topHud>.back,.gameHud>.back{position:relative;z-index:3;flex:0 0 auto}
.topHud>.gear,.gameHud>.pause{position:relative;z-index:3;flex:0 0 auto;margin-left:auto}
.gameHud>.coin-pill{min-width:138px;width:max-content;flex:none}
.gameHud>.lives{position:relative;z-index:3;margin-left:auto;flex:0 0 44px;min-width:44px;width:44px;padding:0 2px}
.gameHud>.pause{margin-left:0}
/* The six game-type choices are primary actions, so use the established green action-button treatment. */
.mode-card{background:linear-gradient(180deg,#54dc65 0%,#28b943 52%,#168a31 100%)!important;border-color:#a5ffa5!important;box-shadow:0 4px 0 #07591d, inset 0 2px 2px #ffffff55!important;color:#fff!important;text-shadow:0 1px 2px #14511e}
.mode-card strong,.mode-card small{color:#fff!important}
.mode-card>b{color:#ffe66b!important}
.mode-card .math-symbol,.mode-card .mode-symbol-math{color:#111!important;text-shadow:none!important}
@media(max-width:390px){.topHud>.coin-pill{min-width:150px;width:max-content}.gameHud>.coin-pill{min-width:125px;width:max-content}.gameHud>.lives{flex-basis:40px;min-width:40px;width:40px}.gameHud>.pause{width:43px;height:46px}}

/* V0.40: one compact heart counter, consistent one-second fades, and repeatable startup navigation. */
.life-heart{position:relative;display:inline-grid;place-items:center;width:44px;height:44px;font-size:31px;line-height:1;filter:drop-shadow(0 2px 1px #6b1020);flex:0 0 44px}
.life-heart b{position:absolute;left:50%;top:50%;right:auto;transform:translate(-50%,-53%);display:block;width:100%;text-align:center;font-size:22px;line-height:1;color:#fff;font-weight:1000;text-shadow:0 1px 2px #78142b;letter-spacing:0;pointer-events:none}
.bubble .bubble-value-image{display:block;width:76%;height:76%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 1px 1px #0005)}
#home>.topHud>.coin-pill{left:50%;}
.modal.modal-fade-in{animation:modalFadeIn var(--screen-transition-duration) ease both}
.modal.modal-fade-out{animation:modalFadeOut var(--screen-transition-duration) ease both}
@keyframes modalFadeIn{from{opacity:0}to{opacity:1}}
@keyframes modalFadeOut{from{opacity:1}to{opacity:0}}
@media(prefers-reduced-motion:reduce){.modal.modal-fade-in,.modal.modal-fade-out{animation-duration:.01ms}}

/* V0.41: centered life count, compact paired animal actions, shared fade timing, visible Word/Math Joker value art. */
@media(max-width:390px){.hero-actions{gap:8px;width:min(100%,300px)}.hero-actions .hero-upgrade,.hero-actions .continue-btn{font-size:13px;padding:8px 4px;height:44px;min-height:44px;max-height:44px}.life-heart{width:44px;height:44px;flex-basis:44px;font-size:31px}.life-heart b{font-size:21px}}

/* V0.42 precision polish: compact heart, aligned selection actions, modal input blocking, result action order, and startup fade timing. */
.modal:not(.hidden){pointer-events:auto}
.modal.modal-fade-out{pointer-events:auto}
.hero-actions{align-items:stretch}


/* V0.43: exact selection action alignment, locked-animal guard, pause action order, slide-only logo. */
.hero-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch!important;justify-items:stretch!important;gap:10px;width:min(100%,330px);margin:4px auto 3px}
.hero-actions .hero-upgrade,.hero-actions .continue-btn{display:flex!important;position:relative!important;top:0!important;align-self:stretch!important;justify-self:stretch!important;width:100%!important;height:48px!important;min-height:48px!important;max-height:48px!important;margin:0!important;padding:0 5px!important;line-height:1.1!important;box-sizing:border-box!important;transform:none!important}
.hero-actions .continue-btn:disabled{opacity:.42!important;filter:grayscale(.75)!important;cursor:not-allowed!important;box-shadow:0 4px 0 #39251a!important}
.pause-actions{display:flex;justify-content:center;align-items:stretch;gap:6px}
.pause-actions #pauseMenu{order:1}
.pause-actions #resume{order:2}
.startup-logo{opacity:1!important;animation-name:startupLogoSlideOnly!important}
@keyframes startupLogoSlideOnly{0%{transform:translate(-50%,calc(100vh + 40px))}34%{transform:translate(-50%,45vh)}62%{transform:translate(-50%,-5px)}82%{transform:translate(-50%,-5px)}100%{transform:translate(-50%,0)}}
@media(max-width:390px){.hero-actions .hero-upgrade,.hero-actions .continue-btn{height:44px!important;min-height:44px!important;max-height:44px!important;padding:0 4px!important;font-size:13px!important}}
@media(prefers-reduced-motion:reduce){.startup-logo{animation-duration:.01ms!important;animation-delay:0s!important}}


/* V0.44: single smooth 2.5s startup logo slide, expanded level labels, named footer ability, readable combo reward. */
.startup-logo{opacity:1!important;animation:startupLogoSlideOnly 2.5s cubic-bezier(.22,.65,.3,1) 0s both!important;will-change:transform}
@keyframes startupLogoSlideOnly{from{transform:translate(-50%,calc(100vh + 40px))}to{transform:translate(-50%,0)}}
.combo{display:flex;align-items:center;justify-content:center;gap:5px}
.combo .combo-coin{display:inline-grid;place-items:center;width:.72em;height:.72em;font-size:.72em;line-height:1;border-radius:50%;background:radial-gradient(circle at 35% 25%,#fff4a5,#f9c62c 58%,#ad6a00);border:1px solid #ffeaa0;color:#fff9d8;text-shadow:0 1px 1px #865000;box-shadow:0 1px 2px #0007}
.joker-btn span{font-size:clamp(6px,1.8vw,9px)!important;line-height:1!important;max-width:100%;white-space:nowrap;letter-spacing:-.2px}
.joker-btn em{font-size:12px!important;font-weight:1000!important}
.goal-box small{font-size:11px!important}
.goal-box b{font-size:13px!important;line-height:15px!important}
@media(max-width:390px){.goal-box b{font-size:12px!important;line-height:14px!important}}
@media(prefers-reduced-motion:reduce){.startup-logo{animation-duration:.01ms!important;animation-delay:0s!important}}


/* V0.45: animal-mode bubbles prioritize the original animal artwork; retain only a slim colored rim. */
.bubble.animal{border:2px solid rgba(255,255,255,.72)!important;box-sizing:border-box!important}
.bubble .animal-bubble-img{width:96%!important;height:96%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;border-radius:50%!important;filter:none!important}
/* Match reward is intentionally text-only. */
.combo span:first-child{color:#ffd64e!important;font-weight:1000!important}


/* V0.46 readability and exit control polish */
.mode-card strong{font-size:19px!important}
.mode-card small{font-size:12px!important;line-height:1.25!important}
.current-animal-banner b{font-size:21px!important}
.current-animal-banner small{font-size:14px!important;line-height:1.3!important}
.baby-mode b{font-size:16px!important}
.baby-mode small{font-size:12px!important;line-height:1.25!important}
.exit-game-btn{display:block;width:min(94%,430px);min-height:52px;margin:14px auto 12px;padding:12px;background:linear-gradient(180deg,#f35a50 0%,#d52d2d 55%,#a91f25 100%);border:3px solid #ffaaa0;border-radius:13px;box-shadow:0 4px 0 #76151b,inset 0 2px 2px #ffffff55;color:#fff;font-size:17px;font-weight:1000;text-shadow:0 2px 2px #7d1717}
.exit-game-btn:active{filter:brightness(1.1);transform:translateY(1px)}
.exit-confirm{background:linear-gradient(#f35a50,#b9232c)!important;border:2px solid #ffaaa0!important;border-radius:10px;padding:8px 13px;font-weight:1000;box-shadow:0 3px 0 #76151b;color:#fff}
@media(max-width:390px){.mode-card strong{font-size:18px!important}.mode-card small{font-size:11px!important}.current-animal-banner b{font-size:20px!important}.current-animal-banner small{font-size:13px!important}.baby-mode b{font-size:15px!important}.baby-mode small{font-size:11px!important}}


/* V0.47: clear Baby Mode state, three-stop saved difficulty control, and flying match reward. */
.difficulty-panel{display:block!important;padding:10px 12px!important}
.difficulty-panel> b{display:block;margin-bottom:8px;font-size:15px}
.difficulty-control{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:4px;border-radius:12px;background:#482512;border:2px solid #d99b55}
.difficulty-control button{min-height:38px;padding:7px 3px;border:2px solid transparent;border-radius:9px;background:transparent;color:#ffe4bf;font-size:13px;font-weight:1000;letter-spacing:.2px;touch-action:manipulation}
.difficulty-control button.active{background:linear-gradient(#ffe6a4,#e9b65a);border-color:#fff0bd;color:#532b13;box-shadow:0 2px 0 #9b6427,inset 0 1px 1px #fff8}
.baby-mode{min-height:68px!important;gap:11px!important}
.baby-face{width:42px!important;height:42px!important;flex:0 0 42px!important;background:linear-gradient(#fff0bd,#ffca69)!important;border:2px solid #ffe4a0;font-size:27px!important;line-height:1!important}
.baby-mode i{min-width:56px!important;text-align:center;font-size:13px!important;padding:8px 10px!important;border:2px solid #a58b72;background:#42352c;color:#fff}
.baby-mode.on i{background:linear-gradient(#42df6b,#168c39)!important;border-color:#a6ffad!important;color:#fff!important}
.baby-mode:not(.on) i{background:linear-gradient(#777,#4b4b4b)!important;border-color:#aaa!important;color:#fff!important}
.combo.fly-to-coins{animation:comboFlyToCoins 2s cubic-bezier(.22,.72,.28,1) forwards!important;will-change:transform,opacity}
@keyframes comboFlyToCoins{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}15%{opacity:1;transform:translate(-50%,-50%) scale(1.08)}100%{opacity:0;transform:translate(calc(-50% + var(--fly-x,0px)),calc(-50% + var(--fly-y,0px))) scale(.48)}}
@media(max-width:390px){.difficulty-control button{font-size:11px;min-height:36px}.difficulty-panel> b{font-size:14px}.baby-mode i{min-width:52px!important;font-size:12px!important}}


/* V0.48: reset stale match reward UI on every new round, slow reward flight, enlarge gameplay footer labels and ability art. */
.gameBottom .animal-mini b{font-size:13px!important;line-height:1.1!important}
.gameBottom .animal-mini small{font-size:11px!important;line-height:1.1!important}
.gameBottom .animal-mini #miniArt{width:56px!important;height:60px!important;flex-basis:56px!important}
.gameBottom .animal-mini img{width:60px!important;height:60px!important;max-width:100%;max-height:100%}
.gameBottom .joker-btn #jokerArt{height:39px!important;max-height:43px!important;display:grid;place-items:center}
.gameBottom .joker-btn img{width:40px!important;height:40px!important;max-width:100%;max-height:100%}
.gameBottom .joker-btn span{font-size:10px!important;line-height:1.05!important;max-width:100%;overflow:hidden;text-overflow:clip}
.gameBottom .joker-btn em{font-size:12px!important;min-width:24px!important;height:24px!important}
.gameBottom .goal-box small{font-size:12px!important;line-height:1.1!important}
.gameBottom .goal-box b{font-size:14px!important;line-height:1.15!important}
@media(max-width:390px){
 .gameBottom .animal-mini b{font-size:12px!important}
 .gameBottom .animal-mini small{font-size:10px!important}
 .gameBottom .animal-mini #miniArt{width:49px!important;flex-basis:49px!important}
 .gameBottom .animal-mini img{width:52px!important;height:52px!important}
 .gameBottom .joker-btn img{width:36px!important;height:36px!important}
 .gameBottom .joker-btn span{font-size:9px!important}
 .gameBottom .goal-box b{font-size:12px!important;line-height:1.1!important}
 .gameBottom .goal-box small{font-size:11px!important}
}


/* V0.49: match rewards originate at the last selected bubble and fly diagonally to Gold in 2 seconds. */
.combo{top:0;left:0;transform:translate(-50%,-50%);pointer-events:none;white-space:nowrap}
.combo.fly-to-coins{animation:comboFlyToCoins 2s cubic-bezier(.22,.72,.28,1) forwards!important}
@keyframes comboFlyToCoins{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}12%{opacity:1;transform:translate(-50%,-50%) scale(1.08)}100%{opacity:0;transform:translate(calc(-50% + var(--fly-x,0px)),calc(-50% + var(--fly-y,0px))) scale(.48)}}
/* Reuse the startup PLAY button's pressed-down feel for green action buttons throughout the game. */
.confirm,.hero-upgrade,.continue-btn,.upgrade-next,.mode-card,.upgrade-row button,#homeCoinPlus,#modesCoinPlus,#gameCoinPlus{transition:transform .09s ease,box-shadow .09s ease,filter .09s ease}
.confirm:active,.hero-upgrade:active,.continue-btn:active,.upgrade-next:active,.mode-card:active,.upgrade-row button:active,#homeCoinPlus:active,#modesCoinPlus:active,#gameCoinPlus:active{transform:translateY(3px);box-shadow:0 1px 0 #07591d,inset 0 2px 2px #ffffff55!important;filter:brightness(1.06)}
.startup-play:active{transform:translate(-50%,3px) scale(.98);box-shadow:0 2px 0 #07591d,0 4px 10px rgba(0,0,0,.3)}


/* V0.50: guarantee the pressed-down animation on the animal selection Upgrade/Unlock and Continue buttons. */
.hero-actions #heroUpgrade,
.hero-actions #continueModes,
#unlockBtn {
  transition: transform .09s ease, box-shadow .09s ease, filter .09s ease !important;
  -webkit-tap-highlight-color: transparent;
}
.hero-actions #heroUpgrade:active:not(:disabled),
.hero-actions #continueModes:active:not(:disabled),
#unlockBtn:active:not(:disabled) {
  transform: translateY(3px) scale(.985) !important;
  box-shadow: 0 1px 0 #07591d, inset 0 2px 2px #ffffff55 !important;
  filter: brightness(1.06) !important;
}

/* v0.52: Magic Coin assets — clean transparent edges and compact layout */
.joker-preview img{width:38px!important;height:38px!important;object-fit:contain;filter:none}
.gameBottom .joker-btn img{width:32px!important;height:32px!important;max-width:100%;max-height:100%;object-fit:contain}
.gameBottom .joker-btn span{font-size:9px!important;line-height:1.05!important;max-width:100%;overflow:hidden;text-overflow:clip}

/* v0.58: safer top HUD and integrated title/back controls */
.topHud,.gameHud{padding-top:max(7px,env(safe-area-inset-top));}
.topHud>.coin-pill,.gameHud>.coin-pill{position:relative;left:auto;top:auto;transform:none;z-index:3;flex:0 1 auto;width:max-content;min-width:0;max-width:calc(100vw - 110px);}
#home>.topHud>.coin-pill,#modes>.topHud>.coin-pill{margin-right:auto;}
.gameHud>.coin-pill{margin-right:auto;flex:0 1 auto;min-width:0;max-width:calc(100vw - 170px);}
.gameHud>.lives{margin-left:0;flex:0 0 auto;min-width:72px;width:auto;padding:0 5px;}
.gameHud>.pause{margin-left:0;flex:0 0 48px;}
.title-with-back{display:flex;align-items:center;justify-content:center;gap:10px;position:relative;width:min(92%,560px);min-height:56px;padding:7px 12px 7px 56px;}
.title-with-back>span{flex:1;display:block;text-align:center;}
.title-back{position:absolute;left:6px;top:50%;transform:translateY(-50%);width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(#a75b2a,#6e3418);border:3px solid #df9d51;box-shadow:0 3px 0 #4c240e;font-size:34px;font-weight:900;line-height:28px;padding:0;}
@media(max-width:390px){.topHud>.coin-pill{max-width:calc(100vw - 80px);}.gameHud>.coin-pill{max-width:calc(100vw - 165px);}.gameHud>.lives{min-width:64px;padding:0 3px}.gameHud>.pause{width:43px;flex-basis:43px}.title-with-back{padding-left:52px;padding-right:8px;font-size:18px}.title-back{width:38px;height:38px;left:5px}}

/* v0.59: pin Gold to the left edge on every screen and integrate a compact back icon into title plaques. */
.topHud,.gameHud{justify-content:flex-start;}
.topHud>.coin-pill,.gameHud>.coin-pill{position:relative;left:auto;top:auto;transform:none;margin-left:0;margin-right:auto;flex:0 1 auto;width:max-content;min-width:0;max-width:calc(100vw - 110px);}
#home>.topHud>.coin-pill,#modes>.topHud>.coin-pill{left:auto;margin-left:0;margin-right:auto;}
.gameHud>.coin-pill{min-width:0;max-width:calc(100vw - 170px);}
.topHud>.gear{margin-left:auto;}
.gameHud>.lives{margin-left:auto;}
.gameHud>.pause{margin-left:0;}
.wood-title.title-with-back{display:grid;grid-template-columns:30px minmax(0,1fr) 30px;align-items:center;gap:7px;position:relative;width:min(92%,560px);min-height:56px;padding:7px 10px;background:linear-gradient(180deg,#a65d2c 0%,#87451f 48%,#713616 100%);border:3px solid #efbd72;border-radius:16px;box-shadow:inset 0 0 0 2px #9b572e,0 4px 0 #51260f,0 7px 14px #0005;}
.title-with-back>span{grid-column:2;grid-row:1;display:block;min-width:0;text-align:center;line-height:1.12;}
.title-with-back>.title-back{position:relative;left:auto;top:auto;transform:none;grid-column:1;grid-row:1;width:28px;height:28px;display:grid;place-items:center;padding:0;border:1px solid #f0c17a;border-radius:50%;background:linear-gradient(180deg,#79401f,#5b2c15);box-shadow:inset 0 1px 2px #ffffff30,0 1px 2px #3d1b0b;color:#fff1d4;font-size:25px;font-weight:800;line-height:22px;}
@media(max-width:390px){.topHud>.coin-pill{max-width:calc(100vw - 80px);}.gameHud>.coin-pill{max-width:calc(100vw - 165px);}.wood-title.title-with-back{grid-template-columns:27px minmax(0,1fr) 27px;gap:5px;padding:6px 8px;font-size:18px}.title-with-back>.title-back{width:26px;height:26px;font-size:23px;line-height:20px}}


/* v0.60: compact Gold display without the green plus control; centered title back glyph. */
.coin-pill{height:42px;min-width:0;gap:6px;padding:3px 9px;font-size:19px;border-radius:14px;}
.coinIcon{width:25px;height:25px;flex:0 0 25px;font-size:12px;}
.coin-pill button{display:none!important;}
.topHud>.coin-pill,.gameHud>.coin-pill{width:max-content;min-width:0;max-width:calc(100vw - 95px);}
.gameHud>.coin-pill{height:40px;font-size:18px;max-width:calc(100vw - 155px);}
.gameHud>.coin-pill .coinIcon{width:23px;height:23px;flex-basis:23px;}
.title-with-back>.title-back{font-size:29px;line-height:1;display:grid;place-items:center;text-align:center;padding:0;transform:none;}
@media(max-width:390px){.coin-pill{height:40px;padding:3px 7px;gap:5px;font-size:18px}.gameHud>.coin-pill{max-width:calc(100vw - 150px);font-size:17px}.title-with-back>.title-back{font-size:28px;line-height:1}}


/* v0.61: add breathing room below the HUD for tall full-screen phones and foldables. */
.topHud{height:76px;flex:0 0 76px;padding-top:max(10px,env(safe-area-inset-top));padding-bottom:10px;}
.gameHud{height:68px;flex:0 0 68px;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:9px;}
#home>.homeScroll>.wood-title{margin-top:7px;}
#home>.topHud+.homeScroll>.wood-title{margin-top:7px;}
#game>.objective-card{margin-top:7px;margin-bottom:8px;}
@media(max-height:720px){.topHud{height:70px;flex-basis:70px}.gameHud{height:62px;flex-basis:62px}}

/* v0.66: both volume sliders use the same full-width 0-100% geometry; compact Settings spacing slightly. */
#musicVolumeSlider,#sfxVolumeSlider{display:block;width:100%;max-width:100%;box-sizing:border-box;margin:12px 0 5px;accent-color:#69e77b;cursor:pointer;touch-action:pan-y}
#sfxVolumeSlider{accent-color:#69e77b}
.modal-card:has(#musicVolumeSlider){padding:10px}
.modal-card:has(#musicVolumeSlider) .darkness-setting{margin:9px 0 10px;padding:10px}
.modal-card:has(#musicVolumeSlider) .darkness-reset{margin-top:9px;min-height:35px;padding:7px 10px}
.modal-card:has(#musicVolumeSlider) .settings-actions{gap:8px;margin:12px 0}
.modal-card:has(#musicVolumeSlider) .settings-actions button{min-height:42px;padding:8px 10px}
.modal-card:has(#musicVolumeSlider) #closeSettings{padding:7px 11px}


/* v0.67: responsive layout hardening only — fixed-size animal tiles, compact settings gear, and centered gameplay field. */
#home>.topHud>.gear{
  width:42px!important;height:42px!important;flex:0 0 42px!important;
  min-width:42px!important;min-height:42px!important;max-width:42px!important;max-height:42px!important;
  padding:0!important;display:grid!important;place-items:center!important;
  font-size:22px!important;line-height:1!important;border-width:3px!important;border-radius:13px!important;
}
#home .animal-grid.home-animal-grid{
  width:min(94%,430px)!important;
  grid-template-columns:repeat(auto-fit,minmax(88px,1fr))!important;
  grid-auto-rows:98px!important;
  align-items:stretch!important;
  gap:6px!important;
}
#home .animal-grid.home-animal-grid .animal-shop{
  width:100%!important;min-width:0!important;height:98px!important;min-height:98px!important;max-height:98px!important;
  padding:3px!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;gap:0!important;
}
#home .animal-grid.home-animal-grid .animal-shop .ani{
  flex:0 0 59px!important;height:59px!important;min-height:59px!important;width:100%!important;padding:0!important;
}
#home .animal-grid.home-animal-grid .animal-shop .ani img{
  width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;
}
#home .animal-grid.home-animal-grid .animal-shop strong{
  flex:0 0 auto!important;display:block!important;width:100%!important;font-size:11px!important;line-height:14px!important;
  white-space:normal!important;overflow:visible!important;text-overflow:clip!important;text-align:center!important;
}
#home .animal-grid.home-animal-grid .animal-shop small{
  flex:0 0 auto!important;display:block!important;width:100%!important;font-size:10px!important;line-height:13px!important;
  white-space:nowrap!important;overflow:visible!important;text-align:center!important;
}
#game>.gameHud{flex:0 0 68px!important;min-height:68px!important;width:100%!important;}
#game>.objective-card{flex:0 0 auto!important;align-self:center!important;width:min(94%,520px)!important;max-width:520px!important;}
#game>.playfield-wrap{
  flex:1 1 0!important;min-height:0!important;min-width:0!important;
  width:min(94%,520px)!important;max-width:520px!important;align-self:center!important;
  margin:0 auto!important;position:relative!important;
}
#game>.gameBottom{flex:0 0 68px!important;min-height:68px!important;align-self:center!important;width:min(94%,520px)!important;max-width:520px!important;}
.modal-card:has(#musicVolumeSlider)>p{display:none!important}
#testGoldCode{display:block;width:100%;max-width:240px;margin:14px auto;padding:12px 14px;text-align:center;font-size:24px;letter-spacing:.35em;color:#fff;background:#4b2919;border:2px solid #d99b55;border-radius:10px;box-sizing:border-box}
@media(max-width:370px){
 #home .animal-grid.home-animal-grid{grid-template-columns:repeat(auto-fit,minmax(88px,1fr))!important;width:94%!important}
 #home .animal-grid.home-animal-grid .animal-shop strong{font-size:10px!important}
}
@media(max-height:620px){
 #game>.gameHud{flex-basis:58px!important;min-height:58px!important;height:58px!important}
 #game>.gameBottom{flex-basis:60px!important;min-height:60px!important;height:60px!important}
}

/* v0.69: keep the character portrait/actions fixed; scroll only the animal roster below its heading. */
#home{overflow:hidden}
#home>.hero-title,#home>.selected-animal-card{flex:0 0 auto}
#home>.animal-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none;padding:0 0 max(18px,env(safe-area-inset-bottom))}
#home>.animal-scroll::-webkit-scrollbar{display:none}
#home>.animal-scroll>.compact-section-title{position:sticky;top:0;z-index:15;margin:0 auto 4px;padding:4px 0;background:linear-gradient(180deg,#064438dd,#064438aa);text-align:center}
/* Center the back chevron optically, rather than relying on the font's baseline. */
.title-with-back>.title-back{font-family:Arial,sans-serif;font-weight:1000;line-height:1;display:grid;place-items:center;text-align:center;padding:0;transform:translateY(-1px);text-indent:0}
.gameHud>.game-settings{width:46px;height:48px;flex:0 0 46px;font-size:23px;padding:0}
@media(max-width:390px){.gameHud{gap:4px;padding-left:7px;padding-right:7px}.gameHud>.coin-pill{flex:1;min-width:0;width:auto}.gameHud>.lives{min-width:55px;width:auto;flex:0 0 61px}.gameHud>.pause{width:40px;flex:0 0 40px}.gameHud>.game-settings{width:40px;flex:0 0 40px}}
/* Avoid delayed tap/click synthesis on the primary actions in mobile WebViews. */
#heroUpgrade,#continueModes,#pauseBtn,#gameSettingsBtn,.title-back{touch-action:manipulation}
#testGoldCode::placeholder{color:transparent}

/* v0.691 experimental language selector: keep the existing settings footprint. */
.language-setting{margin:9px 0 10px;padding:9px 10px;background:#4f2a19;border:2px solid #c78c52;border-radius:12px;text-align:left;display:flex;align-items:center;gap:10px;justify-content:space-between}
.language-setting label{font-size:12px;font-weight:1000;flex:1;min-width:0}
.language-select{max-width:58%;min-width:145px;background:#70401f;color:#fff;border:2px solid #d99b55;border-radius:9px;padding:8px 10px;font-weight:900;font-size:14px}
.language-select option{background:#70401f;color:#fff}
html[lang="el"] .mode-card strong{font-size:clamp(13px,3.5vw,17px)}
html[lang="el"] .mode-card small{font-size:clamp(9px,2.5vw,11px)}
html[lang="el"] .hero-actions button,html[lang="el"] .animal-shop strong{font-size:clamp(9px,2.7vw,13px)}
html[lang="el"] .difficulty-panel,html[lang="el"] .baby-mode{letter-spacing:-.15px}
html[lang="el"] .modal-card h2{font-size:clamp(18px,5vw,22px)}
html[lang="el"] .modal-card button{letter-spacing:-.2px}
html[lang="el"] .darkness-label b{font-size:clamp(9px,2.5vw,11px)}
html[lang="el"] .settings-actions button{font-size:clamp(10px,2.8vw,13px)}

/* v0.72 localization fit: reduce only text that overflows its existing box; never resize UI objects. */
html[lang="el"] .language-select,
html[lang="de"] .language-select,
html[lang="uk"] .language-select { max-width:100%; }


/* v0.75: localization correction and exact HUD-matched action button heights. */
.home-header-actions{display:flex;align-items:center;gap:6px;margin-left:auto;flex:0 0 auto}
.home-header-actions .gear,.home-header-actions .exit-game-icon-btn{width:50px;height:50px;min-height:50px;max-height:50px;flex:0 0 50px;display:grid;place-items:center;padding:0;border-radius:15px}
.home-header-actions .exit-game-icon-btn{background:linear-gradient(#f35a50 0%,#d52d2d 55%,#a91f25 100%);border:3px solid #ffaaa0;box-shadow:0 4px 0 #76151b,inset 0 2px 2px #ffffff55;color:#fff;font-size:30px;font-weight:1000;line-height:1}
.home-header-actions .exit-game-icon-btn:active{filter:brightness(1.1);transform:translateY(1px)}
.gameHud>.pause,.gameHud>.game-settings{height:47px!important;min-height:47px!important;max-height:47px!important;align-self:center;flex:0 0 47px;width:47px;padding:0;display:grid;place-items:center}
.gameHud>.game-settings{order:2;margin-left:0!important}
.gameHud>.pause{order:3;margin-left:0!important}
@media(max-width:390px){.home-header-actions{gap:4px}.home-header-actions .gear,.home-header-actions .exit-game-icon-btn{width:46px;height:46px;min-height:46px;max-height:46px;flex-basis:46px}.gameHud>.pause,.gameHud>.game-settings{width:40px!important;height:46px!important;min-height:46px!important;max-height:46px!important;flex-basis:40px!important}}

/* v0.77: silent Goal-box triple-tap; retain visual pulse feedback. */
.gameBottom .goal-box{position:relative;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;cursor:pointer}
.gameBottom .goal-box.nova-tap-pulse{animation:novaGoalTap .18s ease-out}
@keyframes novaGoalTap{50%{filter:brightness(1.65);box-shadow:0 0 0 4px #ffe16a,0 4px 0 #54270f}}


/* v0.755: DOM-based Safari NOVA effect, designed for mobile WebViews. */
