/* Leaderboard: the bright corporate look of the home screen, a clear table with the player's own row
   highlighted, and horizontal scroll kept inside the table on narrow screens. */
.lb-entry { display: inline-flex; align-items: center; gap: 8px; }
.leaderboard { display: grid; gap: 16px; padding: 24px 0 30px; }
.lb-heading h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.lb-heading .intro { max-width: 68ch; }
.lb-panel { max-width: 560px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.lb-join { display: grid; gap: 6px; }
.lb-join h2 { margin: 4px 0; }
.lb-join label { margin-top: 10px; font-weight: 700; font-size: .9rem; }
.lb-join input, .lb-join select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--control, #6b7c89); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.lb-join input:focus-visible, .lb-join select:focus-visible { outline: 3px solid var(--focus, #2f7fd1); outline-offset: 2px; }
.lb-join small { color: var(--muted); font-size: .78rem; }
.lb-join .inline-error { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.lb-join .dialog-actions { margin-top: 16px; }
.lb-profile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.lb-profile > span { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.lb-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-tabs button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #f5f8fa; color: var(--ink); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.lb-tabs button:hover { border-color: var(--control, #6b7c89); }
.lb-tabs button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.lb-mine { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-left: 4px solid #f5a623; border-radius: 6px; background: #fff8e6; color: #5a3d00; font-weight: 700; }
.lb-status { margin: 0; color: var(--muted); }
.lb-status.error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #b42318; }
.lb-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.lb-scroll:focus-visible { outline: 3px solid var(--focus, #2f7fd1); outline-offset: 2px; }
.lb-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .9rem; }
.lb-table th, .lb-table td { padding: 10px 12px; border-bottom: 1px solid #e3e9ef; text-align: left; vertical-align: middle; }
.lb-table thead th { position: sticky; top: 0; background: #eef3f7; color: #34495a; font-size: .78rem; letter-spacing: .02em; }
.lb-table thead small { margin-left: 2px; font-weight: 500; color: #56687a; }
.lb-table tbody th { font-weight: 700; }
.lb-table tbody th small { display: block; margin-top: 2px; font-weight: 500; color: var(--muted); }
.lb-table tbody tr:nth-child(even) { background: #fafcfd; }
.lb-table tbody tr.mine { background: #fff4d6; box-shadow: inset 4px 0 0 #f5a623; }
.lb-rank { width: 48px; font-weight: 800; color: #173c57; }
.lb-table tbody tr:nth-child(-n+3) .lb-rank { color: #9a5b00; }
.lb-total strong { color: #173c57; font-size: 1rem; }
.lb-empty { color: #8594a1; font-weight: 700; }
.lb-playing { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: #e7f0fb; color: #1f4f8c; font-size: .76rem; font-weight: 700; }
.lb-playing .icon { width: 14px; height: 14px; }
.lb-you { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #f5a623; color: #2b1a00; font-size: .7rem; font-weight: 800; vertical-align: middle; }
.lb-more { justify-self: start; }
.lb-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--muted); font-size: .82rem; }
.lb-note .icon { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; }
@media (max-width: 620px) {
  .lb-panel { padding: 16px; }
  .lb-profile > span { flex: 1 1 100%; }
  .lb-tabs button { flex: 1 1 calc(50% - 8px); }
}
@media (forced-colors: active) { .lb-table tbody tr.mine { outline: 2px solid Highlight; } .lb-tabs button[aria-pressed="true"] { border: 2px solid Highlight; } }
/* Booth mode: who is playing now, next to the "Switch player" button in the header. */
.lb-who { display: inline-flex; align-items: center; gap: 6px; max-width: 180px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff8e6; color: #5a3d00; font-size: .84rem; }
.lb-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-who .icon { flex: 0 0 auto; width: 16px; height: 16px; }
@media (max-width: 620px) { .lb-who { max-width: 110px; padding: 4px 8px; font-size: .76rem; } }
/* Returning players on a shared booth laptop. */
.lb-recent { display: grid; gap: 8px; margin: 6px 0 4px; padding: 12px; border: 1px solid #f0d08a; border-radius: 10px; background: #fff8e6; }
.lb-recent-title { display: flex; align-items: center; gap: 6px; margin: 0; color: #5a3d00; font-weight: 700; font-size: .88rem; }
.lb-recent-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 180px; overflow-y: auto; }
.lb-recent-list .button { display: inline-grid; justify-items: start; min-height: 44px; padding: 6px 12px; text-align: left; }
.lb-recent-list small { color: var(--muted); font-size: .72rem; font-weight: 500; }
.lb-recent-or { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }

/* Admin leaderboard reset (/#admin) reuses the leaderboard shell and join-form controls. */
.admin-panel .dialog-actions { justify-content: flex-start; }
.admin-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.admin-list li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: baseline; font-size: .9rem; }
.admin-list li b { font-size: 1.1rem; font-variant-numeric: tabular-nums; text-align: right; }
.admin-summary, .admin-done { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.admin-done { border-color: #8fd0ae; background: #eaf7f0; }
.admin-summary h2, .admin-done h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 4px; }
