/* GAMADAS ブログ一覧・ブログ記事・お知らせ一覧（sub.css の後に読む）
   記事本文（.entry-content）は WordPress の Gutenberg が出す標準のHTMLをそのまま見せるためのCSS。
   テーマへ移すときは .entry-content 以下をそのまま持っていく。 */

/* ===== 共通：ページの頭を少し低く ===== */
.blog-hero, .news-hero { padding-bottom: 56px; }
.blog-hero .lead, .news-hero .lead { word-break: auto-phrase; }
.blog-hero h1, .news-hero h1 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); }

/* ===== カテゴリの切り替え ===== */
.cat-tabs { margin-top: 40px; }
.cat-tabs ul { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tabs a { align-items: center; display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 10px 18px; background: var(--paper); border: 0; border-radius: var(--radius); font-size: var(--fs-s); font-weight: 500; line-height: 1.5; text-decoration: none; transition: background-color 0.2s; }
.cat-tabs a:hover { background: var(--paper-2); }
.cat-tabs a[aria-current="page"] { background: #dcdcda; font-weight: 700; }
.cat-tabs small { font-family: var(--font-en); font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }

/* ===== 記事の並び（小さいアイキャッチ＋日付・カテゴリ・タイトル） =====
   アイキャッチは黒地にタイトルの画像が多いので、小さく見せて文字のタイトルを主役にする */
.blog-index { padding-top: 24px !important; }
.post-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; }
.post-list.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.post-item[hidden] { display: none; }
.post-item a { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 24px; align-items: start; text-decoration: none; }
.post-list.is-3 .post-item a { grid-template-columns: 104px minmax(0, 1fr); gap: 16px; }
.post-list.is-3 .post-title { -webkit-line-clamp: 5; line-clamp: 5; font-size: var(--fs-s); }
.post-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper); border-radius: var(--radius); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.post-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: var(--fs-xs); color: var(--muted); }
.post-meta time { font-family: var(--font-en); }
.post-title { word-break: auto-phrase; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: var(--fs-b); font-weight: 600; line-height: 1.65; font-feature-settings: "palt"; }
.post-item a:hover .post-title { text-decoration: underline; text-underline-offset: 4px; }
.post-item a:hover .post-thumb img { opacity: 0.85; }
.post-empty { margin-top: 24px; color: var(--ink-2); }

