/* テーマCSSが hidden 属性(UAスタイル)を上書きしても確実に非表示にする */
.ftdb-search [hidden],
.ftdb-compare [hidden] {
	display: none !important;
}

/* ==== 占い師カード ==== */
.ftdb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
	margin: 16px 0;
}

.ftdb-teller-card {
	border: 1px solid #e2e2e6;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.15s ease;
}

.ftdb-teller-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.ftdb-tc-link {
	display: block;
	color: inherit;
	text-decoration: none;
	position: relative;
}

.ftdb-tc-rank {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #6d5cae;
	color: #fff;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
}

.ftdb-tc-media {
	aspect-ratio: 1 / 1;
	background: #f0f0f3;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.ftdb-tc-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ftdb-tc-placeholder {
	font-size: 48px;
	color: #b5b5c0;
	font-weight: 700;
}

.ftdb-tc-body {
	padding: 12px 14px 14px;
}

.ftdb-tc-name {
	margin: 0 0 4px;
	font-size: 16px;
	line-height: 1.4;
}

.ftdb-tc-site {
	margin: 0 0 4px;
	font-size: 12px;
	color: #6d5cae;
}

.ftdb-tc-meta {
	margin: 0 0 6px;
	font-size: 12px;
	color: #666;
}

.ftdb-tc-price {
	margin: 0 0 8px;
	font-size: 13px;
	color: #b3261e;
}

.ftdb-tc-price strong {
	font-size: 20px;
}

.ftdb-tc-tags {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ftdb-tc-tags span,
.ftdb-single-tags span {
	background: #f2effa;
	color: #55459a;
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 11px;
}

/* ==== 検索UI ==== */
.ftdb-search-form {
	background: #f7f7fa;
	border: 1px solid #e2e2e6;
	border-radius: 10px;
	padding: 16px;
}

.ftdb-sf-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
}

.ftdb-sf-row + .ftdb-sf-row {
	margin-top: 12px;
}

.ftdb-sf-row label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	color: #555;
}

.ftdb-sf-row select,
.ftdb-sf-row input[type="text"] {
	min-width: 160px;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
}

.ftdb-sf-submit {
	background: #6d5cae;
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 9px 22px;
	font-size: 14px;
	cursor: pointer;
}

.ftdb-sf-submit:hover {
	background: #5a4b93;
}

.ftdb-search-count {
	margin: 12px 0 0;
	font-size: 13px;
	color: #555;
}

.ftdb-search-more-wrap {
	text-align: center;
}

#ftdb-search-more {
	padding: 8px 32px;
	border: 1px solid #6d5cae;
	color: #6d5cae;
	background: #fff;
	border-radius: 999px;
	cursor: pointer;
}

/* ==== 詳細ページ ==== */
.ftdb-single {
	max-width: 960px;
	margin: 0 auto;
	padding: 16px;
}

.ftdb-retired-notice {
	background: #fdf0f0;
	border: 1px solid #e5b3b3;
	color: #8a2a2a;
	border-radius: 8px;
	padding: 10px 14px;
}

.ftdb-single-head {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.ftdb-single-media {
	flex: 0 0 240px;
	max-width: 240px;
}

.ftdb-single-media img {
	width: 100%;
	height: auto;
	border-radius: 10px;
}

.ftdb-single-media .ftdb-tc-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 240px;
	height: 240px;
	background: #f0f0f3;
	border-radius: 10px;
}

.ftdb-single-summary {
	flex: 1;
	min-width: 260px;
}

.ftdb-single-name {
	margin: 0 0 8px;
}

.ftdb-single-site {
	color: #6d5cae;
	margin: 0 0 12px;
}

.ftdb-single-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 12px;
}

.ftdb-single-stats div {
	background: #f7f7fa;
	border-radius: 8px;
	padding: 8px 14px;
	text-align: center;
}

.ftdb-single-stats dt {
	font-size: 11px;
	color: #777;
}

.ftdb-single-stats dd {
	margin: 0;
	font-size: 15px;
}

.ftdb-single-stats dd strong {
	font-size: 20px;
}

.ftdb-single-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
	margin: 0 0 6px;
}

.ftdb-tag-label {
	background: none !important;
	color: #777 !important;
	font-size: 12px !important;
	padding: 0 !important;
}

.ftdb-single-cta a {
	display: inline-block;
	background: #6d5cae;
	color: #fff;
	border-radius: 999px;
	padding: 12px 32px;
	text-decoration: none;
	font-weight: 600;
}

.ftdb-single-cta a:hover {
	background: #5a4b93;
	color: #fff;
}

/* ==== 比較UI ==== */
.ftdb-compare-pickers {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.ftdb-compare-picker {
	position: relative;
	flex: 1;
	min-width: 240px;
}

.ftdb-compare-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 14px;
}

.ftdb-compare-suggest {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 10;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
	max-height: 280px;
	overflow-y: auto;
}

.ftdb-compare-option {
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: 0;
	border-bottom: 1px solid #f0f0f0;
	padding: 10px 12px;
	cursor: pointer;
	font-size: 14px;
}

.ftdb-compare-option:hover {
	background: #f2effa;
}

.ftdb-compare-empty {
	padding: 10px 12px;
	color: #888;
	font-size: 13px;
}

.ftdb-compare-table {
	width: 100%;
	margin-top: 20px;
	border-collapse: collapse;
}

.ftdb-compare-table th,
.ftdb-compare-table td {
	border: 1px solid #e2e2e6;
	padding: 10px 12px;
	text-align: center;
	font-size: 14px;
}

.ftdb-compare-table thead th {
	background: #f2effa;
}

.ftdb-compare-table tbody th {
	background: #f7f7fa;
	width: 120px;
	font-weight: 600;
}

@media (max-width: 600px) {
	.ftdb-single-media {
		flex-basis: 100%;
		max-width: 100%;
	}

	.ftdb-sf-row select,
	.ftdb-sf-row input[type="text"] {
		min-width: 130px;
	}
}
