/*
Theme Name: KIDPORCH
Theme URI: https://kidporch.com
Author: hyodorantaro
Description: KIDPORCH（kidporch.com）専用テーマ。生成りの紙に明朝の見出しを組んだ、表紙のあるレイアウト。
Version: 1.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kidporch
*/

/* ============================================================
   KIDPORCH ─ 紙面型
   子育て中は長く読めないので、トップに「今日の表紙」を1枚だけ置いて、
   そこから下は罫線で区切った素直な一覧にしている。
   地色は生成りの紙、見出しは明朝、角は落とさない。
   ============================================================ */
:root {
	--ink:     #23201b;
	--sub:     #756c5e;
	--line:    #ddd4c2;
	--bg:      #f7f3ea;
	--card:    #fffdf7;
	--accent:  #4e7a35;
	--accent2: #b4532d;
	--footer:  #23201b;
	--wrap:    1180px;
	--serif:   "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "Shippori Mincho", serif;
	--gothic:  "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
	/* 写真だけごく浅く角を落とす。それ以外は直角のままにする。 */
	--r-photo: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font-family: var(--gothic);
	font-size: 16px; line-height: 1.95; overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.4; }
p { margin: 0 0 1em; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.d-wrap { display: block; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.t-right { text-align: right; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.d-skip { position: absolute; left: -9999px; }
.d-skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--accent); color: #fff; padding: 10px 16px; }

/* ---------- 検索 ---------- */
.c-search { display: flex; align-items: stretch; min-width: 0; }
.c-search-input {
	background: var(--bg); border: 1px solid var(--line); border-right: none; color: var(--ink);
	padding: 8px 12px; width: 200px; font-size: 13px; border-radius: 0;
}
.c-search-input::placeholder { color: var(--sub); }
.c-search-btn {
	background: var(--ink); border: 1px solid var(--ink); color: var(--bg);
	padding: 0 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 0;
}

/* ---------- パンくず ---------- */
.c-crumbs { font-size: 12px; color: var(--sub); padding-top: 16px; }
.c-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.c-crumbs li + li::before { content: "／"; margin-right: 6px; color: var(--line); }
.c-crumbs a:hover { color: var(--accent); }

/* ---------- バッジ・チップ ---------- */
/* 塗りつぶした札ではなく、細い枠で囲った見出し語にする。 */
.c-badge {
	display: inline-block; color: var(--badge-color, var(--accent));
	border: 1px solid currentColor; background: transparent;
	font-size: 12.5px; font-weight: 800; letter-spacing: .1em; padding: 4px 12px;
}
.c-badge:hover { background: var(--badge-color, var(--accent)); color: var(--card); }
.c-new {
	display: inline-block; background: var(--ink); color: var(--bg);
	font-size: 10px; font-weight: 800; letter-spacing: .14em; padding: 3px 8px;
}
/* 画像の無い記事の代わり。グラデーションではなく、無地にカテゴリ名を活字のように置く。 */
.c-thumb-fallback {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
}
.c-thumb-fallback span {
	color: var(--sub); font-size: 11px; font-weight: 800; letter-spacing: .22em;
	text-align: center; padding: 6px;
}
.c-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.c-chip { font-size: 11.5px; padding: 3px 10px; border: 1px solid var(--line); color: var(--sub); background: var(--card); }
.c-chip:hover { border-color: var(--accent); color: var(--accent); }
.c-chip-count { margin-left: 4px; opacity: .6; }
.c-count { font-size: 12px; color: var(--sub); margin-top: 8px; }
.c-post-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 30px; }

/* ---------- 出典・注意書き・共有 ---------- */
.c-source { margin-top: 26px; padding: 15px 18px; background: var(--bg); border-left: 3px solid var(--accent); font-size: 13px; }
.c-source-title { font-size: 11px; font-weight: 900; letter-spacing: .14em; color: var(--sub); margin: 0 0 6px; }
.c-source-note { color: var(--sub); }
.c-disclaimer { margin-top: 24px; padding: 15px 18px; background: var(--bg); border-left: 3px solid var(--line); font-size: 12.5px; color: var(--sub); }
.c-disclaimer-title { font-size: 11px; font-weight: 900; letter-spacing: .14em; color: var(--ink); margin: 0 0 6px; }
.c-disclaimer p:last-child { margin-bottom: 0; }
.c-share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.c-share-label { font-size: 11px; font-weight: 900; letter-spacing: .16em; color: var(--sub); }
.c-share-btn { font-size: 12.5px; padding: 7px 15px; border: 1px solid var(--line); background: var(--bg); }
.c-share-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- 関連記事 ---------- */
.c-related { margin-top: 44px; }
.c-block-title {
	font-family: var(--serif); font-size: 15px; letter-spacing: .18em; font-weight: 600;
	margin: 0 0 16px; padding-bottom: 9px; border-bottom: 1px solid var(--ink);
}
.c-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.c-related-item { display: block; }
.c-related-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; margin-bottom: 9px; border-radius: var(--r-photo); background: var(--card); }
.c-related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-related-body { display: block; }
.c-related-cat { display: block; font-size: 10.5px; color: var(--accent); font-weight: 900; letter-spacing: .1em; margin-bottom: 4px; }
.c-related-title { display: block; font-size: 14px; font-weight: 800; line-height: 1.6; }
.c-related-item:hover .c-related-title { color: var(--accent); }
.c-comments { margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--ink); }

