/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Nov 17 2026 | 06:19:40 */
/* ==========================================
   BLOGカテゴリー専用デザイン
   カテゴリースラッグ：blog
========================================== */


/* ==========================================
   記事タイトル
========================================== */

body.single-post:has(article.category-blog) .entry-title,
body.single-post:has(article.category-blog) .page-header_title {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;

  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.02em;
}


/* ==========================================
   投稿日・カテゴリー
========================================== */

body.single-post:has(article.category-blog) .entry-meta {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;

  font-size: 0.8rem;
  color: #777;
  letter-spacing: 0.08em;
}


/* ==========================================
   本文
========================================== */

body.single-post:has(article.category-blog) .entry-body {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}


body.single-post:has(article.category-blog) .entry-body p {
  margin-bottom: 2em;

  font-size: 1rem;
  line-height: 2;
}


/* ==========================================
   H2見出し
========================================== */

body.single-post:has(article.category-blog) .entry-body h2 {
  margin-top: 70px;
  margin-bottom: 30px;
  padding-bottom: 15px;

  border-bottom: 1px solid #ddd;

  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.5;
  font-weight: 600;
}


/* ==========================================
   アイキャッチ
========================================== */

body.single-post:has(article.category-blog) .post-thumbnail {
  max-width: 1100px;
  margin: 40px auto 70px;
}


body.single-post:has(article.category-blog) .post-thumbnail img {
  display: block;

  width: 100%;
  height: auto;
}


/* ==========================================
   BLOGギャラリー
   iPhone「写真」風モザイク
========================================== */

body.single-post:has(article.category-blog)
.wp-block-gallery {

  display: grid !important;

  /* 細かく6分割して自由に大小を付ける */
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;

  /* 写真の高さを構成する基本単位 */
  grid-auto-rows: 95px;

  /* 空いた場所へ写真を詰める */
  grid-auto-flow: dense;

  /* 写真アプリっぽく間隔をかなり狭く */
  gap: 5px !important;

  /* 本文より少し広く表示 */
  width: min(1100px, calc(100vw - 40px));
  max-width: none !important;

  position: relative;
  left: 50%;
  transform: translateX(-50%);

  margin-top: 45px !important;
  margin-bottom: 45px !important;
}


/* ==========================================
   すべての写真の基本サイズ
========================================== */

body.single-post:has(article.category-blog)
.wp-block-gallery
figure.wp-block-image {

  grid-column: span 2;
  grid-row: span 2;

  width: 100% !important;
  height: 100% !important;

  margin: 0 !important;

  overflow: hidden;

  border-radius: 3px;
}


/* ==========================================
   写真本体
========================================== */

body.single-post:has(article.category-blog)
.wp-block-gallery
figure.wp-block-image img {

  display: block;

  width: 100% !important;
  height: 100% !important;

  max-width: none !important;

  object-fit: cover !important;

  transition: transform 0.35s ease;
}


/* 軽いホバー */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure.wp-block-image:hover img {

  transform: scale(1.025);
}


/* リンク・ライトボックス */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure.wp-block-image > a {

  display: block;

  width: 100%;
  height: 100%;
}


/* ==========================================
   1〜20枚のモザイク配置
========================================== */


/* 1枚目：大 */
body.single-post:has(article.category-blog)
.wp-block-gallery:has(figure:nth-child(5))
figure:nth-child(1) {
  grid-column: span 4;
  grid-row: span 4;
}


/* 2・3枚目：小 */
body.single-post:has(article.category-blog)
.wp-block-gallery:has(figure:nth-child(5))
figure:nth-child(2),

body.single-post:has(article.category-blog)
.wp-block-gallery:has(figure:nth-child(5))
figure:nth-child(3) {
  grid-column: span 2;
  grid-row: span 2;
}


/* 4・5枚目：中 */
body.single-post:has(article.category-blog)
.wp-block-gallery:has(figure:nth-child(5))
figure:nth-child(4),

