/* ==========================================================================
   Comic - ランキングページ
   ========================================================================== */

.comic-ranking {
    max-width: 1000px;
    margin: 0 auto;
    /* padding: 20px; */
}
.comic-ranking h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1f2937;
}

.ranking-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}
.ranking-tab {
    padding: 10px 20px;
    text-decoration: none;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.ranking-tab:hover {
    color: #374151;
    background: #f9fafb;
}
.ranking-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

/* ランキングアイテム: 番号 + comic_row + views */
.ranking-item {
    display: flex;
    align-items: center;
    position: relative;
    background: #fff;
}
.ranking-item .comic-list-item {
    flex: 1;
    min-width: 0;
}

/* 順位番号バッジ（画像の左上） */
.ranking-num {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    min-width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: rgba(107, 114, 128, 0.85);
    border-radius: 0 0 6px 0;
}
.ranking-num.top3 {
    background: rgba(245, 158, 11, 0.9);
}

/* views数 */
.ranking-count {
    font-size: 0.85rem;
    color: #dc2626;
    font-weight: 600;
    white-space: nowrap;
    padding-right: 12px;
}

/* extra_info: PC時は非表示（右横のranking-countで表示） */
.comic-list-item-extra {
    display: none;
}

/* スマホ: 右横のviewsを隠し、comic_row内のextra_infoで表示 */
@media (max-width: 576px) {
    .ranking-count {
        display: none;
    }
    .ranking-item .comic-list-item-extra {
        display: block;
        font-size: 0.85rem;
        color: #dc2626;
        font-weight: 600;
        margin-top: 4px;
    }
}
