/* WordPress投稿コンテンツのスタイル（ブロック・クラシック両対応） */
.wp_content,
.entry-content,
.article {
  line-height: 1.8;
  color: #333;
  /* 画像の左・右寄せ用 Grid（float 不使用） */
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0 1.5em;
  align-items: start;
}

/* コンテナ共通（直下のブロック・要素に適用） */
.wp_content>*,
.entry-content>*,
.article>* {
  max-width: 100%;
  grid-column: 2;
  /* デフォルトは中央列（本文） */
  min-width: 0;
}

/* 段落 */
.wp_content p,
.entry-content p,
.article p,
.wp_content .wp-block-paragraph,
.entry-content .wp-block-paragraph,
.article .wp-block-paragraph {
  margin: 0 0 1.5em;
  line-height: 1.8;
}

.wp_content p:last-child,
.entry-content p:last-child,
.article p:last-child {
  margin-bottom: 0;
}

/* 見出し */
.wp_content h1,
.wp_content h2,
.wp_content h3,
.wp_content h4,
.wp_content h5,
.wp_content h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.article h1,
.article h2,
.article h3,
.article h4,
.article h5,
.article h6,
.wp_content .wp-block-heading,
.entry-content .wp-block-heading,
.article .wp-block-heading {
  font-weight: bold;
  margin: 2em 0 1em;
  line-height: 1.5;
  color: #333;
}

.wp_content h1,
.entry-content h1,
.article h1,
.wp_content .wp-block-heading h1,
.entry-content .wp-block-heading h1 {
  font-size: 2em;
  border-bottom: 2px solid var(--color);
  padding-bottom: 0.5em;
}

.wp_content h2,
.entry-content h2,
.article h2,
.wp_content .wp-block-heading h2,
.entry-content .wp-block-heading h2 {
  font-size: 1.75em;
  border-bottom: 2px solid var(--color);
  padding-bottom: 0.5em;
}

.wp_content h3,
.entry-content h3,
.article h3,
.wp_content .wp-block-heading h3,
.entry-content .wp-block-heading h3 {
  font-size: 1.5em;
  border-left: 4px solid var(--color);
  padding-left: 0.75em;
}

.wp_content h4,
.entry-content h4,
.article h4 {
  font-size: 1.25em;
}

.wp_content h5,
.entry-content h5,
.article h5 {
  font-size: 1.1em;
}

.wp_content h6,
.entry-content h6,
.article h6 {
  font-size: 1em;
}

/* リスト */
.wp_content ul,
.wp_content ol,
.entry-content ul,
.entry-content ol,
.article ul,
.article ol,
.wp_content .wp-block-list,
.entry-content .wp-block-list,
.article .wp-block-list {
  margin: 1.5em 0;
  padding-left: 2em;
}

.wp_content ul,
.entry-content ul,
.article ul {
  list-style-type: disc;
}

.wp_content ol,
.entry-content ol,
.article ol {
  list-style-type: decimal;
}

.wp_content li,
.entry-content li,
.article li,
.wp_content .wp-block-list li,
.entry-content .wp-block-list li,
.article .wp-block-list li {
  margin: 0.5em 0;
  line-height: 1.8;
}

.wp_content ul ul,
.wp_content ol ol,
.wp_content ul ol,
.wp_content ol ul,
.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul,
.article ul ul,
.article ol ol,
.article ul ol,
.article ol ul {
  margin: 0.5em 0;
}

/* ========== 画像（共通・中央） ========== */
.wp_content img,
.entry-content img,
.article img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.wp_content figure,
.entry-content figure,
.article figure,
.wp_content .wp-block-image,
.entry-content .wp-block-image,
.article .wp-block-image {
  margin: 2em 0;
}

.wp_content figure img,
.entry-content figure img,
.article figure img,
.wp_content .wp-block-image img,
.entry-content .wp-block-image img,
.article .wp-block-image img {
  display: block;
  margin: 0 auto;
}

.wp_content figcaption,
.entry-content figcaption,
.article figcaption,
.wp_content .wp-block-image figcaption,
.entry-content .wp-block-image figcaption,
.article .wp-block-image figcaption {
  margin-top: 0.5em;
  font-size: 0.9em;
  color: #666;
  text-align: center;
}

/* ========== img を持つ p（中央寄せ・PC版） ========== */
.wp_content p:has(img),
.entry-content p:has(img),
.article p:has(img) {
  text-align: center;
  margin: 2em 0;
}

.wp_content p:has(img) img,
.entry-content p:has(img) img,
.article p:has(img) img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 85%;
  height: auto;
}

/* img が2枚の p → 横2列 */
.wp_content p:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))),
.entry-content p:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))),
.article p:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1em;
  text-align: center;
}

.wp_content p:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))) img,
.entry-content p:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))) img,
.article p:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))) img {
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* img が3枚の p → 横3列 */
.wp_content p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))),
.entry-content p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))),
.article p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
  text-align: center;
}

