/* BOOM WORLD 1.7.1 — dedicated mobile game presentation */
@media (max-width:820px), (pointer:coarse) {
  html,body.boom-world{width:100%;height:100%;height:100dvh;min-height:100dvh;overflow:hidden!important;overscroll-behavior:none}
  body.boom-world{padding:0!important;background:#020512!important;touch-action:manipulation}
  body.boom-world:before,body.boom-world:after{display:none!important}

  /* Compact top command strip */
  .world-command{position:fixed!important;left:7px;right:7px;top:max(7px,env(safe-area-inset-top));z-index:45!important;width:auto!important;height:52px!important;min-height:52px!important;margin:0!important;padding:7px 9px!important;gap:7px!important;border-radius:16px!important;background:rgba(4,10,27,.88)!important;backdrop-filter:blur(14px)!important;box-shadow:0 10px 28px rgba(0,0,0,.35)!important}
  .world-brand{min-width:0!important;flex:1!important;gap:8px!important}.world-ball{width:34px!important;height:34px!important;border-width:2px!important}.world-ball:after{width:9px!important;height:9px!important;border-width:2px!important}.world-brand-copy strong{font-size:12px!important;white-space:nowrap}.world-brand-copy span{font-size:6px!important;margin-top:2px!important}
  .world-telemetry{position:fixed!important;left:13px;right:13px;top:66px;z-index:38!important;display:flex!important;gap:6px!important;pointer-events:none}.world-chip{display:none!important;min-height:0!important;padding:5px 8px!important;border-radius:999px!important;background:rgba(3,9,25,.78)!important;backdrop-filter:blur(9px)}.world-chip:nth-child(2),.world-chip:nth-child(3){display:block!important;flex:0 1 auto!important}.world-chip span{display:none!important}.world-chip b{font-size:8px!important;line-height:1.2!important;letter-spacing:.04em}.world-chip:nth-child(2) b:before{content:"ZONE // ";color:var(--w-muted)}
  .world-quick{gap:4px!important}.world-quick button{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:0!important;border-radius:10px!important;font-size:.8rem!important}.world-quick #world-switch-account{display:none!important}

  /* The world is the scene — no scrolling document */
  .boom-world .wrap{position:fixed!important;inset:0!important;z-index:1!important;display:block!important;width:100%!important;height:100%!important;max-width:none!important;margin:0!important;padding:0!important}
  .boom-world #game-frame{position:absolute!important;left:0!important;right:0!important;top:0!important;bottom:auto!important;z-index:1!important;width:100%!important;height:auto!important;aspect-ratio:320/288!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#061020!important}
  .boom-world #game-frame:before{top:72px!important;left:auto!important;right:12px!important;padding:4px 7px!important;font-size:6px!important;opacity:.8}.boom-world #game-frame:after{box-shadow:inset 0 0 34px rgba(0,0,0,.24)!important}
  .boom-world #game{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-width:0!important;transform:none!important;image-rendering:pixelated!important}
  .boom-world #nametags{z-index:7!important}

  /* Status becomes a small non-blocking pill */
  .boom-world #status{position:fixed!important;left:12px!important;right:12px!important;top:96px!important;z-index:36!important;width:auto!important;min-height:32px!important;max-height:42px!important;margin:0!important;padding:6px 10px!important;border-radius:12px!important;background:rgba(3,9,25,.76)!important;backdrop-filter:blur(8px);font-size:.72rem!important;line-height:1.1!important;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 7px 20px rgba(0,0,0,.25)!important}.boom-world #status:before{font-size:.6rem!important;margin-right:6px!important}

  /* Trainer interaction floats inside map and never changes layout */
  .boom-world #npc-float{position:absolute!important;left:50%!important;bottom:175px!important;z-index:42!important;min-width:0!important;width:min(250px,68vw)!important;padding:7px 9px!important;border-radius:14px!important;transform:translateX(-50%)!important;background:rgba(4,10,27,.9)!important}.boom-world #npc-float .nf-name{font-size:.58rem!important;margin-bottom:5px!important}.boom-world #npc-float button{min-height:34px!important;padding:7px!important;font-size:.57rem!important}.boom-world #btn-npc-fight,.boom-world #npc-hint{display:none!important}

  /* Compact transparent controls directly on the world */
  .boom-world .dpad-wrap{position:fixed!important;left:50%!important;top:clamp(145px,calc(90vw - 148px),calc(100dvh - 155px))!important;bottom:auto!important;z-index:34!important;display:flex!important;width:142px!important;height:142px!important;margin:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;backdrop-filter:none!important;transform:translateX(-50%)!important;box-shadow:none!important;transition:opacity .15s,transform .15s!important}
  .boom-world .dpad{grid-template-columns:44px 44px 44px!important;grid-template-rows:44px 44px 44px!important;gap:5px!important;width:142px!important;height:142px!important}.boom-world .dpad button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;border:1px solid rgba(91,226,255,.34)!important;border-radius:13px!important;background:rgba(8,18,42,.69)!important;backdrop-filter:blur(7px);color:var(--w-cyan)!important;font-size:.88rem!important;box-shadow:0 5px 16px rgba(0,0,0,.28)!important}.boom-world .dpad .mid{background:radial-gradient(circle,#ff526b 0 24%,#fff 26% 42%,rgba(12,24,52,.78) 44%)!important}.boom-world .dpad button:active,.boom-world .dpad button.pressed{background:rgba(82,234,255,.84)!important;color:#03101c!important}
  .boom-world.world-layer-open .dpad-wrap,.boom-world.world-battle-open .dpad-wrap{opacity:0!important;pointer-events:none!important;transform:translateX(-50%) translateY(12px)!important}

  /* Party deck and secondary desktop content are removed from the play surface */
  .boom-world .hud{display:none!important}.boom-world .sprite-bar,.boom-world>.wrap>.hint,.boom-world>.wrap>a.back{display:none!important}

  /* Login is a modal only when needed */
  .boom-world .auth{position:fixed!important;inset:0!important;z-index:70!important;display:flex!important;align-content:center!important;justify-content:center!important;flex-direction:column!important;width:100%!important;height:100%!important;padding:28px!important;border:0!important;border-radius:0!important;background:rgba(2,6,18,.91)!important;backdrop-filter:blur(14px)!important}.boom-world .auth input,.boom-world .auth button{display:block!important;width:min(360px,100%)!important;flex:0 0 auto!important;margin:0 auto!important}.boom-world .auth .msg{width:min(360px,100%);margin:6px auto;text-align:center}.boom-world.world-authenticated .auth{display:none!important}

  /* Social and chat are bottom sheets; only one can exist at a time */
  .boom-world .trade-panel,.boom-world .world-chat{position:fixed!important;left:8px!important;right:8px!important;bottom:max(8px,env(safe-area-inset-bottom))!important;top:auto!important;z-index:58!important;display:block!important;width:auto!important;max-width:none!important;max-height:min(68dvh,560px)!important;margin:0!important;padding:44px 14px 14px!important;border-radius:24px!important;background:linear-gradient(155deg,rgba(14,27,61,.98),rgba(3,8,24,.99))!important;box-shadow:0 -16px 70px rgba(0,0,0,.62)!important;overflow:auto!important;transform:translateY(calc(100% + 30px))!important;opacity:0!important;pointer-events:none!important;transition:transform .22s ease,opacity .18s ease!important}.boom-world .trade-panel.mobile-open,.boom-world .world-chat.mobile-open{transform:translateY(0)!important;opacity:1!important;pointer-events:auto!important}.boom-world .world-chat .ch-hint{font-size:.7rem!important}.boom-world .world-chat .ch-compose{display:flex!important}.boom-world .world-chat .ch-compose input{min-width:0!important}.boom-world .world-sheet-close{position:absolute!important;right:12px!important;top:10px!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;padding:0!important;border-radius:10px!important;background:rgba(255,255,255,.07)!important;color:white!important;font-size:1rem!important}.boom-world .trade-panel:before,.boom-world .world-chat:before{position:absolute;left:15px;top:17px;color:var(--w-cyan);font:800 9px Orbitron,sans-serif;letter-spacing:.11em}.boom-world .trade-panel:before{content:"TRAINER NETWORK"}.boom-world .world-chat:before{content:"WORLD CHAT"}

  /* Bag is also a top-level sheet, never behind another menu */
  .boom-world .bag-panel{position:fixed!important;left:8px!important;right:8px!important;top:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;z-index:60!important;width:auto!important;max-height:76dvh!important;overflow:auto!important;border-radius:24px!important;box-shadow:0 -16px 70px rgba(0,0,0,.62)!important}.boom-world .bag-panel.show{display:block!important}.boom-world .party-panel{margin:18px auto!important;max-height:calc(100dvh - 36px)!important;overflow:auto!important}.boom-world #party-modal{z-index:65!important;padding:0 8px!important}

  /* Battle owns the viewport. World, controls and status stay behind it. */
  .boom-world #battle{position:fixed!important;inset:0!important;z-index:90!important;padding:14px!important;background:rgba(1,4,14,.78)!important;backdrop-filter:blur(8px)!important;overflow:hidden!important}.boom-world #battle.show{display:flex!important}.boom-world .wbattle{position:relative!important;width:min(94vw,520px)!important;max-height:82dvh!important;margin:auto!important;padding:18px 14px 14px!important;border-radius:25px!important;overflow:auto!important;background:linear-gradient(155deg,rgba(17,31,69,.97),rgba(3,8,24,.98))!important;box-shadow:0 26px 90px rgba(0,0,0,.7),0 0 45px rgba(82,234,255,.16)!important}.boom-world .wbattle h3{margin-bottom:8px!important;font-size:.67rem!important}.boom-world .wb-fighters{margin-bottom:7px!important}.boom-world .wb-fighter img{width:min(24vw,100px)!important;height:min(24vw,100px)!important}.boom-world .wb-fighter .fname{font-size:.82rem!important}.boom-world .wb-fighter .flv{font-size:.68rem!important}.boom-world .wb-vs{padding-bottom:24px!important}.boom-world .wb-log{min-height:42px!important;max-height:72px!important;padding:8px 10px!important;margin-bottom:6px!important;font-size:.8rem!important}.boom-world #btn-battle-ok{min-height:38px!important;margin-top:5px!important;padding:8px 24px!important}.boom-world.world-battle-open #status,.boom-world.world-battle-open #npc-float{opacity:0!important;pointer-events:none!important}

  /* Global menu always wins, but remains small */
  .boom-world .bn-launch{position:fixed!important;right:10px!important;top:clamp(285px,calc(90vw - 58px),calc(100dvh - 62px))!important;bottom:auto!important;z-index:75!important;width:50px!important;height:50px!important;border-radius:15px!important;font-size:8px!important;background:rgba(8,18,42,.82)!important;backdrop-filter:blur(9px)!important}.boom-world .bn-launch:before{width:14px!important;height:14px!important;border-width:2px!important}.boom-world.world-battle-open .bn-launch{opacity:0!important;pointer-events:none!important}.boom-world .bn-backdrop{z-index:97!important}.boom-world .bn-drawer{z-index:98!important;top:auto!important;bottom:8px!important;max-height:82dvh!important;overflow:auto!important}
}

@media (max-width:380px) and (max-height:700px){
  .world-command{height:46px!important;min-height:46px!important}.world-brand-copy span{display:none!important}.world-quick button{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important}.world-telemetry{top:57px!important}.boom-world #status{top:82px!important}.boom-world #game-frame:before{top:58px!important}.boom-world .dpad-wrap{width:124px!important;height:124px!important}.boom-world .dpad{grid-template-columns:38px 38px 38px!important;grid-template-rows:38px 38px 38px!important;width:124px!important;height:124px!important}.boom-world .dpad button{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important}.boom-world #npc-float{bottom:145px!important}}
