/*
Theme Name: フェチ研
Theme URI: https://sugi.work/
Author: SUGI WORK
Author URI: https://sugi.work/
Description: 嗜好を研究する大人のための、研究ノート風テーマ。白と淡色の方眼紙・教科書の意匠。SEO（タイトル・説明文・canonical・OGP・構造化データ・robots・サイトマップ調整）をテーマに内蔵し、SEOプラグインなしで運用できます。SW FANZA Auto Post と連携して作品カード・関連作品・まとめページを表示します。
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fetiken
Tags: blog, two-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   トークン
   ========================================================================== */
:root {
	--paper: #fbfcfd;          /* 少し青みのある白（クリームにしない） */
	--sheet: #ffffff;
	--grid: #e6eef3;           /* 方眼の細線 */
	--grid-major: #d5e2ea;     /* 方眼の太線（5マスごと） */
	--ink: #1f2c46;            /* ブルーブラックのインク */
	--ink-soft: #52617a;
	--ink-faint: #8593a8;
	--rule: #cdd9e2;
	--litmus: #d6487a;         /* リトマス紙のピンク（アクセント） */
	--litmus-deep: #b23562;
	--reagent: #2a8a86;        /* 試薬の青緑（フォーカス・補助） */
	--marker: #fff0a0;         /* 教科書の蛍光ペン */
	--memo: #fffae0;
	--l0: #e7edf2;
	--l1: #f6dbe5;
	--l2: #f0b7cb;
	--l3: #e88bab;
	--l4: #df6590;
	--l5: #c93a6c;

	--sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "BIZ UDPGothic", Meiryo, system-ui, sans-serif;
	--hand: "Klee One", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;

	--step--1: .8125rem;
	--step-0: 1rem;
	--step-1: 1.1875rem;
	--step-2: 1.4375rem;
	--step-3: 1.75rem;
	--step-4: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
	--step-5: clamp(2.75rem, 1.6rem + 5vw, 4.75rem);

	--cell: 24px;              /* 方眼1マス */
	--wrap: 1160px;
	--gutter: clamp(16px, 4vw, 32px);
}

/* ==========================================================================
   ベース
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
html.is-gated { overflow: hidden; }
body {
	margin: 0;
	color: var(--ink);
	background-color: var(--paper);
	background-image:
		linear-gradient(var(--grid-major) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
		linear-gradient(var(--grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	background-size: calc(var(--cell) * 5) calc(var(--cell) * 5), calc(var(--cell) * 5) calc(var(--cell) * 5), var(--cell) var(--cell), var(--cell) var(--cell);
	background-position: -1px -1px;
	font-family: var(--sans);
	font-size: var(--step-0);
	line-height: 1.85;
	font-feature-settings: "palt" 0;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; vertical-align: middle; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--litmus-deep); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--reagent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input { font: inherit; color: inherit; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

.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 { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }
.wrap--work { max-width: 1000px; }
.main { padding-bottom: calc(var(--cell) * 4); }

/* ==========================================================================
   ヘッダー
   ========================================================================== */
.masthead { background: var(--sheet); border-bottom: 1px solid var(--rule); position: relative; z-index: 20; }
.masthead__in {
	max-width: var(--wrap); margin-inline: auto; padding: 12px var(--gutter);
	display: flex; align-items: center; gap: 12px 24px;
}
.logo { margin: 0; font-size: 1rem; }
.logo a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo__mark { width: 30px; height: 30px; color: var(--litmus); }
.logo__name { font-family: var(--hand); font-weight: 600; font-size: 1.625rem; letter-spacing: .04em; line-height: 1; }
.logo__img { max-height: 44px; width: auto; }
.masthead__tagline { font-size: var(--step--1); color: var(--ink-soft); padding-left: 16px; border-left: 1px solid var(--rule); line-height: 1.5; }
.masthead__nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.gnav { list-style: none; display: flex; gap: 4px 20px; flex-wrap: wrap; }
.gnav a { text-decoration: none; font-weight: 600; font-size: .9375rem; padding: 6px 0; display: block; border-bottom: 2px solid transparent; }
.gnav a:hover, .gnav .current-menu-item > a { border-bottom-color: var(--litmus); color: var(--ink); }
.masthead__toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: 4px; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.masthead__toggle .is-close { display: none; }
.nav-open .masthead__toggle .is-close { display: block; }
.nav-open .masthead__toggle .is-open { display: none; }

