/* YACC-WP 前端默认样式
   全部使用类名选择器，主题可在更高层选择器下覆盖 */

.yacc-grid {
	display: grid;
	grid-template-columns: repeat(var(--yacc-cols-m, 2), 1fr); /* 手机端默认两列 */
	gap: var(--yacc-gap-y, 30px) var(--yacc-gap-x, 16px);
	margin: 24px 0;
}
@media (min-width: 768px) {
	.yacc-grid {
		grid-template-columns: repeat(var(--yacc-cols-t, 2), 1fr);
		gap: var(--yacc-gap-y, 30px) var(--yacc-gap-x, 24px);
	}
}
@media (min-width: 1024px) {
	.yacc-grid {
		grid-template-columns: repeat(var(--yacc-cols-d, 4), 1fr);
		gap: var(--yacc-gap-y, 44px) var(--yacc-gap-x, 30px);
	}
}

/* 全宽模式：突破主题内容容器，铺满整个视口宽度（短代码 full="1"）
   用负外边距把左右边缘推到视口两侧；两侧留 --yacc-full-pad（默认 24px）避免贴边。
   注意：WordPress 区块「约束布局」(is-layout-constrained) 会给子元素加
   max-width:内容宽度 + margin-left/right:auto !important，故此处用双类提高优先级并加 !important */
.yacc-grid.yacc-full-bleed,
.yacc-grid-filter.yacc-full-bleed {
	width: auto;
	max-width: none !important;
	margin-left: calc(-50vw + 50%) !important;
	margin-right: calc(-50vw + 50%) !important;
	box-sizing: border-box;
	padding-left: var(--yacc-full-pad, 24px);
	padding-right: var(--yacc-full-pad, 24px);
}

.yacc-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.yacc-card-link .yacc-card {
	margin: 0;
}

.yacc-card {
	margin: 0;
	padding: 0;
	position: relative;
	transform-style: preserve-3d;
	will-change: transform;
}

/* 悬浮时提升层级，避免在网格中被邻卡遮挡 */
.yacc-card.is-tilting {
	position: relative;
	z-index: 5;
}

/* 图片 + 外壳叠加容器 */
.yacc-image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: var(--yacc-ratio, 63/88);
	overflow: hidden;
	background-color: rgba(225, 225, 225, 0.2);
	transform-style: preserve-3d;
	/* 卡面展示圆角由后台“设置 → 卡面展示圆角”控制 */
	border-radius: var(--yacc-radius, 8px);
	/* 作为容器查询单位（cqw）的基准：头部文字/图标/二维码随卡片宽度等比缩放 */
	container-type: inline-size;
}

.yacc-image {
	display: block;
	position: absolute;
	top: var(--yacc-win-top, 0%);
	left: var(--yacc-win-left, 0%);
	width: var(--yacc-win-width, 100%);
	height: var(--yacc-win-height, 100%);
	object-fit: cover;
}

/* 外壳叠加层（镂空透明 PNG） */
.yacc-shelled .yacc-image-wrap::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--yacc-shell);
	background-size: 100% 100%;
	background-repeat: no-repeat;
	pointer-events: none;
	z-index: 10;
}

/* 未套壳状态：描边 */
.yacc-plain .yacc-image-wrap {
	border: 1px solid #ddd;
}

/* 无图占位 */
.yacc-no-img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #999;
	font-size: var(--yacc-fe-fs-base);
}

/* 顶部内容条（结构通用样式；尺寸/颜色/字体由各外壳的 shell-{id} 样式块输出） */
.yacc-header {
	position: absolute;
	display: flex;
	align-items: center;
	overflow: hidden;
	z-index: 11;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}
.yacc-header-icon {
	flex: 0 0 auto;
	line-height: 0;
}
.yacc-header-icon img {
	display: block;
	width: 100%;
	height: auto;
}
.yacc-header-text {
	flex: 1 1 auto;
	min-width: 0;
}
.yacc-header-text > div {
	white-space: normal;
}
.yacc-header .yacc-qr {
	flex: 0 0 auto;
	overflow: hidden;
}
.yacc-header .yacc-qr svg,
.yacc-header .yacc-qr img {
	display: block;
	width: 100%;
	height: 100%;
}
.yacc-header-text:empty {
	display: none;
}

