        /* モーダルの背景 */
            .gallery-modal {
                position: fixed;
                inset: 0;
                z-index: 1000;

                display: flex;
                align-items: center;
                justify-content: center;

                background: rgb(0 0 0 / 65%);
            }

            .gallery-modal[hidden] {
                display: none;
            }

            /* 画像の表示領域 */
            .gallery-viewport {
                width: min(80vw, 900px);
                height: 80vh;
                overflow: hidden;
            }
            .gallery-viewport {
                touch-action: pan-y;
            }

            .gallery-track {
                display: flex;
                height: 100%;
                transition: transform 0.3s ease;
            }

            .gallery-track img {
                flex: 0 0 100%;
                width: 100%;
                height: 100%;
                object-fit: contain;
            }

            /* 左右の移動ボタン */
            .gallery-prev,
            .gallery-next,
            .gallery-close {
                position: absolute;
                z-index: 1;
                color: white;
                background: transparent;
                border: none;
                cursor: pointer;
                font-size: 2rem;
            }

            .gallery-prev {
                left: 2vw;
            }

            .gallery-next {
                right: 2vw;
            }

            .gallery-close {
                top: 16px;
                right: 24px;
                font-size: 2.5rem;
            }

            #open-gallery {
                position: relative;
                display: inline-block;
                font-size: 1rem;
                padding: 0.5em 1em;
                text-decoration: none;
                background: #f7f7f7;
                border-left: solid 6px #ff7c5c;
                color: #ff7c5c;/*文字色*/
                font-weight: bold;
            }
            #open-gallery:hover {
                box-shadow: inset 0 0 2px rgba(128, 128, 128, 0.1);
                transform: translateY(2px);
            }

            /* ボタンと吹き出しをまとめて画面左下に固定 */
            .gallery-launcher {
                position: fixed;
                left: 20px;
                bottom: 20px;
                z-index: 900;

                display: flex;
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;

                width: min(280px, calc(100vw - 40px));
            }

            /* 説明用の吹き出し */
            .gallery-description {
                position: relative;
                box-sizing: border-box;
                width: 100%;
                padding: 12px 14px;

                color: #333;
                background: #fff;
                border: 1px solid #ddd;
                border-radius: 12px;
                box-shadow: 0 2px 10px rgb(0 0 0 / 30%);

                font-size: 14px;
                font-weight: bold;
                line-height: 1.6;
                overflow-wrap: anywhere;
            }

            /* 吹き出しの下側に付ける三角形 */
            .gallery-description::after {
                content: "";
                position: absolute;
                left: 22px;
                bottom: -9px;

                width: 16px;
                height: 16px;

                background: #fff;
                border-right: 1px solid #ddd;
                border-bottom: 1px solid #ddd;
                transform: rotate(45deg);
            }

            /*吹き出しを閉じるボタン*/
            .gallery-description-close {
              position: absolute;
              top: 0;
              right: 0;
              transform: translate(50%, -50%);

              width: 36px;
              height: 36px;
              padding: 0;

              border: 1px solid #ddd;
              border-radius: 50%;

              background: #fff;
              color: #333;

              font-size: 26px;
              line-height: 1;
              cursor: pointer;

              display: grid;
              place-items: center;

              z-index: 10;
            }

            .gallery-description-close:hover {
              background: #f0f0f0;
            }

            .gallery-description[hidden] {
              display: none;
            }

            /* ギャラリー起動ボタン */
            .gallery-launch-button {
                position: relative;
                z-index: 1;

                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: 8px;

                max-width: 100%;
                padding: 12px 18px;

                color: #fff;
                border: none;
                border-radius: 999px;
                box-shadow: 0 3px 8px rgb(0 0 0 / 50%);

                font: inherit;
                font-size: 15px;
                font-family: Arial, Helvetica, sans-serif;
                cursor: pointer;

                transition: background-color 0.2s ease;
            }

            .gallery-launch-button:hover {
                background: #555;
            }

            .gallery-launch-button:focus-visible {
                outline: 3px solid #6aa9ff;
                outline-offset: 3px;
            }


            /* スクロールに応じたフェード効果 */
            .gallery-description {
            transition: opacity 0.3s ease, visibility 0.3s ease;
            }

            /* PC：下スクロール時は吹き出しだけ非表示 */
            body.gallery-scroll-down .gallery-description {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            }

            /* 760px以下：起動ボタンも非表示 */
            @media screen and (max-width: 760px) {

            #open-gallery {
                transition: opacity 0.3s ease, visibility 0.3s ease;
            }

            body.gallery-scroll-down #open-gallery {
                opacity: 0;
                visibility: hidden;
                pointer-events: none;
            }

            }

            /* スマートフォン向け */
            @media (max-width: 480px) {
            .gallery-launcher {
                left: 12px;
                bottom: 12px;
                width: min(240px, calc(100vw - 24px));
                gap: 8px;
            }

            .gallery-description {
                padding: 10px 12px;
                font-size: 13px;
            }

            .gallery-launch-button {
                padding: 10px 15px;
                font-size: 14px;
            }
            }

            /* 動きを減らす設定を尊重 */
            @media (prefers-reduced-motion: reduce) {
            .gallery-launch-button {
                transition: none;
            }
            }
        