/* Topscores boards (assets/leaderboard.js), in the games and on /topscores/.
   Built only from the tokens in denkplein.css; needs account.css for the avatars. */
.dp-board { display: grid; gap: var(--space-3); min-width: 0; }

/* Period tabs: a segmented control */
.dp-board-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 3px; border-radius: var(--radius-md); background: var(--surface-sunken); border: var(--border-hair) solid var(--line); }
.dp-board-tab { font: inherit; font-weight: 700; font-size: 14px; line-height: 20px; height: 34px; padding: 0 var(--space-2); border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted); cursor: pointer; transition: background-color 120ms ease, color 120ms ease, transform 120ms ease; }
.dp-board-tab:hover { color: var(--ink); }
.dp-board-tab:active { transform: scale(.98); }
.dp-board-tab[aria-selected="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-soft); }
.dp-board-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.dp-board-levels { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.dp-board-levels[hidden] { display: none; }
.dp-board-levels .dp-chip { cursor: pointer; }
.dp-board-caption { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.dp-board-caption:empty { display: none; }

/* The list */
.dp-board-body { min-height: 48px; transition: opacity 120ms ease; }
.dp-board-loading { opacity: .5; }
.dp-board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dp-board-row { display: grid; grid-template-columns: 28px 28px minmax(0, 1fr) auto 52px; align-items: center; gap: var(--space-2); min-height: 48px; padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2); border-radius: var(--radius-md); font-size: 14px; line-height: 20px; }
.dp-board-row:nth-child(odd) { background: var(--surface-sunken); }
.dp-board-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--font-display); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.dp-board-top1 .dp-board-rank { background: var(--zon); color: var(--on-fill); }
.dp-board-top2 .dp-board-rank, .dp-board-top3 .dp-board-rank { background: var(--zon-soft); color: var(--zon-deep); }
.dp-board-who { display: grid; min-width: 0; }
.dp-board-who b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-board-who small { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-board-you { display: inline-block; margin-left: var(--space-1); padding: 0 var(--space-2); border-radius: var(--radius-full); background: var(--kobalt); color: var(--on-kobalt); font-size: 11px; line-height: 18px; font-weight: 700; vertical-align: 1px; }
.dp-board-score { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dp-board-time { text-align: right; font-weight: 600; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.dp-board-row.dp-board-me { background: var(--kobalt-soft); box-shadow: inset 0 0 0 var(--border-hair) var(--kobalt); }
.dp-board-me .dp-board-time { color: var(--ink); }
.dp-board-gap { text-align: center; color: var(--ink-muted); line-height: 16px; }

.dp-board-empty { display: grid; justify-items: start; gap: var(--space-3); padding: var(--space-4); border: var(--border-hair) dashed var(--line); border-radius: var(--radius-md); background: var(--surface-sunken); }
.dp-board-empty p, .dp-board-note, .dp-board-rules, .dp-board-invite p { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.dp-board-foot { display: grid; gap: var(--space-3); }
.dp-board-foot:empty { display: none; }
.dp-board-rules { font-size: 13px; line-height: 18px; }
.dp-board-invite { display: grid; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--kobalt-soft); }
.dp-board-invite p { color: var(--ink); font-weight: 600; }
.dp-board-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.dp-board-all { justify-self: start; color: var(--kobalt); font-weight: 700; font-size: 14px; line-height: 20px; text-decoration: none; }
.dp-board-all:hover { text-decoration: underline; }

@media (max-width: 420px) {
  .dp-board-row { grid-template-columns: 24px 28px minmax(0, 1fr) auto 44px; gap: var(--space-2); padding-right: var(--space-2); }
  .dp-board-rank { width: 24px; height: 24px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .dp-board-tab, .dp-board-body { transition: none; } }
