.fanza-dashboard {
	max-width: 1200px;
	margin: 0 auto;
}

.fanza-disclosure {
	background: #fff3cd;
	color: #7a5c00;
	border: 1px solid #ffe69c;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 13px;
	margin: 0 0 20px;
}

/* Quick-filter chip row (全て / 本日 / 予約 / SALE / genres) */

.fanza-quick-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.fanza-chip {
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid #ddd;
	background: #fff;
	color: #333;
	border-radius: 999px;
	padding: 0 16px;
	/* 40px keeps the tap target comfortable on touch screens. */
	min-height: 40px;
	font-size: 14px;
	font-weight: bold;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fanza-chip:hover {
	border-color: #e53935;
	color: #e53935;
}

.fanza-chip.is-active {
	background: #e53935;
	border-color: #e53935;
	color: #fff;
}

.fanza-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-bottom: 16px;
}

.fanza-filters input[type="search"],
.fanza-filters select {
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
	/* iOS Safari zooms the page when focusing an input under 16px. */
	max-width: 100%;
}

@media (max-width: 600px) {
	.fanza-filters input[type="search"],
	.fanza-filters select {
		font-size: 16px;
		flex: 1 1 100%;
	}
}

.fanza-status {
	font-size: 13px;
	color: #666;
	margin-bottom: 8px;
	min-height: 1.2em;
}

.fanza-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}

.fanza-grid[aria-busy="true"] {
	opacity: 0.5;
}

.fanza-card {
	position: relative;
	display: block;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fanza-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.fanza-card-thumb {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	background: #eee;
}

.fanza-card-body {
	padding: 10px 12px;
}

.fanza-card-title {
	font-size: 14px;
	font-weight: bold;
	margin: 0 0 6px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fanza-card-actress {
	font-size: 12px;
	color: #888;
	margin: 0 0 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fanza-card-meta {
	font-size: 13px;
	color: #e53935;
	font-weight: bold;
	margin: 0;
}

/* On phones .fanza-grid is effectively a single column, so the normal
   full-width 16:10 thumbnail becomes a huge image dominating the screen.
   Switch each card to a compact row (small thumbnail + text beside it),
   the same shape as the sidebar `.fanza-list` layout, instead. */
@media (max-width: 600px) {
	.fanza-grid {
		grid-template-columns: 1fr;
	}
	.fanza-card {
		display: flex;
		align-items: stretch;
	}
	.fanza-card-thumb {
		width: 130px;
		height: 92px;
		aspect-ratio: unset;
		flex: 0 0 auto;
	}
	.fanza-card-body {
		flex: 1 1 auto;
		min-width: 0;
		padding: 8px 10px;
	}
	.fanza-card-title {
		font-size: 13px;
	}
}

.fanza-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1;
	font-size: 11px;
	font-weight: bold;
	padding: 3px 8px;
	border-radius: 4px;
	color: #fff;
}

.fanza-badge-sale {
	background: #e53935;
}

.fanza-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin-top: 20px;
}

.fanza-page-btn {
	padding: 6px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
}

.fanza-page-ellipsis {
	display: flex;
	align-items: center;
	padding: 0 4px;
	color: #999;
	font-size: 14px;
}

.fanza-page-btn.is-active {
	background: #e53935;
	color: #fff;
	border-color: #e53935;
}

.fanza-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: #888;
	padding: 24px 0;
}

.fanza-portal-block {
	margin-bottom: 36px;
}

.fanza-block-title {
	font-size: 20px;
	margin-bottom: 14px;
	border-left: 5px solid #e53935;
	padding-left: 10px;
}

.fanza-grid-static {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}

.fanza-ranking-list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: fanza-rank;
}

.fanza-ranking-item {
	counter-increment: fanza-rank;
	border-bottom: 1px solid #eee;
}

.fanza-ranking-item a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 4px;
	text-decoration: none;
	color: inherit;
}

