/*
Theme Name: NETSUMOJI POP
Theme URI: https://www.netsumoji-mania.com/
Description: ポッドキャスト『熱量と文字数』ファンサイト NETSUMOJI-MANIA 専用オリジナルテーマ。ポップなアニメ雑誌風デザイン。
Author: NETSUMOJI-MANIA
Version: 1.0.0
Requires at least: 6.4
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: netsumoji-pop
*/

/* =========================================================
   0. Tokens
   ========================================================= */
:root {
	--nm-ink: #15110d;
	--nm-paper: #fff8e6;
	--nm-paper-2: #fff1c9;
	--nm-white: #ffffff;
	--nm-green: #005800;       /* ブランドグリーン（ロゴ色） */
	--nm-green-2: #19a64a;
	--nm-lime: #c6f24e;
	--nm-pink: #ff3d8b;
	--nm-yellow: #ffd23f;
	--nm-cyan: #2cc5f5;
	--nm-muted: #6b6257;

	--nm-line: 3px solid var(--nm-ink);
	--nm-shadow: 6px 6px 0 var(--nm-ink);
	--nm-shadow-sm: 4px 4px 0 var(--nm-ink);
	--nm-radius: 14px;

	--nm-font-display: "Dela Gothic One", "851ゴチカクット", "Hiragino Sans", sans-serif;
	--nm-font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;

	--nm-container: 1200px;
	--nm-gutter: clamp(16px, 3vw, 32px);
}

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

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

body {
	margin: 0;
	background-color: var(--nm-paper);
	background-image: radial-gradient(rgba(21, 17, 13, .09) 1.2px, transparent 1.3px);
	background-size: 14px 14px;
	color: var(--nm-ink);
	font-family: var(--nm-font-body);
	font-size: 16px;
	line-height: 1.85;
	font-feature-settings: "palt" 1;
	overflow-x: hidden;
}

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

a { color: var(--nm-green); text-underline-offset: .2em; }
a:hover { color: var(--nm-pink); }

:focus-visible { outline: 3px solid var(--nm-pink); outline-offset: 3px; }

.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;
}
.screen-reader-text:focus {
	clip: auto; width: auto; height: auto; margin: 0; z-index: 1000;
	top: 8px; left: 8px; padding: 10px 16px; background: var(--nm-yellow); color: var(--nm-ink);
}

.nm-container {
	width: 100%;
	max-width: calc(var(--nm-container) + var(--nm-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--nm-gutter);
}

/* =========================================================
   2. Header
   ========================================================= */
.nm-topbar {
	background: var(--nm-ink);
	color: var(--nm-yellow);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	overflow: hidden;
	white-space: nowrap;
	border-bottom: 3px solid var(--nm-ink);
}
.nm-topbar__track {
	display: inline-flex;
	gap: 3em;
	padding: 6px 0;
	animation: nm-marquee 28s linear infinite;
}
.nm-topbar__track span::before { content: "★ "; color: var(--nm-pink); }
.nm-topbar a { color: inherit; text-decoration: none; }
@keyframes nm-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .nm-topbar__track { animation: none; } }

.nm-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--nm-white);
	border-bottom: var(--nm-line);
}
.admin-bar .nm-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .nm-header { top: 0; position: relative; } }

.nm-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 76px;
}
.nm-brand-wrap { min-width: 0; }
.nm-brand { display: flex; align-items: center; min-width: 0; text-decoration: none; color: var(--nm-ink); }
@media (max-width: 600px) {
	.nm-brand__text { font-size: 18px; }
	.nm-brand__text small { font-size: 10px; }
	.nm-brand img { max-width: 100%; }
}
.nm-brand img { display: block; max-height: 52px; width: auto; }
.nm-brand__text { font-family: var(--nm-font-display); font-size: 24px; line-height: 1.1; }
.nm-brand__text small { display: block; font-family: var(--nm-font-body); font-size: 11px; font-weight: 700; color: var(--nm-green); }

