.fac-container {
	max-width: 960px;
	margin: 0 auto;
}

.fac-gated .fac-grid,
.fac-gated .fac-list,
.fac-gated .fac-pagination,
.fac-gated .fac-single,
.fac-gated .fac-single-nav,
.fac-gated .fac-tabs,
.fac-gated .fac-toolbar,
.fac-gated .fac-favs-grid,
.fac-gated .fac-favs-empty,
.fac-gated .fac-more-btn {
	display: none;
}

/* タブ */

.fac-tabs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding: 4px 2px 10px;
	margin-bottom: 6px;
}

.fac-tab {
	flex-shrink: 0;
	padding: 7px 14px;
	border: 1px solid #ccc;
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	font-size: 13px;
	background: #fff;
	white-space: nowrap;
}

.fac-tab-active {
	background: #222;
	border-color: #222;
	color: #fff;
}

.fac-tab-sale {
	border-color: #d33;
	color: #d33;
}

.fac-tab-sale.fac-tab-active {
	background: #d33;
	color: #fff;
}

/* ツールバー */

.fac-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	font-size: 13px;
}

.fac-price-filter {
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	font-size: 13px;
}

.fac-updated {
	color: #888;
	font-size: 12px;
}

/* カード/リスト(簡易カタログ) */

.fac-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
}

.fac-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	background: #fff;
}

.fac-card-thumb {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	background: #f2f2f2;
	overflow: hidden;
}

.fac-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fac-card-body {
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fac-title {
	font-size: 13px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fac-meta {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 12px;
	color: #666;
}

.fac-price {
	font-weight: bold;
	color: #111;
}

.fac-list-price {
	font-weight: normal;
	color: #999;
	margin-right: 4px;
}

.fac-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fac-list-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	background: #fff;
}

.fac-list-thumb {
	flex-shrink: 0;
	width: 72px;
	height: 54px;
	border-radius: 6px;
	overflow: hidden;
	background: #f2f2f2;
}

.fac-list-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fac-list-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.fac-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 20px;
	font-size: 14px;
}

.fac-page-link {
	padding: 6px 14px;
	border: 1px solid #ccc;
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
}

.fac-error {
	max-width: 640px;
	margin: 0 auto;
	padding: 14px;
	border: 1px solid #f0c0c0;
	border-radius: 8px;
	color: #a33;
	font-size: 14px;
}

/* 年齢確認 */

.fac-age-gate {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.fac-age-gate.fac-hidden {
	display: none;
}

.fac-age-gate-box {
	background: #fff;
	max-width: 360px;
	padding: 24px;
	border-radius: 10px;
	text-align: center;
}

.fac-age-gate-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin-top: 16px;
}

.fac-age-yes {
	padding: 8px 18px;
	border: none;
	border-radius: 6px;
	background: #222;
	color: #fff;
	cursor: pointer;
}

.fac-age-no {
	padding: 8px 18px;
	border: 1px solid #ccc;
	border-radius: 6px;
	color: inherit;
	text-decoration: none;
}

/* 「1件ずつ」モード */

.fac-single-container {
	max-width: 420px;
	margin: 0 auto;
}

.fac-v3 .fac-single {
	max-width: 420px;
	margin: 0 auto;
}

.fac-single-slide {
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e2e2;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	/* 左右スワイプを検知しつつ、縦方向のページスクロールは妨げない */
	touch-action: pan-y;
}

/* 重要: 上の .fac-single-slide { display: flex; } がそのままだと、
   JSが付与するhidden属性(ブラウザ標準では display:none)を上書きしてしまい、
   全件が縦に並んで表示されてしまう。hidden時は確実に非表示にする。 */
.fac-single-slide[hidden] {
	display: none;
}

.fac-single-media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #f2f2f2;
}

/* 再生中はPCでは16:9に切替(横動画)。スマホ幅は下のメディアクエリで3:4を維持し縦動画に対応 */
.fac-single-media.fac-playing {
	aspect-ratio: 16 / 9;
	background: #000;
}

