/* Global leaderboards, mirroring the game's LEADERBOARDS screen:
   four category tabs, an all-time / this-week switch, and one card per board
   with its record, holder and top 10. */
.boards-section { padding: 60px 0 110px; }

/* Tabs and scope */
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.lb-cats { display: flex; gap: 6px; padding: 6px; border-radius: 16px; background: var(--sign); box-shadow: inset 0 0 0 2px var(--sign), inset 0 0 0 3.5px var(--brass); overflow-x: auto; scrollbar-width: none; }
.lb-cats::-webkit-scrollbar { display: none; }
.lb-cat { flex: none; font: 700 15px/1 var(--serif); letter-spacing: .1em; text-transform: uppercase; color: rgba(241,233,216,.78); background: transparent; border: 0; border-radius: 11px; padding: 12px 18px; cursor: pointer; transition: background .2s, color .2s; }
.lb-cat span { font: 800 11px/1 var(--body); letter-spacing: 0; margin-left: 4px; padding: 3px 7px; border-radius: 999px; background: rgba(241,233,216,.12); vertical-align: 2px; }
.lb-cat:hover { color: var(--cream); background: rgba(241,233,216,.08); }
.lb-cat[aria-selected="true"] { background: var(--cream); color: var(--sign); }
.lb-cat[aria-selected="true"] span { background: var(--gold); color: var(--on-gold); }
.lb-scope { display: inline-flex; padding: 4px; border-radius: 999px; background: #fff; box-shadow: 0 1px 0 rgba(35,34,43,.06), inset 0 0 0 1px rgba(35,34,43,.1); }
.lb-scope-btn { font: 800 13px/1 var(--body); letter-spacing: .04em; border: 0; background: transparent; color: var(--ink-soft); padding: 10px 16px; border-radius: 999px; cursor: pointer; }
.lb-scope-btn[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.lb-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 2px 20px; font-size: 14px; color: var(--ink-soft); }
.lb-meta b { color: var(--ink); }
.lb-live { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1.4 var(--sans-sign); letter-spacing: .2em; text-transform: uppercase; color: #6B5A3E; }
.lb-live i { width: 8px; height: 8px; border-radius: 50%; background: #3FAA4C; animation: lb-pulse 2s ease-out infinite; }
@keyframes lb-pulse { 0% { box-shadow: 0 0 0 0 rgba(63,170,76,.55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(63,170,76,0); } }
.boards-status:not(.sr-only) { padding: 0 0 18px; font-weight: 700; color: var(--ink-soft); }

/* One card per board */
.lb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lb-grid[hidden] { display: none; }
@media (max-width: 1100px) { .lb-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .lb-grid { grid-template-columns: 1fr; gap: 16px; } }
.lb-card { display: flex; flex-direction: column; border-radius: 20px; padding: 7px; background: var(--sign); box-shadow: inset 0 0 0 3px var(--sign), inset 0 0 0 5px var(--brass), 0 26px 50px -34px rgba(12,17,26,.6); }
.lb-card-head { padding: 13px 14px 12px; color: var(--cream); }
.lb-kick { font: 600 10.5px/1 var(--sans-sign); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.lb-card-head h3 { font-size: 21px; margin: 7px 0 5px; letter-spacing: .04em; }
.lb-note { font-size: 13px; line-height: 1.35; color: rgba(241,233,216,.7); min-height: 2.7em; }

/* The record: the one number the board is about, on a season-pass slab. */
.lb-hold { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 14px 14px 13px; border-radius: 13px 13px 0 0; background: radial-gradient(120% 110% at 0% 0%, rgba(242,169,59,.22), rgba(242,169,59,0) 65%), linear-gradient(160deg, #0F4A47, var(--pass-teal)); color: var(--cream); min-height: 76px; }
.lb-hold-val { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.lb-hold-val b { font: 900 34px/1 var(--display); letter-spacing: -.03em; color: var(--gold-hi); transform: skewX(-5deg); display: inline-block; }
.lb-hold-val small { font: 600 11px/1 var(--sans-sign); letter-spacing: .16em; text-transform: uppercase; color: rgba(241,233,216,.7); }
.lb-hold-who { min-width: 0; text-align: right; display: grid; gap: 3px; }
.lb-hold-who b { font: 900 15px/1.15 var(--display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-hold-who span { font: 600 10px/1.2 var(--sans-sign); letter-spacing: .16em; text-transform: uppercase; color: rgba(241,233,216,.62); }
.lb-hold.is-open { background: repeating-linear-gradient(135deg, rgba(241,233,216,.05) 0 10px, rgba(241,233,216,.02) 10px 20px), #16362A; box-shadow: inset 0 0 0 1px rgba(196,154,85,.35); }
.lb-hold.is-open .lb-hold-val b { font-size: 21px; color: var(--cream); }

/* The top 10 on a dark results board with flip tiles. Fixed rows, so nothing jumps. */
.lb-rows { list-style: none; margin: 0; padding: 8px; background: var(--night); display: grid; gap: 4px; }
.lb-rows li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 5px 9px; min-height: 30px; border-radius: 7px; background: rgba(241,233,216,.045); color: var(--cream); }
.lb-rows li:first-child.lb-filled { background: rgba(242,169,59,.16); box-shadow: inset 0 0 0 1px rgba(242,169,59,.4); }
.lb-rows .lb-place { font: 900 14px/1 var(--display); color: var(--brass); transform: skewX(-5deg); }
.lb-rows .lb-who { font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-rows .lb-val { display: inline-flex; gap: 2px; font: 800 13px/1 ui-monospace, 'SF Mono', Menlo, monospace; }
.lb-rows .lb-val i { font-style: normal; display: inline-grid; place-items: center; min-width: 15px; height: 21px; padding: 0 2px; border-radius: 3px; background: linear-gradient(180deg, #273043 0 50%, #1D2433 50%); color: var(--cream); box-shadow: inset 0 -1px 0 rgba(0,0,0,.5); }
.lb-rows .lb-val i.sep { min-width: 0; background: none; box-shadow: none; padding: 0; color: var(--brass); }
.lb-rows li.lb-open .lb-who, .lb-rows li.lb-open .lb-val { color: rgba(241,233,216,.72); font-weight: 700; }
.lb-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px 9px; border-radius: 0 0 13px 13px; background: var(--night); border-top: 1px dashed rgba(241,233,216,.12); font: 600 10.5px/1.3 var(--sans-sign); letter-spacing: .14em; text-transform: uppercase; color: rgba(241,233,216,.72); }

/* A closed run: last in its tab, dimmed, read-only. */
.lb-card.is-closed { filter: saturate(.45); }
.lb-card.is-closed .lb-kick { color: var(--cream); }

/* Motion: tiles flip as the data lands. Off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .lb-rows li.lb-filled .lb-val i { animation: flip .5s cubic-bezier(.3,.7,.3,1) both; }
  .lb-rows li.lb-filled .lb-val i:nth-child(3) { animation-delay: .05s; } .lb-rows li.lb-filled .lb-val i:nth-child(4) { animation-delay: .1s; } .lb-rows li.lb-filled .lb-val i:nth-child(5) { animation-delay: .15s; } .lb-rows li.lb-filled .lb-val i:nth-child(6) { animation-delay: .2s; } .lb-rows li.lb-filled .lb-val i:nth-child(7) { animation-delay: .25s; }
  @keyframes flip { 0% { transform: rotateX(90deg); } 60% { transform: rotateX(-12deg); } 100% { transform: rotateX(0); } }
  .lb-grid:not([hidden]) { animation: lb-fade .35s ease both; }
  @keyframes lb-fade { from { opacity: 0; transform: translateY(6px); } }
}
@media (prefers-reduced-motion: reduce) { .lb-live i { animation: none; } }
@media (max-width: 560px) {
  .lb-cats { width: 100%; }
  .lb-cat { flex: 1; padding: 11px 6px; font-size: 13px; letter-spacing: .06em; }
  .lb-cat span { display: none; }
}