.wp_content p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))) img,
.entry-content p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))) img,
.article p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))) img {
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* img が4枚以上の p → 横4列 */
.wp_content p:has(img:nth-of-type(4)),
.entry-content p:has(img:nth-of-type(4)),
.article p:has(img:nth-of-type(4)) {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1em;
  text-align: center;
}

.wp_content p:has(img:nth-of-type(4)) img,
.entry-content p:has(img:nth-of-type(4)) img,
.article p:has(img:nth-of-type(4)) img {
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ========== 画像の横並び（左・右・中央）Grid 配置 ========== */
.wp_content>.alignleft,
.entry-content>.alignleft,
.article>.alignleft,
.wp_content>.wp-block-image.alignleft,
.entry-content>.wp-block-image.alignleft,
.article>.wp-block-image.alignleft,
.wp_content>figure.alignleft,
.entry-content>figure.alignleft,
.article>figure.alignleft {
  grid-column: 1;
  grid-row: span 999;
  align-self: start;
  justify-self: start;
  margin: 0.5em 1.5em 1em 0;
  max-width: 50%;
}

.wp_content>.alignright,
.entry-content>.alignright,
.article>.alignright,
.wp_content>.wp-block-image.alignright,
.entry-content>.wp-block-image.alignright,
.article>.wp-block-image.alignright,
.wp_content>figure.alignright,
.entry-content>figure.alignright,
.article>figure.alignright {
  grid-column: 3;
  grid-row: span 999;
  align-self: start;
  justify-self: end;
  margin: 0.5em 0 1em 1.5em;
  max-width: 50%;
}

.wp_content>.aligncenter,
.entry-content>.aligncenter,
.article>.aligncenter,
.wp_content>.wp-block-image.aligncenter,
.entry-content>.wp-block-image.aligncenter,
.article>.wp-block-image.aligncenter,
.wp_content>figure.aligncenter,
.entry-content>figure.aligncenter,
.article>figure.aligncenter {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 2em;
  margin-bottom: 2em;
}

/* img.alignleft / img.alignright は figure や .wp-block-image の子のため、親で配置済み。中央は親が full なので img は block margin auto */
.wp_content img.alignleft,
.entry-content img.alignleft,
.article img.alignleft,
.wp_content img.alignright,
.entry-content img.alignright,
.article img.alignright {
  max-width: 100%;
}

.wp_content .alignwide,
.entry-content .alignwide,
.article .alignwide {
  grid-column: 1 / -1;
  max-width: 100%;
  justify-self: center;
}

.wp_content .alignfull,
.entry-content .alignfull,
.article .alignfull {
  grid-column: 1 / -1;
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
}

/* グループ・クリアフィックス（子レイアウト用） */
.wp_content .wp-block-group,
.entry-content .wp-block-group,
.article .wp-block-group,
.wp_content .clearfix,
.entry-content .clearfix,
.article .clearfix {
  overflow: hidden;
}

/* ========== ギャラリー（ブロック） ========== */
.wp_content .wp-block-gallery,
.entry-content .wp-block-gallery,
.article .wp-block-gallery {
  margin: 2em 0;
  display: grid;
  gap: 1em;
  list-style: none;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
}

.wp_content .wp-block-gallery .wp-block-image,
.entry-content .wp-block-gallery .wp-block-image,
.article .wp-block-gallery .wp-block-image,
.wp_content .wp-block-gallery .blocks-gallery-item,
.entry-content .wp-block-gallery .blocks-gallery-item,
.article .wp-block-gallery .blocks-gallery-item {
  margin: 0;
}

.wp_content .wp-block-gallery img,
.entry-content .wp-block-gallery img,
.article .wp-block-gallery img {
  margin: 0;
  width: 100%;
  height: auto;
  display: block;
}

/* ギャラリー カラム数 */
.wp_content .wp-block-gallery.columns-2,
.entry-content .wp-block-gallery.columns-2,
.article .wp-block-gallery.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.wp_content .wp-block-gallery.columns-3,
.entry-content .wp-block-gallery.columns-3,
.article .wp-block-gallery.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.wp_content .wp-block-gallery.columns-4,
.entry-content .wp-block-gallery.columns-4,
.article .wp-block-gallery.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.wp_content .wp-block-gallery.columns-5,
.entry-content .wp-block-gallery.columns-5,
.article .wp-block-gallery.columns-5 {
  grid-template-columns: repeat(5, 1fr);
}

.wp_content .wp-block-gallery.columns-6,
.entry-content .wp-block-gallery.columns-6,
.article .wp-block-gallery.columns-6 {
  grid-template-columns: repeat(6, 1fr);
}

/* クラシックギャラリー（.gallery） */
.wp_content .gallery,
.entry-content .gallery,
.article .gallery {
  margin: 2em 0;
  display: grid;
  gap: 0.5em;
}

.wp_content .gallery.gallery-columns-2,
.entry-content .gallery.gallery-columns-2,
.article .gallery.gallery-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.wp_content .gallery.gallery-columns-3,
.entry-content .gallery.gallery-columns-3,
.article .gallery.gallery-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.wp_content .gallery.gallery-columns-4,
.entry-content .gallery.gallery-columns-4,
.article .gallery.gallery-columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.wp_content .gallery.gallery-columns-5,
.entry-content .gallery.gallery-columns-5,
.article .gallery.gallery-columns-5 {
  grid-template-columns: repeat(5, 1fr);
}

.wp_content .gallery.gallery-columns-6,
.entry-content .gallery.gallery-columns-6,
.article .gallery.gallery-columns-6 {
  grid-template-columns: repeat(6, 1fr);
}

.wp_content .gallery-item,
.entry-content .gallery-item,
.article .gallery-item {
  margin: 0;
}

.wp_content .gallery-caption,
.entry-content .gallery-caption,
.article .gallery-caption {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.25em;
}

/* ========== カラムブロック（横並び） ========== */
.wp_content .wp-block-columns,
.entry-content .wp-block-columns,
.article .wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  margin: 2em 0;
}

.wp_content .wp-block-column,
.entry-content .wp-block-column,
.article .wp-block-column {
  flex: 1;
  min-width: 0;
}

.wp_content .wp-block-columns:not(.is-not-stacked-on-mobile) .wp-block-column,
.entry-content .wp-block-columns:not(.is-not-stacked-on-mobile) .wp-block-column,
.article .wp-block-columns:not(.is-not-stacked-on-mobile) .wp-block-column {
  flex-basis: 0;
  flex-grow: 1;
}

/* メディア＆テキストブロック */
.wp_content .wp-block-media-text,
.entry-content .wp-block-media-text,
.article .wp-block-media-text {
  display: grid;
  margin: 2em 0;
  gap: 0;
}

.wp_content .wp-block-media-text.has-media-on-the-right,
.entry-content .wp-block-media-text.has-media-on-the-right,
.article .wp-block-media-text.has-media-on-the-right {
  direction: rtl;
}

.wp_content .wp-block-media-text.has-media-on-the-right>*,
.entry-content .wp-block-media-text.has-media-on-the-right>*,
.article .wp-block-media-text.has-media-on-the-right>* {
  direction: ltr;
}

.wp_content .wp-block-media-text__media,
.entry-content .wp-block-media-text__media,
.article .wp-block-media-text__media {
  margin: 0;
}

.wp_content .wp-block-media-text__media img,
.entry-content .wp-block-media-text__media img,
.article .wp-block-media-text__media img {
  margin: 0;
  width: 100%;
  height: auto;
  display: block;
}

.wp_content .wp-block-media-text__content,
.entry-content .wp-block-media-text__content,
.article .wp-block-media-text__content {
  padding: 1.5em;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* テーブル */
.wp_content table,
.entry-content table,
.article table,
.wp_content .wp-block-table,
.entry-content .wp-block-table,
.article .wp-block-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.95em;
}

.wp_content .wp-block-table table {
  width: 100%;
  margin: 0;
}

.wp_content table th,
.wp_content table td,
.entry-content table th,
.entry-content table td,
.article table th,
.article table td,
.wp_content .wp-block-table th,
.wp_content .wp-block-table td,
.entry-content .wp-block-table th,
.entry-content .wp-block-table td,
.article .wp-block-table th,
.article .wp-block-table td {
  padding: 0.75em 1em;
  border: 1px solid #ddd;
  text-align: left;
}

.wp_content table th,
.entry-content table th,
.article table th,
.wp_content .wp-block-table th,
.entry-content .wp-block-table th,
.article .wp-block-table th {
  background: var(--color);
  color: #fff;
  font-weight: bold;
  text-align: center;
}

.wp_content table tr:nth-child(even),
.entry-content table tr:nth-child(even),
.article table tr:nth-child(even) {
  background: #f9f9f9;
}

.wp_content table tr:hover,
.entry-content table tr:hover,
.article table tr:hover {
  background: #f5f5f5;
}

/* リンク */
.wp_content a,
.entry-content a,
.article a {
  color: var(--color);
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.wp_content a:hover,
.entry-content a:hover,
.article a:hover {
  opacity: 0.8;
  text-decoration: none;
}

/* 引用 */
.wp_content blockquote,
.entry-content blockquote,
.article blockquote,
.wp_content .wp-block-quote,
.entry-content .wp-block-quote,
.article .wp-block-quote {
  margin: 2em 0;
  padding: 1em 1.5em;
  border-left: 4px solid var(--color);
  background: #f9f9f9;
  font-style: italic;
  color: #555;
}

.wp_content blockquote p,
.entry-content blockquote p,
.article blockquote p,
.wp_content .wp-block-quote p,
.entry-content .wp-block-quote p,
.article .wp-block-quote p {
  margin: 0;
}

.wp_content blockquote cite,
.entry-content blockquote cite,
.article blockquote cite,
.wp_content .wp-block-quote cite,
.entry-content .wp-block-quote cite,
.article .wp-block-quote cite {
  display: block;
  margin-top: 0.5em;
  font-size: 0.9em;
  font-style: normal;
  color: #666;
}

/* コード */
.wp_content code,
.entry-content code,
.article code,
.wp_content .wp-block-code code,
.entry-content .wp-block-code code,
.article .wp-block-code code {
  background: #f4f4f4;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  color: #d63384;
}

.wp_content pre,
.entry-content pre,
.article pre,
.wp_content .wp-block-code,
.entry-content .wp-block-code,
.article .wp-block-code {
  background: #f4f4f4;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
  margin: 2em 0;
  line-height: 1.6;
}

.wp_content .wp-block-code pre {
  padding: 0;
  margin: 0;
}

.wp_content pre code,
.entry-content pre code,
.article pre code,
.wp_content .wp-block-code code,
.entry-content .wp-block-code code,
.article .wp-block-code code {
  background: none;
  padding: 0;
  color: #333;
}

/* 太字・斜体 */
.wp_content strong,
.wp_content b,
.entry-content strong,
.entry-content b,
.article strong,
.article b {
  font-weight: bold;
  color: #0093db; /* フォールバック */
  color: var(--color2);
}

.wp_content em,
.entry-content em,
.article em,
.wp_content i,
.entry-content i,
.article i {
  font-style: italic;
}

/* 区切り線 */
.wp_content hr,
.entry-content hr,
.article hr,
.wp_content .wp-block-separator,
.entry-content .wp-block-separator,
.article .wp-block-separator {
  border: none;
  border-top: 2px solid #ddd;
  margin: 3em 0;
}

/* 定義リスト */
.wp_content dl,
.entry-content dl,
.article dl {
  margin: 1.5em 0;
}

.wp_content dt,
.entry-content dt,
.article dt {
  font-weight: bold;
  margin-top: 1em;
  color: #333;
}

.wp_content dd,
.entry-content dd,
.article dd {
  margin: 0.5em 0 0 1.5em;
  color: #555;
}

/* ボタンブロック */
.wp_content .wp-block-buttons,
.entry-content .wp-block-buttons,
.article .wp-block-buttons {
  margin: 2em 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.wp_content .wp-block-button__link,
.entry-content .wp-block-button__link,
.article .wp-block-button__link {
  display: inline-block;
  padding: 0.6em 1.2em;
  background: var(--color);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.wp_content .wp-block-button__link:hover,
.entry-content .wp-block-button__link:hover,
.article .wp-block-button__link:hover {
  opacity: 0.9;
}

/* 埋め込み */
.wp_content iframe,
.entry-content iframe,
.article iframe,
.wp_content embed,
.entry-content embed,
.article embed,
.wp_content object,
.entry-content object,
.article object,
.wp_content .wp-block-embed,
.entry-content .wp-block-embed,
.article .wp-block-embed {
  max-width: 100%;
  margin: 2em auto;
  display: block;
}

.wp_content iframe.yab_youtube_embed,
.entry-content iframe.yab_youtube_embed,
.article iframe.yab_youtube_embed,
.wp_content iframe[src*="youtube.com"],
.entry-content iframe[src*="youtube.com"],
.article iframe[src*="youtube.com"],
.wp_content iframe[src*="youtube-nocookie.com"],
.entry-content iframe[src*="youtube-nocookie.com"],
.article iframe[src*="youtube-nocookie.com"] {
  width: 100%;
  max-width: 720px;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

.wp_content iframe.yab_google_maps_embed,
.entry-content iframe.yab_google_maps_embed,
.article iframe.yab_google_maps_embed,
.wp_content iframe[src*="google.com/maps/embed"],
.entry-content iframe[src*="google.com/maps/embed"],
.article iframe[src*="google.com/maps/embed"],
.wp_content iframe[src*="google.co.jp/maps/embed"],
.entry-content iframe[src*="google.co.jp/maps/embed"],
.article iframe[src*="google.co.jp/maps/embed"] {
  width: 100%;
  max-width: 720px;
  height: clamp(240px, 50vw, 450px);
  border: 0;
  aspect-ratio: 4 / 3;
}

.wp_content .wp-block-embed iframe,
.entry-content .wp-block-embed iframe,
.article .wp-block-embed iframe {
  width: 100%;
}

/* クラシックブロック（.wp-block-freeform）内も同じ Grid で画像配置 */
.wp_content .wp-block-freeform,
.entry-content .wp-block-freeform,
.article .wp-block-freeform {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0 1.5em;
  align-items: start;
}

.wp_content .wp-block-freeform>*,
.entry-content .wp-block-freeform>*,
.article .wp-block-freeform>* {
  grid-column: 2;
  min-width: 0;
}

.wp_content .wp-block-freeform>.alignleft,
.entry-content .wp-block-freeform>.alignleft,
.article .wp-block-freeform>.alignleft,
.wp_content .wp-block-freeform>figure.alignleft,
.entry-content .wp-block-freeform>figure.alignleft,
.article .wp-block-freeform>figure.alignleft {
  grid-column: 1;
  grid-row: span 999;
  align-self: start;
  justify-self: start;
  margin: 0.5em 1.5em 1em 0;
  max-width: 50%;
}

.wp_content .wp-block-freeform>.alignright,
.entry-content .wp-block-freeform>.alignright,
.article .wp-block-freeform>.alignright,
.wp_content .wp-block-freeform>figure.alignright,
.entry-content .wp-block-freeform>figure.alignright,
.article .wp-block-freeform>figure.alignright {
  grid-column: 3;
  grid-row: span 999;
  align-self: start;
  justify-self: end;
  margin: 0.5em 0 1em 1.5em;
  max-width: 50%;
}

.wp_content .wp-block-freeform>.aligncenter,
.entry-content .wp-block-freeform>.aligncenter,
.article .wp-block-freeform>.aligncenter,
.wp_content .wp-block-freeform>figure.aligncenter,
.entry-content .wp-block-freeform>figure.aligncenter,
.article .wp-block-freeform>figure.aligncenter {
  grid-column: 1 / -1;
  justify-self: center;
}

/* ========== レスポンシブ ========== */
@media screen and (max-width: 768px) {

  .wp_content h1,
  .entry-content h1,
  .article h1 {
    font-size: 1.75em;
  }

  .wp_content h2,
  .entry-content h2,
  .article h2 {
    font-size: 1.5em;
  }

  .wp_content h3,
  .entry-content h3,
  .article h3 {
    font-size: 1.25em;
  }

  /* img を持つ p（768px：余白・画像幅を調整） */
  .wp_content p:has(img),
  .entry-content p:has(img),
  .article p:has(img) {
    margin: 1.5em 1em;
  }

  .wp_content p:has(img) img,
  .entry-content p:has(img) img,
  .article p:has(img) img {
    max-width: 90%;
  }

  /* img 2・3・4列 → 768px では最大2列 */
  .wp_content p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))),
  .entry-content p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))),
  .article p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))),
  .wp_content p:has(img:nth-of-type(4)),
  .entry-content p:has(img:nth-of-type(4)),
  .article p:has(img:nth-of-type(4)) {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 画像の横並びを解除（縦積み・Grid 上書き） */
  .wp_content>.alignleft,
  .entry-content>.alignleft,
  .article>.alignleft,
  .wp_content>.wp-block-image.alignleft,
  .entry-content>.wp-block-image.alignleft,
  .article>.wp-block-image.alignleft,
  .wp_content>figure.alignleft,
  .entry-content>figure.alignleft,
  .article>figure.alignleft,
  .wp_content>.alignright,
  .entry-content>.alignright,
  .article>.alignright,
  .wp_content>.wp-block-image.alignright,
  .entry-content>.wp-block-image.alignright,
  .article>.wp-block-image.alignright,
  .wp_content>figure.alignright,
  .entry-content>figure.alignright,
  .article>figure.alignright,
  .wp_content .wp-block-freeform>.alignleft,
  .entry-content .wp-block-freeform>.alignleft,
  .article .wp-block-freeform>.alignleft,
  .wp_content .wp-block-freeform>figure.alignleft,
  .entry-content .wp-block-freeform>figure.alignleft,
  .article .wp-block-freeform>figure.alignleft,
  .wp_content .wp-block-freeform>.alignright,
  .entry-content .wp-block-freeform>.alignright,
  .article .wp-block-freeform>.alignright,
  .wp_content .wp-block-freeform>figure.alignright,
  .entry-content .wp-block-freeform>figure.alignright,
  .article .wp-block-freeform>figure.alignright {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: center;
    max-width: 100%;
    margin: 1em auto;
  }

  /* ギャラリー カラム数を減らす */
  .wp_content .wp-block-gallery.columns-4,
  .entry-content .wp-block-gallery.columns-4,
  .article .wp-block-gallery.columns-4,
  .wp_content .wp-block-gallery.columns-5,
  .entry-content .wp-block-gallery.columns-5,
  .article .wp-block-gallery.columns-5,
  .wp_content .wp-block-gallery.columns-6,
  .entry-content .wp-block-gallery.columns-6,
  .article .wp-block-gallery.columns-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .wp_content .wp-block-gallery.columns-3,
  .entry-content .wp-block-gallery.columns-3,
  .article .wp-block-gallery.columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .wp_content .gallery.gallery-columns-4,
  .entry-content .gallery.gallery-columns-4,
  .article .gallery.gallery-columns-4,
  .wp_content .gallery.gallery-columns-5,
  .entry-content .gallery.gallery-columns-5,
  .article .gallery.gallery-columns-5,
  .wp_content .gallery.gallery-columns-6,
  .entry-content .gallery.gallery-columns-6,
  .article .gallery.gallery-columns-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .wp_content .gallery.gallery-columns-3,
  .entry-content .gallery.gallery-columns-3,
  .article .gallery.gallery-columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* カラムブロック 縦積み */
  .wp_content .wp-block-columns,
  .entry-content .wp-block-columns,
  .article .wp-block-columns {
    flex-direction: column;
    gap: 1em;
  }

  .wp_content .wp-block-column,
  .entry-content .wp-block-column,
  .article .wp-block-column {
    flex: none;
    width: 100%;
  }

  /* メディア＆テキスト 縦積み */
  .wp_content .wp-block-media-text,
  .entry-content .wp-block-media-text,
  .article .wp-block-media-text {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .wp_content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media,
  .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media,
  .article .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
    order: 1;
  }

  .wp_content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content,
  .entry-content .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content,
  .article .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
    order: 2;
  }

  .wp_content .wp-block-media-text__content,
  .entry-content .wp-block-media-text__content,
  .article .wp-block-media-text__content {
    padding: 1em;
  }

  /* テーブル 横スクロール */
  .wp_content table,
  .entry-content table,
  .article table,
  .wp_content .wp-block-table,
  .entry-content .wp-block-table,
  .article .wp-block-table {
    font-size: 0.85em;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wp_content table th,
  .wp_content table td,
  .entry-content table th,
  .entry-content table td,
  .article table th,
  .article table td {
    padding: 0.5em;
  }

  /* ボタン 縦積み */
  .wp_content .wp-block-buttons,
  .entry-content .wp-block-buttons,
  .article .wp-block-buttons {
    flex-direction: column;
  }

  .wp_content .wp-block-button__link,
  .entry-content .wp-block-button__link,
  .article .wp-block-button__link {
    display: block;
    text-align: center;
  }
}