.fac-single-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fac-inline-player {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.fac-sale-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	padding: 3px 8px;
	border-radius: 6px;
	background: #d33;
	color: #fff;
	font-size: 12px;
	font-weight: bold;
}

.fac-play-button {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}

.fac-play-icon {
	display: block;
	width: 0;
	height: 0;
	margin-left: 4px;
	border-style: solid;
	border-width: 10px 0 10px 16px;
	border-color: transparent transparent transparent #fff;
}

/* 読み込み中スピナー */

.fac-single-media.fac-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: fac-spin 0.8s linear infinite;
	z-index: 3;
}

@keyframes fac-spin {
	to {
		transform: rotate(360deg);
	}
}

.fac-single-body {
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.fac-single-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.fac-single-link {
	padding: 6px 16px;
	border-radius: 6px;
	background: #222;
	color: #fff;
	text-decoration: none;
	font-size: 13px;
}

.fac-fav-btn,
.fac-share-btn {
	padding: 6px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 13px;
}

.fac-fav-btn.fac-fav-on {
	border-color: #d90;
	color: #b70;
	background: #fff8e6;
}

.fac-single-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 14px;
}

.fac-single-nav button {
	padding: 8px 20px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
}

.fac-single-nav button:disabled {
	opacity: 0.4;
	cursor: default;
}

.fac-single-position {
	font-size: 13px;
	color: #666;
}

.fac-more-btn {
	display: block;
	margin: 14px auto 0;
	padding: 12px 28px;
	border: 1px solid #222;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: bold;
}

.fac-more-btn[hidden] {
	display: none;
}

/* お気に入りタブ */

.fac-favs-empty {
	text-align: center;
	color: #888;
	font-size: 13px;
	padding: 24px 12px;
}

.fac-favs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px;
}

.fac-fav-card {
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
}

.fac-fav-thumb {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	background: #f2f2f2;
}

.fac-fav-body {
	padding: 8px 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fac-fav-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.fac-fav-remove {
	padding: 5px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 12px;
	color: #888;
}

/* スマホ幅: カード1枚がより画面いっぱいに見えるように拡大。
   メディアは3:4のままにして縦動画・縦長パッケージに対応する。 */
@media (max-width: 600px) {
	.fac-single-container,
	.fac-v3 .fac-single {
		max-width: 100%;
		margin: 0;
	}

	.fac-single-slide {
		border-left: none;
		border-right: none;
		border-radius: 0;
	}

	.fac-single-media,
	.fac-single-media.fac-playing {
		aspect-ratio: 3 / 4;
	}

	.fac-play-button {
		width: 72px;
		height: 72px;
	}

	.fac-play-icon {
		border-width: 13px 0 13px 20px;
	}

	.fac-single-body {
		padding: 16px 18px;
		gap: 10px;
	}

	.fac-title {
		font-size: 15px;
	}

	.fac-single-link {
		padding: 10px 22px;
		font-size: 15px;
	}

	.fac-fav-btn,
	.fac-share-btn {
		padding: 10px 14px;
		font-size: 14px;
	}

	.fac-single-nav {
		margin-top: 18px;
	}

	.fac-single-nav button {
		padding: 12px 26px;
		font-size: 16px;
	}

	.fac-tabs {
		padding-bottom: 8px;
	}
}

/* =========================================================================
   ヌワイプ v0.4.1 — 動画ファースト(横長16:9)縦スワイプフィード
   -------------------------------------------------------------------------
   横長のサンプル動画を画面幅いっぱいの16:9で主役表示。情報・ボタンは動画の
   外(下)に置き、FANZAプレイヤーの操作(停止・拡大・シーク・全画面)を一切覆わない。
   縦スワイプ(1本ずつスナップ)は維持。DOM構造は変更なし。
   境界線遵守: 自動再生なし / 無限スクロールなし / レコメンドなし。
   ========================================================================= */

/* フィード: 縦スナップのスクロールコンテナ */
.fac-v3 .fac-single {
	position: relative;
	max-width: 480px;
	margin: 0 auto;
	height: 88dvh;
	max-height: 900px;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	background: #000;
	border-radius: 12px;
	scrollbar-width: none;
}

.fac-v3 .fac-single::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

/* 各スライド: 1画面。動画+情報を縦中央に寄せる */
.fac-v3 .fac-single-slide {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	border: none;
	border-radius: 0;
	overflow: hidden;
	background: #000;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	touch-action: pan-y;
}

.fac-v3 .fac-single-slide[hidden] {
	display: none;
}

/* メディア: 全幅16:9。動画の主役。通常フロー(オーバーレイにしない) */
.fac-v3 .fac-single-media,
.fac-v3 .fac-single-media.fac-playing {
	position: relative;
	inset: auto;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	background: #000;
	flex: 0 0 auto;
}

.fac-v3 .fac-single-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #000;
}