/* ページ送り */
.pager { margin-top: 72px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.pager-num { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; background: var(--paper); border: 1px solid transparent; border-radius: var(--radius); font-family: var(--font-en); font-size: var(--fs-s); font-weight: 500; text-decoration: none; transition: background-color 0.2s; }
a.pager-num:hover { background: var(--paper-2); }
.pager-num[aria-current="page"] { background: var(--white); border-color: var(--ink); font-weight: 700; }
.pager-gap { padding: 0 4px; color: var(--muted); }
.pager-next { display: inline-flex; align-items: center; gap: 0.6em; height: 44px; margin-left: 8px; padding: 0 18px; background: var(--paper); border-radius: var(--radius); font-size: var(--fs-s); font-weight: 700; text-decoration: none; }
.pager-next::after { content: "→"; font-family: var(--font-en); }
.pager-next:hover { background: var(--paper-2); }

/* ===== 記事ページ：頭 ===== */
.post-hero { padding-bottom: 64px; }
.post-hero .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr); gap: 32px 64px; align-items: center; }
.post-hero .crumbs { grid-column: 1 / -1; }
.post-head { padding-top: 24px; }
.post-head .post-meta { gap: 6px 16px; font-size: var(--fs-s); }
.post-head .post-cat { padding: 2px 10px; background: var(--paper); color: var(--ink); border-radius: 2px; font-size: var(--fs-xs); font-weight: 500; text-decoration: none; }
.post-head .post-cat:hover { background: var(--paper-2); }
.post-hero h1 { margin-top: 16px; font-size: clamp(1.5rem, 1.15rem + 1vw, 2rem); font-weight: 600; line-height: 1.55; word-break: auto-phrase; text-wrap: pretty; }
.post-eyecatch { margin: 24px 0 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper); border-radius: var(--radius); }
.post-eyecatch img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 記事ページ：本文＋右の目次 ===== */
.post-section { padding-top: 24px !important; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 56px; align-items: start; } /* 本文を広く、目次との間を詰める（2026-10-17 坂本さん） */
.post-main { min-width: 0; }
.post-side { position: sticky; top: 104px; }
.side-toc { padding: 24px 24px 20px; background: var(--paper); border-radius: var(--radius); }
.side-toc__title { font-size: var(--fs-s); font-weight: 700; }
.side-toc ol { margin-top: 12px; display: grid; gap: 2px; counter-reset: stoc; }
.side-toc li { counter-increment: stoc; }
.side-toc a { word-break: auto-phrase; display: grid; grid-template-columns: 1.6em minmax(0, 1fr); padding: 6px 0; font-size: var(--fs-xs); line-height: 1.6; color: var(--ink-2); text-decoration: none; }
.side-toc a::before { content: counter(stoc, decimal-leading-zero); font-family: var(--font-en); font-weight: 700; color: var(--muted); }
.side-toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ===== 記事本文（Gutenberg の標準ブロック） ===== */
.entry-content { font-size: 1.0625rem; line-height: 2; letter-spacing: 0.03em; color: var(--ink); overflow-wrap: anywhere; }
.entry-content > * + * { margin-top: 1.3em; }
.entry-content p { max-width: none; }
.entry-content p:empty { display: none; }
.entry-content a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(17, 17, 17, 0.4); text-underline-offset: 4px; }
.entry-content a:hover { text-decoration-color: var(--ink); }
.entry-content strong, .entry-content b { font-weight: 700; background: linear-gradient(transparent 62%, #e4e4e1 62%); } /* taste-skill-ignore: 太字の下に引くマーカー（境目のある塗り） */
.entry-content :is(th, td, .wp-block-button__link, h2, h3, h4) strong { background: none; }

/* 見出し：h2＝面、h3＝左の短い印、h4＝太字 */
.entry-content h2 { margin-top: 3.2em; padding: 18px 24px; background: var(--paper); border-radius: var(--radius); font-size: 1.375rem; font-weight: 600; line-height: 1.55; letter-spacing: 0.01em; font-feature-settings: "palt"; word-break: auto-phrase; scroll-margin-top: 96px; }
.entry-content h3 { position: relative; margin-top: 2.4em; padding-left: 18px; font-size: 1.1875rem; font-weight: 600; line-height: 1.6; font-feature-settings: "palt"; word-break: auto-phrase; scroll-margin-top: 96px; }
.entry-content h3::before { content: ""; position: absolute; left: 0; top: 0.3em; bottom: 0.3em; width: 4px; background: var(--ink); border-radius: 2px; }
.entry-content h4 { margin-top: 2em; font-size: 1.0625rem; font-weight: 700; }
.entry-content h2 + *, .entry-content h3 + *, .entry-content h4 + * { margin-top: 1em; }

/* リスト：薄いグレーの面にまとめる */
.entry-content > :is(ul, ol), .entry-content .wp-block-list { padding: 22px 28px 22px 2.6em; background: var(--paper); border-radius: var(--radius); }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { padding-left: 0.2em; }
.entry-content li + li { margin-top: 0.6em; }
.entry-content li::marker { color: var(--muted); font-family: var(--font-en); }
.entry-content li :is(ul, ol) { margin-top: 0.6em; padding: 0 0 0 1.4em; background: none; }

/* 表：線を引かず、白いすき間で区切る。横に収まらないときは表だけ横に動く */
.entry-content .wp-block-table { margin-inline: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entry-content table { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: var(--fs-s); line-height: 1.7; letter-spacing: 0.02em; }
.entry-content table.has-fixed-layout { table-layout: fixed; }
.entry-content th, .entry-content td { padding: 12px 16px; background: var(--paper); text-align: left; vertical-align: top; word-break: normal; overflow-wrap: anywhere; }
.entry-content th, .entry-content thead td { background: #e6e6e4; font-weight: 600; }
.entry-content tbody tr:first-child th { background: #e6e6e4; }
.entry-content tfoot td { background: var(--white); font-size: var(--fs-xs); color: var(--muted); }
.entry-content .is-style-stripes tbody tr:nth-child(even) td { background: #fafaf9; }
.entry-content .wp-element-caption, .entry-content figcaption { margin-top: 10px; font-size: var(--fs-xs); line-height: 1.7; color: var(--muted); }
.entry-content .wp-block-table figcaption { text-align: left; }

/* 画像 */
.entry-content figure { margin-inline: 0; }
.entry-content .wp-block-image { margin-block: 2em; }
.entry-content .wp-block-image img { border-radius: var(--radius); }
.entry-content .wp-block-image figcaption { text-align: center; }
.entry-content .aligncenter { margin-inline: auto; text-align: center; }
.entry-content .aligncenter img { margin-inline: auto; }
.entry-content .alignleft { float: left; max-width: 50%; margin: 0.4em 1.6em 1em 0; }
.entry-content .alignright { float: right; max-width: 50%; margin: 0.4em 0 1em 1.6em; }
.entry-content::after { content: ""; display: block; clear: both; }

/* 引用 */
.entry-content .wp-block-quote, .entry-content blockquote { margin-inline: 0; padding: 24px 28px; background: var(--paper); border-radius: var(--radius); color: var(--ink-2); }
.entry-content blockquote::before { content: "“"; display: block; height: 0.6em; font-family: var(--font-en); font-size: 2.5rem; line-height: 1; color: #b5b5b3; }
.entry-content blockquote p + p { margin-top: 1em; }
.entry-content blockquote cite { display: block; margin-top: 12px; font-size: var(--fs-xs); font-style: normal; color: var(--muted); }
.entry-content .wp-block-pullquote { margin-inline: 0; padding: 32px 24px; text-align: center; font-size: var(--fs-l); font-weight: 600; }
.entry-content .wp-block-pullquote blockquote { background: none; padding: 0; color: var(--ink); }

/* ボタン：押してほしいボタンだけ黒。枠線スタイルは薄いグレー */
.entry-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.entry-content .wp-block-buttons.is-content-justification-center { justify-content: center; }
.entry-content .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; gap: 0.75em; min-height: 52px; padding: 0 26px; background: var(--black); color: var(--white); border-radius: var(--radius); font-size: var(--fs-s); font-weight: 700; line-height: 1.5; text-decoration: none; }
.entry-content .wp-block-button__link::after { content: "→"; font-family: var(--font-en); }
.entry-content .wp-block-button__link:hover { background: #333; color: var(--white); }
.entry-content .is-style-outline .wp-block-button__link { background: var(--paper-2); color: var(--ink); border: 0; }
.entry-content .is-style-outline .wp-block-button__link:hover { background: #dedede; }

/* そのほか */
.entry-content hr, .entry-content .wp-block-separator { height: 1px; margin-block: 3em; border: 0; background: #e3e3e0; }
.entry-content pre, .entry-content .wp-block-code { padding: 20px 24px; overflow-x: auto; background: var(--paper); border-radius: var(--radius); font-size: var(--fs-xs); line-height: 1.8; }
.entry-content code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.9em; }
.entry-content :not(pre) > code { padding: 1px 6px; background: var(--paper); border-radius: 2px; }
.entry-content .wp-block-details { padding: 18px 24px; background: var(--paper); border-radius: var(--radius); }
.entry-content .wp-block-details summary { font-weight: 600; cursor: pointer; }
.entry-content .wp-block-embed iframe, .entry-content .wp-block-video video { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); }
.entry-content .has-text-align-center { text-align: center; }
.entry-content .has-text-align-right { text-align: right; }
.entry-content .has-small-font-size { font-size: var(--fs-xs); }
.entry-content .wp-block-columns { display: flex; gap: 24px; }
.entry-content .wp-block-column { flex: 1; min-width: 0; }

/* 目次（テーマ＝SANGO が本文の最初の h2 の前に出すもの） */
.entry-content #toc_container { margin-top: 2.4em; padding: 24px 28px; background: var(--paper); border-radius: var(--radius); font-size: var(--fs-s); line-height: 1.7; }
.entry-content #toc_container .toc_title { font-weight: 700; }
.entry-content #toc_container ol { margin: 0; padding: 0; background: none; list-style: none; }
.entry-content #toc_container > ol { margin-top: 12px; counter-reset: toc; display: grid; gap: 8px; }
.entry-content #toc_container > ol > li { counter-increment: toc; margin: 0; padding: 0; }
.entry-content #toc_container > ol > li > a { display: grid; grid-template-columns: 2em minmax(0, 1fr); font-weight: 600; }
.entry-content #toc_container > ol > li > a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-en); font-weight: 700; color: var(--muted); }
.entry-content #toc_container ol ol { margin-top: 4px; padding-left: 2em; display: grid; gap: 2px; }
.entry-content #toc_container ol ol li { margin: 0; padding: 0; color: var(--ink-2); }
.entry-content #toc_container a { text-decoration: none; word-break: auto-phrase; }
.entry-content #toc_container a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ===== テーマが差し込む導線 ===== */
/* 主役・末尾の資料ダウンロード（.gm-cta） */
.gm-cta { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; justify-items: start; margin-top: 64px; padding: 36px 40px; background: var(--paper); background-image: var(--noise); border-radius: var(--radius); }
.gm-cta__label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.gm-cta__title { word-break: auto-phrase; margin-top: 4px; font-size: var(--fs-l); font-weight: 600; line-height: 1.5; font-feature-settings: "palt"; }
.gm-cta__desc { margin-top: 8px; font-size: var(--fs-s); line-height: 1.8; color: var(--ink-2); }
.gm-cta__sub { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--muted); max-width: none; }
.gm-cta__sub a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.entry-content .gm-cta { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: center; justify-items: stretch; margin-top: 2em; padding: 20px 24px; font-size: var(--fs-b); line-height: 1.6; letter-spacing: 0.02em; }
.entry-content .gm-cta .gm-cta__title { margin: 0; font-size: var(--fs-b); }
.entry-content .gm-cta__btn { color: var(--white); text-decoration: none; }

/* 本文の途中のサービス案内（.gm-inline-cta） */
.entry-content .gm-inline-cta { margin-top: 2em; }
.entry-content .gm-inline-cta__link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; background: var(--paper); border-radius: var(--radius); font-size: var(--fs-s); font-weight: 700; line-height: 1.6; text-decoration: none; transition: background-color 0.2s; }
.entry-content .gm-inline-cta__link::before { content: "サービス"; flex: none; padding: 1px 8px; background: var(--white); border-radius: 2px; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-2); }
.entry-content .gm-inline-cta__link::after { content: "→"; flex: none; margin-left: auto; font-family: var(--font-en); }
.entry-content .gm-inline-cta__link:hover { background: var(--paper-2); }

/* 関連サービス */
.post-service { margin-top: 40px; }
.post-service__label { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.post-service .related { margin-top: 12px; }

/* 関連記事 */
.post-related { padding-top: 40px !important; }

/* ===== お知らせ一覧（トップと同じ、箱なしの一覧） ===== */
.news-index { padding-top: 32px !important; }
.news-year { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 0 48px; max-width: 1000px; }
.news-year + .news-year { margin-top: 56px; }
.news-year__label { padding-top: 14px; font-size: var(--fs-l); font-weight: 700; line-height: 1.6; color: var(--muted); }
.news-rows a { display: grid; grid-template-columns: 6.5em 5em minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding: 14px 0; font-size: var(--fs-s); text-decoration: none; }
.news-rows time { font-family: var(--font-en); font-size: var(--fs-xs); color: var(--muted); }
.news-type { justify-self: start; padding: 0 8px; background: var(--paper); border-radius: 2px; font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; }
.news-rows .t { line-height: 1.7; }
.news-rows a:hover .t { text-decoration: underline; text-underline-offset: 4px; }

/* ===== 画面幅ごと ===== */
@media (max-width: 1100px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-main { max-width: 680px; }
  .post-side { display: none; }
}
@media (min-width: 1101px) {
  /* 右に目次があるときは、本文の中の目次は出さない */
  .post-layout .entry-content #toc_container { display: none; }
}
@media (max-width: 1024px) {
  .post-list.is-3 { grid-template-columns: 1fr; gap: 24px; }
  .post-hero .container { grid-template-columns: 1fr; }
  .post-eyecatch { max-width: 560px; margin-top: 8px; }
}
@media (max-width: 860px) {
  .post-list { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .blog-hero, .news-hero { padding-bottom: 40px; }
  .cat-tabs { margin-top: 28px; }
  .cat-tabs ul { gap: 6px; }
  .cat-tabs a { align-items: center; min-height: 40px; padding: 8px 14px; font-size: var(--fs-xs); }
  .post-item a, .post-list.is-3 .post-item a { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .post-title { font-size: var(--fs-s); line-height: 1.6; }
  .pager { margin-top: 48px; gap: 6px; }
  .pager-num { min-width: 40px; height: 40px; }
  .pager-next { height: 40px; margin-left: 0; padding: 0 14px; }

  .post-hero { padding-bottom: 40px; }
  .post-head { padding-top: 12px; }
  .post-hero h1 { font-size: 1.375rem; }
  .entry-content { font-size: 1rem; line-height: 1.95; letter-spacing: 0.02em; }
  .entry-content h2 { margin-top: 2.8em; padding: 14px 18px; font-size: 1.1875rem; }
  .entry-content h3 { font-size: 1.0625rem; padding-left: 14px; }
  .entry-content > :is(ul, ol), .entry-content .wp-block-list { padding: 18px 18px 18px 2.2em; }
  .entry-content #toc_container { padding: 20px; }
  .entry-content th, .entry-content td { padding: 10px 12px; }
  .entry-content table.has-fixed-layout { table-layout: auto; }
  .entry-content th, .entry-content td { min-width: 5.5em; }
  .entry-content .alignleft, .entry-content .alignright { float: none; max-width: none; margin: 1.5em 0; }
  .entry-content .wp-block-columns { flex-direction: column; }
  .gm-cta { grid-template-columns: 1fr; padding: 28px 22px; }
  .gm-cta__btn { width: 100%; white-space: normal; text-align: center; }
  .entry-content .gm-cta { grid-template-columns: 1fr; padding: 20px; }
  .entry-content .gm-inline-cta__link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 16px 18px; }
  .entry-content .gm-inline-cta__link::before { grid-column: 1 / -1; justify-self: start; }

  .news-year { grid-template-columns: 1fr; }
  .news-year + .news-year { margin-top: 40px; }
  .news-year__label { padding-top: 0; font-size: var(--fs-b); }
  .news-rows a { grid-template-columns: auto 1fr; gap: 4px 12px; padding: 16px 0; }
  .news-rows .t { grid-column: 1 / -1; }
}

/* 記事の頭はアイキャッチを出さず、タイトルだけを1列で（2026-10-17） */
.post-hero .container { grid-template-columns: minmax(0, 1fr); }
.post-head { max-width: 760px; }
