/* Leaderboard pembeli (app/views/leaderboard.php, site.js leaderboardPage()), gaya balok mainan: tombol periode seperti tab
   halaman order, papan berbingkai tebal, peringkat 1-3 sebagai tiga kartu podium sebaris (#2 kiri, #1 tengah dengan mahkota, #3 kanan) dengan lencana
   kuning, biru muda, dan mint, peringkat 4-10 sebagai daftar. Hanya token --rt-*
   (theme.css), jadi semua template ikut, terang dan gelap. Gerakan mati untuk prefers-reduced-motion (theme.css). */
.board{max-width:780px;margin:0 auto;padding:0 16px}
.board-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:22px}
@media (min-width:560px){.board-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}}
.board-tab{min-height:46px;padding:8px 6px;font-weight:800;font-size:14px;line-height:1.2;color:var(--rt-text);background:var(--rt-surface);border:var(--rt-bd);border-radius:var(--rt-radius);box-shadow:0 4px 0 var(--rt-border);cursor:pointer;transition:transform .12s,box-shadow .12s}
.board-tab:active{transform:translateY(3px);box-shadow:0 1px 0 var(--rt-border)}
.board-tab[aria-pressed="true"]{background:var(--rt-accent);color:var(--rt-accent-text)}
.board-card{padding:18px}
@media (min-width:560px){.board-card{padding:22px}}
.board-title{font-size:19px;margin-bottom:14px}
.board-title span{display:inline-block;margin-left:4px;padding:2px 10px;border:3px solid var(--rt-border);border-radius:999px;background:var(--rt-ice);font-size:14px;vertical-align:2px}
.board-list{list-style:none;margin:0;padding:0;display:grid;gap:12px;transition:opacity .15s}
.board[aria-busy="true"] .board-list,.board[aria-busy="true"] .board-podium{opacity:.45}
/* Podium: ranks 1-3 in one row at every width. The DOM order is 1, 2, 3; the grid areas show 2, 1, 3. #2 and #3 start lower than #1,
   so #1 stands higher, and its crown sits above its avatar. */
.board-podium{list-style:none;margin:0 0 14px;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:"two one three";gap:8px;transition:opacity .15s}
.board-podium[hidden],.board-list[hidden]{display:none}
.podium-card{display:grid;justify-items:center;align-content:start;gap:4px;min-width:0;margin-top:34px;padding:10px 4px 12px;text-align:center;line-height:1.25;background:var(--rt-surface);border:var(--rt-bd);border-radius:14px;box-shadow:0 4px 0 var(--rt-border)}
.podium-card[data-rank="1"]{grid-area:one;margin-top:0;background:var(--rt-ice)}
.podium-card[data-rank="2"]{grid-area:two}
.podium-card[data-rank="3"]{grid-area:three}
.podium-crown{display:block;height:24px;line-height:0}
.board-crown{display:block;width:32px;height:24px}
/* The one decorative colour fixed on purpose: a bright gold in every theme and mode (the theme's --rt-yellow is a dark olive in dark mode). */
.board-crown path{fill:#FFC531;stroke:var(--rt-border);stroke-width:2;stroke-linejoin:round}
.podium-card .board-avatar{width:48px;height:48px}
.podium-card[data-rank="1"] .board-avatar{width:56px;height:56px;font-size:21px}
.podium-rank{padding:1px 10px;border:3px solid var(--rt-border);border-radius:999px;background:var(--rt-ice);font-weight:800;font-size:13px}
.podium-card[data-rank="1"] .podium-rank{background:var(--rt-yellow)}
.podium-card[data-rank="2"] .podium-rank{background:var(--rt-ice)}
.podium-card[data-rank="3"] .podium-rank{background:var(--rt-mint)}
.podium-name{max-width:100%;font-size:13.5px;overflow-wrap:anywhere}
.podium-robux{max-width:100%;font-size:15px;font-weight:800;overflow-wrap:anywhere}
.podium-card[data-rank="1"] .podium-robux{font-size:16.5px}
.podium-idr,.podium-count{max-width:100%;font-size:11.5px;font-weight:700;color:var(--rt-muted);overflow-wrap:anywhere}
@media (min-width:560px){
  .board-podium{gap:14px}
  .podium-card{padding:14px 10px 16px;margin-top:40px;gap:5px}
  .podium-card .board-avatar{width:64px;height:64px;font-size:22px}
  .podium-card[data-rank="1"] .board-avatar{width:76px;height:76px;font-size:26px}
  .podium-name{font-size:16px}
  .podium-robux{font-size:17px}
  .podium-card[data-rank="1"] .podium-robux{font-size:19px}
  .podium-idr,.podium-count{font-size:13px}
}
.board-row{display:grid;grid-template-columns:34px 44px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 12px;background:var(--rt-surface);border:var(--rt-bd);border-radius:14px;box-shadow:0 4px 0 var(--rt-border);min-width:0}
.board-row[data-rank="1"]{background:var(--rt-ice)}
.board-rank{width:34px;height:34px;display:grid;place-items:center;border:3px solid var(--rt-border);border-radius:10px;background:var(--rt-bg);font-weight:800;font-size:15px}
.board-row[data-rank="1"] .board-rank{background:var(--rt-yellow)}
.board-row[data-rank="2"] .board-rank{background:var(--rt-ice)}
.board-row[data-rank="3"] .board-rank{background:var(--rt-mint)}
.board-avatar{width:44px;height:44px;display:grid;place-items:center;overflow:hidden;border:3px solid var(--rt-border);border-radius:50%;background:var(--rt-bg);font-weight:800;font-size:17px;color:var(--rt-text)}
.board-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.board-name,.board-total{display:grid;min-width:0;line-height:1.25}
.board-name strong{font-size:15.5px;overflow-wrap:anywhere}
.board-name small,.board-total small{font-size:12.5px;font-weight:700;color:var(--rt-muted)}
.board-total{text-align:right}
.board-total strong{font-size:15px}
/* Narrow phones (360 px): one line per buyer still fits once the card and the badges are a little smaller. */
@media (max-width:379.98px){
  .board-card{padding:12px}
  .board-row{grid-template-columns:28px 36px minmax(0,1fr) auto;gap:8px;padding:8px 10px}
  .board-rank{width:28px;height:28px;font-size:14px;border-radius:9px}
  .board-avatar{width:36px;height:36px;font-size:15px}
  .board-name strong{font-size:14.5px}
  .board-total strong{font-size:14px}
  .board-podium{gap:6px}
  .podium-card{padding:8px 3px 10px}
}
.board-empty{display:grid;gap:4px;justify-items:center;text-align:center;padding:22px 12px;border:3px dashed var(--rt-border);border-radius:14px;background:var(--rt-bg)}
.board-empty span{color:var(--rt-muted);font-weight:700}
.board-status{margin-top:12px;padding:12px 14px;border:var(--rt-bd);border-radius:12px;color:var(--rt-danger);font-weight:800;background:var(--rt-surface)}
.board-note{margin-top:18px;color:var(--rt-muted);font-weight:700;font-size:14px}
.board-cta{display:flex;justify-content:center;margin-top:20px}
.board-cta .button{min-width:220px}