/* ---------- サイドバー ---------- */
.d-side { display: flex; flex-direction: column; gap: 30px; }
.c-widget { background: transparent; border: none; padding: 0; }
.c-widget-title {
	font-family: var(--serif); font-size: 16px; letter-spacing: .16em; font-weight: 600;
	margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--ink);
}
.c-rank li { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.c-rank li:last-child { border-bottom: none; }
.c-rank-num {
	flex: none; width: 24px; height: 24px; margin-top: 4px; background: transparent; color: var(--ink);
	border: 1px solid var(--line);
	font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center;
}
.c-rank-link { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; flex: 1; min-width: 0; }
.c-rank-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-photo); background: var(--bg); }
.c-rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-rank-noimg { display: block; width: 100%; height: 100%; background: var(--line); }
.c-rank-title {
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
	font-size: 15px; font-weight: 700; line-height: 1.55;
}
.c-rank a:hover { color: var(--accent); }
/* カテゴリ一覧は、名前・件数・説明を1行ずつ落として索引のように見せる */
.c-cat-list li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.c-cat-list li:last-child { border-bottom: none; }
.c-cat-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 800; }
.c-cat-list a::before {
	content: ""; width: 3px; align-self: stretch; background: var(--badge-color, var(--accent)); flex: none;
}
.c-cat-list .c-cat-name { flex: 1; }
.c-cat-list a:hover { color: var(--badge-color, var(--accent)); }
.c-cat-count { font-size: 11px; color: var(--sub); font-weight: 500; }
/* 板の幅3px + 文字との間隔8px。上の名前と行頭をそろえる。 */
.c-cat-desc { display: block; font-size: 11.5px; color: var(--sub); padding-left: 11px; }

/* ---------- 記事本文 ---------- */
.d-content { overflow-wrap: anywhere; font-size: 16px; line-height: 2; }
.d-content > * + * { margin-top: 1.1em; }
.d-content h2 {
	font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 2em 0 .7em;
	padding-bottom: 8px; border-bottom: 1px solid var(--ink); letter-spacing: .04em;
}
.d-content h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; margin: 1.7em 0 .5em; color: var(--accent); }
.d-content ul li { list-style: disc; margin-left: 1.4em; margin-bottom: .4em; }
.d-content ol li { list-style: decimal; margin-left: 1.5em; margin-bottom: .4em; }
.d-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
/* 本文の写真は元の大きさを超えて引き伸ばさない。
   プレスリリースには小さな画像も混ざるため、拡大するとぼやけるため。 */
.d-content img { margin: 1.6em auto; max-width: 100%; height: auto; border-radius: var(--r-photo); }
.d-content figure { margin: 1.6em 0; text-align: center; }
.d-content figure img { margin: 0 auto; }
.d-content figcaption { font-size: 12px; color: var(--sub); margin-top: 8px; }
.d-content table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.d-content th, .d-content td { border: 1px solid var(--line); padding: 10px 13px; text-align: left; }
.d-content th { background: var(--bg); width: 30%; }
.d-content blockquote { border-left: 3px solid var(--accent); padding: 12px 18px; background: var(--bg); color: var(--sub); }
.d-content code { background: var(--bg); padding: 2px 6px; font-size: .92em; }

