/* FANZA Affiliate Kit
 * 色は SWELL のメインカラー（--color_main）に自動で合わせる。SWELL 以外では青になる。 */
.fanza-info, .fanza-samples, .fanza-cards, .fanza-tags, .fanza-btn-wrap {
	--fanza-main: var(--color_main, #4f6bf5);
	--fanza-line: #e3e5ea;
	--fanza-soft: #f4f5f7;
	--fanza-text-sub: #6b7280;
	box-sizing: border-box;
}
.fanza-info *, .fanza-cards *, .fanza-tags * { box-sizing: border-box; }

/* ---------- 作品情報 ---------- */
.fanza-info {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	align-items: start;
	margin: 0 0 2.5em;
}
.fanza-info__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.fanza-review {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px;
	font-size: .9em;
}
.fanza-stars {
	--fanza-rate: 0%;
	position: relative;
	display: inline-block;
	font-size: 1.25em;
	line-height: 1;
	letter-spacing: 1px;
	color: #d6d8dc;
}
.fanza-stars::before { content: "★★★★★"; }
.fanza-stars::after {
	content: "★★★★★";
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--fanza-rate);
	overflow: hidden;
	white-space: nowrap;
	color: #f5b301;
}
.fanza-review__num { font-weight: 700; }
.fanza-review__count { color: var(--fanza-text-sub); }