.search { display: flex; align-items: stretch; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.search:focus-within { border-color: var(--reagent); box-shadow: 0 0 0 3px rgba(42, 138, 134, .15); }
.search__input { border: 0; background: none; padding: 8px 12px; min-width: 0; width: 15em; font-size: .9375rem; outline: none; }
.search__btn { border: 0; background: none; padding: 0 12px; cursor: pointer; color: var(--ink-soft); display: flex; align-items: center; }
.search__btn:hover { color: var(--litmus-deep); }

@media (max-width: 900px) {
	.masthead__tagline { display: none; }
	.masthead__toggle { display: inline-flex; }
	.masthead__nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--sheet); border-bottom: 1px solid var(--rule);
		padding: 16px var(--gutter) 24px; flex-direction: column; align-items: stretch; gap: 16px;
	}
	.nav-open .masthead__nav { display: flex; }
	.gnav { flex-direction: column; gap: 0; }
	.gnav a { padding: 12px 0; border-bottom: 1px dashed var(--rule); }
	.search__input { width: 100%; }
}

/* パンくず */
.crumbs { padding-top: 16px; font-size: var(--step--1); color: var(--ink-soft); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 0; }
.crumbs li { display: inline-flex; min-width: 0; }
.crumbs li + li::before { content: "／"; color: var(--ink-faint); padding-inline: .4em; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28em; }

/* ==========================================================================
   トップ：ヒーロー（ノートの表紙）
   ========================================================================== */
.hero { padding-block: calc(var(--cell) * 3) calc(var(--cell) * 2); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: calc(var(--cell) * 2); align-items: center; }

/* 表紙のタイトル枠：二重線の見出しラベル */
.hero__text {
	position: relative;
	background: var(--sheet);
	border: 1px solid var(--ink);
	outline: 1px solid var(--ink); outline-offset: 5px;
	padding: calc(var(--cell) * 1.5) calc(var(--cell) * 1.5) calc(var(--cell) * 1.25);
	margin: 6px;
}
.hero__kicker { font-size: var(--step--1); color: var(--ink-soft); padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px dashed var(--rule); }
.hero__title { display: flex; flex-direction: column; gap: 12px; }
.hero__name {
	font-family: var(--hand); font-weight: 600; font-size: var(--step-5);
	line-height: 1.05; letter-spacing: .06em; color: var(--ink);
}
.hero__sub { font-size: var(--step-1); font-weight: 700; line-height: 1.6; }
.hero__lead { margin-top: 16px; color: var(--ink-soft); max-width: 34em; }

.hero__lab {
	background: var(--sheet);
	border: 1px solid var(--rule);
	border-top: 4px solid var(--litmus);
	padding: calc(var(--cell) * 1.25);
}
.hero__labtitle { font-family: var(--hand); font-weight: 600; font-size: var(--step-1); margin-bottom: 12px; }
.hero__lab .search { margin-bottom: 16px; }
.hero__lab .search__input { width: 100%; padding: 12px 14px; font-size: 1rem; }

@media (max-width: 820px) {
	.hero { padding-top: calc(var(--cell) * 1.5); }
	.hero__in { grid-template-columns: 1fr; gap: var(--cell); }
}

/* チップ */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	display: inline-block; text-decoration: none; font-size: .875rem; line-height: 1.4;
	padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--sheet);
}
.chip:hover { border-color: var(--litmus); color: var(--litmus-deep); background: #fff7fa; }

/* ==========================================================================
   セクション
   ========================================================================== */
.block { padding-block: calc(var(--cell) * 2); }
.block--tight { padding-block: calc(var(--cell) * 1.5) 0; }
.block--ruled { background: rgba(255, 255, 255, .72); border-block: 1px solid var(--rule); }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: var(--cell); }
.block__title {
	font-family: var(--hand); font-weight: 600; font-size: var(--step-3); letter-spacing: .02em;
	background: linear-gradient(transparent 62%, var(--marker) 62%, var(--marker) 92%, transparent 92%);
	display: inline; padding-inline: 2px;
}
.block--tight > .block__title, .block--tight .block__title { display: inline-block; margin-bottom: var(--cell); }
.block__more { font-size: .9375rem; font-weight: 600; }