/* 元信息 */
.yacc-meta {
	padding: var(--yacc-fe-space-1) 2px 0;
	font-size: var(--yacc-fe-fs-base);
	line-height: 1.5;
}
.yacc-meta .yacc-no {
	color: #888;
	font-size: var(--yacc-fe-fs-sm);
}
.yacc-meta .yacc-name {
	font-weight: 600;
	color: #222;
}
.yacc-meta .yacc-series {
	color: #888;
	font-size: var(--yacc-fe-fs-sm);
	margin-top: 1px;
}
.yacc-meta .yacc-rarity {
	display: inline-block;
	margin-top: 4px;
	padding: 1px var(--yacc-fe-space-1);
	border-radius: 10px;
	color: #fff;
	font-size: var(--yacc-fe-fs-xs);
	background: #999;
}

/* 稀有度：百分比进度条（列表元信息 + 详情信息表） */
.yacc-rarity-bar {
	display: inline-block;
	min-width: 120px;
	max-width: 100%;
}
.yacc-meta-rarity {
	margin-top: 6px;
}
.yacc-meta-rarity .yacc-rarity-bar,
.yacc-detail-field dd .yacc-rarity-bar {
	display: block;
	min-width: 0;
}
.yacc-rarity-bar-head {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.yacc-rarity-bar-label {
	font-weight: 600;
	font-size: var(--yacc-fe-fs-sm);
}
.yacc-rarity-bar-pct {
	margin-left: auto;
	font-size: var(--yacc-fe-fs-xs);
	color: #666;
}
.yacc-rarity-bar-track {
	display: block;
	height: 6px;
	margin-top: 3px;
	border-radius: 3px;
	background: #e8e8e8;
	overflow: hidden;
}
.yacc-rarity-bar-fill {
	display: block;
	height: 100%;
	border-radius: 3px;
	background: #999;
}
.yacc-rarity-bar-lg .yacc-rarity-bar-label {
	font-size: var(--yacc-fe-fs-md);
}
.yacc-rarity-bar-lg .yacc-rarity-bar-pct {
	font-size: var(--yacc-fe-fs-base);
}
.yacc-rarity-bar-lg .yacc-rarity-bar-track {
	height: 8px;
	margin-top: 4px;
}
.yacc-detail-field dd .yacc-rarity-bar {
	max-width: 360px;
}

/* 稀缺度副文本（合并到稀有度行下方，避免双 dt 标签混淆） */
.yacc-detail-scarcity-note {
	margin-top: 6px;
	font-size: var(--yacc-fe-fs-sm);
	color: #6b5a3a;
	font-weight: 600;
	letter-spacing: .02em;
}
.yacc-detail-scarcity-note::before {
	content: "✦ ";
	color: #d9b23a;
}

/* 描述 */
.yacc-desc {
	padding: 4px 2px;
	font-size: var(--yacc-fe-fs-base);
	color: #444;
	line-height: 1.5;
}

/* ============================================================
   卡牌详情页 / 卡牌列表（兼容 Astra 与常见主题容器）
   ============================================================ */
.yacc-detail-wrap {
	margin: 24px auto;
}
.yacc-detail-grid {
	display: grid;
	grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
	gap: 44px var(--yacc-fe-space-5);
	align-items: start;
}
.yacc-detail-card {
	max-width: 360px;
	width: 100%;
	margin: 0;
}
.yacc-detail-card .yacc-image-wrap {
	border-radius: var(--yacc-radius, 8px);
}
.yacc-detail-empty {
	padding: var(--yacc-fe-space-5);
	text-align: center;
	color: #666;
}
.yacc-detail-info {
	min-width: 0;
}
.yacc-detail-desc {
	margin: 0 0 24px;
	color: #333;
	font-size: var(--yacc-fe-fs-lg);
	line-height: 1.8;
}
.yacc-detail-desc > *:first-child {
	margin-top: 0;
}
.yacc-detail-desc > *:last-child {
	margin-bottom: 0;
}
.yacc-detail-fields {
	margin: 0;
	border-top: 1px solid #eee;
}
.yacc-detail-field {
	display: flex;
	align-items: baseline;
	padding: 12px 0;
	border-bottom: 1px solid #eee;
	gap: 12px;
}
.yacc-detail-field dt {
	width: 110px;
	flex: 0 0 auto;
	color: #777;
	font-size: var(--yacc-fe-fs-base);
	font-weight: 600;
	letter-spacing: .02em;
}
.yacc-detail-field dd {
	margin: 0;
	font-size: var(--yacc-fe-fs-lg);
	font-weight: 500;
	word-break: break-word;
}

/* 详情页底部「信息块」：独占整行 */
.yacc-detail-infoblock {
	margin-top: var(--yacc-fe-space-3);
	padding-top: 16px;
	border-top: 1px solid #eee;
	font-size: calc(var(--yacc-fe-fs-md) + 1px);
	line-height: 1.75;
	color: #444;
	word-break: break-word;
}
.yacc-detail-infoblock-content > :first-child {
	margin-top: 0;
}
.yacc-detail-infoblock-content > :last-child {
	margin-bottom: 0;
}
.yacc-detail-infoblock-shortcode {
	margin-top: 12px;
}

/* 卡牌网格列表：容器内更宽松、卡片齐整 */
.yacc-grid {
	align-items: start;
}
.yacc-grid .yacc-card-link,
.yacc-grid > .yacc-card {
	max-width: 100%;
}
.yacc-grid .yacc-image-wrap {
	border-radius: var(--yacc-radius, 8px);
}

/* 移动端适配（含 Astra 移动容器） */
@media (max-width: 992px) {
	.yacc-detail-grid {
		grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
		gap: 32px var(--yacc-fe-space-4);
	}
}
@media (max-width: 782px) {
	.yacc-detail-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.yacc-detail-card {
		max-width: 320px;
		margin: 0 auto;
	}
	.yacc-detail-desc {
		font-size: calc(var(--yacc-fe-fs-md) + 1px);
		line-height: 1.75;
	}
	.yacc-detail-field {
		flex-wrap: wrap;
		padding: 10px 0;
	}
	.yacc-detail-field dt {
		width: 100%;
		font-size: var(--yacc-fe-fs-sm);
	}
	.yacc-detail-field dd {
		font-size: calc(var(--yacc-fe-fs-md) + 1px);
	}
}


/* ============================================================
   原生单卡详情页：自动详情区域（无需正文简码，插件直接渲染）
   左：放大的卡面（阴影强化）；右：信息表 / 描述
   ============================================================ */
/* 面包屑 */
.yacc-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: var(--yacc-fe-fs-base);
	color: #888;
	margin: 0 0 16px;
	padding: 0;
	line-height: 1.6;
}
.yacc-breadcrumb a.yacc-breadcrumb-link {
	color: #666;
	text-decoration: none;
}
.yacc-breadcrumb a.yacc-breadcrumb-link:hover {
	color: #222;
	text-decoration: underline;
}
.yacc-breadcrumb .yacc-breadcrumb-sep {
	color: #bbb;
}
.yacc-breadcrumb .yacc-breadcrumb-current {
	color: #333;
	font-weight: 500;
}
.yacc-detail-panel {
	margin: 0;
}
.yacc-auto-detail {
	margin: var(--yacc-fe-space-3) 0 36px;
}
.yacc-auto-detail .yacc-detail-grid {
	grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
	align-items: center;
	gap: var(--yacc-fe-space-5) 48px;
}
.yacc-auto-detail .yacc-detail-card {
	max-width: 100%;
}
.yacc-auto-detail .yacc-detail-card .yacc-image-wrap {
	box-shadow: 0 20px 44px rgba(0, 0, 0, 0.18);
}
.yacc-auto-detail .yacc-detail-info {
	max-width: 560px;
}
.yacc-auto-detail .yacc-detail-fields {
	border-top-color: #e2e2e2;
}
.yacc-auto-detail .yacc-rarity {
	padding: 2px 14px;
	border-radius: 12px;
	font-size: var(--yacc-fe-fs-base);
}
@media (min-width: 1200px) {
	.yacc-auto-detail .yacc-detail-grid {
		grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
	}
}
@media (max-width: 992px) {
	.yacc-auto-detail .yacc-detail-grid {
		gap: var(--yacc-fe-space-4) 32px;
		align-items: start;
	}
}
@media (max-width: 782px) {
	.yacc-auto-detail {
		margin: 6px 0 24px;
	}
	.yacc-auto-detail .yacc-detail-grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}
	.yacc-auto-detail .yacc-detail-card {
		max-width: 320px;
		margin: 0 auto;
	}
	.yacc-auto-detail .yacc-detail-card .yacc-image-wrap {
		box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
	}
	.yacc-auto-detail .yacc-detail-info {
		max-width: 100%;
	}
}


