/* Thống kê trực tiếp — Hall of Fame, người chơi, giải, advancement, sự kiện.
   Layout and component rules follow the reference stats page; everything is
   scoped to .stats-main so the shared header and footer keep the site theme. */

.stats-main {
  /* Medal and live signals are content colours, so they stay fixed instead of
     following the redstone lever the way the brand tokens do. */
  --st-green: #1bd96a;
  --st-amber: #f59e0b;
  --st-amber-2: #fcd34d;
  --st-silver: #e2e8f0;
  --st-bronze: #d9a066;
  --st-text-2: #c4cad6;
  --st-surface: #0c0e16;
  --st-line: rgba(255, 255, 255, 0.08);
  --st-line-2: rgba(255, 255, 255, 0.16);
  /* site header (4rem) + the section subnav (~3rem) */
  --st-stick: 6.9rem;
  --st-mono: "JetBrains Mono", ui-monospace, monospace;

  position: relative;
  padding-bottom: 4rem;
  color: var(--paper);
}

/* ---------- hero ---------- */
.st-hero {
  position: relative;
  padding: 2.5rem 0 1.5rem;
}
.st-aurora {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 760px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}
.st-aurora b {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.42;
}
.st-aurora b:nth-child(1) {
  width: 520px;
  height: 520px;
  top: -200px;
  left: -160px;
  background: radial-gradient(circle, var(--brand), transparent 68%);
}
.st-aurora b:nth-child(2) {
  width: 380px;
  height: 380px;
  top: -120px;
  left: 40%;
  background: radial-gradient(circle, var(--accent), transparent 68%);
}
.st-aurora b:nth-child(3) {
  width: 320px;
  height: 320px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, var(--sky), transparent 68%);
}
.st-hero > .si-wrap {
  position: relative;
  z-index: 1;
}
.st-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.st-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
  font-family: var(--st-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--st-text-2);
}
.st-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--brand);
  box-shadow: 0 0 10px 1px var(--brand);
}
.st-eyebrow.pink::before {
  background: var(--accent);
  box-shadow: 0 0 10px 1px var(--accent);
}
.st-eyebrow.green::before {
  background: var(--st-green);
  box-shadow: 0 0 10px 1px var(--st-green);
}
.st-eyebrow.amber::before {
  background: var(--st-amber);
  box-shadow: 0 0 10px 1px var(--st-amber);
}
.st-h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.st-h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.st-h1 .acc,
.st-h2 .acc {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.st-lede {
  max-width: 640px;
  margin: 0.75rem 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.st-updated {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-family: var(--st-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.st-updated i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.st-updated[data-live="yes"] i {
  background: var(--st-green);
  box-shadow: 0 0 8px var(--st-green);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 88px;
  padding: 0.85rem 0.65rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
}
.kpi span {
  display: block;
  margin-bottom: 6px;
  font-family: var(--st-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi b {
  font-family: var(--st-mono);
  font-size: clamp(1.05rem, 0.55rem + 1vw, 1.4rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi b .on {
  color: var(--st-green);
}
.kpi b .of {
  display: block;
  margin-top: 2px;
  font-family: inherit;
  font-size: 0.66em;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

/* secondary line under the KPI tiles: server name, live roster, dataset size */
.st-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--st-line);
}
.hero-strip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.hero-strip-item strong {
  font-weight: 600;
  color: var(--st-text-2);
  font-variant-numeric: tabular-nums;
}

/* ---------- sticky tab bar ---------- */
.st-tabs {
  position: sticky;
  top: var(--st-stick);
  z-index: 30;
  border-top: 1px solid var(--st-line);
  border-bottom: 1px solid var(--st-line);
  transition: background 0.2s var(--ease), backdrop-filter 0.2s var(--ease);
}
.st-tabs.stuck {
  background: rgba(8, 9, 15, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.st-tabs > .si-wrap {
  display: block;
  padding-top: 8px;
  padding-bottom: 10px;
}
.tabs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-inline: -1.25rem;
  padding-inline: 1.25rem;
}
.tabs-row::-webkit-scrollbar {
  display: none;
}
@media (min-width: 640px) {
  .tabs-row {
    margin-inline: -2rem;
    padding-inline: 2rem;
  }
}
.st-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s var(--ease), background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.st-tab:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
}
.st-tab.active {
  color: var(--paper);
  background: rgb(var(--brand-rgb) / 0.14);
  border-color: rgb(var(--brand-rgb) / 0.32);
}
.st-tab .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--st-green);
  box-shadow: 0 0 8px var(--st-green);
}
.st-search {
  position: relative;
  width: 100%;
  margin-top: 8px;
}
@media (min-width: 900px) {
  .st-tabs > .si-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .tabs-row {
    flex: 1 1 auto;
    margin-inline: 0;
    padding-inline: 0;
  }
  .st-search {
    width: min(300px, 32vw);
    margin-top: 0;
    margin-left: auto;
    flex: none;
  }
}
.st-search input {
  width: 100%;
  height: 40px;
  padding: 0 34px 0 38px;
  border: 1px solid var(--st-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--paper);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.st-search input::placeholder {
  color: var(--muted);
}
.st-search input:focus {
  border-color: rgb(var(--brand-rgb) / 0.5);
  background: rgba(255, 255, 255, 0.05);
}
.st-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.st-search kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 5px;
  border: 1px solid var(--st-line-2);
  border-radius: 4px;
  font-family: var(--st-mono);
  font-size: 10px;
  color: var(--muted);
  pointer-events: none;
}
.st-search input:focus ~ kbd,
.st-search input:not(:placeholder-shown) ~ kbd {
  display: none;
}
@media (max-width: 899.98px) {
  .st-search kbd {
    display: none;
  }
}

/* ---------- shared bits ---------- */
.st-main {
  position: relative;
  z-index: 1;
  min-height: 60vh;
  padding-top: 1.75rem;
}
.st-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.st-head.slim {
  align-items: center;
  margin: 1.75rem 0 1rem;
}
.st-head.slim .st-h2 {
  font-size: 1.35rem;
}
.st-head.slim .st-lede {
  display: none;
}
.st-count {
  padding-bottom: 4px;
  font-family: var(--st-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.st-count b {
  font-weight: 500;
  color: var(--st-text-2);
}
.st-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.st-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1rem;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.st-back:hover {
  color: var(--brand);
}
.st-ilink {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.badge,
.crown,
.medal,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--st-line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--st-text-2);
}
.badge.sm,
.crown.sm {
  height: 28px;
  padding: 0 9px;
  font-size: 12.5px;
  gap: 5px;
}
.crown.g {
  color: var(--st-amber-2);
  border-color: rgba(252, 211, 77, 0.45);
  background: rgba(252, 211, 77, 0.08);
}
.crown.s {
  color: var(--st-silver);
  border-color: rgba(226, 232, 240, 0.35);
  background: rgba(226, 232, 240, 0.06);
}
.crown.b {
  color: var(--st-bronze);
  border-color: rgba(217, 160, 102, 0.45);
  background: rgba(217, 160, 102, 0.08);
}
.badge.live {
  color: var(--st-green);
  border-color: rgba(27, 217, 106, 0.4);
  background: rgba(27, 217, 106, 0.08);
}
.badge.live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--st-green);
  box-shadow: 0 0 8px var(--st-green);
  animation: st-pulse 1.8s ease-in-out infinite;
}
@keyframes st-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--st-green);
  box-shadow: 0 0 8px var(--st-green);
}
.medals {
  display: inline-flex;
  gap: 8px;
}
.medal-ico {
  width: 18px;
  height: 18px;
  image-rendering: auto;
}

.head {
  border-radius: 8px;
  image-rendering: pixelated;
  background: rgba(255, 255, 255, 0.05);
  flex: none;
}
.head.sm {
  border-radius: 6px;
}

.skel {
  position: relative;
  min-height: 26px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: st-shimmer 1.4s linear infinite;
}
@keyframes st-shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}
.st-empty {
  padding: 2.5rem 1.25rem;
  border: 1px dashed var(--st-line-2);
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.st-empty h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--paper);
}
.st-empty .st-note {
  margin-top: 0.85rem;
  font-family: var(--st-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #5f6673;
}
.st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--st-line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--paper);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.st-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgb(var(--brand-rgb) / 0.45);
}
.st-btn.sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}
.st-btn.xs {
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
}
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border: 1px solid var(--st-line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.03);
}
.seg button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.seg button:hover {
  color: var(--paper);
}
.seg button.active {
  background: rgb(var(--brand-rgb) / 0.16);
  color: var(--paper);
}

