/* ============================================================
   MangaDB — デザインシステム v3
   方針 (v2 からの変更は docs/DESIGN-toc-extension.md と実機スクショ比較に基づく):
   - コンテンツ(表紙)が主役。UI は邪魔をせず大きく見せる。トップには
     特集ヒーローで「顔」を作り、ランキングは表紙レールで見せる
   - 色は役割で分ける: ブランド=ピンクレッド / 価格・数値=アンバー。
     v2 のライムは「安い派手さ」に寄るため廃止
   - カードは箱で囲わず、表紙+タイポで組む(均一な箱の反復を避ける)
   - タイポ: 本文=OS標準+α(Webフォント和文2〜5MB回避)、
     見出し=Zen Kaku Gothic New 900、数字=Big Shoulders Display
   - line-height 1.8 / letter-spacing 0(標識のみ字間) / text-wrap: balance
   - モーション: 1回のload reveal + scroll-driven header(Progressive)。
     prefers-reduced-motion で全抑止
   ============================================================ */

@property --header-pad {
	syntax: "<length>";
	inherits: false;
	initial-value: 14px;
}

:root {
	/* 色 — 深いニュートラルダーク(わずかに暖) + 面3段 */
	--bg: #0a0a0c;
	--surface: #141418;
	--surface-2: #1b1b21;
	--border: #26262e;
	--text: #f5f3ef;
	--muted: #a49e95;

	/* 色は役割で分ける: ブランド=ピンクレッド / 価格・数値=アンバー */
	--accent: #ff2e63; /* ブランド */
	--accent-deep: #d81b4f;
	--accent-soft: color-mix(in oklab, var(--accent) 14%, transparent);
	--signal: #ffc24b; /* 価格・数値・データ */
	--signal-soft: color-mix(in oklab, var(--signal) 12%, transparent);
	--gold: #f5b942;
	--silver: #c9c6d0;
	--bronze: #d0885a;
	--link: #8ab4ff;

	/* 間隔・サイズ */
	--container: 1240px;
	--radius: 14px;
	--gap: 20px;

	/* 書体 */
	--font-display: "Zen Kaku Gothic New", "Hiragino Sans", "BIZ UDPGothic", sans-serif;
	--font-body: system-ui, -apple-system, "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
	--font-num: "Big Shoulders Display", "Bebas Neue", "Arial Narrow", sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	color-scheme: dark;
	/* MPAページ遷移トランジション(Chromium限定・他は自動無視) */
	@view-transition {
		navigation: auto;
	}
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.8;
	letter-spacing: 0;
}

a {
	color: var(--link);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	line-height: 1.4;
	margin: 0 0 0.6em;
	text-wrap: balance;
	letter-spacing: 0.01em;
}
h1 {
	font-size: 1.7rem;
	font-weight: 900;
}
h2 {
	font-size: 1.25rem;
	font-weight: 700;
}

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

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

/* ---------------- ヘッダー ---------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: color-mix(in oklab, var(--bg) 88%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
/* スクロール進捗バー(レーダーの走査線) */
.site-header::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	height: 2px;
	width: 100%;
	background: linear-gradient(90deg, var(--accent), var(--signal));
	transform-origin: left;
	transform: scaleX(0);
}
.site-header .inner {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
	padding-top: var(--header-pad);
	padding-bottom: var(--header-pad);
}
/* スクロール連動でヘッダーが縮む + 進捗バーが伸びる(CSSのみ) */
@supports (animation-timeline: scroll()) {
	.site-header .inner {
		animation: header-shrink linear both;
		animation-timeline: scroll(root block);
		animation-range: 0 160px;
	}
	.site-header::after {
		animation: scanline linear both;
		animation-timeline: scroll(root block);
	}
}
@keyframes header-shrink {
	to {
		--header-pad: 7px;
	}
}
@keyframes scanline {
	to {
		transform: scaleX(1);
	}
}

.site-logo {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 1.6rem;
	color: var(--text);
	letter-spacing: 0.01em;
	line-height: 1.1;
}
.site-logo:hover {
	text-decoration: none;
	color: var(--accent);
}
.site-nav {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}
.site-nav a {
	color: var(--muted);
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 0.9rem;
	letter-spacing: 0.05em;
}
.site-nav a:hover {
	color: var(--text);
	background: var(--surface-2);
	text-decoration: none;
}
.age-badge {
	margin-left: auto;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--accent);
	border: 1.5px solid color-mix(in oklab, var(--accent) 65%, transparent);
	border-radius: 6px;
	padding: 3px 9px;
	letter-spacing: 0.08em;
	white-space: nowrap;
}

