.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 16px;
}
.stat-kpi {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
}
.stat-kpi-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  font-variant-numeric: tabular-nums;
}
.stat-kpi-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.stat-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
}
.stat-cols .panel {
  margin: 0;
  min-width: 0;
}
.stat-panel-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-panel-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
}
.stat-panel-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 14px;
}
.stat-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-bar-row {
  display: grid;
  grid-template-columns: minmax(64px, 150px) 1fr 52px;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}
.stat-bar-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text);
}
.stat-bar-name {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
}
.stat-bar-name-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-team-years {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-svg {
  width: 100%;
  height: 8px;
  display: block;
  background: var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
}
.stat-bar-val {
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stat-table-wrap {
  overflow-x: auto;
}
.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.stat-table th,
.stat-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.stat-table th {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-table tbody tr:hover {
  background: var(--accent-soft);
}
.stat-table .stat-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}
.stat-rank {
  width: 34px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
}
.stat-rank-top {
  color: var(--accent);
  font-weight: 700;
}
.stat-player-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  min-width: 0;
}
.stat-player-link:hover .stat-player-name {
  text-decoration: underline;
}
.stat-player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-player-thumb {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-3);
  border: 1px solid var(--line-soft);
}
.stat-player-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stat-team-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 150px;
  min-width: 0;
}
.stat-team-name {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-team-logo {
  width: 14px;
  height: 14px;
  flex: none;
  object-fit: contain;
}
.stat-year {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stat-pill {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid color-mix(in srgb, var(--c) 50%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--c) 12%, var(--panel));
  color: var(--text);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.stat-pill.rarity-normal { --c: var(--r-normal); }
.stat-pill.rarity-special { --c: var(--r-special); }
.stat-pill.rarity-rare { --c: var(--r-rare); }
.stat-pill.rarity-master { --c: var(--r-master); }
.stat-pill.rarity-super {
  --c: var(--r-super);
  background: linear-gradient(135deg, var(--r-super), var(--r-super-2));
  color: var(--r-super-ink);
  border-color: transparent;
}
.stat-pill.rarity-mythic {
  background: var(--r-mythic);
  color: #FFFFFF;
  border-color: var(--r-mythic);
}
.stat-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.stat-note-top {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.stat-empty {
  text-align: center;
  padding: 40px 16px;
}
.stat-empty-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}
.stat-empty-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.stat-privacy {
  margin: 4px 0 0;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}
.stat-privacy p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-cols {
    grid-template-columns: 1fr;
  }
  .stat-kpi {
    padding: 14px 12px;
  }
  .stat-kpi-value {
    font-size: 24px;
  }
  .stat-bar-row {
    grid-template-columns: minmax(56px, 110px) 1fr 46px;
    gap: 8px;
  }
  .stat-table th,
  .stat-table td {
    padding: 8px;
  }
  .stat-team-name {
    display: none;
  }
  .stat-team-cell {
    max-width: none;
  }
}
