/* ==========================================================
   Nevergiva Design — Snow Monkey 31 用（テーマ本体は改変しない）
   ========================================================== */
:root {
	--ng-ink: #1f2933;
	--ng-text: #2b3238;
	--ng-muted: #66707a;
	--ng-navy: #22384f;
	--ng-navy-soft: #e8edf2;
	--ng-brass: #9a7646;
	--ng-paper: #ffffff;
	--ng-mist: #f6f5f1;
	--ng-line: #e3e0d8;
	--ng-radius: 10px;
	--ng-serif: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", YuMincho, "Noto Serif CJK JP", "Source Han Serif JP", serif; /* Webフォントは使わない（表示速度・CLS対策） */
	--ng-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
	--ng-shadow: 0 1px 2px rgba(31, 41, 51, .06), 0 6px 18px rgba(31, 41, 51, .06);
}

body {
	background: var(--ng-paper);
	color: var(--ng-text);
	font-family: var(--ng-sans);
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "palt" 0;
}
a { color: var(--ng-navy); }
:focus-visible { outline: 2px solid var(--ng-brass); outline-offset: 2px; }

/* ---------- Header ---------- */
.l-header {
	background: rgba(255, 255, 255, .96);
	border-bottom: 1px solid var(--ng-line);
	backdrop-filter: saturate(160%) blur(8px);
}
.c-site-branding__title {
	font-family: var(--ng-serif);
	font-weight: 700;
	letter-spacing: .12em;
	font-size: 1.6rem;
}
.c-site-branding__title a { color: var(--ng-ink); text-decoration: none; }
.c-site-branding__description {
	font-size: .72rem;
	letter-spacing: .08em;
	color: var(--ng-muted);
}
.p-global-nav .c-navbar__item > a {
	font-size: .88rem;
	font-weight: 600;
	color: var(--ng-ink);
	letter-spacing: .04em;
}
.p-global-nav .c-navbar__item > a:hover,
.p-global-nav .current-menu-item > a,
.p-global-nav .current-post-ancestor > a { color: var(--ng-navy); }
.p-header-sub-nav { display: none; }

/* ---------- Page header / breadcrumbs ---------- */
.c-page-header__title, .c-entry__title, .c-entry-summary__title, .ng-sechead__title,
.p-entry-content h2, .p-entry-content h3, .p-related-posts__title, .c-entry-aside__title,
.wp-profile-box__title, .p-archive .c-entry__title {
	font-family: var(--ng-serif);
	font-weight: 700;
	color: var(--ng-ink);
}
.c-breadcrumbs { font-size: .75rem; color: var(--ng-muted); }
.p-breadcrumbs-wrapper { background: transparent; border-bottom: 1px solid var(--ng-line); }

/* ---------- Article ---------- */
.c-entry__header { margin-bottom: 1.5rem; }
.c-entry__title {
	font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem);
	line-height: 1.5;
	letter-spacing: .02em;
}
.c-entry__meta { font-size: .8rem; color: var(--ng-muted); }
.c-eyecatch img, .c-entry__content > .c-eyecatch img { border-radius: var(--ng-radius); }

