.entry-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;                /* 初期は非表示 */
    place-items: center;          /* 中央寄せ（is-open時に有効） */
  }
  .entry-modal.is-open {
    display: grid;
  }
  .entry-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7); /* 黒の透過（お好みで調整） */
  }
  .entry-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(90vmin, 640px);    /* 画面に収まる最大サイズ */
    aspect-ratio: 1 / 1;          /* 正方形 */
    /* 角丸が不要なら下の行は削除 */
    border-radius: 8px;
    overflow: hidden;
  }
  .entry-modal__img {
    width: 100%;
    height: 100%;
    object-fit: cover;            /* 画像が正方形にフィット */
    display: block;
  }
  .entry-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    line-height: 1;
    font-size: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
  }
  /* 背後のスクロール抑止用クラス */
  .no-scroll {
    overflow: hidden;
    touch-action: none;
  }