/* ==========================================================================================
   screens/leaderboard.css — 全服排行榜 (js/ui/leaderboard.js)

   ⚠️ 视觉完全复用统计页（screens/stats.css）的那套：整页外壳 .st / .st__bg、顶栏 .st-top、
   标签 .st-tabs / .st-tab、说明行 .st-note、内容区 .st-body、数据表 .st-table（含 --history）。
   这个文件只放排行榜特有的三件事：大类的计数角标、榜单表格的名次与数值列、窄屏适配。
   ========================================================================================== */

/* 打开时把背后的 app 屏幕藏起来（和统计页的 .sp-stats-open 同样的做法） */
.sp-lb-open .app-root > .screen { visibility: hidden; }

/* 第二行标签（当前大类下的具体榜单），沿用 .st-tab 外观，只补间距与分隔线 */
.lbp-boards {
  position: relative; /* 必须：否则会被绝对定位的 .st__bg 盖住（统计页各区块都带 position: relative） */
  flex: none;
  padding: .1rem .36rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  /* 2026-10-17 服主反馈：累计类有 11-12 个页签，单行会被屏幕右侧挡住 ✗
     → 允许换行，让每个页签都能看到、可点 ✓（窄屏仍保留横向滚动兜底 ✓） */
  flex-wrap: wrap;
  row-gap: .08rem;
}
/* 大类后面的数量角标（场次 6 / 单局 6 / 累计 11） */
.lbp-n { margin-left: .06rem; font-size: max(.15rem, 10px); font-weight: 600; letter-spacing: 0; color: var(--text-dim); }
.st-tab.is-on .lbp-n { color: var(--mint-500); }

/* ---- 榜单表格（.st-table 本体样式来自 stats.css，含它非历史表的宽度约束）--------------------------------------- */
/* 表格宽度跟随统计页：桌面约 560px 起、居中偏左，不让列被拉散 */
.lbp-table { max-width: max(11rem, 660px) !important; }
/* 名次列只要够写得下三位数即可：原来 3.1rem（约 258px）把「玩家」列一路推到屏幕中间，服主反馈「玩家列表要靠左」 */
.lbp-table .lbp-c-rank { width: 1.2rem; }
.lbp-table .lbp-c-val { text-align: right; }

.lbp-table .lbp-rank {
  font-family: var(--font-num);
  font-size: max(.26rem, 16px); font-weight: 900;
  color: var(--text-lo); text-align: left;
}
.lbp-table tr.is-top1 .lbp-rank { color: var(--mint-400); }
.lbp-table tr.is-top2 .lbp-rank,
.lbp-table tr.is-top3 .lbp-rank { color: var(--mint-500); }

/* 玩家列左对齐（表头与单元格都要显式写：.st-table th 的默认对齐不是左） */
.lbp-table th:nth-child(2),
.lbp-table td.lbp-name { text-align: left; }
.lbp-table .lbp-name { color: var(--text-hi); font-size: max(.24rem, 13px); font-weight: 900; }
.lbp-table .lbp-name .num { margin-left: .06rem; color: var(--text-lo); font-size: max(.16rem, 10px); }

.lbp-table .lbp-val {
  font-family: var(--font-num);
  font-size: max(.32rem, 18px); font-weight: 900;
  color: var(--mint-400); white-space: nowrap;
}
.lbp-table tr.is-top1 td { background: var(--mint-a10); }

/* 前 30 名之后的说明 */
.lbp-foot { margin: .14rem 0 0; font-size: max(.14rem, 10px); color: var(--text-lo); letter-spacing: .04em; }


/* ---- 窄屏（手机）------------------------------------------------------------------------------------------------ */
@media (max-width: 720px) {
  .st-top.lbp-top { height: auto; padding: .1rem .16rem; grid-template-columns: auto 1fr; }
  .st-top.lbp-top .st-top__right { display: none; }
  .lbp-boards { padding: .08rem .16rem; }
  .lbp-table .lbp-c-rank { width: auto; }
  .lbp-table .lbp-rank { font-size: max(.22rem, 15px); }
  .lbp-table .lbp-name { font-size: max(.18rem, 12px); }
  .lbp-table .lbp-val { font-size: max(.26rem, 16px); }
  .lbp-table th:nth-child(3), .lbp-table td:nth-child(3) { display: none; } /* 场次列在手机上收起 */
}