@media screen and (max-width: 480px) {

  /* img を持つ p（480px：フル幅寄せ・余白を詰める） */
  .wp_content p:has(img),
  .entry-content p:has(img),
  .article p:has(img) {
    margin: 1em 0;
    padding: 0 0.5em;
  }

  .wp_content p:has(img) img,
  .entry-content p:has(img) img,
  .article p:has(img) img {
    max-width: 100%;
  }

  /* img 2・3・4列 → 480px では1列（縦積み） */
  .wp_content p:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))),
  .entry-content p:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))),
  .article p:has(img:nth-of-type(2)):not(:has(img:nth-of-type(3))),
  .wp_content p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))),
  .entry-content p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))),
  .article p:has(img:nth-of-type(3)):not(:has(img:nth-of-type(4))),
  .wp_content p:has(img:nth-of-type(4)),
  .entry-content p:has(img:nth-of-type(4)),
  .article p:has(img:nth-of-type(4)) {
    grid-template-columns: 1fr;
  }

  .wp_content .wp-block-gallery.columns-2,
  .entry-content .wp-block-gallery.columns-2,
  .article .wp-block-gallery.columns-2,
  .wp_content .wp-block-gallery.columns-3,
  .entry-content .wp-block-gallery.columns-3,
  .article .wp-block-gallery.columns-3,
  .wp_content .wp-block-gallery.columns-4,
  .entry-content .wp-block-gallery.columns-4,
  .article .wp-block-gallery.columns-4,
  .wp_content .wp-block-gallery.columns-5,
  .entry-content .wp-block-gallery.columns-5,
  .article .wp-block-gallery.columns-5,
  .wp_content .wp-block-gallery.columns-6,
  .entry-content .wp-block-gallery.columns-6,
  .article .wp-block-gallery.columns-6 {
    grid-template-columns: 1fr;
  }

  .wp_content .gallery.gallery-columns-2,
  .entry-content .gallery.gallery-columns-2,
  .article .gallery.gallery-columns-2,
  .wp_content .gallery.gallery-columns-3,
  .entry-content .gallery.gallery-columns-3,
  .article .gallery.gallery-columns-3,
  .wp_content .gallery.gallery-columns-4,
  .entry-content .gallery.gallery-columns-4,
  .article .gallery.gallery-columns-4,
  .wp_content .gallery.gallery-columns-5,
  .entry-content .gallery.gallery-columns-5,
  .article .gallery.gallery-columns-5,
  .wp_content .gallery.gallery-columns-6,
  .entry-content .gallery.gallery-columns-6,
  .article .gallery.gallery-columns-6 {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------- news single ------------------------------------------------------------------- */
#news .news_single {
  padding: clamp(1.5em, 4vw, 2.5em);
  background: #fff;
  color: #111;
}