body.single-post:has(article.category-blog)
.wp-block-gallery:has(figure:nth-child(5))
figure:nth-child(5) {
  grid-column: span 3;
  grid-row: span 3;
}


/* 6〜8枚目：小 */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(6),

body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(7),

body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(8) {
  grid-column: span 2;
  grid-row: span 2;
}


/* 9枚目：横長大 */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(9) {
  grid-column: span 4;
  grid-row: span 3;
}


/* 10枚目：縦寄り */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(10) {
  grid-column: span 2;
  grid-row: span 3;
}


/* 11〜13枚目 */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(11),

body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(12),

body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(13) {
  grid-column: span 2;
  grid-row: span 2;
}


/* 14・15枚目：中 */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(14),

body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(15) {
  grid-column: span 3;
  grid-row: span 3;
}


/* 16〜18枚目 */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(16),

body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(17),

body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(18) {
  grid-column: span 2;
  grid-row: span 2;
}


/* 19枚目：横長大 */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(19) {
  grid-column: span 4;
  grid-row: span 3;
}


/* 20枚目 */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure:nth-child(20) {
  grid-column: span 2;
  grid-row: span 3;
}


/* ==========================================
   少ない枚数の場合
========================================== */


/* 1枚だけ */
body.single-post:has(article.category-blog)
.wp-block-gallery
figure:only-child {

  grid-column: 1 / -1;
  grid-row: span 5;
}


/* 2枚だけ */
body.single-post:has(article.category-blog)
.wp-block-gallery:not(:has(figure:nth-child(3)))
figure {

  grid-column: span 3;
  grid-row: span 4;
}


/* 3枚だけ：上段1枚、下段2枚 */
body.single-post:has(article.category-blog)
.wp-block-gallery:has(figure:nth-child(3):last-child) {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  grid-auto-rows: 150px;
}

/* 1枚目：上段いっぱい */
body.single-post:has(article.category-blog)
.wp-block-gallery:has(figure:nth-child(3):last-child)
figure:nth-child(1) {
  grid-column: 1 / -1;
  grid-row: span 4;
}

/* 2枚目・3枚目：下段に2枚 */
body.single-post:has(article.category-blog)
.wp-block-gallery:has(figure:nth-child(3):last-child)
figure:nth-child(2),
body.single-post:has(article.category-blog)
.wp-block-gallery:has(figure:nth-child(3):last-child)
figure:nth-child(3) {
  grid-column: span 3;
  grid-row: span 2;
}


/* 4枚だけ
   きれいな2×2
========================================== */

body.single-post:has(article.category-blog)
.wp-block-gallery:has(figure:nth-child(4):last-child)
figure {

  grid-column: span 3;
  grid-row: span 3;
}


/* ==========================================
   スマートフォン
========================================== */

