/*
Theme Name: 子育てまなび
Theme URI: https://kosodate-manabi.com/
Author: 子育てまなび編集部
Description: 小中高生の保護者向け比較ブログ「子育てまなび」用のクラシックテーマ。カード型の記事一覧、色を変えられる見出し、ボックス装飾、自動目次、吹き出し・ボタンのショートコードに対応。
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kosodate-manabi
Tags: blog, two-columns, right-sidebar, left-sidebar, custom-colors, custom-logo, custom-header, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   0. 変数（カスタマイザーの値は wp_head で上書きされる）
   ========================================================================== */
:root {
	--km-main: #26806f;
	--km-main-light: #dcece9;
	--km-main-pale: #eef6f4;
	--km-on-main: #ffffff;
	--km-accent: #c94f17;
	--km-accent-dark: #a9410f;
	--km-on-accent: #ffffff;
	--km-bg: #f7f6f2;
	--km-link: #1d6aa5;
	--km-text: #333333;
	--km-text-sub: #5f6368;
	--km-line: #e2e0da;
	--km-surface: #ffffff;
	--km-radius: 8px;
	--km-font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
	--km-container: 1160px;
	--km-sidebar: 300px;
}

/* ==========================================================================
   1. ベース
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 16px;
}

body {
	margin: 0;
	background: var(--km-bg);
	color: var(--km-text);
	font-family: var(--km-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.8;
	letter-spacing: 0.03em;
	word-break: normal;
	overflow-wrap: anywhere;
	line-break: strict;
}

img,
video,
iframe {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

a {
	color: var(--km-link);
	text-underline-offset: 3px;
}

a:hover {
	text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
	outline: 3px solid var(--km-link);
	outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.45;
	font-weight: 700;
	margin: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 12px 16px;
	background: var(--km-surface);
	color: var(--km-text);
	border-radius: var(--km-radius);
}

.container {
	width: 100%;
	max-width: var(--km-container);
	margin: 0 auto;
	padding: 0 16px;
}

/* ==========================================================================
   2. ヘッダー
   ========================================================================== */
.site-header {
	background: var(--km-surface);
	border-bottom: 1px solid var(--km-line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 64px;
	position: relative;
}

.site-branding {
	padding: 12px 0;
	min-width: 0;
}

.site-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.06em;
}

.site-title a {
	color: var(--km-text);
	text-decoration: none;
}

.site-description {
	margin: 0;
	font-size: 12px;
	color: var(--km-text-sub);
	line-height: 1.5;
}

.custom-logo-link {
	display: inline-block;
}

.custom-logo {
	max-height: 48px;
	width: auto;
}

/* ハンバーガー（モバイル） */
.menu-toggle {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 48px;
	height: 48px;
	margin-right: -8px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: var(--km-radius);
	color: var(--km-text);
	cursor: pointer;
	flex-shrink: 0;
}

.menu-toggle__bars {
	position: relative;
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	transition: background 0.2s;
}

.menu-toggle__bars::before,
.menu-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 22px;
	height: 2px;
	background: currentColor;
	transition: transform 0.2s;
}

.menu-toggle__bars::before { top: -7px; }
.menu-toggle__bars::after { top: 7px; }

.menu-toggle__label {
	font-size: 10px;
	line-height: 1;
	margin-top: 8px;
	letter-spacing: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

.global-nav {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 50;
	background: var(--km-surface);
	border-top: 1px solid var(--km-line);
	border-bottom: 1px solid var(--km-line);
}

.global-nav.is-open {
	display: block;
}

.global-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.global-nav__list {
	padding: 8px 16px 16px;
}

.global-nav a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 8px 4px;
	color: var(--km-text);
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
}

.global-nav .sub-menu a {
	padding-left: 20px;
	font-weight: 400;
}

.global-nav .current-menu-item > a,
.global-nav a:hover {
	color: var(--km-main);
}

/* ヘッダー画像 */
.site-hero {
	background: var(--km-surface);
}

.site-hero img {
	display: block;
	width: 100%;
	max-height: 420px;
	object-fit: cover;
}

/* お知らせ */
.site-notice {
	background: var(--km-main-pale);
	color: var(--km-text);
}

.site-notice__inner {
	padding-top: 12px;
	padding-bottom: 12px;
	font-size: 14px;
	line-height: 1.7;
}

