    :root {
      --gap: 6px;             /* タイル間の隙間 */
      --band-bg: rgba(0, 0, 0, 0.35);
      --band-text: #fff;
      --band-padding-y: 10px;
    }

  body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP",
                 "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    background: #f7f7f7;
    color: #222;
  }

  /* ===== トップ画像のオーバーレイ文字（既存のまま） ===== */
  .overlay-container {
    position: relative;
    display: inline-block;
  }
  .overlay-container img {
    display: block;
    width: 95%;
    height: auto;
    margin: 0 auto;
  }
  .overlay-text {
    position: absolute;
    left: 50%;
    top: 10%;
    transform: translateX(-50%);
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.45);
    text-align: center;
    white-space: nowrap;
  }

  /* ===== レスポンシブ・ギャラリー ===== */
  .gallery {
    display: grid;
    /* 最小幅 180px を基準に、画面幅に応じて可変 */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--gap);
    align-items: stretch;
  }

  /* デスクトップでは 6 列固定（例：1024px以上） */
  @media (min-width: 1024px) {
    .gallery {
      grid-template-columns: repeat(6, 1fr);
    }
  }

  /* スマホでは 2 列固定（480px以下を想定） */
  @media (max-width: 480px) {
    .gallery {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  /* さらに極端に狭い端末では 1 列 */
  @media (max-width: 300px) {
    .gallery {
      grid-template-columns: 1fr;
    }
  }

  .tile {
    position: relative;
    aspect-ratio: 1 / 1;   /* 正方形タイル */
    width: 100%;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;     /* 画像をタイル内に自然にトリミング */
    object-position: center;
    display: block;
  }

  /* サムネイル中央帯のタイトル */
  .title-band {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--band-bg);
    color: var(--band-text);
    text-align: center;
    padding: var(--band-padding-y) 12px;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    white-space: normal;
    word-break: break-word;
  }
