.community__leaders .leaderboards h2 {
  box-shadow: inset 0 1px 3px -2px #737373, inset 0 -4px 8px -3px hsl(from var(--c-body-gradient) h s calc(l + 3)/.8);
}

:where(html.light) .community__leaders .leaderboards h2 {
  box-shadow: inset 0 3px 3px -2px #fff6, inset 0 -4px 8px -3px hsl(from var(--c-body-gradient) h s calc(l + 5)/.8);
}

.community__leaders .leaderboards :where(html.light) h2 {
  box-shadow: inset 0 3px 3px -2px #fff6, inset 0 -4px 8px -3px hsl(from var(--c-body-gradient) h s calc(l + 5)/.8);
}

.community__leaders .leaderboards h2 {
  background-image: linear-gradient(to bottom, var(--c-metal-top), var(--c-metal-bottom));
  white-space: nowrap;
  overflow: hidden;
}

.community__leaders .leaderboards section[class$="__item"] .user-link {
  text-overflow: ellipsis;
  overflow: hidden;
}

.community__leaders .leaderboards section[class$="__item"] > a h2:after {
  vertical-align: middle;
  text-transform: none;
  speak: none;
  content: attr(data-icon);
  opacity: .9;
  unicode-bidi: isolate;
  font-family: lichess;
  font-size: 1.2em;
  font-style: normal;
  font-weight: normal;
}

.community__leaders .leaderboards h2 {
  flex-flow: row;
  align-items: center;
  display: flex;
}

.community__leaders .leaderboards section[class$="__item"] {
  border-radius: var(---ui-roundness, 7px);
}

.community {
  grid-template-areas: "online"
                       "leaders";
  gap: 2rem;
  display: grid;
}

@media (min-width: 499.3px) {
  .community {
    grid-template: "online leaders" min-content
                   "online ."
                   / min-content 1fr;
  }
}

.community h2 {
  margin-bottom: 2rem;
  font-size: 1.7em;
}

.community__online {
  grid-area: online;
  min-width: 244px;
  max-width: 272px;
}

.community__online li {
  justify-content: space-between;
  width: 100%;
  padding: .6rem 0;
  display: flex;
}

.community__online .user-link {
  margin-inline-end: 1em;
}

.community__leaders {
  grid-area: leaders;
}

.community__leaders .leaderboards {
  grid-template-columns: repeat(auto-fit, minmax(34ch, 1fr));
  gap: 1em;
  display: grid;
}

.community__leaders .leaderboards section[class$="__item"] {
  border: 1px solid var(--c-border);
  overflow: hidden;
}

.community__leaders .leaderboards section[class$="__item"] > a h2:after {
  content: "";
  color: var(--c-font-dimmer);
  opacity: 0;
  margin-left: auto;
  margin-right: 12px;
  font-size: 16px;
}

.community__leaders .leaderboards section[class$="__item"] > a:hover h2:after {
  opacity: 1;
}

.community__leaders .leaderboards h2 {
  width: 100%;
  color: var(--c-font);
  margin: 0;
  padding-inline-start: 1rem;
  font-size: 1.45em;
  font-weight: 600;
  line-height: 2.5em;
}

.community__leaders .leaderboards h2:before {
  color: var(--c-brag);
  font-size: 1.6em;
}

.community__leaders .leaderboards ol {
  border-top: 1px solid var(--c-border);
}

.community__leaders .leaderboards ol:empty {
  display: none;
}

.community__leaders .leaderboards li {
  padding-inline: .5rem 1.2rem;
  white-space: nowrap;
  justify-content: space-between;
  width: 100%;
  padding-top: .7rem;
  padding-bottom: .7rem;
  display: flex;
}

.community__leaders .leaderboards li:nth-child(2n) {
  background: var(--c-bg-zebra);
}