@media (max-width: 767px) {


  /* ----------------------------------------
     タイトル
  ---------------------------------------- */

  body.single-post:has(article.category-blog) .entry-title,
  body.single-post:has(article.category-blog) .page-header_title {

    font-size: 2rem;
    line-height: 1.45;
  }


  /* ----------------------------------------
     本文
  ---------------------------------------- */

  body.single-post:has(article.category-blog) .entry-body p {

    line-height: 1.9;
  }


  /* ----------------------------------------
     見出し
  ---------------------------------------- */

  body.single-post:has(article.category-blog) .entry-body h2 {

    margin-top: 50px;
    margin-bottom: 25px;

    font-size: 1.5rem;
  }


  /* ========================================
     スマホ版ギャラリー
     iPhone写真アプリ風3分割
  ======================================== */

  body.single-post:has(article.category-blog)
  .wp-block-gallery {

    grid-template-columns:
      repeat(3, minmax(0, 1fr)) !important;

    grid-auto-rows: 105px;

    gap: 3px !important;

    width: calc(100vw - 20px);

    margin-top: 30px !important;
    margin-bottom: 35px !important;
  }


  /* 基本 */
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image {

    grid-column: span 1;
    grid-row: span 1;

    border-radius: 2px;
  }


  /* 大きく見せる写真 */
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure:nth-child(1),

  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure:nth-child(9),

  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure:nth-child(19) {

    grid-column: span 2;
    grid-row: span 2;
  }


  /* 4・5・14・15は少し横長 */
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure:nth-child(4),

  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure:nth-child(5),

  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure:nth-child(14),

  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure:nth-child(15) {

    grid-column: span 2;
    grid-row: span 1;
  }


  /* ========================================
     スマホ・写真3枚だけ
  ======================================== */

  body.single-post:has(article.category-blog)
  .wp-block-gallery:has(figure:nth-child(3):last-child)
  figure:nth-child(1) {

    grid-column: span 2;
    grid-row: span 2;
  }


  body.single-post:has(article.category-blog)
  .wp-block-gallery:has(figure:nth-child(3):last-child)
  figure:nth-child(2),

  body.single-post:has(article.category-blog)
  .wp-block-gallery:has(figure:nth-child(3):last-child)
  figure:nth-child(3) {

    grid-column: span 1;
    grid-row: span 1;
  }


  /* ========================================
     スマホ・写真4枚だけ
  ======================================== */

  body.single-post:has(article.category-blog)
  .wp-block-gallery:has(figure:nth-child(4):last-child)
  figure {

    grid-column: span 1;
    grid-row: span 1;
  }


  body.single-post:has(article.category-blog)
  .wp-block-gallery:has(figure:nth-child(4):last-child)
  figure:nth-child(1) {

    grid-column: span 2;
    grid-row: span 2;
  }


  /* 画像 */
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image img {

    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
  }

}


/* ==========================================
   BLOGギャラリー スマホ表示修正版
========================================== */

@media screen and (max-width: 767px) {

  /* ギャラリー本体 */
  body.single-post:has(article.category-blog)
  .wp-block-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    grid-auto-rows: 105px !important;
    grid-auto-flow: row dense !important;
    gap: 3px !important;

    width: calc(100vw - 20px) !important;
    max-width: none !important;
    margin: 30px 0 35px !important;

    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }

  /* すべての写真の配置を初期化 */
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image {
    grid-column: auto / span 1 !important;
    grid-row: auto / span 1 !important;

    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 2px;
  }

  /* 大きい写真 */
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image:nth-child(1),
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image:nth-child(9),
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image:nth-child(19) {
    grid-column: auto / span 2 !important;
    grid-row: auto / span 2 !important;
  }

  /* 横長写真 */
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image:nth-child(4),
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image:nth-child(5),
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image:nth-child(14),
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image:nth-child(15) {
    grid-column: auto / span 2 !important;
    grid-row: auto / span 1 !important;
  }

  /* 画像本体 */
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
  }

  /* リンク画像 */
  body.single-post:has(article.category-blog)
  .wp-block-gallery
  figure.wp-block-image > a {
    display: block;
    width: 100%;
    height: 100%;
  }

}

/* スマホ：3枚ギャラリー */
@media screen and (max-width: 767px) {

  /* 1枚目：横幅いっぱい */
  body.single-post:has(article.category-blog)
  .wp-block-gallery:has(figure:nth-child(3):last-child)
  figure.wp-block-image:nth-child(1) {
    grid-column: 1 / -1 !important;
    grid-row: span 2 !important;
  }

  /* 2・3枚目：横並び */
  body.single-post:has(article.category-blog)
  .wp-block-gallery:has(figure:nth-child(3):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.single-post:has(article.category-blog)
  .wp-block-gallery:has(figure:nth-child(3):last-child)
  figure.wp-block-image:nth-child(2),
  body.single-post:has(article.category-blog)
  .wp-block-gallery:has(figure:nth-child(3):last-child)
  figure.wp-block-image:nth-child(3) {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
}