:root {
    --color-top: #B72222;
    --color-primary-text: #D12424;
    --header-height: 72px;
    --inner-margin: 1.6rem;
    --inner-padding: 1.6rem;
    --font-size_top-title: 1.6rem;
    --font-size_top-text: 1.2rem;
    --font-size_top-subtext: 1.1rem;
    --box-border: 0.45rem;
}


/* リセットの追加 */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 基本的なリセット */
body, h1, h2, h3, p, button, input, textarea {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans JP', sans-serif;
}

html {
    height: 100dvh;
    touch-action: manipulation;
    overscroll-behavior-y: none;
}

body {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding-top: 0;
    height: 100dvh;
}

/* ヘッダーとフッター */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: white;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;

    div{
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        padding: 8px;
    }
}

.footer {
    width: 100%;
    height: 60px;
    background-color: #f0f0f0;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* コンテンツコンテナ */
.container {
    max-width: 100%; /* デフォルトで100% */
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ボタン 
button {
    cursor: pointer;
    padding: 0.8rem 1.5rem;
    margin: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    font-size: 1rem;
}

button:hover {
    background-color: #f5f5f5;
}
*/

.button__margin-top{
    margin-top: var(--inner-margin);
}

/* top */
.page-top{
    h1, h2{
        line-height: 0;
    }

    img{
        width: 100%;
        height: auto;
    }

    
    .top__kv{
        div{
            line-height: 0;
        }
        button{
            border: none;
        }
    }

    .top__cp{
        background-image: url("../images/top_cp_bg.png");
        padding: var(--inner-margin);

        button {
            line-height: 0;
            outline: none;
            border: none;
            background-color: transparent;
        }

        button:hover {
        }
    }

    .top__terms{
        background-color: var(--color-top);
        padding: var(--inner-padding);

        .top__terms--title{
            padding: 0 2.6rem 2rem 2.6rem;
        }

        .top__terms--trophy{
            padding: 2rem 0;
        }

        .top__terms--terms{
            padding-top: 2rem;

            .term__wrap {
                background-color: #FFFFFF;
                width: 100%;
                aspect-ratio: 1;
                padding: 1rem;
                border: 0.45rem solid #FFDBDB;
                border-radius: 1.6rem;
            }

            .term__inner {
                white-space: pre-wrap;
                font-size: clamp(10px, 2.8cqw, var(--font-size_top-subtext));
                text-align: left;
                height: 100%;
                padding-right: 1rem;
                scrollbar-width: none;  /* Firefox */
                -ms-overflow-style: none; /* IE and Edge */
            }

            /* Webkit系ブラウザのネイティブスクロールバーを非表示 */
            .term__inner::-webkit-scrollbar {
                display: none;
            }

            /* スクロールバーの動く部分の設定 */
            .term__inner::-webkit-scrollbar-thumb {
                background-color: var(--color-top);
                border-radius: 10px;
            }

            /* SimpleBarのスクロールバーの背景 */
            .simplebar-track.simplebar-vertical {
                background-color: #F2F2F2;
                width: clamp(10px, 2.8cqw, 15px);
                border-radius: 10px;
            }

            /* SimpleBarのスクロールバーのつまみ */
            .simplebar-scrollbar:before {
                background-color: var(--color-top); /* 赤色 */
                border-radius: 10px;
                width: 100%;
                height: 100%;
                left: 0;
                top: 0;
                opacity: 1 !important;
            }

            .simplebar-content-wrapper {
                overscroll-behavior: none;
            }
        }

    }

    .top__start{
        background-color: #DAF6F7;
        padding: var(--inner-padding);

        .top__start-text{
            text-align: left;
            font-size: clamp(10px, 3cqw, var(--font-size_top-text));
        }
        
        .top__start-checkbox{
            display: flex;
            label{
                display: flex;
                align-items: center;
                padding: 0.4rem;
            }

            a{
                color: var(--color-top);
            }

            input[type="checkbox"] {
                appearance: none;
                -webkit-appearance: none;
                
                width: 1.4rem;
                height: 1.4rem;
                border: 2.6px solid var(--color-top);
                border-radius: 6px;
                background-color: white;
                cursor: pointer;
                vertical-align: middle;
                
                display: inline-grid;
                place-content: center;
            }

            input[type="checkbox"]:checked {
                background-color: var(--color-top);
            }

            input[type="checkbox"]:checked::before {
                content: "";
                width: 10px;
                height: 5px;
                border-left: 2px solid white;
                border-bottom: 2px solid white;
                transform: rotate(-45deg);
                margin-bottom: 2px;
            }
            
            div
            {
                display: flex;
                align-items: center;
                padding: 0.4rem;
            }            

        }

        button{
            padding-block: 0;
            padding-inline: 0;
            border-width: 0;
            background: none;
            position: relative;

            .start__active{
                position: absolute;
                width: 100%;
                height: 100%;
                top: 0; left: 0;
                z-index: 10;
                clip-path: inset(0% 0% 15% 0%);

                .start__active--cap{
                    position: absolute;
                    height: 100%;
                    width: auto;
                    right: 8%;
                    bottom: -100%;
                    transition: bottom 0.45s cubic-bezier(0.5, 0.885, 0.1, 1.3);
                }

                .start__active--cap.is-active {
                    bottom: -20%; /* 枠のラインまで上げる */
                }

                .start__active--star{
                    position: absolute;
                    height: 80%;
                    width: auto;
                    left: 6%;
                    bottom: -100%;
                    transition: bottom 0.25s;
                }

                .start__active--star.is-active {
                    bottom: 13%; /* 枠のラインまで上げる */
                }
            }
        }
    }

    .top__notice{
        background-color: #DAF6F7;
        padding: var(--inner-padding);

        .top__notice--info{
            margin: 0 0 2rem 0;

            .info__wrap {
                background-color: #FFFFFF;
                width: 100%;
                border-radius: 1.6rem;
                overflow: hidden;
            }

            .info__title {
                width: 100%;
                height: 30%;
                background-color: #FEED82;
                padding: 1rem;
                text-align: center;
                p{
                    font-size: clamp(10px, 5cqw, var(--font-size_top-title));
                    font-weight: 800;
                    color: var(--color-top);
                }
            }

            .info__text{
                padding: 1.6rem;
                p{
                    text-align: left;
                    font-size: clamp(10px, 3cqw, var(--font-size_top-text));
                }
            }

            .recommend__text-main{
                p{
                    text-align: center;
                    font-size: clamp(10px, 3cqw, var(--font-size_top-text));
                }
            }

            .recommend__text-sub{
                p{
                    text-align: left;
                    font-size: clamp(10px, 2.8cqw, var(--font-size_top-subtext));
                }
            }
        }
    }
}

/* camera */
.page-camera{
    h1, h2{
        line-height: 0;
    }

    img{
        width: 100%;
        height: auto;
    }

    .container__header{
        position: relative;

        .container__header--logo{
            position: absolute;
            width: auto;
            height: 100%;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 8px;
        }
    }

    .camera__wrapper{
        flex-grow: 1;
        overflow: hidden;
    }

    .camera__block{
        height: 100%;
        background-color: #DAF6F7;
        background-image: url('../images/bg_pattern.png');
        padding: var(--inner-padding);

        button{
            padding-block: 0;
            padding-inline: 0;
            border-width: 0;
        }

        .camera__confirm{
            background-color: #FFFDEA;
            border: 8px solid #AAD4D5;
            border-radius: 1.6rem;
            padding: 2rem;

            .camera__confirm--title{
                width: 50%;
                margin: 0 auto 2rem auto;
            }

            .camera__confirm--text-02{
                width: 80%;
                margin-top: var(--inner-margin);
                margin-inline: auto;
            }

            .camera__confirm--kotsu{
                padding: var(--inner-margin) 0;
            }
        }

        .camera__confirm--button{
            display: flex;
            justify-content: space-between;
            gap: 1rem;
        }
    }

    .camera__video {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        overflow: hidden;

        .camera__video-area {
            flex-grow: 1;
            position: relative;
            display: flex;
            background-color: #000;
        }
        .camera__video-canvas {
            width: 100%;
            height: 100%;
            position: relative;
        }
        .camera__video-preview, .camera__video-guide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
        .camera__video-preview {
            z-index: 1;
            object-fit: cover;
        }
        .camera__video-guide {
            z-index: 2;
            object-fit: contain;
            padding-top: 10%;
        }
        .camera__video-button-photo {
            position: absolute;
            bottom: 0px;
            left: 0;
            right: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            z-index: 10;
            padding: 2rem;
        }

        .camera-placeholder-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #fff;
            font-size: 1.2em;
            z-index: 3; /* ガイドよりも手前に表示 */
            white-space: nowrap; /* テキストの折り返しを防ぐ */
        }

        .camera__video-preview.mirrored-video {
            transform: scaleX(-1);
        }
    }

    .camera__preview{

        flex-grow: 1;
        overflow: hidden;

        .camera__preview-area{
            height: 100%;
            background-color: #DAF6F7;
            padding: var(--inner-padding);
            background-image: url(../images/camera_preview_bg.png);
        }

        .camera__confirm_text{
            width: 70%;
            margin: 2rem;
        }



        .preview-placeholder {
            padding: 2rem 2rem 4rem 2rem;
            background-color: white;
            margin: 1rem;
            position: relative;

            .preview__star01{
                position: absolute;
                top: -28%;
                right: -10%;
                width: 23%;
            }

            .preview__star02{
                position: absolute;
                left: -19%;
                width: 30%;
                bottom: 10%;
            }
        }
        
    }

    .camera__error--overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7); /* 半透明の黒背景 */
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        padding: var(--inner-padding);

        .camera__error--box {
            max-width: 640px; /* フォームオーバーレイに合わせる */
            width: 100%;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;

            padding: var(--inner-padding);
            border: var(--box-border) solid #AAD4D5; /* フォームオーバーレイに合わせる */
            border-radius: 1.6rem; /* フォームオーバーレイに合わせる */
            background-color: #FFFFFF; /* フォームオーバーレイに合わせる */

            h2{
                color: white; /* エラーメッセージが見えるように文字色を白に */
            }

            .camera__error--text{
                margin: 2rem;
                font-size: clamp(10px, 4cqw, 1.4rem);
            }

            .button-group{
                display: flex;
                flex-direction: column;
                gap: 1rem;
            }

            button{
                padding-block: 0;
                padding-inline: 0;
                border-width: 0;
                background-color: transparent; /* ボタンの背景を透明に */
            }
        }
    }

    button{
            padding-block: 0;
            padding-inline: 0;
            border-width: 0;
            background-color: transparent;
    }
}

