/* ================================================================
   ranking.css  –  新刊コミック人気ランキングページ専用スタイル
   配置先: ./assets/css/ranking.css
   依存:   top.css（.container / .page-header / .info-header）
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@700&display=swap');

/* ───────────────────────────────────────────
   ページヘッダー上書き（オレンジアクセント）
─────────────────────────────────────────── */
.info-header h2::after {
    background-color: #e8780a;
}
.page-header h1::after {
    background-color: #e8780a;
}

/* ───────────────────────────────────────────
   ランキングセクション
─────────────────────────────────────────── */
.ranking-section {
    padding: 32px 0 56px;
}

/* スマホ時の横幅制限 */
@media (max-width: 768px) {
    .ranking-section.container,
    .ranking-section {
        width: 90% !important;
        max-width: 90% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }
}

.ranking-meta {
    font-size: 0.78rem;
    color: #6b6560;
    margin: -8px 0 20px;
    padding-left: 2px;
}

/* ───────────────────────────────────────────
   ランキングヘッダー（ダークブラウン帯）
─────────────────────────────────────────── */
.ranking-hero {
    background: linear-gradient(135deg, #1a1008 0%, #3d2506 100%);
    padding: 1.5rem 1.25rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.ranking-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,.03) 0,
        rgba(255,255,255,.03) 1px,
        transparent 1px,
        transparent 8px
    );
}
.ranking-hero-inner {
    position: relative;
}
.ranking-hero-eyebrow {
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    letter-spacing: .15em;
    color: #e8780a;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.ranking-hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}
.ranking-hero-sub {
    font-size: .78rem;
    color: rgba(255,255,255,.5);
    letter-spacing: .04em;
}
.ranking-updated-at {
    position: absolute;
    top: 0;
    right: 0;
    font-size: .68rem;
    color: rgba(255,255,255,.35);
    font-family: 'Oswald', sans-serif;
    letter-spacing: .05em;
}

/* ───────────────────────────────────────────
   ポディウム（1〜3位・表彰台形式）
─────────────────────────────────────────── */
.podium-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 10px;
    align-items: end;
}

.pod-card {
    background: #fff;
    border: 1px solid #e0d8ce;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .15s, box-shadow .15s;
}
.pod-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

/* 1位：中央・金縁・最高位 */
.pod-card--1 {
    grid-column: 2;
    border-color: #c8992a;
    box-shadow: 0 0 0 2px #c8992a, 0 4px 20px rgba(200,153,42,.3);
    margin-bottom: 56px;
}
/* 2位：左・中位 */
.pod-card--2 {
    grid-column: 1;
    margin-bottom: 28px;
}
/* 3位：右・最低位 */
.pod-card--3 {
    grid-column: 3;
    margin-bottom: 0;
}

/* バッジ */
.pod-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: .6rem .5rem .5rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    position: relative;
}
.pod-card--1 .pod-badge {
    background: linear-gradient(135deg, #c8992a 0%, #f0c040 50%, #c8992a 100%);
    color: #fff;
    padding: .75rem .5rem .6rem;
}
.pod-card--2 .pod-badge {
    background: linear-gradient(135deg, #6a7f8f 0%, #aabfcf 50%, #6a7f8f 100%);
    color: #fff;
}
.pod-card--3 .pod-badge {
    background: linear-gradient(135deg, #8b5020 0%, #c8804a 50%, #8b5020 100%);
    color: #fff;
}

.pod-card--1 .pod-badge .pod-num { font-size: 2.2rem; line-height: 1; text-shadow: 0 2px 4px rgba(0,0,0,.2); }
.pod-card--2 .pod-badge .pod-num,
.pod-card--3 .pod-badge .pod-num { font-size: 1.8rem; line-height: 1; }

/* 表紙 */
.pod-cover {
    width: 70%;
    background: #ece8e0;
    margin: 10px auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    padding: 10px 6px;
    box-sizing: border-box;
}
.pod-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    object-position: center center;
    display: block;
}

/* 書誌 */
.pod-info {
    padding: 8px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    align-items: center;
}
.pod-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
}
.pod-card--1 .pod-title { font-size: .95rem; }

.pod-author {
    font-size: 0.9rem;
    color: #6b6560;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    max-width: 100%;
}
.pod-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e8780a;
    margin: 0;
}

/* ───────────────────────────────────────────
   区切り（4th–10th）
─────────────────────────────────────────── */
.ranking-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 1.25rem 0 .75rem;
}
.ranking-divider::before,
.ranking-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0d8ce;
}
.ranking-divider span {
    font-family: 'Oswald', sans-serif;
    font-size: .7rem;
    letter-spacing: .12em;
    color: #9a9490;
    white-space: nowrap;
}

/* ───────────────────────────────────────────
   リスト（4〜10位）
─────────────────────────────────────────── */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-row {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e0d8ce;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .13s, box-shadow .13s;
}
.rank-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}

/* 順位数字 */
.rank-row-num {
    width: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}
.rank-row--top  .rank-row-num { background: #c96200; } /* 4〜6位 */
.rank-row--rest .rank-row-num { background: #4a4540; } /* 7〜10位 */

/* サムネイル */
.rank-row-thumb {
    width: 94px;
    flex-shrink: 0;
    aspect-ratio: 3 / 4;
    padding: 6px;
/*    overflow: hidden;*/
    background: #ece8e0;
}
.rank-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

/* 書誌 */
.rank-row-body {
    flex: 1;
    padding: 9px 12px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}
.rank-row-title {
    font-size: 1.0rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1a1a1a;
    margin: 0;
}
.rank-row-author {
    font-size: 0.9rem;
    color: #6b6560;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
.rank-row-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e8780a;
    margin: 0;
}

/* ───────────────────────────────────────────
   注釈テキスト
─────────────────────────────────────────── */
.ranking-note {
    margin-top: 1.25rem;
    padding-top: .75rem;
    border-top: 1px solid #e0d8ce;
    font-size: .72rem;
    color: #aaa;
    text-align: center;
}

/* ───────────────────────────────────────────
   レスポンシブ対応
─────────────────────────────────────────── */
@media (max-width: 768px) {
    .podium-grid { gap: 6px; }
    .pod-title   { font-size: .82rem; }
    .pod-card--1 .pod-title { font-size: .88rem; }
    .pod-cover { width: 80%; padding:0;}
    .page-header h1 { font-size: 1.5rem; }
}

@media (max-width: 540px) {
    .ranking-hero-title { font-size: 1.6rem; }

    .pod-card--1 .pod-badge .pod-num { font-size: 1.8rem; }
    .pod-card--2 .pod-badge .pod-num,
    .pod-card--3 .pod-badge .pod-num { font-size: 1.5rem; }
    .pod-info  { padding: 6px 8px 10px; }
    .pod-cover { width: 85%;  padding:0;}

    /* スマホ時の表彰台段差調整 */
    .pod-card--1 { margin-bottom: 30px; }
    .pod-card--2 { margin-bottom: 10px; }
    .pod-card--3 { margin-bottom: 0; }

    .rank-row-num   { width: 38px; font-size: 1.1rem; }
    .rank-row-thumb { width: 80px; padding: 3px 0 }
    .rank-row-title { font-size: .82rem; }
}
