/*スマホ用レイアウト*/
@media (max-width: 768px) {
    .bottom-nav {
    /* 1. 画面下部に固定 */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0; /* width: 100% の代わり */
    z-index: 1000; /* 他の要素より手前に表示 */

    /* 2. 見た目のスタイル */
    display: flex; /* 横並びレイアウト */
    justify-content: space-around; /* アイコンを等間隔に配置 */
    align-items: center; /* アイコンを中央揃え */
    height: 70px; /* ナビゲーションバーの高さ */
    background-color: #fff; /* 背景色 */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05); /* 上部に影をつける */
    }

    /* 重要：コンテンツがナビゲーションに隠れるのを防ぐ */
    body {
        padding-bottom: 70px; /* .bottom-navの高さ分、余白を追加 */
    }
    
    .bottom-nav a {
        flex: 1;
        padding: 10px 0;
        text-align: center;
        text-decoration: none;
        color: #333;
        font-size: 0.8rem;
    }

    .bottom-nav img {
        display: block;
        margin: 0 auto 5px;
        width: 24px;
        height: 24px;
    }
    
    .swiper-button-prev,
    .swiper-button-next {
        /* スマートフォンでは矢印が端に寄りすぎないようマージンを少し増やす */
        margin: 0 5px;
        /* 矢印のサイズを少し小さくしてコンテンツの邪魔にならないようにする */
        /* font-size: 20px; などの調整も有効です */
        
        /* もし矢印が画像に重なりすぎる場合、さらに調整 */
        /* 例: 左右の配置を内側に寄せる */
        /* left: 5px; */
        /* right: 5px; */
    }
    .letterBook-viewport{
        transform: translate(-3%, -20%);
    }
    .letterBook-viewport .letterBook{
        width: 90vw; /* 90%に拡大 */
        height: calc(90vw / 1.536);
        scale: 1;
    }
    .letterBook-viewport .page{
        width: calc(90vw / 2); /* 90%に拡大 */
        height: calc(90vw / 1.536); 
    }

    .sub-card {
    /* デフォルトの row を column に上書きして縦積み（モバイル向け） */
    flex-direction: column; 
    height: auto; /* モバイルでは高さを自動に戻す */
    }

    /* 子要素の幅も 100% に戻す */
    .sub-card-img,
    .sub-card-text {
        width: 100%;
    }

    .sub-card-img {
        height: auto; /* 画像の高さを自動に戻す */
    }

    .content-cards {
        /* スマホでは1列表示に切り替え */
        grid-template-columns: 1fr;
    }
}

@media (max-width: 440px){
    .current-page{
        display: block;
    }
}