#news .news_single .entry_header {
  margin: 0 auto 2em;
  padding: 0 0 1.75em;
  border-bottom: 1px solid #e0e0e0;
}

#news .news_single .entry_meta {
  margin: 0 auto 1.25em;
}

#news .news_single .date {
  display: block;
  width: auto;
  margin: 0 auto 0.75em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95em;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: #111;
  white-space: nowrap;
}

#news .news_single .labels {
  gap: 0.75em 1em;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

#news .news_single .category {
  display: inline-block;
  width: auto;
  min-width: 0;
  padding: 0.3em 0.9em;
  border-radius: 0;
  background: #0093db;
  background: var(--category-color, var(--color, #0093db));
  color: #fff;
  font-weight: 700;
  font-size: 0.9em;
  text-align: center;
  line-height: 1.4;
  white-space: nowrap;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}


#news .news_single .tag_list {
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0.5em;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

#news .news_single .tag_list li {
  margin: 0;
}

#news .news_single .tag_list .tag {
  display: inline-block;
  padding: 0.25em 0.75em;
  border: 1px solid #ccc;
  background: #f7f7f7;
  color: #333;
  font-weight: 700;
  font-size: 0.85em;
  line-height: 1.4;
  text-decoration: none;
  -webkit-transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

#news .news_single .tag_list .tag:hover {
  border-color: var(--color2);
  background: #fff;
  color: var(--color2);
}