/* ---------------- グリッド ---------------- */
.works-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: var(--gap);
}
/* 読み込み時1回のリビール(セクションごと乱発はしない) */
.works-grid .work-card {
	animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.works-grid .work-card:nth-child(2) { animation-delay: 0.04s; }
.works-grid .work-card:nth-child(3) { animation-delay: 0.08s; }
.works-grid .work-card:nth-child(4) { animation-delay: 0.12s; }
.works-grid .work-card:nth-child(5) { animation-delay: 0.16s; }
.works-grid .work-card:nth-child(n + 6) { animation-delay: 0.2s; }
@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------------- カード ----------------
   v3: 箱で囲わない。表紙そのものに角丸+罫を持たせ、文字は下に組む */
.work-card {
	display: flex;
	flex-direction: column;
}
.work-card .thumb {
	position: relative;
	aspect-ratio: 3 / 4;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	display: block;
	overflow: hidden;
	transition: border-color 0.18s ease;
}
.work-card:hover .thumb {
	border-color: color-mix(in oklab, var(--accent) 60%, var(--border));
}
.work-card .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.work-card:hover .thumb img {
	transform: scale(1.05);
}
.work-card .body {
	padding: 10px 2px 0;
}
.work-card .title {
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.55;
	margin: 0 0 5px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.work-card .title a {
	color: var(--text);
}
.work-card:hover .title a {
	color: var(--accent);
	text-decoration: none;
}
.work-card .meta {
	font-size: 0.75rem;
	color: var(--muted);
	display: flex;
	gap: 9px;
	flex-wrap: wrap;
	align-items: baseline;
}
.work-card .meta .price {
	color: var(--signal);
	font-family: var(--font-num);
	font-weight: 800;
	font-size: 1.05rem;
	letter-spacing: 0.03em;
}
.work-card .meta .was {
	text-decoration: line-through;
	color: var(--muted);
	font-size: 0.8rem;
}
.work-card .off-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	background: var(--accent);
	color: #fff;
	font-family: var(--font-num);
	font-weight: 800;
	font-size: 0.85rem;
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* ---------------- ランキング ---------------- */
.rank-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.rank-row {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 10px 14px;
	transition: border-color 0.18s ease;
}
.rank-row:hover {
	border-color: var(--accent);
}
.rank-row a {
	color: var(--text);
	font-weight: 700;
}
.rank-row a:hover {
	color: var(--accent);
	text-decoration: none;
}
.rank-num {
	font-family: var(--font-num);
	font-weight: 800;
	font-size: 2rem;
	line-height: 1;
	min-width: 1.6em;
	text-align: center;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.rank-row:nth-child(1) .rank-num {
	color: var(--gold);
}
.rank-row:nth-child(2) .rank-num {
	color: var(--silver);
}
.rank-row:nth-child(3) .rank-num {
	color: var(--bronze);
}

/* ---------------- チップ ---------------- */
.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0;
}
.chip {
	background: var(--accent-soft);
	color: var(--accent);
	border-radius: 999px;
	padding: 3px 12px;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
}
.chip:hover {
	text-decoration: none;
	background: var(--accent);
	color: #fff;
}

/* ---------------- 詳細ページ ---------------- */
.work-detail {
	max-width: 860px;
}
.work-detail h1 {
	font-size: clamp(1.4rem, 3vw, 1.8rem);
	margin-bottom: 12px;
}
.work-detail .cover {
	margin: 0 0 18px;
	max-width: 320px;
}
.work-detail .cover img {
	border-radius: var(--radius);
	border: 1px solid var(--border);
	width: 100%;
}
.meta-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
	margin: 14px 0;
}
.meta-table th,
.meta-table td {
	text-align: left;
	padding: 7px 10px;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
}
.meta-table th {
	color: var(--muted);
	font-weight: 500;
	width: 9em;
}
.meta-table td .num {
	font-family: var(--font-num);
	letter-spacing: 0.03em;
}
.price {
	color: var(--signal);
	font-family: var(--font-num);
	font-weight: 700;
	font-size: 1.3rem;
	letter-spacing: 0.04em;
}

/* ---------------- ボタン ---------------- */
.btn {
	display: inline-block;
	background: var(--accent);
	color: #fff !important;
	font-weight: 800;
	border-radius: 12px;
	padding: 13px 24px;
	margin: 10px 0;
	letter-spacing: 0.04em;
	box-shadow: 0 10px 28px -10px color-mix(in oklab, var(--accent) 65%, transparent);
	transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover {
	background: var(--accent-deep);
	text-decoration: none;
	transform: translateY(-1px);
}
.btn-deny {
	background: var(--surface-2);
	color: var(--muted) !important;
	border: 1px solid var(--border);
	display: inline-block;
	font-weight: 700;
	border-radius: var(--radius);
	padding: 12px 22px;
	letter-spacing: 0.05em;
}
.btn-deny:hover {
	color: var(--text) !important;
	text-decoration: none;
}

/* ---------------- セクション ---------------- */
.section {
	margin: 34px 0;
}
.section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 14px;
}
.section-head h1,
.section-head h2 {
	margin: 0;
	font-size: clamp(1.45rem, 2.6vw, 1.95rem);
	font-weight: 900;
}
/* 見出し左のスラッシュはブランド色で残す(「計測済み」の印) */
.section-head h1::before,
.section-head h2::before {
	content: "";
	display: inline-block;
	width: 0.42em;
	height: 0.95em;
	margin-right: 0.42em;
	background: var(--accent);
	transform: skewX(-14deg);
	vertical-align: -0.08em;
	border-radius: 2px;
}
.more {
	font-size: 0.85rem;
	color: var(--muted);
}

/* ---------------- フッター ---------------- */
.site-footer {
	margin-top: 56px;
	border-top: 1px solid var(--border);
	padding: 28px 0 40px;
	font-size: 0.8rem;
	color: var(--muted);
}
.site-footer .footer-links {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.site-footer .footer-links a {
	color: var(--text);
	text-decoration: none;
}
.site-footer .footer-links a:hover {
	text-decoration: underline;
}
.site-footer .disclaimer {
	margin-top: 10px;
	line-height: 1.8;
	max-width: 40em;
}

/* ---------------- ページネーション ---------------- */
.pager {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 26px 0;
}

/* ---------------- 年齢確認 ---------------- */
.age-gate {
	min-height: 70vh;
	display: grid;
	place-items: center;
}
.age-gate .card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	max-width: 560px;
	padding: 34px;
	text-align: center;
}
.age-gate .actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin-top: 22px;
	flex-wrap: wrap;
}
.age-gate .meta {
	margin-top: 18px;
	font-size: 0.75rem;
	color: var(--muted);
}