body.camera-active {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

body.camera-active .page-camera {
    height: 100%;
}

/* form */
.page-form{
    h1, h2{
        line-height: 0;
    }

    img{
        width: 100%;
        height: auto;
    }

    button{
        background: none;
        border: 0;
        padding: 0;
        cursor:pointer;
        border-radius: 6px;
        overflow: hidden;
    }

    .container__header{
        position: relative;

        .container__header--logo{
            position: absolute;
            width: auto;
            height: 100%;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 8px;
        }
    }

    .form__block{
        background-color: #FFD7DB;
        background-image: url('../images/bg_pattern.png');
        padding: var(--inner-padding);
        flex-grow: 1; /* 親要素いっぱいに広げる */
        display: flex; /* 子要素をflex配置にする */
        flex-direction: column; /* 子要素を縦に並べる */
        overflow: auto; /* コンテンツがはみ出た場合にスクロール可能にする */
    }

    .form__wrapper{
        flex-grow: 1; /* .page-form の残りスペースを埋める */
        display: flex;
        flex-direction: column;
    }

    .form__area{
        background-color: #FFFDEA;
        border: 8px solid #C91B1B;
        border-radius: 1.6rem;
        padding: var(--inner-padding);
    }

    .form__text{
        width: 65%;
        margin: 1rem auto;
    }

    .form__text--input{
        width: 75%;
        margin: 1rem auto;
    }

    .form__edit {
        position: relative;
        max-width: 640px;
    }

    .form__preview{
        position: relative;
        overflow: hidden;
        width: 1000px; /* 固定幅 */
        height: 1600px; /* 固定高 */
        transform-origin: top left; /* スケール変換の基準点を左上に設定 */
        box-sizing: border-box; /* paddingとborderをwidth/heightに含める */

        .form__preview--bg{
            position: absolute;
            top: 0;
            left: 0; 
            width: 100%; 
            height: 100%; 
            z-index: 1; 
            background-size: cover;
            background-position: center;
        }
        
        .form__preview--preview{
            position: absolute;
            bottom: 56%;
            left: 0;
            width: 100%;
            height: auto;
            z-index: 2;
            transform-origin: center bottom;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
        }

        .form__preview--canvas{
            position: absolute;
            bottom: 68%;
            left: 0;
            width: 100%;
            height: auto;
            z-index: 2;
            transform-origin: center bottom;
            background-size: contain;
            background-position: center;
            background-repeat: no-repeat;
        }
        
        .form__preview--trophy{
            position: absolute;
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%; 
            z-index: 3; 
            background-size: cover;
            background-position: center;
        }


        .form__preview--bg--text{
            scale: 2.2;
        }
        
        .form__preview--trophy--text{
            scale: 2.2;
            translate: 0 -40%;
        }


        .form__preview--text-pre{
            position: absolute;
            bottom: 24%;
            top: 62%;
            left: 0;
            width: 100%;
            height: auto;
            z-index: 4;
            object-fit: cover;
            justify-self: anchor-center;
            container-type: inline-size;

            p{
                white-space: nowrap;
                overflow: hidden;
                height: 50%;
                display: flex;
                justify-content: center;
                align-items: center;
                font-size: 5cqw;
                font-weight: bolder;
            }
        }

        .form__preview--text{
            position: absolute;
            bottom: 19%;
            top: 73%;
            left: 50%;
            transform: translateX(-50%);
            width: 30%;
            height: auto;
            z-index: 4;
            object-fit: cover;
            container-type: inline-size;

            p{
                white-space: nowrap;
                overflow: hidden;
                height: 50%;
                display: flex;
                justify-content: center;
                align-items: center;
                font-size: 9cqw;
                font-weight: bolder;
            }
        }

        .form__preview--overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #EFDA77; /* 指定の色 */
            mix-blend-mode: overlay; /* 画像との合成モードをoverlayに変更 */
            pointer-events: none; /* 下の画像操作を妨げないように */
            z-index: 2; /* プレビュー画像の上に配置 */
            /* opacity はJSで制御される */
        }
    }

    .form__preview--control{
        border-radius: 0;
        clip-path: inset(0 0 65% round 1.6rem);
        margin-top: 5%;
        margin-bottom: -97%;
    }

    .form__preview--note{
        font-size: clamp(10px, 3cqw, var(--font-size_top-subtext));
        font-weight: bold;
        margin-bottom: var(--inner-margin);
    }

    .form__preview--control--text{
        border-radius: 0;
        clip-path: inset(55% 0 15% 0 round 1.6rem);
        margin-top: -85%;
        margin-bottom: -17%;
    }

    .form__select-unit{
        margin-top: 1.6rem;

        .selected-bg {
            outline: 4px solid #B72222;
            border-radius: 0.6rem;
        }
    }

    .form__select-tabs{
        display: flex;
        justify-content: space-around;
        margin: 1rem;
        height: clamp(30px, 8cqw, 2.6rem);

        
        .form__select-tab{
            width: 45%;
            font-size: clamp(10px, 4cqw, 1.2rem);
            font-weight: bold;
            color: #1516184b;
        }

        .form__select-tab.active {
            background-color: #FEED82;
            color: var(--color-primary-text);
        }
    }

    .form__select-items{
        display: flex;
        justify-content: space-around;

        .form__item-bg{
            width: 27%;
            position: relative; /* 追加 */
        }

        .form__item-style{
            width: 30%;
        }

        .selection-indicator { /* 追加 */
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: contain; /* 画像全体を収める */
            background-color: rgba(0, 0, 0, 0.3); /* 選択中であることを視覚的に強調 */
        }
    }

    .form__controls{
        z-index: 2;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1.6rem;
        margin-bottom: var(--inner-margin);

        .control-group{
            display: flex;
            justify-content: space-between;

            .control-text{
                width: 25%;
                display: flex;
                justify-content: center;
                align-items: center;
            }

            .control-items{
                width: 70%;
                gap: 8px;

                .control-position{
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    gap: 8px;

                    button{
                        width: 20%;
                        aspect-ratio: 1 / 1.1;
                    };
                }

                .control-slider{
                    display: flex;
                    justify-content: space-between;
                    align-items: center;

                    button{
                        width: 15%;
                        display: flex;
                        align-items: center;
                    };

                    input{
                        appearance: none;
                        accent-color: var(--color-primary-text);
                        width: 60%;
                        height: 0.4rem;
                        background: var(--color-primary-text);
                        border-radius: 1rem;
                    }
                }
            }
        }
    }

    /* フォーム */
    .form-group {
        margin-bottom: 1.5rem;
        text-align: left;

        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: bold;
        }

        input, textarea {
            width: 100%;
            padding: 0.8rem;
            border: 3px solid #000;
            border-radius: 30px;
            box-sizing: border-box; /* paddingを含めてwidth 100%にする */
            font-size: 16px; /* iOS Safariの自動拡大を抑制 */
        }

        input.error, textarea.error {
            border-color: var(--color-primary-text);
            background-color: #ffebeb;
        }

        input.error::placeholder, textarea.error::placeholder {
            color: var(--color-primary-text);
        }

        .form-group__prize{
            position: relative;

            .form-group__prize--text{
                position: absolute;
                right: 2rem;
                top: 25%;
            }
        }
    }

    .form__overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        padding: var(--inner-padding);

        .form__overlay--box{
            max-width: 640px;
            width: 100%; /* 親要素の幅に合わせて可変 */
            height: 100%; /* 親要素の高さに合わせて可変 */
            overflow-y: auto; /* コンテンツがはみ出た場合にスクロール可能にする */
            scrollbar-width: none; /* Firefox */
            &::-webkit-scrollbar {
                display: none; /* Chrome / Edge / Safari */
            }
            display: flex;
            flex-direction: column;
            
            padding: var(--inner-padding);
            border: var(--box-border) solid #AAD4D5;
            border-radius: 1.6rem;
            background-color: #FFFFFF;

            .form__overlay--preview{
                margin: 1rem auto;
                width: 100%;
                max-width: 500px;
            }

            .form__overlay--title{
                margin: 0 auto;
                max-width: 40%;
            }

            .form-overlay__button{
                padding-top: 0.8rem;
                display: flex;
                flex-direction: column;
                gap: 1rem;
            }
        }
    }
}