#news .news_single .entry_title {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.55;
  color: #111;
}

/* 記事サムネイル（microCMS thumbnail / アイキャッチ）— 本文内画像の縮小ルール対象外 */
#news .news_single .hero_visual {
  margin: 0 auto 2em;
}

#news .news_single .hero_visual img {
  display: block;
  width: 100%;
  height: auto;
}

#news .news_single .wp_content {
  margin: 0 auto;
  color: #333;
  text-align: left;
}

/* 画像入り段落も本文は左揃え（画像自体は中央・縮小） */
#news .news_single .wp_content p:has(img),
#news .news_single .wp_content figcaption,
#news .news_single .wp_content .wp-block-image figcaption {
  text-align: left;
}

#news .news_single .wp_content p:has(img) img,
#news .news_single .wp_content figure img,
#news .news_single .wp_content .wp-block-image img {
  max-width: min(420px, 60%);
  cursor: zoom-in;
  -webkit-transition: opacity 0.2s ease;
  transition: opacity 0.2s ease;
}

#news .news_single .wp_content p:has(img) img:hover,
#news .news_single .wp_content figure img:hover,
#news .news_single .wp_content .wp-block-image img:hover {
  opacity: 0.88;
}

/* ---- 関連資料（お知らせ・HOT：本文幅・製品と同じ4列） ---- */
#news .news_single .wp_content > .yab_article_catalog {
  width: 100%;
  max-width: 100%;
  margin: 2em auto 0;
  padding: 2em 0 0;
  border-top: 1px solid #e0e0e0;
  color: #333;
}