.site-notice__inner p {
	margin: 0;
}

.site-notice__label {
	display: inline-block;
	margin-right: 8px;
	padding: 0 8px;
	border-radius: 4px;
	background: var(--km-main);
	color: var(--km-on-main);
	font-size: 12px;
	font-weight: 700;
	line-height: 24px;
}

/* ==========================================================================
   3. レイアウト
   ========================================================================== */
.site-content {
	padding: 24px 0 56px;
}

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
}

.site-main {
	min-width: 0;
}

/* ==========================================================================
   4. パンくず
   ========================================================================== */
.breadcrumb {
	margin: 0 0 16px;
	font-size: 12px;
	color: var(--km-text-sub);
	line-height: 1.6;
}

.breadcrumb ol {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0 4px;
}

.breadcrumb li:not(:last-child)::after {
	content: "›";
	margin-left: 4px;
	color: var(--km-text-sub);
}

.breadcrumb a {
	color: var(--km-text-sub);
}

/* ==========================================================================
   5. 記事一覧（カード／リスト）
   ========================================================================== */
.section-title {
	margin: 0 0 16px;
	font-size: 20px;
	font-weight: 700;
}

.archive-header {
	margin-bottom: 24px;
}

.archive-header__title {
	font-size: 24px;
}

.archive-header__desc {
	margin-top: 8px;
	color: var(--km-text-sub);
	font-size: 14px;
}

.archive-header__desc p {
	margin: 0;
}

.post-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

.post-card {
	background: var(--km-surface);
	border-radius: var(--km-radius);
	overflow: hidden;
}

.post-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: var(--km-text);
	text-decoration: none;
}

.post-card__thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--km-main-light);
	overflow: hidden;
}

.post-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.2s;
}

.post-card__link:hover .post-card__thumb img {
	opacity: 0.85;
}

.post-card__noimage {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--km-main);
	font-size: 14px;
	font-weight: 700;
}

.post-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	flex: 1;
}

.post-card__cat {
	align-self: flex-start;
	padding: 0 8px;
	border-radius: 4px;
	background: var(--km-main-pale);
	color: var(--km-main);
	font-size: 12px;
	font-weight: 700;
	line-height: 24px;
}

.post-card__title {
	font-size: 16px;
	line-height: 1.6;
}

.post-card__link:hover .post-card__title {
	color: var(--km-main);
}

.post-card__date {
	margin-top: auto;
	font-size: 12px;
	color: var(--km-text-sub);
}

.post-card__excerpt {
	display: none;
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
	color: var(--km-text-sub);
}

/* リスト表示 */
.km-list-list .post-card__link {
	flex-direction: row;
	align-items: stretch;
}

.km-list-list .post-card__thumb {
	flex: 0 0 120px;
	aspect-ratio: auto;
	min-height: 96px;
}

.km-list-list .post-card__body {
	padding: 12px 16px;
	gap: 4px;
}

.km-list-list .post-card__title {
	font-size: 15px;
}

/* ページ送り */
.pagination,
.navigation.pagination {
	margin-top: 40px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border-radius: var(--km-radius);
	background: var(--km-surface);
	color: var(--km-text);
	text-decoration: none;
	font-weight: 700;
}

.page-numbers.current {
	background: var(--km-main);
	color: var(--km-on-main);
}

.page-numbers.dots {
	background: transparent;
}

/* ==========================================================================
   6. 記事ページ
   ========================================================================== */
.entry {
	background: var(--km-surface);
	border-radius: var(--km-radius);
	padding: 24px 16px 32px;
}

.entry-header {
	margin-bottom: 24px;
}