/* ---------- 固定ページ・404 ---------- */
/* 記事の先頭に置く写真。小さい画像は引き伸ばさず、下地の上で中央に置く */
.d-single-thumb { background: var(--bg); text-align: center; }
.d-single-thumb img { margin: 0 auto; }

.c-page { padding: 36px 0 66px; }
.c-page-inner { max-width: 760px; margin: 0 auto; background: var(--card); padding: 34px 40px 44px; border: 1px solid var(--line); }
.c-page-title {
	font-family: var(--serif); font-size: 28px; font-weight: 600; margin: 0 0 22px;
	padding-bottom: 14px; border-bottom: 1px solid var(--ink); letter-spacing: .04em;
}
.c-page-body { overflow-wrap: anywhere; font-size: 16px; line-height: 2; }
.c-page-body h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 1.8em 0 .5em; color: var(--accent); }
.c-page-body ul li { list-style: disc; margin-left: 1.4em; margin-bottom: .3em; }
.c-page-body a { color: var(--accent); text-decoration: underline; }
.c-404 { text-align: center; }
.c-404-code { font-family: var(--serif); font-size: 70px; font-weight: 600; color: var(--accent); margin: 0; line-height: 1; }
.c-404 .c-search { justify-content: center; margin: 20px 0; }
.c-404-home { color: var(--accent); text-decoration: underline; font-weight: 800; }

/* ---------- 一覧の見出し・ページ送り ---------- */
.d-arc-head { margin-bottom: 28px; padding-bottom: 16px; border-bottom: 3px double var(--line); }
.d-arc-head h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: .04em; margin: 0 0 8px; }
.d-arc-head p { color: var(--sub); font-size: 14px; margin: 0; max-width: 46em; }
.d-empty { background: var(--card); border: 1px solid var(--line); padding: 40px 20px; text-align: center; color: var(--sub); }
.d-pager { margin-top: 34px; }
.d-pager .page-numbers {
	display: inline-block; min-width: 38px; text-align: center; padding: 8px 12px; margin: 0 4px 6px 0;
	background: var(--card); border: 1px solid var(--line); font-size: 14px;
	font-variant-numeric: tabular-nums;
}
.d-pager .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.d-pager .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 900; }

/* ---------- トップの表紙 ---------- */
.d-cover { background: var(--card); border-bottom: 1px solid var(--ink); }
.d-cover-inner { padding: 28px 0 36px; }

/* 大きい1本と、右に続く次点。境目は罫線1本だけで分ける。 */
.d-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 32px; }
.d-hero-main { position: relative; }
.d-hero-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg); margin-bottom: 18px; border-radius: var(--r-photo); }
.d-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.d-hero-meta { display: flex; align-items: center; gap: 14px; margin: 0 0 10px; font-size: 11.5px; color: var(--sub); }
.d-hero-cat {
	position: relative; z-index: 1; font-weight: 800; letter-spacing: .14em; color: var(--c, var(--accent));
}
/* カテゴリ名の前に短い罫を引いて、色を面ではなく線で見せる */
.d-hero-cat::before {
	content: ""; display: inline-block; width: 16px; height: 2px; vertical-align: middle;
	background: currentColor; margin-right: 9px; margin-bottom: 2px;
}
.d-hero-title {
	font-family: var(--serif); font-weight: 600; letter-spacing: .03em;
	font-size: clamp(22px, 3vw, 33px); line-height: 1.5; margin: 0 0 14px;
}
.d-hero-title a::after { content: ""; position: absolute; inset: 0; }
.d-hero-ex { margin: 0; font-size: 14px; line-height: 1.95; color: var(--sub); }
.d-hero-main:hover .d-hero-title { color: var(--accent); }

.d-hero-side { border-left: 1px solid var(--line); padding-left: 32px; }
.d-hero-side-label {
	font-family: var(--serif); margin: 0 0 14px; font-size: 14px; font-weight: 600;
	letter-spacing: .18em; color: var(--sub);
}
/* 次点は写真を右に小さく置いて、大見出しと役割を分ける */
.d-hero-item {
	position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 18px;
	padding: 20px 0; border-top: 1px solid var(--line);
}
.d-hero-item-thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg); border-radius: var(--r-photo); }
.d-hero-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.d-hero-item-title { font-size: 16.5px; font-weight: 800; line-height: 1.6; margin: 0; }
.d-hero-item-title a::after { content: ""; position: absolute; inset: 0; }
.d-hero-item:hover .d-hero-item-title { color: var(--accent); }

