:root{font-family:"Arial Rounded MT Bold","Trebuchet MS",Arial,sans-serif;color:#fff;--outline:#182444;--yellow:#ffd739;--orange:#ff6b19;--blue:#7184d8;--green:#62dd75}*{box-sizing:border-box;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#161f3c}button{font:inherit;cursor:pointer;color:inherit;border:0;touch-action:manipulation}button:active{transform:translateY(3px) scale(.98)}em{font-style:normal}.hidden{display:none!important}#game{position:fixed;inset:0;min-width:660px;min-height:370px;overflow:hidden}.meadow{position:absolute;inset:0;background:url('assets/v2/meadow.jpg') center/cover no-repeat;filter:saturate(1.08)}.meadow:after{content:"";position:absolute;inset:0;background:linear-gradient(#0001 0 15%,transparent 35% 80%,#0c371b44)}
.startup{position:fixed;z-index:1200;inset:0;display:grid;place-items:center;background:linear-gradient(160deg,#45b9ed,#3175c4 58%,#6950b8)}.startup.ready{display:none}.startup img{width:clamp(110px,20vw,220px);height:clamp(110px,20vw,220px);object-fit:contain;filter:drop-shadow(0 12px 12px #10235a66)}.startup-spinner{position:absolute;width:48px;height:48px;margin-top:clamp(150px,28vw,290px);border:6px solid #ffffff55;border-top-color:#ffe53b;border-radius:50%;animation:spin .75s linear infinite}
.hud{position:absolute;z-index:20;top:0;left:0;right:0;height:clamp(58px,11vh,92px);display:flex;align-items:center;gap:clamp(7px,1vw,16px);padding:clamp(5px,1vh,10px) max(10px,env(safe-area-inset-right)) 4px max(10px,env(safe-area-inset-left));pointer-events:none}.hud>*{pointer-events:auto}.yellow-btn{height:100%;min-width:clamp(155px,18vw,260px);display:flex;align-items:center;justify-content:center;gap:8px;padding:0 16px;border:4px solid #782d10;border-radius:15px;background:linear-gradient(#fff15a,#ffc20a);box-shadow:inset 0 -7px #e88c08,0 5px 0 #4d1d0d,0 8px 15px #0005;color:#fff;text-shadow:0 3px 0 #311b22,-2px 0 #311b22,2px 0 #311b22,0 -2px #311b22;font-size:clamp(14px,1.7vw,27px)}.yellow-btn span{font-size:1.2em}.yellow-btn em{position:absolute;margin:45px 0 0 150px;background:#74db5e;border:2px solid #2d792c;border-radius:12px;padding:2px 8px;font-size:10px;text-shadow:none}.wave-box{margin-left:auto;width:clamp(180px,24vw,360px);background:#374b7aca;border:3px solid #1b2950;border-radius:17px;padding:6px 13px;box-shadow:inset 0 2px #95adf2,0 4px 10px #0004}.wave-box>div:first-child{display:flex;align-items:center;justify-content:space-between;text-shadow:0 2px #17213b}.wave-box b{font-size:clamp(12px,1.45vw,22px)}.wave-box small{font-size:clamp(7px,.75vw,11px);color:#ddecff}.wave-track{position:relative;height:12px;margin-top:4px;background:#1f2948;border:2px solid #131c35;border-radius:12px}.wave-track i{display:block;height:100%;width:0;border-radius:10px;background:linear-gradient(90deg,#65ff99,#25d66f);box-shadow:0 0 8px #69ff9c}.boss-pin{position:absolute;right:-8px;top:-10px;font-size:21px;filter:drop-shadow(0 2px #000)}.money{height:65%;min-width:clamp(92px,10vw,145px);display:flex;align-items:center;justify-content:center;gap:7px;background:linear-gradient(#8e9de6,#6277cb);border:3px solid #27376f;border-radius:16px;box-shadow:inset 0 3px #b9c4ff,0 4px 0 #17244d;font-size:clamp(13px,1.7vw,26px);text-shadow:0 2px #25305e}.money .coin-icon{color:#ffca18}.money button{width:25px;height:25px;border-radius:50%;background:#51d66d;border:2px solid #226a33;line-height:16px}.money.gems{min-width:78px;color:#72efff}.round-btn{width:clamp(42px,4.7vw,64px);height:65%;border-radius:15px;background:linear-gradient(#7991c4,#4a638f);border:3px solid #263d66;box-shadow:inset 0 3px #a5b9de,0 4px #15263f;font-size:clamp(13px,1.5vw,23px);text-shadow:0 2px #203351}
#playfield{position:absolute;z-index:4;left:2%;right:clamp(155px,17vw,270px);top:12%;bottom:14%;overflow:hidden}.merge-layer,.battle-layer,.fx-layer{position:absolute;inset:0}.fx-layer{pointer-events:none}.capy{position:absolute;width:clamp(92px,12vw,190px);height:clamp(92px,12vw,190px);display:grid;place-items:end center;transform:translate(-50%,-50%);cursor:grab;touch-action:none;filter:drop-shadow(0 8px 2px #184d2666);transition:filter .2s,transform .18s}.capy:hover{filter:drop-shadow(0 8px 2px #184d2666) brightness(1.08)}.capy.dragging{z-index:30;transform:translate(-50%,-50%) scale(1.12);filter:drop-shadow(0 0 18px #fff)}.capy img{max-width:100%;max-height:100%;object-fit:contain;pointer-events:none}.capy .lvl{position:absolute;right:2%;bottom:4%;display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#6479d1;border:3px solid #fff;color:#fff;text-shadow:0 2px #283466;font-size:13px}.capy.ready-merge:after{content:"";position:absolute;inset:0;border-radius:50%;border:5px dashed #fff568;animation:spin 1.5s linear infinite}.merge-burst{position:absolute;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle,#fff 0,#ffe638 20%,#ff8b1c55 48%,transparent 70%);transform:translate(-50%,-50%);animation:burst .65s forwards}.tip{position:absolute;left:50%;top:2%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:7px 16px;border-radius:14px;background:#31466dbb;border:2px solid #91aeec;text-shadow:0 2px #1b2949;font-size:clamp(9px,1vw,15px);animation:float 2s infinite}.tip span{font-size:22px}.tip.hide{opacity:0;transition:.5s}.battle-unit,.enemy{position:absolute;transform:translate(-50%,-50%);width:clamp(85px,11vw,175px);height:clamp(85px,11vw,175px);display:grid;place-items:end center;filter:drop-shadow(0 7px 2px #16471f77)}.battle-unit img,.enemy img{max-width:100%;max-height:100%;object-fit:contain}.battle-unit{left:18%;animation:heroIdle 1.2s infinite alternate ease-in-out}.enemy{left:82%;animation:enemyWalk .55s infinite alternate ease-in-out}.hp{position:absolute;left:10%;right:10%;top:-4px;height:11px;border-radius:8px;background:#401a25;border:2px solid #fff;overflow:hidden;box-shadow:0 2px #0006}.hp i{display:block;height:100%;width:100%;background:linear-gradient(#6dff72,#2bc954);transition:.2s}.enemy .hp i{background:linear-gradient(#ff6767,#d72e39)}.damage-pop{position:absolute;color:#fff224;font-size:clamp(17px,2vw,30px);font-weight:900;text-shadow:0 3px #a93426,-2px 0 #a93426,2px 0 #a93426;animation:damage .65s forwards}.projectile{position:absolute;width:22px;height:22px;border-radius:50%;background:#fff34c;border:3px solid #ff8b1f;box-shadow:0 0 13px #fff02f;animation:shot .38s forwards}.battle-title{position:absolute;left:50%;top:5%;transform:translateX(-50%);font-size:clamp(24px,4vw,58px);color:#fff;text-shadow:0 5px #25315c,-3px 0 #25315c,3px 0 #25315c;animation:titleIn .5s}.boss-title{color:#ffda34;text-shadow:0 5px #9b2626,-3px 0 #9b2626,3px 0 #9b2626}
.shop{position:absolute;z-index:15;right:max(7px,env(safe-area-inset-right));top:14%;bottom:15%;width:clamp(145px,16vw,250px);display:flex;flex-direction:column;gap:clamp(5px,1vh,12px)}.shop-title{text-align:center;background:#536aa7e8;border:3px solid #263b73;border-radius:14px;padding:5px;text-shadow:0 2px #24345e;box-shadow:inset 0 3px #8da2d5}.shop-title b,.shop-title small{display:block}.shop-title b{font-size:clamp(11px,1.2vw,19px)}.shop-title small{font-size:clamp(6px,.6vw,9px);color:#dceaff}.shop-card{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;border:5px solid #fff;background:linear-gradient(#76ed88,#42c65d);border-radius:18px;box-shadow:0 0 0 4px #536ba7,0 7px 0 #203765,0 11px 18px #0005;overflow:hidden}.shop-card img{height:64%;max-width:85%;object-fit:contain;filter:drop-shadow(0 5px 1px #175e2e55)}.shop-card div{width:100%;background:#5368a8e8;padding:4px}.shop-card b,.shop-card small{display:block;font-size:clamp(8px,.8vw,13px);text-shadow:0 2px #273762}.shop-card small{color:#ffe34f}.level-tag,.video-tag{position:absolute;left:6px;top:6px;z-index:2;background:#ffe530;border:3px solid #823d16;border-radius:50%;width:30px;height:30px;display:grid;place-items:center;color:#3c2530}.video-tag{background:#ff5fa1;color:#fff}.ad-card{background:linear-gradient(#6be8e8,#28b9c5)}.chest-card{display:flex;align-items:center;justify-content:center;gap:8px;padding:7px;background:linear-gradient(#ffdf57,#f7a919);border:3px solid #943f13;border-radius:14px;box-shadow:inset 0 -5px #e67b12,0 5px #57230b;text-shadow:0 2px #754016}.chest-card>span{font-size:28px}.chest-card b,.chest-card small{display:block;font-size:clamp(8px,.8vw,13px)}
.bottom-hud{position:absolute;z-index:20;left:max(1.5%,env(safe-area-inset-left));right:max(1.5%,env(safe-area-inset-right));bottom:max(1.2%,env(safe-area-inset-bottom));height:clamp(58px,10vh,88px);display:flex;align-items:end;gap:clamp(6px,1vw,15px)}.sound-row{display:flex;gap:5px}.sound-row button,.mini-action{width:clamp(48px,5vw,72px);height:clamp(48px,5vw,72px);border-radius:15px;background:linear-gradient(#7793d6,#526db4);border:3px solid #233c78;box-shadow:inset 0 3px #a5b9ef,0 5px #172b59;font-size:clamp(18px,2vw,29px)}.ad-meter{align-self:center;width:clamp(145px,20vw,300px);padding:6px 10px;border-radius:13px;background:#344a72c9;border:2px solid #89a7d8;text-shadow:0 2px #233653}.ad-meter>span{float:left;margin-right:7px}.ad-meter div{height:11px;background:#222d4d;border:2px solid #15203b;border-radius:8px;overflow:hidden}.ad-meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,#74f98d,#ffee4a,#ff7c3d)}.ad-meter small{display:block;text-align:center;font-size:clamp(7px,.68vw,10px)}.mini-action{position:relative;width:clamp(78px,8vw,120px);display:flex;align-items:center;justify-content:center;gap:5px;font-size:clamp(8px,.85vw,13px);text-shadow:0 2px #263a6a}.mini-action span{font-size:18px}.mini-action em{position:absolute;right:-3px;top:-3px;width:13px;height:13px;border-radius:50%;background:#f04444;border:2px solid #fff}.fight-btn{margin-left:auto;width:clamp(210px,25vw,390px);height:100%;display:grid;grid-template-columns:auto auto;grid-template-rows:1fr auto;align-items:center;justify-content:center;column-gap:10px;padding:4px 20px;border:5px solid #7d210d;border-radius:19px;background:linear-gradient(#ff8b2e,#ff3d12);box-shadow:inset 0 -9px #dc230d,inset 0 3px #ffc35a,0 7px #4c160a,0 11px 16px #0005;text-shadow:0 4px #6f1b12,-2px 0 #6f1b12,2px 0 #6f1b12}.fight-btn>span{grid-row:1/3;font-size:clamp(28px,4vw,52px)}.fight-btn>b{font-size:clamp(20px,2.7vw,40px);line-height:1}.fight-btn small{font-size:clamp(7px,.8vw,12px);color:#fff383}.fight-btn:disabled{filter:grayscale(.8)}
.overlay,.ad-overlay{position:absolute;z-index:100;inset:0;display:grid;place-items:center;background:#10213dcc;backdrop-filter:blur(5px);padding:20px}.modal{position:relative;width:min(850px,87vw);max-height:84vh;overflow:auto;padding:25px;background:linear-gradient(#fff8c9,#f2c96d);border:6px solid #873812;border-radius:25px;box-shadow:inset 0 0 0 4px #fff5a5,0 10px #431b0b,0 18px 45px #0008;color:#34243b}.modal>button{position:sticky;float:right;top:0;width:42px;height:42px;border-radius:50%;background:#f34a32;border:4px solid #8d2119;color:#fff;font-size:25px;z-index:2}.modal h2{text-align:center;margin:0 45px 18px;color:#fff;text-shadow:0 4px #503046,-2px 0 #503046,2px 0 #503046;font-size:clamp(22px,3vw,42px)}.collection-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.collect-card{position:relative;text-align:center;border:4px solid #5067a7;border-radius:17px;background:linear-gradient(#71ed87,#45c95f);padding:6px;overflow:hidden}.collect-card.locked{filter:grayscale(1);opacity:.6}.collect-card img{width:100%;height:clamp(95px,17vh,190px);object-fit:contain}.collect-card b{display:block;background:#5d70b1;color:#fff;margin:-2px -6px -6px;padding:5px;text-shadow:0 2px #293866}.task-list{display:grid;gap:10px}.task{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;background:#fff5c5;border:3px solid #bb7a31;border-radius:14px;padding:10px}.task small{display:block}.task button,.claim-btn{padding:9px 20px;border-radius:12px;background:linear-gradient(#6fea7b,#39b956);border:3px solid #237238;color:#fff;text-shadow:0 2px #275b31}.task button:disabled{filter:grayscale(1)}.bar{height:12px;background:#68482f;border-radius:8px;overflow:hidden}.bar i{display:block;height:100%;background:#68dd65}.claim-btn{display:block;margin:18px auto 0}.daily-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}.day{padding:10px 4px;border-radius:12px;border:3px solid #bf7830;background:#fff4ba;text-align:center}.day.current{background:#ffe247;transform:scale(1.06)}.day span,.day b{display:block}.ad-card-big{text-align:center}.ad-card-big small,.ad-card-big span{display:block;font-size:clamp(14px,2vw,28px);text-shadow:0 3px #283963}.ad-card-big b{display:block;font-size:clamp(100px,20vw,280px);line-height:.95;color:#ffdf31;text-shadow:0 10px #a63c17,-6px 0 #a63c17,6px 0 #a63c17;animation:countPulse 1s infinite}.toast{position:absolute;z-index:150;left:50%;bottom:18%;transform:translate(-50%,30px);padding:10px 20px;border-radius:14px;background:#3a4f7ce8;border:3px solid #a9c0f4;text-shadow:0 2px #24355f;opacity:0;transition:.25s;pointer-events:none}.toast.show{opacity:1;transform:translate(-50%,0)}
@keyframes float{50%{transform:translate(-50%,7px)}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes burst{to{transform:translate(-50%,-50%) scale(2);opacity:0}}@keyframes heroIdle{to{transform:translate(-50%,-53%) rotate(-2deg)}}@keyframes enemyWalk{to{transform:translate(-53%,-52%) rotate(2deg)}}@keyframes damage{to{transform:translateY(-70px) scale(1.3);opacity:0}}@keyframes shot{to{left:72%;top:50%}}@keyframes titleIn{from{transform:translate(-50%,-80px) scale(1.6);opacity:0}}@keyframes countPulse{50%{transform:scale(1.12)}}
@media(max-height:520px){.hud{height:55px}.yellow-btn{min-width:145px;border-width:3px}.yellow-btn em{display:none}.shop{top:13%;bottom:16%;gap:4px}.shop-title small{display:none}.shop-card{border-width:3px}.bottom-hud{height:54px}.sound-row button,.mini-action{height:45px}.capy{width:110px;height:110px}.tip{top:0;padding:4px 10px}.shop-card div{padding:2px}.chest-card{padding:3px}.collection-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:900px){.hud{gap:5px}.yellow-btn{min-width:145px;padding:0 7px}.money{min-width:75px}.shop{width:140px}.shop-title small{display:none}#playfield{right:148px}.ad-meter{width:130px}.mini-action{width:65px}.fight-btn{width:190px}.capy{width:105px;height:105px}}
#rotate{display:none}@media(orientation:portrait) and (max-width:700px){#rotate{position:fixed;z-index:999;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(#45b9ed,#3175c4);color:#fff;text-shadow:0 3px #263c73}#rotate div{font-size:90px;animation:spin 2s infinite}#rotate b{font-size:24px}#rotate span{margin-top:6px}}

/* V3 interface: world journey, illustrated currencies and guided onboarding */
.world-btn{height:67%;display:flex;align-items:center;gap:4px;padding:3px 9px;background:linear-gradient(#9f75db,#6848ac);border:3px solid #39246f;border-radius:15px;box-shadow:inset 0 3px #c5a9f3,0 4px #24164f;text-shadow:0 2px #39246f}.world-btn img{width:34px;height:34px;object-fit:contain}.world-btn small,.world-btn b{display:block;white-space:nowrap}.world-btn small{font-size:7px;color:#f4dcff}.world-btn b{font-size:clamp(8px,.9vw,14px)}.wave-box{width:clamp(155px,19vw,285px)}.money{min-width:clamp(82px,8.5vw,125px);gap:4px}.money>img{width:clamp(27px,3vw,42px);height:clamp(27px,3vw,42px);object-fit:contain;filter:drop-shadow(0 2px #293866)}.money.gems{min-width:70px;color:#fff}.inline-coin{display:inline-block!important;width:19px!important;height:19px!important;vertical-align:middle;filter:none!important}.chest-card>span{display:none}.chest-card>img{width:42px;height:42px;object-fit:contain}.journey{align-self:center;width:clamp(165px,22vw,320px);height:55px;display:grid;grid-template-columns:43px auto 1fr;align-items:center;gap:6px;padding:5px 9px;border-radius:15px;background:linear-gradient(90deg,#644cb0e8,#8268c9e8);border:3px solid #34216f;box-shadow:inset 0 3px #ae9aef,0 4px #24164f;text-shadow:0 2px #332166}.journey img{width:42px;height:42px;object-fit:contain}.journey small,.journey b{display:block}.journey small{font-size:7px;color:#eaddff}.journey b{font-size:14px}.journey-dots{display:flex;gap:3px;justify-content:flex-end}.journey-dots i{width:8px;height:8px;border-radius:50%;background:#37245f;border:1px solid #baa7f0}.journey-dots i.done{background:#ffe13b;box-shadow:0 0 5px #fff04d}.mini-action>img{width:29px;height:29px;object-fit:contain}.world-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.world-card{position:relative;padding:9px;text-align:center;background:linear-gradient(#8a75d2,#58439e);border:4px solid #37266d;border-radius:16px;color:#fff}.world-card.current{outline:5px solid #ffe33f;transform:scale(1.03)}.world-card.locked{filter:grayscale(1);opacity:.55}.world-card img{width:70px;height:70px;object-fit:contain}.world-card b,.world-card small{display:block}.world-card small{font-size:9px}.collection-tabs{display:flex;gap:5px;overflow:auto;margin-bottom:10px}.collection-tabs button{min-width:55px;padding:6px;background:#6650aa;border:2px solid #39276f;border-radius:10px}.collection-tabs button.on{background:#ffd937;color:#44292f}.tutorial{position:absolute;z-index:180;inset:0;background:#071329b0;pointer-events:auto}.tutorial-spot{position:absolute;border:6px solid #ffe53b;border-radius:22px;box-shadow:0 0 0 9999px #061226bb,0 0 28px #fff03b;transition:.35s;pointer-events:none}.tutorial-card{position:absolute;left:50%;bottom:4%;transform:translateX(-50%);width:min(610px,82vw);display:grid;grid-template-columns:125px 1fr;align-items:center;padding:13px 18px;background:linear-gradient(#fff7bd,#f0bb50);border:5px solid #873913;border-radius:23px;box-shadow:inset 0 0 0 3px #fff399,0 8px #4c1d09;color:#3b2940}.tutorial-card>img{width:120px;height:120px;object-fit:contain}.tutorial-card small,.tutorial-card b{display:block}.tutorial-card small{color:#9c5e23}.tutorial-card b{font-size:clamp(17px,2vw,28px)}.tutorial-card p{margin:5px 0 9px;font-size:clamp(11px,1.1vw,16px)}.tutorial-card button{padding:8px 22px;border-radius:12px;background:linear-gradient(#67e879,#38b852);border:3px solid #237437;color:#fff;text-shadow:0 2px #245f31}.milestone-row{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.milestone{padding:10px;text-align:center;border:3px solid #6a52a8;border-radius:13px;background:#fff1bd}.milestone.done{background:#d9ffb5}.milestone img{height:45px;max-width:55px;object-fit:contain}.milestone b,.milestone small{display:block}.world-unlock{animation:titleIn .5s}.world-unlock img{display:block;margin:auto;max-height:210px;max-width:260px}
@media(max-width:1050px){.world-btn{padding:2px 5px}.world-btn img{width:28px;height:28px}.world-btn small{display:none}.yellow-btn{min-width:145px}.wave-box{width:145px}.journey{width:155px;grid-template-columns:38px auto 1fr}.journey img{width:36px;height:36px}.journey-dots i{width:6px;height:6px}.world-grid{grid-template-columns:repeat(5,1fr)}}

/* V4: single 80-hero campaign and compact landscape layout */
#game{min-width:0;min-height:0}.hud{gap:clamp(4px,.7vw,12px)}.yellow-btn{min-width:clamp(132px,18vw,260px)}.wave-box{margin-left:auto}.collection-progress{height:10px;border:2px solid #30205d;border-radius:8px;background:#30205d;overflow:hidden}.collection-progress i{display:block;height:100%;background:linear-gradient(90deg,#ffe43d,#ff9f27);width:1.25%}.journey{grid-template-columns:42px 58px 1fr}.journey>img{object-fit:contain}.modal.collection-modal{width:min(1120px,94vw);height:min(720px,90vh);overflow:hidden;display:flex;flex-direction:column}.collection-modal #modalBody{min-height:0;overflow:hidden;display:flex;flex-direction:column}.collection-modal h2{flex:none}.collection-modal .collection-grid{min-height:0;overflow:auto;grid-template-columns:repeat(8,minmax(72px,1fr));gap:7px;padding:3px 5px 10px}.collection-modal .collect-card{border-width:3px;border-radius:12px;padding:3px;min-width:0}.collection-modal .collect-card img{display:block;width:100%;height:clamp(62px,11vh,105px);object-fit:contain;object-position:center}.collection-modal .collect-card b{font-size:clamp(8px,.75vw,12px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:4px 2px;margin:0 -3px -3px}.confirm-reward{text-align:center}.confirm-reward>img{width:clamp(75px,11vw,135px);height:clamp(75px,11vw,135px);object-fit:contain}.confirm-reward .reward-value{font-size:clamp(24px,4vw,48px);display:flex;justify-content:center;align-items:center;gap:8px}.confirm-reward .reward-value img{width:44px;height:44px;object-fit:contain}.confirm-actions{display:flex;justify-content:center;gap:12px;margin-top:15px}.confirm-actions button{padding:10px 22px;border:3px solid #713016;border-radius:13px;background:linear-gradient(#ffdf52,#f69f20);color:#fff;text-shadow:0 2px #6c3519}.confirm-actions .cancel{background:linear-gradient(#8fa1ca,#61739f);border-color:#384b77}
@media(max-width:1100px){.hud{height:clamp(52px,11vh,70px)}.yellow-btn{min-width:125px;padding:0 8px}.yellow-btn>span{display:none}.wave-box{width:clamp(135px,23vw,230px);padding:4px 8px}.money{min-width:72px}.money>img{width:27px;height:27px}.money.gems{min-width:62px}.shop{width:clamp(125px,16vw,175px)}#playfield{right:clamp(132px,17vw,182px)}.bottom-hud{gap:5px}.journey{width:clamp(135px,21vw,200px);grid-template-columns:34px 45px 1fr;padding:3px 6px}.journey img{width:32px;height:32px}.mini-action{width:clamp(58px,8vw,82px)}.fight-btn{width:clamp(175px,24vw,270px);padding:3px 10px}.fight-btn>b{font-size:clamp(17px,2.5vw,29px)}.collection-modal .collection-grid{grid-template-columns:repeat(8,minmax(62px,1fr))}}
@media(max-height:500px){.hud{height:50px;padding-top:3px}.yellow-btn{border-width:3px}.wave-box{padding:3px 7px}.money,.round-btn{height:78%}.shop{top:12%;bottom:16%;gap:4px}.shop-title{padding:2px}.shop-card{border-width:3px}.shop-card img{height:58%}.chest-card{min-height:42px}.bottom-hud{height:48px;bottom:5px}.sound-row button,.mini-action{height:43px}.journey{height:45px}.fight-btn{border-width:3px}.capy,.battle-unit,.enemy{width:clamp(72px,15vh,105px);height:clamp(72px,15vh,105px)}.battle-title{top:2%}.modal{max-height:92vh;padding:13px;border-width:4px}.modal h2{font-size:clamp(17px,5vh,27px);margin-bottom:7px}.modal>button{width:34px;height:34px;font-size:19px}.collection-modal .collection-grid{grid-template-columns:repeat(10,minmax(54px,1fr));gap:5px}.collection-modal .collect-card img{height:clamp(48px,12vh,72px)}.tutorial-card{bottom:2%;grid-template-columns:72px 1fr;padding:7px 12px}.tutorial-card>img{width:68px;height:68px}.tutorial-card p{margin:2px 0 5px}.tutorial-card button{padding:5px 15px}}
@media(max-width:760px){.yellow-btn{min-width:104px;font-size:12px}.yellow-btn em{display:none}.wave-box{width:125px}.wave-box small{display:none}.money{min-width:64px}.money.gems{min-width:52px}.money button{width:22px;height:22px}.round-btn{width:38px}.shop{width:118px;right:4px}#playfield{right:123px}.shop-title small,.shop-card b{display:none}.shop-card img{height:75%}.bottom-hud{left:5px;right:5px}.sound-row button{width:39px}.journey{width:120px;grid-template-columns:30px 36px 1fr}.journey small{display:none}.mini-action{width:51px}.mini-action b{display:none}.fight-btn{width:155px}.fight-btn>span{font-size:25px}.fight-btn>b{font-size:17px}.collection-modal .collection-grid{grid-template-columns:repeat(8,minmax(48px,1fr))}}

/* V4.1: full-size collection cards with internal scrolling */
.collection-modal>button{position:absolute;right:18px;top:18px;float:none}.collection-modal h2{padding:0 55px}
.collection-modal .collection-grid{min-height:0;overflow-x:hidden;overflow-y:auto;grid-template-columns:repeat(8,minmax(88px,1fr));grid-auto-rows:142px;align-content:start;gap:8px;padding:3px 7px 14px;scrollbar-gutter:stable}.collection-modal .collect-card{border-width:3px;border-radius:12px;padding:3px;min-width:0;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto}.collection-modal .collect-card img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;object-position:center;padding:3px}.collection-modal .collect-card b{font-size:clamp(8px,.75vw,12px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:5px 2px;margin:0 -3px -3px}
@media(max-width:1100px){.collection-modal .collection-grid{grid-template-columns:repeat(7,minmax(76px,1fr));grid-auto-rows:120px}}
@media(max-height:500px){.collection-modal .collection-grid{grid-template-columns:repeat(8,minmax(58px,1fr));grid-auto-rows:88px;gap:5px}.collection-modal .collect-card img{height:100%}}
@media(max-width:760px){.collection-modal .collection-grid{grid-template-columns:repeat(6,minmax(62px,1fr));grid-auto-rows:96px}}

/* V4.2: fully visible battle sprites, live chest timer and illustrated task rewards */
.battle-unit,.enemy{width:clamp(72px,min(10.5vw,22vh),165px);height:clamp(72px,min(10.5vw,22vh),165px);place-items:center}.battle-unit img,.enemy img{display:block;width:100%;height:100%;object-fit:contain;object-position:center}.boss-enemy{width:clamp(135px,min(19vw,42vh),280px);height:clamp(135px,min(19vw,42vh),280px)}
.chest-card>div{min-width:0;flex:1}.chest-progress{display:block;width:100%;height:6px;margin-top:3px;border:1px solid #6f3417;border-radius:5px;background:#7a3b1d88;overflow:hidden}.chest-progress i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#69f47a,#fff04c);transition:width .3s linear}.chest-card.ready{filter:brightness(1.1)}.chest-card.ready>img{animation:chestReady 1.1s ease-in-out infinite alternate}
.task button{min-width:92px;display:inline-flex;align-items:center;justify-content:center;gap:5px}.task-coin{width:28px;height:28px;object-fit:contain;filter:drop-shadow(0 2px #7a4917)}.task button span{font-weight:900}.task-claimed{font-size:24px}
@keyframes chestReady{to{transform:translateY(-2px) scale(1.07)}}
@media(max-height:500px){.battle-unit,.enemy{width:clamp(64px,min(13vw,20vh),94px);height:clamp(64px,min(13vw,20vh),94px)}.boss-enemy{width:clamp(120px,min(20vw,40vh),185px);height:clamp(120px,min(20vw,40vh),185px)}.task-coin{width:23px;height:23px}}

/* RuStore commercial progression */
.meadow{transition:background-image .55s ease;filter:saturate(1.05)}
.money.gems{position:relative;appearance:none;padding:0 9px}.upgrade-mark{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#45d76a;border:2px solid #1f7738;color:#fff;font-size:15px;line-height:1;text-shadow:none;box-shadow:0 2px #184e2a}.biome-name{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:2px 6px;border-radius:8px;background:#162649a8;color:#fff4a3!important}.reward-action{display:block;margin:8px auto;padding:10px 18px;border-radius:13px;border:3px solid #7c3b12;background:linear-gradient(#ffe34e,#f29b1d);color:#fff;text-shadow:0 2px #6c3519;box-shadow:0 4px #713112}.reward-action:disabled{filter:grayscale(.4);opacity:.8}.upgrade-row .bar i{background:linear-gradient(90deg,#61ddff,#9b5fff)}body[data-biome="1"] .wave-track i{background:linear-gradient(90deg,#43ead7,#55a8ff)}body[data-biome="2"] .wave-track i{background:linear-gradient(90deg,#ffce43,#ff563d)}
@media(max-width:900px){.biome-name{max-width:78px;font-size:7px!important}.upgrade-mark{width:18px;height:18px;font-size:12px}}
@media(max-width:760px){.biome-name{display:none}.upgrade-mark{display:none}.money.gems{padding:0 4px}}
/* V8.1: polished phone-first landscape layout */
:root{--app-width:100vw;--app-height:100dvh;--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
html,body{width:100%;height:var(--app-height);overscroll-behavior:none}#game{width:100%;height:var(--app-height);inset:0 auto auto 0}.overlay,.ad-overlay,.tutorial,#rotate{height:var(--app-height)}button{white-space:nowrap}.modal{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.capy,.shop-card,.chest-card,.fight-btn,.mini-action,.yellow-btn,.round-btn,.money.gems{will-change:transform}.money b,.journey b,.shop-card em{font-variant-numeric:tabular-nums}
@media(pointer:coarse){button{touch-action:manipulation}.shop-card,.chest-card,.fight-btn,.mini-action,.yellow-btn,.round-btn,.money.gems,.money button{min-height:44px}.capy:hover{filter:drop-shadow(0 8px 2px #184d2666)}.capy:active{filter:drop-shadow(0 0 15px #fff) brightness(1.08)}}
body.mobile-landscape .hud{left:var(--safe-left);right:var(--safe-right);height:54px;padding:4px 7px 3px;gap:5px}
body.mobile-landscape .yellow-btn{min-width:126px;padding:0 8px;border-width:3px;border-radius:13px;font-size:13px}
body.mobile-landscape .yellow-btn em{margin:34px 0 0 100px}
body.mobile-landscape .wave-box{width:clamp(126px,21vw,190px);padding:3px 7px;border-radius:13px}
body.mobile-landscape .money{height:46px;min-width:70px;border-radius:13px;font-size:15px}
body.mobile-landscape .money>img{width:28px;height:28px}
body.mobile-landscape .money.gems{min-width:62px}
body.mobile-landscape .round-btn{width:44px;height:46px;border-radius:13px}
body.mobile-landscape #playfield{left:max(7px,var(--safe-left));right:max(134px,calc(var(--safe-right) + 128px));top:58px;bottom:58px}
body.mobile-landscape .shop{right:max(6px,var(--safe-right));top:60px;bottom:60px;width:122px;gap:5px}
body.mobile-landscape .shop-card{border-width:3px;border-radius:14px;box-shadow:0 0 0 2px #536ba7,0 4px 0 #203765,0 7px 12px #0004}
body.mobile-landscape .shop-card img{height:69%}
body.mobile-landscape .chest-card{min-height:46px;padding:4px;border-radius:12px}
body.mobile-landscape .bottom-hud{left:max(6px,var(--safe-left));right:max(6px,var(--safe-right));bottom:max(5px,var(--safe-bottom));height:49px;gap:5px}
body.mobile-landscape .sound-row button,body.mobile-landscape .mini-action{height:44px;border-radius:12px}
body.mobile-landscape .sound-row button{width:44px}
body.mobile-landscape .journey{width:clamp(112px,20vw,175px);height:46px;grid-template-columns:34px 42px 1fr;padding:3px 6px}
body.mobile-landscape .journey img{width:34px;height:34px}
body.mobile-landscape .mini-action{width:clamp(48px,7vw,68px)}
body.mobile-landscape .fight-btn{width:clamp(150px,23vw,225px);border-width:3px;border-radius:15px;padding:2px 8px}
body.mobile-landscape .fight-btn>span{font-size:27px}
body.mobile-landscape .fight-btn>b{font-size:18px}
body.mobile-landscape .capy{width:clamp(72px,min(13vw,20vh),110px);height:clamp(72px,min(13vw,20vh),110px)}
body.mobile-landscape .modal{width:min(92vw,760px);max-height:calc(var(--app-height) - 16px);padding:14px;border-width:4px}
body.mobile-landscape .modal>button{min-width:44px;min-height:44px;position:sticky;top:0}
body.mobile-landscape .confirm-actions button,body.mobile-landscape .claim-btn,body.mobile-landscape .reward-action{min-height:44px}
body.compact-landscape .hud{height:47px;padding:2px 5px;gap:4px}
body.compact-landscape .yellow-btn{min-width:102px;font-size:11px;padding:0 5px}
body.compact-landscape .yellow-btn>span{display:none}
body.compact-landscape .yellow-btn em{display:none}
body.compact-landscape .wave-box{width:118px;padding:2px 5px}
body.compact-landscape .wave-box small{display:none}
body.compact-landscape .wave-track{height:9px}
body.compact-landscape .money{height:44px;min-width:61px;gap:2px;font-size:13px;border-width:2px}
body.compact-landscape .money>img{width:24px;height:24px}
body.compact-landscape .money button{width:22px;height:22px;padding:0}
body.compact-landscape .money.gems{min-width:50px;padding:0 3px}
body.compact-landscape .upgrade-mark,.compact-landscape .biome-name{display:none}
body.compact-landscape .round-btn{width:42px;height:44px;border-width:2px}
body.compact-landscape #playfield{left:max(5px,var(--safe-left));right:max(116px,calc(var(--safe-right) + 110px));top:50px;bottom:53px}
body.compact-landscape .shop{right:max(4px,var(--safe-right));top:51px;bottom:55px;width:106px;gap:3px}
body.compact-landscape .shop-title{padding:2px;border-width:2px}
body.compact-landscape .shop-title small{display:none}
body.compact-landscape .shop-card{border-width:2px}
body.compact-landscape .shop-card b{display:none}
body.compact-landscape .shop-card img{height:76%}
body.compact-landscape .level-tag,body.compact-landscape .video-tag{left:3px;top:3px;width:24px;height:24px;border-width:2px;font-size:10px}
body.compact-landscape .chest-card{min-height:43px;gap:3px;padding:2px;border-width:2px}
body.compact-landscape .chest-card>img{width:34px;height:34px}
body.compact-landscape .bottom-hud{left:max(4px,var(--safe-left));right:max(4px,var(--safe-right));bottom:max(4px,var(--safe-bottom));height:45px;gap:4px}
body.compact-landscape .sound-row{gap:3px}
body.compact-landscape .sound-row button{width:42px;height:42px;border-width:2px}
body.compact-landscape .journey{width:104px;height:43px;grid-template-columns:30px 34px 1fr;padding:2px 4px;border-width:2px}
body.compact-landscape .journey img{width:29px;height:29px}
body.compact-landscape .journey small{display:none}
body.compact-landscape .journey b{font-size:11px}
body.compact-landscape .collection-progress{height:8px}
body.compact-landscape .mini-action{width:45px;height:42px;border-width:2px}
body.compact-landscape .mini-action b{display:none}
body.compact-landscape .mini-action>img{width:25px;height:25px}
body.compact-landscape .fight-btn{width:142px;height:45px;padding:1px 6px}
body.compact-landscape .fight-btn>span{font-size:24px}
body.compact-landscape .fight-btn>b{font-size:16px}
body.compact-landscape .fight-btn small{font-size:7px}
body.compact-landscape .tip{max-width:72%;padding:3px 8px;font-size:9px}
body.compact-landscape .tip span{font-size:16px}
body.compact-landscape .capy{width:clamp(66px,min(14vw,20vh),88px);height:clamp(66px,min(14vw,20vh),88px)}
body.compact-landscape .capy .lvl{width:24px;height:24px;border-width:2px;font-size:10px}
body.compact-landscape .modal{width:94vw;max-height:calc(var(--app-height) - 10px);padding:10px;border-radius:17px}
body.compact-landscape .modal h2{margin:0 40px 7px;font-size:clamp(17px,5vh,25px)}
body.compact-landscape .task-list{gap:5px}
body.compact-landscape .task{padding:6px;border-width:2px}
body.compact-landscape .daily-grid{gap:4px}
body.compact-landscape .day{padding:5px 2px;border-width:2px}
body.compact-landscape .day img{height:30px!important}
body.compact-landscape .collection-modal .collection-grid{grid-template-columns:repeat(8,minmax(54px,1fr));grid-auto-rows:82px}
body.compact-landscape .tutorial-card{bottom:max(4px,var(--safe-bottom));width:min(94vw,560px);grid-template-columns:72px 1fr;padding:7px 10px;border-width:3px}
body.compact-landscape .tutorial-card>img{width:68px;height:68px}
body.compact-landscape .tutorial-card p{margin:2px 0 4px;font-size:10px}
body.compact-landscape .tutorial-card button{min-height:42px;padding:4px 12px}
body.short-landscape .hud{height:44px}
body.short-landscape #playfield{top:46px;bottom:50px}
body.short-landscape .shop{top:47px;bottom:51px}
body.short-landscape .shop-title{display:none}
body.short-landscape .bottom-hud{height:43px}
body.short-landscape .capy{width:clamp(58px,min(13vw,19vh),76px);height:clamp(58px,min(13vw,19vh),76px)}
body.short-landscape .battle-unit,body.short-landscape .enemy{width:clamp(58px,min(12vw,18vh),72px);height:clamp(58px,min(12vw,18vh),72px)}
body.short-landscape .boss-enemy{width:clamp(105px,min(18vw,36vh),150px);height:clamp(105px,min(18vw,36vh),150px)}
@media(max-width:600px) and (orientation:landscape){body.compact-landscape .yellow-btn{min-width:88px}body.compact-landscape .yellow-btn b{display:none}body.compact-landscape .wave-box{width:104px}body.compact-landscape .money{min-width:56px}body.compact-landscape .money.gems{min-width:46px}body.compact-landscape .shop{width:100px}body.compact-landscape #playfield{right:max(108px,calc(var(--safe-right) + 102px))}body.compact-landscape .sound-row button{width:40px}body.compact-landscape .journey{width:88px;grid-template-columns:28px 28px 1fr}body.compact-landscape .mini-action{width:42px}body.compact-landscape .fight-btn{width:128px}.compact-landscape .collection-modal .collection-grid{grid-template-columns:repeat(6,minmax(48px,1fr))}}
@media(orientation:portrait){#rotate{position:fixed;z-index:999;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(160deg,#45b9ed,#3175c4 58%,#6950b8);color:#fff;text-align:center;padding:28px;text-shadow:0 3px #263c73}#rotate div{font-size:clamp(72px,18vw,130px);animation:spin 2s infinite}#rotate b{font-size:clamp(22px,5vw,38px)}#rotate span{margin-top:8px;font-size:clamp(13px,3vw,20px)}}
