/* ==========================================================================
   テクスケ v2：ブログ（一覧・カテゴリ一覧・検索結果・記事）
   1. 共通の小物（日付とカテゴリ・アイキャッチ・読み上げ用の隠し文字）
   2. 一覧：カテゴリの切り替え
   3. 一覧：記事カード（いちばん新しい1本／3列）
   4. 一覧：ページ送り・検索の入力欄
   5. 記事：頭（パンくず・タイトル・大きな画像）
   6. 記事：本文（.article）
   7. 記事：右の欄（目次・書いた人）
   8. 記事：終わりの小さなご相談
   9. 記事：ほかの記事
   10. スマホ（900px以下・767px以下）

   ※ 本文の見た目（6）は、投稿の編集画面用の editor.css と内容をそろえています。
     片方を直したら、もう片方も直してください。
   ========================================================================== */

/* ---------- 1. 共通の小物 ---------- */

/* 日付とカテゴリの並び */
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; line-height: 1.8; }
.post-meta time { font-family: var(--font-num); font-weight: 700; color: var(--muted); }
.post-date { color: var(--muted); } /* 「公開」「更新」の文字（2026-11-20 更新日の表示を追加） */
.post-tag { font-weight: 700; color: var(--orange-text); border: 1.5px solid var(--orange-text); border-radius: 4px; padding: 0 8px; text-decoration: none; }
a.post-tag:hover { background: #FFF1E6; color: var(--orange-text); }

/* アイキャッチ：写真がないときは「カテゴリの色の面（--eye）＋イラスト」 */
.eye { --eye: var(--cream); display: flex; align-items: center; justify-content: center; gap: 40px; background: var(--eye); overflow: hidden; }
.eye__illust, .eye__chara { width: auto; }
.eye--photo { background: var(--cream); }
.eye__photo { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 画面には出さず、読み上げだけされる文字（WordPress の標準のクラス名） */

/* 日本語のタイトルを、文節の切れ目で改行する（対応していないブラウザではふつうの改行） */
.post-card__title, .post-title, .mini-card__title { word-break: auto-phrase; }


/* ---------- 2. 一覧：ページの頭のキャラ・カテゴリの切り替え ---------- */
.blog-head__chara { width: clamp(96px, 11vw, 150px); }

.blog-cats { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 36px; }
.blog-cat {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
	border: 2px solid var(--ink); border-radius: 999px; background: var(--white);
	color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none;
}
.blog-cat:hover { background: var(--cream); color: var(--ink); }
.blog-cat.on, .blog-cat.on:hover { background: var(--ink); color: var(--paper); }


/* ---------- 3. 一覧：記事カード ---------- */
.blog-list { padding-top: 36px; padding-bottom: 100px; }

.post-card {
	display: flex; flex-direction: column; background: var(--white);
	border: 2px solid var(--ink); border-radius: 20px; overflow: hidden;
	color: var(--ink); text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 6px 0 var(--ink); }
.post-card:focus-visible { outline-offset: 4px; }

/* 3列のふつうのカード */
.post-card .eye--card { height: 190px; border-bottom: 2px solid var(--ink); }
.post-card .eye--card .eye__illust { height: 140px; }
.post-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.post-card__title { font-size: 19px; font-weight: 900; line-height: 1.55; }

/* いちばん新しい1本（横並びで大きく） */
.post-card--lead { flex-direction: row; margin-bottom: 28px; }
.post-card--lead .eye--lead { width: 520px; min-height: 300px; flex: none; border-right: 2px solid var(--ink); }
.post-card--lead .eye--lead .eye__illust { height: 200px; }
.post-card--lead .eye--photo .eye__photo { position: absolute; inset: 0; }
.post-card--lead .eye--photo { position: relative; }
.post-card--lead .post-card__body { padding: 40px 44px; gap: 12px; justify-content: center; }
.post-card--lead .post-card__title { font-size: 30px; line-height: 1.5; }
.post-card__excerpt { font-size: 16px; color: var(--ink-sub); }
.post-card__more { font-weight: 700; color: var(--orange-text); }

/* ほかの記事の並び（3列） */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* 記事がないとき */
.blog-empty { padding: 40px 0; font-size: 17px; text-align: center; }


/* ---------- 4. 一覧：ページ送り・検索の入力欄 ---------- */
.pager { margin-top: 44px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; font-family: var(--font-num); font-weight: 800; }
.pager .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 48px; height: 48px; padding: 0 6px; border-radius: 999px;
	border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font-size: 16px;
}
.pager a.page-numbers:hover { background: var(--cream); color: var(--ink); }
.pager .page-numbers.current { background: var(--ink); color: var(--paper); }
.pager .page-numbers.dots { border-color: transparent; }

/* 検索結果ページの「もう一度さがす」 */
.search-form { margin-top: 22px; display: flex; gap: 10px; max-width: 620px; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; min-height: 56px; padding: 0 20px;
	border: 2px solid var(--ink); border-radius: 999px; background: var(--white);
	font: inherit; font-size: 17px; color: var(--ink);
}
.search-form .btn-main { flex: none; cursor: pointer; }


/* ---------- 5. 記事：頭 ---------- */
.post-head { padding-top: 50px; }
.post-crumb { margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.post-crumb a { color: var(--muted); }
.post-meta--head { font-size: 14px; }
.post-meta--head .post-tag { font-size: 13px; }
.post-read { color: var(--muted); }
.post-title { margin-top: 12px; max-width: 1000px; font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; line-height: 1.5; }

/* 大きな画像 */
.post-head .eye--hero { margin-top: 30px; height: 360px; border: 3px solid var(--ink); border-radius: var(--radius); }
.post-head .eye--hero .eye__illust { height: 220px; }
.post-head .eye--hero .eye__chara { height: 240px; }


/* ---------- 6. 記事：本文（読みやすさ優先：18px・行間2・1行40字前後） ---------- */
.post-body { padding-top: 56px; padding-bottom: 100px; display: grid; grid-template-columns: minmax(0, 760px) 1fr; gap: 72px; align-items: start; }

.article { font-size: 18px; line-height: 2; min-width: 0; }
.article > *:first-child { margin-top: 0; }
.article p { margin: 0 0 1.4em; }
.article h2 { font-size: 28px; font-weight: 900; line-height: 1.5; margin: 2.2em 0 .8em; padding-bottom: 10px; border-bottom: 3px solid var(--ink); }
.article h3 { font-size: 22px; font-weight: 900; line-height: 1.5; margin: 1.8em 0 .6em; padding-left: 14px; border-left: 6px solid var(--orange); }
.article h4 { font-size: 19px; font-weight: 900; line-height: 1.6; margin: 1.6em 0 .5em; }
.article ul, .article ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.article li { margin: .3em 0; }
.article li::marker { color: var(--orange-text); font-weight: 700; }
.article li > ul, .article li > ol { margin: .3em 0 0; }
.article strong, .article b { font-weight: 900; }
.article a { text-decoration: underline; text-underline-offset: 3px; }
.article hr { margin: 2.4em 0; border: 0; border-top: 2px dashed var(--line-soft); }

/* 引用 */
.article blockquote { margin: 0 0 1.6em; padding: 18px 24px; background: var(--white); border-left: 6px solid var(--line-soft); border-radius: 0 14px 14px 0; color: var(--ink-sub); }
.article blockquote p:last-child { margin-bottom: 0; }
.article blockquote cite { display: block; margin-top: 6px; font-size: 14px; font-style: normal; color: var(--muted); }

/* 画像・図 */
.article figure { margin: 0 0 1.6em; }
.article img { border-radius: 14px; }
.article figcaption { margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--muted); text-align: center; }

/* 表（はみ出すときは表だけ横に動かせる） */
.article .wp-block-table { overflow-x: auto; }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; font-size: 16px; line-height: 1.7; background: var(--white); }
.article .wp-block-table table { margin-bottom: 0; }
.article th, .article td { padding: 12px 16px; border: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.article thead th, .article tr > th:first-child { background: var(--cream); font-weight: 900; }
.article thead { border-bottom: 2px solid var(--ink); }

/* コード（あまり使わない想定） */
.article code { font-size: .9em; background: var(--cream); border-radius: 4px; padding: 1px 6px; }
.article pre { margin: 0 0 1.6em; padding: 18px 20px; background: var(--ink); color: var(--paper); border-radius: 14px; overflow-x: auto; font-size: 15px; line-height: 1.7; }
.article pre code { background: none; padding: 0; }

/* 複数ページに分けた記事のページ送り */
.post-pages { margin: 2em 0; font-weight: 700; }


/* ---------- 7. 記事：右の欄（PCでは画面の上にとどまる） ---------- */
.post-side { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 24px; }

/* 目次 */
.toc { background: var(--white); border: 2px solid var(--ink); border-radius: 18px; padding: 20px 24px; }
.toc__title { margin-bottom: 6px; font-weight: 900; font-size: 16px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li + li { border-top: 1px dashed #D9C9AC; }
.toc a { display: block; padding: 8px 0; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 700; line-height: 1.6; }
.toc a:hover { color: var(--orange-text); }

/* この記事を書いた人 */
.writer { background: var(--white); border: 2px solid var(--ink); border-radius: 18px; padding: 24px; text-align: center; }
.writer__pic { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 2px solid var(--ink); }
.writer__label { margin-top: 10px; font-size: 13px; color: var(--muted); }
.writer__name { font-size: 19px; font-weight: 900; }
.writer__text { margin-top: 6px; font-size: 14px; line-height: 1.8; text-align: left; }


/* ---------- 8. 記事：終わりの小さなご相談 ---------- */
.post-consult { margin-top: 2em; background: var(--cream); border: 2px solid var(--ink); border-radius: 20px; padding: 28px 30px; display: flex; align-items: center; gap: 24px; }
.post-consult__chara { width: 110px; flex: none; }
.post-consult .post-consult__text { margin: 0; font-size: 19px; font-weight: 900; line-height: 1.6; }
.post-consult .btn-main { margin-top: 12px; min-height: 52px; text-decoration: none; }


/* ---------- 9. 記事：ほかの記事 ---------- */
.post-more { background: var(--white); border-top: 3px solid var(--ink); padding-block: 70px; }
.post-more__title { font-size: 30px; font-weight: 900; line-height: 1.4; }
.post-more__list { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mini-card { display: flex; gap: 16px; align-items: center; padding: 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); text-decoration: none; }
.mini-card:hover { background: var(--cream); color: var(--ink); }
.mini-card .eye--mini { width: 80px; height: 70px; flex: none; background: none; border-radius: 10px; }
.mini-card .eye--mini .eye__illust { width: 80px; height: 70px; object-fit: contain; }
.mini-card__title { font-weight: 700; font-size: 16px; line-height: 1.6; }


/* ---------- 10. スマホ ---------- */

/* 900px以下：一覧は2列、記事は1列（目次 → 本文 → 書いた人） */
@media (max-width: 900px) {
	.post-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
	.post-card--lead { flex-direction: column; }
	.post-card--lead .eye--lead { width: 100%; min-height: 240px; border-right: 0; border-bottom: 2px solid var(--ink); }
	.post-card--lead .eye--lead .eye__illust { height: 170px; }
	.post-card--lead .post-card__body { padding: 26px 26px 30px; }
	.post-card--lead .post-card__title { font-size: 24px; }

	.post-body { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 36px; }
	/* 右の欄の箱をほどいて、目次と書いた人をそれぞれ並べ替える */
	.post-side { display: contents; }
	.toc { order: -1; }
	.writer { order: 1; display: grid; grid-template-columns: 80px 1fr; gap: 4px 18px; align-items: center; text-align: left; }
	.writer__pic { width: 80px; height: 80px; grid-row: span 2; }
	.writer__label { margin-top: 0; align-self: end; }
	.writer__name { align-self: start; }
	.writer__text { grid-column: 1 / -1; margin-top: 10px; }

	.post-more__list { grid-template-columns: 1fr; gap: 14px; }
}

/* 767px以下：スマホ。余裕を重視（本文17px・押せる所48px以上） */
@media (max-width: 767px) {
	.blog-cats { gap: 8px; padding-top: 28px; }
	.blog-cat { min-height: 48px; padding: 0 18px; }
	.blog-list { padding-top: 28px; padding-bottom: 72px; }
	.post-grid { grid-template-columns: 1fr; gap: 20px; }
	.post-card .eye--card { height: 170px; }
	.post-card .eye--card .eye__illust { height: 124px; }
	.post-card--lead { margin-bottom: 20px; }
	.post-card--lead .eye--lead { min-height: 200px; }
	.post-card--lead .eye--lead .eye__illust { height: 150px; }
	.post-card--lead .post-card__body { padding: 22px 22px 26px; }
	.post-card--lead .post-card__title { font-size: 21px; }
	.post-meta { font-size: 13px; }

	.search-form { flex-direction: column; }
	.search-form .btn-main { width: 100%; }

	.post-head { padding-top: 28px; }
	.post-crumb { margin-bottom: 12px; }
	.post-title { font-size: 25px; }
	.post-head .eye--hero { margin-top: 22px; height: 220px; gap: 20px; border-radius: 18px; }
	.post-head .eye--hero .eye__illust { height: 140px; }
	.post-head .eye--hero .eye__chara { height: 150px; }

	.post-body { padding-bottom: 72px; }
	.article { font-size: 17px; line-height: 1.95; }
	.article h2 { font-size: 23px; margin-top: 2em; }
	.article h3 { font-size: 19px; }
	.article h4 { font-size: 17px; }
	.article blockquote { padding: 14px 18px; }
	.article table { font-size: 15px; }
	.article th, .article td { padding: 10px 12px; }

	.toc { padding: 18px 20px; }
	.toc a { padding: 12px 0; font-size: 16px; } /* 押しやすく（高さ48px前後） */

	.post-consult { flex-direction: column; text-align: center; padding: 26px 20px; gap: 14px; }
	.post-consult__chara { width: 96px; }
	.post-consult .btn-main { width: 100%; }

	.post-more { padding-block: 56px; }
	.post-more__title { font-size: 25px; }
	.mini-card { min-height: 64px; }
}

/* ---------- サムネイル画像（アイキャッチ）がある記事は、画像の形（1200×630）のまま見せる ----------
   ・サムネイルには文字やキャラが入っているので、枠の形に合わせて切ると欠けてしまう
   ・横幅に合わせて高さを決める（aspect-ratio）。イラストだけの記事（画像なし）は今まで通り */
.post-head .eye--hero.eye--photo { height: auto; aspect-ratio: 1200 / 630; }
.post-card .eye--card.eye--photo { height: auto; aspect-ratio: 1200 / 630; }
.post-card--lead .eye--lead.eye--photo { width: 560px; min-height: 0; aspect-ratio: 1200 / 630; align-self: center; border-right: 0; }
/* 画像の高さが文章より低いときも、区切り線は上から下まで通す（線は文章の側に付ける） */
.post-card--lead .eye--photo + .post-card__body { border-left: 2px solid var(--ink); align-self: stretch; }
@media (max-width: 900px) {
	.post-card--lead .eye--lead.eye--photo { width: 100%; border-bottom: 2px solid var(--ink); }
	.post-card--lead .eye--photo + .post-card__body { border-left: 0; }
}
@media (max-width: 767px) {
	.post-head .eye--hero.eye--photo { height: auto; }
	.post-card .eye--card.eye--photo { height: auto; }
	.post-card--lead .eye--lead.eye--photo { min-height: 0; }
}
