/**
 * m4.html ページの stylesheet を定義します。
 */
    /* メインコンテンツの非表示（スプラッシュ終了後に表示） */
    #main-content {
        text-align: center;
        font-size: 2rem;
    }
  
    body {
        margin: 0;
        padding: 0;
        font-family: 'Arial', sans-serif;
        /* overflow: hidden; */
    }

    .site_logo {
        height: 50%;
    }
    
    
    header {
        /* height: 56px; */
        background: #fff;
        display: flex;
        display: -webkit-flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-evenly;
        .site_logo {
            height: 24px;
        }
        .header_row_top {
            width: 100%;
            padding: 8px 11px;
            display: flex;
            justify-content: flex-end !important;
            background: #005F2F;
            font-size: 12px;
            box-sizing: border-box;
            a {
                color: #fff;
            }
        }
        .header_row_bottom {
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 11px 12px 15px;
            font-size: 10px;
            width: 100%;
            box-sizing: border-box;
            a {
                color: #fff;
            }
        }
    }

    /* PCやタブレットの横向き（769px以上 or 横向き） */
    @media (max-width: 768px) and (max-aspect-ratio: 1/1) {
        .overlay_popup {
            width: 80% !important;
        }
    }
    
 
    section#m4 {
        /* height: calc(100vh - 228px); */
        box-sizing: border-box;
        text-align: center;
        position: relative;
        display: flex;
        display: -webkit-flex;
        flex-direction: column;
        align-items: center;
        overflow: hidden;

        .image-container-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center; /* 横方向中央揃え */
            overflow: visible;
        }

        .image-container {
            display: flex;
            display: -webkit-flex;
            flex-wrap: wrap; /* 横スクロール可能にする */
            justify-content: flex-start; /* 画像は左寄せ */
            align-items: center; /* 縦中央に配置 */ 
            max-width: 100%; /* 横幅を100%に */
            gap: 20px; /* 画像間の余白を広げる */
            height: auto; /* 高さを自動調整 */
            overflow-x: auto; /* 横スクロール可能にする */
            overflow-y: visible; /* 縦スクロールを無効化 */
            white-space: nowrap; /* 画像が改行されないように */
            scrollbar-width: none; /* スクロールバーを非表示に（Firefox用） */
            -ms-overflow-style: none; /* スクロールバーを非表示に（IE/Edge用） */
            scroll-snap-type: x mandatory; /* スナップスクロールを有効化 */
            padding: 30px 20px;
        }
        .image-container .image-container-item {
            width: calc(50% - (20px / 2));
        }
        .image-container::-webkit-scrollbar {
            display: none; /* スクロールバーを非表示に（Chrome/Safari用） */
        }
        
        .image-container img {
            width: 100%; /* 幅を自動調整 */
            height: auto; /* 高さを自動調整 */
            object-fit: contain; /* 画像の縦横比を維持して表示 */
            transition: transform 0.3s ease-in-out;
            scroll-snap-align: center; /* 画像が中央に来るようスナップ */
            flex: 0 0 auto; /* サイズを固定 */
            /* margin: 0 20px; */
            cursor: pointer;
        }
        
        .image-container img:hover {
            transform: rotate(5deg) scale(1.0); /* 画像を少し傾けて拡大 */
            position: relative; /* 追加 */
            z-index: 10; /* 追加 */
        }

        /* スクロール時に中央に行くにつれて徐々に大きくする */
        .image-container img {
            transition: transform 0.3s ease-in-out;
        }

        .image-container img.active {
            transform: scale(1.5); /* 完全に中央に来たときの最大サイズ */
        }
        /* .image-container img:first-of-type {
            margin-left: 150px !important;
        }
        .image-container img:last-of-type {
            margin-right: 150px !important;
        } */

        /* 左右の矢印を目立たせて縦中央に配置 */
        .scroll-icon {
            position: absolute;
            top: 50%;
            transform: translateY(-200%);
            width: 80px; /* アイコンサイズを大きく */
            height: 80px;
            background: rgba(0, 0, 0, 0.7); /* 背景を濃くして目立たせる */
            color: white;
            font-size: 36px; /* 矢印のサイズを大きく */
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            cursor: pointer;
            transition: background 0.3s ease-in-out, transform 0.2s ease-in-out;
            z-index: 100; /* 前面に配置 */
        }

        .scroll-icon:hover {
            background: rgba(0, 0, 0, 0.9);
            transform: translateY(-200%) scale(1.1); /* ホバー時に拡大 */
        }

        .scroll-left {
            left: 20px;
        }

        .scroll-right {
            right: 20px;
        }
        
        /* スマホの縦向き（768px以下 & 縦向き） */
        @media (max-width: 768px) and (max-aspect-ratio: 1/1) {
            .site_logo {
                height: 35% !important;
            }

            .image-container {
                height: calc(100% - 100px);
            }
            .frame {
                max-height: 100px;
                /* min-height: 100px !important; */
            }
            .frame_header {
                display: block;
            }
            .frame_header_mb {
                display: none;
            }
            .scroll-icon {
                width: 50px;
                height: 50px;
            }
        }

        /* PCやタブレットの横向き（769px以上 or 横向き） */
        @media (min-width: 769px), (min-aspect-ratio: 1/1) {
            .frame_header {
                display: block;
            }
            .frame_header_mb {
                display: none;
            }
        }
        
        .frame {
            width: 100%;
            min-height: 200px;
            background: yellow;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: center;
            padding: 20px 0;
            .frame_header {
                width: 75%;
                /* max-width: 800px; */
                margin: 50px auto 0;
                height: auto;
            }
            .frame_header_mb {
                width: auto;
                /* max-width: 680px; */
                margin: 0 auto;
                height: auto;
                max-width: 100%;
            }
            
        }
        .frame_body {
            position: relative;
            border: 4px solid #019e40ff;
            border-radius: 16px;
            width: calc(100% - 32px);
            max-width: 900px;
            margin: auto;
            background: #fff;
        }
        #q0 {
            display: block;
        }
        .frame_item {
            display: none;
            .right {
                display: flex;
                display: -webkit-flex;
                flex-direction: column;
                justify-content: space-between; /* 縦に等分配置 */
                .checkmark {
                    width: 30px;  /* 幅を大きくする */
                    height: 30px; /* 高さを大きくする */
                    display: inline-block;
                    border: 6px solid #333;  /* 枠線をさらに太くする */
                    border-radius: 5px;
                    position: relative;
                    background-color: white;
                    font-family: 'Architects Daughter', cursive; /* 手書き風フォント */
                    font-size: 32px; /* チェックマークのサイズを調整 */
                    text-align: center;
                    line-height: 36px; /* 中央に配置 */
                    transition: all 0.2s;
                }
                .checkmark:hover {
                    transform: scale(1.1);
                }
                
                .custom-checkbox {
                    cursor: pointer;
                    margin-right: 16px;
                    input[type="checkbox"] {
                        display: none;
                    }
                }
                .custom-checkbox input:checked + .checkmark::after {
                    content: "✓";
                    color: #333;
                    position: absolute;
                    left: -2px; /* 位置を調整 */
                    top: 0px;
                    font-size: 36px; /* チェックマークのサイズを合わせる */
                }
                
                img {
                    width: 50%;
                }
            }
  
            .frame_item_header {
                width: 40%;
                margin-top: 16px;
                min-width: 280px;
                z-index: 200;
                display: inline-block;
            }
            .frame_item_header.question {
                width: 10% !important;
            }
            .frame_item_header.answer {
                width: 15% !important;
                min-width: 480px;
            }
            .frame_item_subtitle {
                font-size: 40px;
                font-weight: bold;
                margin-top: 8px;
            }
            .frame_item_start, .frame_item_select {
                background: #00A95F;
                font-size: 40px;
                font-weight: bold;
                border-radius: 32px;
                padding: 0px 32px;
                cursor: pointer;
                -webkit-text-stroke: 3px #000;
                color: #fff;
                box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8); /* 影を追加 */
                margin-top: 24px;
                margin-bottom: 32px;
            }
            .frame_item_select:hover {
                transform: scale(1.1);
            }
            .frame_item_start:hover {
                transform: scale(1.1);
            }
            .red {
                color: red;
            }
            span {
                vertical-align: bottom;
            }
            .frame_item_title-ok {
                font-size: 80px;
                font-weight: bold;
                padding-top: 40px;
                color: red; /* 文字色 */
                text-shadow:
                    -2px -2px 0 #fff, 
                    2px -2px 0 #fff, 
                    -2px 2px 0 #fff, 
                    2px 2px 0 #fff; /* 文字の周りに黒枠 */
            }
            .frame_item_title-ng {
                font-size: 80px;
                font-weight: bold;
                padding-top: 40px;
                color: #4d4398; /* 文字色 */
                text-shadow:
                    -2px -2px 0 #fff, 
                    2px -2px 0 #fff, 
                    -2px 2px 0 #fff, 
                    2px 2px 0 #fff; /* 文字の周りに黒枠 */
            }
        }
        .frame_item-ok {
            background: #F7C5DB;
        }
        .frame_item-ng {
            background: #CAE9FA;
        }
        .frame_item-result {
            img {
                width: 43%;
                margin: 0 auto 0px;
            }

            .frame_item_start {
                background: yellow;
                font-size: 30px;
                font-weight: bold;
                border-radius: 32px;
                padding: 0px 32px;
                cursor: pointer;
                -webkit-text-stroke: 1px #000;
                color: #fff;
                box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8); /* 影を追加 */
                margin-top: 24px;
                margin-bottom: 32px;
            }

            #m2r1 {
                font-size: 80px;
                font-weight: bold;
                padding-top: 40px;
                color: rgb(255, 0, 93); /* 文字色 */
                text-shadow:
                    -2px -2px 0 #000, 
                    2px -2px 0 #000, 
                    -2px 2px 0 #000, 
                    2px 2px 0 #000; /* 文字の周りに黒枠 */
            }
            #m2r2 {
                font-size: 80px;
                font-weight: bold;
                padding-top: 40px;
                color: rgb(255, 68, 0); /* 文字色 */
                text-shadow:
                    -2px -2px 0 #000, 
                    2px -2px 0 #000, 
                    -2px 2px 0 #000, 
                    2px 2px 0 #000; /* 文字の周りに黒枠 */
            }
            #m2r3 {
                font-size: 80px;
                font-weight: bold;
                padding-top: 40px;
                color: rgb(255, 123, 0); /* 文字色 */
                text-shadow:
                    -2px -2px 0 #000, 
                    2px -2px 0 #000, 
                    -2px 2px 0 #000, 
                    2px 2px 0 #000; /* 文字の周りに黒枠 */
            }
        }

        .virus {
            position: absolute;
            display: block;
            width: 100px; /* 画像サイズ */
            height: 100px;
            z-index: 100;
        }
    }

    footer {
        background: #005f2f;
        display: flex;
        display: -webkit-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        .copyright {
            color: #fff;
            font-size: 12px;
            line-height: 1.5;
        }
        .footer-links {
            display: flex;
            display: -webkit-flex;
            gap: 16px;
            justify-content: center;
            width: 90%;
            span {
                flex: 1;
                font-size: 12px;
                a { color: #fff; }
            }
        }
    }
     /* 画面幅が768px以下（スマホサイズ）のとき */
    @media (max-width: 768px) {
        footer {
            .copyright {
                font-size: 10px !important;
            }
            .footer-links {
                span {
                    font-size: 9px !important;
                }
            }
        }
    }

    .virus1 {
        top: -30px;
        left: -50px;
    }
    .virus2 {
        top: -100px;
        right: -50px;
    }
    .virus3 {
        bottom: -100px;
        right: 30px;
    }



    @keyframes vibration {
        0% { transform: translate(0, 0); }
        25% { transform: translate(-2px, 2px) rotate(-1deg); }
        50% { transform: translate(2px, -2px) rotate(1deg); }
        75% { transform: translate(-1px, -1px) rotate(-0.5deg); }
        100% { transform: translate(1px, 1px) rotate(0.5deg); }
    }

    /** 共通スタイル */
    .row {
        display: flex;
        display: -webkit-flex;
        justify-content: center;
    }
    
    .left, .right {
        width: 50%;
        padding: 20px;
        text-align: center;
    }
    
    .full {
        width: 100%;
        /* padding: 20px; */
        text-align: center;
        margin-top: 10px;
    }
    .overlay_backdrop {
        background: rgba(0, 0, 0, 0.7);
        width: 100vw;
        height: 100%;
        position: fixed;
        z-index: 101;
        top: 0;
        left: 0;
        display: none;
    }
    .overlay_popup {
        position: fixed;
        z-index: 102;
        top: 50%;
        left: 50%;
        background: #fff;
        transform: translate(-50%, -50%);
        border-radius: 8px;
        border: 6px solid #000;
        display: none;
        .overlay_header {
            margin: 0px 8px;
            text-align: right;
            .overlay_close {
                width: 50px;
                cursor: pointer;
            }
            .overlay_close:hover {
                transform: scale(1.1);
            }
        }
        .overlay_content {
            margin: 0px 16px 16px 16px;
            padding: 8px;
            img {
                width: 100%;
                border-radius: 8px;
                border: 4px solid #000;
            }
        }
    }

@media (min-width: 576px) {
    section#m4 .image-container .image-container-item {
        width: calc(20% - (20px * 4 / 5));
    }
}
@media (min-width: 768px) {
    /* section#m4 {
        height: calc(100vh - 167px);
    } */
    section#m4 .frame {
        background: yellow;
    }
    section#m4 .frame .frame_header {
        margin:0 auto;
    }
    section#m4 .image-container {
        gap: 20px 80PX;
    }
    section#m4 .image-container .image-container-item {
        width: calc(20% - (80px * 4 / 5));
    }
    .copyright br {
        display: none;
    }
    header .site_logo {
        height: 40px;
    }
    header .header_row_top {
        font-size: 18px;
    }
    .frame_header {
        width: auto;
        max-width: 800px;
        margin:200px auto 0;
    }
}
.nav_btn {
    top: 78px;
}
@media (min-width: 768px) {
  .nav_btn {
    top: 65px;
  }
  .frame {
    padding: 20px 0;
  }
}
.m4_frame {
    width: 80%;
    height: auto;
}
#story {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    z-index: 1000;
    text-align: right;
    img.overlay_story {
        min-width: 320px !important;
        width: 100%;
        max-width: 640px !important;
        height: auto;
    }
}
#story_backdrop {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.6);
    width: 100%;
    height: 100vh;
    z-index: 999;
    display: none;
}

.overlay_close {
    width: 50px;
    height: 59px;
    cursor: pointer;
}