    /* --- グリッドコンテナ (5x5) --- */
    .grid-container {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      grid-template-rows: repeat(5, 1fr);
      gap: 0;
      width: 100%;
      aspect-ratio: 2276 / 2010;
    }
    .grid-item {
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 1.2rem;
      font-weight: bold;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
      transition: opacity 0.2s;
    }
    .grid-item:hover {
      opacity: 0.8;
    }
    /* --- モーダルオーバーレイ --- */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.85);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.5s ease, visibility 0.5s ease;
    }
    .modal-overlay.active {
      opacity: 1;
      visibility: visible;
    }
    /* --- モーダルラッパー --- */
    .modal-wrapper {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      opacity: 0;
      transition: opacity 0.5s ease;
    }
    .modal-overlay.active .modal-wrapper {
      opacity: 1;
    }
    /* --- モーダル本体 --- */
    .modal-window {
      background-color: #fff;
      position: relative;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      touch-action: pan-y;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
      overflow: hidden;
    }
    /* 横スクロール対応のコンテンツ表示エリア */
    .modal-content {
      width: 100%;
      height: 100%;
      display: flex;
      overflow-x: auto;
      scrollbar-width: none; /* Firefox */
      -ms-overflow-style: none; /* IE/Edge */
    }
    .modal-content::-webkit-scrollbar {
      display: none; /* Chrome/Safari */
    }
    /* 各コンテンツdivのスタイル設定 */
    .detail-content {
      flex: 0 0 100%;
      width: 100%;
      height: 100%;
      padding: 0;
      overflow-y: auto;
      text-align: center;
      box-sizing: border-box;
      position: relative;
      line-height: 0;
    }
    /* --- PC設定 (min-width: 769px) --- */
    @media (min-width: 769px) {
      .modal-wrapper {
        width: 70%;
        max-width: 1400px;
      }
      .modal-window {
        width: 100%;
        aspect-ratio: 3 / 2;
        -webkit-user-select: none;
      }
      /* PC: 右上内側の閉じるボタン */
      .modal-close-pc {
        background: url("../images/btn_close.png") no-repeat center;
        background-size: contain;
        width: 7%;
        max-width: 70px;
        aspect-ratio: 1 / 1;
        position: absolute;
        top: 0;
        right: 0;
        border: none;
        color: #f00;
        cursor: pointer;
        z-index: 10;
        line-height: 1;
      }
      /* PC: 小窓の外側に配置する左右矢印ボタン */
      .nav-btn-pc {
        width: 10%;
        max-width: 80px;
        aspect-ratio: 1 / 1.9;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #f00;
        font-size: 48px;
        font-weight: bold;
        cursor: pointer;
        padding: 10px;
        z-index: 10;
        user-select: none;
      }
      .nav-btn-pc.prev {
        background: url("../images/btn_left.png") no-repeat center;
        background-size: contain;
        right: 100%;
        margin-right: 30px;
      }
      .nav-btn-pc.next {
        background: url("../images/btn_right.png") no-repeat center;
        background-size: contain;
        left: 100%;
        margin-left: 30px;
      }
      .sp-controls {
        display: none;
      }
    }
    /* --- スマホ・タブレット設定 (max-width: 768px) --- */
    @media (max-width: 768px) {
      .modal-wrapper {
        width: 100%;
        flex-direction: column;
      }
      .modal-window {
        width: 100%;
        aspect-ratio: 1 / 1.35;
        user-select: none;
        -webkit-user-select: none;
      }
      .modal-close-pc, .nav-btn-pc {
        display: none;
      }
      /* スマホ: 小窓の「下」に配置するコントロールエリア */
      .sp-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 35px;
        margin-top: 20px;
      }
      .sp-btn {
        border: none;
        cursor: pointer;
        padding: 5px 20px;
        line-height: 1;
        user-select: none;
      }
      
      #prevBtnSp{
        background: url("../images/btn_left.png") no-repeat center;
        background-size: contain;
        width: 50px;
        height: 50px;
      }
      
      #closeBtnSp{
        background: url("../images/btn_close.png") no-repeat center;
        background-size: contain;
        width: 50px;
        height: 50px;
      }
      
      #nextBtnSp{
        background: url("../images/btn_right.png") no-repeat center;
        background-size: contain;
        width: 50px;
        height: 50px;
      }
      
    }