/* ==========================================================================
   Chiikoto LABO — main stylesheet
   無印良品 × ITメディア × 研究所 をイメージした、余白重視のシンプルデザイン。
   ========================================================================== */

:root {
	--color-bg: #FFFFFF;
	--color-bg-subtle: #F7F8F7;
	--color-text: #111111;
	--color-text-muted: #5B5F5C;
	--color-accent: #4C7A5E;
	--color-accent-dark: #3A5F49;
	--color-accent-bg: #EAF1EC;
	--color-border: #E3E5E2;

	--font-base: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Segoe UI", Roboto, sans-serif;

	--container-width: 1120px;
	--content-width: 720px;

	--radius-sm: 4px;
	--radius-md: 8px;

	--space-1: 8px;
	--space-2: 16px;
	--space-3: 24px;
	--space-4: 40px;
	--space-5: 64px;

	--header-height: 88px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-base);
	font-size: 16px;
	line-height: 1.9;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--color-accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

ul,
ol {
	padding-left: 1.4em;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.5;
	font-weight: 700;
	margin: 0 0 var(--space-2);
}

p {
	margin: 0 0 var(--space-2);
}

button,
input[type="submit"] {
	font-family: inherit;
	cursor: pointer;
}

.container {
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--space-2);
	padding-right: var(--space-2);
}

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--color-accent);
	color: #fff;
	padding: var(--space-1) var(--space-2);
	z-index: 1000;
}

.skip-link:focus {
	left: var(--space-2);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-block;
	padding: 0.7em 1.4em;
	border-radius: var(--radius-sm);
	background: var(--color-accent);
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	border: 1px solid var(--color-accent);
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
	background: var(--color-accent-dark);
	border-color: var(--color-accent-dark);
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(17, 17, 17, 0.12);
}

/* --------------------------------------------------------------------------
   Contact Form 7 (contact_table layout)
   -------------------------------------------------------------------------- */
.wpcf7-spinner {
	display: none;
}

/* CF7's default template wraps the submit button in <div class="btn">,
   which collides with our .btn utility class above. Neutralize the div
   and style the actual submit input as the real button instead. */
.wpcf7 div.btn,
.wpcf7 div.btn:hover {
	background: none;
	padding: 0;
	border: none;
	border-radius: 0;
	display: block;
	text-align: center;
	transform: none;
	box-shadow: none;
}

.wpcf7 div.btn p {
	margin: 0;
}

.wpcf7-submit {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	padding: 0.7em 1.4em;
	border-radius: var(--radius-sm);
	background: var(--color-accent);
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	font-family: inherit;
	border: 1px solid var(--color-accent);
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7-submit:hover {
	background: var(--color-accent-dark);
	border-color: var(--color-accent-dark);
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(17, 17, 17, 0.12);
}

.contact_table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: var(--space-3);
}

.wpcf7 .contact_table th,
.wpcf7 .contact_table td {
	background: none;
	border: none;
	vertical-align: top;
	padding: var(--space-2) 0;
	text-align: left;
}

.wpcf7 .contact_table th {
	width: 200px;
	white-space: nowrap;
	font-weight: 700;
	text-align: left;
	vertical-align: middle;
	padding-right: var(--space-3);
}

.wpcf7 .contact_table tr:last-child th {
	vertical-align: top;
}

.contact_table th p,
.contact_table td p {
	margin: 0;
}

.contact_table .required {
	display: inline-block;
	margin-left: var(--space-1);
	padding: 0.15em 0.6em;
	background: #e0453c;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	border-radius: var(--radius-sm);
}

.contact_table input[type="text"],
.contact_table input[type="email"],
.contact_table input[type="tel"],
.contact_table textarea {
	width: 100%;
	padding: 0.7em 1em;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-size: 1rem;
}

.contact_table textarea {
	min-height: 160px;
}

@media (max-width: 600px) {
	.contact_table,
	.contact_table tbody,
	.contact_table tr,
	.wpcf7 .contact_table th,
	.wpcf7 .contact_table td {
		display: block;
		width: 100%;
	}

	.wpcf7 .contact_table th {
		padding-bottom: var(--space-1);
	}

	.wpcf7 .contact_table td {
		padding-top: 0;
	}
}

.btn-outline {
	background: transparent;
	color: var(--color-accent);
}

.btn-outline:hover {
	background: var(--color-accent-bg);
}

/* --------------------------------------------------------------------------
   Category label
   -------------------------------------------------------------------------- */
