/* PokéBattle V13.21 — UI-only patch. No battle engine/lobby polling overrides. */

/* Battle history: show roughly 10 rows, then scroll with wheel/touch. */
#battleHistoryV131025 .bhList{
  max-height:590px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  padding-right:5px!important;
  scrollbar-gutter:stable!important;
}
#battleHistoryV131025 .bhList::-webkit-scrollbar{width:8px}
#battleHistoryV131025 .bhList::-webkit-scrollbar-thumb{background:#30394d;border-radius:999px}
#battleHistoryV131025 .bhList::-webkit-scrollbar-track{background:transparent}

/* Mobile header: trophy -> balance -> music -> profile. Music is NOT in the drawer. */
@media(max-width:760px){
  .topright{display:flex!important;align-items:center!important;gap:6px!important}
  #leaderboardTopBtnV131029{order:1!important;display:grid!important}
  .topright .balance{order:2!important}
  #musicBtn{
    order:3!important;
    display:grid!important;
    place-items:center!important;
    width:38px!important;height:38px!important;min-width:38px!important;
    padding:0!important;border-radius:10px!important;
    font-size:0!important;line-height:1!important;
    border:1px solid rgba(141,119,255,.3)!important;
    background:#111725!important;color:#fff!important;
  }
  #musicBtn::before{content:'🎵';font-size:17px!important;line-height:1!important}
  #topAvatar{order:4!important}
  #musicPanelV7.pb46Music,
  #musicPanelV7{
    position:fixed!important;
    top:70px!important;left:10px!important;right:10px!important;
    width:auto!important;max-width:none!important;
    z-index:999995!important;
  }
  #musicPanelV7 input[type="range"]{width:100%!important;min-width:0!important}
}

@media(max-width:560px){
  #battleHistoryV131025 .bhList{max-height:520px!important}
}
