/* ============================================================
   パジネーション：確実な表示と中央寄せ（修正版）
   ============================================================ */

/* 1. 外枠：ID指定だけでなくクラスでも拾って、確実にflex化 */
nav.paging-navigation,
nav#nav-below {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin: 60px auto !important;
    float: none !important;
    width: 100% !important;
    clear: both !important;
}

/* 3. 数字リンクの塊：ここが「display: none」を上書きできていない可能性を潰す */
.nav-links {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important; /* スマホ用に少し狭める */
    margin: 0 auto !important;
    float: none !important;
    width: auto !important;
}

/* 4. ボタンデザイン：一貫性を持たせる */
.page-numbers {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: 48px;
    height: 48px;
    padding: 0 12px !important;
    background-color: #2c313d !important;
    color: #d1d5db !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    font-weight: bold !important;
    font-size: 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s ease !important;
}

/* 5. 現在地 */
.page-numbers.current {
    background-color: #ff8c69 !important;
    color: #ffffff !important;
    border-color: #ff8c69 !important;
}

/* 7. 点リーダー：モバイルで見切れやすいので幅を調整 */
.page-numbers.dots {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    min-width: 20px !important;
}

/* モバイル専用：画面からはみ出さないための最終防衛ライン */
@media (max-width: 1080px) {
    nav.paging-navigation {
        margin: 30px auto !important; /* 余白を詰める */
        padding: 0 10px !important;
    }
    .page-numbers {
        min-width: 40px !important;
        height: 40px !important;
        font-size: 0.9rem !important;
    }
}