/* Standings reuse the arena's cards, segmented controls, currency chips and profiles. */
#ha-ranks-page { container: rank / inline-size; }
.lb-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin: 0 0 var(--s6); }
.lb-heading h1 { font-family: var(--display); font-size: clamp(28px, 3.7cqi, 38px); line-height: 1.2; font-weight: 800; }
.lb-ranking-rule { position: relative; flex: 0 0 auto; font-size: var(--fs-3); color: var(--txt-mute); }
.lb-ranking-rule summary { cursor: pointer; list-style: none; min-height: 36px; display: flex; align-items: center; gap: 7px; }
.lb-ranking-rule summary::-webkit-details-marker { display: none; }
.lb-ranking-rule summary::after { content: 'i'; width: 16px; height: 16px; border: 1px solid var(--txt-mute); border-radius: 50%; font-family: var(--num); font-size: 10px; text-align: center; line-height: 15px; }
.lb-ranking-rule p { position: absolute; right: 0; top: 42px; width: min(290px, 80vw); padding: var(--s4); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--slab); color: var(--txt-dim); z-index: 5; line-height: 1.7; }
.lb-toolbar { justify-content: space-between; }
.lb-toolbar .ha-status-filters { display: flex; }
.lb-toolbar .ha-status-filters button { flex: 1; }
.lb-toolbar .ha-asset-pick { margin: 0; }
.lb-toolbar .ha-asset-opt { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 78px; }
.lb-toolbar .ha-asset-opt img { width: 18px; height: 18px; }
.lb-showcase.ha-card { padding: 0; margin-bottom: var(--s6); overflow: hidden; background: var(--panel); transform: none; animation: none; box-shadow: var(--slab); }
.lb-scene-wrap { position: relative; height: clamp(360px, 42cqi, 450px); background: #0b171f; }
.lb-scene { position: absolute; inset: 0; }
.lb-scene-wrap::after { content: ''; position: absolute; inset: 0 0 auto; height: 65px; background: linear-gradient(#0b171fb3, transparent); pointer-events: none; }
.lb-scene canvas { display: block; width: 100%; height: 100%; }
.lb-stage-caption { position: absolute; z-index: 1; top: var(--s5); left: var(--s5); right: var(--s5); display: flex; justify-content: space-between; font-size: var(--fs-3); font-weight: 600; color: var(--txt-dim); pointer-events: none; }
.lb-stage-caption span + span { color: var(--txt-mute); font-weight: 400; }
.lb-scene-targets { position: absolute; inset: 0; pointer-events: none; }
.lb-figure-rotate { position: absolute; transform: translate(-50%, -50%); background: transparent; border: 0; border-radius: 42% 42% var(--r-sm) var(--r-sm); cursor: grab; pointer-events: auto; touch-action: pan-y; user-select: none; }
.lb-figure-rotate.is-dragging { cursor: grabbing; }
.lb-figure-rotate:focus-visible:not([data-pointer-focus]) { outline: 2px solid var(--green); outline-offset: 3px; }
.lb-figure-rotate[data-pointer-focus] { outline: none; }
.lb-showcase:not([data-scene="ready"]) .lb-scene-targets { visibility: hidden; }
.lb-podium { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: var(--s5) max(var(--s5), 9cqi); background: var(--panel-2); border-top: 1px solid var(--line); gap: var(--s5); }
.lb-podium-place { position: relative; min-width: 0; text-align: center; }
.lb-showcase[data-scene="ready"] .lb-podium { position: relative; display: block; height: 148px; }
.lb-showcase[data-scene="ready"] .lb-podium-place { position: absolute; left: var(--place-x, 50%); top: 10px; width: 25%; transform: translateX(-50%); }
.lb-place-trophy { display: block; width: 58px; height: 58px; object-fit: contain; margin: 0 auto 2px; filter: drop-shadow(0 3px 3px #0005); }
.lb-place-1 .lb-place-trophy { width: 64px; height: 64px; margin-top: -6px; }
.lb-podium-name { font-weight: 700; font-size: var(--fs-5); min-width: 0; color: var(--txt); }
.lb-podium-name .ha-player-name { max-width: 100%; min-height: 28px; }
.lb-podium-net { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 3px; font: 600 var(--fs-6)/1.5 var(--num); color: var(--txt-mute); white-space: nowrap; }
.lb-podium-net .ha-money { max-width: 100%; }
.lb-podium-net img { width: 16px; height: 16px; }
.lb-podium-place.is-empty .lb-podium-name { color: var(--txt-mute); font-weight: 400; }
.lb-fallback-portrait { display: none; }
.lb-showcase[data-scene="unavailable"] .lb-scene-wrap { display: none; }
.lb-showcase[data-scene="unavailable"] .lb-fallback-portrait { display: block; margin: 0 auto 8px; width: 88px; height: 88px; }
.lb-fallback-portrait img { border-radius: 50%; width: 100%; height: 100%; object-fit: cover; }
.lb-table-heading { display: flex; align-items: center; gap: var(--s4); justify-content: space-between; margin-bottom: var(--s4); }
.lb-table-heading .ha-sec-head { margin: 0; }
.lb-table-heading h2 { display: inline-flex; align-items: center; gap: var(--s2); }
.lb-your-position { color: var(--txt-mute); font-size: var(--fs-3); }
.lb-your-position b { color: var(--green-soft); margin-left: 6px; font-family: var(--num); }
.lb-table.ha-card { padding: 0; overflow: hidden; }
.lb-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 80px 105px minmax(130px, 180px); gap: var(--s4); align-items: center; min-height: 76px; padding: var(--s3) var(--s5); }
.lb-row + .lb-row { border-top: 1px solid var(--line-soft); }
.lb-row:not(.lb-table-head):hover { background: rgba(255, 255, 255, .025); }
.lb-row.is-me { background: rgba(204, 255, 0, .035); box-shadow: inset 2px 0 var(--green); }
.lb-table-head { min-height: 43px; background: var(--panel); color: var(--txt-mute); font-size: var(--fs-2); font-weight: 500; }
.lb-table-head > :last-child { text-align: right; }
.lb-rank { color: var(--txt-mute); font: 500 var(--fs-4) var(--num); }
.lb-rank-1 { color: var(--gold); }
.lb-rank-2 { color: #b1c0ca; }
.lb-rank-3 { color: #c98b57; }
.lb-player { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.lb-portrait { flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-xs); overflow: hidden; background: var(--raise); }
.lb-portrait img { width: 100%; height: 100%; object-fit: cover; }
.lb-portrait:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.lb-player-copy { min-width: 0; }
.lb-player-name { display: flex; align-items: center; gap: 3px; min-width: 0; font-weight: 600; font-size: var(--fs-4); }
.lb-player-name .ha-player-name { min-width: 0; min-height: 30px; }
.lb-player-name .ha-badge { flex: 0 0 22px; width: 22px; height: 22px; }
.lb-you-tag { color: var(--green-soft); font-size: var(--fs-2); font-weight: 400; margin-left: 4px; }
.lb-games, .lb-record, .lb-net { font-family: var(--num); font-variant-numeric: tabular-nums; text-align: right; color: var(--txt-dim); font-size: var(--fs-3); }
.lb-record { display: flex; justify-content: flex-end; gap: 8px; }
.lb-record span + span { color: var(--txt-mute); }
.lb-net { display: flex; justify-content: flex-end; gap: 5px; min-width: 0; font-size: var(--fs-5); white-space: nowrap; }
.lb-net img { width: 16px; height: 16px; }
.lb-mobile-record { display: none; }
.lb-empty { padding: 42px var(--s5); text-align: center; }
.lb-empty strong { display: block; color: var(--txt-dim); font-size: var(--fs-5); font-weight: 500; }
.lb-empty span { display: block; margin-top: var(--s2); color: var(--txt-mute); font-size: var(--fs-3); }
.lb-loading i { display: block; height: 56px; margin: 12px 20px; border-radius: var(--r-xs); background: var(--raise); }
#ha-ranks-page .is-pos { color: var(--green-soft); }
#ha-ranks-page .is-neg { color: var(--red-hot); }
#ha-lb-note:empty { display: none; }
@container rank (max-width: 720px) {
  .lb-row { grid-template-columns: 32px minmax(0, 1fr) 80px minmax(100px, 140px); gap: var(--s3); padding-inline: var(--s4); }
  .lb-games { display: none; }
  .lb-toolbar { gap: var(--s3); }
  .lb-toolbar .ha-status-filters { flex: 1; }
  .lb-toolbar .ha-asset-pick { flex: 1; }
  .lb-scene-wrap { height: 330px; }
  .lb-podium { padding: var(--s4); gap: var(--s3); }
}
@container rank (max-width: 480px) {
  .lb-heading { margin-bottom: var(--s5); align-items: flex-start; }
  .lb-heading h1 { font-size: 26px; }
  .lb-ranking-rule summary { font-size: 0; min-height: 44px; min-width: 44px; justify-content: center; }
  .lb-ranking-rule summary::after { font-size: 11px; }
  .lb-toolbar .ha-status-filters, .lb-toolbar .ha-asset-pick { flex-basis: 100%; }
  .lb-toolbar .ha-status-filters button, .lb-toolbar .ha-asset-opt { min-height: 44px; }
  .lb-scene-wrap { height: 255px; }
  .lb-stage-caption { inset: 14px 14px auto; font-size: var(--fs-2); }
  .lb-podium { padding: 12px 8px 16px; gap: 8px; }
  .lb-place-trophy { width: 48px; height: 48px; }
  .lb-place-1 .lb-place-trophy { width: 54px; height: 54px; }
  .lb-podium-name { font-size: var(--fs-3); }
  .lb-podium-name .ha-player-name { min-height: 36px; }
  .lb-podium-net { font-size: var(--fs-3); flex-direction: column; gap: 2px; }
  .lb-podium-net img { display: none; }
  .lb-row { grid-template-columns: 26px minmax(0, 1fr) minmax(82px, 105px); padding: 12px; gap: 8px; }
  .lb-record { display: none; }
  .lb-mobile-record { display: block; font: 10px var(--num); color: var(--txt-mute); }
  .lb-portrait { width: 32px; height: 32px; flex-basis: 32px; }
  .lb-player { gap: 8px; }
  .lb-player-name { font-size: var(--fs-3); }
  .lb-net { font-size: var(--fs-3); }
  .lb-net img { display: none; }
  .lb-you-tag { display: none; }
  .lb-table-heading { flex-wrap: wrap; gap: 8px; }
}
