:root {
  color-scheme: dark;
  --bg: #09070f;
  --panel: rgba(19, 13, 31, 0.92);
  --panel-strong: rgba(28, 18, 43, 0.96);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f2ecff;
  --muted: #bcaee5;
  --gold: #f2bb4f;
  --cyan: #22d3ee;
  --red: #e84f67;
  --green: #43d17d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(124, 58, 237, 0.25), transparent 32%),
    radial-gradient(circle at 82% 28%, rgba(34, 211, 238, 0.13), transparent 30%),
    linear-gradient(180deg, #110b1d 0%, var(--bg) 70%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.leaderboard-shell {
  width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 20px 0 48px;
}

.leaderboard-header,
.leaderboard-panel,
.leaderboard-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 50px rgba(8, 5, 20, 0.35);
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
}

.home-link,
.header-actions,
.identity,
.rank-block,
.stat-group,
.gear-tags {
  display: flex;
  align-items: center;
}

.home-link {
  min-width: 0;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.home-link img,
.avatar {
  border-radius: 50%;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.link-button,
.refresh-button,
.tab-button {
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--cyan);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
}

.link-button {
  padding: 8px 10px;
  text-decoration: none;
}

.link-button.secondary {
  border-color: rgba(242, 187, 79, 0.36);
  background: rgba(242, 187, 79, 0.08);
  color: var(--gold);
}

.leaderboard-hero {
  padding: 44px 4px 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  line-height: 0.95;
}

.leaderboard-hero p:last-child {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.leaderboard-panel {
  padding: 12px;
}

.tabs,
.panel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tabs {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.tab-button,
.refresh-button {
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}

.tab-button.is-active {
  border-color: rgba(232, 79, 103, 0.45);
  background: rgba(232, 79, 103, 0.16);
  color: #ffb4c0;
}

.panel-meta {
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 76px minmax(180px, 1.1fr) minmax(220px, 1.2fr) minmax(180px, 0.9fr) minmax(160px, 0.8fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
}

.streamer-list .leaderboard-row {
  grid-template-columns: 76px minmax(200px, 1.3fr) repeat(3, minmax(120px, 0.7fr));
}

.rank-block {
  gap: 8px;
  color: var(--gold);
  font-weight: 900;
}

.rank-number {
  min-width: 40px;
  font-size: 1.25rem;
}

.avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.identity {
  min-width: 0;
  gap: 10px;
  position: relative;
}

.identity .profile-name,
.identity span,
.gear-tag,
.channel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity .profile-name,
.identity span {
  display: block;
}

.profile-name,
.channel-name {
  color: var(--text);
  text-decoration: none;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  color: #fecaca;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

.stream-preview {
  position: absolute;
  z-index: 20;
  left: 52px;
  top: 46px;
  width: min(360px, 72vw);
  padding: 30px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 8, 20, 0.98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.identity:hover .stream-preview,
.identity:focus-within .stream-preview {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.identity.stream-preview-dismissed .stream-preview {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.stream-preview-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1;
}

.stream-preview-close:hover,
.stream-preview-close:focus-visible {
  color: var(--text);
  border-color: rgba(239, 68, 68, 0.55);
  outline: none;
}

.stream-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
}

.stream-preview strong,
.stream-preview span {
  display: block;
  white-space: normal;
}

.stream-preview strong {
  color: var(--text);
  font-size: 0.9rem;
}

.stream-preview span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-name:hover,
.channel-name:hover {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.identity span,
.stat-label,
.channel-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.stat-group {
  gap: 14px;
}

.stat strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.stat-label {
  display: block;
}

.gear-tags {
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.gear-tag {
  max-width: 180px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.76rem;
}

.gear-tag.empty {
  color: var(--muted);
}

.rarity-legendary {
  border-color: rgba(242, 187, 79, 0.46);
  color: var(--gold);
}

.rarity-unique {
  border-color: rgba(232, 79, 103, 0.46);
  color: #ff9aad;
}

.rarity-rare {
  border-color: rgba(34, 211, 238, 0.46);
  color: var(--cyan);
}

.rarity-uncommon {
  border-color: rgba(67, 209, 125, 0.46);
  color: var(--green);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .leaderboard-row,
  .streamer-list .leaderboard-row {
    grid-template-columns: 1fr;
  }

  .rank-block {
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .leaderboard-header,
  .panel-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions,
  .tabs {
    width: 100%;
  }

  .link-button,
  .tab-button,
  .refresh-button {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* -------------------------------------------------------------------------- */
/* Hall of Renown visual system                                               */
/* -------------------------------------------------------------------------- */

:root {
  --ink: #08040d;
  --ink-soft: #13091d;
  --violet: #9b5cff;
  --red: #f43b5e;
  --cyan: #2ed9ff;
  --gold: #d8b86d;
  --gold-bright: #f2d990;
  --ivory: #f5efff;
  --muted: #baaed0;
  --line: rgba(216, 184, 109, 0.18);
  --panel: rgba(10, 5, 17, 0.86);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 12% 7%, rgba(112, 46, 178, 0.33), transparent 29rem),
    radial-gradient(circle at 91% 38%, rgba(244, 59, 94, 0.09), transparent 26rem),
    radial-gradient(circle at 64% 94%, rgba(46, 217, 255, 0.07), transparent 32rem),
    linear-gradient(145deg, #0a0510, #08040d 50%, #100718);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
}

::selection {
  color: #12081b;
  background: var(--gold-bright);
}

:where(a, button):focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: #13091d;
  background: var(--gold-bright);
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.leaderboard-stars {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    radial-gradient(1px 1px at 28px 46px, #fff, transparent),
    radial-gradient(1px 1px at 132px 92px, #d7bfff, transparent),
    radial-gradient(2px 2px at 238px 166px, #fff8, transparent);
  background-size: 290px 220px;
  animation: hallDrift 34s linear infinite;
}

.leaderboard-glow {
  position: fixed;
  z-index: -2;
  width: min(46vw, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.25;
}

.leaderboard-glow-left {
  top: 5%;
  left: -24%;
  background: rgba(128, 57, 197, 0.62);
}

.leaderboard-glow-right {
  right: -27%;
  bottom: 4%;
  background: rgba(186, 37, 91, 0.35);
}

.leaderboard-shell {
  width: min(1220px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.leaderboard-header {
  position: sticky;
  top: 1rem;
  z-index: 20;
  min-height: 66px;
  padding: 0.55rem 0.65rem 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 4, 13, 0.8);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.leaderboard-header::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 6px;
  pointer-events: none;
}

.home-link {
  gap: 0.72rem;
  color: var(--ivory);
}

.home-link img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 50%;
  filter: drop-shadow(0 0 9px rgba(244, 59, 94, 0.42));
}

.home-link > span {
  display: grid;
  line-height: 1.08;
}

.home-link strong {
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.home-link small {
  margin-top: 0.25rem;
  color: var(--gold);
  font-size: 0.59rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.header-actions {
  gap: 0.5rem;
}

.link-button,
.refresh-button,
.tab-button {
  min-height: 42px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.link-button {
  border: 1px solid rgba(216, 184, 109, 0.42);
  color: #160a20;
  background: linear-gradient(135deg, var(--gold-bright), #b78a3d);
}

.link-button.secondary {
  color: var(--muted);
  border-color: rgba(216, 184, 109, 0.15);
  background: rgba(255, 255, 255, 0.025);
}

.link-button.live-link {
  color: var(--ivory);
  border-color: rgba(244, 59, 94, 0.38);
  background: rgba(92, 16, 41, 0.58);
}

.live-link > span {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

.leaderboard-hero {
  min-height: clamp(520px, 66vh, 690px);
  padding: clamp(4.5rem, 9vw, 7.5rem) 1rem clamp(4rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 7rem);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(216, 184, 109, 0.4), transparent) 1;
}

.leaderboard-hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.21em;
}

.leaderboard-hero h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--ivory);
  font-size: clamp(3.65rem, 7.6vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-shadow: 0 14px 50px rgba(114, 50, 176, 0.28);
}

.leaderboard-hero h1 span {
  color: transparent;
  background: linear-gradient(105deg, #fff, var(--gold-bright) 48%, #d497ff);
  -webkit-background-clip: text;
  background-clip: text;
}

.leaderboard-hero-copy > p:not(.eyebrow) {
  max-width: 62ch;
  margin: 1.6rem 0 0;
  color: #c8bdd8;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.75;
}

.hero-ledger-notes {
  margin-top: 2rem;
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
  border-top: 1px solid rgba(216, 184, 109, 0.14);
}

.hero-ledger-notes span {
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 700;
}

.hero-ledger-notes span::before {
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.leaderboard-crest {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 1;
  justify-self: end;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.leaderboard-crest::before {
  content: "";
  position: absolute;
  inset: 13%;
  z-index: -2;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, rgba(244, 59, 94, 0.18), transparent 20%),
    radial-gradient(circle, rgba(118, 55, 184, 0.36), transparent 68%);
  box-shadow: 0 0 90px rgba(118, 55, 184, 0.24);
}

.leaderboard-crest img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  filter: saturate(1.15) brightness(1.15) drop-shadow(0 0 20px rgba(244, 59, 94, 0.25));
  mask-image: radial-gradient(circle at 50% 46%, black 58%, transparent 76%);
  -webkit-mask-image: radial-gradient(circle at 50% 46%, black 58%, transparent 76%);
}

.leaderboard-crest small {
  position: absolute;
  right: -2%;
  bottom: 13%;
  padding: 0.65rem 0.78rem;
  border: 1px solid rgba(216, 184, 109, 0.2);
  color: var(--muted);
  background: rgba(8, 4, 13, 0.86);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

.crest-ring {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(216, 184, 109, 0.22);
  border-radius: 50%;
  animation: crestSpin 32s linear infinite;
}

.crest-ring::after {
  content: "";
  position: absolute;
  top: 11%;
  left: 12%;
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold);
  background: #13091d;
  transform: rotate(45deg);
}

.crest-ring-outer {
  inset: 2%;
}

.crest-ring-inner {
  inset: 15%;
  border-style: dashed;
  border-color: rgba(155, 92, 255, 0.3);
  animation-duration: 21s;
  animation-direction: reverse;
}

.leaderboard-panel {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: clamp(1rem, 2.8vw, 2rem);
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 34%),
    var(--panel);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(18px) saturate(115%);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
}

.leaderboard-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  width: 76%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 184, 109, 0.62), transparent);
}

.panel-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0 1.25rem;
}

.panel-title-row h2 {
  margin: 0.1rem 0 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.panel-title-row .eyebrow {
  margin-bottom: 0.3rem;
}

.panel-meta {
  margin: 0;
  padding: 0;
  border: 0;
}

.panel-meta span {
  color: var(--muted);
  font-size: 0.69rem;
}

.refresh-button {
  border: 1px solid rgba(216, 184, 109, 0.18);
  color: var(--ivory);
  background: rgba(255, 255, 255, 0.025);
}

.refresh-button:hover,
.refresh-button:focus-visible {
  border-color: rgba(216, 184, 109, 0.45);
  background: rgba(216, 184, 109, 0.07);
}

.tabs {
  margin-bottom: 0.65rem;
  padding: 0.35rem;
  display: inline-flex;
  gap: 0.25rem;
  border: 1px solid rgba(216, 184, 109, 0.12);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.24);
}

.tab-button {
  min-width: 150px;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
}

.tab-button.is-active {
  color: #150a1e;
  border-color: rgba(216, 184, 109, 0.35);
  background: linear-gradient(135deg, var(--gold-bright), #b88c40);
  box-shadow: 0 8px 24px rgba(216, 184, 109, 0.12);
}

.leaderboard-columns {
  padding: 0.7rem 1rem;
  display: grid;
  grid-template-columns: 64px minmax(180px, 1.1fr) minmax(190px, 1.1fr) minmax(190px, 1fr) minmax(150px, 0.82fr);
  gap: 1rem;
  color: #8f829f;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.leaderboard-list {
  gap: 0.55rem;
}

.leaderboard-row,
.streamer-list .leaderboard-row {
  position: relative;
  min-width: 0;
  min-height: 100px;
  padding: 0.95rem 1rem;
  display: grid;
  grid-template-columns: 64px minmax(180px, 1.1fr) minmax(190px, 1.1fr) minmax(190px, 1fr) minmax(150px, 0.82fr);
  align-items: center;
  gap: 1rem;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.leaderboard-row::before {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 0;
  width: 2px;
  background: transparent;
}

.leaderboard-row:hover,
.leaderboard-row:focus-within {
  z-index: 4;
  border-color: rgba(216, 184, 109, 0.3);
  background: rgba(216, 184, 109, 0.035);
  transform: translateX(3px);
}

.leaderboard-row[data-rank="1"] {
  border-color: rgba(242, 217, 144, 0.25);
  background: linear-gradient(90deg, rgba(216, 184, 109, 0.08), rgba(255, 255, 255, 0.018) 45%);
}

.leaderboard-row[data-rank="1"]::before {
  background: var(--gold-bright);
  box-shadow: 0 0 16px rgba(242, 217, 144, 0.65);
}

.leaderboard-row[data-rank="2"]::before {
  background: #c6c3d2;
}

.leaderboard-row[data-rank="3"]::before {
  background: #b97855;
}

.rank-block {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 184, 109, 0.24);
  color: var(--gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.75rem;
  transform: rotate(45deg);
}

.rank-block > span {
  transform: rotate(-45deg);
}

.identity {
  min-width: 0;
  gap: 0.75rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(216, 184, 109, 0.23);
  background: #160a20;
}

.profile-name,
.channel-name {
  color: var(--ivory);
}

.identity > div > span,
.channel-meta,
.stat-label {
  color: var(--muted);
}

.gear-tags {
  gap: 0.35rem;
}

.gear-tag {
  padding: 0.35rem 0.48rem;
  border-radius: 3px;
  font-size: 0.61rem;
  letter-spacing: 0.03em;
}

.stat-group {
  justify-content: flex-start;
  gap: 0.85rem;
}

.stat strong {
  color: var(--gold-bright);
  font-family: "Cinzel", Georgia, serif;
}

.live-badge {
  border-color: rgba(244, 59, 94, 0.34);
  color: #ffc0ce;
  background: rgba(112, 18, 48, 0.36);
}

.stream-preview {
  width: min(360px, 82vw);
  border-color: rgba(216, 184, 109, 0.25);
  border-radius: 5px;
  background: #0a0510;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62);
}

.stream-preview-close {
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
}

.empty-state {
  border-radius: 4px;
  border-color: rgba(216, 184, 109, 0.13);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
}

.leaderboard-footer {
  margin-top: 4rem;
  padding: 2rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(216, 184, 109, 0.14);
}

.leaderboard-footer p {
  color: var(--gold);
  font-family: "Cinzel", Georgia, serif;
}

.leaderboard-footer a {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.leaderboard-footer a span {
  color: var(--gold);
}

@keyframes crestSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hallDrift {
  to {
    background-position: 290px 220px;
  }
}

@media (max-width: 1030px) {
  .leaderboard-columns {
    display: none;
  }

  .leaderboard-row,
  .streamer-list .leaderboard-row {
    grid-template-columns: 56px minmax(190px, 1fr) minmax(180px, 0.9fr);
  }

  .leaderboard-row > .gear-tags {
    grid-column: 3;
  }

  .leaderboard-row > .stat-group,
  .leaderboard-row > :last-child {
    grid-column: 2 / -1;
  }

  .streamer-list .leaderboard-row > .stat-group,
  .streamer-list .leaderboard-row > :last-child {
    grid-column: auto;
  }
}

@media (max-width: 800px) {
  .leaderboard-hero {
    grid-template-columns: 1fr;
  }

  .leaderboard-crest {
    width: min(86vw, 430px);
    justify-self: center;
  }

  .panel-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-meta {
    width: 100%;
  }

  .leaderboard-row,
  .streamer-list .leaderboard-row {
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: start;
  }

  .leaderboard-row > .gear-tags,
  .leaderboard-row > .stat-group,
  .leaderboard-row > :last-child,
  .streamer-list .leaderboard-row > .stat-group,
  .streamer-list .leaderboard-row > :last-child {
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  .leaderboard-shell {
    width: min(100% - 1rem, 1220px);
    padding-top: 0.4rem;
  }

  .leaderboard-header {
    top: 0.4rem;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .header-actions .secondary,
  .header-actions .live-link {
    display: none;
  }

  .leaderboard-hero {
    padding-inline: 0.25rem;
  }

  .leaderboard-hero h1 {
    font-size: clamp(3.2rem, 17vw, 4.8rem);
  }

  .hero-ledger-notes {
    align-items: flex-start;
    flex-direction: column;
  }

  .leaderboard-crest small {
    right: 0;
  }

  .leaderboard-panel {
    padding: 0.75rem;
  }

  .tabs {
    width: 100%;
  }

  .tab-button {
    min-width: 0;
    flex: 1;
  }

  .leaderboard-row,
  .streamer-list .leaderboard-row {
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .stat-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leaderboard-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .leaderboard-stars,
  .crest-ring {
    animation: none;
  }

  .leaderboard-row,
  .skip-link {
    transition: none;
  }
}
