/* ページターナー専用CSS */
.headingMenu_section {
    background-image: url(../images/background_ppr.jpg);
    background-repeat: repeat;
    background-color: #e2e5da;
    background-blend-mode: multiply;
    color: var(--text-color--);
    padding: 40px 0;


}

.headingMenu_list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 16px 30px;
    max-width: 780px;
    margin: 0 auto;
    list-style-type: decimal;
}

.headingMenu_item {
    position: relative;
}


.headingMenu_item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #939393;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.headingMenu_item:hover::after {
    width: 100%;
}

.headingMenu_item::before {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #939393;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-image: url(../images/shv.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.headingMenu_item:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(15px) scale(1.1);
}

.headingMenu_link {
    text-decoration: none;
    font-weight: bold;
    color: var(--text-color--);
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 5px 0;
    position: relative;
    font-size: 19px;
}

.headingMenu_link:hover {
    color: #424242;
    transform: translateX(8px);
}

.headingMenu_item:nth-child(5) {
    grid-column: 1;
}

@media (max-width: 768px) {
    .headingMenu_list {
        grid-template-columns: 1fr;
        /* モバイルでは1列 */
        grid-template-rows: auto;
        text-align: center;
    }

    .headingMenu_item:nth-child(5) {
        grid-column: 1;
    }
}

.pager_section {
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1800px;
    margin-top: 30px;
    border-radius: 8px;
    position: relative;
    padding: 0 20px;
}

.book_container {
    position: relative;
    width: calc(100% - 60px);
    height: 600px;
    overflow: hidden;
    border-radius: 12px;
}

.book {
    position: relative;
    width: 100%;
    height: 100%;
}

.page {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url(../images/background_ppr.jpg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: grab;
    overflow: hidden;
    border: 1px solid #d3d0cc;
    border-radius: 12px;
}

.page.dragging {
    cursor: grabbing;
    transition: none;
}

/* スライド動作用のクラスを削除・簡素化 */

.page.brightened {
    filter: brightness(1.2);
    transition: filter 0.3s ease;
}

.page.darkened {
    filter: brightness(0.8) blur(3px);
    transition: filter 0.3s ease;
}

.page_content {
    text-align: center;
    user-select: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page_number {
    font-size: 56px;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 30px;
}

.page_content .page_title {
    font-size: 30px;
    color: #2d3748;
    padding: 60px 0;
    font-weight: 800;
    font-family: var(--mincho-font--);
}

.page_text {
    height: auto;
    overflow: auto;
    font-size: 18px;
    color: var(--text-color--);
    line-height: 1.8;
    max-width: 90%;
    margin: 0 auto;
    text-align: left;
    margin-bottom: 20px;
    padding: 0 30px;

    blockquote {
        font-weight: bold;
        margin: 1em;
        line-height: 1.3em;

        ul {
            list-style: none;

            li {
                margin-bottom: 0.5em;
            }
        }
    }
}

.page_decoration {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    border-radius: 2px;
}

.nav_button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #4a5568;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;

    border: 1px solid #d3d0cc;

    span {
        transform: translateY(-3px);
    }
}

.nav_button:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.nav_button:active {
    transform: translateY(-50%) scale(0.95);
}

.nav_button:disabled {
    filter: brightness(0.8);
    cursor: not-allowed;
}

.nav_button:disabled:hover {
    transform: translateY(-50%) scale(1);
    background: rgba(255, 255, 255, 0.9);
}

.prev_button {
    left: 30px;
}

.next_button {
    right: 30px;
}

.page_indicator {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    align-items: center;
}

.indicator_dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #807e7c4d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator_dot.active {
    background: #807e7c;
    width: 24px;
    border-radius: 6px;
    transform: scale(1);
}

.page_counter {
    color: #807e7c;
    font-size: 14px;
    margin: 0 15px;
    font-weight: 500;
    white-space: nowrap;
}

.page_shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 8px;
}

.page.turning .page_shadow {
    opacity: 1;
}

/* 法被背景セクション */
.happi_bg_section {
    position: relative;
    width: 100%;
    min-height: 400px;
    margin-top: 80px;
    /* ページインジケーターの下に配置 */
    margin-bottom: 0;
    overflow: hidden;
    mix-blend-mode: color-burn;
}

.happi_bg_section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url(../images/bg_kaneki_happi.jpg);
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    mix-blend-mode: multiply;
    /* 焼きこみ効果は背景画像のみに適用 */
    opacity: 0.85;
}

.main {
    padding-bottom: 0;
    ;
}

.footer {
    margin-top: 0;
}

.happi_bg_overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgb(255 255 255 / 22%) 0%, rgb(255 255 255 / 0%) 10%, rgb(255 255 255 / 0%) 60%, rgb(255 255 255 / 40%) 100%);
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 768px) {
    .pager_section {
        padding: 40px 0;
    }

    .book_container {
        width: 85vw;
        height: 60vh;
        max-width: 600px;
        max-height: 800px;
    }

    .nav_button {
        width: 44px;
        height: 44px;
        font-size: 20px;
        background: rgba(255, 255, 255, 0.95);
    }

    /* タブレット: 画面端に配置 */
    .prev_button {
        left: 10px;
        margin-left: 0;
    }

    .next_button {
        right: 10px;
        margin-right: 0;
    }

    .page_content {
        padding: 40px 30px;
    }

    .page_number {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .page_title {
        font-size: 24px;
        padding: 30px 0;
    }

    .page_text {
        font-size: 16px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .pager_section {
        padding: 10px 0 40px;
        /* 上部余白をさらに削減 */
        margin-top: 10px;
    }

    .book_container {
        width: 95vw;
        /* 幅を限界まで広げる */
        height: 75vh;
        /* 高さを画面の3/4まで拡張 */
        max-width: none;
        max-height: 650px;
    }

    /* スマホではサイドボタンを非表示（スワイプ/ドラッグで操作） */
    .nav_button {
        display: none;
    }

    .page_content {
        padding: 15px 10px;
        /* 内部パディングも削減 */
    }

    .page_number {
        font-size: 18px;
        /* ページ番号も小さく */
        margin-bottom: 5px;
    }

    .page_title {
        font-size: 16px;
        /* タイトル文字をさらに小さく */
        padding: 10px 0;
        line-height: 1.4;
    }

    .page_text {
        font-size: 14px;
        padding: 0;
        line-height: 1.6;
        text-align: justify;
        /* 両端揃えで見やすく */
    }

    .page_indicator {
        bottom: 5px;
        gap: 6px;
    }

    .indicator_dot {
        width: 8px;
        height: 8px;
    }

    .indicator_dot.active {
        width: 16px;
    }
}

.page_text {
    font-size: 14px;
}