/* Global nav (desktop) */
.nm-nav { margin-left: auto; }
.nm-nav ul { list-style: none; margin: 0; padding: 0; }
.nm-nav .menu { display: flex; align-items: stretch; gap: 4px; }
.nm-nav .menu > li { position: relative; }
.nm-nav .menu > li > a {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--nm-ink);
	text-decoration: none;
	font-weight: 900;
	font-size: 14px;
	line-height: 1.3;
	transition: background .15s, transform .15s;
}
.nm-nav .menu > li > a > span { white-space: nowrap; }
.nm-nav .menu-item__desc {
	font-family: var(--nm-font-body);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .1em;
	color: var(--nm-green-2);
	text-transform: uppercase;
}
.nm-nav .menu > li > a:hover,
.nm-nav .menu > li:focus-within > a,
.nm-nav .menu > .current-menu-item > a,
.nm-nav .menu > .current-menu-ancestor > a {
	background: var(--nm-yellow);
	transform: rotate(-2deg);
}
.nm-nav .sub-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 50%;
	min-width: 240px;
	padding: 10px;
	background: var(--nm-white);
	border: var(--nm-line);
	border-radius: var(--nm-radius);
	box-shadow: var(--nm-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity .15s, transform .15s, visibility .15s;
	z-index: 10;
}
.nm-nav .sub-menu::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.nm-nav .menu > li:hover > .sub-menu,
.nm-nav .menu > li:focus-within > .sub-menu {
	opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.nm-nav .sub-menu.is-mega { width: min(720px, 90vw); columns: 2 220px; column-gap: 8px; }
.nm-nav .sub-menu li { break-inside: avoid; }
.nm-nav .sub-menu a {
	display: block;
	padding: 7px 12px;
	border-radius: 8px;
	color: var(--nm-ink);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	line-height: 1.5;
}
.nm-nav .sub-menu a:hover { background: var(--nm-lime); }
.nm-nav .sub-menu .menu-item__desc { display: none; }
.nm-nav .sub-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; }

.nm-header__search { flex-shrink: 0; }
.nm-icon-btn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: var(--nm-line);
	border-radius: 50%;
	background: var(--nm-white);
	color: var(--nm-ink);
	cursor: pointer;
	box-shadow: 3px 3px 0 var(--nm-ink);
	transition: transform .1s, box-shadow .1s;
}
.nm-icon-btn:hover { background: var(--nm-yellow); }
.nm-icon-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--nm-ink); }
.nm-icon-btn svg { width: 20px; height: 20px; }

.nm-menu-toggle { display: none; }

/* Search panel */
.nm-search-panel {
	display: none;
	border-top: var(--nm-line);
	background: var(--nm-yellow);
	padding: 16px 0;
}
.nm-search-panel.is-open { display: block; }

.nm-searchform { display: flex; max-width: 640px; margin-inline: auto; }
.nm-searchform input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 12px 16px;
	border: var(--nm-line);
	border-right: 0;
	border-radius: 999px 0 0 999px;
	font: inherit;
	background: var(--nm-white);
}
.nm-searchform button {
	padding: 0 22px;
	border: var(--nm-line);
	border-radius: 0 999px 999px 0;
	background: var(--nm-ink);
	color: var(--nm-yellow);
	font: inherit;
	font-weight: 900;
	cursor: pointer;
}
.nm-searchform button:hover { background: var(--nm-pink); color: var(--nm-white); }

/* Mobile nav */
@media (max-width: 1180px) {
	.nm-header__inner { min-height: 64px; gap: 12px; }
	.nm-brand img { max-height: 40px; }
	.nm-header__search { margin-left: auto; }
	.nm-menu-toggle { display: inline-grid; }
	.nm-nav {
		position: fixed;
		inset: 0 0 0 auto;
		width: min(400px, 88vw);
		margin: 0;
		padding: 80px 20px 40px;
		background: var(--nm-green);
		border-left: var(--nm-line);
		overflow-y: auto;
		transform: translateX(105%);
		transition: transform .25s ease;
		z-index: 200;
	}
	.nm-nav.is-open { transform: none; }
	.nm-nav .menu { flex-direction: column; gap: 8px; }
	.nm-nav .menu > li > a {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		padding: 10px 56px 10px 16px;
		background: var(--nm-white);
		border: var(--nm-line);
		box-shadow: var(--nm-shadow-sm);
		font-size: 16px;
	}
	.nm-nav .menu > li > a:hover { transform: none; }
	.nm-nav .menu-item__desc { color: var(--nm-muted); }
	.nm-nav .sub-menu,
	.nm-nav .sub-menu.is-mega {
		position: static;
		display: none;
		width: auto;
		columns: auto;
		margin: 8px 0 4px;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
	}
	.nm-nav li.is-expanded > .sub-menu { display: block; }
	.nm-nav .menu > li:hover > .sub-menu,
	.nm-nav .menu > li:focus-within > .sub-menu { transform: none; }
	.nm-subtoggle {
		position: absolute;
		top: 8px;
		right: 8px;
		width: 40px;
		height: 40px;
		border: 0;
		border-radius: 50%;
		background: var(--nm-yellow);
		color: var(--nm-ink);
		font-size: 22px;
		font-weight: 900;
		line-height: 1;
		cursor: pointer;
	}
	.nm-nav li.is-expanded > .nm-subtoggle { background: var(--nm-pink); color: var(--nm-white); }
	.nm-nav__close { position: absolute; top: 16px; right: 16px; }
	.nm-overlay {
		position: fixed;
		inset: 0;
		background: rgba(21, 17, 13, .55);
		opacity: 0;
		visibility: hidden;
		transition: opacity .2s;
		z-index: 99; /* ヘッダー(100)の重なり文脈内にあるドロワーより下に置く */
	}
	.nm-overlay.is-open { opacity: 1; visibility: visible; }
	body.nm-nav-open { overflow: hidden; }
}
@media (min-width: 1181px) {
	.nm-subtoggle, .nm-nav__close, .nm-overlay { display: none; }
}