.entry-cat {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.entry-cat a {
	display: inline-block;
	padding: 0 12px;
	border-radius: 4px;
	background: var(--km-main);
	color: var(--km-on-main);
	font-size: 12px;
	font-weight: 700;
	line-height: 28px;
	text-decoration: none;
}

.entry-title {
	font-size: 24px;
	line-height: 1.5;
	letter-spacing: 0.04em;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin-top: 12px;
	font-size: 13px;
	color: var(--km-text-sub);
}

.entry-meta__item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.entry-thumb {
	margin: 0 -16px 32px;
}

.entry-thumb img {
	display: block;
	width: 100%;
}

/* 本文 */
.entry-content {
	font-size: 16px;
	line-height: 1.9;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content p {
	margin: 0 0 24px;
}

.entry-content h2 {
	margin: 56px 0 24px;
	font-size: 21px;
	line-height: 1.5;
}

.entry-content h3 {
	margin: 40px 0 16px;
	font-size: 18px;
	line-height: 1.5;
}

.entry-content h4 {
	margin: 32px 0 12px;
	font-size: 16px;
	color: var(--km-main);
}

/* --- 見出しデザイン: 左線（既定） --- */
.km-h-leftline .entry-content h2 {
	padding: 12px 16px;
	background: var(--km-main-pale);
	border-left: 6px solid var(--km-main);
	border-radius: 0 4px 4px 0;
}

.km-h-leftline .entry-content h3 {
	padding: 2px 0 2px 12px;
	border-left: 4px solid var(--km-main);
}

/* --- 見出しデザイン: 背景帯 --- */
.km-h-band .entry-content h2 {
	padding: 12px 16px;
	background: var(--km-main);
	color: var(--km-on-main);
	border-radius: var(--km-radius);
}

.km-h-band .entry-content h3 {
	padding: 8px 12px;
	background: var(--km-main-pale);
	border-radius: 4px;
}

/* --- 見出しデザイン: 下線 --- */
.km-h-underline .entry-content h2 {
	padding: 0 0 12px;
	border-bottom: 3px solid var(--km-main);
}

.km-h-underline .entry-content h3 {
	padding: 0 0 8px;
	border-bottom: 1px solid var(--km-line);
}

/* 本文の要素 */
.entry-content a {
	color: var(--km-link);
}

.entry-content strong {
	font-weight: 700;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 24px;
	padding: 16px 16px 16px 40px;
	background: var(--km-main-pale);
	border-radius: var(--km-radius);
}

.entry-content li {
	margin: 0;
	line-height: 1.8;
}

.entry-content li + li {
	margin-top: 8px;
}

.entry-content li > ul,
.entry-content li > ol {
	margin: 8px 0 0;
	padding: 0 0 0 24px;
	background: transparent;
}

.entry-content ul li::marker {
	color: var(--km-main);
}

.entry-content ol li::marker {
	color: var(--km-main);
	font-weight: 700;
}

.entry-content blockquote {
	position: relative;
	margin: 0 0 24px;
	padding: 20px 20px 20px 48px;
	background: #f4f4f2;
	border-radius: var(--km-radius);
	color: var(--km-text-sub);
	font-size: 15px;
}

.entry-content blockquote::before {
	content: "\201C";
	position: absolute;
	top: 8px;
	left: 16px;
	font-size: 40px;
	line-height: 1;
	color: var(--km-main);
	font-family: Georgia, serif;
}

.entry-content blockquote p {
	margin: 0 0 12px;
}

.entry-content blockquote > :last-child {
	margin-bottom: 0;
}

.entry-content blockquote cite {
	display: block;
	margin-top: 0;
	font-size: 12px;
	font-style: normal;
}

.entry-content hr {
	margin: 40px 0;
	border: 0;
	border-top: 1px solid var(--km-line);
}

.entry-content figure {
	margin: 0 0 24px;
}

.entry-content figcaption,
.wp-caption-text {
	margin-top: 8px;
	font-size: 13px;
	color: var(--km-text-sub);
	text-align: center;
}

.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* テーブル（横スクロール） */
.table-wrap {
	margin: 0 0 24px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--km-radius);
	border: 1px solid var(--km-line);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 1.7;
	background: var(--km-surface);
}

.entry-content > table {
	margin: 0 0 24px;
}

.entry-content th,
.entry-content td {
	padding: 12px;
	border-bottom: 1px solid var(--km-line);
	text-align: left;
	vertical-align: top;
	min-width: 7em;
}

.entry-content th + th,
.entry-content td + td {
	border-left: 1px solid var(--km-line);
}

.entry-content thead th {
	background: var(--km-main);
	color: var(--km-on-main);
	font-weight: 700;
	white-space: nowrap;
	border-bottom: 0;
}

.entry-content thead th + th {
	border-left-color: rgba(255, 255, 255, 0.3);
}

.entry-content tbody tr:nth-child(even) td,
.entry-content tbody tr:nth-child(even) th {
	background: var(--km-main-pale);
}

.entry-content tbody tr:last-child td,
.entry-content tbody tr:last-child th {
	border-bottom: 0;
}

.entry-content tbody th {
	background: #f4f4f2;
}

.table-scroll-hint {
	display: none;
}

/* PR表記 */
.entry-content .pr-notice {
	margin: 0 0 24px;
	padding: 12px 16px;
	border-radius: 0 var(--km-radius) var(--km-radius) 0;
	font-size: 13px !important;
	line-height: 1.75;
	color: var(--km-text-sub);
}

/* --- ボックス装飾 --- */
.simple-box2,
.simple-box3,
.simple-box4,
.simple-box7 {
	margin: 0 0 24px;
	padding: 20px;
	border: 2px solid;
	border-radius: var(--km-radius);
	font-size: 15px;
	line-height: 1.85;
}

.simple-box2 > :first-child,
.simple-box3 > :first-child,
.simple-box4 > :first-child,
.simple-box7 > :first-child {
	margin-top: 0;
}

.simple-box2 > :last-child,
.simple-box3 > :last-child,
.simple-box4 > :last-child,
.simple-box7 > :last-child {
	margin-bottom: 0;
}

.simple-box2 p,
.simple-box3 p,
.simple-box4 p,
.simple-box7 p {
	margin: 0;
}

.simple-box2 p + p,
.simple-box3 p + p,
.simple-box4 p + p,
.simple-box7 p + p {
	margin-top: 12px;
}

.simple-box2 ul, .simple-box2 ol,
.simple-box3 ul, .simple-box3 ol,
.simple-box4 ul, .simple-box4 ol,
.simple-box7 ul, .simple-box7 ol {
	margin: 12px 0 0;
	padding: 0 0 0 24px;
	background: transparent;
}

.simple-box2 strong:first-child,
.simple-box3 strong:first-child,
.simple-box4 strong:first-child,
.simple-box7 strong:first-child {
	display: inline-block;
	margin-bottom: 4px;
	font-size: 16px;
}

/* 注意（赤） */
.simple-box2 {
	background: #fff5f4;
	border-color: #f0b7b1;
}
.simple-box2 strong:first-child { color: #b3261e; }

/* 補足（青） */
.simple-box3 {
	background: #f2f7fc;
	border-color: #b3cfec;
}
.simple-box3 strong:first-child { color: #17599a; }

/* 向いている人（緑） */
.simple-box4 {
	background: #f2f9f3;
	border-color: #b2d9b7;
}
.simple-box4 strong:first-child { color: #22693a; }

/* 結論（黄） */
.simple-box7 {
	background: #fffaeb;
	border-color: #ecd37d;
}
.simple-box7 strong:first-child { color: #7a5600; }

/* --- Q&A アコーディオン --- */
details.faq-item {
	margin: 0 0 12px;
	background: var(--km-surface);
	border: 1px solid var(--km-line);
	border-radius: var(--km-radius);
	overflow: hidden;
}

details.faq-item > summary {
	position: relative;
	display: block;
	min-height: 56px;
	padding: 16px 56px 16px 16px;
	cursor: pointer;
	list-style: none;
	font-size: 15px;
	line-height: 1.7;
	background: var(--km-main-pale);
}

details.faq-item > summary::-webkit-details-marker {
	display: none;
}

details.faq-item > summary strong {
	font-weight: 700;
}

details.faq-item > summary::before,
details.faq-item > summary::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 20px;
	width: 14px;
	height: 2px;
	margin-top: -1px;
	background: var(--km-main);
	transition: transform 0.2s;
}

details.faq-item > summary::after {
	transform: rotate(90deg);
}

details.faq-item[open] > summary::after {
	transform: rotate(0deg);
}

details.faq-item > summary:hover {
	color: var(--km-main);
}

details.faq-item > :not(summary) {
	margin: 0;
	padding: 0 16px;
	font-size: 15px;
}

details.faq-item > summary + * {
	padding-top: 16px;
}

details.faq-item > :last-child {
	padding-bottom: 16px;
}

details.faq-item > p + p {
	padding-top: 12px;
}

/* --- 目次 --- */
.km-toc {
	margin: 0 0 40px;
	background: var(--km-main-pale);
	border-radius: var(--km-radius);
}

.km-toc > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 48px;
	padding: 12px 16px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.km-toc > summary::-webkit-details-marker {
	display: none;
}

.km-toc__toggle {
	font-size: 12px;
	font-weight: 400;
	color: var(--km-text-sub);
}

.km-toc__toggle::after {
	content: "閉じる";
}

.km-toc:not([open]) .km-toc__toggle::after {
	content: "開く";
}

.entry-content .km-toc ol {
	margin: 0;
	padding: 0 16px 16px 40px;
	background: transparent;
	border-radius: 0;
}

.entry-content .km-toc ol ol {
	padding: 4px 0 0 20px;
	list-style: none;
}

.entry-content .km-toc li {
	font-size: 15px;
	line-height: 1.6;
}

.entry-content .km-toc li + li {
	margin-top: 8px;
}

.entry-content .km-toc ol ol li {
	font-size: 14px;
}

.entry-content .km-toc ol ol li::before {
	content: "-";
	margin-right: 8px;
	color: var(--km-text-sub);
}

.km-toc a {
	color: var(--km-text);
	text-decoration: none;
}

.km-toc a:hover {
	color: var(--km-main);
	text-decoration: underline;
}

/* --- 吹き出し --- */
.balloon {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin: 0 0 24px;
}

.balloon-right {
	flex-direction: row-reverse;
}

.balloon__icon {
	flex: 0 0 64px;
	margin: 0;
	text-align: center;
}

.balloon__icon img,
.balloon__icon-placeholder {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--km-main-light);
}

.balloon__icon-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--km-main);
	font-weight: 700;
	font-size: 20px;
}

.balloon__name {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	line-height: 1.4;
	color: var(--km-text-sub);
	letter-spacing: 0;
}

.balloon__text {
	position: relative;
	flex: 1;
	min-width: 0;
	padding: 16px;
	background: var(--km-surface);
	border: 2px solid var(--km-main-light);
	border-radius: 12px;
	font-size: 15px;
	line-height: 1.8;
}

.balloon__text::before,
.balloon__text::after {
	content: "";
	position: absolute;
	top: 20px;
	border: 8px solid transparent;
}

.balloon-left .balloon__text::before {
	left: -18px;
	border-right: 10px solid var(--km-main-light);
}

.balloon-left .balloon__text::after {
	left: -14px;
	border-right: 10px solid var(--km-surface);
}

.balloon-right .balloon__text {
	background: var(--km-main-pale);
	border-color: var(--km-main-pale);
}

.balloon-right .balloon__text::before {
	right: -18px;
	border-left: 10px solid var(--km-main-pale);
}

.balloon-right .balloon__text::after {
	display: none;
}

.balloon__text > :first-child { margin-top: 0; }
.balloon__text > :last-child { margin-bottom: 0; }
.balloon__text p { margin: 0 0 12px; }

/* --- CTAボタン --- */
.cta-wrap {
	margin: 32px 0;
	text-align: center;
}

.cta-button,
.entry-content a.cta-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 480px;
	min-height: 56px;
	padding: 16px 40px;
	background: var(--km-accent);
	color: var(--km-on-accent);
	border-radius: var(--km-radius);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.04em;
	text-align: center;
	text-decoration: none;
	transition: background 0.2s;
}