/* result */
.page-result{
    h1, h2{
        line-height: 0;
    }

    img{
        width: 100%;
        height: auto;
    }

    button{
        background: none;
        border: 2px solid transparent;
        padding: 0;
        cursor:pointer;
        border-radius: 4px;
        overflow: hidden;
    }

    .result__wrapper{
        flex-grow: 1; /* .page-form の残りスペースを埋める */
        display: flex;
        flex-direction: column;
        padding: var(--inner-padding);
        background-image: url(../images/result_bg.png);
        z-index: 0;

        .complete__title{
            position: relative;
            padding: 5%;
        }

        .result__animation--star{
            z-index: -1;
            position: absolute;
            opacity: 0;
            animation: fadeUp 2s ease-out forwards;
        }

        /* --- 2. 共通のアニメーション設定 --- */
        .star01 {
            right: -3%;
            top: -32%;
            width: 23%;
        }

        .star02{
            bottom: 10%;
            left: 0;
            width: 20%;
        }



    }

    .container__header{
        position: relative;

        .container__header--logo{
            position: absolute;
            width: auto;
            height: 100%;
            top: 50%;
            left: 20%;
            transform: translate(-50%, -50%);
            padding: 8px;
        }

        .result__manu--game{
            position: absolute;
            width: 40%;
            top: 25%;
            right: 2%;
        }
    }


    .result__block--complete{

        .complete__showcase{
            border: 0.45rem solid #FFFFFF;
            border-radius: 1.6rem;
        }

        .complete__text{
            color: var(--color-primary-text);
            font-weight: bold; 
            font-size: clamp(10px, 4cqw, var(--font-size_top-title));
        }

        .complete__btns{
            display: flex;
            align-items: stretch;
            gap: 1rem;
            margin: var(--inner-margin) 0;
            flex-flow: column;

            .complete__btns--x{
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 1rem;

                img{
                    flex-grow: 1;
                    min-width: 0;
                    height: 100%;
                    object-fit: cover;
                }
            }

            button{
                height: 90%;
                display: flex;
                align-items: center;  /* 垂直方向（上下）の中央寄せ */
                justify-content: center; /* 水平方向（左右）の中央寄せ */
                text-align: center;
                border: 0;
                border-radius: 0;
            }


        }

    }

    .result__block--game{
        position: relative;
        background-color: #FFFFFF;
        padding: var(--inner-padding);
        border: 0.45rem solid #0BB7BB;
        border-radius: 1.6rem;
        margin: var(--inner-margin) 0;

        button{
            border: 0;
            border-radius: 0;
            padding: 0;
            object-fit: contain
        }

        .game__life{
            width: 10%;
            margin: 4px;
        }

        .gameover{
            width: 50%;
            margin-inline: auto;
        }

        .game__btns{
            display: flex;
            flex-flow: column;
            align-items: center;

            .game__btn--jump{
                width: 25%;
            }
        }


    }

}