.category-label {
	display: inline-block;
	max-width: 100px;
	text-align: center;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--color-accent);
	background: var(--color-accent-bg);
	border-radius: var(--radius-sm);
	padding: 0.25em 0.75em;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-label:hover {
	text-decoration: none;
	background: var(--color-accent);
	color: #fff;
	transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
	border-bottom: 1px solid var(--color-border);
	position: sticky;
	top: 0;
	background: var(--color-bg);
	z-index: 100;
}

/* ハンバーガーメニュー展開中だけ、wpForo本体のモバイル用サブメニュー
   (#wpforo-menu .wpf-menu、z-index:99999)より確実に上に表示されるよう
   高い値にする(スマホでヘッダーのハンバーガーメニューを開いた際、wpForoの
   「質問・相談/最近の投稿」タブが重なって見える不具合の対策)。常時この値だと
   画像モーダル(z-index:200/210)より上に来てしまい重なり順が壊れるため、
   メニュー展開中のみに限定する。navigation.js が .main-navigation の開閉と
   同時に .site-header へ is-menu-open を付け外しする。 */
.site-header.is-menu-open {
	z-index: 999999;
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	padding-top: var(--space-2);
	padding-bottom: var(--space-2);
}

.site-branding {
	display: flex;
	flex-direction: column;
}

.site-branding .custom-logo {
	max-height: 44px;
	width: auto;
}

.site-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

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

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

.site-description {
	margin: 0;
	font-size: 0.75rem;
	color: var(--color-text-muted);
}

.header-controls {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.main-navigation ul {
	list-style: none;
	display: flex;
	gap: var(--space-3);
	margin: 0;
	padding: 0;
}

.main-navigation a {
	color: var(--color-text);
	font-weight: 600;
	padding: var(--space-1) 0;
}

.main-navigation a:hover {
	color: var(--color-accent);
	text-decoration: none;
}

.search-toggle,
.menu-toggle {
	background: none;
	border: none;
	padding: var(--space-1);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--color-text);
}

.menu-toggle {
	display: none;
}

.menu-icon-line {
	transition: transform 0.25s ease, opacity 0.2s ease;
	transform-box: fill-box;
	transform-origin: center;
}

.menu-toggle[aria-expanded="true"] .menu-icon-line--top {
	transform: translateY(5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon-line--middle {
	opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-icon-line--bottom {
	transform: translateY(-5px) rotate(-45deg);
}

.header-search {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transform: translateY(-8px);
	transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease, padding 0.3s ease;
}

.header-search.is-open {
	max-height: 200px;
	opacity: 1;
	transform: translateY(0);
	padding: var(--space-2) 0;
	border-top: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   Search form
   -------------------------------------------------------------------------- */
.search-form {
	display: flex;
	gap: var(--space-1);
}

.search-form__input {
	flex: 1;
	padding: 0.7em 1em;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 1rem;
}

.search-form__submit {
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
	background: var(--color-bg-subtle) url("../images/main_v.jpg") center center / cover no-repeat;
	padding: 88px 0;
	text-align: center;
}

.hero-inner {
	max-width: 640px;
}

.hero-kicker {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	color: var(--color-accent);
	margin-bottom: var(--space-2);
}

.hero-title {
	font-size: 2.5rem;
	letter-spacing: 0.02em;
	margin-bottom: var(--space-2);
	position: relative;
	padding-bottom: var(--space-2);
}

.hero-title::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: 40px;
	height: 3px;
	background: var(--color-accent);
	border-radius: 2px;
}

.hero-catch {
	font-size: 1.1rem;
	color: var(--color-text);
	font-weight: 700;
	margin-bottom: var(--space-2);
}

.hero-lead {
	max-width: 480px;
	margin: 0 auto var(--space-4);
	color: var(--color-text-muted);
}

.hero .search-form {
	max-width: 480px;
	margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Sections (front page)
   -------------------------------------------------------------------------- */
.section {
	padding: var(--space-5) 0;
}

.section--subtle {
	background: var(--color-bg-subtle);
}

.section--category {
	background: #F3F8F4;
}

.section-header {
	text-align: center;
	margin-bottom: var(--space-4);
}

.section-title {
	display: inline-block;
	font-size: 1.5rem;
	margin-bottom: var(--space-2);
	position: relative;
	padding-bottom: var(--space-2);
}

.section-title::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: 32px;
	height: 3px;
	background: var(--color-accent);
	border-radius: 2px;
}

.section-lead {
	color: var(--color-text-muted);
	margin: 0;
}

.section-more {
	text-align: center;
	margin: var(--space-4) 0 0;
}

/* --------------------------------------------------------------------------
   Cards / grid
   -------------------------------------------------------------------------- */
.card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-3);
}

/* 1–2 posts: keep cards a natural card width instead of stretching /
   left-aligning them across a 3-column track. */
.card-grid--cols-1 {
	grid-template-columns: minmax(0, 380px);
	justify-content: center;
}

.card-grid--cols-2 {
	grid-template-columns: repeat(2, minmax(0, 380px));
	justify-content: center;
}

.card {
	display: flex;
	flex-direction: column;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.card-thumb {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--color-bg-subtle);
	display: block;
}

.card-thumb img {
	transition: transform 0.3s ease;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-thumb:hover img {
	transform: scale(1.12);
}

.card-thumb--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-accent);
	opacity: 0.5;
}

