.leaderboard-card {
  width: min(820px, calc(100vw - 24px));
  max-height: min(78vh, 680px);
  padding: 16px;
  border: 3px solid #21170f;
  border-radius: 8px;
  background: #f8d982;
  color: #21170f;
  box-shadow: 0 18px 0 rgba(31, 22, 14, .48);
  overflow: hidden;
}

.leaderboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.leaderboard-head h2 {
  margin: 0;
  font-size: 24px;
  color: #21170f;
}

.leaderboard-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.leaderboard-tabs button {
  padding: 10px 12px;
  border-color: #21170f;
  background: #fff6d8;
  color: #21170f;
  font-weight: 900;
}

.leaderboard-tabs button.active {
  background: #2d2418;
  color: #fff4c2;
  box-shadow: inset 0 -3px 0 rgba(255, 219, 111, .45);
}

.leaderboard-list {
  display: grid;
  gap: 6px;
  max-height: calc(min(78vh, 680px) - 138px);
  overflow: auto;
  padding-right: 4px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 42px minmax(86px, 1fr) minmax(92px, 1fr) minmax(116px, 1.25fr) 72px 56px 56px 56px;
  gap: 8px;
  align-items: center;
  min-width: 760px;
  min-height: 44px;
  padding: 8px 10px;
  border: 2px solid #5a4227;
  border-radius: 8px;
  background: #fff8df;
  color: #24180f;
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-row span,
.leaderboard-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-row strong {
  color: #b52f1b;
  font-size: 16px;
}

.leaderboard-title {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 34px;
  background: #2d2418;
  color: #fff4c2;
  border-color: #2d2418;
  font-weight: 900;
}

.leaderboard-title span {
  color: inherit;
}

.leaderboard-empty {
  padding: 24px 12px;
  border: 2px dashed #5a4227;
  border-radius: 8px;
  background: #fff8df;
  color: #21170f;
  text-align: center;
  font-weight: 900;
}

@media (max-width: 720px) {
  .leaderboard-card {
    padding: 12px;
  }

  .leaderboard-list {
    max-height: calc(min(78vh, 680px) - 126px);
  }
}