#news .news_single .yab_article_catalog > .section_title {
  margin: 0 0 1em;
  border-bottom-color: var(--color, var(--color2, #0093db));
  color: #333;
}

#news .news_single .yab_article_catalog .catalog_grid .card:hover {
  --content-color: #0093db;
  --content-color: var(--color2, #0093db);
}

#hot .hot-content .yab_article_catalog {
  margin: var(--hot-gap-lg) auto 0;
  padding: var(--hot-gap-md) 0 0;
  border-top: 1px solid var(--hot-border);
}

#hot .hot-content .yab_article_catalog > .section_title {
  margin: 0 0 var(--hot-gap);
  padding: 0 0 0.5em;
  border-bottom: 1px solid var(--hot-border);
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.5;
  color: var(--hot-accent);
}

#hot .hot-content .yab_article_catalog .catalog_grid .card:hover {
  --content-color: var(--hot-accent);
}

/* ---- NEWS 本文画像ライトボックス ---- */
.yab_img_popup {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.yab_img_popup[hidden] {
  display: none;
}

.yab_img_popup_backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.yab_img_popup_panel {
  position: relative;
  z-index: 1;
  max-width: min(960px, 96vw);
  max-height: 92vh;
  margin: 0;
  padding: 0;
  overflow: auto;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.yab_img_popup_close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 2.25em;
  height: 2.25em;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.35em;
  line-height: 1;
  cursor: pointer;
  -webkit-transition: background 0.2s ease;
  transition: background 0.2s ease;
}

.yab_img_popup_close:hover,
.yab_img_popup_close:focus-visible {
  background: rgba(0, 0, 0, 0.8);
}

.yab_img_popup_img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  vertical-align: middle;
}