.card-thumb-leaf {
	transition: transform 0.3s ease;
}

.card-thumb--placeholder:hover .card-thumb-leaf {
	transform: scale(1.12);
}

.card-body {
	padding: var(--space-2);
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
	flex: 1;
}

.card-title {
	font-size: 1rem;
	margin: 0;
}

.card-title a {
	color: var(--color-text);
}

.card-title a:hover {
	color: var(--color-accent);
	text-decoration: none;
}

.card-excerpt {
	color: var(--color-text-muted);
	font-size: 0.9rem;
	margin: 0;
}

.card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
}

.card-date {
	color: var(--color-text-muted);
	font-size: 0.8rem;
}

.card-date--updated {
	color: var(--color-accent);
}

/* Category navigation cards on the front page */
.category-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-3);
}

.category-card {
	display: block;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--space-3);
	text-align: center;
	color: var(--color-text);
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.category-card:hover {
	border-color: var(--color-accent);
	box-shadow: 0 6px 16px rgba(17, 17, 17, 0.06);
	transform: translateY(-2px);
	text-decoration: none;
}

.category-card__name {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: var(--space-1);
}

.category-card__desc {
	color: var(--color-text-muted);
	font-size: 0.85rem;
	margin: 0;
}

/* --------------------------------------------------------------------------
   Post list (archive / search / home)
   -------------------------------------------------------------------------- */
.post-list {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.post-list .card {
	flex-direction: row;
}

.post-list .card-thumb {
	width: 220px;
	flex: none;
	aspect-ratio: 3 / 2;
}

@media (max-width: 600px) {
	.post-list .card {
		flex-direction: column;
	}
	.post-list .card-thumb {
		width: 100%;
	}
}

/* --------------------------------------------------------------------------
   Layout: content + sidebar
   -------------------------------------------------------------------------- */
.content-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: var(--space-4);
	align-items: start;
	padding: var(--space-4) 0;
}

.content-layout.no-sidebar {
	grid-template-columns: minmax(0, 1fr);
}

.primary {
	min-width: 0;
}

.widget {
	margin-bottom: var(--space-3);
	padding-bottom: var(--space-3);
	border-bottom: 1px solid var(--color-border);
}

.widget:last-child {
	border-bottom: none;
}

.widget-title {
	font-size: 1rem;
	margin-bottom: var(--space-2);
}

.widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-1);
}

/* Gutenberg "Search" block widget — match the .btn / .search-form styling. */
.widget .wp-block-search__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.widget .wp-block-search__inside-wrapper {
	gap: var(--space-1);
}

.widget .wp-block-search__input {
	padding: 0.7em 1em;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-size: 1rem;
}

