@charset "UTF-8";

/* =========================================
   モーダル (Modal) スタイル
   ========================================= */

:root {
    --modal-duration: 0.5s;
    --modal-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* モーダル全体 */
.c-book-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.c-book-modal.is-active {
    opacity: 1;
    visibility: visible;
}

/* 背景オーバーレイ */
.c-book-modal__overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    cursor: pointer;
    z-index: 1;
    background: linear-gradient(
        135deg, 
        rgba(238, 133, 156, 0.85), 
        rgba(247, 205, 94, 0.85)
    );
    opacity: 0;
    transition: opacity var(--modal-duration) ease;
}

.c-book-modal.is-active .c-book-modal__overlay {
    opacity: 1;
}

/* コンテンツ容器 */
.c-book-modal__container {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 900px;
    background-color: #fff;
    border-radius: 24px;
    padding: 3.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    will-change: transform, opacity;
    transition: transform var(--modal-duration) var(--modal-ease),
                opacity var(--modal-duration) var(--modal-ease);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.c-book-modal__container::-webkit-scrollbar { display: none; }

.c-book-modal.is-active .c-book-modal__container {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* レイアウト構造 */
.c-book-modal__inner {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

/* 画像エリア */
.c-book-modal__image {
    width: 45%;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease 0.1s, transform 0.6s var(--modal-ease) 0.1s;
    margin: 0 !important;
}
.c-book-modal.is-active .c-book-modal__image {
    opacity: 1;
    transform: translateX(0);
}

.c-book-modal__image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
}

/* テキストコンテンツ */
.c-book-modal__content {
    width: 55%;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s var(--modal-ease) 0.2s;
}
.c-book-modal.is-active .c-book-modal__content {
    opacity: 1;
    transform: translateX(0);
}

.c-book-modal__title {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    line-height: 1.4;
    position: relative;
    padding-bottom: 1.5rem;
    color: #333;
}

.c-book-modal__title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(45deg, #ff59ee, #eeff2e);
    transition: width 0.6s var(--modal-ease) 0.4s;
}
.c-book-modal.is-active .c-book-modal__title::after {
    width: 80px;
}

.c-book-modal__desc {
    font-size: 1.5rem;
    line-height: 2;
    color: #555;
    white-space: pre-wrap;
}

/* プロフィール項目 */
.c-book-modal__profile {
    margin: 15px 0;
    font-size: 1.5rem;
    line-height: 2;
    color: #555;
}
.c-book-modal__profile p {
    margin: 0;
}

/* SNSエリア */
.c-book-modal__sns {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.c-book-modal__sns p {
    margin: 0;
    font-size: 1.5rem; /* 他の項目と統一 */
    color: #555;
}

.c-book-modal__sns-icons {
    display: flex;
    gap: 10px;
}

.c-book-modal__sns-icons a {
    width: 30px; /* アイコンのサイズ */
    height: 30px;
    display: block;
    transition: opacity 0.3s, transform 0.3s;
}

.c-book-modal__sns-icons a:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.c-book-modal__sns-icons svg {
    width: 100%;
    height: 100%;
    fill: #555; /* 基本色 */
}

/* 各SNSの固有色設定 */
.c-book-modal__sns-icons a.-insta svg { fill: #E1306C; }
.c-book-modal__sns-icons a.-x svg { fill: #000; }

/* 閉じるボタン */
.c-book-modal__close {
    position: absolute;
    top: 2rem; right: 2rem;
    width: 48px; height: 48px;
    border: none;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
    transition: all 0.5s var(--modal-ease) 0.3s;
}

.c-book-modal.is-active .c-book-modal__close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.c-book-modal__close:hover {
    box-shadow: 0 6px 15px rgba(255, 75, 106, 0.4);
    transform: scale(1.1) rotate(90deg);
}

.c-book-modal__close span {
    position: absolute;
    width: 22px; height: 2px;
    background-color: #333;
    border-radius: 2px;
    transition: background-color 0.3s;
}
.c-book-modal__close:hover span {
    background-color: rgb(255, 75, 106);
}
.c-book-modal__close span:nth-child(1) { transform: rotate(45deg); }
.c-book-modal__close span:nth-child(2) { transform: rotate(-45deg); }


/* === スマホ用レスポンシブ === */
@media screen and (max-width: 799px) {
    .c-book-modal__container {
        padding: 2.5rem 2rem;
        width: 85%;
        scrollbar-width: auto;
        -ms-overflow-style: auto;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }

    /* Webkit（Chrome/Safari）用: スクロールバーを再表示 */
    .c-book-modal__container::-webkit-scrollbar {
        display: block;
        width: 6px;
    }

    /* バー本体のスタイル（お好みで調整してください） */
    .c-book-modal__container::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 10px;
    }

    /* バーの背景 */
    .c-book-modal__container::-webkit-scrollbar-track {
        background: transparent;
    }

    /* --- その他の既存設定 --- */
    .c-book-modal__inner {
        flex-direction: column;
        gap: 2.5rem;
    }
    .c-book-modal__image,
    .c-book-modal__content {
        width: 100%;
        transform: translateY(20px);
    }

    .c-book-modal__image img {
        aspect-ratio: 5 / 3; 
        object-position: center 10%; 
    }

    .c-book-modal__title {
        font-size: 2rem;
    }
    .c-book-modal__desc {
        font-size: 1.3rem;
    }
    .c-book-modal__image img.is-orimo-modal {
        object-position: center 20% !important; 
    }
}

