/* ===================== LEADERBOARD ===================== */
.lb-wrap { max-width: 680px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.lb-title { margin: 0.4rem 0 1rem; font-size: 2.4rem; font-weight: 800; text-transform: uppercase; color: var(--text-primary); }

.lb-tabs { display: inline-flex; gap: 0.3rem; padding: 0.3rem; margin-bottom: 1rem; background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 16px; }
.lb-tab {
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-secondary); padding: 0.7rem 1.1rem; border-radius: 12px;
}
.lb-tab:hover { color: var(--text-primary); }
.lb-tab.active { background: var(--accent); color: var(--yellow-text); }

.lb-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem;
  background: #f0e7d0; color: #3a3220; border-radius: 16px; padding: 0.9rem 1.1rem; font-weight: 500;
}
.lb-banner-btn { background: var(--yellow); color: #241F10; text-decoration: none; font-weight: 700; border-radius: 999px; padding: 0.6rem 1.3rem; white-space: nowrap; }

.lb-table { background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 18px; overflow: hidden; }
.lb-row { display: grid; grid-template-columns: 3.5rem 1fr 5.5rem 5rem; gap: 0.5rem; align-items: center; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border-subtle); }
.lb-row .num { text-align: right; }
.lb-head { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-secondary); padding: 1rem 1.1rem; }
.lb-scroll { max-height: 430px; overflow-y: auto; }
.lb-scroll .lb-row:last-child { border-bottom: 0; }
.lb-rank { font-size: 1.4rem; font-weight: 800; color: var(--text-secondary); }
.lb-rank.r1 { color: var(--accent); }
.lb-rank.r2 { color: #7c9cf5; }
.lb-rank.r3 { color: #e0a24a; }
.lb-name { font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-big { font-size: 1.35rem; font-weight: 800; color: var(--text-primary); }
.lb-dim { color: var(--text-secondary); font-size: 0.9rem; }
.lb-row.me { background: rgba(250, 203, 28, 0.1); }
.lb-row.me .lb-name::after { content: " (you)"; color: var(--accent); font-weight: 500; font-size: 0.8rem; }
.lb-empty { padding: 1.6rem 1.1rem; text-align: center; color: var(--text-secondary); font-size: 0.9rem; }
.lb-foot { margin: 0.9rem 0.2rem 0; color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; }

.lb-card { margin-top: 1.4rem; background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 18px; padding: 1.2rem 1.2rem 1rem; }
.lb-card-title { margin: 0 0 1.1rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-secondary); }
.lb-bars { display: flex; gap: 0.5rem; align-items: flex-end; }
.lb-bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.lb-bar-pct { font-size: 0.74rem; color: var(--text-secondary); }
.lb-bar-track { width: 100%; height: 130px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--border-subtle); }
.lb-bar { width: 100%; background: #2f62dd; border-radius: 6px 6px 0 0; min-height: 0; transition: height .4s ease; }
.lb-bar.alt { background: var(--accent); }
.lb-bar.miss { background: #ef4444; }
.lb-bar-label { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.lb-bar-label.small { font-size: 0.68rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

.lb-hbars { display: flex; flex-direction: column; gap: 0.6rem; }
.lb-hbar-row { display: grid; grid-template-columns: 3.6rem 1fr 2.4rem; gap: 0.7rem; align-items: center; }
.lb-hbar-label { font-size: 0.78rem; color: var(--text-secondary); }
.lb-hbar-track { height: 14px; background: var(--box-bg); border-radius: 999px; overflow: hidden; }
.lb-hbar { height: 100%; background: #2f62dd; border-radius: 999px; }
.lb-hbar-val { font-weight: 700; font-size: 0.85rem; color: var(--text-primary); text-align: right; }

@media (max-width: 480px) {
  .lb-title { font-size: 1.9rem; }
  .lb-tab { padding: 0.6rem 0.8rem; letter-spacing: 0.08em; }
  .lb-row { grid-template-columns: 2.4rem 1fr 4.2rem 3.8rem; padding: 0.75rem 0.8rem; }
  .lb-big { font-size: 1.15rem; }
  .lb-banner { flex-direction: column; align-items: flex-start; }
}
