/* ==========================================================
   pages/ranking.css — 전국 · 지역 랭킹 (/rank/...)
   .filterbar(붙는 필터) · .sort-tabs · .rank-summary · .rank-more · .excluded
   순위 줄·시상대 모양은 components/rank-row.css · podium.css
   ========================================================== */

/* ---------- 붙는 필터 막대 ---------- */
.filterbar {
  position: sticky; top: calc(var(--hdr-h) + var(--nav-h)); z-index: 30;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.filterbar-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.filterbar .select { width: 100%; }
.filterbar .select select { padding-right: 30px; font-size: 14px; }
.filterbar-find { grid-column: 1 / -1; }

/* 목록 안 학교 찾기 — 검색 컴포넌트의 작은 판 */
.filterbar-find .sfield { height: 42px; padding-left: 12px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); }
.filterbar-find .sfield:focus-within { box-shadow: inset 0 0 0 1.5px var(--brand-line), var(--focus-ring); }
.filterbar-find .sfield > .ico { width: 18px; height: 18px; color: var(--ink-3); }
.filterbar-find .sfield input { font-size: 14.5px; font-weight: 600; }
.filterbar-find .s-clear { width: 32px; height: 32px; }

@media (max-width: 767px) {
  /* 모바일은 필터 한 줄만 붙이고, 찾기는 목록 위에서 */
  .filterbar-find { display: none; }
}
@media (min-width: 768px) {
  .filterbar-inner { grid-template-columns: 140px 150px 150px minmax(0, 1fr); gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .filterbar-find { grid-column: auto; justify-self: end; width: min(100%, 320px); }
}

/* ---------- 정렬 탭 ---------- */
.sort-tabs { margin-bottom: 14px; }
.sort-tabs .chip .ico { width: 15px; height: 15px; }

/* ---------- 요약 줄 (모수 · 평균 · 내 학교 이동) ---------- */
.rank-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
.rank-summary .meta-dot { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.rank-summary .meta-dot b { color: var(--navy); font-weight: 800; }
.jump-my {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep); font-size: 13px; font-weight: 800;
}
.jump-my .ico { width: 15px; height: 15px; }
.jump-my .ico:first-child { fill: currentColor; stroke-width: 1.5; }
.find-mobile { width: 100%; }
.find-mobile .sfield { height: 44px; padding-left: 12px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); }
.find-mobile .sfield:focus-within { box-shadow: inset 0 0 0 1.5px var(--brand-line), var(--focus-ring); }
.find-mobile .sfield > .ico { width: 18px; height: 18px; color: var(--ink-3); }
.find-mobile .sfield input { font-size: 15px; font-weight: 600; }
@media (min-width: 768px) { .find-mobile { display: none; } }

/* 시상대와 목록 사이 */
#rankPodium:not(:empty) { margin-bottom: 14px; }

/* ---------- 더 보기 ---------- */
.rank-more { margin-top: 14px; }
.rank-more:empty { display: none; }
.rank-more .btn { width: 100%; }
@media (min-width: 768px) { .rank-more { text-align: center; } .rank-more .btn { width: auto; min-width: 300px; } }

/* ---------- 정식 순위 제외 학교 ---------- */
.excluded { margin-top: 18px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.excluded summary {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 18px; cursor: pointer; list-style: none;
  font-size: 14.5px; font-weight: 700; color: var(--ink-2);
}
.excluded summary::-webkit-details-marker { display: none; }
.excluded summary .ico:last-child { margin-left: auto; transition: transform .2s; color: var(--ink-4); }
.excluded[open] summary .ico:last-child { transform: rotate(180deg); }
.excluded-body { padding: 0 8px 10px; }
.excluded-note { padding: 0 10px 8px; font-size: 13px; color: var(--ink-3); }
.excluded .rlist { background: #fff; border-radius: 14px; }

.rank-foot { margin-top: 24px; }
