/* HEAVEN mobile gamepad — production gameplay only; no menu/global UI changes. */
.mobile-controls{
 position:absolute;inset:0;z-index:75;pointer-events:none;
 touch-action:none;user-select:none;-webkit-user-select:none;
}
.mobile-controls[hidden],.mobile-game-chrome[hidden]{display:none!important}
.mobile-controls button{
 pointer-events:auto;touch-action:none;-webkit-touch-callout:none;user-select:none;
 position:relative;display:flex;align-items:center;justify-content:center;
 background:rgba(12,25,40,.78);color:#eaf9ff;border:1px solid rgba(143,204,226,.65);
 border-radius:12px;min-width:0;min-height:0;width:100%;height:47px;
 padding:4px;font:700 11px/1.15 system-ui;letter-spacing:.02em;
 box-shadow:inset 0 1px #e6f7ff19,0 3px 9px #0006;
}
.mobile-controls button.held{background:rgba(61,125,160,.94);border-color:#d9f8ff;box-shadow:0 0 15px #62d3fb66}
.mobile-joystick{
 pointer-events:auto;touch-action:none;-webkit-touch-callout:none;
 position:absolute;left:max(15px,env(safe-area-inset-left));bottom:max(26px,env(safe-area-inset-bottom));
 display:flex;align-items:center;justify-content:center;
 width:122px;height:122px;border-radius:50%;
 border:1.5px solid rgba(127,211,240,.61);background:radial-gradient(circle,#223a4d69 0%,#081623b8 67%,#061324c9 100%);
 box-shadow:0 0 0 6px #06172740,inset 0 0 20px #7ebfea29,0 10px 26px #0008;
}
.mobile-joystick-ring{
 position:absolute;inset:15px;border:1px solid #8adfff33;border-radius:50%;pointer-events:none;
}
.mobile-joystick-ring:after{
 content:'';position:absolute;inset:22px;border:1px solid #8adfff19;border-radius:50%;
}
.mobile-joystick-knob{
 position:absolute;top:50%;left:50%;width:52px;height:52px;border-radius:50%;
 transform:translate(-50%,-50%);pointer-events:none;
 border:2px solid #a7eaff;background:radial-gradient(circle at 33% 26%,#5397ad,#27546d 68%,#152e45);
 box-shadow:0 2px 12px #000b,inset 0 1px 6px #d4f6ff55;
}
.mobile-joystick-label{
 position:absolute;bottom:-17px;left:0;right:0;text-align:center;
 font:700 10px system-ui;letter-spacing:.17em;color:#a7d5e8;pointer-events:none;
}
.mobile-joystick.moving{border-color:#d0f7ff;box-shadow:0 0 0 6px #46b8e226,0 0 21px #70baff40}
.mobile-actions{
 position:absolute;right:max(12px,env(safe-area-inset-right));bottom:max(22px,env(safe-area-inset-bottom));
 display:grid;grid-template-columns:repeat(3,minmax(0,55px));gap:6px;pointer-events:none;
}
.mobile-actions .mobile-fire{background:rgba(140,57,36,.83);border-color:#ffb48e}
.mobile-hint{
 position:absolute;left:50%;bottom:8px;transform:translateX(-50%);
 max-width:42%;text-align:center;white-space:nowrap;
 font:600 9px system-ui;color:#b9dce0a3;pointer-events:none;
}
.mobile-game-chrome{
 position:absolute;right:max(12px,env(safe-area-inset-right));top:max(69px,calc(env(safe-area-inset-top) + 8px));
 z-index:90;pointer-events:none;
}
.mobile-fullview{
 pointer-events:auto;touch-action:manipulation;
 min-height:39px;padding:7px 12px;
 background:rgba(10,25,39,.92);color:#d5f7ff;
 border:1px solid #77c0db;border-radius:8px;
 font:700 10px system-ui;letter-spacing:.07em;
 box-shadow:0 5px 20px #000a;
}
@media (max-width:760px){
 body.mobile-world-fullscreen #app.app{
  grid-template-rows:minmax(0,1fr)!important;
 }
 body.mobile-world-fullscreen #app .topbar,
 body.mobile-world-fullscreen #app footer{
  display:none!important;
 }
 body.mobile-world-fullscreen #app #screen{
  grid-row:1!important;grid-column:1!important;
  padding:0!important;margin:0!important;height:100dvh!important;
 }
 body.mobile-world-fullscreen .world-wrap{
  inset:0!important;width:100vw!important;height:100dvh!important;
 }
 body.mobile-world-fullscreen .mobile-game-chrome{
  top:max(9px,env(safe-area-inset-top));
 }
 body.mobile-world-fullscreen #app #mobileNavToggle{display:none!important}
}
@media (max-width:400px){
 .mobile-joystick{width:112px;height:112px}
 .mobile-actions{grid-template-columns:repeat(3,minmax(0,48px));gap:5px;right:max(8px,env(safe-area-inset-right))}
 .mobile-controls button{height:43px;font-size:10px}
}
@media (max-height:480px){
 .mobile-joystick{width:105px;height:105px;bottom:max(13px,env(safe-area-inset-bottom))}
 .mobile-joystick-label{display:none}
 .mobile-actions{bottom:max(8px,env(safe-area-inset-bottom))}
 .mobile-controls button{height:40px}
 .mobile-hint{display:none}
}
@media (min-width:761px) and (pointer:fine){
 .mobile-game-chrome{display:none}
}

/* HEAVEN_MOBILE_FPS_312: adaptive multi-touch controls. */
body.heaven-touch-game .mobile-controls,body.heaven-touch-game .mobile-controls *{-webkit-touch-callout:none!important;-webkit-user-select:none!important;user-select:none!important;-webkit-tap-highlight-color:transparent!important}
body.heaven-touch-game .mobile-controls .mobile-actions{grid-template-columns:repeat(4,minmax(0,clamp(39px,6vw,62px)))!important;gap:clamp(3px,.7vw,7px)!important}
body.heaven-touch-game .mobile-controls .mobile-actions button{height:clamp(36px,10dvh,55px)!important;min-height:36px!important;font-size:clamp(8px,1.25vw,11px)!important}
body.heaven-touch-game .mobile-controls .mobile-actions .mobile-ads-fire{background:rgba(137,56,39,.95)!important;border-color:#f6ac86!important}
body.heaven-touch-game .mobile-controls .mobile-actions button.aim-locked{background:#18567f!important;border-color:#b1eaff!important;box-shadow:0 0 17px #5cd5ff88!important}
body.heaven-touch-game .mobile-game-chrome{display:flex!important;gap:4px;pointer-events:auto!important;align-items:center}
body.heaven-touch-game .mobile-game-chrome .mobile-hud-edit,body.heaven-touch-game .mobile-game-chrome .mobile-hud-reset{min-height:35px;border:1px solid #7aaabe;border-radius:6px;background:#122c42;color:#e2f2ff;font:700 10px system-ui;padding:6px 9px;touch-action:manipulation;pointer-events:auto}
body.heaven-mobile-hud-edit .mobile-controls button,body.heaven-mobile-hud-edit .mobile-joystick{border-style:dashed!important;border-color:#f9d77a!important}
@media(pointer:coarse) and (orientation:landscape) and (max-width:1200px){
 body.heaven-touch-game .mobile-controls .mobile-actions{right:max(7px,env(safe-area-inset-right))!important;bottom:max(6px,env(safe-area-inset-bottom))!important}
 body.heaven-touch-game .mobile-controls .mobile-actions button{height:clamp(35px,11dvh,52px)!important;min-height:35px!important}
 body.heaven-touch-game .mobile-controls .mobile-joystick{width:clamp(96px,26dvh,148px)!important;height:clamp(96px,26dvh,148px)!important}
 body.heaven-touch-game .mobile-game-chrome{top:max(40px,env(safe-area-inset-top))!important}
}
@media(pointer:coarse) and (orientation:portrait){
 body.heaven-touch-game .mobile-controls .mobile-actions{grid-template-columns:repeat(3,minmax(0,clamp(40px,12vw,56px)))!important}
}