/* =========================================================
   3. Hero
   ========================================================= */
.nm-hero {
	position: relative;
	padding: clamp(20px, 4vw, 48px) 0 clamp(36px, 5vw, 64px);
	background: var(--nm-green);
	background-image:
		repeating-conic-gradient(from 0deg at 80% 40%, rgba(255,255,255,.07) 0deg 8deg, transparent 8deg 16deg);
	border-bottom: var(--nm-line);
	overflow: hidden;
}
.nm-hero__frame {
	position: relative;
	border: var(--nm-line);
	border-radius: 22px;
	background: var(--nm-ink);
	box-shadow: 10px 10px 0 var(--nm-ink);
	overflow: hidden;
}
.nm-slide {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	min-height: clamp(320px, 42vw, 480px);
}
.nm-slide[hidden] { display: none; }
.nm-slide__body {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
	padding: clamp(24px, 4vw, 48px);
	background: var(--nm-yellow);
	border-right: var(--nm-line);
	z-index: 1;
}
.nm-slide__label {
	align-self: flex-start;
	padding: 4px 14px;
	background: var(--nm-pink);
	color: var(--nm-white);
	border: var(--nm-line);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: .12em;
	transform: rotate(-3deg);
}
.nm-slide__title {
	margin: 0;
	font-family: var(--nm-font-display);
	font-weight: 400;
	font-size: clamp(26px, 3.6vw, 46px);
	line-height: 1.2;
	word-break: auto-phrase;
}
.nm-slide__text { margin: 0; font-weight: 700; line-height: 1.7; }
.nm-slide__media { position: relative; background: var(--nm-ink); }
/* 既存のスライド画像は左半分が文字用の黒地なので、右側（人物）を優先して見せる */
.nm-slide__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }

/* 文字なしスライド：画像を横いっぱいに（元のバナー比率 1900x600） */
.nm-slide--image { grid-template-columns: 1fr; min-height: 0; }
.nm-slide--image .nm-slide__media { display: block; aspect-ratio: 19 / 6; }
.nm-slide--image .nm-slide__media img { object-position: center; }

.nm-hero__controls {
	position: absolute;
	right: 16px;
	bottom: 16px;
	display: flex;
	gap: 8px;
	z-index: 2;
}
.nm-hero__dot {
	width: 16px; height: 16px; padding: 0;
	border: 3px solid var(--nm-ink);
	border-radius: 50%;
	background: var(--nm-white);
	cursor: pointer;
}
.nm-hero__dot[aria-current="true"] { background: var(--nm-pink); }

.nm-hero__sticker {
	position: absolute;
	top: clamp(6px, 2vw, 24px);
	right: clamp(10px, 4vw, 60px);
	display: grid;
	place-items: center;
	width: clamp(84px, 11vw, 132px);
	aspect-ratio: 1;
	background: var(--nm-pink);
	color: var(--nm-white);
	border: var(--nm-line);
	border-radius: 50%;
	font-family: var(--nm-font-display);
	font-size: clamp(13px, 1.5vw, 18px);
	line-height: 1.15;
	text-align: center;
	transform: rotate(12deg);
	box-shadow: var(--nm-shadow-sm);
	z-index: 3;
}

