/* Leaderboards: compact controls, full desktop table, five mobile columns. */
.lb-controls, .lb-results, .lb-message {
  color: #10233e; background: #fff; border: 1px solid #dce5f0;
  border-radius: 14px; margin-bottom: 16px;
}
.lb-controls, .lb-message { padding: 20px; }
.lb-controls h2 { margin: 0 0 16px; font-size: 1.35rem; }
.lb-period, .lb-position, .lb-minimum { display: flex; gap: 4px; }
.lb-period { width: max-content; max-width: 100%; padding: 4px; margin-bottom: 12px; background: #f3f6fb; border-radius: 10px; }
.lb-period-btn, .lb-position-btn, .lb-minimum-btn {
  min-height: 44px; border: 0; border-radius: 7px; background: transparent;
  color: #52657e; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer;
}
.lb-period-btn.active { background: #1769d9; color: #fff; }
.lb-position-btn, .lb-minimum-btn { min-width: 44px; padding: 8px 14px; }
.lb-position-btn.active, .lb-minimum-btn.active { background: #e9f1ff; color: #1555b3; }
.lb-options { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 20px; }
.lb-filter, .lb-about { color: #52657e; font-size: 14px; }
.lb-filter summary, .lb-about summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
.lb-filter[open], .lb-about[open] { flex-basis: 100%; }
.lb-filter-content { display: flex; align-items: center; gap: 12px; padding: 4px 0 8px; }
.lb-about p { max-width: 850px; margin: 0 0 10px; line-height: 1.6; }
.lb-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.lb-result-heading h3 { margin: 0; font-size: 18px; }
.lb-result-heading > span { color: #64748b; font-size: 13px; }
.lb-ranking-label { padding: 0 20px 16px; color: #1555b3; font-size: 13px; font-weight: 600; }
.lb-ranking-label span { color: #64748b; font-weight: 400; }
.lb-data-note { padding: 0 20px 12px; margin: 0; color: #64748b; font-size: 13px; }
.lb-table-wrap { overflow-x: auto; border-radius: 0 0 14px 14px; }
.lb-table { border-collapse: collapse; width: 100%; min-width: 720px; }
.lb-table th, .lb-table td { padding: 14px 12px; text-align: right; font-variant-numeric: tabular-nums; font-size: 16px; }
.lb-table thead th { color: #52657e; font-weight: 500; font-size: 13px; background: #f3f6fb; white-space: nowrap; }
.lb-table .lb-player-col { text-align: left; }
.lb-table tbody th { font-weight: 400; }
.lb-player-col { min-width: 190px; }
.lb-alternate { background: #f8fafd; }
.lb-rank-col { color: #64748b; width: 36px; }
.lb-name { display: block; font-weight: 700; line-height: 1.3; }
.lb-team { display: block; margin-top: 5px; font-size: 12px; color: #64748b; line-height: 1.35; }
.lb-player-toggle { display: none; }
.lb-sort-header { min-height: 40px; border: 0; padding: 4px 0; background: transparent; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.lb-sort-arrow { margin-left: 3px; }
.lb-sort-header.active, .lb-selected-value { color: #1555b3; font-weight: 700; }
.lb-table .lb-score-col { font-weight: 700; }
.lb-detail-row { display: none; }
.lb-error { color: #b91c1c; }
.lb-controls button:focus-visible, .lb-results button:focus-visible, .lb-controls summary:focus-visible { outline: 2px solid #1769d9; outline-offset: 2px; }
.nav-tabs { flex-wrap: wrap; }
@media (max-width: 640px) {
  .lb-controls, .lb-message { padding: 16px; }
  .lb-controls h2 { margin-bottom: 12px; font-size: 22px; }
  .lb-period { width: 100%; box-sizing: border-box; }
  .lb-period-btn { flex: 1; min-width: 0; font-size: 14px; padding: 9px 6px; }
  .lb-options { gap: 4px 16px; }
  .lb-filter, .lb-about { font-size: 13px; }
  .lb-filter-content { flex-wrap: wrap; }
  .lb-result-heading { padding: 14px 12px 4px; }
  .lb-result-heading h3 { font-size: 17px; }
  .lb-result-heading > span { font-size: 12px; }
  .lb-ranking-label { padding: 0 12px 12px; font-size: 12px; }
  .lb-data-note { padding-left: 12px; padding-right: 12px; }
  .lb-table-wrap { overflow: visible; }
  .lb-table { min-width: 0; width: 100%; table-layout: fixed; }
  .lb-table .lb-extra-col { display: none; }
  .lb-table .lb-player-col { width: 40%; min-width: 0; position: static; }
  .lb-table .lb-metric-col, .lb-table .lb-score-col { width: 15%; }
  .lb-table th, .lb-table td { padding: 13px 4px; font-size: clamp(13px, 3.8vw, 16px); text-align: center; }
  .lb-table .lb-player-col { text-align: left; padding-left: 10px; padding-right: 6px; }
  .lb-table thead th { padding-top: 5px; padding-bottom: 5px; font-size: clamp(9px, 2.6vw, 12px); }
  .lb-sort-header { display: block; width: 100%; min-height: 44px; }
  .lb-sort-arrow { display: block; margin: 0; height: 10px; line-height: 10px; }
  .lb-desktop-name { display: none; }
  .lb-player-toggle { display: flex; gap: 3px; align-items: center; width: 100%; min-height: 44px; border: 0; background: transparent; color: inherit; font: inherit; padding: 0; text-align: left; cursor: pointer; }
  .lb-name { min-width: 0; font-size: clamp(13px, 3.8vw, 16px); overflow-wrap: anywhere; }
  .lb-mobile-rank { font-size: 10px; color: #64748b; font-weight: 400; }
  .lb-expand-mark { flex: none; font-size: 12px; color: #64748b; }
  .lb-team { font-size: 10px; margin-top: 2px; overflow-wrap: anywhere; }
  .lb-detail-row:not([hidden]) { display: table-row; }
  .lb-table .lb-detail-row > td { padding: 0 12px 14px; }
  .lb-detail-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 12px; background: #edf3fc; border-radius: 8px; text-align: left; }
  .lb-detail-stats span { display: block; color: #64748b; font-size: 11px; }
  .lb-detail-stats strong { display: block; margin-top: 4px; font-size: 16px; }
}
