/* =========================================================
   ToeflLab · Leaderboard — Hall of scores
   ========================================================= */

.tl-lb-page { position: relative; }

/* Breadcrumb — soft, no underline */
.tl-lb-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #8f98ad;
  border: 0;
  box-shadow: none;
}
.tl-lb-crumbs a {
  color: #b4bbcc;
  text-decoration: none;
  border: 0;
  transition: color 0.15s;
}
.tl-lb-crumbs a:hover { color: #f0a878; }
.tl-lb-crumbs [aria-current="page"] {
  color: #f2f4f8;
  font-weight: 700;
}
html[data-theme="light"] .tl-lb-crumbs { color: #8a93a6; }
html[data-theme="light"] .tl-lb-crumbs a { color: #5a6478; }
html[data-theme="light"] .tl-lb-crumbs a:hover { color: #9a3f18; }
html[data-theme="light"] .tl-lb-crumbs [aria-current="page"] { color: #12151c; }

/* ---------- Hero ---------- */
.tl-lb-hero {
  position: relative;
  margin-bottom: 1.35rem;
  padding: 1.65rem 1.5rem 1.7rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(ellipse 90% 120% at 100% -10%, rgba(217, 106, 50, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 90% at -5% 100%, rgba(62, 207, 173, 0.14), transparent 50%),
    linear-gradient(165deg, #1c2740 0%, #121a2c 50%, #141210 100%);
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35);
}
.tl-lb-hero__orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.tl-lb-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: tlLbFloat 10s ease-in-out infinite;
}
.tl-lb-orb--a {
  width: 220px; height: 220px;
  right: -40px; top: -60px;
  background: radial-gradient(circle, rgba(240, 168, 120, 0.55), transparent 70%);
}
.tl-lb-orb--b {
  width: 160px; height: 160px;
  left: 20%; bottom: -50px;
  background: radial-gradient(circle, rgba(62, 207, 173, 0.35), transparent 70%);
  animation-delay: -3s;
}
.tl-lb-orb--c {
  width: 100px; height: 100px;
  right: 30%; top: 40%;
  background: radial-gradient(circle, rgba(255, 224, 138, 0.2), transparent 70%);
  animation-delay: -6s;
}
@keyframes tlLbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(-12px, 10px) scale(1.08); opacity: 0.75; }
}

.tl-lb-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 0.95fr;
  gap: 1.6rem;
  align-items: start;
}
.tl-lb-hero__title {
  font-size: clamp(2rem, 4.5vw, 2.85rem) !important;
  margin-top: 0.35rem;
  background: linear-gradient(135deg, #fff 30%, #f0a878 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tl-lb-hero__lead {
  margin-top: 0.55rem;
  max-width: 38rem;
  line-height: 1.7;
}
.tl-lb-hero__lead strong { color: #f0a878; font-weight: 700; -webkit-text-fill-color: #f0a878; }

/* Period tabs */
.tl-lb-period {
  display: inline-flex;
  gap: 0.3rem;
  margin-top: 1.1rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tl-lb-period__btn {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #b4bbcc;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.tl-lb-period__btn:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.tl-lb-period__btn.is-active {
  color: #0c1220;
  background: linear-gradient(135deg, #f0a878, #d96a32);
  box-shadow: 0 6px 16px rgba(217, 106, 50, 0.35);
}

.tl-lb-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tl-lb-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d5dae6;
  backdrop-filter: blur(8px);
}
.tl-lb-chip strong { color: #f0a878; font-weight: 800; }
.tl-lb-chip--live { border-color: rgba(62, 207, 173, 0.3); color: #5ee0c0; }
.tl-lb-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3ecfad;
  display: inline-block;
  animation: tlLbLivePulse 2s ease-out infinite;
}

.tl-lb-hero__side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.tl-lb-stat-mini {
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  transition: transform 0.2s, border-color 0.2s;
}
.tl-lb-stat-mini:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 168, 120, 0.25);
}
.tl-lb-stat-mini--glow {
  border-color: rgba(240, 168, 120, 0.25);
  background:
    radial-gradient(ellipse 80% 80% at 50% 0%, rgba(217, 106, 50, 0.18), transparent 70%),
    rgba(0, 0, 0, 0.28);
}
.tl-lb-stat-mini span {
  display: block;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8f98ad;
}
.tl-lb-stat-mini b {
  display: block;
  margin-top: 0.28rem;
  font-family: var(--tl-display, Sora, sans-serif);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}
.tl-lb-stat-mini em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  font-size: 0.76rem;
  color: #b4bbcc;
}
.tl-lb-stat-mini--wide { grid-column: 1 / -1; }
.tl-lb-stat-mini__name { font-size: 1.05rem !important; }

/* ---------- Avatar ---------- */
.tl-lb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-family: var(--tl-display, Sora, sans-serif);
  font-weight: 800;
  font-size: 0.78rem;
  color: #fff;
  background: linear-gradient(145deg, #d96a32, #c25522 55%, #2d8a72);
  box-shadow: 0 8px 18px rgba(217, 106, 50, 0.25);
  letter-spacing: -0.02em;
  overflow: hidden;
  position: relative;
}
.tl-lb-avatar--photo {
  background: #1a2234;
  padding: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}
.tl-lb-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tl-lb-avatar--lg {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  font-size: 1.05rem;
}
.tl-lb-avatar--sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.68rem;
}
.tl-lb-avatar--gold {
  background: linear-gradient(145deg, #ffe08a, #e0a21a 55%, #b8860b);
  color: #2a1e08;
  box-shadow: 0 8px 22px rgba(224, 162, 26, 0.4);
}
.tl-lb-avatar--silver {
  background: linear-gradient(145deg, #f0f3f8, #b8c0d0 55%, #8e98ab);
  color: #1a2030;
  box-shadow: 0 8px 22px rgba(150, 160, 180, 0.35);
}
.tl-lb-avatar--bronze {
  background: linear-gradient(145deg, #f0c09a, #cd7f32 55%, #a05a20);
  color: #2a1608;
  box-shadow: 0 8px 22px rgba(205, 127, 50, 0.4);
}
.tl-lb-avatar--ghost {
  background: linear-gradient(145deg, #2a3348, #1a2234);
  color: #8f98ad;
  box-shadow: none;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

/* ---------- Medals ---------- */
.tl-lb-medal {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-family: var(--tl-display, Sora, sans-serif);
  font-weight: 800;
  font-size: 0.95rem;
  color: #0c1220;
}
.tl-lb-medal--gold {
  background: linear-gradient(145deg, #ffe08a, #e0a21a 55%, #b8860b);
  box-shadow: 0 8px 22px rgba(224, 162, 26, 0.4);
}
.tl-lb-medal--silver {
  background: linear-gradient(145deg, #f0f3f8, #b8c0d0 55%, #8e98ab);
  box-shadow: 0 8px 22px rgba(150, 160, 180, 0.35);
}
.tl-lb-medal--bronze {
  background: linear-gradient(145deg, #f0c09a, #cd7f32 55%, #a05a20);
  box-shadow: 0 8px 22px rgba(205, 127, 50, 0.4);
}

/* ---------- Score bands badges ---------- */
.tl-lb-band {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  vertical-align: middle;
}
.tl-lb-band--sm { font-size: 0.62rem; padding: 0.12rem 0.4rem; }
.tl-lb-band--elite {
  background: rgba(224, 162, 26, 0.15);
  color: #ffe08a;
  border-color: rgba(224, 162, 26, 0.35);
}
.tl-lb-band--advanced {
  background: rgba(62, 207, 173, 0.12);
  color: #5ee0c0;
  border-color: rgba(62, 207, 173, 0.3);
}
.tl-lb-band--solid {
  background: rgba(217, 106, 50, 0.12);
  color: #f0a878;
  border-color: rgba(217, 106, 50, 0.3);
}
.tl-lb-band--building {
  background: rgba(150, 160, 180, 0.12);
  color: #b4bbcc;
  border-color: rgba(150, 160, 180, 0.25);
}
.tl-lb-band--starter {
  background: rgba(255, 255, 255, 0.05);
  color: #8f98ad;
  border-color: rgba(255, 255, 255, 0.1);
}

/* ---------- Me card ---------- */
.tl-lb-me {
  border-radius: 22px;
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.35rem;
  border: 1px solid rgba(232, 146, 92, 0.35);
  background:
    radial-gradient(ellipse 70% 120% at 0% 50%, rgba(217, 106, 50, 0.18), transparent 55%),
    linear-gradient(135deg, #1a243a, #141c2e);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.tl-lb-me::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f0a878, transparent);
  opacity: 0.7;
}
.tl-lb-me--top {
  border-color: rgba(62, 207, 173, 0.4);
  background:
    radial-gradient(ellipse 70% 120% at 0% 50%, rgba(62, 207, 173, 0.16), transparent 55%),
    linear-gradient(135deg, #142824, #141c2e);
}
.tl-lb-me--top::before {
  background: linear-gradient(90deg, transparent, #3ecfad, transparent);
}
.tl-lb-me--ghost { border-style: dashed; }
.tl-lb-me--guest { border-color: rgba(255, 255, 255, 0.1); }
.tl-lb-me__label {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0a878;
  margin-bottom: 0.75rem;
}
.tl-lb-me--top .tl-lb-me__label { color: #5ee0c0; }
.tl-lb-me__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: center;
}
.tl-lb-me__rank {
  font-family: var(--tl-display, Sora, sans-serif);
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  min-width: 4.5rem;
  line-height: 1;
}
.tl-lb-me__info { flex: 1; min-width: 180px; }
.tl-lb-me__info strong {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 1.12rem;
  color: #fff;
}
.tl-lb-me__info span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.88rem;
  color: #b4bbcc;
}
.tl-lb-me__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}
.tl-lb-me__stats > div {
  text-align: center;
  padding: 0.7rem 0.4rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.tl-lb-me__stats span {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8f98ad;
}
.tl-lb-me__stats b {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--tl-display, Sora, sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.tl-lb-me__hint {
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
  color: #d5dae6;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.55;
}
.tl-lb-me__hint strong { color: #f0a878; }
.tl-lb-me__cta { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* ---------- Section head ---------- */
.tl-lb-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}
.tl-lb-section-head__sub {
  margin: 0;
  font-size: 0.82rem;
  color: #8f98ad;
}

/* ---------- Podium ---------- */
.tl-lb-podium-wrap { margin-bottom: 1.5rem; }
.tl-lb-podium {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  gap: 0.9rem;
  align-items: end;
}
.tl-lb-podium__card {
  text-align: center;
  padding: 1.2rem 0.9rem 0;
  border-radius: 20px 20px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #1a2438, #121a2c);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
  animation: tlLbRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 0.08s);
}
@keyframes tlLbRise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.tl-lb-podium__card--gold {
  padding-top: 1.55rem;
  border-color: rgba(224, 162, 26, 0.45);
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(224, 162, 26, 0.28), transparent 60%),
    linear-gradient(180deg, #2e2618, #121a2c);
  transform: translateY(-12px);
  z-index: 2;
  box-shadow: 0 22px 50px rgba(224, 162, 26, 0.18), 0 16px 40px rgba(0, 0, 0, 0.3);
}
.tl-lb-podium__card--silver {
  border-color: rgba(184, 192, 208, 0.32);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(184, 192, 208, 0.16), transparent 60%),
    linear-gradient(180deg, #1c2230, #121a2c);
}
.tl-lb-podium__card--bronze {
  border-color: rgba(205, 127, 50, 0.38);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(205, 127, 50, 0.18), transparent 60%),
    linear-gradient(180deg, #261c16, #121a2c);
}
.tl-lb-podium__card.is-me {
  box-shadow: 0 0 0 2px rgba(217, 106, 50, 0.55), 0 16px 40px rgba(0, 0, 0, 0.28);
}
.tl-lb-podium__crown {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  animation: tlLbCrown 3s ease-in-out infinite;
}
@keyframes tlLbCrown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}
.tl-lb-podium__place { margin-bottom: 0.55rem; }
.tl-lb-podium__card .tl-lb-avatar--lg { margin: 0 auto 0.65rem; }
.tl-lb-podium__card h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #f2f4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.tl-lb-podium__card .tl-lb-band { margin-top: 0.4rem; }
.tl-lb-podium__score {
  margin-top: 0.55rem;
  font-family: var(--tl-display, Sora, sans-serif);
  font-size: 2.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #f0a878;
  line-height: 1;
}
.tl-lb-podium__card--gold .tl-lb-podium__score {
  color: #ffe08a;
  font-size: 2.4rem;
  text-shadow: 0 0 28px rgba(224, 162, 26, 0.35);
}
.tl-lb-podium__label {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8f98ad;
}
.tl-lb-podium__meta {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.7rem;
  margin-bottom: 0.95rem;
  font-size: 0.75rem;
  color: #b4bbcc;
  font-weight: 600;
}
.tl-lb-podium__pedestal {
  margin: 0 -0.9rem;
  padding: 0.55rem 0.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.25));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.tl-lb-podium__card--gold .tl-lb-podium__pedestal {
  background: linear-gradient(180deg, rgba(224, 162, 26, 0.18), rgba(0, 0, 0, 0.3));
  padding: 0.75rem 0.5rem;
}
.tl-lb-podium__card--silver .tl-lb-podium__pedestal {
  background: linear-gradient(180deg, rgba(184, 192, 208, 0.1), rgba(0, 0, 0, 0.28));
  padding: 0.65rem 0.5rem;
}
.tl-lb-podium__pedestal span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #8f98ad;
}
.tl-lb-podium__card--gold .tl-lb-podium__pedestal span { color: #ffe08a; }

/* ---------- Layout board + aside ---------- */
.tl-lb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.85fr);
  gap: 1.1rem;
  margin-bottom: 1.35rem;
  align-items: start;
}

/* ---------- Board / table ---------- */
.tl-lb-board {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(217, 106, 50, 0.1), transparent 50%),
    linear-gradient(180deg, #161f33, #121a2c);
  padding: 1.1rem 0.95rem 0.85rem;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  min-width: 0;
}
.tl-lb-board__head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding: 0 0.2rem;
}
.tl-lb-board__head .tl-h3 {
  margin: 0;
  font-size: 1.05rem;
  white-space: nowrap;
}
.tl-lb-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem 0.3rem 0.5rem;
  border-radius: 999px;
  background: rgba(62, 207, 173, 0.08);
  border: 1px solid rgba(62, 207, 173, 0.22);
  flex-shrink: 0;
}
.tl-lb-live__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ecfad;
  animation: tlLbLivePulse 2s ease-out infinite;
}
.tl-lb-live__text {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5ee0c0;
}
@keyframes tlLbLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 173, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(62, 207, 173, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 173, 0); }
}
.tl-lb-empty {
  padding: 2rem 0.75rem 2.2rem;
  text-align: center;
}
.tl-lb-empty__icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  filter: grayscale(0.2);
}

.tl-lb-table-wrap {
  overflow: hidden;
  width: 100%;
}
.tl-lb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  min-width: 0;
  font-size: 0.84rem;
}
.tl-lb-table th {
  text-align: left;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8f98ad;
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-lb-table td {
  padding: 0.65rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #d5dae6;
  vertical-align: middle;
  overflow: hidden;
}
.tl-lb-table tr:last-child td { border-bottom: 0; }
.tl-lb-table tbody tr { transition: background 0.15s; }
.tl-lb-table tr.is-me {
  background: rgba(217, 106, 50, 0.12);
  box-shadow: inset 3px 0 0 #d96a32;
}
.tl-lb-table tr.is-gold { background: linear-gradient(90deg, rgba(224, 162, 26, 0.12), transparent 55%); }
.tl-lb-table tr.is-silver { background: linear-gradient(90deg, rgba(184, 192, 208, 0.08), transparent 55%); }
.tl-lb-table tr.is-bronze { background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), transparent 55%); }
.tl-lb-table tr:hover td { background: rgba(255, 255, 255, 0.025); }

/* Compact fixed columns — no shift, no horizontal scroll */
.tl-lb-table th:nth-child(1),
.tl-lb-table td:nth-child(1) {
  width: 42px;
  text-align: center;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
}
.tl-lb-table th:nth-child(2),
.tl-lb-table td:nth-child(2) {
  width: 34%;
}
.tl-lb-table th:nth-child(3),
.tl-lb-table td:nth-child(3) {
  width: 58px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tl-lb-table th:nth-child(4),
.tl-lb-table td:nth-child(4) {
  width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tl-lb-table th:nth-child(5),
.tl-lb-table td:nth-child(5) {
  width: 72px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tl-lb-table th:nth-child(6),
.tl-lb-table td:nth-child(6) {
  width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.tl-lb-table th:nth-child(7),
.tl-lb-table td:nth-child(7) {
  width: 64px;
  text-align: right;
}

.tl-lb-rank-num {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  font-family: var(--tl-display, Sora, sans-serif);
  font-weight: 800;
  font-size: 0.9rem;
  color: #b4bbcc;
  letter-spacing: -0.03em;
  line-height: 1;
}
.tl-lb-medal {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-family: var(--tl-display, Sora, sans-serif);
  font-weight: 800;
  font-size: 0.82rem;
  color: #0c1220;
  flex-shrink: 0;
}
.tl-lb-row__who {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.tl-lb-row__who .tl-lb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.68rem;
}
.tl-lb-row__meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}
.tl-lb-row__who strong {
  display: block;
  color: #f2f4f8;
  font-size: 0.86rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.tl-lb-row__who strong .tl-lb-you {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0.25rem;
}
.tl-lb-you {
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(217, 106, 50, 0.2);
  color: #f0a878;
  border: 1px solid rgba(232, 146, 92, 0.35);
}
.tl-lb-td-score b {
  display: inline-block;
  font-family: var(--tl-display, Sora, sans-serif);
  font-size: 0.98rem;
  font-weight: 800;
  color: #f0a878;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.tl-lb-td-num {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 0.84rem;
}
.tl-lb-td-muted {
  color: #8f98ad !important;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-lb-bar {
  margin-top: 0;
  height: 3px;
  width: 100%;
  max-width: 100px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.tl-lb-bar > i {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #d96a32, #3ecfad);
}
.tl-lb-acc {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.8rem;
}
.tl-lb-acc > i {
  width: 22px;
  height: 3px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}
.tl-lb-acc > i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--a, 0%);
  background: linear-gradient(90deg, #3ecfad, #5ee0c0);
  border-radius: inherit;
}

/* Mobile cards — hidden on desktop */
.tl-lb-cards { display: none; }
.tl-lb-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tl-lb-card:last-child { border-bottom: 0; }
.tl-lb-card.is-me {
  background: rgba(217, 106, 50, 0.1);
  border-radius: 12px;
  border-bottom-color: transparent;
  margin: 0.15rem 0;
}
.tl-lb-card.is-gold { background: rgba(224, 162, 26, 0.08); border-radius: 12px; }
.tl-lb-card__rank { min-width: 2.2rem; text-align: center; }
.tl-lb-card__body { flex: 1; min-width: 0; }
.tl-lb-card__body strong {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  color: #f2f4f8;
  font-size: 0.95rem;
}
.tl-lb-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #8f98ad;
}
.tl-lb-card__stats b { color: #f0a878; font-weight: 800; }
.tl-lb-card .tl-lb-bar { max-width: 100%; }

/* ---------- Aside panels ---------- */
.tl-lb-aside {
  display: grid;
  gap: 1rem;
}
.tl-lb-panel {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #161f33, #121a2c);
  padding: 1rem 0.95rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  min-width: 0;
  overflow: hidden;
}
.tl-lb-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.tl-lb-panel__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  color: #f2f4f8;
  font-family: var(--tl-display, Sora, sans-serif);
}
.tl-lb-panel__sub {
  margin: 0.15rem 0 0.75rem;
  font-size: 0.75rem;
  color: #8f98ad;
}

.tl-lb-bands {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.tl-lb-bands__head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
  min-width: 0;
}
.tl-lb-bands__range {
  font-size: 0.68rem;
  color: #8f98ad;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-lb-bands__count {
  font-family: var(--tl-display, Sora, sans-serif);
  font-weight: 800;
  font-size: 0.85rem;
  color: #f2f4f8;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.tl-lb-bands__bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.tl-lb-bands__fill {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tl-lb-bands__fill--elite { background: linear-gradient(90deg, #e0a21a, #ffe08a); }
.tl-lb-bands__fill--advanced { background: linear-gradient(90deg, #2d8a72, #3ecfad); }
.tl-lb-bands__fill--solid { background: linear-gradient(90deg, #c25522, #d96a32); }
.tl-lb-bands__fill--building { background: linear-gradient(90deg, #6a7488, #8f98ad); }
.tl-lb-bands__fill--starter { background: linear-gradient(90deg, #3a4256, #5a6478); }

/* Compact feed rows — fixed columns, no shift */
.tl-lb-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
}
.tl-lb-feed__item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 52px 40px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 0;
}
.tl-lb-feed__item:last-child {
  border-bottom: 0;
  padding-bottom: 0.15rem;
}
.tl-lb-feed__item .tl-lb-avatar--sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 0.62rem;
}
.tl-lb-feed__body {
  min-width: 0;
  overflow: hidden;
}
.tl-lb-feed__body strong {
  display: block;
  font-size: 0.82rem;
  color: #f2f4f8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.tl-lb-feed__body span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  color: #8f98ad;
  text-transform: capitalize;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-lb-feed__stats {
  text-align: right;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.tl-lb-feed__stats b {
  display: block;
  font-family: var(--tl-display, Sora, sans-serif);
  font-size: 0.9rem;
  font-weight: 800;
  color: #f0a878;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.tl-lb-feed__stats em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  color: #8f98ad;
  font-weight: 650;
}
.tl-lb-feed__when {
  display: block;
  text-align: right;
  font-size: 0.68rem;
  color: #8f98ad;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

/* ---------- Rules & tips ---------- */
.tl-lb-rules,
.tl-lb-tips {
  margin-bottom: 1.35rem;
  padding: 1.3rem 1.35rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #161f33, #121a2c);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
}
.tl-lb-rules .tl-h3,
.tl-lb-tips .tl-h3 { margin-bottom: 0.9rem; }
.tl-lb-rules__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.tl-lb-rule {
  padding: 1rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s, transform 0.2s;
}
.tl-lb-rule:hover {
  border-color: rgba(240, 168, 120, 0.3);
  transform: translateY(-2px);
}
.tl-lb-rule__n {
  display: block;
  font-family: var(--tl-display, Sora, sans-serif);
  font-weight: 800;
  font-size: 0.85rem;
  color: #f0a878;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.tl-lb-rule h3 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f2f4f8;
}
.tl-lb-rule p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #8f98ad;
}

.tl-lb-tips__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1.25rem;
  align-items: start;
}
.tl-lb-tips ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.5rem;
  color: #b4bbcc;
  font-size: 0.92rem;
  line-height: 1.55;
}
.tl-lb-tips li::marker { color: #d96a32; }
.tl-lb-tips strong { color: #f0a878; }
.tl-lb-tips__cta-card {
  padding: 1.25rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(217, 106, 50, 0.3);
  background:
    radial-gradient(ellipse 80% 80% at 100% 0%, rgba(217, 106, 50, 0.2), transparent 55%),
    linear-gradient(160deg, #1e283c, #161412);
}
.tl-lb-tips__eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0a878;
  margin-bottom: 0.4rem;
}
.tl-lb-tips__cta-card strong {
  display: block;
  font-size: 1.1rem;
  color: #fff;
  font-family: var(--tl-display, Sora, sans-serif);
}
.tl-lb-tips__cta-card p {
  margin: 0.4rem 0 1rem;
  font-size: 0.88rem;
  color: #b4bbcc;
  line-height: 1.5;
}

.tl-lb-footnote {
  margin: 0.5rem 0 0.25rem;
  text-align: center;
  color: #8f98ad;
}

/* ---------- Light theme ---------- */
html[data-theme="light"] .tl-lb-hero {
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(217, 106, 50, 0.12), transparent 55%),
    linear-gradient(180deg, #fff8f3, #fff);
  border-color: #e2e6ef;
  box-shadow: 0 18px 40px rgba(15, 20, 35, 0.08);
}
html[data-theme="light"] .tl-lb-hero__title {
  background: linear-gradient(135deg, #12151c 20%, #9a3f18 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme="light"] .tl-lb-hero__lead strong,
html[data-theme="light"] .tl-lb-chip strong { color: #9a3f18; -webkit-text-fill-color: #9a3f18; }
html[data-theme="light"] .tl-lb-chip {
  background: #fff;
  border-color: #e2e6ef;
  color: #4a5263;
}
html[data-theme="light"] .tl-lb-chip--live { color: #176354; border-color: #a7d9c9; }
html[data-theme="light"] .tl-lb-period {
  background: #f0f2f7;
  border-color: #e2e6ef;
}
html[data-theme="light"] .tl-lb-period__btn { color: #4a5263; }
html[data-theme="light"] .tl-lb-period__btn:hover { background: #fff; color: #12151c; }
html[data-theme="light"] .tl-lb-period__btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #d96a32, #c25522);
}
html[data-theme="light"] .tl-lb-stat-mini {
  background: #f6f7fb;
  border-color: #e2e6ef;
}
html[data-theme="light"] .tl-lb-stat-mini b { color: #12151c; }
html[data-theme="light"] .tl-lb-stat-mini span,
html[data-theme="light"] .tl-lb-stat-mini em { color: #5a6478; }
html[data-theme="light"] .tl-lb-stat-mini--glow {
  background: linear-gradient(180deg, #fff4ed, #f6f7fb);
  border-color: #f0c4a8;
}

html[data-theme="light"] .tl-lb-me {
  background: linear-gradient(135deg, #fff8f3, #fff);
  border-color: #f0c4a8;
  box-shadow: 0 10px 28px rgba(15, 20, 35, 0.08);
}
html[data-theme="light"] .tl-lb-me--top {
  background: linear-gradient(135deg, #eaf7f3, #fff);
  border-color: #a7d9c9;
}
html[data-theme="light"] .tl-lb-me__rank,
html[data-theme="light"] .tl-lb-me__info strong { color: #12151c; }
html[data-theme="light"] .tl-lb-me__info span,
html[data-theme="light"] .tl-lb-me__hint { color: #4a5263; }
html[data-theme="light"] .tl-lb-me__hint { border-top-color: #eef1f7; }
html[data-theme="light"] .tl-lb-me__stats > div {
  background: #f6f7fb;
  border-color: #e2e6ef;
}
html[data-theme="light"] .tl-lb-me__stats b { color: #12151c; }
html[data-theme="light"] .tl-lb-me__label { color: #9a3f18; }
html[data-theme="light"] .tl-lb-me--top .tl-lb-me__label { color: #176354; }

html[data-theme="light"] .tl-lb-podium__card {
  background: #fff;
  border-color: #e2e6ef;
  box-shadow: 0 12px 32px rgba(15, 20, 35, 0.07);
}
html[data-theme="light"] .tl-lb-podium__card--gold {
  background: linear-gradient(180deg, #fff8e8, #fff);
  border-color: #f0d48a;
}
html[data-theme="light"] .tl-lb-podium__card--silver {
  background: linear-gradient(180deg, #f4f6fa, #fff);
}
html[data-theme="light"] .tl-lb-podium__card--bronze {
  background: linear-gradient(180deg, #fff4ed, #fff);
  border-color: #f0c4a8;
}
html[data-theme="light"] .tl-lb-podium__card h3 { color: #12151c; }
html[data-theme="light"] .tl-lb-podium__score { color: #9a3f18; }
html[data-theme="light"] .tl-lb-podium__card--gold .tl-lb-podium__score {
  color: #9a6b00;
  text-shadow: none;
}
html[data-theme="light"] .tl-lb-podium__meta { color: #5a6478; }
html[data-theme="light"] .tl-lb-podium__pedestal {
  background: linear-gradient(180deg, #f6f7fb, #eef1f7);
  border-top-color: #e2e6ef;
}
html[data-theme="light"] .tl-lb-podium__card--gold .tl-lb-podium__pedestal {
  background: linear-gradient(180deg, #fff4d6, #f5e6b8);
}
html[data-theme="light"] .tl-lb-podium__pedestal span { color: #5a6478; }
html[data-theme="light"] .tl-lb-podium__card--gold .tl-lb-podium__pedestal span { color: #9a6b00; }

html[data-theme="light"] .tl-lb-board,
html[data-theme="light"] .tl-lb-panel,
html[data-theme="light"] .tl-lb-rules,
html[data-theme="light"] .tl-lb-tips {
  background: #fff;
  border-color: #e2e6ef;
  box-shadow: 0 12px 32px rgba(15, 20, 35, 0.06);
}
html[data-theme="light"] .tl-lb-table th {
  color: #5a6478;
  border-bottom-color: #e2e6ef;
}
html[data-theme="light"] .tl-lb-table td {
  color: #2f3542;
  border-bottom-color: #eef1f7;
}
html[data-theme="light"] .tl-lb-table tr.is-me { background: #fff4ed; }
html[data-theme="light"] .tl-lb-rank-num { color: #5a6478; }
html[data-theme="light"] .tl-lb-td-muted { color: #8a93a6 !important; }
html[data-theme="light"] .tl-lb-row__who strong,
html[data-theme="light"] .tl-lb-card__body strong,
html[data-theme="light"] .tl-lb-panel__title,
html[data-theme="light"] .tl-lb-feed__body strong,
html[data-theme="light"] .tl-lb-bands__count { color: #12151c; }
html[data-theme="light"] .tl-lb-td-score b,
html[data-theme="light"] .tl-lb-card__stats b,
html[data-theme="light"] .tl-lb-feed__stats b { color: #9a3f18; }
html[data-theme="light"] .tl-lb-feed__body span,
html[data-theme="light"] .tl-lb-feed__stats em,
html[data-theme="light"] .tl-lb-feed__when,
html[data-theme="light"] .tl-lb-panel__sub { color: #5a6478; }
html[data-theme="light"] .tl-lb-feed__item { border-bottom-color: #eef1f7; }
html[data-theme="light"] .tl-lb-bar,
html[data-theme="light"] .tl-lb-bands__bar,
html[data-theme="light"] .tl-lb-acc > i { background: #eef1f7; }
html[data-theme="light"] .tl-lb-rule {
  background: #f6f7fb;
  border-color: #e2e6ef;
}
html[data-theme="light"] .tl-lb-rule h3 { color: #12151c; }
html[data-theme="light"] .tl-lb-rule p,
html[data-theme="light"] .tl-lb-tips ul,
html[data-theme="light"] .tl-lb-feed__body span,
html[data-theme="light"] .tl-lb-panel__sub { color: #4a5263; }
html[data-theme="light"] .tl-lb-live {
  background: #eaf7f3;
  border-color: #a7d9c9;
}
html[data-theme="light"] .tl-lb-live__text { color: #176354; }
html[data-theme="light"] .tl-lb-footnote { color: #5a6478; }
html[data-theme="light"] .tl-lb-tips__cta-card {
  background: linear-gradient(160deg, #fff8f3, #fff4ed);
  border-color: #f0c4a8;
}
html[data-theme="light"] .tl-lb-tips__cta-card strong { color: #12151c; }
html[data-theme="light"] .tl-lb-tips__cta-card p { color: #4a5263; }
html[data-theme="light"] .tl-lb-feed__item { border-bottom-color: #eef1f7; }
html[data-theme="light"] .tl-lb-card { border-bottom-color: #eef1f7; }
html[data-theme="light"] .tl-lb-card.is-me { background: #fff4ed; }
html[data-theme="light"] .tl-lb-band--elite { color: #9a6b00; background: #fff8e8; border-color: #f0d48a; }
html[data-theme="light"] .tl-lb-band--advanced { color: #176354; background: #eaf7f3; border-color: #a7d9c9; }
html[data-theme="light"] .tl-lb-band--solid { color: #9a3f18; background: #fff4ed; border-color: #f0c4a8; }
html[data-theme="light"] .tl-lb-band--building { color: #4a5263; background: #f0f2f7; border-color: #d5dae6; }
html[data-theme="light"] .tl-lb-band--starter { color: #5a6478; background: #f6f7fb; border-color: #e2e6ef; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .tl-lb-layout { grid-template-columns: 1fr; }
  .tl-lb-aside {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 960px) {
  .tl-lb-hero__grid { grid-template-columns: 1fr; }
  .tl-lb-podium { grid-template-columns: 1fr; }
  .tl-lb-podium__card--gold { transform: none; order: -1; }
  .tl-lb-rules__grid { grid-template-columns: 1fr 1fr; }
  .tl-lb-me__stats { grid-template-columns: 1fr 1fr; }
  .tl-lb-tips__grid { grid-template-columns: 1fr; }
  .tl-lb-table-wrap { display: none; }
  .tl-lb-cards { display: block; }
}
@media (max-width: 640px) {
  .tl-lb-rules__grid { grid-template-columns: 1fr; }
  .tl-lb-hero__side { grid-template-columns: 1fr 1fr; }
  .tl-lb-stat-mini--wide { grid-column: 1 / -1; }
  .tl-lb-me__rank { min-width: 3.5rem; font-size: 2.1rem; }
  .tl-lb-aside { grid-template-columns: 1fr; }
  .tl-lb-hero { padding: 1.25rem 1.1rem 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tl-lb-orb,
  .tl-lb-live__dot,
  .tl-lb-live-dot,
  .tl-lb-podium__crown,
  .tl-lb-podium__card { animation: none; }
}