/* ============================================================
   3D 倾斜 + 全息光晕（dangpacks 风格，由 yacc-tilt.js 驱动）
   ============================================================ */

/* 光晕层：跟随鼠标位置的径向高光，mix-blend-mode: overlay 产生全息质感 */
.yacc-glare {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 20; /* 置于外壳层(::after, z-index:10)之上 */
	border-radius: inherit;
}
.yacc-glare-inner {
	position: absolute;
	top: 50%;
	left: 50%;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
	background: radial-gradient(
		farthest-corner circle at var(--yacc-mx, 50%) var(--yacc-my, 50%),
		rgba(255, 255, 255, 0.8) 10%,
		rgba(255, 255, 255, 0.45) 30%,
		rgba(0, 0, 0, 0.35) 90%
	);
	mix-blend-mode: overlay;
	transform: translate(-50%, -50%);
}

/* 悬浮时的投影深度（由 JS 添加 .is-tilting） */
.yacc-card.is-tilting .yacc-image-wrap {
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
	transition: box-shadow 0.25s ease;
}

/* 减弱动态效果：关闭倾斜与光晕，仅 JS 保留的微弱 scale 生效 */
@media (prefers-reduced-motion: reduce) {
	.yacc-glare {
		display: none;
	}
	.yacc-card {
		will-change: auto;
	}
}