@media (max-width: 767px) {
	.nm-slide--image .nm-slide__media { aspect-ratio: 19 / 6; order: 0; }
	.nm-slide { grid-template-columns: 1fr; }
	.nm-slide__media { aspect-ratio: 16 / 10; order: -1; }
	.nm-slide__body { border-right: 0; border-top: var(--nm-line); }
	.nm-hero__controls { top: 12px; bottom: auto; }
	.nm-hero__sticker { display: none; }
}

/* =========================================================
   4. Buttons / labels
   ========================================================= */
.nm-btn,
.wp-block-button__link,
.wpcf7-submit,
.nm-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: 10px 22px;
	border: var(--nm-line) !important;
	border-radius: 999px;
	background: var(--nm-white);
	color: var(--nm-ink);
	font-family: var(--nm-font-body);
	font-weight: 900;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	box-shadow: var(--nm-shadow-sm);
	transition: transform .1s, box-shadow .1s, background .15s;
}
.nm-btn:hover,
.wp-block-button__link:hover,
.wpcf7-submit:hover,
.nm-pagination a.page-numbers:hover {
	background: var(--nm-lime);
	color: var(--nm-ink);
	transform: translate(-2px, -2px);
	box-shadow: 6px 6px 0 var(--nm-ink);
}
.nm-btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--nm-ink); }
.nm-btn--ink { background: var(--nm-ink); color: var(--nm-yellow); }
.nm-btn--pink { background: var(--nm-pink); color: var(--nm-white); }
.nm-btn svg { width: 1em; height: 1em; }

.nm-tag {
	display: inline-block;
	padding: 2px 12px;
	border: 2px solid var(--nm-ink);
	border-radius: 999px;
	background: var(--nm-lime);
	color: var(--nm-ink);
	font-size: 12px;
	font-weight: 900;
	text-decoration: none;
	letter-spacing: .06em;
}
.nm-tag:hover { background: var(--nm-pink); color: var(--nm-white); }
.nm-tag--notice { background: var(--nm-cyan); }
.nm-tag--article { background: var(--nm-yellow); }

/* =========================================================
   5. Section headings
   ========================================================= */
.nm-section { padding: clamp(40px, 6vw, 72px) 0; }
.nm-section + .nm-section { padding-top: 0; }

.nm-heading {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 0 0 28px;
}
.nm-heading__en {
	font-family: var(--nm-font-display);
	font-weight: 400;
	font-size: clamp(34px, 6vw, 64px);
	line-height: .9;
	letter-spacing: .02em;
	color: var(--nm-white);
	-webkit-text-stroke: 3px var(--nm-ink);
	paint-order: stroke fill;
	text-shadow: 5px 5px 0 var(--nm-ink);
}
.nm-heading__ja {
	padding: 4px 14px;
	background: var(--nm-ink);
	color: var(--nm-yellow);
	font-size: 14px;
	font-weight: 900;
	transform: rotate(-2deg);
}
.nm-heading__more { margin-left: auto; }
.nm-heading--pink .nm-heading__en { color: var(--nm-pink); }
.nm-heading--green .nm-heading__en { color: var(--nm-green-2); }
.nm-heading--yellow .nm-heading__en { color: var(--nm-yellow); }

/* =========================================================
   6. Front: pickup tiles
   ========================================================= */