.fac-v3 .fac-inline-player {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* 再生後はこちらの再生ボタン・サムネを確実に隠す(FANZAの操作を邪魔しない) */
.fac-v3 .fac-play-button[hidden],
.fac-v3 .fac-single-thumb[hidden] {
	display: none;
}

.fac-v3 .fac-play-button {
	width: 72px;
	height: 72px;
	background: rgba(0, 0, 0, 0.5);
}

/* 情報: 動画の外(下)。通常フロー。動画を一切覆わない */
.fac-v3 .fac-single-body {
	position: relative;
	inset: auto;
	left: auto;
	right: auto;
	bottom: auto;
	z-index: auto;
	padding: 14px 16px 16px;
	background: transparent;
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 0 0 auto;
	pointer-events: auto;
}

.fac-v3 .fac-single-body .fac-title {
	color: #fff;
	font-size: 15px;
	-webkit-line-clamp: 2;
}

.fac-v3 .fac-single-body .fac-meta {
	color: #ccc;
	justify-content: flex-start;
	gap: 12px;
}

.fac-v3 .fac-single-body .fac-price {
	color: #fff;
}

.fac-v3 .fac-single-body .fac-list-price {
	color: #999;
}

.fac-v3 .fac-single-body .fac-review {
	color: #ffd66b;
}

/* アクション: 動画の下に横並び(右レール廃止) */
.fac-v3 .fac-single-actions {
	position: static;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.fac-v3 .fac-single-link {
	background: #ff2d55;
	padding: 9px 20px;
	font-weight: bold;
	font-size: 14px;
}

.fac-v3 .fac-fav-btn,
.fac-v3 .fac-share-btn {
	position: static;
	right: auto;
	bottom: auto;
	width: auto;
	min-width: 0;
	padding: 8px 14px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 13px;
	line-height: 1.2;
	pointer-events: auto;
}

.fac-v3 .fac-fav-btn.fac-fav-on {
	background: rgba(217, 153, 0, 0.5);
	border-color: rgba(217, 153, 0, 0.7);
	color: #fff;
}

/* ナビはフィード下 */
.fac-v3 + .fac-single-nav,
.fac-v3 .fac-single-nav {
	margin-top: 12px;
}

/* スマホ: 全幅・角丸なし */
@media (max-width: 600px) {
	.fac-v3 .fac-single {
		max-width: 100%;
		height: 90dvh;
		border-radius: 0;
		margin: 0;
	}

	.fac-v3 .fac-single-slide {
		border: none;
		border-radius: 0;
	}

	.fac-v3 .fac-single-body {
		padding: 14px 16px 18px;
	}

	.fac-v3 .fac-single-body .fac-title {
		font-size: 16px;
	}

	.fac-v3 .fac-play-button {
		width: 76px;
		height: 76px;
	}
}