/* ------------------------------------------------------------------ */
/*  图鉴列表：筛选 / 排序工具条（高级简约：黑白灰）                        */
/* ------------------------------------------------------------------ */
.yacc-grid-toolbar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--yacc-fe-space-2);
	margin: 0 0 6px;
}
.yacc-grid-toolbar-title {
	margin: 0;
	font-size: calc(var(--yacc-fe-fs-base) + 5px);
	font-weight: 600;
	letter-spacing: 0.02em;
}
.yacc-grid-toolbar-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
}
.yacc-grid-toolbar-field {
	display: inline-flex;
	align-items: center;
	gap: var(--yacc-fe-space-1);
	margin: 0;
}
.yacc-grid-toolbar-label {
	font-size: var(--yacc-fe-fs-sm);
	color: #8a8a8a;
	letter-spacing: 0.08em;
	white-space: nowrap;
}
.yacc-grid-toolbar select {
	appearance: none;
	-webkit-appearance: none;
	background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23444' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 12px center;
	border: 1px solid #e2e2e2;
	border-radius: var(--yacc-fe-radius-pill);
	color: #222;
	font-size: var(--yacc-fe-fs-base);
	line-height: 1.4;
	padding: 7px 34px 7px 14px;
	min-height: 34px;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.yacc-grid-toolbar select:hover {
	border-color: #bdbdbd;
}
.yacc-grid-toolbar select:focus {
	outline: none;
	border-color: #111;
	box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}
.yacc-grid-filter .yacc-grid {
	margin-top: 18px;
}

/* ------------------------------------------------------------------ */
/*  稀有度分布图：环形饼图（黑 / 白 / 灰高级简约）                        */
/* ------------------------------------------------------------------ */
.yacc-chart {
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 18px;
	padding: 26px 28px;
	margin: 20px 0;
}
.yacc-chart-title {
	margin: 0 0 20px;
	font-size: 16px;
	font-weight: 600;
	color: #111;
	letter-spacing: 0.04em;
}
.yacc-chart-body {
	display: flex;
	align-items: center;
	gap: 34px;
	flex-wrap: wrap;
}
.yacc-chart-figure {
	position: relative;
	flex: 0 0 200px;
	width: 200px;
	height: 200px;
}
.yacc-chart-donut {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	position: relative;
}
.yacc-chart-hole {
	position: absolute;
	top: 50%;
	left: 50%;
	width: calc(100% - 52px);
	height: calc(100% - 52px);
	border-radius: 50%;
	background: #fff;
	transform: translate(-50%, -50%);
	pointer-events: none;
}
.yacc-chart-center {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}
.yacc-chart-center-num {
	font-size: 30px;
	font-weight: 700;
	line-height: 1.1;
	color: #111;
	letter-spacing: 0.01em;
	font-variant-numeric: tabular-nums;
}
.yacc-chart-center-label {
	margin-top: 3px;
	font-size: 11px;
	color: #9a9a9a;
	letter-spacing: 0.14em;
}
.yacc-chart-empty {
	color: #9a9a9a;
	font-size: 13px;
	margin: 4px 0;
}
.yacc-chart-legend {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1 1 220px;
	min-width: 220px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px 22px;
}
.yacc-chart-legend li {
	display: flex;
	align-items: baseline;
	gap: 9px;
	font-size: 13px;
	line-height: 1.5;
}
.yacc-chart-legend-swatch {
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	align-self: center;
}
.yacc-chart-legend-name {
	color: #222;
	font-weight: 500;
	white-space: nowrap;
}
.yacc-chart-legend-meta {
	color: #9a9a9a;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
@media (max-width: 640px) {
	.yacc-chart {
		padding: 20px 16px;
	}
	.yacc-chart-figure {
		flex-basis: 156px;
		width: 156px;
		height: 156px;
	}
}

/* ------------------------------------------------------------------ */
/*  稀有度折线图 [yacc_rarity_line]                                       */
/* ------------------------------------------------------------------ */
.yacc-chart-line-body {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
}
.yacc-line-svg {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
}
.yacc-line-grid {
	stroke: rgba(154, 154, 154, 0.15);
	stroke-width: 1;
	stroke-dasharray: 3 3;
}
.yacc-line-axis {
	stroke: rgba(154, 154, 154, 0.4);
	stroke-width: 1.5;
}
.yacc-line-ylabel {
	fill: #9a9a9a;
	font-size: 11px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.yacc-line-xlabel {
	fill: #c4c4c4;
	font-size: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.yacc-line-value {
	fill: #fff;
	font-size: 13px;
	font-weight: 700;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.yacc-line-pct {
	fill: #9a9a9a;
	font-size: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (max-width: 640px) {
	.yacc-line-svg {
		min-width: 320px;
	}
	.yacc-line-xlabel {
		font-size: 10px;
	}
	.yacc-line-value {
		font-size: 11px;
	}
	.yacc-line-pct {
		font-size: 9px;
	}
}

/* ------------------------------------------------------------------ */
/*  稀有度散点图 [yacc_rarity_scatter]                                   */
/* ------------------------------------------------------------------ */
.yacc-chart-scatter-body {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
}
.yacc-scatter-svg {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
}
@media (max-width: 640px) {
	.yacc-scatter-svg {
		min-width: 360px;
	}
	.yacc-line-xlabel {
		font-size: 10px;
	}
	.yacc-line-pct {
		font-size: 9px;
	}
}

/* ------------------------------------------------------------------ */
/*  三维散点图 [yacc_rarity_scatter3d]                                   */
/* ------------------------------------------------------------------ */
/* 覆盖 .yacc-chart 的白底/边框/内边距，让 3D 散点图用深色主题 */
.yacc-chart.yacc-chart-scatter3d {
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
}
.yacc-chart-scatter3d .yacc-chart-title {
	color: #e2e8f0;
	margin: 0 0 12px;
	padding: 0 4px;
}
.yacc-chart-scatter3d .yacc-chart-empty {
	color: #94a3b8;
	padding: 40px 0;
	text-align: center;
}
/* full-bleed：突破主题内容容器约束，铺满视口宽度（与 .yacc-grid.yacc-full-bleed 同策略） */
.yacc-chart-scatter3d.yacc-full-bleed {
	width: auto !important;
	max-width: none !important;
	margin-left: calc(-50vw + 50%) !important;
	margin-right: calc(-50vw + 50%) !important;
	padding-left: var(--yacc-full-pad, 24px);
	padding-right: var(--yacc-full-pad, 24px);
	box-sizing: border-box;
}
.yacc-chart-series-icon {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: contain;
	margin: 0 auto 10px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
	padding: 6px;
	/* 系列图标染白 */
	filter: brightness(0) invert(1);
}
/* ============================================================
   3D 散点图：ECharts GL 渲染容器 + 玻璃拟态图例浮层（绝对定位叠加）
   深色主题（背景 #0a0a12 / 文字 slate-200 / 坐标轴 #1e293b）
   结构：wrap（relative，深色背景）> host（absolute 填充，ECharts init 目标）+ legend-card（absolute 浮层）
   注：echarts.init(host) 会清空 host 内子元素，故图例必须为 host 的兄弟节点
   ============================================================ */
.yacc-scatter3d-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 16px;
	background: rgba(10, 10, 18, 0.7);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
	color: #e2e8f0;
	box-sizing: border-box;
}
.yacc-scatter3d-host {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.yacc-scatter3d-host canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

/* 玻璃拟态图例卡片：绝对定位浮层叠加在图表上 */
.yacc-scatter3d-legend-card {
	position: absolute;
	z-index: 20;
	max-height: calc(100% - 24px);
	overflow-y: auto;
	padding: 12px 14px;
	border-radius: 12px;
	background: rgba(15, 18, 28, 0.6);
	border: 1px solid rgba(148, 163, 184, 0.12);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #e2e8f0;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
/* 右上：子分类形状图例 */
.yacc-scatter3d-legend-subs {
	top: 16px;
	right: 16px;
	min-width: 160px;
	max-width: 260px;
}
/* 左下：稀有度颜色图例 */
.yacc-scatter3d-legend-rarities {
	bottom: 16px;
	left: 16px;
	max-width: 260px;
}
.yacc-scatter3d-legend-title {
	font-size: calc(var(--yacc-scatter3d-legend-font, 12px) - 1px);
	font-weight: 600;
	letter-spacing: 0.05em;
	color: #94a3b8;
	margin-bottom: 8px;
	text-transform: uppercase;
}
.yacc-scatter3d-legend-subs .yacc-scatter3d-legend-btn {
	display: flex;
	width: 100%;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border-radius: 8px;
	border: 1px solid transparent;
	background: transparent;
	color: #e2e8f0;
	font-size: var(--yacc-scatter3d-legend-font, 12px);
	line-height: 1.4;
	cursor: pointer;
	transition: opacity 0.18s, background 0.18s, border-color 0.18s;
	text-align: left;
}
.yacc-scatter3d-legend-subs .yacc-scatter3d-legend-btn:hover {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(148, 163, 184, 0.18);
}
.yacc-scatter3d-legend-subs .yacc-scatter3d-legend-btn:not(.active) {
	opacity: 0.35;
}
.yacc-scatter3d-legend-btn .yacc-scatter3d-legend-icon {
	width: var(--yacc-scatter3d-icon-size, 18px);
	height: var(--yacc-scatter3d-icon-size, 18px);
	object-fit: contain;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.05);
	flex: 0 0 var(--yacc-scatter3d-icon-size, 18px);
	/* 白色显示 */
	filter: brightness(0) invert(1);
	opacity: 0.8;
}
.yacc-scatter3d-legend-btn:not(.active) .yacc-scatter3d-legend-icon {
	opacity: 0.35;
}
.yacc-scatter3d-legend-shape {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--yacc-scatter3d-icon-size, 18px);
	height: var(--yacc-scatter3d-icon-size, 18px);
	font-size: calc(var(--yacc-scatter3d-icon-size, 18px) - 4px);
	line-height: 1;
	color: #94a3b8;
	flex: 0 0 var(--yacc-scatter3d-icon-size, 18px);
}
.yacc-scatter3d-legend-btn .yacc-scatter3d-legend-name {
	flex: 1 1 auto;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.yacc-scatter3d-legend-btn .yacc-scatter3d-legend-meta {
	flex: 0 0 auto;
	font-size: calc(var(--yacc-scatter3d-legend-font, 12px) - 1px);
	color: #94a3b8;
}

/* 稀有度图例项（不可点击，仅展示） */
.yacc-scatter3d-legend-rarities .yacc-scatter3d-legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 10px 5px 8px;
	border-left: 3px solid var(--yacc-rarity-color, #9a9a9a);
	border-radius: 4px;
	background: rgba(30, 41, 59, 0.4);
	font-size: var(--yacc-scatter3d-legend-font, 12px);
	margin-bottom: 4px;
}
.yacc-scatter3d-legend-rarities .yacc-scatter3d-legend-item:last-child {
	margin-bottom: 0;
}
.yacc-scatter3d-legend-swatch {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
	flex: 0 0 12px;
}
.yacc-scatter3d-legend-item .yacc-scatter3d-legend-name {
	flex: 1 1 auto;
	font-weight: 600;
}
.yacc-scatter3d-legend-item .yacc-scatter3d-legend-meta {
	flex: 0 0 auto;
	font-size: calc(var(--yacc-scatter3d-legend-font, 12px) - 1px);
	color: #94a3b8;
}

/* 移动端：图例卡片自适应，避免遮挡图表 */
@media (max-width: 640px) {
	/* 移动端隐藏子分类（系列）图例，腾出空间给图表 */
	.yacc-scatter3d-legend-subs {
		display: none !important;
	}
	/* 系列图标 + 标题缩小 */
	.yacc-chart-scatter3d .yacc-chart-series-icon {
		width: 36px;
		height: 36px;
	}
	.yacc-chart-scatter3d .yacc-chart-title {
		font-size: 14px;
		margin-bottom: 8px;
	}
	/* 稀有度图例：移动端移到顶部铺开 */
	.yacc-scatter3d-legend-rarities {
		top: 6px;
		bottom: auto;
		left: 6px;
		right: 6px;
		max-width: none;
		max-height: 32%;
	}
	.yacc-scatter3d-legend-card {
		padding: 6px 8px;
		border-radius: 8px;
	}
	.yacc-scatter3d-legend-title {
		font-size: 10px;
		margin-bottom: 4px;
	}
	.yacc-scatter3d-legend-subs .yacc-scatter3d-legend-btn {
		padding: 3px 6px;
		font-size: 11px;
		gap: 6px;
	}
	.yacc-scatter3d-legend-btn .yacc-scatter3d-legend-icon,
	.yacc-scatter3d-legend-shape {
		width: 16px;
		height: 16px;
		flex: 0 0 16px;
	}
	.yacc-scatter3d-legend-btn .yacc-scatter3d-legend-name {
		font-size: 11px;
	}
	.yacc-scatter3d-legend-btn .yacc-scatter3d-legend-meta {
		font-size: 10px;
	}
	.yacc-scatter3d-legend-rarities .yacc-scatter3d-legend-item {
		font-size: 11px;
		padding: 2px 8px 2px 6px;
		margin-bottom: 2px;
		gap: 6px;
	}
	.yacc-scatter3d-legend-swatch {
		width: 10px;
		height: 10px;
		flex: 0 0 10px;
	}
	/* full-bleed 时移动端两侧 padding 收窄 */
	.yacc-chart-scatter3d.yacc-full-bleed {
		padding-left: var(--yacc-full-pad, 12px);
		padding-right: var(--yacc-full-pad, 12px);
	}
}
/* 超小屏（≤380px）：图例更紧凑 */
@media (max-width: 380px) {
	.yacc-scatter3d-legend-card {
		padding: 5px 6px;
	}
	.yacc-scatter3d-legend-title {
		font-size: 9px;
	}
	.yacc-scatter3d-legend-subs .yacc-scatter3d-legend-btn {
		font-size: 10px;
	}
	.yacc-scatter3d-legend-rarities .yacc-scatter3d-legend-item {
		font-size: 10px;
	}
}



/* 彩色图例：色块加大 + 左侧彩色竖条 + 名称用稀有度色 */
.yacc-chart-legend.yacc-chart-legend-colored li {
	position: relative;
	padding-left: 14px;
	border-left: 3px solid var(--yacc-rarity-color, #9a9a9a);
}
.yacc-chart-legend.yacc-chart-legend-colored .yacc-chart-legend-swatch {
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* ------------------------------------------------------------------ */
/*  稀有卡推荐：卡片网格列表（默认无标题；传 heading 时显示细线小标题）       */
/* ------------------------------------------------------------------ */
.yacc-rare-wrap {
	margin: 30px 0;
	max-width: 100%;
}
/* 整块对齐（align="left|center|right"）：在宽幅/通栏版面内限宽并靠左/居中/靠右 */
.yacc-rare-align-left,
.yacc-rare-align-center,
.yacc-rare-align-right {
	max-width: 1180px;
	box-sizing: border-box;
}
.yacc-rare-align-left {
	margin-left: 0;
	margin-right: auto;
}
.yacc-rare-align-center {
	margin-left: auto;
	margin-right: auto;
}
.yacc-rare-align-right {
	margin-left: auto;
	margin-right: 0;
}
.yacc-rare-head {
	margin: 0 0 6px;
}
.yacc-rare-title {
	margin: 0;
	padding-bottom: 12px;
	font-size: 17px;
	font-weight: 600;
	color: var(--yacc-rare-title-color, #111);
	letter-spacing: 0.04em;
	border-bottom: 1px solid #ececec;
}
.yacc-rare-grid .yacc-card {
	margin: 0;
}
.yacc-rare-wrap .yacc-meta .yacc-name {
	color: var(--yacc-rare-name-color, inherit);
}
.yacc-rare-empty {
	margin: 6px 0 0;
	padding: 14px 16px;
	border: 1px dashed #d9d9d9;
	border-radius: 10px;
	color: #9a6a00;
	background: #fcfaf5;
	font-size: 13px;
}

/* ------------------------------------------------------------------ */
/*  卡牌详情页：购买按钮（加大）+ 入手玩家（头像/昵称）                     */
/* ------------------------------------------------------------------ */
.yacc-detail-buy {
	margin: 22px 0 0;
}
.yacc-detail-buy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	padding: var(--yacc-fe-space-2) 34px;
	background: #111;
	color: #fff;
	border: 1px solid #111;
	border-radius: var(--yacc-fe-radius-pill);
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
	text-decoration: none;
	font-size: var(--yacc-fe-fs-lg);
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.4;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.yacc-detail-buy-btn:hover,
.yacc-detail-buy-btn:focus {
	background: #2b2b2b;
	border-color: #2b2b2b;
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

.yacc-detail-buyers {
	margin: 24px 0 0;
	padding-top: 16px;
	border-top: 1px solid #eee;
}
.yacc-detail-buyers-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}
.yacc-detail-buyers-title {
	font-size: var(--yacc-fe-fs-md);
	font-weight: 600;
	color: #111;
	letter-spacing: 0.04em;
}
.yacc-detail-buyers-count {
	font-size: var(--yacc-fe-fs-sm);
	color: #9a9a9a;
	font-variant-numeric: tabular-nums;
}
.yacc-detail-buyers-list {
	list-style: none;
	margin: var(--yacc-fe-space-2) 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--yacc-fe-space-2) var(--yacc-fe-space-1);
}
.yacc-detail-buyers-list > li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	width: 58px;
	min-width: 0;
}
.yacc-buyer-avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	overflow: hidden;
	background: #f0f0f0;
	flex: 0 0 auto;
}
.yacc-buyer-avatar img.avatar {
	width: 46px;
	height: 46px;
	max-width: 46px;
	max-height: 46px;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}
.yacc-buyer-avatar.yacc-buyer-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #111;
	color: #fff;
	font-size: calc(var(--yacc-fe-fs-base) + 5px);
	font-weight: 600;
}
.yacc-buyer-name {
	max-width: 58px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: var(--yacc-fe-fs-sm);
	color: #555;
	text-align: center;
}
@media (max-width: 560px) {
	.yacc-detail-buy-btn {
		width: 100%;
		min-width: 0;
		padding: 15px 20px;
		font-size: calc(var(--yacc-fe-fs-base) + 4px);
	}
	.yacc-detail-buyers-list > li {
		width: 64px;
	}
	.yacc-buyer-name {
		max-width: 64px;
	}
}