.fanza-ranking-item a::before {
	content: counter(fanza-rank);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #e53935;
	color: #fff;
	font-size: 12px;
	font-weight: bold;
	margin-right: 10px;
}

.fanza-ranking-count {
	font-size: 12px;
	color: #888;
}

/* Compact sidebar layout (layout="list") — narrow single-column widget use */

.fanza-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.fanza-list-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 4px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #eee;
}

.fanza-list-item:hover {
	background: rgba(0, 0, 0, 0.03);
}

.fanza-list-thumb-wrap {
	position: relative;
	flex: 0 0 auto;
}

.fanza-list-thumb {
	width: 64px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
	background: #eee;
}

.fanza-list-thumb-wrap .fanza-badge {
	top: 2px;
	left: 2px;
	font-size: 9px;
	padding: 2px 4px;
}

.fanza-list-body {
	min-width: 0;
	flex: 1 1 auto;
}

.fanza-list-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 12.5px;
	line-height: 1.4;
	font-weight: bold;
}

.fanza-list-meta {
	display: block;
	font-size: 11px;
	color: #888;
	margin-top: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Freeform draggable "corkboard" layout ([fanza_moodboard]) */

.fanza-moodboard-hint {
	font-size: 13px;
	color: #888;
	margin: 0 0 12px;
}

.fanza-moodboard-reset {
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid #ccc;
	background: #fff;
	color: #333;
	border-radius: 6px;
	padding: 6px 14px;
	font-size: 13px;
	cursor: pointer;
	margin-bottom: 10px;
}

.fanza-moodboard-reset:hover {
	border-color: #e53935;
	color: #e53935;
}

.fanza-moodboard-viewport {
	position: relative;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	max-height: 70vh;
	border: 1px solid #e6ddce;
	border-radius: 8px;
	background: #f5efe6;
}

.fanza-moodboard-canvas {
	position: relative;
}

.fanza-moodboard-card {
	position: absolute;
	width: 180px;
	background: #fff;
	padding: 10px 10px 34px;
	border-radius: 2px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
	text-decoration: none;
	color: inherit;
	cursor: grab;
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
	transition: box-shadow 0.15s ease;
}

.fanza-moodboard-card:active {
	cursor: grabbing;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.fanza-moodboard-pin {
	position: absolute;
	top: -6px;
	left: 50%;
	transform: translateX(-50%);
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #e53935;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
	pointer-events: none;
}

.fanza-moodboard-thumb {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	background: #eee;
	pointer-events: none;
}

.fanza-moodboard-caption {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 8px;
	font-size: 12px;
	font-weight: bold;
	line-height: 1.3;
	max-height: 2.6em;
	overflow: hidden;
	text-align: center;
	pointer-events: none;
}

@media (prefers-color-scheme: dark) {
	.fanza-disclosure {
		background: #3a2f00;
		color: #ffe69c;
		border-color: #5c4a00;
	}
	.fanza-chip {
		background: #2a2a2a;
		color: #eee;
		border-color: #444;
	}
	.fanza-chip.is-active {
		background: #e53935;
		border-color: #e53935;
		color: #fff;
	}
	.fanza-card {
		background: #1e1e1e;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
	}
	.fanza-filters input[type="search"],
	.fanza-filters select {
		background: #2a2a2a;
		color: #eee;
		border-color: #444;
	}
	.fanza-page-btn {
		background: #2a2a2a;
		color: #eee;
		border-color: #444;
	}
	.fanza-page-ellipsis {
		color: #888;
	}
	.fanza-list-item {
		border-bottom-color: #333;
	}
	.fanza-list-item:hover {
		background: rgba(255, 255, 255, 0.05);
	}
	.fanza-moodboard-reset {
		background: #2a2a2a;
		color: #eee;
		border-color: #444;
	}
	.fanza-moodboard-viewport {
		background: #262019;
		border-color: #3a3226;
	}
	.fanza-moodboard-card {
		background: #1e1e1e;
		box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
	}
}