/* ---------- podium ---------- */
.podium {
  display: grid;
  grid-template-columns: 1.25fr 1.05fr 0.9fr;
  gap: 1rem;
  align-items: end;
  margin-bottom: 2rem;
}
.podium-card {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  border-radius: 20px;
  color: #fff;
  text-decoration: none;
}
.podium-card.p1 {
  min-height: 260px;
  background: linear-gradient(135deg, #7a4a08 0%, #c98410 45%, #f5b731 100%);
  box-shadow: 0 20px 60px -20px rgba(245, 158, 11, 0.5);
}
.podium-card.p2 {
  min-height: 225px;
  background: linear-gradient(135deg, #2b3140 0%, #4b5568 50%, #8b97ad 100%);
}
.podium-card.p3 {
  min-height: 195px;
  background: linear-gradient(135deg, #4a2a12 0%, #8a4f21 50%, #c98a4e 100%);
}
.podium-num {
  position: absolute;
  right: 30%;
  bottom: -14px;
  z-index: 1;
  font-size: 140px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}
.podium-card.p1 .podium-num {
  font-size: 190px;
}
.podium-body {
  position: relative;
  z-index: 2;
  padding: 1.25rem;
  max-width: 62%;
}
.podium-body .head {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.9rem;
}
.podium-name {
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.podium-pts {
  margin-top: 2px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.podium-pts small {
  font-size: 15px;
  opacity: 0.85;
}
.podium-medals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-family: var(--st-mono);
  font-size: 12px;
  opacity: 0.88;
}
.podium-medals span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.podium-medals .medal-ico {
  width: 16px;
  height: 16px;
  margin: 0;
}
.podium-skin {
  position: absolute;
  right: 14px;
  bottom: 0;
  z-index: 1;
  height: 90%;
  width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}
/* The three cards step down like a real podium. Extra top padding (not a fixed
   height) keeps the name and medal line inside whatever the content needs. */
@media (min-width: 900px) {
  .podium-card.p1 {
    padding-top: 46px;
  }
  .podium-card.p2 {
    padding-top: 24px;
  }
}
@media (max-width: 899.98px) {
  .podium {
    grid-template-columns: 1fr;
  }
  .podium-card.p1,
  .podium-card.p2,
  .podium-card.p3 {
    min-height: 170px;
  }
  .podium-num,
  .podium-card.p1 .podium-num {
    font-size: 130px;
    right: 26%;
  }
}

/* ---------- hall of fame table ---------- */
.hof-table {
  border: 1px solid var(--st-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--st-surface);
}
.hof-th,
.hof-tr {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 90px 80px 80px 80px;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
}
.hof-th {
  height: 44px;
  border-bottom: 1px solid var(--st-line);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--st-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.hof-th .num {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}
.hof-th .medal-ico {
  width: 15px;
  height: 15px;
}
.hof-tr {
  height: 56px;
  border-bottom: 1px solid var(--st-line);
  color: inherit;
  text-decoration: none;
}
.hof-tr:last-child {
  border-bottom: none;
}
.hof-tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}
.hof-tr:hover {
  background: rgb(var(--brand-rgb) / 0.06);
}
.hof-tr .rk {
  font-family: var(--st-mono);
  font-size: 13px;
  color: var(--muted);
}
.hof-tr.m1 .rk {
  color: var(--st-amber-2);
  font-weight: 600;
}
.hof-tr.m2 .rk {
  color: var(--st-silver);
  font-weight: 600;
}
.hof-tr.m3 .rk {
  color: var(--st-bronze);
  font-weight: 600;
}
.hof-tr .pl {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 600;
}
.hof-tr .pl span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hof-th .num,
.hof-tr .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.hof-tr .num {
  font-family: var(--st-mono);
  font-size: 15px;
  color: var(--st-text-2);
}
.hof-tr .pts {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
}
.hof-th .g,
.hof-tr .g {
  color: var(--st-amber-2);
}
.hof-th .s,
.hof-tr .s {
  color: #cbd5e1;
}
.hof-th .b,
.hof-tr .b {
  color: var(--st-bronze);
}
@media (max-width: 719.98px) {
  .hof-th,
  .hof-tr {
    grid-template-columns: 52px minmax(0, 1fr) 60px;
    gap: 0.6rem;
    padding: 0 0.75rem;
  }
  .hof-th .g,
  .hof-th .s,
  .hof-th .b,
  .hof-tr .g,
  .hof-tr .s,
  .hof-tr .b {
    display: none;
  }
}
.hof-how {
  font-size: 13.5px;
  color: var(--muted);
}
.hof-how summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  color: var(--st-text-2);
  font-weight: 500;
}
.hof-how summary::-webkit-details-marker {
  display: none;
}
.hof-how summary::after {
  content: "?";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--st-line-2);
  border-radius: 50%;
  font-family: var(--st-mono);
  font-size: 11px;
  color: var(--muted);
}
.hof-how p {
  max-width: 640px;
  margin-top: 8px;
  line-height: 1.6;
}
.hof-how b {
  color: var(--st-text-2);
}

/* ---------- players grid ---------- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.pcard {
  display: block;
  padding: 0.9rem;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
}
.pcard:hover {
  border-color: rgb(var(--brand-rgb) / 0.4);
  background: rgba(255, 255, 255, 0.045);
}
.pcard-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.7rem;
}
.pcard-hd .head {
  width: 40px;
  height: 40px;
}
.pcard-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
.pt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.pt b {
  font-family: var(--st-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--st-text-2);
  font-variant-numeric: tabular-nums;
}
.pt.hl b {
  color: var(--brand);
}
.pt.dim {
  opacity: 0.65;
}

/* ---------- rankings / awards ---------- */
.rank-list {
  display: grid;
  gap: 4px;
}
.rank-list.cols3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 1023.98px) {
  .rank-list.cols3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 639.98px) {
  .rank-list.cols3 {
    grid-template-columns: 1fr;
  }
}
.rrow {
  display: grid;
  grid-template-columns: 42px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}
.rrow:hover {
  border-color: var(--st-line);
  background: rgba(255, 255, 255, 0.035);
}
.rrow .r {
  font-family: var(--st-mono);
  font-size: 13.5px;
  color: var(--muted);
}
.rrow.m1 .r {
  color: var(--st-amber-2);
  font-weight: 600;
}
.rrow.m2 .r {
  color: var(--st-silver);
  font-weight: 600;
}
.rrow.m3 .r {
  color: var(--st-bronze);
  font-weight: 600;
}
.rrow.m1 {
  background: rgba(252, 211, 77, 0.06);
}
.rrow.m2 {
  background: rgba(226, 232, 240, 0.05);
}
.rrow.m3 {
  background: rgba(217, 160, 102, 0.06);
}
.rrow .head {
  width: 28px;
  height: 28px;
}
.rrow .aicon {
  width: 28px;
  height: 28px;
}
.rrow .n {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rrow .n small {
  display: block;
  font-family: var(--st-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  white-space: normal;
}
.rrow .v {
  font-family: var(--st-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--st-text-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.rrow.unranked .v {
  color: #5f6673;
  font-weight: 400;
}

.agrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.acard {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
}
.acard:hover {
  border-color: rgb(var(--brand-rgb) / 0.4);
  background: rgba(255, 255, 255, 0.045);
}
.aicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  image-rendering: pixelated;
}
.aicon.lg {
  width: 56px;
  height: 56px;
}
.aicon img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.aicon .ph {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgb(var(--brand-rgb) / 0.35);
}
.acard-b {
  flex: 1 1 auto;
  min-width: 0;
}
.acard-ttl {
  display: block;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acard-ttl + small {
  display: block;
  margin-top: 2px;
  font-family: var(--st-mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acard-holder {
  flex: none;
  text-align: right;
}
.acard-holder .v {
  display: block;
  font-family: var(--st-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.acard-holder small {
  display: block;
  max-width: 110px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- player profile ---------- */
.dhead {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.dhead .head {
  width: 88px;
  height: 88px;
  border-radius: 14px;
}
.dhead h1 {
  margin: 0;
  font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.dhead-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.dhead.completionist {
  padding: 1rem;
  border: 1px solid rgba(252, 211, 77, 0.35);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(252, 211, 77, 0.08), transparent 60%);
}
.complete-badge {
  color: var(--st-amber-2);
  border-color: rgba(252, 211, 77, 0.45);
  background: rgba(252, 211, 77, 0.1);
}
.complete-badge .star {
  font-size: 15px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}
.tile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
}
.tile:hover {
  border-color: rgb(var(--brand-rgb) / 0.4);
}
.tile > div {
  min-width: 0;
}
.tile > div span {
  display: block;
  font-family: var(--st-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile > div b {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tile > div b small {
  margin-left: 6px;
  font-family: var(--st-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--st-line);
  border-radius: 14px;
  background: var(--st-surface);
  padding: 1rem 1.1rem 1.2rem;
}
.panel + .panel {
  margin-top: 1.25rem;
}
.panel-ttl {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--st-line);
  font-family: var(--st-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--st-text-2);
}
.panel-ttl span + span {
  color: var(--muted);
  font-size: 11.5px;
}

/* ---------- advancements ---------- */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 1023.98px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}
.adv-row {
  display: grid;
  grid-template-columns: 38px 40px minmax(0, 1fr) minmax(0, 1.3fr) 52px;
  align-items: center;
  gap: 0.7rem;
  padding: 8px 10px;
  border: 1px solid var(--st-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
}
.adv-row + .adv-row {
  margin-top: 5px;
}
.adv-row:hover {
  border-color: rgb(var(--brand-rgb) / 0.4);
}
.adv-row.done {
  border-color: rgba(27, 217, 106, 0.4);
  background: rgba(27, 217, 106, 0.06);
}
.adv-row .r {
  font-family: var(--st-mono);
  font-size: 13px;
  color: var(--muted);
}
.adv-row .head {
  width: 40px;
  height: 40px;
}
.adv-row .n {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
}
.adv-row .n small {
  display: block;
  font-family: var(--st-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.adv-bar {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.adv-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.adv-row.done .adv-bar i {
  background: linear-gradient(90deg, var(--st-green), #5ff0c0);
}
.adv-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.adv-cats span {
  font-family: var(--st-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.adv-cats span b {
  color: var(--st-text-2);
  font-weight: 600;
}
.adv-pct {
  font-family: var(--st-mono);
  font-size: 14px;
  text-align: right;
  color: var(--st-text-2);
}
.adv-pct.full {
  color: var(--st-green);
  font-weight: 600;
}
.rare {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--st-line);
}
.rare:last-child {
  border-bottom: none;
}
.rare .t {
  min-width: 0;
}
.rare .t b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}
.rare .t small {
  display: block;
  margin-top: 2px;
  font-family: var(--st-mono);
  font-size: 11px;
  color: var(--muted);
}
.rare-link {
  color: inherit;
  text-decoration: none;
}
.rare-link:hover,
.rare-who:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rare-who {
  color: var(--st-text-2);
  text-decoration: none;
}
.rare .p {
  flex: none;
  font-family: var(--st-mono);
  font-size: 14px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.adv-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--st-line);
}
.adv-item:last-child {
  border-bottom: none;
}
.adv-ico {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  image-rendering: pixelated;
}
.adv-ico img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.adv-item-body {
  min-width: 0;
}
.adv-item-ttl {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}
.adv-item-cat {
  display: block;
  margin-top: 1px;
  font-family: var(--st-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.adv-item-more {
  display: none;
  margin-top: 6px;
}
.adv-item.open .adv-item-more {
  display: block;
}
.adv-item-more p {
  margin: 0 0 6px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.adv-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-family: var(--st-mono);
  font-size: 11.5px;
  color: var(--st-text-2);
}
.adv-item-meta a {
  color: var(--brand);
  text-decoration: none;
}
.adv-item-meta a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- events ---------- */
.egrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.ecard {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.1rem;
  border: 1px solid var(--st-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}
.ecard.live {
  border-color: rgba(27, 217, 106, 0.35);
  background: linear-gradient(160deg, rgba(27, 217, 106, 0.07), rgba(255, 255, 255, 0.02) 55%);
}
.ecard.upcoming {
  border-style: dashed;
}
.ecard-hd {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ecard-ttl {
  font-size: 16.5px;
  font-weight: 600;
}
.ecard-sub {
  margin-top: 2px;
  font-family: var(--st-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ecard-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--st-text-2);
}
.ecard-when {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--st-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.ev-rank {
  margin-top: 2px;
  padding-top: 0.6rem;
  border-top: 1px solid var(--st-line);
}
.ev-rank .rrow {
  padding: 5px 6px;
}
.ev-more {
  margin-top: 1.25rem;
  font-size: 14px;
  color: var(--st-text-2);
}
.ev-more summary {
  cursor: pointer;
  color: var(--muted);
}
.ev-more summary:hover {
  color: var(--brand);
}

.more {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}
.st-note {
  margin-top: 1rem;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- completionist confetti ---------- */
.confetti {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.confetti i {
  position: absolute;
  top: -12px;
  border-radius: 1px;
  animation: st-fall linear forwards;
}
@keyframes st-fall {
  to {
    transform: translate3d(var(--drift, 0), 105vh, 0) rotate(var(--rot, 360deg));
    opacity: 0.1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .confetti,
  .skel::after {
    animation: none;
    display: none;
  }
  .badge.live i {
    animation: none;
  }
}

/* ---------- narrow screens ---------- */
/* Six tiles only fit side by side from 1024px up; below that the longest value
   ("1.142.838 km") would push the row past the viewport. */
@media (max-width: 1023.98px) {
  .kpis {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 639.98px) {
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .st-h1 {
    font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.2rem);
  }
  .adv-row {
    grid-template-columns: 30px 36px minmax(0, 1fr) 46px;
  }
  .adv-row .bars {
    display: none;
  }
  .dhead .head {
    width: 64px;
    height: 64px;
  }
}

/* ---------- live (etcraft-metrics / Prometheus) ---------- */
.lv-tiles {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.lv-tile {
  padding: 0.65rem 0.75rem;
}
.lv-tile b {
  font-family: var(--st-mono);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lv-tile b .of {
  margin-left: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.lv-tile b.lv-big {
  font-size: 22px;
}
.lv-tile b.lv-big.good {
  color: var(--st-green);
}
.lv-tile b.lv-big.bad {
  color: #ff6b6b;
}
.lv-tile small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}
.lv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.lv-grid .panel + .panel {
  margin-top: 0;
}
@media (max-width: 900px) {
  .lv-grid {
    grid-template-columns: 1fr;
  }
}
.lv-svg {
  display: block;
  width: 100%;
  height: 150px;
}
.lv-gline {
  stroke: var(--st-line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.lv-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.lv-fill {
  opacity: 0.13;
}
.lv-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--st-mono);
  font-size: 11px;
  color: var(--muted);
}
.lv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.lv-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lv-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.lv-legend b {
  font-family: var(--st-mono);
  font-weight: 600;
  color: var(--st-text-2);
}
.lv-blank {
  padding: 1.1rem;
  border: 1px dashed var(--st-line-2);
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
}
.lv-bar {
  display: grid;
  grid-template-columns: minmax(0, 118px) minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--st-line);
  font-size: 13px;
}
.lv-bar:last-child {
  border-bottom: 0;
}
.lv-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--st-mono);
  font-size: 12px;
  color: var(--st-text-2);
}
.lv-bar-track {
  height: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.lv-bar-track i {
  display: block;
  height: 100%;
  border-radius: 6px;
  transition: width 0.35s ease;
}
.lv-bar-value {
  grid-column: 2;
  font-family: var(--st-mono);
  font-size: 11.5px;
  color: var(--muted);
}
.pt.live b {
  color: var(--st-green);
}
.lv-lede code,
.st-lede code,
.st-note code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--st-mono);
  font-size: 0.9em;
  color: var(--st-text-2);
}
