.rank-heading { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.rank-heading .topic-intro { font-size: 14px; line-height: 20px; }
.rank-controls { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.rank-tabs { display: flex; gap: 18px; min-width: 0; }
.rank-tab { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; width: 144px; height: 48px; border: 1px solid rgba(255,255,255,.05); border-radius: 9px; background: rgba(255,255,255,.05); color: #999; text-decoration: none; font-size: 18px; line-height: 24px; white-space: nowrap; }
.rank-tab--active { background: #ff4b02; border-color: #ff4b02; color: #fff; }
.rank-tab-icon { display: inline-flex; flex: 0 0 24px; align-items: center; justify-content: center; }
.rank-tab-icon img { display: block; flex-shrink: 0; }
.rank-tab--active .rank-tab-icon { filter: none; }
.rank-tab--hot.rank-tab--active .rank-tab-icon img { content: url("/static/images/rank/hot-pc-active.svg"); }
.rank-tab--like.rank-tab--active .rank-tab-icon img { content: url("/static/images/rank/like-pc-active.svg"); }
.rank-tab--collect.rank-tab--active .rank-tab-icon img { content: url("/static/images/rank/collect-pc-active.svg"); }
.rank-tab--new.rank-tab--active .rank-tab-icon img { content: url("/static/images/rank/new-pc-active.svg"); }
.rank-tab:not(.rank-tab--active) .rank-tab-icon { filter: brightness(0) invert(.6); }
.rank-tab:hover { color: #fff; }
.rank-period-panel { display: flex; align-items: center; justify-content: space-between; }
.rank-period-label { display: none; }
.rank-periods { display: flex; gap: 18px; }
.rank-period { display: inline-flex; align-items: center; justify-content: center; width: 104px; height: 36px; border-radius: 12px; background: rgba(255,255,255,.05); color: #999; text-decoration: none; font-size: 16px; line-height: 22px; white-space: nowrap; }
.rank-period.is-active { color: #ff4b02; }
.rank-period:hover { color: #fff; }
.rank-layout :is(a,button):focus-visible { outline: 2px solid #ff4b02; outline-offset: 3px; }
.rank-layout .card-grid { width: 100%; grid-template-columns: repeat(6,minmax(0,1fr)); }
.rank-list { display: none; }
.hot-rank-page .rank-controls { justify-content: space-between; }
@media (min-width: 768px) {
 .rank-tab { border-color: transparent; background: #1a1a1a; }
 .rank-tab--active { background: #ff4b02; }
 /* These dark-theme exports already carry the Figma grey and inner detail. */
 .rank-tab:not(.rank-tab--active):not(.rank-tab--hot) .rank-tab-icon { filter: none; }
}
@media (min-width: 768px) and (max-width: 860px) {
 .rank-controls { flex-wrap: wrap; gap: 16px; }
 .rank-period-panel { margin-left: auto; }
}
@media (max-width: 767px) {
 .rank-layout { gap: 16px; margin-block: 16px; }
 .rank-layout > .topic-breadcrumb, .rank-heading, .rank-layout .rank-grid { display: none; }
 .hot-rank-page > .topic-breadcrumb, .hot-rank-page .rank-heading { display: flex; }
 /* Keep both ranking filters below the shared 48px mobile header, with an opaque full-width surface. */
 .rank-controls { position: sticky; top: 48px; z-index: 90; flex-direction: column; align-items: stretch; gap: 16px; width: calc(100% + 32px); margin: -12px -16px; padding: 12px 16px; background: #0a0a0a; }
 .rank-tabs { gap: 8px; }
 .rank-tab { flex: 1 1 0; min-width: 0; width: auto; height: 34px; gap: 4px; padding: 7px 4px; border-radius: 8px; color: #f5f5f5; font-size: 12px; line-height: 18px; }
 .rank-tab--active { box-shadow: 0 4px 6px -1px rgba(255,75,2,.3), 0 2px 4px -2px rgba(255,75,2,.3); }
 .rank-tab-icon { flex-basis: 14px; }
 .rank-tab-icon img { width: 14px; height: 14px; }
 .rank-period-panel { gap: 8px; padding: 9px; border: 1px solid rgba(255,255,255,.05); border-radius: 12px; background: rgba(255,255,255,.05); }
 .rank-period-label { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; padding-left: 4px; color: #999; font-size: 12px; line-height: 18px; white-space: nowrap; }
 .rank-periods { gap: 6px; }
 .rank-period { width: auto; height: 28px; padding: 4px 12px; border: 1px solid transparent; border-radius: 999px; background: transparent; font-size: 12px; line-height: 18px; }
 .rank-period.is-active { border-color: #ff4b02; background: #ff4b02; color: #fff; }
 .rank-list { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 12px; }
 .rank-list-item { position: relative; display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 11px; overflow: hidden; border: 1px solid rgba(255,255,255,.05); border-radius: 12px; background: #1b1b1b; }
 .rank-list-item--1 { border-color: #ff4b02; box-shadow: 0 10px 15px -3px rgba(0,0,0,.6), 0 4px 6px -4px rgba(0,0,0,.6); }
 .rank-list-item--1::before { content: ""; position: absolute; top: -32px; right: -32px; width: 112px; height: 112px; border-radius: 50%; background: #ff4b02; opacity: .2; filter: blur(20px); pointer-events: none; }
 .rank-list-cover { position: relative; flex: 0 0 98px; width: 98px; height: 130px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.05); }
 .rank-list-cover > img { width: 100%; height: 100%; object-fit: cover; }
 .rank-list-number { position: absolute; top: 0; left: 0; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 4px; border-radius: 0 0 8px 0; background: #555; color: #f5f5f5; font-size: 12px; line-height: 18px; }
 .rank-list-item--1 .rank-list-number { background: linear-gradient(237deg,#ffcd9a,#e88a33); }
 .rank-list-item--2 .rank-list-number { background: linear-gradient(237deg,#d8edf5,#91b6c6); }
 .rank-list-item--3 .rank-list-number { background: linear-gradient(237deg,#ffc8ad,#e88c76); }
 .rank-list-episodes { position: absolute; right: 4px; bottom: 4px; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; line-height: 16px; }
 .rank-list-info { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: space-between; align-self: stretch; min-width: 0; padding-block: 2px; }
 .rank-list-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
 .rank-list-top { padding: 0 4px; border: 1px solid rgba(255,255,255,.05); border-radius: 4px; background: rgba(255,255,255,.05); color: #999; font-size: 10px; line-height: 16px; }
 .rank-list-item--1 .rank-list-top { border-color: #ff4b02; background: #ff4b02; color: #fff; }
 .rank-list-title { width: 100%; min-width: 0; margin: 0; font-size: 14px; font-weight: 500; line-height: 20px; }
 .rank-list-title a { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #f5f5f5; text-decoration: none; }
 .rank-list-stats { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 0; color: #999; font-size: 12px; line-height: 18px; }
 .rank-list-stats > span { white-space: nowrap; }
 .rank-list-stats > span + span::before { content: "·"; margin-right: 8px; color: #999; }
 .rank-list-item:is(.rank-list-item--1,.rank-list-item--2,.rank-list-item--3) .rank-list-metric { color: #ff4b02; font-weight: 500; }
 .rank-list-score { color: #d4af37; font-weight: 500; }
 .rank-list-desc { display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: #999; font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
 .rank-list-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,.05); }
 .rank-list-tags { display: flex; flex: 1; min-width: 0; gap: 4px; overflow: hidden; }
 .rank-list-tags > * { min-width: 0; max-width: 100%; padding: 2px 6px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.05); color: #ccc; font-size: 10px; line-height: 16px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
 .rank-list-play { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid rgba(255,255,255,.05); border-radius: 999px; background: rgba(255,255,255,.05); color: #f5f5f5; font-size: 12px; line-height: 18px; text-decoration: none; white-space: nowrap; }
 .rank-list-item:is(.rank-list-item--1,.rank-list-item--2,.rank-list-item--3) .rank-list-play { background: #ff4b02; border-color: #ff4b02; }
}
@media (max-width: 359px) {
 .rank-period-panel { padding-inline: 6px; gap: 4px; }
 .rank-periods { gap: 2px; }
 .rank-period { padding-inline: 8px; }
 .rank-list-item { gap: 8px; padding: 9px; }
 .rank-list-cover { flex-basis: 82px; width: 82px; height: 109px; }
 .rank-list-play { padding-inline: 7px; }
}
