/* The desktop controls retain their normal positions through display:contents. */
.mission-entry{position:relative;display:flex;align-items:center;gap:6px;white-space:nowrap;min-height:44px!important}
.mission-entry>.ico{width:25px;height:25px}
.mission-dot{position:absolute;right:-7px;top:-3px;min-width:24px;height:24px;padding:0 5px;display:flex;align-items:center;justify-content:center;background:#6fbd35;color:#fff9d5;font:900 13px system-ui,sans-serif;border:2px solid #fff2cc;border-radius:50%;box-shadow:0 2px 0 #75451d;pointer-events:none}
.mission-entry.mission-ready{padding-right:22px;animation:missionRewardBounce 2.4s ease-in-out infinite;filter:drop-shadow(0 0 7px #ffcf39) drop-shadow(0 3px 2px #9b5d2966)}
.mission-entry.mission-ready:hover,body:has(#modal.on) .mission-entry.mission-ready{animation-play-state:paused}
.mission-tab-badge{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:21px;padding:0 5px;margin-left:6px;background:#70ba39;border:2px solid #fff0c9;border-radius:50%;font:900 12px system-ui,sans-serif;color:#fff8d5;box-shadow:0 2px 0 #75451d55}
@keyframes missionRewardBounce{0%,62%,100%{transform:translateY(0) scale(1)}72%{transform:translateY(-4px) scale(1.04)}80%{transform:translateY(0) scale(1)}87%{transform:translateY(-2px) scale(1.02)}94%{transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){.mission-entry.mission-ready{padding-right:22px;animation:none}}
.box.missions-box{max-width:740px;color:#623a20}
.missions-box .tabs{margin:8px 0;gap:8px}
.missions-box .tabs button{min-height:44px}
.missions-info{font-size:15px;line-height:1.35;margin:8px 0!important}
#missionTimer{font-size:13px;color:#8a5d36;margin:5px 0 12px}
.mission-list{display:flex;flex-direction:column;gap:10px;margin:10px 0}
.mission-card{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;background:#f5dfb6;border:2px solid #d5aa70;border-radius:14px;box-shadow:0 3px 0 #b67b3633;text-align:left}
.mission-card.complete{background:#ecedbd;border-color:#8bbf52}
.mission-icon .ico{width:42px;height:42px;object-fit:contain}
.mission-copy b{font-size:16px;line-height:1.25;display:block}
.mission-copy small{font-size:13px;font-weight:800;color:#8a5d36}
.mission-progress{height:10px;overflow:hidden;background:#c8a475;border:1px solid #a87a43;border-radius:8px;margin:7px 0 2px}
.mission-progress i{display:block;height:100%;background:linear-gradient(#b4ee69,#70bb37);border-radius:8px}
.mission-card .btn{min-width:120px;font-size:15px!important;display:flex;align-items:center;justify-content:center;gap:4px;margin:0}
.mission-card .btn .ico{width:21px;height:21px}
.upgrade-result{font-size:19px;font-weight:900;color:#37851f;background:#edf5c2;border:2px solid #a2c95e;border-radius:10px;padding:7px 12px;text-align:center}
body.compact-ui .mission-card{grid-template-columns:32px minmax(0,1fr) auto;gap:8px;padding:8px}
body.compact-ui .mission-icon .ico{width:30px;height:30px}
body.compact-ui .mission-copy b{font-size:13px}
body.compact-ui .mission-card .btn{min-width:100px;font-size:12px!important}
body.compact-ui .missions-info{font-size:12px}
body.compact-ui .upgrade-result{font-size:14px;padding:4px 7px}
#sbOptions{display:contents}
#bMore,#bPalette{display:none}
#touchDash{display:flex}
#controls #touchDash{display:flex;position:relative;align-items:center;justify-content:center;width:68px;height:68px;background-image:url(assets/ui/ui_key.png?v=20);color:#6b3d1a;font:900 36px system-ui,sans-serif;padding:0 0 10px;border-radius:14px}
body.touch-ui #controls #touchDash{display:flex;align-items:center;justify-content:center;width:clamp(56px,18vh,78px);height:clamp(56px,18vh,78px);font-size:30px}
#touchDash.cooldown{opacity:.65;font-size:21px!important}
:root{--safe-left:max(8px,env(safe-area-inset-left));--safe-right:max(8px,env(safe-area-inset-right));--safe-top:max(6px,env(safe-area-inset-top))}
body.compact-ui #top{top:var(--safe-top);left:var(--safe-left);right:var(--safe-right);flex-wrap:nowrap;gap:6px;align-items:flex-start;z-index:10}
body.compact-ui #top>.grp{flex-wrap:nowrap;gap:5px;align-items:center}
body.compact-ui #top>.grp:last-of-type{flex:0 0 auto}
body.compact-ui #top .ib{width:44px;height:44px}
body.compact-ui #top .ib .ico{height:28px}
body.compact-ui #top .coins{width:116px;height:40px;font-size:16px;padding-left:40px!important}
body.compact-ui #top .sbcount{font-size:12px;padding:2px 6px;gap:5px}
body.compact-ui #top .sbcount .ico{height:16px}
body.compact-ui #bMore{display:flex}
body.compact-ui #sbOptions{display:none}
body.compact-ui.options-open #sbOptions{
 display:grid;position:fixed;right:var(--safe-right);top:calc(var(--safe-top) + 50px);
 width:min(336px,calc(100vw - var(--safe-left) - var(--safe-right)));max-height:calc(100dvh - 68px - env(safe-area-inset-bottom));
 overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;pointer-events:auto;
 grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px;
 background:#fff0d9f5;border:3px solid #a8743f;border-radius:16px;box-shadow:0 5px 14px #0005;
}
body.compact-ui #sbOptions>.ib,body.compact-ui #sbOptions #tools .ib{
 width:100%;height:76px;flex-direction:column;gap:3px;padding:8px 10px 14px;
}
body.compact-ui #sbOptions .ib::after{content:attr(data-label);display:block;max-width:100%;font:800 10.5px/1.1 system-ui;color:#3a2518;text-align:center;white-space:normal;overflow-wrap:anywhere;flex-shrink:0}
body.compact-ui #sbOptions .ib .ico{height:26px;max-width:30px;object-fit:contain;flex-shrink:0}
body.compact-ui #sbOptions #tools{position:static;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-column:1/-1;max-height:none;gap:6px;flex-wrap:nowrap}
body.compact-ui #sbOptions .ib .ib-lock{width:17px;left:0;top:0}
body.compact-ui #sbOptions .ib .ib-ad{right:0;bottom:0;font-size:9px;padding:0 3px}
body.compact-ui #bottom{padding:0 var(--safe-right) env(safe-area-inset-bottom) var(--safe-left);border-top-width:6px!important}
body.compact-ui #bPalette{display:flex;position:absolute;right:var(--safe-right);top:4px;width:44px;height:44px;z-index:2}
body.compact-ui #cats{padding:3px 50px 3px 0!important;gap:4px;min-height:50px;touch-action:pan-x;overflow-x:auto}
body.compact-ui #cats .cat{height:44px!important;min-width:44px;width:44px;padding:4px!important;font-size:0!important;display:flex;align-items:center;justify-content:center}
body.compact-ui #cats .cat .ico{height:24px;width:auto}
body.compact-ui #bottom .teams{position:static;display:flex;margin-left:auto;padding:3px 6px;gap:6px;border:0;border-radius:999px;background:#6b3d1a;box-shadow:inset 0 2px 4px #0003;flex:none}
body.compact-ui #bottom .teams span{display:none}
body.compact-ui #bottom .tm{position:relative;width:30px;height:30px;border-radius:50%}
body.touch-ui #bottom .teams{gap:14px}
body.touch-ui #bottom .tm::after{content:"";position:absolute;inset:-7px;border-radius:50%}
body.compact-ui #items{display:none;margin:0!important;padding:4px 0 6px!important;touch-action:pan-x}
body.compact-ui.palette-open #items{display:flex}
body.compact-ui #items .it{width:74px!important;height:76px!important;font-size:11px!important}
body.compact-ui #items .it b{height:32px}
body.compact-ui #items .it .spi{max-height:32px;max-width:46px}
body.compact-ui #hud{top:var(--safe-top);left:var(--safe-left);right:var(--safe-right);gap:6px}
body.compact-ui #hud .hp{--u:.62px;flex:none;min-width:0}
body.compact-ui #hud .obj{min-width:0}
body.compact-ui #lvname{max-width:100%;font-size:15px;border-width:0 22px;border-image-width:0 22px;padding:4px 2px 10px}
body.compact-ui #hud #obj{font-size:12px;max-width:100%;white-space:normal}
body.compact-ui #hud .grp{gap:4px;flex-wrap:nowrap}
body.compact-ui #hud .ib{width:44px;height:44px}
body.compact-ui #hud .ib .ico{height:28px}
body.compact-ui #controls{padding:0 max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
body.touch-ui #joy{display:block;width:clamp(82px,24vh,124px);height:clamp(82px,24vh,124px)}
body.touch-ui #controls .keys{display:none}
body.touch-ui #controls button.atk{width:clamp(64px,20vh,90px);height:clamp(64px,20vh,90px)}
body.touch-ui #controls .kh{display:none}
body.compact-ui #tip{top:72px!important;max-width:min(440px,70vw)!important;font-size:13px!important;padding:7px 10px 8px 34px!important}
body.compact-ui #tip::before{width:40px;height:40px;left:-10px;margin-top:-20px}
body.compact-ui #tutor{top:70px;max-width:min(420px,72vw);font-size:13px;padding:8px 12px;border-radius:14px;gap:4px}
body.compact-ui #tutor .btn{min-height:36px;font-size:13px;margin-top:2px}
body.compact-ui #tutor .tt{font-size:clamp(13px,2.8vh,18px)}
body.compact-ui #tutor .td{gap:4px;flex-wrap:wrap;justify-content:center}
body.compact-ui #tutor .td i{width:8px;height:8px}
body.compact-ui #tutor.crate{top:62px;display:grid;grid-template-columns:minmax(0,1fr) auto;max-width:min(460px,80vw);gap:8px;padding:6px 9px}
body.compact-ui #tutor.crate .tt{font-size:12px;line-height:1.3}
body.compact-ui #tutor.crate .td{display:none}
body.compact-ui #tutor.crate .btn{grid-column:2;grid-row:1;min-height:44px;font-size:12px;padding:2px 6px}
body.compact-ui.options-open #tutor{left:var(--safe-left);transform:none;max-width:calc(100vw - 360px);top:70px}
body.compact-ui.options-open .sboffer{display:none}
body.compact-ui.show-sb-count #top .sbcount{display:flex;position:absolute;top:50px;left:0}
body.compact-ui.show-sb-count #tutor{top:90px}
body:has(#tutor.on) #tip{display:none}
body.compact-ui #sbArrow{z-index:11}
body.compact-ui:has(#modal.on) #tip,body.compact-ui:has(#modal.on) #tutor{display:none}
body.compact-ui #banner{max-width:90vw;white-space:normal;font-size:26px}
body.compact-ui #banner small{font-size:15px}
body.compact-ui #modal{padding:max(6px,env(safe-area-inset-top)) var(--safe-right) max(6px,env(safe-area-inset-bottom)) var(--safe-left)}
body.compact-ui .box{max-height:100%;overscroll-behavior:contain;touch-action:pan-y}
body.touch-ui .box button,body.touch-ui .map,body.touch-ui .hx-arr{min-height:44px}
body.compact-ui .sboffer{right:var(--safe-right);top:28%;transform:scale(.8);transform-origin:right center}
@media(max-width:700px){
 body.compact-ui #top .sbcount{display:none}
 body.compact-ui #hud .hp{--u:.5px}
 body.compact-ui #hud #lvname{font-size:12px;border-width:0 16px;border-image-width:0 16px}
 body.compact-ui #hud #obj{font-size:11px}
 body.compact-ui #hud .grp{gap:2px}
 body.compact-ui #hud .ib{width:40px;height:44px}
}
@media(max-height:500px) and (min-aspect-ratio:1/1){
 body.compact-ui #menu{padding:var(--safe-top) var(--safe-right) 6px var(--safe-left)}
 body.compact-ui #menu .mcenter{margin-top:0;gap:3px}
 body.compact-ui #menu .logo{height:clamp(58px,21vh,100px);max-width:70vw}
 body.compact-ui #menu .sub{font-size:12px;margin:0}
 body.compact-ui #menu .modes{flex-direction:row;width:90vw;gap:8px;margin-top:12px;padding:0;align-items:stretch}
 body.compact-ui #menu .mode{flex:1;min-width:0;width:auto;height:66px;font-size:14px!important;border-width:12px 10px 12px 45px;--bt:12px;--br:10px;--bl:45px;padding:0 2px}
 body.compact-ui #menu .mode b{width:42px;height:42px;left:-43px;top:0}
 body.compact-ui #menu .mode b img{width:42px;height:42px}
 body.compact-ui #menu .mode span{padding-left:0}
 body.compact-ui #menu .mode small{font-size:10px;white-space:normal}
 body.compact-ui #menu .mtop .ib{width:44px;height:44px}
 body.compact-ui #menu .mtop .coins{width:120px;height:40px;font-size:16px;padding-left:42px!important}
 body.compact-ui #mGift{width:70px;bottom:max(8px,env(safe-area-inset-bottom));left:var(--safe-left)}
 body.compact-ui #mGift .gb{width:54px;height:54px}
 body.compact-ui #mGift .rays{width:90px;height:90px;margin:-45px 0 0 -45px;top:26px}
 body.compact-ui #mGift .gt{font-size:11px;min-width:64px;padding:2px 5px}
}

#controls #touchDash .kh{width:40px;font-size:9px;right:-8px}
#touchDash .dash-glyph{position:absolute;left:50%;top:40%;width:28px;height:20px;transform:translate(-50%,-50%);font-size:0;pointer-events:none}
#touchDash .dash-glyph::before,#touchDash .dash-glyph::after{content:'';position:absolute;top:5px;width:10px;height:10px;border-top:4px solid currentColor;border-right:4px solid currentColor;transform:rotate(45deg);box-sizing:border-box}
#touchDash .dash-glyph::before{left:2px}
#touchDash .dash-glyph::after{left:14px}
#touchDash.cooldown .dash-glyph{width:auto;height:auto;font-size:21px;line-height:1}
#touchDash.cooldown .dash-glyph::before,#touchDash.cooldown .dash-glyph::after{display:none}
#hpico{cursor:pointer;padding:0;touch-action:manipulation}
#hpico:focus-visible{outline:3px solid #ffd23a;outline-offset:3px}
#storySpeech{position:fixed;z-index:8;left:var(--safe-left,16px);top:clamp(88px,13vh,120px);display:flex;align-items:center;gap:10px;width:min(460px,44vw);pointer-events:none;color:#5b3410}
.speech-portrait{width:64px;height:72px;object-fit:contain;flex:none;filter:drop-shadow(0 3px 1px #78451d66)}
.speech-bubble{position:relative;flex:1;min-width:0;border:3px solid #d9974c;border-radius:23px;background:#fff6e8;padding:9px 15px;box-shadow:0 3px 0 #a8743f55}
.speech-bubble::before{content:'';position:absolute;left:-10px;top:calc(50% - 8px);width:15px;height:15px;background:#fff6e8;border-left:3px solid #d9974c;border-bottom:3px solid #d9974c;transform:rotate(45deg)}
.speech-bubble b{color:#c4561a;font:900 16px Nunito,system-ui}
.speech-bubble p{margin:3px 0 0;font:800 17px/1.3 Nunito,system-ui}
body.story-speaking #tutor.on{top:var(--story-bottom,210px)!important}
body:has(#modal.on) #storySpeech{visibility:hidden}
@media(max-height:500px){
 #storySpeech{top:60px;width:min(380px,56vw);gap:8px}
 .speech-portrait{width:42px;height:48px}
 .speech-bubble{padding:5px 10px;border-radius:16px;border-width:2px}
 .speech-bubble::before{width:11px;height:11px;left:-7px;border-width:2px}
 .speech-bubble b{font-size:12px}
 .speech-bubble p{font-size:13px;line-height:1.2;margin-top:1px}
 body.story-speaking #tutor{padding:6px 12px;gap:4px}
 body.story-speaking #tutor .tt{font-size:14px}
 body.story-speaking #tutor .td i{width:8px;height:8px}
}
#pHint{transform-origin:50% 90%;animation:hintButtonBounce 2.2s ease-in-out infinite}
@keyframes hintButtonBounce{0%,12%,32%,48%,100%{transform:translateY(0)}22%{transform:translateY(-7px)}40%{transform:translateY(-4px)}}
body:has(#modal.on) #pHint{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){#pHint{animation:none}}
#upgradeArrow{position:fixed;z-index:16;width:32px;height:46px;pointer-events:none;transform:translateX(-50%) rotate(180deg);filter:drop-shadow(0 3px 0 #6b3f1f55);animation:gearArrowBob .8s ease-in-out infinite alternate}
#upgradeArrow svg{width:100%;height:100%}
@keyframes gearArrowBob{to{margin-top:5px}}
.hx-coach{padding:9px 13px;margin:6px 10px 12px;background:#fff0b8;border:2px solid #d69a35;border-radius:12px;color:#603816;font-weight:900;font-size:16px;line-height:1.3;text-align:center}
.gear-coach-box .row2{display:grid;grid-template-columns:1fr}
.box.hxbox .row2{padding:6px 12px 10px;min-width:0}
.box.hxbox .row2 .btn:hover{transform:none}
.box.hxbox .row2 .btn.tut-hl{animation:heroFooterGlow .9s ease-in-out infinite;transform:none}
@keyframes heroFooterGlow{50%{box-shadow:0 0 0 3px #ffd23a88}}
.box.hxbox .hx{grid-template-columns:minmax(180px,35%) minmax(0,1fr);gap:18px}
.box.hxbox .hx-l{--ar:34px;--ag:7px;min-width:0}
.box.hxbox .hx-r{gap:7px}
.box.hxbox .hx-name{font-size:32px}
.box.hxbox .hx-ws{grid-template-columns:repeat(5,minmax(0,56px));gap:12px 8px;margin-top:10px;margin-bottom:10px}
.box.hxbox .hx-wp{min-height:64px}
.box.hxbox .hx-st{font-size:16px;gap:10px}
.box.hxbox .hx-role{font-size:13px}
.box.hxbox .hx-up{min-height:52px!important;font-size:20px!important}
.box.hxbox .row2 .btn{min-height:50px;font-size:20px}
.box.gear-coach-box .hx-arr,.box.gear-coach-box .hx-dots{visibility:hidden}
@media(max-height:500px){
 .box.hxbox .hx{grid-template-columns:minmax(120px,30%) minmax(0,1fr);gap:10px}
 .box.hxbox .hx-name{font-size:23px}
 .box.hxbox .hx-r{gap:4px}
 .box.hxbox .hx-ws{grid-template-columns:repeat(5,minmax(0,40px));gap:9px 6px;margin:6px 8px}
 .box.hxbox .hx-st{font-size:13px;gap:6px}
 .box.hxbox .hx-up{min-height:36px!important;font-size:16px!important}
 .box.hxbox .hx-wp{min-height:42px}
}
.weapon-reveal{position:fixed;left:50%;top:45%;z-index:80;width:230px;height:260px;transform:translate(-50%,-50%);pointer-events:none;display:grid;place-items:center;animation:weaponReveal 1.7s ease-out both}
.reveal-rays{position:absolute;width:340px;height:340px;opacity:.9;animation:spin 8s linear infinite}
.reveal-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:7px;min-width:210px;padding:15px 20px;background:#fff2d0f5;border:4px solid #b36c27;border-radius:24px;box-shadow:0 6px 0 #6b3d1a88,0 0 30px #ffdb61;color:#6b3d1a;font:900 23px Nunito,system-ui;text-align:center}
.reveal-card b{font-size:18px;color:#9d561c}
.reveal-weapon{width:124px;height:124px;object-fit:contain;filter:drop-shadow(0 5px 2px #7a481d55)}
@keyframes weaponReveal{0%{opacity:0;transform:translate(-50%,-50%) scale(.4) rotate(-8deg)}15%,72%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(0)}100%{opacity:0;transform:translate(-50%,-60%) scale(1.1)}}
body.compact-ui .hx-coach{font-size:12px;padding:5px 8px;margin:3px 5px 7px}
@media(max-height:500px) and (max-width:740px) and (min-aspect-ratio:1/1){
 .box.hxbox .hx{grid-template-columns:minmax(120px,34%) minmax(0,1fr);gap:10px}
 .box.hxbox .hx-l{min-width:0;max-width:100%;--ar:28px;--ag:4px}
 .box.hxbox .hx-st{font-size:12px;gap:5px}
 .box.hxbox .hx-st img{height:17px}
 .box.hxbox .hx-ws{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px 5px}
 .box.hxbox .hx-lvl{font-size:13px;gap:5px}
 .box.hxbox .hx-pips{gap:2px;min-width:0}
}
@media(max-height:500px){.weapon-reveal{top:43%;width:170px;height:180px}.reveal-card{min-width:160px;padding:9px 13px;font-size:18px}.reveal-card b{font-size:14px}.reveal-weapon{width:80px;height:80px}.reveal-rays{width:240px;height:240px}#controls #touchDash{width:56px;height:56px}}
@media(prefers-reduced-motion:reduce){#upgradeArrow{animation:none}.reveal-rays{animation:none}.weapon-reveal{animation:weaponRevealStill 1.7s both}@keyframes weaponRevealStill{0%,90%{opacity:1}100%{opacity:0}}}

body[data-screen=play] #tip.actor-tip{left:var(--actor-tip-x,50%)!important;top:var(--actor-tip-y,70%)!important;transform:translateX(-50%)!important;transition:opacity .2s;animation:none}

#hud #pMissions{padding:0;justify-content:center}
#hud #pMissions>.ico{width:60%;height:60%;object-fit:contain}
#hud #pMissions .mission-dot{right:-3px;top:-3px}
body.compact-ui #pMissions .mission-dot{min-width:19px;height:19px;font-size:11px;padding:0 3px}

.lvc.night-level .chimg{filter:brightness(.62) saturate(.8)}
.lvc .night-badge{position:absolute;right:8px;top:8px;z-index:2;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#24365b;color:#fff2a7;border:2px solid #fff0bf;font:900 25px/1 system-ui;box-shadow:0 2px 0 #4d321f}

#menu .mtop{align-items:flex-start}
/* «Задания» ниже квадратных кнопок магазина и настроек: по вертикали ставим по их центру */
#menu .mtop #mMissions{align-self:center}
.menu-wallet{display:flex;flex-direction:row;align-items:center;gap:10px;flex:none}
#menu #mRecords{margin:0;min-height:50px;width:auto;font-size:16px;gap:5px}
#mRecords .ico{width:24px;height:24px;object-fit:contain}
body.compact-ui #menu #mRecords{min-height:36px;font-size:11px;border-width:8px;border-image-width:8px;padding:0 3px}
body.compact-ui #mRecords .ico{width:19px;height:19px}

.overlay-close{position:absolute;right:5px;top:5px;width:44px;height:44px;padding:0;border:0;background:url(assets/ui/ui_ib_alt.png?v=20) center/100% 100% no-repeat;color:#603816;font:900 30px/1 system-ui;cursor:pointer;pointer-events:auto;touch-action:manipulation;z-index:3}
.speech-bubble:has(.overlay-close){padding-right:52px}
body #tutor:has(>.overlay-close){padding-right:22px!important}
/* крестик обучающей подсказки — в правом верхнем углу, на рамке, как у окон */
#tutor>.overlay-close{right:-16px;top:-16px;width:40px;height:40px;font-size:26px}
body.compact-ui #tutor:has(>.overlay-close){padding-right:30px!important}
body.compact-ui #tutor>.overlay-close{right:-12px;top:-12px;width:32px;height:32px;font-size:21px}
.overlay-close:focus-visible{outline:3px solid #e6aa24;outline-offset:2px}
@media(max-height:500px){.speech-bubble:has(.overlay-close){padding-right:50px}}

/* плитки оружия (2026-11-10): на всю ширину панели, оружие крупно и в цвете — видно, что покупаешь; замок и цена — по краям */
.box.hxbox .hx-ws{grid-template-columns:repeat(7,minmax(0,1fr));gap:12px 7px;margin-left:6px;margin-right:6px}
@media(max-height:500px){.box.hxbox .hx-ws{grid-template-columns:repeat(7,minmax(0,1fr));gap:9px 4px}}
.box.hxbox .hx-w .spi,.box.hxbox .hx-w img:first-child{width:94%!important;height:94%!important}
.box.hxbox .hx-w.lk .spi,.box.hxbox .hx-w.lk img:first-child{filter:saturate(.7) brightness(.92)}
.box.hxbox .hx-w .hx-lock{width:clamp(13px,22%,22px)!important;right:-7px;top:-8px}
.box.hxbox .hx-pr{bottom:-11px;font-size:clamp(9px,1.4vh,12px);padding:0 5px;line-height:1.35}
/* на телефоне боком левая колонка уже — плиткам оружия больше места */
@media (max-height:500px) and (orientation:landscape){.box.hxbox .hx{grid-template-columns:clamp(150px,24vw,214px) 1fr}}

body.compact-ui .menu-wallet{gap:5px}

/* кошелёк в одном ряду с кнопками «Задания»/«Пауза», слева от них, по центру по высоте (2026-11-09; раньше висел под кнопками) */
#hud .grp{align-items:center}
#hud #levelWallet{position:relative;flex:none;width:138px;height:46px;font-size:21px;margin:0 4px 0 0!important;pointer-events:none}
body.compact-ui #hud #levelWallet{width:104px;height:35px;font-size:16px;margin:0 2px 0 0!important}
@media(max-height:380px){body.compact-ui #hud #levelWallet{width:94px;height:32px;font-size:15px}}

@keyframes upgradeReadyGlow{0%,100%{filter:drop-shadow(0 0 2px #ffdf55)}50%{filter:drop-shadow(0 0 10px #ffdf55) brightness(1.12)}}
#hpico.upgrade-ready,.hxbox #hxUp.upgrade-ready{animation:upgradeReadyGlow 1.25s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){#hpico.upgrade-ready,.hxbox #hxUp.upgrade-ready{animation:none;filter:drop-shadow(0 0 5px #ffdf55)}}

/* окно героя: оружие на всю ширину под героем, плитки крупные; большой повтор надетого оружия не нужен — оно подсвечено в сетке */
.box.hxbox .hx-wp{display:none}
.box.hxbox .hx-wfull{margin:2px 10px 4px}
.box.hxbox .hx-wfull .hx-wl{text-align:left;margin:0 6px 2px}
.box.hxbox .hx-wfull .hx-ws{grid-template-columns:repeat(7,minmax(0,1fr));gap:16px 12px;margin:6px 0 12px}
@media(max-height:500px){.box.hxbox .hx-wfull .hx-ws{gap:10px 7px;margin:4px 0 8px}.box.hxbox .hx-wfull{margin:0 6px 2px}}
.box.hxbox .hx-wfull .hx-w .hx-lock{width:clamp(14px,26%,30px)!important;right:-8px;top:-10px}
.box.hxbox .hx-wfull .hx-pr{font-size:clamp(10px,1.45vw,17px);padding:1px clamp(5px,.8vw,10px);bottom:clamp(-14px,-1vw,-9px);border-width:2px}

/* обучение «нажми на портрет»: игра на паузе, сцена притемнена; портрет, подсказка и стрелка — поверх затемнения */
body.coach-pause #game{filter:brightness(.55) saturate(.8);transition:filter .25s}

/* топливо огнемёта: иконка и оранжевая шкала */
#ammo .fuel-hud{display:flex;align-items:center;gap:5px}#ammo .fuel-hud img{width:54px;height:54px;margin:-10px -2px -10px 0;object-fit:contain;filter:drop-shadow(0 2px 2px #0006)}  /* v=396: канистра топлива (ChatGPT), крупнее */
#ammo .fuel-hud i{display:block;width:84px;height:14px;border:2px solid #3a2518;border-radius:8px;background:#3a251866;overflow:hidden;flex:none}
#ammo .fuel-hud i b{display:block;height:100%;background:linear-gradient(90deg,#ff4a1a,#ffb33d,#fff07a);border-radius:6px}
/* надетое оружие в сетке: золотые лучи вращаются за ним, плитка светится, оружие «пузырится» — покачивается и пружинит */
.box.hxbox .hx-w.on{overflow:hidden;z-index:1;filter:drop-shadow(0 0 1px #2a1608) drop-shadow(0 0 10px #ffd23a);animation:hxOnGlow 2.2s ease-in-out infinite}
.box.hxbox .hx-w.on::before{content:"";position:absolute;left:50%;top:50%;width:190%;aspect-ratio:1;border-radius:50%;pointer-events:none;z-index:0;
 background:radial-gradient(closest-side,#fffdf0 0,#fff6c8 20%,#fff6c800 46%),repeating-conic-gradient(#ffad1f 0 10deg,#ffad1f00 13deg 25deg,#ffad1f 28deg),radial-gradient(closest-side,#ffe9a0 0,#ffd66b 60%,#ffd66b00 100%);
 -webkit-mask:radial-gradient(closest-side,#000 48%,#0000 78%);mask:radial-gradient(closest-side,#000 48%,#0000 78%);animation:hxWpRays 9s linear infinite}
.box.hxbox .hx-w.on .spi,.box.hxbox .hx-w.on img:first-child{position:relative;z-index:1;transform-origin:50% 70%;animation:hxBubble 1.8s ease-in-out infinite;filter:drop-shadow(0 0 2px #fff) drop-shadow(0 3px 0 #3a251833)}
@keyframes hxBubble{0%,100%{transform:translateY(0) scale(1)}22%{transform:translateY(2%) scale(1.07,.93)}48%{transform:translateY(-7%) scale(.95,1.06)}72%{transform:translateY(-2%) scale(1.03,.98)}}
@keyframes hxOnGlow{0%,100%{filter:drop-shadow(0 0 1px #2a1608) drop-shadow(0 0 10px #ffc21a) drop-shadow(0 0 3px #fff3b0)}50%{filter:drop-shadow(0 0 1px #2a1608) drop-shadow(0 0 22px #ffd23a) drop-shadow(0 0 6px #fff8d0)}}
@media (prefers-reduced-motion:reduce){.box.hxbox .hx-w.on,.box.hxbox .hx-w.on::before,.box.hxbox .hx-w.on img:first-child{animation:none}.box.hxbox .hx-w.on::before{transform:translate(-50%,-50%)}}

/* v=393: пояснение в окне открытия (оружие песочницы открывается отдельно) */
#modal .box p.note{font-size:.82em;opacity:.78;margin-top:-.2em}
/* v=396: кнопка удара в стиле кнопок ← ↑ → (кремовая клавиша с деревянным низом), на ней иконка оружия */
/* v=396: круглая, как раньше, но в цветах клавиш ← ↑ →: кремовая с деревянным ободком */
body #controls button.atk,body #controls button.atk.gun{border-radius:50%;background:url(assets/ui/icon_fight.png?v=87) center 46%/58% no-repeat,radial-gradient(circle at 50% 34%,#fffaf0,#fbe9c6 58%,#efcf94);border:3px solid #e6b56e;box-shadow:0 6px 0 #b8743a,0 8px 6px #5a2e1255,inset 0 -5px 0 #e9c587}
body #controls button.atk.gun.on,body #controls button.atk.on{transform:translateY(4px) scale(.95);box-shadow:0 2px 0 #b8743a,inset 0 -3px 0 #e9c587}
/* v=396: реплика врага — справа, хвостик пузыря и портрет — к краю экрана */
#storySpeech.foe{left:auto;right:var(--safe-right,16px);flex-direction:row-reverse}
#storySpeech.foe .speech-portrait{transform:scaleX(-1)}
#storySpeech.foe .speech-bubble::before{left:auto;right:-10px;transform:rotate(-135deg)}
@media(max-height:500px){#storySpeech.foe .speech-bubble::before{right:-7px}}
/* без оружия (палка) на клавише удара — скрещённые мечи */
body #controls button.atk:not(.gun){background:url(assets/ui/icon_fight.png?v=86) center 46%/58% no-repeat,radial-gradient(circle at 50% 34%,#fffaf0,#fbe9c6 58%,#efcf94)}
/* крестик закрытия реплики не наезжает на текст */
.speech-bubble{padding-right:15px}  /* крестика больше нет */
/* v=396: окно героя — счётчик монет слева вверху, плашка временного буста под «Улучшить» */
.hxbox{position:relative}
/* та же плашка монет, что в меню (ui_coinbar.png + большая монета), только поменьше */
/* как плашка в меню: монета в гнезде слева, цифры по центру справа (пропорции ui_coinbar.png) */
.box.hxbox .coins.hx-coins{position:relative!important;margin:0 auto 10px!important;width:180px!important;height:52px!important;padding:0 12px 4px 50px!important;font-size:22px!important;display:flex;align-items:center;justify-content:center}
.box.hxbox .coins.hx-coins .ico{position:absolute!important;left:-7%!important;top:-9%!important;height:118%!important;width:auto!important;transform:none!important;filter:drop-shadow(0 2px 0 #3a251855)}
.hx-boost{margin-top:8px;display:flex;align-items:center;gap:6px;justify-content:center;background:linear-gradient(#f0e3ff,#e0c8ff);border:2px solid #9a6ad8;color:#5b2a9a;border-radius:14px;padding:6px 10px;font:900 15px Nunito,system-ui}
.hx-boost img{width:22px;height:22px}
/* v=396: нажали на закрытое оружие, а открыть нечем — замок прыгает и растёт, плитка вздрагивает */
@keyframes hxLockPop{0%{transform:scale(1) rotate(0)}25%{transform:scale(1.9) rotate(-14deg)}45%{transform:scale(1.6) rotate(12deg)}65%{transform:scale(1.75) rotate(-8deg)}100%{transform:scale(1) rotate(0)}}
@keyframes hxDeny{0%,100%{transform:translateX(0)}20%{transform:translateX(-5px)}40%{transform:translateX(5px)}60%{transform:translateX(-4px)}80%{transform:translateX(3px)}}
.hx-w .hx-lock.pop{animation:hxLockPop .6s ease-out;z-index:4;filter:drop-shadow(0 0 6px #ffd23a)}
.hx-w.lk-deny{animation:hxDeny .4s ease-out}
/* v=396: подписи плиток песочницы — в одну строку, не вылезают за плашку; подменю прокручиваются (видна тонкая полоса) */
.it .itn{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:inherit;line-height:1.15}
#items,#cats{scrollbar-width:thin;scrollbar-color:#c98a45 transparent}
#items::-webkit-scrollbar,#cats::-webkit-scrollbar{display:block;height:6px}
#items::-webkit-scrollbar-thumb,#cats::-webkit-scrollbar-thumb{background:#c98a45;border-radius:3px}
#tools{max-height:calc(100vh - 200px);overflow-y:auto;overflow-x:hidden;scrollbar-width:none;padding:12px 14px 16px 14px;margin:-12px 0 0 -14px}
#tools::-webkit-scrollbar{display:none}

/* ==========================================================================
   МОБИЛЬНАЯ РАСКЛАДКА (классы ставит js/responsive.js):
   body.mob-p — вертикальный экран, body.mob-l — сенсорный экран боком.
   ПК (мышь, горизонтальное окно) этих классов не получает — его UI не меняется.
   Правила мобильного UI/UX:
   1. Безопасные зоны (Safe Area) и эргономика больших пальцев (Steven Hoober Thumb Zone).
   2. Модальные окна — компактные попапы по центру (70–84% ширины, <=76% высоты), не во весь экран и без прокрутки.
   3. Строгая центровка заголовков, эмблем и кнопок; сетка отступов кратна 4/8px.
   4. Уведомления (toast) в верхней информационной зоне под HUD, никогда не перекрывают героя.
   ========================================================================== */

/* ---------- общее для телефона и планшета (body.is-mobile) ---------- */
body.is-mobile #menu .mode[data-m="sandbox"]{display:none!important}   /* песочница только на ПК */
body.is-mobile #rotate{display:none!important}                          /* играть можно в любой ориентации */
#menu .logo-line{display:none}
body.story-speaking #tip{display:none!important}                        /* подсказка не перекрывает реплику */
.box.hxbox:has(.hx-tutb) .hx-wl{visibility:hidden!important}            /* плашка «Купи биту!» не перекрывает подпись оружия */

/* --- компактные всплывающие сообщения (toast) вверху под HUD: не растягиваются и не закрывают игрока --- */
body.is-mobile .toast{background:none!important;padding:5px 12px 8px!important;border-width:0 18px!important;border-image-width:0 18px!important;font-size:13px!important;line-height:1.15!important;white-space:normal!important;max-width:min(88vw,310px)!important;width:max-content!important;text-align:center!important;box-sizing:border-box!important}
body.mob-p #toast{top:calc(var(--hud-bottom,104px) + 6px)!important;bottom:auto!important}
body.mob-p.story-speaking #toast{top:var(--story-bottom,175px)!important;bottom:auto!important}
body.mob-l #toast{top:56px!important;bottom:auto!important}
body.mob-l.story-speaking #toast{top:var(--story-bottom,120px)!important;bottom:auto!important}

/* --- единые правила модальных окон на мобильных (не на весь экран, отцентрованы, без лишней прокрутки) --- */
body.is-mobile #modal .box{position:relative!important}
body.is-mobile #modal .box:not(:has(.lv)){overflow:hidden!important}
body.is-mobile #modal .box h3{margin:0 auto 6px!important;text-align:center!important}
body.is-mobile #modal .box:has(>.mxw)>h3{margin:0 38px 6px!important}
/* крестик .mxw абсолютно в правом верхнем углу: в flex-окнах (.box:has(>.emb)) не встаёт поверх иконки оружия */
body.is-mobile #modal .mxw{position:absolute!important;right:4px!important;top:4px!important;width:auto!important;height:auto!important;z-index:10!important}
body.is-mobile #modal .mx{width:36px!important;height:36px!important;padding:8px!important}
/* v526: окно с прокруткой (карта глав) — крестик прилипает к верху и не уезжает при пролистывании */
body.is-mobile #modal .box:has(.lv)>.mxw{position:sticky!important;top:4px!important;right:auto!important;height:0!important;width:auto!important;text-align:right!important}

/* --- окно победы, поражения и особого предложения оружия: строгая симметрия, крупная иконка и центровка --- */
body.is-mobile .box:has(>.emb),body.is-mobile .box:has(>.emb.lose){display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;justify-content:center!important;align-items:center!important;align-content:center!important;text-align:center!important;gap:4px 8px!important;padding:6px 10px 10px!important}
body.is-mobile .box:has(>.emb)>.emb,body.is-mobile .box:has(>.emb.lose)>.emb{flex:0 0 100%!important;width:68px!important;height:68px!important;margin:4px auto 2px!important;display:flex!important;align-items:center!important;justify-content:center!important}
body.is-mobile .box:has(>.emb)>.emb::before{width:104px!important;height:104px!important;margin:-52px 0 0 -52px!important}
body.is-mobile .box:has(>.emb)>.emb img{position:relative!important;inset:auto!important;width:68px!important;height:68px!important;margin:0 auto!important;display:block!important;object-fit:contain!important;filter:drop-shadow(0 3px 2px #3a251844)}
body.is-mobile .box:has(>.emb)>h3,body.is-mobile .box:has(>.emb.lose)>h3{flex:0 0 auto!important;min-width:54%!important;max-width:96%!important;white-space:nowrap!important;margin:0 auto 2px!important;font-size:17px!important;padding:4px 12px 9px!important;border-width:0 28px!important;border-image-width:0 28px!important}
body.is-mobile .box:has(>.emb)>.stars{flex:0 0 100%!important;margin:0 auto!important}
body.is-mobile .box:has(>.emb)>.stars.big .ico{height:28px!important}
body.is-mobile .box:has(>.emb)>p,body.is-mobile .box:has(>.emb.lose)>p{flex:0 0 100%!important;margin:2px 0 4px!important;font-size:13px!important;line-height:1.25!important;text-align:center!important}
body.mob-p .box:has(>.emb)>.btn,body.mob-p .box:has(>.emb.lose)>.btn{flex:0 0 100%!important;width:100%!important;min-height:38px!important;height:auto!important;font-size:14px!important;margin:2px 0!important;padding:2px 8px!important;border-width:9px!important;border-image-width:9px!important;--bw:9px!important}
body.mob-l .box:has(>.emb),body.mob-l .box:has(>.emb.lose){width:min(66vw,390px)!important;max-width:390px!important}
body.mob-l .box:has(>.emb)>.btn,body.mob-l .box:has(>.emb.lose)>.btn{flex:1 1 44%!important;width:auto!important;min-width:130px!important;max-width:100%!important;min-height:36px!important;height:36px!important;font-size:12.5px!important;margin:0!important;padding:0 6px!important;border-width:8px!important;border-image-width:8px!important;--bw:8px!important}

/* --- окно паузы, подарка, магазина, подсказки: компактный размер по центру --- */
body.mob-p #modal .box:not(.wide):not(.hxbox):not(:has(.setrow)){width:min(76vw,276px)!important;max-width:276px!important;padding:6px 10px 10px!important;border-width:14px!important;border-image-width:14px!important;box-sizing:border-box!important}
body.mob-l #modal .box:not(.wide):not(.hxbox):not(:has(.setrow)):not(:has(>.emb)){width:min(52vw,286px)!important;max-width:286px!important;padding:6px 10px 10px!important;border-width:14px!important;border-image-width:14px!important;box-sizing:border-box!important}
body.is-mobile #modal .box:not(.wide):not(.hxbox):not(:has(.setrow)):not(:has(>.emb)) h3{font-size:17px!important;padding:5px 10px 10px!important;margin:0 auto 4px!important;border-width:0 28px!important;border-image-width:0 28px!important}
body.is-mobile #modal .box:not(.wide):not(.hxbox):not(:has(.setrow)):not(:has(>.emb)) p{font-size:13px!important;margin:2px 0 6px!important;line-height:1.25!important}
body.is-mobile #modal .box:not(.wide):not(.hxbox):not(:has(.setrow)):not(:has(>.emb)) .btn{min-height:38px!important;font-size:14px!important;margin-top:5px!important;padding:2px 8px!important;border-width:9px!important;border-image-width:9px!important;--bw:9px!important}
body.is-mobile #modal .box:not(.wide):not(.hxbox) .big{font-size:40px!important;margin:2px 0!important}

/* --- окно настроек: компактное, все кнопки и «Русский / English» помещаются целиком --- */
body.mob-p #modal .box:has(.setrow){width:min(82vw,310px)!important;max-width:310px!important;padding:5px 8px 8px!important;border-width:13px!important;border-image-width:13px!important;box-sizing:border-box!important}
body.mob-l #modal .box:has(.setrow){width:min(64vw,380px)!important;max-width:380px!important;padding:5px 10px 8px!important;border-width:13px!important;border-image-width:13px!important;box-sizing:border-box!important}
body.is-mobile #modal .box:has(.setrow) h3{font-size:16px!important;padding:4px 10px 9px!important;margin:0 auto 4px!important;border-width:0 26px!important;border-image-width:0 26px!important}
body.is-mobile .setrow{margin:3px 0!important;padding:4px 8px!important;gap:6px!important;border-radius:10px!important}
body.is-mobile .setrow>span{font-size:12.5px!important;line-height:1.15!important;text-align:left!important;min-width:0!important;flex:1 1 auto!important}
body.is-mobile .setrow>span small{font-size:9.5px!important;line-height:1.1!important;margin-top:1px!important}
body.is-mobile .setrow .btn{min-width:68px!important;min-height:28px!important;height:auto!important;font-size:11.5px!important;padding:0 6px!important;border-width:6px!important;border-image-width:6px!important;flex-shrink:0!important;--bw:6px!important}
body.is-mobile .setrow .seg{gap:4px!important;flex-shrink:0!important}
body.is-mobile .setrow .seg .btn{min-width:58px!important;padding:0 5px!important;font-size:11px!important}
body.is-mobile .setrow.vol{gap:6px!important}
body.is-mobile .setrow.vol>span{min-width:48px!important;flex:none!important}
body.is-mobile .setrow .vv{min-width:34px!important;font-size:12px!important}
body.is-mobile .vrange{height:10px!important;min-width:0!important}
body.is-mobile .vrange::-webkit-slider-thumb{width:18px!important;height:18px!important}
body.is-mobile #sOk{min-height:34px!important;font-size:14px!important;margin-top:4px!important;border-width:8px!important;border-image-width:8px!important;--bw:8px!important}

/* --- окно заданий (.missions-box) и рекордов (.box:has(.rec)): компактные, не во весь экран --- */
body.mob-p #modal .box.missions-box,body.mob-p #modal .box:has(.rec){width:min(84vw,330px)!important;max-width:330px!important;padding:6px 8px 8px!important;border-width:13px!important;border-image-width:13px!important;box-sizing:border-box!important}
body.mob-l #modal .box.missions-box,body.mob-l #modal .box:has(.rec){width:min(66vw,420px)!important;max-width:420px!important;padding:6px 10px 8px!important;border-width:13px!important;border-image-width:13px!important;box-sizing:border-box!important}
body.is-mobile #modal .box.missions-box h3,body.is-mobile #modal .box:has(.rec) h3{font-size:16px!important;padding:4px 10px 9px!important;border-width:0 26px!important;border-image-width:0 26px!important}
body.is-mobile .tabs.ctr{display:flex!important;justify-content:center!important;gap:4px!important;margin:2px auto 4px!important;flex-wrap:nowrap!important}
body.is-mobile .tabs button{min-height:30px!important;font-size:11.5px!important;padding:0 6px!important;border-width:6px!important;border-image-width:6px!important;white-space:nowrap!important}
body.is-mobile .mission-tab-badge{min-width:16px!important;height:16px!important;font-size:10px!important;margin-left:4px!important;padding:0 3px!important}
body.is-mobile .missions-info{font-size:11px!important;margin:2px 0!important;line-height:1.2!important}
body.is-mobile #missionTimer{font-size:10.5px!important;margin:1px 0 4px!important}
body.is-mobile .mission-list{gap:5px!important;margin:4px 0!important}
body.is-mobile .mission-card{grid-template-columns:26px minmax(0,1fr) auto!important;gap:6px!important;padding:5px 7px!important;border-radius:10px!important}
body.is-mobile .mission-icon .ico{width:24px!important;height:24px!important}
body.is-mobile .mission-copy b{font-size:11.5px!important;line-height:1.15!important}
body.is-mobile .mission-copy small{font-size:10px!important}
body.is-mobile .mission-progress{height:7px!important;margin:3px 0 1px!important}
body.is-mobile .mission-card .btn{min-width:78px!important;min-height:28px!important;font-size:11px!important;padding:0 5px!important;border-width:6px!important;border-image-width:6px!important;--bw:6px!important}
body.is-mobile .mission-card .btn .ico{width:14px!important;height:14px!important}
body.is-mobile #missionBonus,body.is-mobile #missionClose,body.is-mobile #aBack{min-height:34px!important;font-size:13.5px!important;margin-top:4px!important;border-width:8px!important;border-image-width:8px!important;--bw:8px!important}
body.is-mobile .rec{max-height:130px!important;border-width:10px!important;border-image-width:10px!important}
body.is-mobile .rec table{font-size:12px!important}
body.is-mobile .rec td{padding:4px 5px!important}
body.is-mobile .rec .empty{padding:10px 6px!important;font-size:11.5px!important}
body.is-mobile .besth{margin:4px 0!important;font-size:12.5px!important}
body.is-mobile .besth b{font-size:14px!important}

/* --- карта глав истории (.box:has(.lv)) --- */
body.mob-p #modal .box:has(.lv){width:min(88vw,360px)!important;max-height:80vh!important;padding:6px 8px 10px!important;border-width:14px!important;border-image-width:14px!important}
body.mob-l #modal .box:has(.lv){width:min(76vw,520px)!important;max-height:80vh!important;padding:6px 10px 10px!important;border-width:14px!important;border-image-width:14px!important}

/* --- окно прокачки и выбора героя (.box.hxbox): кнопка «Рекорды» не наезжает на крестик, кнопки снизу в один ряд --- */
body.is-mobile .box.hxbox .hx-rec{position:static!important;margin:0 38px 3px!important;justify-content:center!important;align-items:center!important;gap:8px!important;font-size:12px!important}
body.is-mobile .box.hxbox .hx-rec .btn{min-height:26px!important;font-size:11px!important;padding:0 7px!important;border-width:5px!important;border-image-width:5px!important;--bw:5px!important}
body.is-mobile .box.hxbox .row2{display:flex!important;flex-wrap:nowrap!important;gap:5px!important;justify-content:center!important;align-items:center!important;padding:2px 2px 2px!important;margin-top:2px!important}
body.is-mobile .box.hxbox .row2 .btn{flex:1 1 0!important;min-width:0!important;width:auto!important;min-height:34px!important;height:34px!important;font-size:12px!important;padding:0 4px!important;margin:0!important;border-width:7px!important;border-image-width:7px!important;white-space:nowrap!important;--bw:7px!important}
body.is-mobile .box.hxbox .row2 .btn .ico{height:1.3em!important}

/* ======================= ВЕРТИКАЛЬНЫЙ ЭКРАН (body.mob-p) ======================= */
/* --- главное меню: сверху ресурсы и иконки, по центру логотип и 2 аккуратные карточки, снизу компактный подарок --- */
body.mob-p #menu{padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;box-sizing:border-box}
body.mob-p #menu .mtop{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:6px!important;padding:0!important;width:100%}
body.mob-p #menu .menu-wallet{gap:6px!important;flex:none}
body.mob-p #menu .mtop .coins{width:112px!important;height:38px!important;font-size:15px!important;padding:0 8px 3px 40px!important;margin-left:6px!important}
/* кнопки верхней панели — квадратные иконки без подписи */
body.mob-p #menu .mtop .btn.sm,body.mob-p #menu .mtop .ib{width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;margin:0!important;font-size:0!important;line-height:0!important;display:flex!important;align-items:center!important;justify-content:center!important;flex:none!important;animation:none!important}
body.mob-p #menu .mtop .btn.sm .ico,body.mob-p #menu .mtop .ib .ico{height:24px!important;width:auto!important;margin:0!important;vertical-align:0!important}
body.mob-p #menu .mtop .mission-entry.mission-ready{padding:0!important}
body.mob-p #menu .mtop .mission-dot{right:-8px;top:-8px;min-width:20px;height:20px;font-size:11px;border-width:2px}
/* центральный блок опущен ниже в зону комфортного касания пальцем (сбалансирован между верхней панелью и забором) */
body.mob-p #menu .mcenter{flex:1 1 auto;justify-content:center!important;padding-top:clamp(28px,6vh,56px)!important;padding-bottom:clamp(14px,3vh,28px)!important;margin:0!important;gap:14px!important;min-height:0}
body.mob-p #menu .mcenter h1{line-height:0}
body.mob-p #menu .logo:not(.logo-line){width:min(74vw,290px)!important;max-width:none!important;height:auto!important;max-height:22vh}
body.mob-p #menu .sub{display:none!important}
/* кнопки режимов компактнее по ширине (пропорции оригинальной плашки, иконка внутри медальона) */
body.mob-p #menu .modes{display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:center!important;width:min(68vw,252px)!important;gap:12px!important;margin:4px auto 0!important}
body.mob-p #menu .mode{width:100%!important;max-width:252px!important;flex:none!important;height:82px!important;min-height:82px!important;font-size:18px!important;border-width:16px 16px 16px 62px!important;border-image-width:16px 16px 16px 62px!important;--bt:16px!important;--br:16px!important;--bl:62px!important;padding:0 6px 2px 10px!important;box-sizing:border-box!important}
body.mob-p #menu .mode b{left:-54px!important;top:-4px!important;width:54px!important;height:54px!important}
/* компактный подарок в левом нижнем углу */
body.mob-p #mGift,body.mob-l #mGift{left:max(8px,env(safe-area-inset-left))!important;bottom:max(10px,env(safe-area-inset-bottom))!important;width:76px!important;height:auto!important}
body.mob-p #mGift .gb,body.mob-l #mGift .gb{width:60px!important;height:60px!important}
body.mob-p #mGift .rays,body.mob-l #mGift .rays{top:28px!important;width:108px!important;height:108px!important;margin:-54px 0 0 -54px!important}
body.mob-p #mGift .gt,body.mob-l #mGift .gt{font-size:12px!important;min-width:66px!important;padding:2px 8px 3px!important;margin-top:-8px!important;border-width:2px!important}

/* --- HUD уровня: ряд 1 — крупная читаемая шкала здоровья слева, монеты/задания/пауза справа; ряд 2 — глава и цель по центру --- */
body.mob-p #hud{left:max(8px,env(safe-area-inset-left))!important;right:max(8px,env(safe-area-inset-right))!important;top:max(6px,env(safe-area-inset-top))!important;flex-wrap:wrap!important;align-items:center!important;gap:4px 6px!important}
body.mob-p #hud .hp{--u:.52px!important;width:calc(330*var(--u))!important;height:calc(84*var(--u))!important;order:1;flex:none!important;transform:none!important;margin:0!important;min-width:0!important}
body.mob-p #hud #hpnum{font-size:14px!important;-webkit-text-stroke:2px #7a4a22!important}
body.mob-p #hud .grp{order:2;margin-left:auto!important;gap:4px!important;align-items:center;flex:none!important}
body.mob-p #hud .grp .coins{width:90px!important;height:34px!important;font-size:13.5px!important;padding:0 6px 3px 32px!important;margin-left:4px!important}
body.mob-p #hud .grp .ib{width:36px!important;height:36px!important;font-size:15px!important}
body.mob-p #hud .grp .ib .ico{height:23px!important}
/* патроны компактно под шкалой здоровья, а плашка главы — с отступом под ними, без наложения */
body.mob-p #ammo{left:calc(82*var(--u))!important;top:calc(66*var(--u))!important;gap:1px!important}
body.mob-p #ammo i.ammo-round{width:8px!important;height:16px!important}
body.mob-p #ammo i.ammo-round.grenade{width:13px!important;height:16px!important}
body.mob-p #ammo i.ammo-round.rocket{width:24px!important;height:13px!important}
body.mob-p #ammo i.ammo-round.spear{width:6px!important;height:18px!important}
body.mob-p #ammo i.ammo-round.arrow{width:5px!important;height:18px!important}
body.mob-p #ammo i.ammo-round.knife{width:7px!important;height:16px!important}
body.mob-p #ammo b{font-size:11px!important}
body.mob-p .reload-hud{width:24px!important;height:24px!important}
body.mob-p .reload-arrows{width:14px!important;height:14px!important}
body.mob-p #ammo .fuel-hud img{width:28px!important;height:28px!important;margin:-4px 0!important}
body.mob-p #ammo .fuel-hud i{width:56px!important;height:9px!important}
body.mob-p #hud .obj{order:3;position:static!important;left:auto!important;top:auto!important;transform:none!important;flex:0 0 100%!important;width:100%!important;max-width:100%!important;display:flex!important;flex-direction:column;align-items:center;margin:2px 0 0!important}
body.mob-p #hud:has(#ammo:not([style*="none"])) .obj{margin-top:12px!important}
body.mob-p.puzzle #hud .grp{margin:0 auto!important;justify-content:center!important;width:100%!important}
body.mob-p.puzzle #hud .obj{margin-top:2px!important}
body.mob-p .obj #lvname{font-size:13.5px!important;max-width:84vw!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:2px 6px 8px!important;border-width:0 22px!important;border-image-width:0 22px!important}
body.mob-p .obj #obj{font-size:12.5px!important;min-width:0!important;max-width:86vw;margin-top:-2px!important;padding:3px 12px 6px!important;border-width:0 18px!important;border-image-width:0 18px!important;white-space:nowrap}

/* --- реплики, обучение и подсказки идут сверху вниз под HUD и не накладываются (--hud-bottom ставит responsive.js) --- */
body.mob-p #storySpeech{top:calc(var(--hud-bottom,106px) + 6px)!important;left:max(8px,env(safe-area-inset-left))!important;right:max(8px,env(safe-area-inset-right))!important;width:auto!important;max-width:none!important;gap:6px!important}
body.mob-p #storySpeech .speech-portrait{width:44px!important;height:44px!important;flex:none}
body.mob-p .speech-bubble{padding:5px 10px!important;border-radius:14px!important;border-width:2px!important}
body.mob-p .speech-bubble::before{width:10px!important;height:10px!important;left:-6px!important;border-width:2px!important}
body.mob-p #storySpeech.foe .speech-bubble::before{left:auto!important;right:-6px!important}
body.mob-p .speech-bubble b{font-size:12.5px!important}
body.mob-p .speech-bubble p{font-size:13px!important;line-height:1.2!important;margin-top:1px!important}
body.mob-p #tutor{top:calc(var(--hud-bottom,106px) + 8px)!important;max-width:min(88vw,340px)!important;width:max-content;box-sizing:border-box;padding:7px 12px!important;border-radius:14px!important;border-width:3px!important;gap:4px!important}
body.mob-p #tutor .tt{font-size:14px!important;line-height:1.2}
body.mob-p #tutor .td i{width:7px!important;height:7px!important}
body.mob-p.story-speaking #tutor.on{top:var(--story-bottom,172px)!important}
body.is-mobile.story-speaking #tip{display:none!important}
body.mob-p #tip,body.mob-p[data-screen=play] #tip.actor-tip{left:50%!important;top:calc(var(--hud-bottom,106px) + 8px)!important;transform:translateX(-50%)!important;width:auto!important;max-width:88vw!important;font-size:13px!important}
body.mob-p #banner{max-width:88vw!important;white-space:normal!important;font-size:22px!important}

/* --- управление под большие пальцы --- */
body.mob-p #controls{padding:0 max(10px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important}
body.mob-p #joy{width:112px!important;height:112px!important}
body.mob-p #joy i{width:52px!important;height:52px!important;margin:-26px 0 0 -26px!important}
body.mob-p #controls .cr{gap:10px!important;align-items:flex-end!important}
body.mob-p #controls button.atk,body.mob-p #controls button.atk.gun{width:82px!important;height:82px!important}
body.mob-p #controls #touchDash{width:56px!important;height:56px!important}

/* --- окно прокачки героя в портрете: компактная карточка по центру без прокрутки --- */
body.mob-p .box.hxbox{width:min(86vw,336px)!important;max-width:336px!important;padding:4px 8px 8px!important;border-width:13px!important;border-image-width:13px!important;box-sizing:border-box!important}
body.mob-p .box.hxbox h3{font-size:16px!important;padding:4px 10px 9px!important;margin:0 38px 2px!important;border-width:0 26px!important;border-image-width:0 26px!important}
body.mob-p .box.hxbox .hx-sub{display:none!important}
body.mob-p .box.hxbox .hx{display:flex!important;flex-direction:column!important;align-items:center!important;gap:2px!important;margin:0 0 2px!important}
body.mob-p .box.hxbox .hx-l{width:100%!important;max-width:none!important;margin:0!important;gap:2px!important;--ar:30px;--ag:6px}
body.mob-p .box.hxbox .coins.hx-coins{width:108px!important;height:30px!important;font-size:13.5px!important;padding:0 6px 2px 32px!important;margin:0 auto 1px!important}
body.mob-p .box.hxbox .hx-pw{width:auto!important;padding:0 calc(var(--ar) + var(--ag))!important;margin:0 auto!important}
body.mob-p .box.hxbox .hx-pic{width:76px!important;height:auto!important;margin:0 auto!important;border-width:7px!important;border-image-width:7px!important}
body.mob-p .box.hxbox .hx-dots{gap:4px!important}
body.mob-p .box.hxbox .hx-dots i{width:7px!important;height:7px!important}
body.mob-p .box.hxbox .hx-dots i.on{width:16px!important}
body.mob-p .box.hxbox .hx-wp{display:none!important}
body.mob-p .box.hxbox .hx-r{width:100%!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:2px!important;text-align:center!important}
body.mob-p .box.hxbox .hx-name{font-size:18px!important;text-align:center!important;line-height:1.1!important}
body.mob-p .box.hxbox .hx-role{font-size:10.5px!important;text-align:center!important;line-height:1.15!important;display:block!important}
body.mob-p .box.hxbox .hx-lvl{justify-content:center!important;font-size:11.5px!important;width:100%!important;gap:5px!important}
body.mob-p .box.hxbox .hx-pips i{height:9px!important}
body.mob-p .box.hxbox .hx-st{justify-content:center!important;gap:8px!important;font-size:12px!important}
body.mob-p .box.hxbox .hx-st img{height:16px!important}
body.mob-p .box.hxbox .btn.hx-up{width:min(100%,240px)!important;min-height:34px!important;font-size:14px!important;margin:2px auto!important;border-width:7px!important;border-image-width:7px!important;--bw:7px!important}
body.mob-p .box.hxbox .hx-wfull{margin:1px 2px 2px!important}
body.mob-p .box.hxbox .hx-wfull .hx-wl{font-size:11px!important;text-align:center!important;margin:0 0 2px!important}
body.mob-p .box.hxbox .hx-wfull .hx-ws{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px 4px!important;margin:2px 0 6px!important;padding:4px!important;border-width:8px!important;border-image-width:16px!important;border-image-outset:4px!important}
body.mob-p .box.hxbox .hx-w{min-height:0!important;aspect-ratio:1/.84!important;border-width:4px!important;border-image-width:4px!important}
body.mob-p .box.hxbox .hx-wfull .hx-pr{font-size:8.5px!important;padding:0 3px!important;bottom:-7px!important}

/* ======================= ТЕЛЕФОН / ПЛАНШЕТ БОКОМ (body.mob-l) ======================= */
/* --- крупная шкала здоровья на горизонтальном экране телефона --- */
body.mob-l #hud .hp{--u:.58px!important;width:calc(340*var(--u))!important;height:calc(84*var(--u))!important;transform:none!important;flex:none!important;margin:0!important}
body.mob-l #hud #hpnum{font-size:15px!important;-webkit-text-stroke:2px #7a4a22!important}
body.mob-l #ammo{left:calc(82*var(--u))!important;top:calc(68*var(--u))!important;gap:1.5px!important}
body.mob-l #ammo i.ammo-round{width:10px!important;height:20px!important}
body.mob-l #ammo i.ammo-round.grenade{width:16px!important;height:20px!important}
body.mob-l #ammo i.ammo-round.rocket{width:28px!important;height:15px!important}
body.mob-l #ammo b{font-size:12px!important}
body.mob-l .reload-hud{width:28px!important;height:28px!important}
body.mob-l .reload-arrows{width:16px!important;height:16px!important}

/* --- меню: логотип «БИТВА ОВОЩЕЙ» в одну строку, под ним 2 аккуратные карточки --- */
body.mob-l #menu .logo:not(.logo-line){display:none!important}
/* размер задаёт высота, ширина идёт следом: картинка не сжимается ни на каком экране */
body.mob-l #menu .logo-line{display:block!important;width:auto!important;height:clamp(46px,20vh,104px)!important;max-width:min(86vw,640px)!important;max-height:none!important;object-fit:contain!important}
body.mob-l #menu .mcenter{flex:1 1 auto;justify-content:center!important;padding-top:clamp(6px,2vh,16px)!important;padding-bottom:clamp(10px,3vh,24px)!important;margin:0!important;gap:clamp(10px,3vh,18px)!important;min-height:0}
body.mob-l #menu .sub{display:none!important}
body.mob-l #menu .modes{flex-direction:row!important;flex-wrap:nowrap!important;width:min(72vw,520px)!important;gap:clamp(10px,2vw,18px)!important;justify-content:center;margin-top:0!important}
body.mob-l #menu .mode{flex:1 1 0!important;width:auto!important;max-width:248px!important;height:clamp(64px,17vh,80px)!important;min-height:0!important;font-size:clamp(15px,2.1vw,18px)!important;border-width:15px 14px 15px 58px!important;border-image-width:15px 14px 15px 58px!important;--bt:15px!important;--br:14px!important;--bl:58px!important}
body.mob-l #menu .mode b{left:-50px!important;top:-4px!important;width:50px!important;height:50px!important}
body.mob-l .box.hxbox{width:min(72vw,520px)!important;max-width:520px!important;padding:4px 10px 8px!important}
body.mob-l .box.hxbox .coins.hx-coins{width:116px!important;height:32px!important;font-size:14px!important;padding:0 6px 2px 34px!important}
@media (max-width:760px){
 body.mob-l #menu #mRecords{width:44px!important;min-width:44px!important;padding:0!important;font-size:0!important;display:flex!important;align-items:center;justify-content:center}
 body.mob-l #menu #mRecords .ico{height:24px!important;margin:0!important}
}
/* --- реплика с одной стороны, обучение с другой — не перекрываются --- */
body.mob-l.story-speaking #tutor.on{top:clamp(54px,14vh,84px)!important;max-width:min(360px,44vw)!important}
body.mob-l.story-speaking:has(#storySpeech:not(.foe)) #tutor.on{left:auto!important;right:max(12px,env(safe-area-inset-right))!important;transform:none!important}
body.mob-l.story-speaking:has(#storySpeech.foe) #tutor.on{left:max(12px,env(safe-area-inset-left))!important;right:auto!important;transform:none!important}
body.mob-l #storySpeech{max-width:min(360px,44vw)!important}

/* ==========================================================================
   v=407: проверка по docs/UI_RULES.md. Области нажатия не мельче ~40 px до масштаба окна (окно ещё увеличивает
   fitMobileModal), на телефоне боком длинные окна раскладываются в две-три колонки, а не сжимаются.
   ========================================================================== */
/* --- области нажатия --- */
body.is-mobile #modal .mx{width:40px!important;height:40px!important;padding:9px!important}
body.is-mobile .setrow .btn,body.is-mobile .setrow .seg .btn{min-height:36px!important;font-size:12px!important}
body.is-mobile #sOk{min-height:40px!important}
/* у ползунка видна тонкая дорожка, а нажимается полоса высотой 34 px */
body.is-mobile .vrange{box-sizing:content-box!important;padding:12px 0!important;background-clip:content-box!important;border:0!important;box-shadow:none!important}
body.is-mobile .vrange::-webkit-slider-thumb{width:24px!important;height:24px!important}
body.is-mobile .tabs button{min-height:38px!important;font-size:12px!important;padding:0 10px!important}
body.is-mobile .mission-card .btn{min-height:36px!important;font-size:12px!important}
body.is-mobile #missionBonus,body.is-mobile #missionClose,body.is-mobile #aBack{min-height:40px!important}
body.is-mobile .box.hxbox .hx-rec .btn{min-height:34px!important;font-size:12px!important}
body.is-mobile .box.hxbox .row2 .btn{min-height:40px!important;height:40px!important;font-size:12.5px!important}
body.mob-p .box.hxbox .btn.hx-up{min-height:40px!important}
body.mob-p .box.hxbox .hx-l{--ar:40px!important}
body.is-mobile .box.hxbox #hxPrev,body.is-mobile .box.hxbox #hxNext{min-width:40px!important;min-height:44px!important}
body.is-mobile #modal .box:not(.wide):not(.hxbox):not(:has(.setrow)):not(:has(>.emb)) .btn{min-height:42px!important}
body.mob-p .box:has(>.emb)>.btn,body.mob-p .box:has(>.emb.lose)>.btn{min-height:42px!important}
body.mob-l .box:has(>.emb)>.btn,body.mob-l .box:has(>.emb.lose)>.btn{min-height:42px!important;height:42px!important;font-size:13px!important}
body.mob-p #hud .grp .ib{width:42px!important;height:42px!important}
body.mob-p #hud .grp .ib .ico{height:26px!important}
body.mob-p #hud .grp .coins{width:84px!important;margin-left:2px!important}
body.mob-l #menu #mRecords{min-height:44px!important}
body.is-mobile .setrow>span small{font-size:10.5px!important}
body.is-mobile .mission-copy small{font-size:11px!important}

/* --- телефон и планшет боком: настройки и магазин в две колонки --- */
body.mob-l #modal .box:has(.setrow){width:min(84vw,600px)!important;max-width:600px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:4px 8px!important;align-items:stretch!important}
body.mob-l #modal .box:has(.setrow)>h3,body.mob-l #modal .box:has(.setrow)>#sOk{grid-column:1/-1!important}
body.mob-l #modal .box:has(.setrow)>.setrow{margin:0!important}
body.mob-l #modal .box:has(.shop):not(.wide):not(.hxbox):not(:has(.setrow)):not(:has(>.emb)){width:min(84vw,600px)!important;max-width:600px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px 8px!important}
body.mob-l #modal .box:has(.shop)>h3,body.mob-l #modal .box:has(.shop)>p,body.mob-l #modal .box:has(.shop)>#sClose{grid-column:1/-1!important}
body.mob-l #modal .box:has(.shop)>.shop{margin:0!important}
/* --- боком: задания в две колонки, карточка строкой (иконка, текст, кнопка) --- */
body.mob-l #modal .box.missions-box{width:min(84vw,660px)!important;max-width:660px!important}
body.mob-l .missions-box .mission-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px 8px!important}
/* --- магазин на мобильных: компактные строки, текст не раздувает карточку --- */
body.is-mobile .shop{gap:8px!important;padding:2px 4px!important;align-items:center!important}
body.is-mobile .shop .e .ico{height:30px!important}
body.is-mobile .shop .t{font-size:13px!important;line-height:1.15!important;min-width:0!important}
body.is-mobile .shop .t small{font-size:11px!important;line-height:1.15!important}
body.is-mobile #modal .box .shop .btn{min-width:74px!important;min-height:40px!important;font-size:13px!important;margin:0!important;flex:none!important;width:auto!important;padding:0 8px!important}
/* --- боком: в заданиях пояснение скрыто, бонус и «Назад» в одном ряду --- */
body.mob-l .missions-box .missions-info{display:none!important}
body.mob-l #modal .box.missions-box{display:grid!important;grid-template-columns:1fr 1fr!important;gap:4px 8px!important}
body.mob-l #modal .box.missions-box>*{grid-column:1/-1!important}
body.mob-l #modal .box.missions-box>#missionBonus{grid-column:1!important;margin-top:0!important}
body.mob-l #modal .box.missions-box>#missionBonus+#missionClose{grid-column:2!important;margin-top:0!important}
/* --- боком: окно героя шире, оружие в один ряд из 10 плиток --- */
body.mob-l .box.hxbox{width:min(86vw,720px)!important;max-width:720px!important}
/* всё оружие в один ряд, сколько бы его ни было: окно ниже, кнопки крупнее */
body.mob-l .box.hxbox .hx-wfull .hx-ws{grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important;gap:4px!important}
body.mob-l .box.hxbox .hx-wfull .hx-pr{font-size:9px!important;padding:0 2px!important}
body.mob-l .box.hxbox .row2 .btn{min-height:46px!important;height:46px!important;font-size:13.5px!important}
body.mob-l .box.hxbox .btn.hx-up{min-height:46px!important}
/* задание «зайди с ПК в Песочницу»: значок режима крупнее обычных иконок, золотая кайма */
.mission-card.pc-task{box-shadow:inset 0 0 0 2px #ffcf3a,0 0 10px #ffd23a66}
.mission-card.pc-task .mission-icon .ico{width:52px;height:52px}
body.compact-ui .mission-card.pc-task .mission-icon .ico{width:38px;height:38px}
body.is-mobile .mission-card.pc-task{grid-template-columns:36px minmax(0,1fr) auto!important}
body.is-mobile .mission-card.pc-task .mission-icon .ico{width:34px!important;height:34px!important}
/* --- крестик окна заданий не задевает вкладки --- */
body.is-mobile .missions-box .tabs.ctr{margin-top:10px!important}
/* --- планшеты: HUD, управление и меню крупнее (телефонный размер терялся на большом экране) --- */
@media (min-width:600px) and (min-height:800px){
 body.mob-p #hud,body.mob-p #controls,body.mob-p #menu .mtop,body.mob-p #menu .mcenter,body.mob-p #mGift{zoom:1.35}
 body.mob-p #storySpeech,body.mob-p #tutor.on,body.mob-p #tip{font-size:118%}
}
@media (min-width:900px) and (min-height:600px){
 body.mob-l #hud,body.mob-l #controls,body.mob-l #menu .mtop,body.mob-l #menu .mcenter,body.mob-l #mGift{zoom:1.25}
}

/* v=408: панель оружия на телефоне и планшете — один ряд крупных плиток, листается пальцем (на ПК — колесом и мышью).
   Сверху и снизу запас под замок и ценник, иначе прокрутка их обрезает. */
body.is-mobile .box.hxbox .hx-wfull .hx-ws{display:flex!important;grid-template-columns:none!important;justify-content:flex-start!important;align-items:center!important;gap:10px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:12px 10px 16px!important;margin:2px 2px 6px!important;scroll-snap-type:x proximity;scrollbar-width:none;overscroll-behavior:contain;touch-action:pan-x;-webkit-overflow-scrolling:touch}
body.is-mobile .box.hxbox .hx-wfull .hx-ws::-webkit-scrollbar{display:none}
body.is-mobile .box.hxbox .hx-wfull .hx-w{flex:0 0 62px!important;width:62px!important;height:62px!important;min-height:0!important;aspect-ratio:auto!important;scroll-snap-align:start;border-width:6px!important;border-image-width:6px!important}
body.is-mobile .box.hxbox .hx-wfull .hx-pr{font-size:11px!important;padding:0 5px!important;bottom:-10px!important}
body.is-mobile .box.hxbox .hx-wfull .hx-w .hx-lock{width:17px!important;right:-6px!important;top:-9px!important}
/* сообщение поверх открытого окна («Не хватает монет») — у верхнего края, не на имени героя */
body.is-mobile:has(#modal.on) #toast{top:4px!important}
/* подсказка «Купи биту!» живёт внутри прокручиваемой панели: даём ей место сверху и ставим ниже */
body.is-mobile .box.hxbox .hx-wfull .hx-ws:has(.hx-tutb){padding-top:40px!important}
body.is-mobile .box.hxbox .hx-wfull .hx-tutb{bottom:calc(100% + 6px)!important;font-size:12.5px!important;padding:3px 9px!important;border-width:2px!important}
/* стрелки «есть ещё» по краям панели: показываются, пока в ту сторону можно листать */
body.is-mobile .box.hxbox .hx-wfull{position:relative!important}
body.is-mobile .box.hxbox .hx-wfull::before,body.is-mobile .box.hxbox .hx-wfull::after{content:"";position:absolute;bottom:26px;width:26px;height:34px;z-index:4;pointer-events:none;opacity:0;transition:opacity .15s;
 background:#fff6e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='%236b3f1f' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;border:2px solid #6b3f1f;box-shadow:0 2px 0 #6b3f1f66}
body.is-mobile .box.hxbox .hx-wfull::after{right:-4px;border-radius:10px 0 0 10px;animation:hxMore .8s ease-in-out infinite alternate}
body.is-mobile .box.hxbox .hx-wfull::before{left:-4px;border-radius:0 10px 10px 0;transform:scaleX(-1)}
body.is-mobile .box.hxbox .hx-wfull.more-r::after,body.is-mobile .box.hxbox .hx-wfull.more-l::before{opacity:.95}
@keyframes hxMore{from{margin-right:0}to{margin-right:-4px}}
/* компьютер, невысокое окно браузера: задания в две колонки — список помещается без прокрутки */
@media (max-height:820px){body:not(.is-mobile) .missions-box .mission-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px 10px!important}}

/* v=416: всплывающие надписи (тосты) и подсказки в стиле реплик героев: кремовая плашка с коричневой рамкой */
body .toast,body.is-mobile .toast,body #tip,body.is-mobile #tip,body.compact-ui #tip{
 background:#fff6e8!important;background-image:none!important;border:3px solid #d9974c!important;border-image:none!important;border-radius:23px!important;
 box-shadow:0 3px 0 #a8743f55!important;color:#5b3410!important;font-family:Nunito,system-ui,sans-serif!important;font-weight:800!important;
 -webkit-text-stroke:0!important;text-shadow:none!important;padding:9px 18px!important;text-align:center}
body #tip::before{display:none!important}
body .toast{line-height:1.25}

/* v=417 (v=419: на ::after — ::before занят стрелкой обучения .tut-hl): зона нажатия джойстика шире самого кружка (невидимая): кружок прежний, но палец, съехавший в сторону, управление не теряет */
body.is-mobile #joy::after,body.touch-ui #joy::after{content:"";position:absolute;left:-34px;right:-56px;top:-64px;bottom:-34px;border-radius:50%;background:transparent}

/* v=418: окно героя на телефоне — панель оружия выровнена и не прижата. Стрелки «есть ещё» теперь по центру ряда плиток,
   внутри панели (раньше липли к краю и сидели ниже середины), между панелью и нижними кнопками — воздух. */
body.is-mobile .box.hxbox .hx-wfull::before,body.is-mobile .box.hxbox .hx-wfull::after{display:none!important}
body.is-mobile .box.hxbox .hx-wsw{position:relative!important;margin:0!important}
body.is-mobile .box.hxbox .hx-wsw::before,body.is-mobile .box.hxbox .hx-wsw::after{content:"";position:absolute;top:calc(50% - 3px);width:26px;height:34px;margin-top:-17px;z-index:4;pointer-events:none;opacity:0;transition:opacity .15s;border-radius:12px;
 background:#fff6e8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='%236b3f1f' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;border:2px solid #6b3f1f;box-shadow:0 2px 0 #6b3f1f66}
body.is-mobile .box.hxbox .hx-wsw::after{right:3px}
body.is-mobile .box.hxbox .hx-wsw::before{left:3px;transform:scaleX(-1)}
body.is-mobile .box.hxbox .hx-wfull.more-r .hx-wsw::after,body.is-mobile .box.hxbox .hx-wfull.more-l .hx-wsw::before{opacity:.95}
body.is-mobile .box.hxbox .hx-wfull .hx-ws{margin:0!important}
body.is-mobile .box.hxbox .hx-wfull{margin:4px 4px 10px!important}
body.is-mobile .box.hxbox .hx-wfull .hx-wl{margin:0 4px 5px!important;line-height:1.3!important}
body.is-mobile .box.hxbox .row2{margin-top:4px!important;padding-bottom:4px!important;gap:8px!important}

/* v=426: вкладки — одна цельная картинка на всю кнопку вместо рамки из 9 частей: при дробной плотности пикселей
   у 9-slice проступали швы и сдвинутая середина (тёмный прямоугольник внутри «Daily»). */
body .tabs button,body.is-mobile .tabs button{border-image:none!important;border-color:transparent!important;background:url(assets/ui/ui_tab.png?v=20) center/100% 100% no-repeat border-box!important}
body .tabs button.on,body.is-mobile .tabs button.on{background:url(assets/ui/ui_tab_on.png?v=20) center/100% 100% no-repeat border-box!important}

/* v=431: временное здоровье сверх полного — полоса золотая, число золотое */
#hpbar.over .trk>i{background:linear-gradient(#fff0a0,#ffcf2e 50%,#f0a400)!important}
#hpbar.over{filter:drop-shadow(0 0 6px #ffd23a)}
#hpnum.over{color:#ffe27a!important}

/* v=435: патроны — один стиль и один размер для всего оружия на ПК и телефоне. Высота у всех значков общая (--ah),
   ширина — по пропорции картинки (пуля 1:2, граната 4:5, ракета 2:1, копьё, стрела, нож — узкие). Шкала топлива огнемёта,
   «+N» и перезарядка — от той же высоты. Раньше размеры были разные, а для копий/стрел/ножей на телефоне боком правил не было вовсе */
#hud #ammo{--ah:40px;gap:calc(var(--ah)*.06)!important;align-items:center!important;flex-wrap:nowrap!important}
@media (max-height:480px){#hud #ammo{--ah:28px}}
body.mob-l #hud #ammo{--ah:20px}
body.mob-p #hud #ammo{--ah:16px}
#hud #ammo i.ammo-round{height:var(--ah)!important;width:calc(var(--ah)*.5)!important;background-size:contain!important;background-position:center!important;flex:none!important}
#hud #ammo i.ammo-round.grenade{width:calc(var(--ah)*.8)!important}
#hud #ammo i.ammo-round.rocket{width:calc(var(--ah)*2)!important}
#hud #ammo i.ammo-round.spear{width:max(4px,calc(var(--ah)*.19))!important}
#hud #ammo i.ammo-round.arrow{width:max(4px,calc(var(--ah)*.25))!important}
#hud #ammo i.ammo-round.knife{width:max(5px,calc(var(--ah)*.3))!important}
#hud #ammo b{font-size:calc(var(--ah)*.5)!important;line-height:1!important}
#hud #ammo .fuel-hud{gap:calc(var(--ah)*.12)!important}
#hud #ammo .fuel-hud img{width:calc(var(--ah)*1.2)!important;height:calc(var(--ah)*1.2)!important;margin:calc(var(--ah)*-.1) 0!important}
#hud #ammo .fuel-hud i{width:calc(var(--ah)*2.2)!important;height:calc(var(--ah)*.36)!important}
#hud #ammo .reload-hud{width:calc(var(--ah)*1.3)!important;height:calc(var(--ah)*1.3)!important}
#hud #ammo .reload-arrows{width:calc(var(--ah)*.78)!important;height:calc(var(--ah)*.78)!important}

/* v=436: центровка надписей (проверка tools/centeraudit.js) */
/* значки без подписи в верхней панели меню (портрет): текст скрыт font-size:0, но gap от #mRecords сдвигал значок на 3 px */
body.mob-p #menu .mtop .btn.sm,body.mob-l #menu #mRecords{gap:0!important}
/* кнопки окон на телефоне: значок и текст в одну строку — при переносе текст уезжал от значка и блок был не по центру */
body.is-mobile #modal .btn{white-space:nowrap!important}
/* окно героя в портрете: кнопка временного буста узкая — мельче шрифт и значок, чтобы «+25% урона» не выходил за край */
body.mob-p .box.hxbox .row2 #hxBoost,body.mob-p .box.hxbox .row2 #hxLive{font-size:10.5px!important;gap:2px!important;padding:0 2px!important}
body.mob-p .box.hxbox .row2 #hxBoost .ico,body.mob-p .box.hxbox .row2 #hxLive .ico{height:1.15em!important}
/* портрет: в узкой кнопке буста значок 🎬 лишний — кнопка и так фиолетовая (реклама), остаётся значок самого буста */
body.mob-p .box.hxbox .row2 #hxBoost>.ico:first-child,body.mob-p .box.hxbox .row2 #hxLive>.ico:first-child{display:none!important}

/* v=440: карта глав на ПК шире — на широком экране все 8 глав акта в один ряд, баннер акта не раздувается */
@media (min-width:900px){
 body:not(.is-mobile) #modal .box:has(.lv){width:min(1040px,92vw)!important;max-width:none!important}  /* v=449: 14 глав в акте — два ряда по 7, карточки крупнее */  /* v=442: было до 1180 px — слишком широко */
 /* в актах по 12–13 глав: ряды по 7 (при 8 длинные названия рвались посреди слова), неполный ряд — по центру */
 body:not(.is-mobile) #modal .box:has(.lv) .lv{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;gap:10px!important}
 body:not(.is-mobile) #modal .box:has(.lv) .lv>.lvc{flex:0 0 calc((100% - 60px)/7)!important;box-sizing:border-box;min-width:0!important;max-width:calc((100% - 60px)/7)!important}
 /* баннер акта — в родной пропорции 3:1: рамка ui_act_frame растягивается на 100% и при сжатии по высоте ломалась в углах */
}

/* v=448: фон баннера акта только внутри рамки ui_act_frame (1200×400, окно x 66–1137, y 98–333): раньше небо
   выглядывало над рамкой и по бокам. Обрезка с запасом под непрозрачную рамку, в процентах — на любом размере */
.acth .actimg{clip-path:inset(21% 4.6% 13.5% 4.6% round 4%)}

/* v=449: лор — летопись актов на карте глав и окно «Летопись огорода» */
.act-lore{margin:4px 6px 10px;font-size:14px;line-height:1.45;color:#5b3410;text-align:left;font-weight:700}
.act-lore.lock{opacity:.6;font-style:italic}
.lore-btn{margin:0 0 0 6px!important;vertical-align:middle;min-height:0!important;padding:2px 10px!important;font-size:13px!important}
.lore-body{max-height:62vh;overflow-y:auto;text-align:left;padding:0 6px}
.lore-p{font-size:15px;line-height:1.55;color:#5b3410;margin:6px 0 10px;font-weight:700}
.lore-p.lock,.lore-act.lock{opacity:.55;font-style:italic}
.lore-act{margin:14px 0 2px;font-size:17px;color:#a2581a}
body.is-mobile .act-lore{font-size:12px!important;margin:3px 4px 8px!important}
body.is-mobile .lore-p{font-size:13px!important}

/* v=449: 14 глав в акте — телефон вертикально 2 в ряд (7 рядов), боком 7 в ряд (2 ряда); карточки крупнее */
body.mob-p #modal .box:has(.lv){width:min(92vw,480px)!important}
body.mob-p #modal .box:has(.lv) .lv{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
body.mob-l #modal .box:has(.lv){width:min(94vw,900px)!important}
body.mob-l #modal .box:has(.lv) .lv{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:6px!important}
body.mob-l #modal .box:has(.lv) .lvc small{font-size:10.5px!important;min-height:0!important}

/* v=451: меню на телефоне — блок с логотипом и режимами выше, ближе к верхней панели (внизу больше места бойцам) */
body.mob-p #menu .mcenter{justify-content:flex-start!important;padding-top:clamp(8px,2.5vh,22px)!important}
body.mob-l #menu .mcenter{justify-content:flex-start!important;padding-top:clamp(2px,1vh,8px)!important}
/* v=453: карта глав на телефоне боком — баннер акта уже (в пропорции 3:1 на всю ширину он был выше экрана), по центру */
body.mob-l #modal .box:has(.lv) .acth{width:min(60%,520px)!important;margin-left:auto!important;margin-right:auto!important}
body.mob-l #modal .box:has(.lv) .act-lore{text-align:center!important}
/* портрет: заголовок карты в одну строку */
body.mob-p #modal .box:has(.lv)>h3{white-space:nowrap!important;font-size:15px!important}
/* шапка карты глав на телефоне боком — компактная: экран низкий, главное — главы */
body.mob-l #modal .box:has(.lv)>h3{font-size:15px!important;padding-top:2px!important;padding-bottom:7px!important;margin-bottom:2px!important}
body.mob-l #modal .box:has(.lv)>p{font-size:12px!important;margin:2px 0!important;line-height:1.3!important}
body.mob-l #modal .box:has(.lv) .legend{font-size:11px!important;margin:2px 0 4px!important}
body.is-mobile #modal .box .lore-btn{display:inline-flex!important;width:auto!important;min-height:24px!important;height:24px!important;font-size:11.5px!important;padding:0 8px!important;margin:0 0 0 6px!important;border-width:6px!important;border-image-width:6px!important;vertical-align:middle!important}

/* v=464: карта глав — шапка одной плашкой (слоган, обозначения крупнее, «Летопись» внутри), название акта и звёзды —
   в плашке под баннером вместе с летописью акта, а не на краю рамки */
.map-head{background:#fff6e8;border:3px solid #d9974c;border-radius:18px;box-shadow:0 3px 0 #a8743f44;padding:10px 14px 12px;margin:4px 4px 12px;display:flex;flex-direction:column;align-items:center;gap:8px}
.map-head .map-tag{margin:0;font-size:16px;font-weight:800;color:#5b3410;text-align:center;line-height:1.35}
.map-legend{display:flex!important;flex-wrap:wrap;justify-content:center;gap:6px 10px;margin:0!important;font-size:15px!important}
.map-legend span{display:inline-flex;align-items:center;gap:5px;background:#f6e3c2;border-radius:12px;padding:3px 10px;color:#5b3410;font-weight:800}
.map-legend .ico{height:1.5em!important;vertical-align:middle!important}
.map-head .lore-btn{margin:0!important}
.act-plate{background:#fff6e8;border:3px solid #d9974c;border-radius:16px;box-shadow:0 3px 0 #a8743f44;margin:-4px 4px 12px;padding:8px 14px 10px}
.act-plate.lock{opacity:.7}
.act-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}
.act-name{font-size:20px;font-weight:900;color:#a2581a}
.act-stars{font-style:normal;font-weight:900;font-size:17px;color:#5b3410;background:#f6e3c2;border-radius:14px;padding:2px 10px;display:inline-flex;align-items:center;gap:4px}
.act-stars .ico{height:1.2em}
.act-plate .act-lore{margin:0!important;text-align:left!important}
body.is-mobile .map-head{padding:6px 8px 8px!important;gap:5px!important;margin:2px 2px 8px!important}
body.is-mobile .map-head .map-tag{font-size:12.5px!important}
body.is-mobile .map-legend{font-size:11.5px!important;gap:4px 6px!important}
body.is-mobile .map-legend span{padding:2px 7px!important}
body.is-mobile .act-plate{padding:6px 9px 8px!important;margin:-2px 2px 8px!important}
body.is-mobile .act-name{font-size:15px!important}
body.is-mobile .act-stars{font-size:13px!important}
/* v=464: портрет — блок логотипа и режимов посередине между верхней панелью и бойцами (по разметке пользователя) */
body.mob-p #menu .mcenter{justify-content:center!important;padding-top:0!important;padding-bottom:17vh!important}

/* v=466: меню на телефоне вертикально — таблица лидеров слева и задания справа под верхней панелью, магазин и настройки крупнее,
   общий блок (логотип и режимы) чуть ниже; боком — общий блок чуть ниже */
body.mob-p #menu .mtop{position:relative!important}
body.mob-p #menu .mtop .menu-wallet,body.mob-p #menu .mtop>div{position:static!important}
body.mob-p #menu .mtop #mRecords{position:absolute!important;left:2px;top:calc(100% + 12px)}
body.mob-p #menu .mtop #mMissions{position:absolute!important;right:2px;top:calc(100% + 12px)}
body.mob-p #menu .mtop #mShop,body.mob-p #menu .mtop #mSet{width:52px!important;min-width:52px!important;height:52px!important;min-height:52px!important}
body.mob-p #menu .mtop #mShop .ico,body.mob-p #menu .mtop #mSet .ico{height:34px!important}
body.mob-p #menu .mcenter{padding-top:9vh!important;padding-bottom:12vh!important}
body.mob-l #menu .mcenter{padding-top:clamp(10px,4vh,22px)!important}

/* v=468: бонусы под полосой здоровья (ускорение, щит, временное здоровье) */
#buffs{position:fixed;z-index:6;display:none;flex-direction:column;gap:6px;pointer-events:none}
#buffs .buff{display:flex;align-items:center;gap:6px;background:#fff6e8;border:3px solid #d9974c;border-radius:14px;padding:3px 9px 3px 4px;box-shadow:0 3px 0 #a8743f55;animation:pop .25s}
#buffs .buff img{width:30px;height:30px;object-fit:contain}
#buffs .buff b{font:900 15px Nunito,system-ui;color:#5b3410;min-width:28px}
body.is-mobile #buffs .buff{padding:2px 7px 2px 3px;border-width:2px}
body.is-mobile #buffs .buff img{width:22px;height:22px}
body.is-mobile #buffs .buff b{font-size:12px}
body:not([data-screen=play]) #buffs{display:none!important}

/* v=469: панель оружия на телефоне — поле ровно на 3 карточки (62 + 10 + 62 + 10 + 62 + поля 2×10 = 226 px), по центру;
   стрелки «есть ещё» — по бокам от поля, не на карточках и не впритык к рамке окна */
body.mob-p .box.hxbox .hx-wsw{display:flex!important;justify-content:center!important;padding:0 40px!important}
body.mob-p .box.hxbox .hx-wfull .hx-ws{width:226px!important;max-width:226px!important;flex:none!important;box-sizing:border-box!important}
body.mob-p .box.hxbox .hx-wsw::before{left:calc(50% - 113px - 34px)!important}
body.mob-p .box.hxbox .hx-wsw::after{right:calc(50% - 113px - 34px)!important}
/* боком — широкий ряд, стрелки в отступах по краям, не на карточках */
body.mob-l .box.hxbox .hx-wsw{padding:0 34px!important}
body.mob-l .box.hxbox .hx-wsw::before{left:2px!important}
body.mob-l .box.hxbox .hx-wsw::after{right:2px!important}
/* бонусы видны — реплика героя сдвигается правее, чтобы не наезжать на них */
body.has-buffs:not(.mob-p) #storySpeech{left:calc(var(--safe-left,16px) + 70px)!important}
body.mob-p.has-buffs #storySpeech{padding-left:44px!important}
#buffs .buff i{font:900 13px Nunito,system-ui;font-style:normal;color:#fff;background:#e0792b;border-radius:10px;padding:1px 6px;margin-left:-2px}
body.is-mobile #buffs .buff i{font-size:11px;padding:0 5px}
/* v474: квадратные/узкие окна на ПК (Scale test 1:1) — логотип не наезжает на верхнюю панель */
@media (max-aspect-ratio:4/3){body:not(.is-mobile) #menu .mcenter{margin-top:0!important;padding-top:clamp(20px,4vh,40px)}body:not(.is-mobile) #menu .logo:not(.logo-line){height:min(220px,26vh)}}
/* v474: ПК-окно 700–900px шириной и высокое (Scale test 1:1) — compact-ui включается по ширине, но верх не должен быть мелким */
@media (min-width:700px) and (min-height:700px){
body.compact-ui:not(.is-mobile) #top .ib,body.compact-ui:not(.is-mobile) #hud .ib{width:56px!important;height:56px!important}
body.compact-ui:not(.is-mobile) #top .ib .ico,body.compact-ui:not(.is-mobile) #hud .ib .ico{height:36px!important}
body.compact-ui:not(.is-mobile) #top .coins{width:150px!important;height:50px!important;font-size:20px!important;padding-left:52px!important}
body.compact-ui:not(.is-mobile) #top .sbcount{font-size:15px!important;padding:3px 8px!important}
body.compact-ui:not(.is-mobile) #top .sbcount .ico{height:20px!important}
body.compact-ui:not(.is-mobile) #hud .hp{--u:.76px!important}
body.compact-ui:not(.is-mobile) #hud .obj{max-width:none!important}
body.compact-ui:not(.is-mobile) #hud #lvname{max-width:min(296px,38vw)!important;font-size:15.5px!important;border-width:0 22px!important;border-image-width:0 22px!important}
body.compact-ui:not(.is-mobile) #hud #obj{font-size:15px!important}
body.compact-ui:not(.is-mobile) #hud #levelWallet{width:124px!important;height:44px!important;font-size:18px!important}
}
/* v474: долгое нажатие на мобильных — без системного меню, выделения и перетаскивания картинок */
html,body,body *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
img{-webkit-user-drag:none;user-drag:none}
input,textarea{-webkit-user-select:text;user-select:text}
/* v492: кнопка прыжка справа — только на мобильных (на ПК прыжок на клавишах, раскладка не меняется) */
#controls #touchJump{display:none}
body.is-mobile #controls #touchJump{display:block;width:clamp(54px,17vh,76px);height:clamp(54px,17vh,76px);border-radius:50%;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 8 56 34H42v20H22V34H8z' fill='%23ffb43c' stroke='%237a4318' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") center 44%/50% no-repeat,radial-gradient(circle at 50% 34%,#fffaf0,#fbe9c6 58%,#efcf94);border:3px solid #e6b56e;box-shadow:0 6px 0 #b8743a,0 8px 6px #5a2e1255,inset 0 -5px 0 #e9c587}
body.is-mobile #controls #touchJump.on{transform:translateY(4px) scale(.95);filter:none;box-shadow:0 2px 0 #b8743a,inset 0 -3px 0 #e9c587}
body.mob-p #controls #touchJump{width:68px!important;height:68px!important}
/* v493: рывок на телефонах крупнее */
body.is-mobile #controls #touchDash{width:clamp(62px,19vh,84px);height:clamp(62px,19vh,84px);font-size:34px}
body.mob-p #controls #touchDash{width:66px!important;height:66px!important}
body.is-mobile #touchDash .dash-glyph{transform:translate(-50%,-50%) scale(1.25)}
/* v495: прыжок чуть меньше атаки; рывок отодвинут от джойстика */
body.is-mobile #controls #touchDash{margin-left:clamp(14px,5vh,28px)}
body.mob-p #controls #touchDash{margin-left:12px!important}
#buffs .buff.wp{border-color:#a97be0}  /* v497: оружие из ящика — сколько ударов/выстрелов осталось */
body.is-mobile .rec-note{margin:0 0 4px!important;font-size:11.5px!important}
/* v542: рывок на Q, кнопка рывка крупнее (была 68 / 56–84 px) */
#controls #touchDash{width:88px;height:88px}
body.touch-ui #controls #touchDash{width:clamp(70px,22vh,98px);height:clamp(70px,22vh,98px)}
body.is-mobile #controls #touchDash{width:clamp(76px,23vh,104px);height:clamp(76px,23vh,104px)}
body.mob-p #controls #touchDash{width:80px!important;height:80px!important}
#touchDash .dash-glyph{transform:translate(-50%,-50%) scale(1.35)}
body.is-mobile #touchDash .dash-glyph{transform:translate(-50%,-50%) scale(1.6)}