.widget .wp-block-search__button {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7em 1.4em;
	border-radius: var(--radius-sm);
	background: var(--color-accent);
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	font-family: inherit;
	border: 1px solid var(--color-accent);
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.widget .wp-block-search__button:hover {
	background: var(--color-accent-dark);
	border-color: var(--color-accent-dark);
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(17, 17, 17, 0.12);
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
	font-size: 0.8rem;
	color: var(--color-text-muted);
	margin-bottom: var(--space-3);
}

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

.breadcrumb li:not(:last-child)::after {
	content: "/";
	margin-left: 0.4em;
	color: var(--color-border);
}

/* --------------------------------------------------------------------------
   Archive / category header
   -------------------------------------------------------------------------- */
.archive-header {
	padding-top: var(--space-4);
	text-align: center;
}

.archive-title {
	font-size: 1.6rem;
	margin-bottom: var(--space-1);
}

.archive-description {
	color: var(--color-text-muted);
	max-width: var(--content-width);
	margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Single article
   -------------------------------------------------------------------------- */
.entry-header {
	max-width: var(--content-width);
	margin: 0 auto var(--space-3);
}

.entry-title {
	font-size: 1.8rem;
	margin: var(--space-1) 0;
}

.entry-meta {
	color: var(--color-text-muted);
	font-size: 0.85rem;
	display: flex;
	gap: var(--space-2);
	flex-wrap: wrap;
}

.entry-thumbnail {
	max-width: var(--content-width);
	margin: 0 auto var(--space-3);
	overflow: hidden;
}

.entry-lead {
	max-width: var(--content-width);
	margin: 0 auto var(--space-3);
	color: var(--color-text-muted);
}

.affiliate-notice {
	max-width: var(--content-width);
	margin: 0 auto 24px;
	padding: 10px 14px;
	font-size: 13px;
	line-height: 1.6;
	color: #666;
	background: #f7f7f7;
	border-radius: 4px;
}

.affiliate-notice span {
	margin-right: 8px;
	font-weight: 600;
	color: #333;
}

.affiliate-ad {
	max-width: 100%;
	margin: var(--space-4) 0;
	padding: var(--space-3);
	background: var(--color-bg-subtle);
	border-radius: var(--radius-md);
	overflow-wrap: break-word;
}

.affiliate-ad-intro {
	margin: 0 0 var(--space-2);
	color: var(--color-text);
}

.affiliate-ad-link {
	max-width: 100%;
	overflow-x: auto;
}

.affiliate-ad-link img {
	max-width: 100%;
	height: auto;
}

.affiliate-ad-note {
	margin: 0.4em 0 0;
	font-size: 0.75rem;
	color: var(--color-text-muted);
}

.toc {
	max-width: var(--content-width);
	margin: 0 auto var(--space-4);
	background: var(--color-bg-subtle);
	border-radius: var(--radius-md);
	padding: var(--space-3);
}

.toc-title {
	width: 100%;
	background: none;
	border: none;
	padding: 0;
	font-size: 1rem;
	font-weight: 700;
	font-family: inherit;
	color: var(--color-text);
	margin: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
}

.toc-title::after {
	content: "";
	width: 8px;
	height: 8px;
	flex: none;
	border-right: 2px solid var(--color-text-muted);
	border-bottom: 2px solid var(--color-text-muted);
	transform: rotate(45deg);
	transition: transform 0.25s ease;
}

.toc.is-open .toc-title::after {
	transform: rotate(-135deg);
}

.toc ol.toc-list {
	max-height: 0;
	margin: 0;
	padding-left: 0;
	list-style: none;
	counter-reset: toc-h2;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
}

.toc.is-open ol.toc-list {
	/* JS (navigation.js) sets an exact inline max-height based on the
	   list's real scrollHeight, so this stays accurate no matter how many
	   headings the article has. This 3000px is only a fallback ceiling for
	   when JS hasn't run yet / is unavailable — comfortably larger than
	   any realistic TOC so nothing gets clipped. */
	max-height: 3000px;
	opacity: 1;
	margin: var(--space-2) 0 0;
}

.toc-item--h2 {
	counter-increment: toc-h2;
}

.toc-item--h2 a::before {
	content: counter(toc-h2) ". ";
	color: var(--color-accent);
	font-weight: 700;
}

.toc-item--h3 {
	padding-left: 1.4em;
}

.toc li + li {
	margin-top: var(--space-1);
}

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

.toc a:hover {
	color: var(--color-accent);
}

.entry-content {
	max-width: var(--content-width);
	margin: 0 auto;
}

.entry-content > * {
	margin-bottom: var(--space-3);
}

.entry-content h2 {
	scroll-margin-top: var(--header-height);
	font-size: 1.4rem;
	padding-bottom: var(--space-1);
	border-bottom: 2px solid var(--color-accent);
	margin-top: var(--space-5);
}

.entry-content h3 {
	scroll-margin-top: var(--header-height);
	font-size: 1.15rem;
	margin-top: var(--space-4);
	padding-left: var(--space-1);
	border-left: 4px solid var(--color-accent);
}

.entry-content h4 {
	font-size: 1rem;
	margin-top: var(--space-3);
}

.entry-content p {
	line-height: 2;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.6em;
}

.entry-content li {
	margin-bottom: 0.4em;
}

.entry-content blockquote {
	margin: 0 0 var(--space-3);
	padding: var(--space-2) var(--space-3);
	background: var(--color-bg-subtle);
	border-left: 4px solid var(--color-accent);
	color: var(--color-text-muted);
}

.entry-content blockquote p {
	margin-bottom: 0;
	font-weight: 700;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--color-border);
	padding: 0.6em 0.8em;
	text-align: left;
}

.entry-content th {
	background: var(--color-bg-subtle);
}

.entry-content .wp-block-table thead {
	border-bottom: none;
}

@media (max-width: 700px) {
	.entry-content .wp-block-table {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.entry-content .wp-block-table table {
		min-width: 700px;
	}
}

.entry-content img {
	border-radius: var(--radius-sm);
}

.entry-content img.is-zoomable {
	cursor: zoom-in;
}

/* Reusable, undecorated-by-default building blocks for content authors —
   e.g. affiliate service intro boxes, comparison tables, CTAs — added via
   a Custom HTML block in the editor. Not used anywhere automatically. */
.entry-content .content-box {
	padding: var(--space-3);
	background: var(--color-bg-subtle);
	border-radius: var(--radius-md);
}

.entry-content .content-box--accent {
	background: var(--color-accent-bg);
	border: 1px solid var(--color-accent);
}

.entry-content .cta-box {
	padding: var(--space-3);
	text-align: center;
	background: var(--color-bg-subtle);
	border-radius: var(--radius-md);
}

.entry-content .pros-cons {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-2);
	padding: 0;
	list-style: none;
}

.entry-content .pros-cons > li {
	padding: var(--space-2);
	border-radius: var(--radius-sm);
	border: 1px solid var(--color-border);
}

.entry-content .pros-cons .pros-cons__label {
	display: block;
	font-weight: 700;
	margin-bottom: 0.4em;
}

@media (max-width: 600px) {
	.entry-content .pros-cons {
		grid-template-columns: 1fr;
	}
}

.entry-content figcaption {
	font-size: 0.8rem;
	color: var(--color-text-muted);
	text-align: center;
	margin-top: 0.4em;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.entry-content strong {
	background: linear-gradient(transparent 60%, var(--color-accent-bg) 60%);
}

.entry-footer {
	max-width: var(--content-width);
	margin: var(--space-4) auto 0;
}

.entry-tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-1);
	padding: 0;
}