/* ---------------- モバイル ---------------- */
@media (max-width: 640px) {
	body {
		font-size: 14px;
	}
	.works-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 12px;
	}
	.site-header .inner {
		gap: 10px;
	}
	.age-badge {
		display: none;
	}
	.rank-row {
		gap: 10px;
		padding: 8px 10px;
	}
	.rank-num {
		font-size: 1.5rem;
		min-width: 1.4em;
	}
	.section {
		margin: 24px 0;
	}
	.age-gate .card {
		margin: 0 16px;
		padding: 24px 18px;
	}
}

/* ---------------- まとめ記事 ---------------- */
.section-note {
	color: var(--muted);
	font-size: 0.85rem;
	margin: 0.4rem 0 0;
}
.post-list {
	display: grid;
	gap: 12px;
}
.post-card {
	display: block;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 18px;
	color: var(--text);
	transition: transform 0.15s ease, border-color 0.15s ease;
}
.post-card:hover {
	transform: translateY(-2px);
	border-color: color-mix(in oklab, var(--accent) 55%, var(--border));
	text-decoration: none;
}
.post-card:hover h2 {
	color: var(--accent);
}
/* サムネイル付きレイアウト(トップのまとめ・一覧で使用) */
.post-card.has-thumb article {
	display: grid;
	grid-template-columns: 168px 1fr;
	gap: 16px;
	align-items: start;
}
.post-thumb {
	display: block;
	border-radius: 9px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--surface-2);
}
.post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.post-card h2 {
	margin: 0;
	font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: 700;
}
.post-card .excerpt {
	margin: 0.5rem 0 0;
	color: var(--muted);
	font-size: 0.9rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.post-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	color: var(--muted);
	font-size: 0.8rem;
	margin-top: 0.6rem;
}
.empty {
	color: var(--muted);
}