body.yab_img_popup_open {
  overflow: hidden;
}

@media screen and (max-width: 768px) {
  #news .news_single .wp_content p:has(img) img,
  #news .news_single .wp_content figure img,
  #news .news_single .wp_content .wp-block-image img {
    max-width: min(320px, 75%);
  }

  .yab_img_popup {
    padding: 12px;
  }
}

#news .news_single .entry_footer {
  margin: 3em auto 0;
  padding: 2em 0 0;
  border-top: 1px solid #e0e0e0;
}

#news .news_single .post_nav_adjacent {
  gap: 1.5em;
  margin: 0 auto 2.5em;
}

#news .news_single .post_nav_side {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 0;
  flex: 1 1 0;
  min-width: 0;
}

#news .news_single .post_nav_side.prev {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: start;
  -webkit-justify-content: flex-start;
  justify-content: flex-start;
}

#news .news_single .post_nav_side.next {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: end;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

#news .news_single .post_nav_item {
  gap: 1em;
  max-width: 100%;
  color: #111;
  text-decoration: none;
  -webkit-transition: color 0.2s ease;
  transition: color 0.2s ease;
}

#news .news_single .post_nav_item.next {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: reverse;
  -webkit-flex-direction: row-reverse;
  flex-direction: row-reverse;
  text-align: right;
}

#news .news_single .post_nav_item:hover {
  color: var(--color2);
}

#news .news_single .post_nav_body {
  display: block;
  min-width: 0;
}

#news .news_single .post_nav_label {
  display: block;
  margin: 0 auto 0.35em;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #888;
}

#news .news_single .post_nav_item:hover .post_nav_label {
  color: var(--color2);
}

#news .news_single .post_nav_title {
  font-weight: 700;
  font-size: 0.95em;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

#news .news_single .post_nav_item .icon {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

#news .news_single .post_nav_item .icon svg {
  --content-color: #111;
  --height: 2.4em;
  height: var(--height);
  width: auto;
  aspect-ratio: 1 / 1;
}

#news .news_single .post_nav_item.prev .icon svg {
  -webkit-transform: scaleX(-1);
  transform: scaleX(-1);
}

#news .news_single .post_nav_item .icon svg path,
#news .news_single .post_nav_item .icon svg circle {
  fill: none;
  stroke: var(--content-color);
  -webkit-transition: stroke 0.2s ease;
  transition: stroke 0.2s ease;
}

#news .news_single .post_nav_item:hover .icon svg {
  --content-color: var(--color2);
}

#news .news_single .view_link_box {
  margin: 0 auto;
}


@media screen and (max-width: 768px) {
  #news .news_single {
    padding: 1.5em;
  }

  #news .news_single .post_nav_adjacent {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 1.25em;
    margin-bottom: 2em;
  }

  #news .news_single .post_nav_side.prev,
  #news .news_single .post_nav_side.next {
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    justify-content: flex-start;
  }

  #news .news_single .post_nav_item.next {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    flex-direction: row;
    text-align: left;
  }

}

/* ------------------------------------------------------------------- works single (order_made) ------------------------------------------------------------------- */
#order_made_single .works_single {
  padding: clamp(1.5em, 4vw, 2.5em);
  background: #fff;
  color: #111;
}

#order_made_single .works_single .entry_header {
  margin: 0 auto 2em;
  padding: 0 0 1.75em;
  border-bottom: 1px solid #e0e0e0;
}

#order_made_single .works_single .entry_meta {
  margin: 0 auto 1.25em;
}