.entry-tags a {
	display: inline-block;
	font-size: 0.8rem;
	padding: 0.3em 0.8em;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Author box / related posts
   -------------------------------------------------------------------------- */
.author-box {
	max-width: var(--content-width);
	margin: var(--space-4) auto;
	display: flex;
	gap: var(--space-2);
	padding: var(--space-3);
	background: var(--color-bg-subtle);
	border-radius: var(--radius-md);
	align-items: flex-start;
}

.author-box img {
	border-radius: 50%;
	flex: none;
}

.author-box__name {
	font-weight: 700;
	margin-bottom: 0.4em;
}

.author-box__bio {
	color: var(--color-text-muted);
	font-size: 0.9rem;
	margin: 0;
}

.related-posts {
	max-width: var(--container-width);
	margin: var(--space-5) auto 0;
	padding: 0 var(--space-2);
}

/* --------------------------------------------------------------------------
   Post navigation (prev / category archive / next)
   -------------------------------------------------------------------------- */
.post-nav {
	max-width: var(--content-width);
	margin: var(--space-5) auto 0;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: var(--space-2);
}

.post-nav-prev {
	justify-self: start;
}

.post-nav-next {
	justify-self: end;
}

.post-nav-archive {
	justify-self: center;
}

/* 前の記事 / 次の記事: ホバーなし、テキストのみ */
.post-nav-prev a,
.post-nav-next a {
	display: inline-flex;
	align-items: center;
	padding: 0.7em 1.4em;
	color: var(--color-accent);
	font-weight: 700;
}

/* 一覧に戻る: 通常時から塗りつぶしボタン、ホバーで反転 */
.post-nav-archive a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7em 1.4em;
	background: var(--color-accent);
	color: #fff;
	border: 1px solid var(--color-accent);
	border-radius: var(--radius-sm);
	font-weight: 700;
	text-align: center;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.post-nav-archive a:hover {
	background: transparent;
	color: var(--color-accent);
	text-decoration: none;
}

/* スマホでも3カラムの横並びは維持し、縦積みにはしない。画面幅に収まるよう
   パディングと文字サイズだけを縮小する。 */
@media (max-width: 600px) {
	.post-nav {
		gap: var(--space-1);
	}

	.post-nav-prev a,
	.post-nav-next a,
	.post-nav-archive a {
		padding: 0.5em 0.6em;
		font-size: 0.8rem;
		white-space: nowrap;
	}
}

/* --------------------------------------------------------------------------
   About section (front page)
   -------------------------------------------------------------------------- */
.about-section {
	max-width: var(--content-width);
	margin: 0 auto;
	text-align: center;
	color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination {
	margin-top: var(--space-4);
}

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

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4em;
	height: 2.4em;
	padding: 0 0.5em;
	border: 1px solid var(--color-accent);
	border-radius: 0;
	color: var(--color-accent);
	font-weight: 700;
}

.pagination .page-numbers.dots {
	border: none;
	color: var(--color-text-muted);
}

.pagination .page-numbers:hover {
	text-decoration: none;
	background: var(--color-accent-bg);
}

.pagination .page-numbers.current {
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: #fff;
}

.pagination .prev::after,
.pagination .next::after {
	content: "";
	display: block;
	width: 6px;
	height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
}

.pagination .next::after {
	transform: rotate(-45deg);
}

.pagination .prev::after {
	transform: rotate(135deg);
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.error-404 {
	text-align: center;
	padding: var(--space-5) 0;
}

.error-404 .search-form {
	max-width: 480px;
	margin: var(--space-3) auto;
}

/* --------------------------------------------------------------------------
   Comments
   -------------------------------------------------------------------------- */
.comments-area {
	max-width: var(--content-width);
	margin: var(--space-5) auto 0;
}

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

.comment-body {
	padding: var(--space-2) 0;
	border-bottom: 1px solid var(--color-border);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.7em 1em;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-size: 1rem;
}

.comment-form textarea {
	min-height: 140px;
}

.comment-form p {
	margin-bottom: var(--space-2);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
	background: #F3F8F4;
	border-top: 1px solid var(--color-border);
	padding: var(--space-4) 0 var(--space-3);
	margin-top: var(--space-5);
}

.footer-brand {
	font-weight: 700;
	margin-bottom: var(--space-1);
}

.footer-nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	padding: 0;
	margin: var(--space-2) 0;
}

.footer-nav a {
	color: var(--color-text-muted);
	font-size: 0.85rem;
}

.footer-copyright {
	font-size: 0.8rem;
	color: var(--color-text-muted);
	margin-top: var(--space-2);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
	.card-grid,
	.category-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.card-grid--cols-1 {
		grid-template-columns: minmax(0, 380px);
	}

	.content-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.sidebar {
		order: 2;
	}

	.primary {
		order: 1;
	}
}

@media (max-width: 782px) {
	:root {
		--header-height: 110px;
	}

	.container {
		padding-left: 12px;
		padding-right: 12px;
	}

	.header-controls {
		gap: 0;
	}

	.site-description {
		display: none;
	}

	.main-navigation {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--color-bg-subtle);
		border-bottom: 1px solid var(--color-border);
		padding: 0 var(--space-2);
		max-height: 0;
		opacity: 0;
		overflow: hidden;
		transform: translateY(-8px);
		transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease;
		pointer-events: none;
	}

	.main-navigation.is-open {
		max-height: 80vh;
		opacity: 1;
		overflow-y: auto;
		transform: translateY(0);
		padding: var(--space-2);
		pointer-events: auto;
	}

	.main-navigation ul {
		flex-direction: column;
		gap: 0;
	}

	.main-navigation li {
		border-bottom: 1px solid var(--color-border);
	}

	.main-navigation li:last-child {
		border-bottom: none;
	}

	.main-navigation a {
		display: block;
		padding: var(--space-2) 0;
		text-align: center;
	}

	.menu-toggle {
		display: inline-flex;
	}

	.site-header-inner {
		position: relative;
	}

	.card-grid,
	.card-grid--cols-1,
	.card-grid--cols-2,
	.category-grid {
		grid-template-columns: 1fr;
	}

	.entry-title {
		font-size: 1.4rem;
	}

	.hero {
		padding: var(--space-4) 0;
	}

	.hero-title {
		font-size: 1.6rem;
	}

	.section-title {
		font-size: 1.25rem;
	}

	.section {
		padding: var(--space-4) 0;
	}
}