.nm-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.nm-tile a {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 150px;
	height: 100%;
	padding: 18px;
	border: var(--nm-line);
	border-radius: var(--nm-radius);
	box-shadow: var(--nm-shadow);
	color: var(--nm-ink);
	text-decoration: none;
	overflow: hidden;
	transition: transform .15s, box-shadow .15s;
}
.nm-tile a::after {
	content: "→";
	position: absolute;
	top: 12px;
	right: 14px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 2px solid var(--nm-ink);
	border-radius: 50%;
	background: var(--nm-white);
	font-weight: 900;
}
.nm-tile a:hover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 9px 9px 0 var(--nm-ink); }
.nm-tile__en { font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.nm-tile__ja { font-family: var(--nm-font-display); font-size: 22px; line-height: 1.25; }
.nm-tile:nth-child(6n+1) a { background: var(--nm-yellow); }
.nm-tile:nth-child(6n+2) a { background: var(--nm-pink); color: var(--nm-white); }
.nm-tile:nth-child(6n+3) a { background: var(--nm-cyan); }
.nm-tile:nth-child(6n+4) a { background: var(--nm-lime); }
.nm-tile:nth-child(6n+5) a { background: var(--nm-green); color: var(--nm-white); }
.nm-tile:nth-child(6n+6) a { background: var(--nm-white); }
.nm-tile:nth-child(6n+2) a::after,
.nm-tile:nth-child(6n+5) a::after { color: var(--nm-ink); }

/* =========================================================
   7. Front: episodes (podcast RSS)
   ========================================================= */
.nm-episodes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.nm-episode {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px;
	background: var(--nm-white);
	border: var(--nm-line);
	border-radius: var(--nm-radius);
	box-shadow: var(--nm-shadow-sm);
}
.nm-episode:first-child { background: var(--nm-yellow); }
.nm-episode__date { font-size: 12px; font-weight: 900; color: var(--nm-muted); }
.nm-episode__title { margin: 0; font-size: 17px; font-weight: 900; line-height: 1.5; }
.nm-episode__title a { color: var(--nm-ink); text-decoration: none; }
.nm-episode__title a:hover { color: var(--nm-pink); }
.nm-episode audio { width: 100%; margin-top: auto; }

/* =========================================================
   8. Layout (main + sidebar)
   ========================================================= */
.nm-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: clamp(24px, 4vw, 48px);
	align-items: start;
}
.nm-layout--full { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 960px) { .nm-layout { grid-template-columns: minmax(0, 1fr); } }

/* =========================================================
   9. Post cards
   ========================================================= */
.nm-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 26px 22px;
}
.nm-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--nm-white);
	border: var(--nm-line);
	border-radius: var(--nm-radius);
	box-shadow: var(--nm-shadow);
	overflow: hidden;
	transition: transform .15s, box-shadow .15s;
}
.nm-card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--nm-ink); }
.nm-card__thumb {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--nm-green);
	border-bottom: var(--nm-line);
	overflow: hidden;
}
.nm-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.nm-card:hover .nm-card__thumb img { transform: scale(1.05); }
.nm-card__thumb--empty {
	display: grid;
	place-items: center;
	color: var(--nm-yellow);
	font-family: var(--nm-font-display);
	font-size: 24px;
	background-image: radial-gradient(rgba(255,255,255,.18) 2px, transparent 2.2px);
	background-size: 12px 12px;
}
.nm-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 16px 18px 18px; }
.nm-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; font-weight: 700; color: var(--nm-muted); }
.nm-card__title { margin: 0; font-size: 17px; font-weight: 900; line-height: 1.55; }
.nm-card__title a { color: var(--nm-ink); text-decoration: none; }
.nm-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.nm-card__excerpt { margin: 0; font-size: 14px; line-height: 1.7; color: var(--nm-muted); }
.nm-card .nm-tag { position: relative; z-index: 2; }
.nm-card.is-sticky { border-color: var(--nm-pink); }
.nm-card.is-sticky::before {
	content: "PICK UP!";
	position: absolute;
	top: 12px;
	left: -6px;
	z-index: 2;
	padding: 2px 12px 2px 14px;
	background: var(--nm-pink);
	color: var(--nm-white);
	border: 2px solid var(--nm-ink);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: .1em;
}

/* Archive header */
.nm-pagehead {
	position: relative;
	padding: clamp(32px, 6vw, 72px) 0 clamp(28px, 4vw, 48px);
	background: var(--nm-green);
	background-image: radial-gradient(rgba(255,255,255,.14) 2px, transparent 2.2px);
	background-size: 16px 16px;
	border-bottom: var(--nm-line);
	color: var(--nm-white);
	overflow: hidden;
}
.nm-pagehead::after {
	content: "";
	position: absolute;
	right: -40px;
	bottom: -60px;
	width: 220px;
	height: 220px;
	border: var(--nm-line);
	border-radius: 50%;
	background: var(--nm-yellow);
	opacity: .95;
}
.nm-pagehead__title {
	position: relative;
	z-index: 1;
	margin: 0;
	font-family: var(--nm-font-display);
	font-weight: 400;
	font-size: clamp(28px, 5vw, 52px);
	line-height: 1.2;
	color: var(--nm-white);
	-webkit-text-stroke: 3px var(--nm-ink);
	paint-order: stroke fill;
	text-shadow: 5px 5px 0 var(--nm-ink);
	word-break: auto-phrase;
}
.nm-pagehead__sub { position: relative; z-index: 1; margin: 10px 0 0; font-weight: 700; }

