.ranking nav {
  overflow-x: auto;
}

.ranking ul {
  display: flex;
}

.ranking li {
  position: relative;
  padding: 2em 0.75em 0.5em;
}

.ranking li > p {
  position: absolute;
  top: 1.5em;
  left: 0;
  z-index: 1;
  background: var(--orange);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  line-height: 1;
  font-size: 0.9em;
  border-radius: 50%;
  width: 3.25em;
  height: 3.25em;
  white-space: nowrap;
  letter-spacing: -0.05em;
}

.ranking li > p span {
  font-size: 1.5em;
}

.ranking li:nth-of-type(-n + 3) > p {
  display: none;
}

.ranking li:nth-of-type(-n + 3)::before {
  content: "";
  background: no-repeat center / contain;
  width: 4.5em;
  height: 4.5em;
  position: absolute;
  top: 0;
  left: -0.5em;
  z-index: 1;
}

.ranking li:nth-of-type(1)::before {
  background-image: url(../img/rank_1.png.webp);
}

.ranking li:nth-of-type(2)::before {
  background-image: url(../img/rank_2.png.webp);
}

.ranking li:nth-of-type(3)::before {
  background-image: url(../img/rank_3.png.webp);
}

.no-webp .ranking li:nth-of-type(1)::before {
  background-image: url(../img/rank_1.png);
}

.no-webp .ranking li:nth-of-type(2)::before {
  background-image: url(../img/rank_2.png);
}

.no-webp .ranking li:nth-of-type(3)::before {
  background-image: url(../img/rank_3.png);
}

.ranking figure {
  position: relative;
  margin-bottom: 0.5em;
}

.ranking img {
  width: 8.5em;
  height: auto;
  object-fit: cover;
}

.ranking figcaption {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 0.5em;
  background: var(--primary);
  color: white;
  font-weight: bold;
  font-size: 0.9em;
  line-height: 1;
  opacity: 0.95;
}

.ranking dl {
  padding-bottom: 1.75em;
}

.ranking dt {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  line-height: 1;
}

.ranking dd {
  letter-spacing: -0.05em;
  position: absolute;
  bottom: 0.5em;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  line-height: 1;
}

.ranking strong {
  font-size: 1.2em;
  margin-right: 0.1em;
}

.ranking nav + p {
  text-align: center;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .ranking li {
    padding: 2em 1em 1em;
  }

  .ranking li > p span {
    font-size: 1.4em;
  }

  .ranking dd {
    bottom: 1em;
  }
}