.p-entry-content {
	font-size: 1.0625rem; /* 17px */
	line-height: 1.95;
	letter-spacing: .03em;
}
.p-entry-content > * + * { margin-top: 1.4em; }
.p-entry-content p { margin-bottom: 0; }
.p-entry-content strong { background: linear-gradient(transparent 62%, #f3e4c6 62%); font-weight: 700; }
.p-entry-content h2 {
	position: relative;
	margin-top: 3.2em;
	padding: .9em 1em .9em 1.1em;
	font-size: 1.32rem;
	line-height: 1.55;
	background: var(--ng-mist);
	border-left: 4px solid var(--ng-navy);
	border-radius: 0 var(--ng-radius) var(--ng-radius) 0;
}
.p-entry-content h3 {
	margin-top: 2.4em;
	padding-bottom: .45em;
	font-size: 1.13rem;
	line-height: 1.6;
	border-bottom: 1px solid var(--ng-line);
}
.p-entry-content h3::before {
	content: "";
	display: inline-block;
	width: .55em; height: .55em;
	margin-right: .5em;
	vertical-align: .12em;
	background: var(--ng-brass);
	border-radius: 2px;
}
.p-entry-content ul, .p-entry-content ol { padding-left: 1.4em; }
.p-entry-content li + li { margin-top: .45em; }
.p-entry-content blockquote {
	margin-left: 0; margin-right: 0;
	padding: 1em 1.2em;
	border-left: 3px solid var(--ng-line);
	color: var(--ng-muted);
	background: #fbfbf9;
}
.p-entry-content figure img { border-radius: 8px; }
.p-entry-content figcaption { font-size: .8rem; color: var(--ng-muted); text-align: center; }

/* 表：スマホは横スクロール */
.p-entry-content .wp-block-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.p-entry-content table { font-size: .93rem; line-height: 1.7; min-width: 100%; border-collapse: collapse; }
.p-entry-content th, .p-entry-content td { padding: .7em .9em; border: 1px solid var(--ng-line); vertical-align: top; }
.p-entry-content thead th { background: var(--ng-navy); color: #fff; font-weight: 600; white-space: nowrap; }
.p-entry-content tbody tr:nth-child(even) td { background: #fafaf8; }

/* 囲み（結論・補足） */
.p-entry-content .ng-box {
	padding: 1.3em 1.4em !important;
	background: var(--ng-mist) !important;
	border: 1px solid var(--ng-line) !important;
	border-radius: var(--ng-radius) !important;
}
.p-entry-content .ng-box > p:first-child strong {
	display: block;
	background: none;
	margin-bottom: .2em;
	font-family: var(--ng-serif);
	font-size: 1.05rem;
	color: var(--ng-navy);
}
.p-entry-content .ng-box--point { background: var(--ng-navy-soft) !important; border-color: #cfd9e3 !important; }
.p-entry-content .ng-box--note { background: #fffaf0 !important; border-color: #ecdcbf !important; font-size: .95rem; }
.p-entry-content .ng-box ul { margin-top: .6em; }

/* 関連記事への導線（本文内） */
.p-entry-content .ng-related {
	margin-top: 1em;
	padding: 1em 1.1em;
	border: 1px solid var(--ng-line);
	border-radius: var(--ng-radius);
	background: #fff;
}
.p-entry-content .ng-related__label { font-size: .78rem; font-weight: 700; color: var(--ng-brass); letter-spacing: .08em; }
.p-entry-content .ng-related a { font-weight: 600; text-decoration: none; }
.p-entry-content .ng-related a::after { content: " →"; }

/* 図解 */
.p-entry-content .ng-figure { margin: 2em 0; }
.p-entry-content .ng-figure img { width: 100%; height: auto; border: 1px solid var(--ng-line); border-radius: var(--ng-radius); }

/* 参考文献 */
.p-entry-content .ng-refs { font-size: .88rem; color: var(--ng-muted); border-top: 1px solid var(--ng-line); padding-top: 1.2em; }
.p-entry-content .ng-refs a { word-break: break-all; }

.ng-pr-note {
	font-size: .8rem !important;
	color: var(--ng-muted);
	border: 1px solid var(--ng-line);
	border-radius: 6px;
	padding: .4em .8em;
	display: inline-block;
}

/* 記事下：プロフィール・関連記事 */
.wp-profile-box { border: 1px solid var(--ng-line); border-radius: var(--ng-radius); background: var(--ng-mist); }
.p-related-posts__title, .c-entry-aside__title { font-size: 1.15rem; }

/* ---------- Archive（カテゴリー・新着） ---------- */
.c-page-header { background-color: var(--ng-mist); }
.p-archive .c-entry__header, .c-entry__header { text-align: left; }
.p-archive .c-entry__title { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
.p-archive .c-entry__header + * { color: var(--ng-muted); }
.c-entries--panel .c-entries__item > a,
.c-entries--rich-media .c-entry-summary {
	border-radius: var(--ng-radius);
}
.c-entry-summary__figure img { transition: transform .4s ease; }
.c-entries__item a:hover .c-entry-summary__figure img { transform: scale(1.03); }
.c-entry-summary__figure { border-radius: var(--ng-radius); overflow: hidden; }
.c-entry-summary__title { font-size: 1.02rem; line-height: 1.6; }
.c-entry-summary__term {
	background: var(--ng-navy) !important;
	color: #fff !important;
	font-size: .68rem;
	letter-spacing: .06em;
	border-radius: 0 0 0 6px;
}
.c-entry-summary__content { font-size: .85rem; color: var(--ng-muted); }
.c-entry-summary__meta { font-size: .75rem; }
.c-pagination .page-numbers { border-radius: 6px; }

/* ---------- Footer ---------- */
.l-footer { background: var(--ng-mist); border-top: 1px solid var(--ng-line); }
.p-footer-sub-nav { background: transparent; }
.p-footer-sub-nav .c-navbar__item a { font-size: .82rem; color: var(--ng-text); }
.c-copyright { background: var(--ng-ink); color: #c9ced3; font-size: .75rem; letter-spacing: .08em; }
.c-copyright a { color: #fff; }

/* ==========================================================
   トップページ（固定ページ「ホーム」）
   ========================================================== */
.home .c-entry__header, .home .p-breadcrumbs-wrapper { display: none; }
.home .p-section-front-page-content { padding-top: 0; }
.home .c-entry__body > .c-entry__content > .p-entry-content { font-size: 1rem; line-height: 1.8; }
.home .p-entry-content > * + * { margin-top: 0; }
.ng-front > * + * { margin-top: 0; }

.ng-hero {
	position: relative;
	margin: 0 calc(50% - 50vw) !important;
	padding: clamp(3rem, 8vw, 6rem) 1.25rem clamp(2.5rem, 6vw, 4.5rem);
	background:
		radial-gradient(1200px 400px at 85% -10%, rgba(154, 118, 70, .10), transparent 60%),
		linear-gradient(180deg, #fbfaf7 0%, #f3f1ea 100%);
	border-bottom: 1px solid var(--ng-line);
	text-align: center;
}
.ng-hero > * { max-width: 760px; margin-left: auto !important; margin-right: auto !important; }
.ng-hero__eyebrow {
	font-size: .8rem !important;
	letter-spacing: .3em;
	color: var(--ng-brass);
	font-weight: 700;
}
.p-entry-content .ng-hero__title, .ng-hero__title {
	margin-top: .6em !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	font-family: var(--ng-serif);
	font-size: clamp(1.75rem, 1.2rem + 3vw, 3rem) !important;
	line-height: 1.45 !important;
	letter-spacing: .06em;
	color: var(--ng-ink);
}
.ng-hero__lead {
	margin-top: 1.2em !important;
	font-size: clamp(.92rem, .85rem + .3vw, 1.05rem) !important;
	line-height: 2 !important;
	color: var(--ng-muted);
}

.ng-sec { padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; }
.ng-sec--mist {
	margin: clamp(2.5rem, 6vw, 4.5rem) calc(50% - 50vw) 0 !important;
	padding: clamp(2.5rem, 6vw, 4.5rem) max(var(--_container-margin, 1.25rem), calc(50vw - 640px));
	background: var(--ng-mist);
}
.ng-sechead {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
	padding-bottom: .8rem;
	border-bottom: 1px solid var(--ng-line);
}
.ng-sechead__en {
	display: block;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .25em;
	color: var(--ng-brass);
	text-transform: uppercase;
}
.p-entry-content .ng-sechead__title, .ng-sechead__title {
	margin: .2em 0 0 !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem) !important;
	line-height: 1.4 !important;
}
.ng-sechead__more {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: .3em;
	font-size: .82rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.ng-sechead__more .ng-icon { width: 16px; height: 16px; }

/* カード */
.ng-grid { display: grid; gap: 1.5rem; }
.ng-grid--card { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ng-grid--feature { grid-template-columns: 1fr; }
@media (min-width: 840px) {
	.ng-grid--feature { grid-template-columns: 1.4fr 1fr; grid-template-rows: min-content 1fr; align-items: start; column-gap: 2rem; row-gap: 1.5rem; }
	.ng-grid--feature .ng-card--feature { grid-row: 1 / span 2; }
	.ng-grid--feature .ng-card--card .ng-card__link { display: grid; grid-template-columns: 44% 1fr; gap: 1rem; align-items: start; }
	.ng-grid--feature .ng-card--card .ng-card__body { padding-top: 0; }
}
@media (min-width: 960px) { .ng-grid--card { grid-template-columns: repeat(3, 1fr); } }
.ng-card { margin: 0 !important; }
.ng-card__link { display: block; position: relative; color: inherit; text-decoration: none; }
.ng-card__thumb {
	aspect-ratio: 1200 / 630;
	overflow: hidden;
	border-radius: var(--ng-radius);
	background: var(--ng-navy-soft);
}
.ng-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; display: block; }
.ng-card__link:hover .ng-card__thumb img { transform: scale(1.04); }
.ng-card__noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--ng-navy-soft), var(--ng-mist)); }
.ng-card__body { padding-top: .8rem; }
.ng-card__cat {
	display: inline-block;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--ng-brass);
}
.ng-card__title {
	margin: .3em 0 0 !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	font-family: var(--ng-serif);
	font-size: 1.02rem !important;
	line-height: 1.6 !important;
	color: var(--ng-ink);
}
.ng-card__title::before { display: none !important; }
.ng-card--feature .ng-card__title { font-size: clamp(1.15rem, 1rem + .8vw, 1.45rem) !important; }
.ng-card__link:hover .ng-card__title { color: var(--ng-navy); text-decoration: underline; text-underline-offset: 3px; }
.ng-card__date { display: block; margin-top: .4em; font-size: .72rem; color: var(--ng-muted); letter-spacing: .05em; }

/* ランキング */
.ng-ranking { list-style: none; margin: 0 !important; padding: 0 !important; counter-reset: none; display: grid; gap: 1rem; }
@media (min-width: 840px) { .ng-ranking { grid-template-columns: repeat(5, 1fr); } }
.ng-ranking li { margin: 0 !important; }
.ng-card--rank .ng-card__link { display: grid; grid-template-columns: 112px 1fr; gap: .9rem; align-items: center; }
@media (min-width: 840px) { .ng-card--rank .ng-card__link { display: block; } }
.ng-card__rank {
	position: absolute; z-index: 1; top: -8px; left: -8px;
	width: 2rem; height: 2rem;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--ng-ink); color: #fff;
	font-family: var(--ng-serif); font-size: .9rem; font-weight: 700;
	box-shadow: 0 0 0 3px #fff;
}
li:first-child .ng-card__rank { background: var(--ng-brass); }
.ng-card--rank .ng-card__body { padding-top: 0; }
@media (min-width: 840px) { .ng-card--rank .ng-card__body { padding-top: .7rem; } }
.ng-card--rank .ng-card__title { font-size: .92rem !important; }

/* カテゴリー案内 */
.ng-cats { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .ng-cats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .ng-cats { grid-template-columns: repeat(3, 1fr); } }
.ng-cats li { margin: 0 !important; }
.ng-cats__item {
	display: grid;
	grid-template-columns: 44px 1fr;
	grid-template-areas: "icon name" "icon desc";
	column-gap: .9rem;
	padding: 1.1rem 1.2rem;
	height: 100%;
	background: #fff;
	border: 1px solid var(--ng-line);
	border-radius: var(--ng-radius);
	color: inherit;
	text-decoration: none;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ng-cats__item:hover { border-color: #c9c3b6; box-shadow: var(--ng-shadow); transform: translateY(-2px); }
.ng-cats__icon {
	grid-area: icon;
	width: 44px; height: 44px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--ng-navy-soft);
	color: var(--ng-navy);
}
.ng-cats__name { grid-area: name; font-family: var(--ng-serif); font-weight: 700; font-size: 1.02rem; color: var(--ng-ink); }
.ng-cats__name small { margin-left: .6em; font-family: var(--ng-sans); font-weight: 400; font-size: .72rem; color: var(--ng-muted); }
.ng-cats__desc { grid-area: desc; margin-top: .25em; font-size: .8rem; line-height: 1.65; color: var(--ng-muted); }

/* Snow Monkey Blocks の記事一覧（トップのカテゴリー別） */
.ng-front .smb-taxonomy-posts, .ng-front .smb-recent-posts { margin-top: 0 !important; }
.ng-front .c-entries--panel .c-entry-summary__title,
.ng-front .c-entries--rich-media .c-entry-summary__title { font-size: .98rem; }

/* 運営者カード */
.ng-profile {
	display: grid;
	grid-template-columns: 88px 1fr;
	gap: 1.2rem;
	align-items: start;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--ng-line);
	border-radius: var(--ng-radius);
}
@media (min-width: 720px) { .ng-profile { grid-template-columns: 112px 1fr; padding: 2rem; gap: 1.8rem; } }
.ng-profile__avatar { width: 100%; height: auto; border-radius: 50%; }
.ng-profile__label { font-size: .7rem; font-weight: 700; letter-spacing: .2em; color: var(--ng-brass); }
.ng-profile__name { margin: .2em 0 0 !important; font-family: var(--ng-serif); font-weight: 700; font-size: 1.2rem; color: var(--ng-ink); }
.ng-profile__text { margin-top: .6em !important; font-size: .9rem; line-height: 1.9; }
.ng-profile__more { display: inline-flex; align-items: center; gap: .3em; margin-top: .8em; font-size: .85rem; font-weight: 600; text-decoration: none; }
.ng-profile__more .ng-icon { width: 16px; height: 16px; }

/* ---------- Mobile ---------- */
@media (max-width: 639px) {
	.p-entry-content { font-size: 1.03rem; line-height: 1.95; }
	.p-entry-content h2 { font-size: 1.2rem; margin-left: -.25rem; margin-right: -.25rem; }
	.ng-sechead { margin-bottom: 1.1rem; }
	.ng-grid { gap: 1.6rem; }
	.c-site-branding__title { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* ---------- 目次（Snow Monkey Blocks contents-outline） ---------- */
.p-entry-content .wpco-wrapper { margin-top: 2em; }
.p-entry-content .wpco {
	padding: 1.2em 1.3em 1em !important;
	background: #fff !important;
	border: 1px solid var(--ng-line);
	border-radius: var(--ng-radius);
}
.p-entry-content .wpco__title {
	margin: 0 0 .6em !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	font-family: var(--ng-serif);
	font-size: 1rem !important;
	color: var(--ng-navy);
}
.p-entry-content .wpco__title::before { display: none !important; }
.p-entry-content .wpco ol { margin: 0; }
.p-entry-content .wpco li { margin-top: 0 !important; padding: .45em 0 !important; font-size: .9rem; line-height: 1.6; }
.p-entry-content .wpco li::before { transform: scale(.85); }
.p-entry-content .wpco a { color: var(--ng-text); text-decoration: none; }
.p-entry-content .wpco a:hover { color: var(--ng-navy); text-decoration: underline; }

/* ---------- 修正：ヒーロー見出しの改行、アーカイブのカード ---------- */
.p-entry-content .ng-hero__title, .ng-hero__title { word-break: keep-all; overflow-wrap: anywhere; font-size: clamp(1.5rem, 1.05rem + 2.6vw, 3rem) !important; }
.ng-hero__lead { word-break: normal; }

.c-entries .c-entry-summary__title,
.p-entry-content .c-entry-summary__title {
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	font-size: 1rem !important;
	line-height: 1.6 !important;
}
.c-entries .c-entry-summary__title::before { display: none !important; }
.c-entries--panel .c-entries__item > a {
	box-shadow: none !important;
	border: 1px solid var(--ng-line);
	border-radius: var(--ng-radius);
	overflow: hidden;
	transition: border-color .2s, box-shadow .2s;
}
.c-entries--panel .c-entries__item > a:hover { border-color: #c9c3b6; box-shadow: var(--ng-shadow) !important; }
.c-entries--panel .c-entry-summary__figure { border-radius: 0; aspect-ratio: 1200 / 630; }
.c-entries--panel .c-entry-summary__figure img { width: 100%; height: 100%; object-fit: cover; }
.c-entries--panel .c-entry-summary__body { padding: 1rem 1.1rem 1.1rem !important; }
.c-entries--panel .c-entry-summary__header { margin: 0 !important; }
.c-entries--panel .c-entry-summary__meta { margin-top: .6rem !important; justify-content: flex-start; }
.c-entries--panel .c-entry-summary__content { display: none; }
.p-archive .c-entry__header + .c-entry__body, .c-entry__content > p:first-child { margin-top: 0; }
.p-related-posts .c-entry-summary__title { font-size: .95rem !important; }

/* ---------- 旧ショートコード ---------- */
.ng-legacy-box { display: block; margin: 1em 0; padding: .9em 1.1em; background: var(--ng-mist); border: 1px solid var(--ng-line); border-radius: var(--ng-radius); }
.ng-legacy-box__title { display: block; font-weight: 700; color: var(--ng-navy); margin-bottom: .3em; }
.ng-legacy-box span[style*="font-size"] { font-size: inherit !important; }
.p-entry-content span.ng-related { margin: 1em 0; padding: 1em 1.1em; border: 1px solid var(--ng-line); border-radius: var(--ng-radius); }
.ng-voice { display: flex; gap: .9em; align-items: flex-start; margin: 1.2em 0; }
.ng-voice__who { flex: 0 0 64px; text-align: center; font-size: .72rem; color: var(--ng-muted); }
.ng-voice__icon { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 50%; border: 1px solid var(--ng-line); margin: 0 auto .2em; }
.ng-voice__name { display: block; }
.ng-voice__text { position: relative; flex: 1; padding: .8em 1em; background: #fff; border: 1px solid var(--ng-line); border-radius: 12px; }

/* ---------- CLS対策：アイコン（Font Awesome）の描画前に幅を確保 ---------- */
.c-meta i[class*="fa-"], .c-meta svg.svg-inline--fa,
.c-entry-summary__meta i[class*="fa-"], .c-entry-summary__meta svg.svg-inline--fa {
	display: inline-block;
	width: 1em;
	height: 1em;
	vertical-align: -.125em;
}
.c-meta { min-height: 1.6em; }
