/* ==================================================
   モーダル表示中のスクロールロック
================================================== */
body.is-modal-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
}
/* ==================================================
   モーダル
================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999999999999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
/* --------------------------
   モーダル本体
-------------------------- */
.modal-content {
    background: #fff;
    max-width: 1000px;
    padding: 30px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.modal.is-open .modal-content {
    transform: translateY(0);
}
/* --------------------------
   中身レイアウト
-------------------------- */
.modal-inner {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: center;
    /* 重心を中央に */
}
/* 左：写真 */
.modal-image img {
    width: 100%;
    height: auto;
    display: block;
}
/* --------------------------
   右：テキスト
-------------------------- */
.modal-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* ★ タイトル＋本文をまとめて中央 */
}
/* タイトル：高さは成り行き */
.modal-text h2 {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 24px;
    letter-spacing: 0.2em;
    padding-right: 0.12em;
}
/* 本文：書き出し基準を固定 */
.modal-text p {
    font-size: 0.8rem;
    line-height: 1.8;
    margin: 0;
}
/* --------------------------
   閉じるボタン
-------------------------- */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
}
.modal-close::before,
.modal-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 2px;
    background: #333;
}
.modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.modal-trigger,
.modal-close,
.modal-overlay {
    cursor: pointer;
}
/* --------------------------
   モーダル：レスポンシブ
-------------------------- */
@media (max-width: 768px) {
    .modal-inner {
        grid-template-columns: 1fr;
    }
    .modal-content {
        padding: 0;
        margin: 30px;
    }
    .modal-text {
        margin: 20px;
        justify-content: flex-start;
        /* SPは自然流し */
    }
    /* タイトル：高さは成り行き */
    .modal-text h2 {
        font-size: 1.3rem;
    }
    /* 本文：書き出し基準を固定 */
    .modal-text p {
        font-size: 1rem;
    }
}
/* ==================================================
   体験一覧（スクショの形）
================================================== */
.experience-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 80px 60px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.experience-item {
    cursor: pointer;
}
/* --------------------------
   写真
-------------------------- */
.experience-photo {
    overflow: hidden;
}
.experience-photo img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1);
    transition: transform 0.8s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
}
.experience-item:hover .experience-photo img {
    transform: scale(1.06);
}
/* --------------------------
   テキスト＋矢印
-------------------------- */
.experience-text {
    display: flex;
    align-items: flex-start;
    margin-top: 16px;
}
.experience-title {
    line-height: 1.8;
}
/* 矢印：常時表示 */
.experience-arrow {
    margin-left: auto;
    width: 30px;
    opacity: 1;
    transform: translateY(5px);
}
.experience-arrow img {
    width: 100%;
    height: auto;
    display: block;
}
/* hover：一度消えて左から戻る */
.experience-item:hover .experience-arrow {
    animation: arrowReplay 0.6s cubic-bezier(.22, 1, .36, 1);
}
@keyframes arrowReplay {
    0% {
        opacity: 1;
        transform: translate(0, 5px);
    }
    30% {
        opacity: 0;
        transform: translate(0, 5px);
    }
    60% {
        opacity: 0;
        transform: translate(-10px, 5px);
    }
    100% {
        opacity: 1;
        transform: translate(0, 5px);
    }
}
/* --------------------------
   一覧：レスポンシブ
-------------------------- */
@media (max-width: 900px) {
    .experience-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 25px;
        font-size: 0.9rem;
    }
    .experience-arrow {
        width: 20px;
    }
    .experience-title {
        line-height: 1.4;
    }
    .modal-close {
        top: -35px;
        right: -35px;
    }
    .modal-inner {
        gap: 0px;
    }
    .modal-close::before,
    .modal-close::after {
        height: 1px;
    }
    .modal-close::before, .modal-close::after {
        background: #ffffff;
    }
}
@media (max-width: 768px) {
    .modal-content {
        padding: 0;
        margin: 30px;
        max-height: calc(100svh - 60px);/ overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    .modal {
        overflow: hidden;
    }
    .modal-inner {
        grid-template-columns: 1fr;
    }
    .modal-text {
        margin: 20px;
        justify-content: flex-start;
    }
    .modal-content {
        display: flex;
        flex-direction: column;
    }
    .modal-inner {
        display: flex;
        flex-direction: column;
        min-height: 0;
        /* ★重要 */
        flex: 1;
    }
    .modal-image {
        flex: 0 0 auto;
        /* 画像は固定 */
    }
    .modal-text {
        display: flex;
        flex-direction: column;
        min-height: 0;
        /* ★重要 */
        flex: 1;
    }
    /* ★ここだけがスクロールする */
    .modal-text p {
        flex: 1;
        min-height: 0;
        /* ★必須 */
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
}