/* ---------- 一覧とサイドバー ---------- */
.d-main { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; padding: 36px 0 66px; }
.d-feed { min-width: 0; }
.d-h2 {
	font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: .2em;
	margin: 0 0 10px; padding-bottom: 12px; border-bottom: 1px solid var(--ink);
}

/* ---------- 記事ページ ---------- */
.d-single-wrap { padding: 28px 0 66px; }
.d-single-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; }
.d-single { min-width: 0; background: var(--card); border: 1px solid var(--line); padding: 34px 40px 42px; }
.d-single-head { margin-bottom: 22px; }
.d-badges { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.d-single-head h1 {
	font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: .03em;
	line-height: 1.5; margin: 0 0 14px;
}
.d-single-meta { display: flex; flex-wrap: wrap; gap: 15px; font-size: 12px; color: var(--sub); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.d-single-thumb { margin: 0 0 24px; border-radius: var(--r-photo); overflow: hidden; }
.d-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; font-size: 13.5px; }
.d-postnav a { display: block; padding: 13px 16px; background: var(--bg); border: 1px solid var(--line); }
.d-postnav a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- フッター ----------
   ロゴとメディアコンセプトを横並び。カテゴリは一段下。 */
.d-footer {
	background: var(--card);
	color: var(--sub);
	border-top: 3px double var(--ink);
	padding: 40px 0 28px;
}
.d-footer a { color: var(--sub); }
.d-footer a:hover { color: var(--ink); }
.d-footer-brand {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 28px 36px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--line);
}
.d-footer-logo { display: block; line-height: 0; flex: none; }
.d-footer-logo img {
	display: block; height: 108px; width: auto; max-width: min(420px, 48vw);
	background: transparent; padding: 0;
}
.d-footer-concept {
	min-width: 0; flex: 1 1 auto;
	padding-left: 28px;
	border-left: 1px solid var(--line);
}
.d-footer-tagline {
	font-family: var(--serif); margin: 0 0 10px; font-size: 18px; font-weight: 600;
	letter-spacing: .08em; color: var(--ink); line-height: 1.45;
}
.d-footer-summary {
	margin: 0; font-size: 13px; line-height: 1.85; color: var(--sub); max-width: 42em;
}
.d-footer-cats {
	padding: 16px 0 0;
}
.d-footer-cats ul { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; margin: 0; padding: 0; }
.d-footer-cats a {
	display: block; font-size: 12.5px; font-weight: 700; padding: 4px 0;
	color: var(--sub); border-bottom: 2px solid transparent;
}
.d-footer-cats a:hover { color: var(--ink); border-bottom-color: var(--cat-color, var(--accent)); }
.d-footer-bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 10px 20px; margin-top: 18px; padding-top: 16px;
	border-top: 1px solid var(--line);
}
.d-footer-copy { font-size: 12px; margin: 0; color: var(--sub); }
.d-totop { font-size: 12px; letter-spacing: .06em; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}


/* ============================================================
   仕上げの層 ─ 文字組み・動き・操作の手がかり
   サイトごとの色と形はそのままに、読み心地と操作感だけを底上げする。
   全サイトで同じ内容が入っている（生成元は _generator/newskins.py）。
   ============================================================ */
:root {
	--ease: cubic-bezier(.22, .68, .2, 1);
	--dur:  .26s;
}

/* ---------- 日本語の字組み ----------
   「」（）などの約物は左右に余白を持っているため、そのままだと
   見出しが間延びする。palt で詰めて、行頭・行末のそろいを良くする。 */
h1, h2, h3,
.c-badge, .c-new, .c-chip, .c-widget-title,
.c-rank-title, .c-related-title,
.d-content, .c-page-body {
	font-feature-settings: "palt" 1;
}
/* 見出しは行ごとの長さがそろうように折り返す */
h1, h2, h3 { text-wrap: balance; }
/* 本文は最後の1行が1文字だけ残らないようにする */
p, li, figcaption, .c-rank-title, .c-related-title { text-wrap: pretty; }
/* 日付・件数・順位の数字は幅をそろえて、縦に並べたときにずれないようにする */
time, .c-count, .c-rank-num, .c-cat-count, .c-chip-count, .d-pager .page-numbers {
	font-variant-numeric: tabular-nums;
}

/* ---------- 動き ----------
   速さと曲線を1か所にまとめ、サイト間でばらつかないようにする。 */
a, button, input, .c-chip, .c-badge {
	transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease),
		border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