.cta-button:hover,
.entry-content a.cta-button:hover {
	background: var(--km-accent-dark);
	color: var(--km-on-accent);
}

/* 記事フッター */
.entry-footer {
	margin-top: 40px;
}

.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.entry-tags a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 12px;
	border: 1px solid var(--km-line);
	border-radius: 999px;
	color: var(--km-text-sub);
	font-size: 13px;
	text-decoration: none;
}

.entry-tags a::before {
	content: "#";
	margin-right: 2px;
}

.entry-tags a:hover {
	color: var(--km-main);
	border-color: var(--km-main);
}

.page-links {
	margin: 32px 0 0;
	display: flex;
	gap: 8px;
	align-items: center;
}

/* 記事下ウィジェット */
.after-post-widgets {
	margin-top: 40px;
}

.after-post-widgets .widget + .widget {
	margin-top: 24px;
}

/* 著者 */
.author-box {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	margin-top: 40px;
	padding: 20px;
	background: var(--km-main-pale);
	border-radius: var(--km-radius);
}

.author-box__avatar {
	flex: 0 0 64px;
}

.author-box__avatar img {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: 50%;
}

.author-box__label {
	margin: 0;
	font-size: 12px;
	color: var(--km-text-sub);
}

.author-box__name {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
}

.author-box__desc {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.75;
}

