/* Public leaderboard (/leaderboard). White and black first; the top three use gold, silver and bronze;
   the theme yellow only highlights the sign-up button. Shared pieces come from moumachi-core.css. */
.lb-page { color: #0b0b0b; background: #fff; }
.lb-page h1, .lb-page h2, .lb-page p, .lb-page ol { margin: 0; }
.lb-page [id] { scroll-margin-top: 110px; }

.lb-sec { padding: 24px 0 40px; }
.lb-sec--hero { padding: 32px 0 0; }
.lb-sec--guide { padding: 16px 0 64px; }
@media (min-width: 1024px) {
  .lb-sec { padding: 32px 0 56px; }
  .lb-sec--hero { padding: 48px 0 0; }
  .lb-sec--guide { padding: 24px 0 96px; }
}

.lb-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #6d6d6d; }
.lb-title { font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.2; letter-spacing: -1px; }
.lb-lead { font-size: 15px; line-height: 25px; color: #6d6d6d; }
.lb-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

/* Hero */
.lb-hero { display: flex; flex-direction: column; gap: 24px; padding: 32px 20px; border-radius: 24px; background: #f4f4f4; }
@media (min-width: 640px) { .lb-hero { padding: 48px 40px; } }
@media (min-width: 1024px) { .lb-hero { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 48px; padding: 56px 64px; } }
.lb-hero__text { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.lb-hero__title { font-size: clamp(34px, 5.6vw, 60px); font-weight: 700; line-height: 1.1; letter-spacing: -2px; }
.lb-actions { display: flex; flex-shrink: 0; }
.lb-btn { height: 56px; padding: 0 24px; border-radius: 12px; font-size: 16px; font-weight: 600; }
@media (max-width: 639px) { .lb-actions, .lb-btn { width: 100%; } }

/* Period switch */
.lb-periods { display: flex; gap: 8px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.lb-periods::-webkit-scrollbar { display: none; }
.lb-period { flex-shrink: 0; padding: 9px 16px; border: 1px solid #d9d9d9; border-radius: 999px; font-size: 14px; font-weight: 600; color: #0b0b0b; text-decoration: none; white-space: nowrap; }
.lb-period:hover { border-color: #0b0b0b; color: #0b0b0b; }
.lb-period.is-active { border-color: #0b0b0b; background: #0b0b0b; color: #fff; }

/* Top three on a black stage: the winner in the middle, raised and framed by a gold laurel; silver and bronze
   either side. Medal colours are flat (no gradients, glows or shadows). */
.lb-page .lb-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin: 8px 0 72px; padding: 36px 10px 32px; border-radius: 24px; background: #0b0b0b; color: #fff; list-style: none; }
@media (min-width: 768px) { .lb-page .lb-podium { gap: 32px; padding: 56px 48px 48px; } }
.lb-podium__spot--1 { order: 2; --medal: #e5b418; }
.lb-podium__spot--2 { order: 1; --medal: #c3c9d0; }
.lb-podium__spot--3 { order: 3; --medal: #cd8a52; }

.lb-podium__spot { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.lb-podium__trophy { width: 34px; height: 34px; color: var(--medal); }
@media (min-width: 768px) { .lb-podium__trophy { width: 46px; height: 46px; } }

.lb-podium__place { font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: -.5px; color: var(--medal); }
.lb-podium__place sup { position: relative; top: -.75em; font-size: .55em; vertical-align: baseline; }
.lb-podium__spot--1 .lb-podium__place { font-size: 24px; }
@media (min-width: 768px) {
  .lb-podium__place { font-size: 26px; }
  .lb-podium__spot--1 .lb-podium__place { font-size: 32px; }
}

.lb-podium__user { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; max-width: 100%; color: #fff; text-decoration: none; }
.lb-podium__user:hover { color: #fff; }
.lb-podium__user:hover .lb-podium__name { text-decoration: underline; }
.lb-podium__photo { position: relative; display: inline-flex; margin: 6px 0 2px; }
.lb-podium__photo img { position: relative; z-index: 1; width: 76px; height: 76px; border: 4px solid var(--medal); border-radius: 50%; object-fit: cover; background: #222; }
.lb-podium__spot--1 .lb-podium__photo { margin: 22px 0 16px; }
.lb-podium__spot--1 .lb-podium__photo img { width: 96px; height: 96px; }
@media (min-width: 768px) {
  .lb-podium__photo img { width: 124px; height: 124px; border-width: 5px; }
  .lb-podium__spot--1 .lb-podium__photo { margin: 34px 0 26px; }
  .lb-podium__spot--1 .lb-podium__photo img { width: 156px; height: 156px; }
}
.lb-podium__laurel { position: absolute; left: -26%; top: -26%; width: 152%; height: 152%; color: var(--medal); }

.lb-podium__name { max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 800; letter-spacing: .4px; line-height: 1.3; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.lb-podium__points { font-size: 18px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.lb-podium__points span { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0; color: #a3a3a3; }
.lb-podium__level { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: #a3a3a3; }
.lb-podium__level img { width: 16px; height: 16px; object-fit: contain; }
@media (max-width: 479px) { .lb-podium__level { display: none; } }
@media (min-width: 768px) {
  .lb-podium__name { font-size: 16px; }
  .lb-podium__spot--1 .lb-podium__name { font-size: 18px; }
  .lb-podium__points { font-size: 26px; }
  .lb-podium__spot--1 .lb-podium__points { font-size: 32px; }
  .lb-podium__points span { font-size: 13px; }
  .lb-podium__level { font-size: 13px; }
}

/* Ranking heading: clear space from the podium above and the table below */
.lb-page .lb-sec .lb-title { margin-bottom: 20px; }
.lb-page #lbRankingTitle { margin-top: 0; padding-top: 8px; }

/* Tables */
.lb-table { border-top: 1px solid #ececec; }
.lb-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid #ececec; }
@media (min-width: 768px) { .lb-row { grid-template-columns: 64px minmax(0, 1fr) 200px 120px; gap: 16px; padding: 14px 8px; } }
.lb-row--head { padding-top: 12px; padding-bottom: 12px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #6d6d6d; }
.lb-row.is-viewer { background: #f4f4f4; }
.lb-row--gap { display: block; padding: 6px 8px; font-size: 18px; letter-spacing: 4px; color: #a3a3a3; }
.lb-col-level { display: none; }
@media (min-width: 768px) { .lb-col-level { display: block; } }
.lb-col-points { text-align: right; }

.lb-rank { font-size: 15px; font-weight: 700; color: #6d6d6d; }

.lb-user { display: flex; align-items: center; gap: 12px; min-width: 0; color: #0b0b0b; text-decoration: none; }
.lb-user:hover { color: #0b0b0b; }
.lb-user:hover .lb-user__name { text-decoration: underline; }
.lb-user img { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; object-fit: cover; background: #f1f1f1; }
.lb-user__text { display: flex; flex-direction: column; min-width: 0; }
.lb-user__name { overflow: hidden; font-size: 15px; font-weight: 700; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
.lb-user__area { overflow: hidden; font-size: 13px; line-height: 19px; color: #6d6d6d; text-overflow: ellipsis; white-space: nowrap; }

.lb-level { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.lb-level img { width: 20px; height: 20px; object-fit: contain; }
.lb-col-points strong { font-size: 16px; font-weight: 700; }

/* How points and levels work */
.lb-guide { display: grid; gap: 48px; }
@media (min-width: 1024px) { .lb-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; } }
.lb-guide__col { min-width: 0; }
.lb-table--simple .lb-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 4px; font-size: 15px; }
.lb-table--simple .lb-row--head { font-size: 12px; }
.lb-table--simple .lb-level img { width: 24px; height: 24px; }

.lb-empty, .lb-note { padding: 32px 0; font-size: 15px; color: #6d6d6d; }
.lb-note { padding: 20px 0 0; }
.lb-note a { color: #0b0b0b; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