/* ==========================================================================
   グリッド
   ========================================================================== */
.grid { display: grid; gap: var(--cell) 20px; }
.grid--works { grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); }
.grid--columns { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid--inline { margin-block: 1.5em; }
.stack { display: grid; gap: 20px; }
@media (max-width: 520px) {
	.grid--works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
}

/* ==========================================================================
   作品カード（標本カード）
   左端の細い帯は「リトマス試験紙」。評価が高いほど濃いピンクになる。
   ========================================================================== */
.spec {
	position: relative;
	display: flex; flex-direction: column;
	background: var(--sheet);
	border: 1px solid var(--rule);
	border-left: 6px solid var(--l0);
	border-radius: 2px 4px 4px 2px;
	transition: border-color .15s, box-shadow .15s;
}
.spec[data-litmus="1"] { border-left-color: var(--l1); }
.spec[data-litmus="2"] { border-left-color: var(--l2); }
.spec[data-litmus="3"] { border-left-color: var(--l3); }
.spec[data-litmus="4"] { border-left-color: var(--l4); }
.spec[data-litmus="5"] { border-left-color: var(--l5); }
.spec:hover { box-shadow: 0 6px 0 -2px var(--grid-major); border-top-color: var(--ink-faint); border-right-color: var(--ink-faint); border-bottom-color: var(--ink-faint); }
.spec__fig { aspect-ratio: 480 / 322; background: var(--l0); overflow: hidden; border-bottom: 1px solid var(--rule); }
.spec__fig img { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }
.spec__noimg { display: grid; place-items: center; height: 100%; color: var(--ink-faint); }
.spec__noimg .icon { width: 40px; height: 40px; }
.spec__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.spec__no { font-size: .75rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.spec__title { font-size: .9375rem; font-weight: 700; line-height: 1.55; }
.spec__title a {
	text-decoration: none;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.spec__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.spec__cast { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8125rem; position: relative; z-index: 1; }
.spec__cast a { color: var(--litmus-deep); text-decoration: none; }
.spec__cast a:hover { text-decoration: underline; }
.spec__meta { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; font-size: .75rem; color: var(--ink-soft); border-top: 1px dashed var(--rule); }

/* 星 */
.stars { position: relative; display: inline-block; color: var(--l0); letter-spacing: .05em; line-height: 1; font-size: .875rem; }
.stars::before {
	content: "★★★★★"; position: absolute; inset: 0; width: var(--fill, 0%); overflow: hidden; color: var(--litmus); white-space: nowrap;
}
.stars__num { margin-left: 4px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stars__count { color: var(--ink-soft); font-size: .85em; }
.spec__rate { display: inline-flex; align-items: center; }

/* ==========================================================================
   コラムカード（ノートの切れ端）
   ========================================================================== */
.note-card {
	position: relative;
	display: flex; flex-direction: column;
	background-color: var(--sheet);
	background-image: linear-gradient(90deg, transparent 22px, rgba(214, 72, 122, .35) 22px, rgba(214, 72, 122, .35) 23px, transparent 23px);
	border: 1px solid var(--rule);
	border-radius: 4px;
	overflow: hidden;
}
.note-card__fig { aspect-ratio: 480 / 322; overflow: hidden; border-bottom: 1px solid var(--rule); }
.note-card__fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-card__body { padding: 16px 18px 18px 38px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.note-card__field { font-size: .8125rem; position: relative; z-index: 1; }
.note-card__field a { color: var(--reagent); text-decoration: none; font-weight: 600; }
.note-card__title { font-family: var(--hand); font-weight: 600; font-size: var(--step-1); line-height: 1.55; }
.note-card__title a { text-decoration: none; }
.note-card__title a::after { content: ""; position: absolute; inset: 0; }
.note-card__title a:hover { text-decoration: underline; }
.note-card__excerpt { font-size: .875rem; color: var(--ink-soft); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-card__meta { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; font-size: .75rem; color: var(--ink-faint); }
.note-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.note-card--row { flex-direction: row; }
.note-card--row .note-card__fig { flex: 0 0 min(36%, 280px); aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--rule); order: 2; }
.note-card--row .note-card__title { font-size: var(--step-2); }
@media (max-width: 600px) {
	.note-card--row { flex-direction: column; }
	.note-card--row .note-card__fig { order: 0; flex: none; aspect-ratio: 480 / 322; border-right: 0; border-bottom: 1px solid var(--rule); }
	.note-card--row .note-card__title { font-size: var(--step-1); }
}

/* ==========================================================================
   索引（教科書の巻末索引：名前……件数）
   ========================================================================== */
.index-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 32px; }
.index-list--names { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.index-list a {
	display: flex; align-items: baseline; gap: 6px; padding: 7px 0; text-decoration: none;
	border-bottom: 1px solid var(--grid);
}
.index-list a::after { content: ""; order: 2; flex: 1; border-bottom: 2px dotted var(--rule); transform: translateY(-4px); min-width: 12px; }
.index-list a span:first-child { order: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.index-list__n { order: 3; font-size: .8125rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.index-list a:hover span:first-child { color: var(--litmus-deep); text-decoration: underline; }
.index-group { margin-top: calc(var(--cell) * 1.5); }
.index-group__title { font-family: var(--hand); font-weight: 600; font-size: var(--step-2); padding-bottom: 6px; margin-bottom: 8px; border-bottom: 2px solid var(--ink); }
.kana { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--cell); position: sticky; top: 0; z-index: 5; background: var(--paper); padding-block: 8px; }
.kana a { text-decoration: none; padding: 4px 10px; border: 1px solid var(--rule); background: var(--sheet); border-radius: 3px; font-size: .875rem; }
.kana a:hover { border-color: var(--litmus); }

/* ==========================================================================
   トップ：このサイトについて
   ========================================================================== */
.about { max-width: 720px; background: var(--memo); border: 1px solid #ecdf9c; padding: calc(var(--cell) * 1.25) calc(var(--cell) * 1.5); }
.about__title { font-family: var(--hand); font-weight: 600; font-size: var(--step-2); margin-bottom: 12px; }
.about__body p + p { margin-top: .8em; }

/* ==========================================================================
   一覧の見出し
   ========================================================================== */
.page-head { padding-block: calc(var(--cell) * 1.25) var(--cell); margin-bottom: var(--cell); border-bottom: 2px solid var(--ink); }
.page-head__kind { font-size: var(--step--1); color: var(--litmus-deep); font-weight: 700; margin-bottom: 4px; }
.page-head__title { font-family: var(--hand); font-weight: 600; font-size: var(--step-4); letter-spacing: .02em; line-height: 1.3; }
.page-head__count { margin-top: 8px; font-size: var(--step--1); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.page-head__desc { margin-top: 16px; max-width: 46em; background: var(--sheet); border: 1px solid var(--rule); padding: 16px 20px; font-size: .9375rem; }
.page-head__desc p + p { margin-top: .7em; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--cell); }
.tabs a { text-decoration: none; padding: 6px 14px; border: 1px solid var(--rule); background: var(--sheet); border-radius: 4px 4px 0 0; border-bottom-width: 2px; font-size: .9375rem; }
.tabs a[aria-current] { border-bottom-color: var(--litmus); font-weight: 700; }

/* ページ送り */
.pagination, .pager { margin-top: calc(var(--cell) * 2); }
.nav-links, .pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px;
	border: 1px solid var(--rule); background: var(--sheet); text-decoration: none; font-variant-numeric: tabular-nums; border-radius: 3px;
}
.page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-numbers.dots { border: 0; background: none; }
a.page-numbers:hover { border-color: var(--litmus); color: var(--litmus-deep); }

.empty { background: var(--sheet); border: 1px dashed var(--ink-faint); padding: calc(var(--cell) * 1.5); text-align: center; display: grid; gap: 12px; justify-items: center; }
.empty__title { font-family: var(--hand); font-weight: 600; font-size: var(--step-2); }
.empty .search { width: min(100%, 420px); }
.empty .search__input { width: 100%; }

/* ==========================================================================
   ボタン
   ========================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 10px 22px; border-radius: 4px; font-weight: 700; text-decoration: none; line-height: 1.4;
	border: 1px solid transparent; cursor: pointer; transition: transform .08s, box-shadow .08s;
}
.btn--primary { background: var(--litmus); color: #fff; box-shadow: 0 3px 0 var(--litmus-deep); }
.btn--primary:hover { color: #fff; transform: translateY(1px); box-shadow: 0 2px 0 var(--litmus-deep); }
.btn--ghost { background: var(--sheet); border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

/* ==========================================================================
   記事
   ========================================================================== */
.entry { background: var(--sheet); border: 1px solid var(--rule); margin-top: var(--cell); padding: calc(var(--cell) * 1.5) clamp(16px, 5vw, 48px) calc(var(--cell) * 2); }
.entry__head { margin-bottom: calc(var(--cell) * 1.25); }
.entry__no { display: inline-flex; align-items: center; gap: 8px; font-size: var(--step--1); color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.entry__no::before { content: ""; width: 8px; height: 22px; background: var(--l0); border-radius: 1px; }
.entry__no[data-litmus="1"]::before { background: var(--l1); }
.entry__no[data-litmus="2"]::before { background: var(--l2); }
.entry__no[data-litmus="3"]::before { background: var(--l3); }
.entry__no[data-litmus="4"]::before { background: var(--l4); }
.entry__no[data-litmus="5"]::before { background: var(--l5); }
.entry__field a { color: var(--reagent); font-weight: 700; text-decoration: none; font-size: var(--step--1); }
.entry__title { font-size: var(--step-3); line-height: 1.5; letter-spacing: .01em; }
.entry--column .entry__title { font-family: var(--hand); font-weight: 600; font-size: var(--step-4); line-height: 1.35; }
.entry__meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--step--1); color: var(--ink-soft); }
.entry__meta span { display: inline-flex; align-items: center; gap: 4px; }
.entry__eyecatch { margin: 0 0 calc(var(--cell) * 1.25); }
.entry__eyecatch img { width: 100%; display: block; }

/* 実験記録の表のような事実欄 */
.entry__facts { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.entry__facts > div { display: flex; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; }
.entry__facts dt { flex: none; width: 5em; white-space: nowrap; padding: 8px 10px; font-size: var(--step--1); color: var(--ink-soft); background: #f5f8fa; border-right: 1px solid var(--rule); }
.entry__facts dd { margin: 0; padding: 8px 12px; font-size: .9375rem; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; }
.entry__facts dd a { color: var(--litmus-deep); text-decoration: none; font-weight: 600; }
.entry__facts dd a:hover { text-decoration: underline; }

.memo { background: var(--memo); border: 1px solid #ecdf9c; border-left: 4px solid #e2c94d; padding: 14px 18px; margin-bottom: calc(var(--cell) * 1.25); }
.memo__title { display: flex; align-items: center; gap: 6px; font-family: var(--hand); font-weight: 600; font-size: var(--step-1); margin-bottom: 6px; }
.memo__body p + p { margin-top: .6em; }

.entry__foot { margin-top: calc(var(--cell) * 1.5); padding-top: var(--cell); border-top: 1px dashed var(--rule); }
.entry__foot-title { font-weight: 700; font-size: .9375rem; margin-bottom: 10px; }

@media (max-width: 560px) { .entry__facts { grid-template-columns: 1fr; } }

/* 本文 */
.prose { font-size: 1.0625rem; line-height: 1.95; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.3em; }
.prose h2 {
	margin-top: 2.4em; font-size: var(--step-2); line-height: 1.5;
	padding: 10px 14px; background: #f3f7fa; border-left: 5px solid var(--ink);
}
.prose h3 { margin-top: 2em; font-size: var(--step-1); padding-bottom: 6px; border-bottom: 2px dotted var(--ink-faint); }
.prose h4 { margin-top: 1.6em; font-size: 1.0625rem; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li + li { margin-top: .35em; }
.prose strong { background: linear-gradient(transparent 60%, var(--marker) 60%); font-weight: 700; }
.prose blockquote { margin-inline: 0; padding: 12px 18px; border-left: 3px solid var(--rule); color: var(--ink-soft); background: #f8fafb; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: #f3f7fa; font-weight: 700; }
.prose figure { margin-inline: 0; }
.prose figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: 6px; }
.prose a { color: var(--litmus-deep); text-decoration-color: rgba(178, 53, 98, .35); }
.prose hr { border: 0; border-top: 1px dashed var(--rule); margin-block: 2.5em; }
.prose .grid--inline, .prose .label-box { margin-top: 1.6em; }

/* 目次 */
.toc { background: #f6f9fb; border: 1px solid var(--rule); padding: 16px 20px; }
.toc__title { font-family: var(--hand); font-weight: 600; font-size: var(--step-1); margin-bottom: 8px; }
.toc__list { list-style: none; counter-reset: toc; padding: 0 !important; }
.toc__list li { margin: 0 !important; }
.toc__list a { text-decoration: none; color: var(--ink) !important; display: block; padding: 4px 0; font-size: .9375rem; }
.toc__list a:hover { text-decoration: underline; }
.toc__l2 { counter-increment: toc; }
.toc__l2 > a::before { content: counter(toc) ". "; color: var(--litmus-deep); font-weight: 700; font-variant-numeric: tabular-nums; }
.toc__l3 { padding-left: 1.6em; }
.toc__l3 a { color: var(--ink-soft) !important; font-size: .875rem; }

/* 記録者 */
.researcher { margin-top: calc(var(--cell) * 2); display: flex; gap: 16px; align-items: flex-start; padding: 16px; border: 1px solid var(--rule); background: #f8fafb; font-size: .9375rem; }
.researcher__avatar { border-radius: 50%; flex: none; }
.researcher__name { font-weight: 700; margin-bottom: 4px; }

/* ==========================================================================
   SW FANZA Auto Post の記事内パーツ（プラグインのCSSより優先）
   ========================================================================== */
.prose--work .swfz-package { text-align: center; margin-bottom: 1.5em; }
.prose--work .swfz-package img { border: 1px solid var(--rule); padding: 6px; background: #fff; }
.prose--work .swfz-intro { color: var(--ink); }
.prose--work .swfz-btn-wrap { text-align: center; margin-block: 1.8em; }
.prose--work .swfz-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: min(100%, 340px); min-height: 52px; padding: 12px 28px;
	border-radius: 4px; background: var(--litmus); color: #fff !important; font-weight: 700; text-decoration: none !important;
	box-shadow: 0 4px 0 var(--litmus-deep); transition: transform .08s, box-shadow .08s;
}
.prose--work .swfz-btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--litmus-deep); }
.prose--work .swfz-movie { position: relative; width: 100%; aspect-ratio: 720 / 480; background: var(--ink); border: 1px solid var(--rule); }
.prose--work .swfz-movie iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose--work .swfz-samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.prose--work .swfz-samples a { display: block; border: 1px solid var(--rule); background: #fff; padding: 3px; }
.prose--work .swfz-samples img { width: 100%; display: block; }
.prose--work .swfz-info { width: 100%; border-collapse: collapse; }
.prose--work .swfz-info th { width: 7.5em; white-space: nowrap; background: #f3f7fa; color: var(--ink-soft); font-weight: 600; font-size: .875rem; }
.prose--work .swfz-info th, .prose--work .swfz-info td { border: 1px solid var(--rule); padding: 9px 12px; }
.prose--work .swfz-info td a, .prose--work .swfz-terms a { color: var(--litmus-deep); }
.prose--work .swfz-terms { display: flex; flex-wrap: wrap; gap: 8px; }
.prose--work .swfz-terms a {
	display: inline-block; margin: 0; padding: 5px 12px; border: 1px solid var(--rule); border-radius: 999px;
	text-decoration: none; font-size: .875rem; line-height: 1.4; background: #fff;
}
.prose--work .swfz-terms a:hover { border-color: var(--litmus); }

/* 標本ラベル（[fk_work] ショートコード） */
.label-box {
	display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: center;
	border: 1px solid var(--rule); border-left: 6px solid var(--l0); background: #fff; padding: 14px;
}
.label-box[data-litmus="1"] { border-left-color: var(--l1); }
.label-box[data-litmus="2"] { border-left-color: var(--l2); }
.label-box[data-litmus="3"] { border-left-color: var(--l3); }
.label-box[data-litmus="4"] { border-left-color: var(--l4); }
.label-box[data-litmus="5"] { border-left-color: var(--l5); }
.label-box__fig img { width: 100%; display: block; }
.label-box__body { display: grid; gap: 4px; font-size: .9375rem; line-height: 1.6; }
.label-box__no { font-size: .75rem; color: var(--ink-faint); }
.label-box__title { font-weight: 700; }
.label-box__title a { color: var(--ink) !important; text-decoration: none; }
.label-box__cast { color: var(--ink-soft); font-size: .875rem; }
.label-box__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.label-box__actions .btn { min-height: 42px; padding: 8px 16px; font-size: .875rem; text-decoration: none; }
.prose .label-box__actions .btn--primary { color: #fff; }
@media (max-width: 560px) { .label-box { grid-template-columns: 1fr; } }

/* スマホの固定ボタン */
.dock { display: none; }
@media (max-width: 768px) {
	.dock {
		display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
		padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, .94); border-top: 1px solid var(--rule);
		transform: translateY(110%); transition: transform .2s ease-out;
	}
	.dock.is-shown { transform: none; }
	.dock__btn { width: 100%; }
	.single-post .colophon { padding-bottom: 96px; }
}

/* ==========================================================================
   フッター
   ========================================================================== */
.colophon { background: var(--sheet); border-top: 3px double var(--ink); }
.colophon__in { max-width: var(--wrap); margin-inline: auto; padding: calc(var(--cell) * 2) var(--gutter) var(--cell); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--cell) 48px; font-size: .9375rem; }
.colophon__name { display: flex; align-items: center; gap: 6px; font-family: var(--hand); font-weight: 600; font-size: var(--step-2); margin-bottom: 8px; }
.colophon__name .icon { color: var(--litmus); }
.colophon__about p:last-child { color: var(--ink-soft); }
.colophon__nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.colophon__nav a { text-decoration: none; }
.colophon__nav a:hover { text-decoration: underline; }
.colophon__nav .gnav { flex-direction: row; }
.colophon__nav .gnav a { border: 0; padding: 0; font-weight: 400; }
.colophon__notice, .colophon__copy { grid-column: 1 / -1; font-size: var(--step--1); color: var(--ink-soft); }
.colophon__notice { padding-top: var(--cell); border-top: 1px dashed var(--rule); }
@media (max-width: 720px) { .colophon__in { grid-template-columns: 1fr; } }

/* ==========================================================================
   年齢確認
   ========================================================================== */
.agegate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(31, 44, 70, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.agegate[hidden] { display: none; }
.agegate__card {
	width: min(100%, 460px); text-align: center; background-color: var(--sheet);
	background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	background-size: 20px 20px;
	border: 1px solid var(--ink); outline: 1px solid #fff; outline-offset: 4px;
	padding: 32px 24px 28px; display: grid; gap: 14px;
}
.agegate__mark .icon { width: 44px; height: 44px; color: var(--litmus); }
.agegate__title { font-family: var(--hand); font-weight: 600; font-size: var(--step-3); }
.agegate__actions { display: grid; gap: 10px; margin-top: 6px; }

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

@media print {
	body { background: #fff; }
	.masthead__nav, .masthead__toggle, .dock, .agegate, .colophon__nav { display: none !important; }
}

/* WordPress 標準クラス */
.alignleft { float: left; margin: .3em 1.2em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.2em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text { font-size: var(--step--1); color: var(--ink-soft); }