/* 関連記事 */
.related {
	margin-top: 48px;
}

.related .post-list {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.related .post-card {
	background: var(--km-bg);
}

.related .post-card__body {
	padding: 12px;
}

.related .post-card__title {
	font-size: 14px;
}

.related .post-card__link {
	flex-direction: column;
}

.related .post-card__thumb {
	flex: none;
	aspect-ratio: 16 / 9;
	min-height: 0;
}

/* 前後の記事 */
.post-navigation {
	margin-top: 40px;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	justify-content: stretch;
}

.post-navigation a {
	display: block;
	padding: 16px;
	background: var(--km-surface);
	border-radius: var(--km-radius);
	color: var(--km-text);
	text-decoration: none;
	font-size: 14px;
	line-height: 1.6;
}

.post-navigation .nav-subtitle {
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	color: var(--km-text-sub);
}

.post-navigation a:hover .nav-title {
	color: var(--km-main);
}

/* コメント */
.comments-area {
	margin-top: 40px;
	padding: 24px 16px;
	background: var(--km-surface);
	border-radius: var(--km-radius);
}

.comments-title,
.comment-reply-title {
	font-size: 18px;
	margin-bottom: 16px;
}

.comment-list {
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	padding-left: 24px;
}

.comment-body {
	padding: 16px 0;
	border-bottom: 1px solid var(--km-line);
	font-size: 15px;
}

.comment-meta {
	font-size: 13px;
	color: var(--km-text-sub);
}

.comment-meta .avatar {
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
}

.comment-form label {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: 700;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
}

/* ==========================================================================
   7. フォーム
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
	padding: 12px;
	border: 1px solid #c9c6be;
	border-radius: var(--km-radius);
	background: var(--km-surface);
	color: var(--km-text);
	font: inherit;
	font-size: 16px;
}

button,
input[type="submit"] {
	font: inherit;
}

input[type="submit"],
.search-form__submit {
	min-height: 48px;
	padding: 0 24px;
	border: 0;
	border-radius: var(--km-radius);
	background: var(--km-main);
	color: var(--km-on-main);
	font-weight: 700;
	cursor: pointer;
}

.search-form {
	display: flex;
	gap: 8px;
}

.search-form label {
	flex: 1;
	min-width: 0;
}

.search-form__field {
	width: 100%;
	height: 48px;
}

/* ==========================================================================
   8. サイドバー・ウィジェット
   ========================================================================== */
.sidebar {
	min-width: 0;
}

.sidebar .widget {
	margin: 0 0 24px;
	padding: 20px;
	background: var(--km-surface);
	border-radius: var(--km-radius);
	font-size: 15px;
}

.widget-title,
.widget .wp-block-heading {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 700;
	color: var(--km-main);
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget li {
	line-height: 1.6;
}

.widget li a {
	display: block;
	padding: 10px 0;
	color: var(--km-text);
	text-decoration: none;
}

.widget li + li {
	border-top: 1px solid var(--km-line);
}

.widget li a:hover {
	color: var(--km-main);
}

.widget .children {
	padding-left: 16px;
}

.widget select {
	width: 100%;
	min-height: 44px;
}

/* 人気・新着リスト（サムネ付き） */
.km-mini-posts li a {
	display: flex;
	gap: 12px;
	align-items: center;
}

.km-mini-posts__thumb {
	flex: 0 0 72px;
	width: 72px;
	height: 48px;
	border-radius: 4px;
	overflow: hidden;
	background: var(--km-main-light);
}

.km-mini-posts__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.km-mini-posts__title {
	font-size: 14px;
	line-height: 1.6;
}

/* ==========================================================================
   9. フッター
   ========================================================================== */
.site-footer {
	background: #2f3a38;
	color: #e9eeed;
	padding: 40px 0 24px;
	font-size: 14px;
}

.footer-nav ul {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0 24px;
}

.footer-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: #e9eeed;
	text-decoration: none;
}

.footer-nav a:hover {
	text-decoration: underline;
}

.site-footer__brand {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 700;
}

.site-footer__desc {
	margin: 0 0 24px;
	color: #c3cdcb;
	font-size: 13px;
}

.copyright {
	margin: 0;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	font-size: 12px;
	color: #c3cdcb;
}

/* ページトップ */
.to-top {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--km-main);
	color: var(--km-on-main);
	text-decoration: none;
	font-size: 12px;
	font-weight: 700;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s, visibility 0.2s;
}

