/* v39: hard mobile leaderboard override. Loaded after leaderboards.css to beat stale/mobile rules. */
.leaderboard-filter-note{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:13px 15px !important;
  margin:0 0 16px !important;
  border:1px solid rgba(148,163,184,.28) !important;
  border-radius:16px !important;
  background:rgba(15,23,42,.56) !important;
  color:rgba(226,232,240,.94) !important;
  line-height:1.42 !important;
}
.leaderboard-filter-copy{flex:1 1 360px !important;min-width:min(100%,240px) !important;}
.leaderboard-note-actions{display:flex !important;align-items:center !important;gap:8px !important;flex-wrap:wrap !important;}
.leaderboard-filter-note a,
.leaderboard-note-actions a,
.leaderboard-note-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:34px !important;
  padding:8px 12px !important;
  border-radius:999px !important;
  text-decoration:none !important;
  font-weight:950 !important;
  color:#eef4ff !important;
  background:rgba(10,14,34,.9) !important;
  border:1px solid rgba(255,255,255,.16) !important;
  line-height:1 !important;
  box-shadow:none !important;
}
.leaderboard-filter-note a:hover,
.leaderboard-note-actions a:hover,
.leaderboard-note-btn:hover{background:linear-gradient(135deg,var(--lb-blue),var(--lb-purple)) !important;color:#0d1331 !important;}

.leaderboard-table td.badge-cell,
.leaderboard-table th.badge-head{white-space:nowrap !important;}
.leaderboard-table td.badge-cell .lb-badge,
.leaderboard-table .lb-badge,
.lb-badge{
  display:inline-flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:6px !important;
  width:auto !important;
  min-width:0 !important;
  max-width:100% !important;
  height:auto !important;
  min-height:0 !important;
  padding:5px 8px !important;
  border-radius:999px !important;
  line-height:1 !important;
  text-align:left !important;
  vertical-align:middle !important;
  white-space:nowrap !important;
  transform:none !important;
}
.leaderboard-table td.badge-cell img,
.leaderboard-table td.badge-cell svg,
.leaderboard-table .lb-badge img,
.leaderboard-table .lb-badge-icon,
.lb-badge img,
.lb-badge svg{
  width:22px !important;
  height:22px !important;
  min-width:22px !important;
  min-height:22px !important;
  max-width:22px !important;
  max-height:22px !important;
  display:inline-block !important;
  object-fit:contain !important;
  flex:0 0 22px !important;
  margin:0 !important;
  padding:0 !important;
  transform:none !important;
}
.leaderboard-table .lb-badge-name,
.leaderboard-table .lb-badge span,
.lb-badge-name,
.lb-badge span{
  display:inline !important;
  color:#e5e7eb !important;
  font-size:.82rem !important;
  font-weight:950 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}
.leaderboard-table .lb-badge-level,
.leaderboard-table .lb-badge small,
.lb-badge-level,
.lb-badge small{
  display:inline !important;
  color:rgba(226,232,240,.78) !important;
  font-size:.72rem !important;
  font-weight:900 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

@media (max-width:720px){
  .leaderboards-page{width:min(100vw - 20px,1120px) !important;margin-top:14px !important;}
  .leaderboard-filter-note{flex-direction:column !important;align-items:flex-start !important;gap:10px !important;font-size:.9rem !important;}
  .leaderboard-note-actions{width:100% !important;}
  .leaderboard-filter-note a,.leaderboard-note-actions a,.leaderboard-note-btn{flex:1 1 auto !important;min-width:132px !important;font-size:.82rem !important;}

  .table-wrap{overflow-x:hidden !important;border-radius:14px !important;}
  .leaderboard-table{min-width:0 !important;width:100% !important;table-layout:fixed !important;border-collapse:collapse !important;}
  .leaderboard-table thead{display:table-header-group !important;}
  .leaderboard-table tr{display:table-row !important;}
  .leaderboard-table th,.leaderboard-table td{display:table-cell !important;vertical-align:middle !important;padding:10px 6px !important;font-size:.82rem !important;}
  .leaderboard-table th{font-size:.64rem !important;letter-spacing:.07em !important;}

  .leaderboard-table th:nth-child(1),.leaderboard-table td:nth-child(1){width:46px !important;}
  .leaderboard-table th:nth-child(2),.leaderboard-table td:nth-child(2){width:30% !important;}
  .leaderboard-table th:nth-child(3),.leaderboard-table td:nth-child(3){width:38% !important;}
  .leaderboard-table th:nth-child(4),.leaderboard-table td:nth-child(4){width:72px !important;display:table-cell !important;}
  .leaderboard-table th:nth-child(5),.leaderboard-table td:nth-child(5),.leaderboard-table td.when{display:none !important;}

  .leaderboard-table td.rank{width:46px !important;min-width:46px !important;color:transparent !important;position:relative !important;}
  .leaderboard-table td.rank::before{left:6px !important;width:30px !important;height:30px !important;line-height:30px !important;font-size:.78rem !important;}
  .leaderboard-table td.player{overflow:hidden !important;}
  .leaderboard-table td.player .player-name{display:block !important;max-width:100% !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
  .leaderboard-table td.player .player-subtype{display:block !important;margin:2px 0 0 !important;font-size:.62rem !important;}
  .leaderboard-table td.score{text-align:right !important;font-size:.86rem !important;font-weight:950 !important;color:var(--lb-gold) !important;white-space:nowrap !important;}
  .leaderboard-table td.badge-cell{overflow:hidden !important;text-align:left !important;white-space:nowrap !important;}

  .leaderboard-table td.badge-cell .lb-badge,
  .leaderboard-table .lb-badge,
  .lb-badge{max-width:100% !important;padding:4px 6px !important;gap:4px !important;}
  .leaderboard-table td.badge-cell img,
  .leaderboard-table td.badge-cell svg,
  .leaderboard-table .lb-badge img,
  .leaderboard-table .lb-badge-icon,
  .lb-badge img,
  .lb-badge svg{
    width:18px !important;height:18px !important;min-width:18px !important;min-height:18px !important;max-width:18px !important;max-height:18px !important;flex-basis:18px !important;
  }
  .leaderboard-table .lb-badge-name,.leaderboard-table .lb-badge span,.lb-badge-name,.lb-badge span{font-size:.72rem !important;max-width:54px !important;overflow:hidden !important;text-overflow:ellipsis !important;}
  .leaderboard-table .lb-badge-level,.leaderboard-table .lb-badge small,.lb-badge-level,.lb-badge small{font-size:.66rem !important;}
  .lb-guest-chip{font-size:.68rem !important;padding:5px 7px !important;}
}
@media (max-width:390px){
  .leaderboard-table th:nth-child(1),.leaderboard-table td:nth-child(1){width:42px !important;}
  .leaderboard-table th:nth-child(2),.leaderboard-table td:nth-child(2){width:30% !important;}
  .leaderboard-table th:nth-child(3),.leaderboard-table td:nth-child(3){width:40% !important;}
  .leaderboard-table th:nth-child(4),.leaderboard-table td:nth-child(4){width:64px !important;}
  .leaderboard-table th,.leaderboard-table td{padding-inline:4px !important;}
  .leaderboard-table .lb-badge-name,.leaderboard-table .lb-badge span{max-width:44px !important;}
}


/* v39: fix mobile intro note blank space caused by flex-basis becoming vertical height */
@media (max-width:720px){
  .leaderboard-filter-note{
    min-height:0 !important;
    height:auto !important;
    justify-content:flex-start !important;
    align-content:flex-start !important;
    padding:16px 15px !important;
    margin:0 0 16px !important;
  }
  .leaderboard-filter-note .leaderboard-filter-copy,
  .leaderboard-filter-copy{
    flex:0 1 auto !important;
    flex-basis:auto !important;
    min-height:0 !important;
    height:auto !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }
  .leaderboard-filter-note .leaderboard-note-actions,
  .leaderboard-note-actions{
    flex:0 1 auto !important;
    margin-top:4px !important;
    align-self:stretch !important;
  }
}