main {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
}

/* スピナー */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--color-top);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ローディングモーダル */
.modal {
    display: none; /* デフォルトで非表示 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 300px;
    text-align: center;
    border-radius: 10px;
}

/* htmx-indicator のデフォルトを非表示にする */
.htmx-indicator {
    display: none;
    opacity: 0;
    transition: opacity 200ms ease-in;
}

/* htmx リクエスト中に表示する */
.htmx-request .htmx-indicator {
    display: flex; /* Flexboxで中央寄せするため */
    opacity: 1;
}

/* その他の既存スタイル */
@media (min-width: 640px) {
    body {
        background-image: url('../images/pc_bg.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }

    .header {
        z-index: 1000; /* 背景画像の上に表示 */
    }

    .container {
        width: 640px; /* 最大幅を640pxに制限 */
        margin: 0 auto; /* 中央寄せ */
        background-color: rgba(255, 255, 255, 1.0); /* コンテンツの背景を半透明白に */
        box-shadow:
            -2px 0 10px -2px rgba(0, 0, 0, 0.5),  /* 左側の影 */
            2px 0 10px -2px rgba(0, 0, 0, 0.5);   /* 右側の影 */
    }
}

/* --- 3. アニメーションの内容（20px下から元の位置へ） --- */
@keyframes fadeUp {
0% {
    opacity: 0;
    transform: translateY(20px);
}
100% {
    opacity: 1;
    transform: translateY(0);
}
}