/* ---------------- モーション抑止 ---------------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	.site-header::after {
		display: none;
	}
	::view-transition-group(*) {
		animation-duration: 0.01ms !important;
	}
}

/* ============================================================
   v3 コンポーネント: ヒーロー / ジャンルチップ / ランキングレール /
   モバイル下部ナビ / 詳細の固定CTA
   ============================================================ */

/* ---------------- トップ: ジャンルチップ ---------------- */
.gchips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 16px 0 4px;
	scrollbar-width: none;
}
.gchips::-webkit-scrollbar {
	display: none;
}
.gchip {
	white-space: nowrap;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--muted);
	border-radius: 999px;
	padding: 5px 15px;
	font-size: 0.85rem;
	font-weight: 700;
}
.gchip:hover {
	color: var(--text);
	border-color: var(--accent);
	text-decoration: none;
}

/* ---------------- トップ: ヒーロー ---------------- */
.hero {
	position: relative;
	margin-top: 14px;
	border-radius: 20px;
	overflow: hidden;
	background: var(--surface);
	border: 1px solid var(--border);
}
.hero-bg {
	position: absolute;
	inset: 0;
}
.hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 22%;
}
.hero-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(8, 8, 10, 0.94) 28%, rgba(8, 8, 10, 0.55) 58%, rgba(8, 8, 10, 0.05) 85%),
		linear-gradient(0deg, rgba(8, 8, 10, 0.9), transparent 48%);
}
.hero-in {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 290px;
	gap: 34px;
	align-items: end;
	padding: 46px 42px 38px;
	min-height: 430px;
}
.hero-kicker {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	color: var(--signal);
	margin: 0;
}
.hero-kicker::before {
	content: "";
	width: 26px;
	height: 2px;
	background: var(--accent);
}
.hero-title {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: clamp(1.8rem, 4.2vw, 3.3rem);
	line-height: 1.3;
	letter-spacing: -0.01em;
	margin: 14px 0 12px;
	text-wrap: balance;
}
.hero-title a {
	color: var(--text);
}
.hero-title a:hover {
	text-decoration: none;
}
.hero-sub {
	color: #d8d3ca;
	margin: 0 0 18px;
	max-width: 36em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.hero-tags {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 22px;
}
.hero-tag {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	padding: 3px 12px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--text);
}
.hero-tag:hover {
	text-decoration: none;
	border-color: var(--accent);
}
.hero-cta {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}
.hero-cta .btn {
	margin: 0;
	font-size: 1rem;
	padding: 14px 26px;
}
.hero-price {
	font-family: var(--font-num);
	font-weight: 800;
	font-size: 2rem;
	line-height: 1;
	letter-spacing: 0.02em;
}
.hero-cover {
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.22);
	box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.85);
	transform: rotate(1.2deg);
}
.hero-cover img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	display: block;
}

/* ---------------- トップ: ランキングレール ---------------- */
.rank-rail {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
}
.rank-card {
	position: relative;
	display: block;
}
.rank-card .cover {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
	background: var(--surface-2);
}
.rank-card .cover img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	display: block;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.rank-card:hover .cover img {
	transform: scale(1.05);
}
.rank-badge {
	position: absolute;
	left: 6px;
	bottom: 6px;
	z-index: 2;
	font-family: var(--font-num);
	font-weight: 800;
	font-size: 3.4rem;
	line-height: 0.8;
	color: var(--text);
	-webkit-text-stroke: 2px rgba(10, 10, 12, 0.85);
	paint-order: stroke fill;
	text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}