.to-top.is-visible {
	opacity: 1;
	visibility: visible;
}

/* ==========================================================================
   10. 404・検索なし
   ========================================================================== */
.not-found {
	background: var(--km-surface);
	border-radius: var(--km-radius);
	padding: 32px 16px;
}

.not-found__title {
	font-size: 22px;
	margin-bottom: 12px;
}

.not-found p {
	margin: 0 0 24px;
}

.not-found .section-title {
	margin-top: 40px;
	font-size: 18px;
}

/* ==========================================================================
   11. レスポンシブ（タブレット以上）
   ========================================================================== */
@media (min-width: 600px) {
	.km-list-card .post-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}

	.km-list-list .post-card__thumb {
		flex-basis: 220px;
		min-height: 140px;
	}

	.km-list-list .post-card__body {
		padding: 16px 20px;
		gap: 8px;
	}

	.km-list-list .post-card__title {
		font-size: 17px;
	}

	.km-list-list .post-card__excerpt {
		display: block;
	}

	.related .post-list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.post-navigation .nav-links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.post-navigation .nav-next {
		text-align: right;
	}

	.post-navigation .nav-next:only-child {
		grid-column: 2;
	}
}

@media (min-width: 768px) {
	.entry {
		padding: 40px 48px 48px;
	}

	.entry-thumb {
		margin: 0 -48px 40px;
	}

	.entry-title {
		font-size: 30px;
	}

	.entry-content {
		font-size: 16.5px;
	}

	.entry-content h2 {
		margin-top: 64px;
		font-size: 23px;
	}

	.entry-content h3 {
		font-size: 19px;
	}

	.simple-box2,
	.simple-box3,
	.simple-box4,
	.simple-box7 {
		padding: 24px 28px;
	}

	.balloon__icon {
		flex-basis: 80px;
	}

	.balloon__icon img,
	.balloon__icon-placeholder {
		width: 80px;
		height: 80px;
	}

	.comments-area,
	.not-found {
		padding: 32px 48px;
	}
}

