@charset "utf-8";
body.open_popup {
    overflow: hidden;
}
.bg_onetime_popup {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;

    /* 追加：フレックスボックスで子要素を中央に配置 */
    display: flex;
    justify-content: center; /* 左右の中央 */
    align-items: flex-start;  /* 上端から配置（スクロール用） */
    overflow-y: auto;         /* 縦スクロールを有効にする */
    padding: 40px 20px;       /* 上下の余白 */
}
body.open_popup .bg_onetime_popup {
    opacity: 1;
    visibility: visible;
}
.onetime_popup {
 position: relative;
    left: auto;
    transform: none;
    
    /* 修正ポイント：幅の指定を柔軟にする */
    width: 90%;          /* 基本は画面幅の90%（スマホ用） */
    max-width: 800px;    /* 大きくなりすぎない上限（パソコン用） */
    
    background-color: #fff;
    margin: 0 auto;
}
/* パソコンなどの大きな画面（幅600px以上）の時だけの追加ルール */
@media (min-width: 600px) {
    .onetime_popup {
        width: 50%;      /* パソコンでは50%にする */
        min-width: 500px; /* パソコンでは以前のように500px以上を維持 */
    }
}
.onetime_popup_title {
    position: relative;
    padding: 15px 50px 15px 15px;
    margin: 0px;
    background-color: #8B2F00;
    color: #fff;
    font-size: 18px;
   text-align: left;
    line-height: 1.5;
}
.onetime_popup p {
    font-size: 24px;
    line-height: 1.6;
}

.onetime_popup_title_close {
   position: absolute;
    /* 修正：右端からの位置と、サイズを微調整 */
    top: 50%;
    right: 10px;        /* 右端に寄せる */
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
}
@media (min-width: 600px) {
    .onetime_popup_title {
        font-size: 24px;
        text-align: center;
        padding: 10px 60px; /* PCでも左右に余裕を持たせる */
    }
}
.onetime_popup_title_close::before,
.onetime_popup_title_close::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 100%;
    height: 4px;
    background-color: #fff;
    content: "";
}
.onetime_popup_title_close::before {
    transform: translateX(-50%) translateY(-50%) rotate(45deg);
}
.onetime_popup_title_close::after {
    transform: translateX(-50%) translateY(-50%) rotate(-45deg);
}

.onetime_popup_content {
    padding: 60px 30px;
    text-align: center;
}