main article {
	transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
		border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
main article:hover { transform: translateY(-3px); }
main article img { transition: transform .55s var(--ease); }

/* 画面に入ってきた記事を、下から少しだけ持ち上げて出す。
   transform ではなく translate を使うのは、ホバーの持ち上げと衝突させないため。 */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		main article {
			animation: pol-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 40%;
		}
		@keyframes pol-rise {
			from { opacity: 0; translate: 0 16px; }
			to   { opacity: 1; translate: none; }
		}
	}
}
@media (prefers-reduced-motion: reduce) {
	main article, main article img, a, button { transition: none; }
	main article:hover { transform: none; }
}

/* ---------- 操作の手がかり ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }
.c-search-input:focus {
	outline: none; border-color: var(--accent); position: relative; z-index: 1;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.c-search-btn:hover { filter: brightness(1.08); }

/* ---------- 写真 ----------
   白地の商品写真は輪郭が消えるので、内側に細い線を1本回す。 */
.c-rank-thumb, .c-related-thumb { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }

/* ---------- 読み物としての細部 ---------- */
.d-content a {
	text-decoration-thickness: 1px; text-underline-offset: 4px;
	text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
	transition: text-decoration-color var(--dur) var(--ease);
}
.d-content a:hover { text-decoration-color: var(--accent); }
.d-content h2, .d-content h3 { letter-spacing: .005em; }
.d-content > p:first-of-type { font-size: 1.04em; }
.c-rank li { align-items: flex-start; }
.c-rank-num { flex: none; }

/* ---------- ページ送り ----------
   指で押す前提で、当たり判定を大きく取る。 */
.d-pager .page-numbers {
	min-height: 42px; min-width: 42px;
	display: inline-flex; align-items: center; justify-content: center;
}
.d-pager .page-numbers:not(.current):hover { transform: translateY(-1px); }

@media (max-width: 560px) {
	.d-pager .page-numbers { min-height: 44px; min-width: 44px; }
}


/* ============================================================
   KIDPORCH の個性 ─ 縁側の板と、紙の手ざわり
   ============================================================ */

/* 見出しの明朝は、太らせると潰れる。字面を太くせず、字間で強さを出す。 */
.d-hero-title, .d-hero-side-label,
.d-h2, .c-widget-title, .c-block-title, .c-page-title,
.d-arc-head h1, .d-single-head h1, .d-content h2, .d-content h3,
.c-page-body h2, .d-footer-tagline {
	font-family: var(--serif);
}

/* 一覧の行は、浮かせずに地色を変えるだけにする。
   罫線で区切った紙面なので、1行だけ持ち上がると段が崩れて見えるため。 */
main article:hover { transform: none; }

/* ---------- ヘッダー ---------- */
.d-header {
	background: var(--card);
	border-bottom: 1px solid var(--ink);
}
.d-header-top {
	display: flex; align-items: center; justify-content: space-between; gap: 20px;
	padding-top: 16px; padding-bottom: 16px;
}
.d-brand-block {
	display: flex; align-items: center; flex-wrap: nowrap; gap: 16px 20px;
	min-width: 0; flex: 1 1 auto;
}
.d-brand { display: block; flex: none; line-height: 0; }
.d-brand-logo {
	display: block; height: 88px; width: auto; max-width: min(400px, 48vw);
}
.d-header-tagline {
	margin: 0; font-family: var(--serif); font-size: 15px; font-weight: 600;
	letter-spacing: .06em; color: var(--sub); line-height: 1.35;
	padding-left: 20px; border-left: 1px solid var(--line);
	white-space: nowrap; flex: none;
}

/* 右上：検索 */
.d-header-tools {
	display: flex; flex-direction: column; align-items: flex-end; gap: 0;
	margin-left: auto; min-width: 0; flex: none;
}
.d-header-search { flex: none; }

/* カテゴリは罫線で挟んだ1本の行。中央寄せで雑誌の目次のように見せる */
.d-header-nav {
	border-top: 1px solid var(--line);
	background: color-mix(in srgb, var(--bg) 65%, var(--card));
}
.d-nav { min-width: 0; }
.d-nav ul {
	display: flex; justify-content: center; gap: 8px 28px;
	overflow-x: auto; scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.d-nav ul::-webkit-scrollbar { display: none; }
.d-nav a {
	display: block; white-space: nowrap; padding: 9px 2px 8px;
	font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--sub);
	border-bottom: 3px solid transparent;
}
.d-nav a:hover { color: var(--ink); border-bottom-color: var(--c, var(--accent)); }
.d-nav a.is-on { color: var(--ink); border-bottom-color: var(--c, var(--accent)); }