/* PC（ハンバーガー解除・2カラム） */
@media (min-width: 960px) {
	.site-header__inner {
		min-height: 80px;
	}

	.site-title {
		font-size: 24px;
	}

	.custom-logo {
		max-height: 56px;
	}

	.menu-toggle {
		display: none;
	}

	.global-nav {
		display: block;
		position: static;
		border: 0;
		background: transparent;
	}

	.global-nav__list {
		display: flex;
		gap: 4px;
		padding: 0;
	}

	.global-nav__list > li {
		position: relative;
	}

	.global-nav__list > li > a {
		padding: 8px 12px;
		font-size: 14px;
	}

	.global-nav .sub-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 60;
		min-width: 220px;
		padding: 8px 0;
		background: var(--km-surface);
		border: 1px solid var(--km-line);
		border-radius: var(--km-radius);
	}

	.global-nav li:hover > .sub-menu,
	.global-nav li:focus-within > .sub-menu {
		display: block;
	}

	.global-nav .sub-menu a {
		padding: 8px 16px;
		font-size: 14px;
	}

	.site-content {
		padding: 32px 0 80px;
	}

	.layout.has-sidebar {
		grid-template-columns: minmax(0, 1fr) var(--km-sidebar);
		gap: 40px;
	}

	.km-sidebar-left .layout.has-sidebar {
		grid-template-columns: var(--km-sidebar) minmax(0, 1fr);
	}

	.km-sidebar-left .layout.has-sidebar .sidebar {
		order: -1;
	}

	.layout.no-sidebar .site-main {
		max-width: 840px;
		width: 100%;
		margin: 0 auto;
	}

	.km-list-card .layout.no-sidebar .site-main {
		max-width: none;
	}

	.km-list-card .layout.no-sidebar .post-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.archive-header__title {
		font-size: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}

@media print {
	.site-header, .site-footer, .sidebar, .related, .to-top, .menu-toggle { display: none !important; }
	body { background: #fff; }
}