.rank-card:first-child .rank-badge {
	color: var(--gold);
}
.rank-card .t {
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.55;
	color: var(--text);
	margin: 9px 0 3px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.rank-card:hover .t {
	color: var(--accent);
}
.rank-card .m {
	font-size: 0.75rem;
	color: var(--muted);
	margin: 0;
	display: flex;
	gap: 9px;
	align-items: baseline;
}
.rank-card .m .p {
	color: var(--signal);
	font-family: var(--font-num);
	font-weight: 800;
	font-size: 0.95rem;
}

/* ---------------- モバイル下部ナビ ---------------- */
.bnav {
	display: none;
}
@media (max-width: 820px) {
	body {
		padding-bottom: 62px;
	}
	.site-nav {
		display: none;
	}
	.age-badge {
		display: inline-block;
	}
	.bnav {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		background: color-mix(in oklab, var(--surface) 92%, transparent);
		backdrop-filter: blur(14px);
		border-top: 1px solid var(--border);
		padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
		justify-content: space-around;
	}
	.bnav a {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2px;
		font-size: 0.66rem;
		font-weight: 700;
		color: var(--muted);
		padding: 2px 10px;
	}
	.bnav a:hover {
		text-decoration: none;
	}
	.bnav a.on {
		color: var(--accent);
	}
	.bnav svg {
		width: 21px;
		height: 21px;
	}
	.hero-in {
		grid-template-columns: 1fr;
		padding: 28px 20px 26px;
		min-height: 0;
	}
	.hero-cover {
		display: none;
	}
	.rank-rail {
		grid-template-columns: repeat(5, 128px);
		overflow-x: auto;
		padding-bottom: 6px;
		scrollbar-width: none;
	}
	.rank-rail::-webkit-scrollbar {
		display: none;
	}
	.post-card.has-thumb article {
		grid-template-columns: 112px 1fr;
		gap: 12px;
	}
}

/* ---------------- 作品詳細: モバイル固定CTA ---------------- */
.sticky-cta {
	display: none;
}
@media (max-width: 820px) {
	.sticky-cta {
		display: flex;
		align-items: center;
		gap: 14px;
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: calc(66px + env(safe-area-inset-bottom));
		z-index: 35;
		background: color-mix(in oklab, var(--surface-2) 94%, transparent);
		backdrop-filter: blur(12px);
		border: 1px solid var(--border);
		border-radius: 14px;
		padding: 10px 12px 10px 16px;
		box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8);
	}
	.sticky-cta .p {
		font-family: var(--font-num);
		font-weight: 800;
		font-size: 1.35rem;
		color: var(--signal);
		line-height: 1;
	}
	.sticky-cta .btn {
		margin: 0 0 0 auto;
		padding: 11px 18px;
	}
	/* 固定CTAに本文末尾が隠れないよう余白を足す */
	.work-detail {
		padding-bottom: 86px;
	}
}

/* 記事本文の作品紹介ブロック (WorkIntro, DESIGN §7)
   スレに溶け込む PR: 枠やボタンを持たず、タイトル→【PR】→表紙→DLリンクの
   テキストの流れで置く (ani-chat の透過的な PR 配置に寄せる) */
.work-pr {
	margin: 1.4rem 0 1.7rem;
}
.work-pr .wp-title {
	margin: 0 0 0.25rem;
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.45;
}
.work-pr .wp-title a {
	color: var(--text);
	text-decoration: none;
}
.work-pr .wp-title a:hover {
	color: var(--accent);
}
.work-pr .pr-mini {
	margin-right: 0.5rem;
	vertical-align: 0.12em;
}
.work-pr .wp-cover {
	display: block;
}
.work-pr .wp-cover img {
	display: block;
	width: 100%;
	height: auto;
}
.work-pr .wp-dl {
	margin: 0.55rem 0 0;
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.5;
}
.work-pr .wp-dl a {
	color: var(--link);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.work-pr .wp-price {
	margin-left: 0.55rem;
	font-family: "Big Shoulders Display", sans-serif;
	font-weight: 800;
	color: var(--signal);
}
.work-pr .wp-meta {
	margin: 0.3rem 0 0;
	font-size: 0.8rem;
	color: var(--muted);
}
/* 広告表記 (参加規約 第4条: 広告であることの明示) */
.pr-note {
	margin: 0.4rem 0 0;
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	color: var(--muted);
}
.pr-mini {
	font-size: 0.68rem;
	letter-spacing: 0.05em;
	color: var(--muted);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 0.1rem 0.35rem;
}
/* 記事フローに織り込むサンプル画像 (1枚ずつ、対話の合間。枠なし・リンクなしでスレの流れに揃える) */
.sample-shot {
	margin: 1.1rem 0;
}
.sample-shot img {
	display: block;
	width: 100%;
	height: auto;
}

/* works詳細: サンプル画像カルーセル (切り取らず全体表示、横スクロールで送る) */
.sample-block {
	margin-top: 2rem;
}
.sample-block h2 {
	font-size: 1.15rem;
	margin: 0 0 0.8rem;
}
.sample-carousel {
	position: relative;
}
.sc-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	border-radius: 10px;
	background: #000;
}
.sc-track::-webkit-scrollbar {
	display: none;
}
.sc-slide {
	flex: 0 0 100%;
	scroll-snap-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sc-slide img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 78vh;
	object-fit: contain;
}
.sc-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: color-mix(in oklab, var(--surface) 82%, transparent);
	color: var(--text);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}