/* ---------- 一覧の行：縁側の板 ----------
   サイト名のとおり、行の左端に細い板を1枚立てる。
   板の色はカテゴリの色で、上から見たときの目印にもなる。 */
.d-row {
	position: relative; background: transparent;
	border: none; border-bottom: 1px solid var(--line); border-left: 5px solid var(--c, var(--accent));
	margin: 0;
}
.d-row-link { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; padding: 28px 12px 28px 26px; align-items: center; }
.d-row-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-photo); background: var(--bg); }
.d-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.d-row-body { min-width: 0; }
.d-row-top { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-bottom: 12px; }
.d-row-top a { position: relative; z-index: 1; }
.d-row-title { font-size: 22px; font-weight: 800; line-height: 1.55; margin: 0 0 12px; }
.d-row-title a::after { content: ""; position: absolute; inset: 0; }
.d-row-date { font-size: 13.5px; color: var(--sub); }
.d-row:hover { background: var(--card); }
.d-row:hover .d-row-title { color: var(--accent); }

/* 長い英数字やURLでカードが横にはみ出さないようにする */
.d-row-title, .d-hero-title, .d-hero-item-title,
.d-single-head h1, .c-rank-title {
	overflow-wrap: anywhere;
}

/* ---------- 画面が狭いとき（このブロックはファイル末尾に置く） ----------
   上の基本スタイルよりあとに書く。先に書くとヘッダー／カードの指定に上書きされる。 */
