      /* 初期状態では非表示（display: none;）。JSで flex に切り替わる */
      .modal-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 99999999;
        display: none; 
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: opacity 0.3s ease;
      }
      .modal-container.is-active {
        display: flex;
        opacity: 1;
        z-index: 99999999;
      }
      /* 背景の暗幕 */
      .modal-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(2px);
        z-index: 1;
        cursor: pointer; /* カーソルをポインターに変更 */
        pointer-events: auto; /* クリックイベントを確実に受け取る */
      }
      /* モーダル本体（上下左右10%余白＝最大幅・高さ80%） */
      .modal-dialog-box {
        position: relative;
        z-index: 2;
        width: 80vw;
        max-width: 800px;
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
        border: 1px dotted white;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        transform: translateY(20px) scale(0.95);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      }
      .modal-container.is-active .modal-dialog-box {
        transform: translateY(0) scale(1);
      }
      /* 右上の「×」ボタン */
      .modal-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 50%;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        color: #444;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        transition: background-color 0.2s, transform 0.1s;
      }
      .modal-close:hover {
        background-color: #f0f0f0;
        transform: scale(1.05);
      }
      .modal-header-img {
        width: 100%;
        flex-shrink: 0;
        background: #f8f9fa;
      }
      .modal-img {
        width: 100%;
        object-fit: cover;
        display: block;
      }
      .modal-body-content {
        padding: 20px 24px 0px;
        z-index: 100;
        overflow-y: auto;
        flex-grow: 1;
      }
      .modal-title {
        margin: 0 0 10px 0;
        line-height: 1.3;
        font-size: 1.3rem;
        color: #222222;
        font-weight: bold;
        text-align: center;
      }
      .modal-subtitle {
        margin: 0 0 10px 0;
        font-size: 1.0rem;
        color: white;
        background-color: #030303;
        padding: 5px 0;
        text-align: center;
        width: 50%;
        margin-left: 25%;
      }
      .modal-text {
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.6;
        color: #555555;
        text-align: center;
      }
      .modal-footer-action {
        padding: 16px 24px 24px;
        text-align: center;
        flex-shrink: 0;
      }
      .modal-btn {
        display: inline-block;
        width: 100%;
        max-width: 280px;
        padding: 12px 20px;
        background-color: #1D7E5C;
        color: #ffffff;
        font-weight: bold;
        font-size: 1rem;
        text-decoration: none;
        border-radius: 50px;
        box-shadow: 0 4px 12px rgba(27, 196, 134, 0.3);
        transition: background-color 0.2s, transform 0.1s;
      }
      .modal-btn:hover {
        background-color: #259b70;
        transform: translateY(-1px);
        color: #ffffff;
      }
      body.modal-open {
        overflow: hidden;
      }

@media screen and (max-width: 960px) {

      .modal-title {
        font-size: 0.8rem;
      }
      .modal-subtitle {
        font-size: 0.6rem;
      }
      .modal-text {
        font-size: 0.6rem;
      }
}