.sc-btn.prev {
	left: 10px;
}
.sc-btn.next {
	right: 10px;
}
.sc-count {
	position: absolute;
	right: 12px;
	bottom: 10px;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: color-mix(in oklab, #000 62%, transparent);
	color: #fff;
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
}
.sc-thumbs {
	display: flex;
	gap: 6px;
	margin-top: 8px;
	overflow-x: auto;
	scrollbar-width: none;
}
.sc-thumbs::-webkit-scrollbar {
	display: none;
}
.sc-thumb {
	flex: 0 0 72px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	background: var(--surface);
	cursor: pointer;
	opacity: 0.55;
}
.sc-thumb.active {
	border-color: var(--accent);
	opacity: 1;
}
.sc-thumb img {
	display: block;
	width: 100%;
	height: 54px;
	object-fit: cover;
}

/* フッターの DMM 公式クレジット */
.api-credit {
	margin-top: 0.6rem;
}

/* works詳細: 関連まとめ記事 */
.related-posts{margin-top:1.6rem;padding-top:1.2rem;border-top:1px solid var(--line,#e5e0d8)}
.related-posts h2{font-size:1.05rem;margin:0 0 .6rem}
.related-posts ul{list-style:none;margin:0;padding:0}
.related-posts li{margin:.35rem 0}
.related-posts a{text-decoration-thickness:1px;text-underline-offset:3px}

/* 年齢確認オーバーレイ (本文はHTMLに含め、未同意時は被せて隠す) */
.age-overlay { display: none; }
html:not(.age-ok) { overflow: hidden; }
html:not(.age-ok) .age-overlay {
	display: grid;
	place-items: center;
	position: fixed;
	inset: 0;
	z-index: 300;
	padding: 1rem;
	background: rgba(5, 5, 8, 0.8);
}
html:not(.age-ok) .site-header,
html:not(.age-ok) main.container,
html:not(.age-ok) .site-footer,
html:not(.age-ok) .bnav {
	filter: blur(16px);
	pointer-events: none;
	user-select: none;
}
.age-overlay-card {
	max-width: 520px;
	width: 100%;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.6rem 1.4rem;
	text-align: center;
}
.age-overlay-brand { color: var(--accent); font-weight: 900; letter-spacing: .06em; margin: 0 0 .2rem; }
.age-overlay-card h2 { margin: 0 0 .8rem; font-size: 1.4rem; }
.age-overlay-card p { color: var(--muted); line-height: 1.8; font-size: .92rem; }
.age-overlay-card .actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.1rem; }
.age-overlay-card .meta { font-size: .78rem; margin-top: 1rem; }

/* 検索サジェスト (SearchBox): 何でも検索のドロップダウン */
.sb-wrap { position: relative; flex: 1; min-width: 0; }
/* 入力欄の見た目はここで完結させる。各ページのスコープ付きスタイルは別コンポーネント内の
   要素に届かない (data-astro-cid が付かない) ため、ページ側で input を指定しても効かない */
.sb-wrap input { width: 100%; padding: .65rem .9rem; font-size: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); appearance: none; -webkit-appearance: none; }
.sb-wrap input::placeholder { color: var(--muted); }
.sb-wrap input:focus { border-color: var(--link); outline: none; }
.sb-drop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 80; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); text-align: left; }
.sb-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem; color: var(--text); text-decoration: none; }
.sb-item:hover, .sb-item.is-active { background: #1e1e26; }
.sb-kind { flex: none; font-size: .68rem; color: var(--signal); border: 1px solid var(--border); border-radius: 99px; padding: .05rem .5rem; }
.chip-kind { font-size: .65rem; color: var(--signal); border: 1px solid var(--border); border-radius: 99px; padding: .02rem .45rem; margin-right: .4rem; vertical-align: 1px; }
.sb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.sb-count { flex: none; color: var(--muted); font-size: .78rem; }
.sb-thumb { flex: none; width: 34px; height: 44px; object-fit: cover; border-radius: 4px; background: #000; }
.sb-all { display: block; padding: .55rem .8rem; color: var(--link); font-size: .88rem; text-decoration: none; border-top: 1px solid var(--border); }
.sb-all:hover { background: #1e1e26; }

/* 同名の別種エンティティへの案内 (著者⇔メーカー) */
.alias-note { margin: .2rem 0 1rem; }
.alias-note a { display: inline-block; padding: .45rem .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; color: var(--link); font-size: .88rem; text-decoration: none; }
.alias-note a:hover { border-color: var(--link); }