.nm-breadcrumb { position: relative; z-index: 1; margin: 0 0 14px; font-size: 12px; font-weight: 700; }
.nm-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0; padding: 0; }
.nm-breadcrumb li + li::before { content: "›"; margin-right: 8px; opacity: .7; }
.nm-breadcrumb a { color: var(--nm-yellow); }

/* Pagination */
.nm-pagination { margin-top: 40px; }
.nm-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nm-pagination .page-numbers { min-width: 46px; padding: 8px 14px; }
.nm-pagination .page-numbers.current { background: var(--nm-ink); color: var(--nm-yellow); }
.nm-pagination .page-numbers.dots { border: 0 !important; box-shadow: none; background: none; }

/* =========================================================
   10. Single / page content
   ========================================================= */
.nm-article {
	padding: clamp(20px, 4vw, 44px);
	background: var(--nm-white);
	border: var(--nm-line);
	border-radius: var(--nm-radius);
	box-shadow: var(--nm-shadow);
}
.nm-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 13px; font-weight: 700; color: var(--nm-muted); }
/* アイキャッチは高さを抑える（正方形のロゴ画像が多く、本文が押し下げられるため） */
.nm-article__thumb {
	margin: 0 0 28px;
	background: var(--nm-paper-2);
	border: var(--nm-line);
	border-radius: 10px;
	overflow: hidden;
	text-align: center;
}
.nm-article__thumb img { display: block; width: auto; max-width: 100%; max-height: 360px; margin-inline: auto; object-fit: contain; }
@media (max-width: 600px) { .nm-article__thumb img { max-height: 240px; } }

