/**
 * 合集前台：正文栏与工具卡同宽（卡 = max-w-3xl = 48rem）
 * + 引用卡下半截折叠（优缺点/截图）与评分高斯模糊
 * 整页 .mytb-coll-body + 悬浮面板共用，不依赖主题 rebuild。
 */
.mytb-coll-body .entry-content {
	max-width: 48rem;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

/* —— 合集引用卡折叠（PHP 整页态原生 details） ——
 * WHY 收起时禁止 display:flex：flex 会破坏 details 原生隐藏，
 * 导致未 open 时优缺点仍露出、分数却一直糊（2026-07-20）。
 */
.mytb-card-fold {
	display: block;
}

.mytb-card-fold[open] {
	display: flex;
	flex-direction: column;
}

.mytb-card-fold[open] > .mytb-card-fold__body {
	order: 1;
}

.mytb-card-fold[open] > .mytb-card-fold__toggle {
	order: 2;
}

.mytb-card-fold > .mytb-card-fold__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.625rem 0;
	cursor: pointer;
	list-style: none;
}

.mytb-card-fold > .mytb-card-fold__toggle::-webkit-details-marker,
.mytb-card-fold > .mytb-card-fold__toggle::marker {
	display: none;
	content: '';
}

/* 红底圆 + 白三角（对齐官网下载按钮 primary-500 #E03030） */
.mytb-card-fold__chevron {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 9999px;
	background: #e03030;
	color: #fff;
	transition: transform 0.2s ease;
}

.mytb-card-fold__chevron::after {
	content: '';
	display: block;
	width: 8px;
	height: 8px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg);
	margin-top: -3px;
}

.mytb-card-fold[open] > .mytb-card-fold__toggle .mytb-card-fold__chevron {
	transform: rotate(180deg);
}

.mytb-card-fold[open] > .mytb-card-fold__toggle .mytb-card-fold__chevron::after {
	margin-top: 3px;
}

/* 评分触发：仅 details 收起时糊（React 面板用自身 blur class，勿用 :has(.mytb-card-fold)）
 * WHY flex-end：详情条带三维条时环+条贴卡右缘，与左侧 logo 对称（居中会让环比条更靠内，右白边显大） */
.mytb-card-fold-score {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
	flex-shrink: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	transition: filter 0.2s ease, opacity 0.2s ease;
}

.mytb-card-mini-wrap:has(details.mytb-card-fold:not([open])) .mytb-card-fold-score,
.mytb-card-detail-wrap:has(details.mytb-card-fold:not([open])) .mytb-card-fold-score {
	filter: blur(5px);
	opacity: 0.85;
	user-select: none;
}

.mytb-card-mini-wrap:has(details.mytb-card-fold[open]) .mytb-card-fold-score,
.mytb-card-detail-wrap:has(details.mytb-card-fold[open]) .mytb-card-fold-score {
	filter: none;
	opacity: 1;
}

.mytb-card-fold-score:focus-visible {
	outline: 2px solid rgba(224, 48, 48, 0.4);
	outline-offset: 2px;
	border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.mytb-card-fold__chevron,
	.mytb-card-fold-score {
		transition: none;
	}
}
