/* Leaderboards on the play page (site/lb.js, docs/leaderboards/DESIGN.md). Builds on app.css's tokens and its full-screen
   chip row (#fschips); light and dark come from the same variables. */
.lbbtn { margin-right: var(--s1); gap: 6px; padding: 0 14px 0 12px; }
.lbbtn svg { color: #e5a000; }
.lbbtn span { font-variant-numeric: tabular-nums; }
.lbbtn small { font: 600 13px/1 var(--body); color: var(--muted); }
.lbbtn[hidden], .lbfs[hidden], .lbp[hidden] { display: none; }
@media (max-width: 640px) { .lbbtn span, .lbbtn small { display: none; } .lbbtn { margin-right: 0; } } /* icon only, like Share: the bar is full on phones */

.lbfs {
  position: relative; display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px 0 10px; border: 0; border-radius: var(--r2);
  font: 700 13px/1 var(--body); color: #fff; background: rgba(8, 14, 32, .6); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font-variant-numeric: tabular-nums; transition: opacity .4s;
}
.lbfs::after { content: ""; position: absolute; inset: -6px; }
.lbfs svg { width: 16px; height: 16px; color: #ffc93c; }
.lbfs.dim { opacity: .5; }
.lbfs:hover, .lbfs:focus-visible, .lbfs[aria-expanded="true"] { opacity: 1; }

.lbp {
  position: absolute; z-index: 3; box-sizing: border-box; padding: 8px 8px 10px; border-radius: var(--r3);
  background: var(--material); color: var(--ink); box-shadow: var(--sh2); font: 500 14px/1.2 var(--body);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.lbh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lbh > svg { flex: none; width: 20px; height: 20px; margin-left: 4px; color: #e5a000; }
.lbtabs { flex: 1; display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--fill); }
.lbtabs button { flex: 1; height: 30px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 700 13px/1 var(--display); cursor: pointer; }
.lbtabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--sh1); }
.lbx { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.lbx:hover { background: var(--fill); color: var(--ink); }
.lbx svg { width: 16px; height: 16px; }
.lbrows { list-style: none; margin: 0; padding: 0; }
.lbrows li { display: grid; grid-template-columns: 22px 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 4px; border-radius: 9px; }
.lbrows .n { text-align: right; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.lbrows .m1 .n { color: #d99a00; } .lbrows .m2 .n { color: #8d9bb0; } .lbrows .m3 .n { color: #c0743a; }
.lbrows .nm { display: flex; align-items: center; min-width: 0; font-weight: 600; white-space: nowrap; }
.lbrows .nm span { overflow: hidden; text-overflow: ellipsis; }
.lbrows .nm i { flex: none; margin-left: 6px; color: var(--muted); font: 500 12px/1 var(--body); }
.lbrows .nm em { flex: none; margin-left: 6px; padding: 3px 6px; border-radius: 6px; background: var(--accent); color: #fff; font: 800 10.5px/1 var(--body); font-style: normal; letter-spacing: .02em; text-transform: uppercase; }
.lbrows .sc { font-weight: 800; font-variant-numeric: tabular-nums; }
.lbrows .me { background: color-mix(in oklab, var(--accent) 15%, transparent); }
.lbrows .me .n, .lbrows .me .sc { color: var(--accent); }
.lbrows .gap { height: 12px; display: flex; justify-content: center; gap: 4px; }
.lbrows .gap i { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: .6; }
.lbrows .empty { display: block; height: auto; padding: 8px; color: var(--muted); }
.lbrows .av { display: grid; place-items: center; width: 24px; height: 24px; font-size: 17px; line-height: 1; }
.lbrows .av.cc { width: auto; height: 18px; padding: 0 4px; border-radius: 4px; background: var(--fill2); color: var(--muted); font: 800 10px/18px var(--body); letter-spacing: .03em; }
.lbrows .av.bot, .lbrows .av.none { border-radius: 50%; background: var(--fill2); color: var(--muted); }
.lbrows .av svg { width: 16px; height: 16px; }
.lbf { margin: 8px 6px 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.lbf b { color: var(--accent); font-weight: 800; }
.lbleg { display: flex; align-items: center; gap: 6px; margin: 4px 6px 0; font-size: 11.5px; color: var(--muted); }
.lbleg svg { flex: none; width: 14px; height: 14px; }
@media (max-width: 420px) { .lbfs { padding: 0 10px 0 8px; } }
@media (prefers-reduced-motion: no-preference) {
  .lbbtn.pop, .lbfs.pop { animation: pop .5s var(--spring); }
  .lbp.pop { animation: lbin .35s var(--settle); }
  @keyframes lbin { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
}
