/* ですわボタンページ固有スタイル */
.desuwa-book {
    background-image: url('../img/desuwa/desuwa_book.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    width: 1400px;
    height: 700px;
    min-height: unset;
    position: relative;
    /* book-spread のデフォルト装飾を上書き */
    border: none;
    background-color: transparent;
}
/* 中央綴じ目シャドウ */
.desuwa-shadow--left,
.desuwa-shadow--right {
    position: absolute;
    top: 0;
    height: 100%;
    width: 80px;
    pointer-events: none;
    z-index: 100;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.desuwa-shadow--left {
    right: 50%;
    background-image: url('../img/common/book_paper_shadow_left.png');
}

.desuwa-shadow--right {
    left: 50%;
    background-image: url('../img/common/book_paper_shadow_right.png');
}

.desuwa-book .book-page--left::before,
.desuwa-book .book-page--left::after {
    content: '';
    display: block;
    width: 400px;
    height: 48px;
    background-size: 100% auto;
    background-repeat: no-repeat;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.desuwa-book .book-page--left::before {
    top: 20px;
    background-image: url('../img/common/frame_top.png');
    background-position: top center;
    width: 350px;
}

.desuwa-book .book-page--left::after {
    bottom: 20px;
    background-image: url('../img/common/frame_bottom.png');
    background-position: bottom center;
    width: 350px;
}

.desuwa-book .book-page--right::before,
.desuwa-book .book-page--right::after {
    content: '';
    display: block;
    width: 400px;
    height: 48px;
    background-size: 100% auto;
    background-repeat: no-repeat;
    position: absolute;
    left: 46%;
    transform: translateX(-50%);
    pointer-events: none;
}

.desuwa-book .book-page--right::before {
    top: 20px;
    background-image: url('../img/common/frame_top.png');
    background-position: top center;
    width: 350px;
}

.desuwa-book .book-page--right::after {
    bottom: 20px;
    background-image: url('../img/common/frame_bottom.png');
    background-position: bottom center;
    width: 350px;
}

/* ボタンエリア全体：縦並びで上下中央 */
.desuwa-buttons {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 0 8px;
}

/* 1行：横4つ */
.desuwa-row {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* 1セット：スピーカー上 + ボタン下 */
.desuwa-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.desuwa-item__speaker {
    width: 36px;
    height: 36px;
    display: block;
    pointer-events: none;
    background-image: url('../img/desuwa/speaker.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 再生ボタン */
.desuwa-btn {
    background-color: transparent;
    background-image: var(--desuwa-btn-img);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
    width: 60px;
    height: 60px;
    transition: transform 0.1s, opacity 0.15s;
}

.desuwa-btn:hover {
    opacity: 0.8;
}

.desuwa-btn:active {
    transform: scale(0.93);
}

.desuwa-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* 右ページ: おまんがサロメちゃん */
@keyframes desuwa-chara-switch {
    0%, 100% { opacity: 0; }
    50%      { opacity: 1; }
}

.desuwa-chara {
    flex: 1;
    position: relative;
    background-image: url('../img/desuwa/omanga_salome_1.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.desuwa-chara::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../img/desuwa/omanga_salome_2.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    animation: desuwa-chara-switch 1s steps(1, end) infinite;
}

/* TOPへ戻るボタン */
.desuwa-home-btn {
    position: absolute;
    bottom: 0px;
    right: 0px;
    display: block;
    z-index: 10;
    transition: opacity 0.2s;
}

.desuwa-home-btn:hover {
    opacity: 0.75;
}

.desuwa-home-btn img {
    width: 80px;
    height: auto;
    display: block;
}

/* TOPへ戻るボタン（モバイル用は初期非表示） */
.desuwa-home-btn--mobile {
    display: none;
}

/* 音声未設定メッセージ */
.desuwa-empty {
    text-align: center;
    opacity: 0.5;
    font-size: 0.9rem;
}

/* ============================================================
   レスポンシブ（768px 以下）
   ============================================================ */
@media screen and (max-width: 768px) {
    .desuwa-book {
        width: 100%;
        height: 500px;
        grid-template-columns: 1fr;
        background-image: url('../img/desuwa/desuwa_book_sp.png');
        background-size: 100% 100%;
        background-color: transparent;
    }

    /* 右ページ（キャラクター）を非表示 */
    .desuwa-book .book-page--right {
        display: none;
    }

    /* 左ページ（ボタン）を全幅に */
    .desuwa-book .book-page--left {
        width: 100% !important;
        left: 0 !important;
        height: 500px;
        padding-left: 40px;
    }

    .desuwa-shadow--left,
    .desuwa-shadow--right {
        display: none;
    }

    /* 上下フレームをコンテンツ中央に合わせる */
    .desuwa-book .book-page--left::before,
    .desuwa-book .book-page--left::after {
        left: calc(50% + 10px);
        width: 80%;
    }

    .desuwa-row {
        gap: 20px;
    }

    .desuwa-btn {
        width: 40px;
        height: 40px;
    }

    .desuwa-item__speaker {
        width: 25px;
        height: 25px;
    }

    /* モバイル用ボタンを表示、PC用（右ページ内）は非表示 */
    .desuwa-home-btn--mobile {
        display: block;
        position: absolute;
        right: 4px;
        bottom: -40px;
        z-index: 10;
    }

    .book-page--right .desuwa-home-btn:not(.desuwa-home-btn--mobile) {
        display: none;
    }

    .desuwa-home-btn img {
        width: 65px;
    }
}
