/* FANZA Hub Cards: SWELLの色を借りつつ、テーマ本体へ依存しない収益導線。 */
.fhc-grid {
	--fhc-accent: var(--color_main, var(--swl-main_color, #e44d7a));
	display: grid;
	grid-template-columns: repeat(var(--fhc-columns, 4), minmax(0, 1fr));
	gap: clamp(10px, 1.7vw, 18px);
	margin: 1.25rem 0 2rem;
}

.fhc-card {
	display: block;
	min-width: 0;
	color: inherit;
	text-decoration: none !important;
	-webkit-tap-highlight-color: transparent;
}

.fhc-card-frame {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: linear-gradient(145deg, #fff 0%, #f5f5f7 100%);
	border: 1px solid color-mix(in srgb, var(--fhc-accent) 22%, #d7d7dc);
	border-radius: 12px;
	box-shadow: 0 5px 16px rgba(20, 20, 30, 0.10), 0 1px 3px rgba(20, 20, 30, 0.08);
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.fhc-card-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 220ms ease, filter 220ms ease;
}

.fhc-rank {
	position: absolute;
	z-index: 2;
	top: 7px;
	left: 7px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 2px solid rgba(255, 255, 255, 0.92);
	border-radius: 50%;
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

.fhc-rank-1 { background: linear-gradient(145deg, #ffd85b, #d89b00); }
.fhc-rank-2 { background: linear-gradient(145deg, #dfe4ea, #89939e); }
.fhc-rank-3 { background: linear-gradient(145deg, #e8a36b, #9e592f); }

.fhc-card:focus-visible {
	outline: 3px solid var(--fhc-accent);
	outline-offset: 4px;
	border-radius: 12px;
}

.fhc-card:active .fhc-card-frame {
	transform: scale(0.975);
	box-shadow: 0 2px 8px rgba(20, 20, 30, 0.14);
}

.fhc-hub-feature {
	margin-bottom: 2rem;
}

.fhc-hub-feature > h2 {
	margin-top: 1.5em;
}

.fhc-hub-posts-title {
	margin-top: 2.2em !important;
}

@media (hover: hover) and (pointer: fine) {
	.fhc-card:hover .fhc-card-frame {
		z-index: 1;
		transform: translateY(-4px) scale(1.025);
		border-color: var(--fhc-accent);
		box-shadow: 0 13px 28px rgba(20, 20, 30, 0.18), 0 0 0 2px color-mix(in srgb, var(--fhc-accent) 14%, transparent);
	}

	.fhc-card:hover .fhc-card-image {
		transform: scale(1.025);
		filter: saturate(1.06) contrast(1.02);
	}
}

@media (max-width: 781px) {
	.fhc-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
		margin-bottom: 1.6rem;
	}

	.fhc-card-frame {
		border-radius: 9px;
		box-shadow: 0 3px 10px rgba(20, 20, 30, 0.11);
	}

	.fhc-rank {
		top: 5px;
		left: 5px;
		width: 26px;
		height: 26px;
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fhc-card-frame,
	.fhc-card-image {
		transition: none;
	}
}

/* color-mix非対応ブラウザ向け。 */
@supports not (color: color-mix(in srgb, #000 50%, #fff)) {
	.fhc-card-frame { border-color: #d7d7dc; }
	.fhc-card:hover .fhc-card-frame { border-color: var(--fhc-accent); }
}