.entry-content { overflow-wrap: anywhere; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 {
	position: relative;
	margin: 2.4em 0 1em;
	padding: 12px 18px 12px 22px;
	background: var(--nm-green);
	color: var(--nm-white);
	border: var(--nm-line);
	border-radius: 10px;
	box-shadow: var(--nm-shadow-sm);
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 900;
	line-height: 1.45;
}
.entry-content h3 {
	margin: 2em 0 .8em;
	padding: 0 0 6px 14px;
	border-left: 8px solid var(--nm-pink);
	border-bottom: 3px dashed var(--nm-ink);
	font-size: clamp(18px, 2vw, 22px);
	font-weight: 900;
	line-height: 1.5;
}
.entry-content h4 {
	display: inline-block;
	margin: 1.8em 0 .6em;
	font-size: 18px;
	font-weight: 900;
	background: linear-gradient(transparent 60%, var(--nm-yellow) 60%);
}
.entry-content blockquote {
	margin: 1.6em 0;
	padding: 18px 22px;
	background: var(--nm-paper);
	border: var(--nm-line);
	border-radius: 18px 18px 18px 0;
	font-weight: 700;
}
.entry-content ul, .entry-content ol { padding-left: 1.6em; }
.entry-content li::marker { color: var(--nm-pink); font-weight: 900; }
.entry-content hr { border: 0; border-top: 4px dashed var(--nm-green); margin: 2.4em 0; }
.entry-content img { border-radius: 4px; }

/* 素の表（Lightning時代のページを想定して全体を整える） */
.entry-content table {
	width: 100%;
	margin: 1.4em 0;
	border-collapse: collapse;
	background: var(--nm-white);
	font-size: 15px;
}
.entry-content th,
.entry-content td { padding: 8px 10px; border: 1px solid #d8cfbd; vertical-align: middle; }
.entry-content thead th { background: var(--nm-paper-2); font-weight: 900; }

/* 横に長い表はスクロールさせる（JSで .nm-table-scroll に包む） */
.nm-table-scroll { margin: 1.4em 0; padding: 0 8px 10px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nm-table-scroll > table { margin: 0; }

.nm-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.nm-post-nav a {
	display: block;
	height: 100%;
	padding: 14px 18px;
	background: var(--nm-white);
	border: var(--nm-line);
	border-radius: var(--nm-radius);
	box-shadow: var(--nm-shadow-sm);
	color: var(--nm-ink);
	font-weight: 700;
	text-decoration: none;
}
.nm-post-nav a:hover { background: var(--nm-yellow); }
.nm-post-nav small { display: block; font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--nm-green); }
.nm-post-nav .next { text-align: right; grid-column: 2; }
@media (max-width: 600px) { .nm-post-nav { grid-template-columns: 1fr; } .nm-post-nav .next { grid-column: auto; } }

.nm-related { margin-top: 48px; }

/* =========================================================
   11. Sidebar / widgets
   ========================================================= */
.nm-sidebar { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 961px) { .nm-sidebar { position: sticky; top: 100px; } }
.nm-sidebar .widget {
	padding: 18px;
	background: var(--nm-white);
	border: var(--nm-line);
	border-radius: var(--nm-radius);
	box-shadow: var(--nm-shadow-sm);
	overflow: hidden;
}
.widget-title,
.nm-sidebar .wp-block-heading {
	margin: -18px -18px 16px;
	padding: 8px 16px;
	background: var(--nm-ink);
	color: var(--nm-yellow);
	font-size: 15px;
	font-weight: 900;
	letter-spacing: .06em;
}
.nm-sidebar ul { margin: 0; padding-left: 1.2em; }
.nm-sidebar img { display: block; margin-inline: auto; }

.widget:empty,
.nm-front-widgets .widget:has(> :only-child:empty) { display: none; }
.nm-front-widgets { display: grid; gap: 20px; margin-bottom: 36px; }
.nm-front-widgets .widget {
	padding: 22px;
	background: var(--nm-white);
	border: var(--nm-line);
	border-radius: var(--nm-radius);
	box-shadow: var(--nm-shadow);
	font-weight: 700;
	text-align: center;
}
.nm-front-widgets img { display: block; margin: 0 auto 10px; }

/* =========================================================
   12. Footer
   ========================================================= */
.nm-footer {
	margin-top: clamp(48px, 8vw, 96px);
	background: var(--nm-ink);
	color: var(--nm-white);
	border-top: var(--nm-line);
}
.nm-footer__wave {
	height: 28px;
	background: radial-gradient(circle at 14px -6px, var(--nm-paper) 18px, transparent 19px) repeat-x;
	background-size: 28px 28px;
}
.nm-footer__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 32px;
	padding: 40px 0 32px;
}
@media (max-width: 767px) { .nm-footer__inner { grid-template-columns: 1fr; } }
.nm-footer__brand img { max-height: 56px; width: auto; background: var(--nm-white); padding: 8px 12px; border-radius: 10px; }
.nm-footer__brand p { margin: 12px 0 0; font-size: 13px; color: #d8d0c4; }
.nm-footer__menu ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.nm-footer__menu a {
	display: inline-block;
	padding: 6px 16px;
	border: 2px solid var(--nm-white);
	border-radius: 999px;
	color: var(--nm-white);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}
.nm-footer__menu a:hover { background: var(--nm-yellow); border-color: var(--nm-yellow); color: var(--nm-ink); }
.nm-footer__menu .sub-menu { display: none; }
.nm-footer .widget { margin-bottom: 20px; }
.nm-copyright {
	padding: 14px 0;
	border-top: 1px solid rgba(255,255,255,.2);
	font-size: 12px;
	color: #bdb4a6;
	text-align: center;
}

.nm-pagetop {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 90;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s, visibility .2s;
	background: var(--nm-yellow);
}
.nm-pagetop.is-visible { opacity: 1; visibility: visible; }

/* =========================================================
   13. 404 / search / misc
   ========================================================= */
.nm-empty {
	padding: 40px 24px;
	background: var(--nm-white);
	border: var(--nm-line);
	border-radius: var(--nm-radius);
	box-shadow: var(--nm-shadow);
	text-align: center;
}
.nm-empty__big {
	margin: 0;
	font-family: var(--nm-font-display);
	font-size: clamp(72px, 16vw, 160px);
	line-height: 1;
	color: var(--nm-pink);
	-webkit-text-stroke: 4px var(--nm-ink);
	paint-order: stroke fill;
	text-shadow: 8px 8px 0 var(--nm-ink);
}

.alignwide { margin-inline: calc(var(--nm-gutter) * -1); }
.alignfull { margin-inline: calc(50% - 50vw); }
.aligncenter { display: block; margin-inline: auto; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.wp-caption-text, figcaption { font-size: 13px; color: var(--nm-muted); text-align: center; }
.sticky, .bypostauthor, .gallery-caption { /* WordPress 必須クラス */ }
