/* ===== iOS — Discover Rank ===== */
.rank-section-root {
  display: flex; flex-direction: column; gap: 10px; color: var(--ios-text);
}

.rank-section-header {
  display: flex; flex-direction: column; gap: 4px; padding: 2px 2px 6px;
}

.rank-section-kicker {
  margin: 0; font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; color: var(--ios-text-tertiary); text-transform: uppercase;
}
.rank-section-title { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.rank-section-desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ios-text-secondary); }

.rank-section-block-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px 2px;
}
.rank-section-block-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--ios-text); }
.rank-section-block-note { font-size: 13px; color: var(--ios-text-secondary); }

.rank-section-list-block { display: flex; flex-direction: column; gap: 10px; }

.rank-section-list-cover-wrap {
  position: relative; overflow: hidden; border-radius: 6px; background: var(--ios-bg);
}
.rank-section-list-cover { width: 100%; height: 100%; display: block; object-fit: cover; }

.rank-section-cover-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: #f2f2f7;
}
.rank-section-cover-placeholder span {
  font-size: 16px; font-weight: 600; color: rgba(60,60,67,0.3);
}

.rank-section-list-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.rank-section-list-tag {
  display: inline-flex; align-items: center;
  min-height: 22px; padding: 0 10px; border-radius: 6px;
  background: rgba(118,118,128,0.10); color: var(--ios-text-secondary);
  font-size: 12px; font-weight: 500;
}

.rank-section-list { display: flex; flex-direction: column; gap: 8px; }

.rank-section-list-item,
.rank-section-empty-card {
  border-radius: var(--r-lg); background: var(--ios-card);
}

.rank-section-list-rank {
  display: flex; align-items: center; justify-content: center;
  color: var(--ios-pink-text); font-weight: 700; font-size: 18px;
}

.rank-section-list-item {
  display: grid; grid-template-columns: 26px 54px minmax(0, 1fr); gap: 10px;
  align-items: center; padding: 10px;
}

.rank-section-list-item-top { background: var(--ios-pink-bg); }

.rank-section-list-cover-wrap { width: 54px; height: 72px; }

.rank-section-list-title-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}
.rank-section-list-title {
  flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rank-section-list-trend {
  flex-shrink: 0; color: var(--ios-pink-text); font-size: 12px; font-weight: 600;
}
.rank-section-list-desc { margin-top: 4px; font-size: 12px; line-height: 1.45; color: var(--ios-text-secondary); }

.rank-section-empty-state { min-height: 240px; }
.rank-section-empty-card { padding: 40px 20px; text-align: center; }

.rank-section-empty-title, .rank-section-list-title, .rank-section-empty-desc { margin: 0; }
.rank-section-empty-title { display: block; font-size: 17px; color: var(--ios-text); font-weight: 600; }
.rank-section-empty-desc { margin-top: 8px; font-size: 14px; color: var(--ios-text-secondary); }

/* Filter panel — iOS style */
.rank-filter-panel {
  display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px;
  padding: 12px; border-radius: var(--r-lg);
  background: var(--ios-card);
}
.rank-filter-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rank-filter-row-name {
  flex: 0 0 auto; min-width: 42px;
  color: var(--ios-text-secondary); font-size: 13px; font-weight: 500;
}
.rank-filter-scroll {
  flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 1px 2px 2px;
}
.rank-filter-scroll::-webkit-scrollbar { display: none; }

.rank-filter-chip {
  flex: 0 0 auto; min-height: 32px; padding: 0 16px; border-radius: 8px;
  background: rgba(118,118,128,0.10); border: none;
  color: var(--ios-text); font-size: 13px; font-weight: 500;
}
.rank-filter-chip:active { opacity: 0.7; }
.rank-filter-chip.active {
  color: #fff; background: var(--ios-pink); font-weight: 600;
}

@media (max-width: 720px) {
  .rank-section-list-item { grid-template-columns: 24px 52px minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .rank-section-list-item { grid-template-columns: 22px 48px minmax(0, 1fr); gap: 8px; }
  .rank-section-list-cover-wrap { width: 48px; height: 64px; }
}
