h2.hero-title {
  position: absolute;
  bottom: 24px;
  z-index: 1;
  display: flex;
  left: 24px;
  width: calc(100% - 48px);
  margin: 0;
}
h2 .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-right: 10px;
  text-align: center;
}
.hero {
  padding: 0 0;
}
section {
  margin: 0;
}

.hero-card {
  position: relative;
  overflow: hidden;
}

/* 下に向かって暗くなるスクリーン。白っぽい画像でも確実に読める */
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  /* 上は薄く、下に行くほど濃く。数値はお好みで */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 20%,
    rgba(0, 0, 0, 0.45) 60%,
    rgba(0, 0, 0, 0.7) 100%
  );
  pointer-events: none;
}

/* 画像をほんの少しだけ締める（やり過ぎ注意） */
.hero-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85) contrast(1.05) saturate(0.95);
}

/* ===== 共通カードUI（2–5 / 6–20 共用） ===== */
.rank-cards .grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.rank-cards .card a {
  display: block;
  background: #14161d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
}
.rank-cards .thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #0f1117;
}
.rank-cards .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rank-cards .rank-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-weight: 700;
  font-size: 12px;
  background: #1f2937;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
}
.rank-cards .meta {
  padding: 10px;
  display: grid;
  gap: 2px;
}
.rank-cards .meta .author {
  color: #cbd5e1;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-cards .meta .title {
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clamp-1 {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2–5 位：右カラムの幅に合わせて 2列グリッド（小画面は1列） */
.rank-2-5.rank-cards .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .rank-2-5.rank-cards .grid {
    grid-template-columns: 1fr;
  }
}

/* 6–20 位（既存の列数指定） */
.rank-6-20 {
  margin-top: 24px;
}
.rank-6-20 .grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1200px) {
  .rank-6-20 .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 900px) {
  .rank-6-20 .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .rank-6-20 .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
