/* ============================================================
   パジネーション：確実な表示と中央寄せ（修正版）
   ============================================================ */

/* 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. ボタンデザイン：paddingを0にして、幅と高さを固定する */
.page-numbers {
    display: inline-block !important; /* 一旦flexから離れてみる */
    text-align: center !important;
    
    /* 1. 幅と高さを完全に固定 */
    width: 48px !important; 
    height: 48px !important;
    
    /* 2. 縦中央の魔法：line-heightを高さと同じ数値に設定 */
    line-height: 48px !important; 
    
    /* 3. 余計な隙間をすべてゼロにする */
    padding: 0 !important;
    margin: 0 !important;
    
    /* 4. 見た目の装飾（現状維持） */
    background-color: #2c313d !important;
    color: #d1d5db !important;
    border-radius: 10px !important;
    font-weight: bold !important;
    font-size: 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-decoration: none !important;
}

/* モバイル用も高さを合わせる */
@media (max-width: 1080px) {
    .page-numbers {
        width: 40px !important;
        height: 40px !important;
        line-height: 40px !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;
    }
}