/* モーダル全体のスタイル */
.no-scroll {
    overflow: hidden; /* 縦横スクロールを無効化 */
    height: 100%; /* 高さを固定 */
    width: 100%; /* 幅を固定 */
    position: fixed; /* スクロールを完全に無効化 */
    top: 0; /* スクロール位置を固定 */
    left: 0; /* スクロール位置を固定 */
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* 背景を半透明に */
    display: flex; /* フレックスボックスを使用 */
    justify-content: center; /* 水平方向中央揃え */
    align-items: center; /* 垂直方向中央揃え */
    overflow: hidden; /* モーダル外のスクロールを無効化 */
    z-index: 1000; /* 他の要素より前面に表示 */
}

.swiper-red-note {
    font-weight: 100;
    font-size: 3.625vmin;
    padding: 0 10px;
    border: 1px solid #D71618;
    color: #D71618;
    background-color: #fff;
    border-radius: 7px;
    word-break: break-all;
    letter-spacing: 1px;
    text-align: left;
    margin: 0 2vw;
}

/* モーダルを表示する際のスタイル */
.modal.hidden {
    display: none;
}

/* モーダルの中身 */
.modal-content {
    background: transparent; /* 背景を透明にする（Swiperを目立たせる） */
    width: 100%;
    max-width: 500px; /* 最大幅を設定 */
    border-radius: 8px;
    display: flex;
    flex-direction: column; /* 縦方向に要素を配置 */
    justify-content: flex-start; /* 上方向に揃える */
    align-items: center; /* 水平方向に中央揃え */
    position: relative; /* クローズボタンの位置を制御 */
}

/* ヘッダーコンテンツ */
.modal-header {
    background-color: #EDD0B2; /* 背景色 */
    width: 100%; /* ヘッダーをコンテンツ幅いっぱいに */
    border-top-left-radius: 8px; /* 左上の角を丸くする */
    border-top-right-radius: 8px; /* 右上の角を丸くする */
    height: 19vw;
}

.header-contents {
    position: absolute;
    display: flex; /* フレックスボックスでレイアウト */
    align-items: center; /* 垂直中央揃え */
}

.header-title { 
    position: relative;
    left: -4vw;
    font-size: 4.25vw;
    padding-top: 2.5vw;
    color: #682D1E;
}

.header-icon {
    position: relative;
    padding-left: 12vw;
    height: 18vw;
    top: 1vw;
    right: 5vw;
}

/* メインコンテンツ */
.modal-main {
    background-color: #FCF6E7; /* 背景色 */
    width: 100%; /* メインコンテンツをコンテンツ幅いっぱいに */
    padding: 10px; /* 内側余白 */
    display: flex; /* フレックスボックスで内容を整列 */
    flex-direction: column; /* 縦方向に配置 */
    align-items: center; /* 水平方向に中央揃え */
    border-bottom-left-radius: 8px; /* 左下の角を丸くする */
    border-bottom-right-radius: 8px; /* 右下の角を丸くする */
}

.notice-box {
    border: 2px solid red; /* 赤枠 */
    border-radius: 10px; /* 丸みを付ける */
    background-color: #fff; /* 背景色 */
    padding: 10px; /* 内側余白 */
    color: #000; /* 文字色 */
    font-size: 14px; /* 文字サイズ */
    text-align: center; /* 中央揃え */
    margin-bottom: 20px; /* 下に余白を作る */
    width: 100%; /* 横幅いっぱいに */
    box-sizing: border-box; /* パディングを含めて幅を計算 */
    max-width: 460px; /* 最大幅を設定 */
}

/* Swiperコンテナ */
.swiper-container {
    width: 100%;
    height: 90vw;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 2vw;
}

.swiper-wrapper {
    /*margin-top: 2vw;*/
}

/* クローズボタン */
.modal-close {
    position: absolute;
    top: -2px;
    right: 1vw;
    background-color: #F57A08;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2000;
}

/* 2本の線で✖を作成 */
.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px; 
    height: 3px;
    background-color: white;
    transform-origin: center;
}

.modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Swiperスライド */
.swiper-slide {
    display: flex; /* Flexboxを使用 */
    justify-content: center; /* 水平方向中央揃え */
    align-items: center; /* 垂直方向中央揃え */
    font-size: 18px;
}

.swiper-container [class^="swiper-button-"] {
    top: 97%;
    bottom: -2vw;
    width: 120px;
    color: #DB3930;
    z-index: 2;
}

.swiper-container [class^="swiper-button-"]::after{
    font-size: 20px;
}

.swiper-how-to-use {
    width: 94%;
    position: relative;
}

.swiper-how-to-use img {
    width: 97%;
    height: auto;
}

.swiper-how-to-use .swiper-img-header {
    position: absolute;
    top: -6px;
    left: 2px;
    width: 21vw;
    transform: translate(-10px, -8%);
}

.swiper-how-to-use .swiper-img-content {
    padding: 0px 5px;
}

/* ページネーションのスタイル */
.swiper-container .swiper-pagination {
    z-index: 1;
    bottom: 0.65vmin !important;
    top: initial;
}

.swiper-container .swiper-pagination-bullet {
    background-color: #B4B4B4;
    width: 8px;
    height: 8px;
    opacity: 0.8;
    margin: 0 2vw !important;
}

.swiper-container .swiper-pagination-bullet-active {
    background-color: #DB3930;
}

.swiper-content-wrap {
    background: white;
    height: 76vmin;
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 30px;
}

.swiper-content-wrap img {
    display: block;
    margin-top: -20px;
    margin-bottom: -25px;
    margin-left: auto;
    margin-right: auto;
}

.swiper-content-wrap p {
    margin: 0;
    font-size: 3.625vmin;
    font-weight: 100;
    padding: 0 18px;
    text-align: left;
}

@supports (-webkit-touch-callout: none) {
    .modal-close {
        aspect-ratio: 1 / 1;
        line-height: 1;
        font-size: 20px !important;
        box-sizing: border-box;
        text-align: center;
        width: 52px !important;
        height: 52px !important;
        font-weight: bold;
    }

    .header-title {
        white-space: nowrap;
    }

    .header-icon {
        max-width: 100%;
        object-fit: contain;
    }
}