.fanza-spec {
	width: 100%;
	margin: 0 0 16px;
	border: none;
	border-collapse: collapse;
	font-size: .88em;
	line-height: 1.6;
}
.fanza-spec th, .fanza-spec td {
	padding: 8px 4px;
	border: none;
	border-bottom: 1px solid var(--fanza-line);
	background: none;
	text-align: left;
	vertical-align: top;
}
.fanza-spec th {
	width: 7.5em;
	font-weight: 700;
	white-space: nowrap;
}
.fanza-spec tr:first-child th, .fanza-spec tr:first-child td { border-top: 2px solid #9aa0a8; }
.fanza-spec td a { color: var(--fanza-main); }

.fanza-genres { display: flex; flex-wrap: wrap; gap: 4px; }
.fanza-genres .fanza-genre {
	display: inline-block;
	padding: 1px 7px;
	border: 1px solid var(--fanza-main);
	border-radius: 2px;
	background: #eef4ff;
	color: var(--fanza-main);
	font-size: .92em;
	line-height: 1.7;
	text-decoration: none;
	transition: background .2s, color .2s;
}
.fanza-genres .fanza-genre:hover { background: var(--fanza-main); color: #fff; }

/* ---------- 購入ボタン ---------- */
.fanza-btn-wrap { margin: 1.5em 0; text-align: center; }
.fanza-info .fanza-btn-wrap { margin: 0; }
.fanza-btn-price { margin: 0 0 .4em !important; font-size: .9em; }
.fanza-btn-price strong { color: #d63638; font-size: 1.15em; }
.fanza-btn {
	display: block;
	max-width: 420px;
	margin: 0 auto;
	padding: .95em 1.5em;
	border-radius: 6px;
	background: var(--fanza-btn-bg, #e2373f);
	box-shadow: 0 3px 0 var(--fanza-btn-shadow, #b3242b);
	color: var(--fanza-btn-text, #fff) !important;
	font-weight: 700;
	text-align: center;
	text-decoration: none !important;
	transition: transform .15s, box-shadow .15s, opacity .15s;
}
.fanza-btn::after { content: "›"; margin-left: .6em; font-size: 1.2em; }
.fanza-btn:hover { transform: translateY(2px); box-shadow: 0 1px 0 var(--fanza-btn-shadow, #b3242b); opacity: .95; }

/* キラッと光る効果（斜めの光が一定間隔で横切る） */
.fanza-btn--shine { position: relative; overflow: hidden; isolation: isolate; }
.fanza-btn--shine::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .85) 45%, rgba(255, 255, 255, 0) 100%);
	transform: skewX(-45deg);
	animation: fanza-btn-shine 2.5s cubic-bezier(.55, .085, .68, .53) infinite;
	pointer-events: none;
	z-index: -1;
}
.fanza-btn--shine { z-index: 0; }
@keyframes fanza-btn-shine {
	0% { left: -100%; }
	25% { left: 100%; }
	100% { left: 100%; }
}
/* 動きを減らす設定の人には光らせない */
@media (prefers-reduced-motion: reduce) {
	.fanza-btn--shine::before { animation: none; display: none; }
}

/* ---------- サンプル画像 ---------- */
.fanza-samples {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	margin: 0 0 2em;
}
.fanza-samples__item img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--fanza-line);
}

/* ---------- 同じ作者の人気作品 ---------- */
.fanza-cards {
	--fanza-cols: 3;
	display: grid;
	grid-template-columns: repeat(var(--fanza-cols), minmax(0, 1fr));
	gap: 20px 16px;
	margin-top: 0 !important;
	margin-bottom: 2.5em !important;
	padding: 0 !important;
	list-style: none !important;
}
.fanza-card { margin: 0 !important; padding: 0 !important; }
.fanza-card::before { display: none !important; }
.fanza-card__link { display: block; color: inherit !important; text-decoration: none !important; }
.fanza-card__thumb {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var(--fanza-soft);
}
.fanza-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	transition: transform .3s;
}
.fanza-card__link:hover .fanza-card__thumb img { transform: scale(1.05); }
.fanza-card__badge {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	max-width: 90%;
	padding: 2px 8px;
	background: var(--fanza-main);
	color: #fff;
	font-size: 11px;
	line-height: 1.6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fanza-card__badge svg { flex: none; width: 11px; height: 11px; fill: currentColor; }
.fanza-card__title {
	margin: .5em 0 0 !important;
	font-size: .88em;
	font-weight: 700;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- 人気キーワード・ジャンル ---------- */
.fanza-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 6px;
	margin: 0 0 2.5em;
}
.fanza-tag {
	display: inline-block;
	padding: 4px 9px;
	border-radius: 3px;
	background: var(--fanza-soft);
	color: #333 !important;
	font-size: 13px;
	line-height: 1.6;
	text-decoration: none !important;
	transition: background .2s, color .2s;
}
.fanza-tag__count { margin-left: .35em; color: var(--fanza-text-sub); font-size: .92em; }
.fanza-tag:hover { background: var(--fanza-main); color: #fff !important; }
.fanza-tag:hover .fanza-tag__count { color: rgba(255, 255, 255, .85); }

/* ---------- 会話（LIQUID SPEECH BALLOON の見た目を使う） ---------- */
.fanza-talk { margin: 0 0 2.5em; }
.fanza-talk .liquid-speech-balloon-wrap { margin-bottom: 1.2em; }
.fanza-talk .liquid-speech-balloon-text p { margin: 0; }

/* ---------- v0.4 テンプレートの部品 ---------- */
.fanza-badges, .fanza-hero, .fanza-author-link, .fanza-ranking, .fanza-reltags, .fanza-authorbox, .fanza-notice, .fanza-authors, .fanza-ranking-list {
	--fanza-main: var(--color_main, #4f6bf5);
	--fanza-line: #e3e5ea;
	--fanza-soft: #f4f5f7;
	--fanza-text-sub: #5b6170;
	box-sizing: border-box;
}
.fanza-ico { width: 14px; height: 14px; flex: none; }

/* 人気・作家タグ */
.fanza-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.5em; }
.fanza-badge {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 3px 12px; border-radius: 4px; border: 1px solid transparent;
	font-size: 13px; font-weight: 700; line-height: 1.6; text-decoration: none !important;
}
.fanza-badge--hot { background: #d63638; color: #fff !important; }
.fanza-badge--author { border-color: var(--fanza-main); color: var(--fanza-main) !important; background: #fff; }
a.fanza-badge:hover { opacity: .85; }

/* 4枚目の大きい画像 */
.fanza-hero { margin: 0 0 1.5em; }
.fanza-hero img { display: block; width: 100%; height: auto; border: 1px solid var(--fanza-line); }

/* 作家の一覧ページボタン */
.fanza-author-link { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fanza-btn-outline {
	display: block; width: 100%; max-width: 420px; box-sizing: border-box;
	padding: .85em 1.5em; border: 2px solid var(--fanza-main); border-radius: 6px;
	background: #fff; color: var(--fanza-main) !important; font-weight: 700; text-align: center; text-decoration: none !important;
	transition: background .2s, color .2s;
}
.fanza-btn-outline::after { content: "›"; margin-left: .6em; }
.fanza-btn-outline:hover { background: var(--fanza-main); color: #fff !important; }

/* ランキングバナー */
.fanza-ranking { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 2em 0; }
.fanza-ranking__text { margin: 0 !important; font-weight: 700; }
.fanza-ranking img { display: block; width: 200px; height: auto; }

/* 関連タグ */
.fanza-reltags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 2em; }
.fanza-reltag {
	display: inline-flex; align-items: center; gap: 3px;
	padding: 4px 12px; border: 1px solid #c9cdd5; border-radius: 999px;
	color: #333 !important; font-size: 13px; line-height: 1.6; text-decoration: none !important;
}
.fanza-reltag span { color: var(--fanza-text-sub); }
.fanza-reltag:hover { border-color: var(--fanza-main); color: var(--fanza-main) !important; }

/* 記事下（コメントの前後） */
.fanza-after { margin: 2.5em 0; }
.fanza-after > :last-child { margin-bottom: 0; }

/* この記事を書いた人：PC 2カラム */
.fanza-authorbox {
	display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: start;
	margin: 0 0 2.5em; padding: 24px; background: var(--fanza-soft); border-radius: 6px;
}
.fanza-authorbox__who { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fanza-authorbox__avatar { width: 112px !important; height: 112px !important; border-radius: 50%; object-fit: cover; }
.fanza-authorbox__name { margin: 0 !important; font-weight: 700; text-align: center; }
.fanza-authorbox__body { display: flex; flex-direction: column; gap: 10px; font-size: .92em; line-height: 1.8; }
.fanza-authorbox__bio p { margin: 0 0 .6em; }
.fanza-authorbox__more { align-self: flex-start; font-size: 13px; color: var(--fanza-main) !important; }

/* 注意書き */
.fanza-notice {
	padding: 16px 20px; background: #f6f7f9; border: 1px solid var(--fanza-line); border-radius: 4px;
	font-size: 13px; line-height: 1.8; color: #444;
}
.fanza-notice p { margin: 0 !important; }

/* フッターの人気作者一覧（背景が暗いフッターでも明るいフッターでも読めるよう、色は継承） */
.fanza-authors {
	--fanza-cols: 4;
	display: grid; grid-template-columns: repeat(var(--fanza-cols), minmax(0, 1fr)); gap: 8px 16px;
	margin: 0 !important; padding: 0 !important; list-style: none !important;
}
.fanza-authors li { margin: 0 !important; padding: 0 !important; }
.fanza-authors li::before { display: none !important; }
.fanza-authors a { color: inherit !important; font-size: 14px; text-decoration: none !important; }
.fanza-authors a::before { content: "›"; margin-right: .4em; opacity: .7; }
.fanza-authors a:hover { text-decoration: underline !important; }

.fanza-authors__count { margin-left: .35em; opacity: .65; font-size: .9em; }

/* 人気ランキング */
.fanza-ranking-list .fanza-card__rank {
	position: absolute; top: 0; left: 0; min-width: 28px; padding: 2px 6px;
	background: #d63638; color: #fff; font-size: 13px; font-weight: 700; text-align: center;
}
.fanza-empty { color: #5b6170; }

/* ---------- スマホ ---------- */
@media (max-width: 599px) {
	.fanza-authorbox { grid-template-columns: 1fr; gap: 12px; padding: 20px 16px; }
	.fanza-authorbox__more { align-self: center; }
	.fanza-authors { --fanza-cols: 2 !important; }
	.fanza-info { grid-template-columns: 1fr; gap: 16px; }
	.fanza-cards { --fanza-cols: 2 !important; gap: 16px 10px; }
	.fanza-spec th { width: 6.5em; }
}
