        /*ここに見た目(CSS)を書く*/
        body { 
            font-family: 'Zen Maru Gothic', sans-serif;
            line-height: 1.9;
            font-weight: 400;
            letter-spacing: 0.05em;
            background: linear-gradient(135deg, #fff5e6 0%, #ffebcc 100%);
            min-height: 100vh;
            margin: 0;
            padding: 20px;
            text-align: center;
        }

        h1, strong {
            font-weight: 700;
        }

        /*ギャラリーの並び方*/
        .gallery {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            padding: 20px;
            max-width: 1500px;
            margin: 0 auto; 
        }

        .gallery img {
            content-visibility: auto;
            aspect-ratio: 16/9;
            width: 100%; /*画像の幅*/
            height: 250px;
            object-fit: cover; /*画像の比率を保ちつつ枠に収める*/
            cursor: pointer;
            border-radius: 8px;
            transition: transform 0.3s;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1); /*影*/
        }

        .gallery img:hover {
            transform: scale(1.05); /*マウスを乗せると少し大きくなる*/
        }

        /*モーダルの背景*/
        .modal {
            display: none;  /*最初は非表示*/
            position: fixed;
            z-index: 1000;
            left: 0; top: 0;
            width: 100%; height: 100%;
            background-color: rgba(0,0,0,0.85); /*黒の半透明*/
            backdrop-filter: blur(5px); /*背景をぼかす*/
            animation: fadeIn 0.3s ease-out; /*アニメーション追加*/
        }

        @keyframes fadeIn{
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-container {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 90%;
            height: 90%;
            margin: auto;
            gap: 40px;
        }

        /*モーダルの中の画像*/
        .modal-content {
            max-width: 60%;
            max-height: 60vh;
            object-fit: contain;    /*画像をひずませずに枠に収める*/
        }

        /*説明文エリアの調整*/
        .modal-info {
            flex: 1;
            max-width: 80vh;
            text-align: left;
            color: white;
        }

        /*画面の横幅が768px以下（スマホ・タブレット）の時の設定*/
        @media (max-width: 768px) {

            .gallery{
                display: grid;
                /* 1列あたり最小200px、最大5つ並ぶように設定 */
                grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); 
                gap: 20px;
                padding: 20px;
                max-width: 1200px; /*画面が広すぎても間延びしないように制限*/
                margin: 0 auto; /*ギャラリー全体を中央寄せ*/
            }

            h1 {
                font-size: 1.5rem;
                margin: 20px 0;
            }

            .modal-container {
                flex-direction: column; /*縦並びに変更*/
                width: 95%;
                max-height: 90vh;
                overflow-y: auto;       /*全体をスクロール可能にする*/

                margin-top: 40px;   /*画像の一番上から少しスキマをつくる*/
                padding-top: 20px;  /*中の画像の上に少し余白をつくる*/
                border-radius: 15px;    /*角を丸くする*/
            }

            .mordal-content {
                max-width: 90%; 
                margin: 0 auto; 
            }

            .modal-info {
                padding: 15px;
                width: 100%; /*説明文を画面いっぱいに表示*/
            }

            .close {
                font-size: 40px;
                right: 15px;
                top: 5px;
            }
        }

        /*キャプション（説明文）*/
        #caption p {
            font-size: 0.95rem;
            color: #eee;
            padding: 20px;
            margin: 0 auto;
            width: 80%;
            max-width: 600px;

            /*★高さの設定*/
            max-height: 50vh;  /*長すぎる場合はここを上限にする*/
            overflow-y: auto;   /*溢れたらスクロール*/

            line-height: 1.6;   /*行間を広くして読みやすく*/
        }

        /*スクロールバーのデザイン変更*/
        #caption::-webkit-scrollbar {
            width: 6px;
        }

        #caption::-webkit-scrollbar-thumb {
            background-color: rgba(255, 144, 40, 0.705);
            border-radius: 10px;
        }

        /*閉じるボタン*/
        .close {
            position: absolute;
            top: 20px; right: 35px;
            color: #FFF;
            font-size: 40px;
            cursor: pointer;
        }

        #modal-link-container{
            display: flex;
            justify-content: center;
            width: 100%;
            margin-top: 20px;
        }

        .play-button {
            display: inline-block;
            padding: 15px 40px;
            font-size: 1.5rem;
            background-color: #FF9800;
            color: white;
            text-decoration: none;
            border-radius: 30px;
            font-weight: bold;
            box-shadow: 0.2px 10px rgba(255,152,0,0.3);
            transition: all 0.3s ease;
        }

        .play-button:hover{
            background-color: #E68A00;
            transform: scale(1.1);
            box-shadow: 0.3px 12px rgba(255,152,0,0.5);
        }