/* ============================================================
   JOIN IN LIVE — /leaderboard
   ============================================================ */
[hidden] { display: none !important; }

.lb-body { padding-bottom: 80px; }

.back-link {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-3);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--rad);
  background: var(--ink-2);
  transition: color 200ms, border-color 200ms;
}
.back-link:hover { color: var(--saffron); border-color: var(--saffron); }

.lb {
  padding: 28px 22px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 980px;
  margin-inline: auto;
}

/* ---------- HERO ---------- */
.lb-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: var(--rad-lg);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255,138,31,0.15) 0%, transparent 70%),
    linear-gradient(180deg, var(--ink-2) 0%, var(--ink-1) 100%);
  text-align: center;
  overflow: hidden;
}
.lb-hero::after {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 60%; max-width: 480px; height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--saffron), transparent);
}

.lb-hero-eyebrow {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.36em;
  color: var(--saffron);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
}
.lb-hero-eyebrow .loader-pulse {
  width: 7px; height: 7px;
  background: var(--blood);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--blood);
  animation: pulse 1.1s ease-in-out infinite;
  display: inline-block;
}
.lb-hero-title {
  margin: 0;
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 900;
  font-size: clamp(40px, 7vw, 76px);
  letter-spacing: 0.04em;
  line-height: 0.92;
  color: var(--bone);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lb-hero-title span:nth-child(2) {
  -webkit-text-stroke: 1.5px var(--saffron);
  color: transparent;
}

.lb-meta {
  display: flex;
  gap: 22px;
  margin-top: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--bone-2);
}
.lb-meta span { display: inline-flex; gap: 6px; align-items: baseline; }
.lb-meta i {
  font-style: normal;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--bone-3);
}
.lb-meta b { font-weight: 700; color: var(--bone); font-variant-numeric: tabular-nums; }

/* ---------- "YOU" CALLOUT ---------- */
.lb-you {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(255,138,31,0.08) 0%, rgba(255,138,31,0.02) 100%);
  border: 1px solid var(--saffron);
  border-radius: var(--rad-lg);
  box-shadow: 0 0 0 1px rgba(255,138,31,0.18), 0 0 30px rgba(255,138,31,0.10);
}
.lb-you-rank {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 900;
  font-size: 36px;
  color: var(--saffron);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lb-you-rank span { color: var(--saffron); }
.lb-you-name {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--bone);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lb-you-stats { display: flex; gap: 18px; }
.lb-you-stats span { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.lb-you-stats i {
  font-style: normal;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--bone-3);
  font-family: "Archivo", sans-serif;
}
.lb-you-stats b {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lb-you-stats span:first-child b { color: var(--saffron); }

/* ---------- TABLE ---------- */
.lb-table-wrap { display: flex; flex-direction: column; gap: 6px; }
.lb-table {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lb-row {
  display: grid;
  grid-template-columns: 60px 1.2fr repeat(4, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  border-left: 3px solid var(--bone-3);
}
.lb-row.is-you {
  border-color: var(--saffron);
  border-left-color: var(--saffron);
  background: rgba(255,138,31,0.05);
}
.lb-row.is-top1 { border-left-color: var(--gold); }
.lb-row.is-top2 { border-left-color: var(--bone-2); }
.lb-row.is-top3 { border-left-color: #cd7f32; /* bronze */ }
.lb-row.lb-empty {
  grid-template-columns: 1fr;
  text-align: center;
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--bone-3);
  padding: 30px 18px;
}
.lb-rank {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 900;
  font-size: 24px;
  color: var(--bone-2);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.lb-row.is-top1 .lb-rank { color: var(--gold); }
.lb-row.is-top2 .lb-rank { color: var(--bone); }
.lb-row.is-top3 .lb-rank { color: #cd7f32; }

.lb-name {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.03em;
  color: var(--bone);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-cell {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--bone-2);
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.lb-cell b {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--bone);
  line-height: 1;
}
.lb-cell.lb-cell--points b { color: var(--saffron); font-size: 26px; }
.lb-cell i {
  font-style: normal;
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--bone-3);
}

.lb-table-head {
  display: grid;
  grid-template-columns: 60px 1.2fr repeat(4, 1fr);
  gap: 14px;
  padding: 6px 18px;
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--bone-3);
  text-transform: uppercase;
}
.lb-table-head span:not(:first-child):not(:nth-child(2)) {
  text-align: right;
}

@media (max-width: 760px) {
  .lb-hero-title { font-size: clamp(36px, 11vw, 56px); }
  .lb-meta { flex-wrap: wrap; gap: 14px; justify-content: center; }
  .lb-you { grid-template-columns: 56px 1fr; grid-template-rows: auto auto; }
  .lb-you-stats { grid-column: 1 / -1; justify-content: space-between; }
  .lb-row {
    grid-template-columns: 40px 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px 12px;
  }
  .lb-name { grid-column: 2; }
  .lb-cell { grid-column: 3; align-items: flex-end; }
  .lb-cell.lb-cell--points { grid-row: 1; }
  .lb-cell:not(.lb-cell--points) { grid-row: 2; }
  .lb-cell.lb-cell--overs   { grid-column: 2; align-items: flex-start; }
  .lb-cell.lb-cell--avg     { grid-column: 3; }
  .lb-cell.lb-cell--best    { display: none; }
  .lb-table-head { display: none; }
}