@media (max-width: 1040px) {
	.d-main, .d-single-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 28px; padding-bottom: 52px; }
	.d-hero { grid-template-columns: 1fr; gap: 26px; }
	.d-hero-side { border-left: none; padding-left: 0; border-top: 3px double var(--line); padding-top: 22px; }
	.d-row-link { grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding: 22px 8px 22px 18px; }
	.d-row-title { font-size: 19px; }
	.d-hero-item { grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; }
	.d-hero-item-title { font-size: 15.5px; }
}
@media (max-width: 900px) {
	.c-related-grid { grid-template-columns: 1fr 1fr; }
	.d-header-top {
		flex-wrap: nowrap; gap: 12px; padding-top: 10px; padding-bottom: 10px;
		align-items: center;
	}
	.d-brand-block { gap: 12px; }
	.d-brand { flex: none; min-width: 0; }
	.d-brand-logo { height: 48px; max-width: min(210px, 48vw); }
	.d-header-tools { gap: 0; }
	.d-header-tagline { display: none; }
	.d-header-search { flex: none; margin-left: 0; }
	.c-search-input { width: 120px; max-width: 32vw; font-size: 12px; padding: 6px 10px; }
	.c-search-btn { padding: 6px 10px; }
	.d-nav { margin: 0 -4px; }
	.d-nav ul {
		gap: 14px; padding: 0 4px;
		-webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
	}
	.d-nav a { padding: 7px 0 6px; font-size: 12.5px; }
	.d-footer { padding: 32px 0 24px; }
	.d-footer-brand { gap: 20px 24px; padding-bottom: 18px; }
	.d-footer-logo img { height: 96px; max-width: min(360px, 48vw); }
	.d-footer-concept { padding-left: 22px; }
	.d-footer-tagline { font-size: 16px; }
	.d-footer-summary { font-size: 12.5px; }
	.d-cover-inner { padding: 22px 0 28px; }
	.d-hero-title { font-size: clamp(20px, 5vw, 28px); }
	.d-single { padding: 26px 22px 32px; }
	.d-single-head h1 { font-size: 24px; }
}
@media (max-width: 560px) {
	body { font-size: 15px; }
	.d-wrap { padding: 0 14px; }
	.c-related-grid { grid-template-columns: 1fr; }
	.c-page-inner { padding: 22px 16px 28px; }
	.c-page-title { font-size: 22px; }
	.d-arc-head { margin-bottom: 20px; padding-bottom: 12px; }
	.d-arc-head h1 { font-size: 21px; }
	.d-content { font-size: 15px; }
	.d-content h2 { font-size: 18px; }
	.d-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
	.d-totop { margin-left: 0; }
	.d-main, .d-single-grid { gap: 28px; padding-top: 22px; padding-bottom: 44px; }
	.d-cover-inner { padding: 18px 0 24px; }
	.d-hero-media { aspect-ratio: 16 / 9; margin-bottom: 12px; }
	.d-hero-title { font-size: 19px; margin-bottom: 0; }
	.d-hero-ex { display: none; }
	.d-hero-meta { gap: 10px; margin-bottom: 8px; font-size: 11px; flex-wrap: wrap; }
	.d-hero-cat::before { width: 12px; margin-right: 7px; }
	.d-hero-side { padding-top: 16px; }
	.d-hero-side-label { font-size: 13px; margin-bottom: 8px; letter-spacing: .14em; }
	.d-hero-item { grid-template-columns: minmax(0, 1fr) 72px; gap: 12px; padding: 14px 0; }
	.d-hero-item-title { font-size: 14.5px; line-height: 1.55; }
	.d-h2 { font-size: 17px; letter-spacing: .14em; margin-bottom: 4px; padding-bottom: 10px; }
	.d-row { border-left-width: 4px; }
	.d-row-link { grid-template-columns: 140px minmax(0, 1fr); gap: 14px; padding: 18px 2px 18px 14px; align-items: start; }
	.d-row-title { font-size: 17.5px; line-height: 1.5; margin-bottom: 8px; }
	.d-row-top { margin-bottom: 8px; gap: 6px; }
	.d-row-date { font-size: 12.5px; }
	.c-badge { font-size: 11px; padding: 2px 8px; letter-spacing: .06em; }
	/* スマホ：ロゴ＋検索を1行に。タグラインは出さない */
	.d-header-top {
		flex-wrap: nowrap; gap: 8px; padding-top: 8px; padding-bottom: 8px;
	}
	.d-brand { flex: 1 1 auto; min-width: 0; }
	.d-brand-logo { height: 44px; max-width: min(200px, 56vw); }
	.d-header-tools {
		flex: none; align-items: flex-end; gap: 0;
	}
	.d-header-tagline { display: none; }
	.d-header-search { flex: none; margin-left: 0; }
	.c-search { width: auto; }
	.c-search-input {
		width: 96px; max-width: 30vw; flex: none; min-width: 0;
		padding: 5px 8px; font-size: 12px;
	}
	.c-search-btn { padding: 5px 8px; }
	.d-nav ul { gap: 12px; }
	.d-nav a { font-size: 12px; padding: 6px 0 5px; }
	.d-single { padding: 18px 14px 24px; }
	.d-single-head h1 { font-size: 20px; }
	.d-single-meta { gap: 10px; font-size: 11.5px; }
	.d-postnav { grid-template-columns: 1fr; }
	.c-rank-link { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
	.c-rank-title { font-size: 14.5px; }
	.c-widget-title { font-size: 15px; letter-spacing: .14em; }
	.d-footer { padding: 26px 0 20px; }
	.d-footer-brand {
		flex-wrap: wrap; align-items: flex-start; gap: 14px 0; padding-bottom: 16px;
	}
	.d-footer-logo img { height: 88px; max-width: min(340px, 88vw); }
	.d-footer-concept {
		flex: 1 1 100%; padding-left: 0; border-left: none;
		padding-top: 12px; border-top: 1px solid var(--line);
	}
	.d-footer-tagline { font-size: 15px; margin-bottom: 8px; }
	.d-footer-summary { font-size: 12px; }
	.d-footer-cats { padding-top: 14px; }
	.d-footer-cats ul { gap: 2px 14px; }
	.d-footer-bar { margin-top: 14px; padding-top: 14px; }
	.d-pager .page-numbers { min-height: 44px; min-width: 44px; }
}
@media (max-width: 380px) {
	.d-wrap { padding: 0 12px; }
	.d-brand-logo { height: 40px; max-width: min(180px, 52vw); }
	.c-search-input { width: 84px; max-width: 28vw; padding: 4px 7px; }
	.d-footer-logo img { height: 80px; max-width: min(300px, 90vw); }
	.d-row-link { grid-template-columns: 124px minmax(0, 1fr); gap: 12px; padding: 16px 0 16px 12px; }
	.d-row-title { font-size: 16.5px; }
	.d-hero-item { grid-template-columns: minmax(0, 1fr) 64px; }
	.d-hero-title { font-size: 17.5px; }
}