#order_made_single .works_single .date {
  display: block;
  width: auto;
  margin: 0 auto 0.75em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: #111;
}

#order_made_single .works_single .labels {
  gap: 0.75em 1em;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

#order_made_single .works_single .category {
  display: inline-block;
  min-width: 7em;
  padding: 0.25em 0.75em;
  background: #1f81bd;
  background: var(--color2, #1f81bd);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  line-height: 1.4;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

#order_made_single .works_single .tag_list {
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0.5em;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

#order_made_single .works_single .tag_list li {
  margin: 0;
}

#order_made_single .works_single .tag_list .tag {
  display: inline-block;
  padding: 0.25em 0.75em;
  border: 1px solid #ccc;
  background: #f7f7f7;
  color: #333;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  -webkit-transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

#order_made_single .works_single .tag_list .tag:hover {
  border-color: var(--color2);
  background: #fff;
  color: var(--color2);
}

#order_made_single .works_single .entry_title {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(22px, 4.5vw, 32px);
  line-height: 1.55;
  color: #111;
}

#order_made_single .works_single .case_meta {
  margin: 1.25em auto 0;
  padding: 1em 1.25em;
  background: #f7f7f7;
  border-left: 4px solid #1f81bd;
  border-left: 4px solid var(--color2, #1f81bd);
  overflow: hidden;
}

#order_made_single .works_single .case_meta dt {
  clear: left;
  float: left;
  width: 5.5em;
  margin: 0 0 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: #1f81bd;
  color: var(--color2, #1f81bd);
}

#order_made_single .works_single .case_meta dd {
  margin: 0 0 0.5em 6.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

#order_made_single .works_single .case_meta dd:last-child {
  margin-bottom: 0;
}

#order_made_single .works_single .case_meta dt:last-of-type,
#order_made_single .works_single .case_meta dd:last-of-type {
  margin-bottom: 0;
}

#order_made_single .works_single .hero_visual {
  margin: 0 auto 2em;
}

#order_made_single .works_single .hero_visual img {
  display: block;
  width: 100%;
  height: auto;
}

#order_made_single .works_single .wp_content {
  display: block;
  margin: 0 auto;
  color: #333;
}

#order_made_single .works_single .wp_content > * {
  grid-column: auto;
  min-width: 0;
}

#order_made_single .works_single .wp_content p:has(img) {
  display: block;
  text-align: left;
}

#order_made_single .works_single .wp_content p:has(img) img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 1.5em auto;
}

#order_made_single .works_single .wp_content .case_visual {
  margin: 0 auto 1.5em;
  text-align: center;
}

#order_made_single .works_single .wp_content .case_visual img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

#order_made_single .works_single .wp_content .case_visual_row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 1em;
  margin: 2em auto;
}

#order_made_single .works_single .wp_content .case_visual_row .case_visual {
  -webkit-flex: 1 1 calc(50% - 0.5em);
  flex: 1 1 calc(50% - 0.5em);
  max-width: calc(50% - 0.5em);
  margin: 0;
}

#order_made_single .works_single .wp_content blockquote,
#order_made_single .works_single .wp_content .wp-block-quote {
  margin: 0.75em auto 1.5em;
  padding: 0;
  border-left: 0;
  background: transparent;
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: #666;
}

#order_made_single .works_single .entry_footer {
  margin: 3em auto 0;
  padding: 2em 0 0;
  border-top: 1px solid #e0e0e0;
}

#order_made_single .works_single .works_catalog {
  margin: 3em auto 0;
}

#order_made_single .works_single .works_catalog .section_title {
  margin: 0 auto 1.5em;
  padding: 0 0 0.35em;
  border-bottom: 3px solid #111;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.75em;
  line-height: 1.4;
}

#order_made_single .works_single .catalog_grid {
  --num: 4;
  --gap: 1em;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-justify-content: flex-start;
  justify-content: flex-start;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

#order_made_single .works_single .catalog_grid .item {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  width: calc((100% - (var(--num) - 1) * var(--gap)) / var(--num));
  -webkit-flex: 0 0 calc((100% - (var(--num) - 1) * var(--gap)) / var(--num));
  flex: 0 0 calc((100% - (var(--num) - 1) * var(--gap)) / var(--num));
  min-width: 0;
}

#order_made_single .works_single .catalog_grid .card {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

#order_made_single .works_single .catalog_grid .card img,
#order_made_single .works_single .catalog_grid .card .photo_placeholder.catalog {
  display: block;
  width: 100%;
  height: auto;
}

#order_made_single .works_single .catalog_grid .name {
  margin: 0.75em auto 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95em;
  line-height: 1.55;
}

#order_made_single .works_single .view_link_box {
  margin: 0 auto;
}

@media screen and (max-width: 768px) {
  #order_made_single .works_single {
    padding: 1.5em;
  }

  #order_made_single .works_single .case_meta dt {
    float: none;
    width: auto;
    margin-bottom: 0.15em;
  }

  #order_made_single .works_single .case_meta dd {
    margin: 0 0 0.75em;
  }

  #order_made_single .works_single .wp_content .case_visual_row .case_visual {
    -webkit-flex: 1 1 100%;
    flex: 1 1 100%;
    max-width: 100%;
  }

  #order_made_single .works_single .works_catalog .section_title {
    font-size: 1.45em;
  }

  #order_made_single .works_single .catalog_grid {
    --num: 2;
  }
}
