/* Post Review Module — 好评评分模块
 * 默认方案 auto：背景透明、文字/字体继承主题、叠加层用中性半透明，
 * 浅色与深色主题都能自动适配；也可在设置里固定为浅色卡片 / 深色卡片。
 */

.prm-review {
	/* 可被 .prm-scheme-* 与内联 --prm-accent 覆盖 */
	--prm-accent: #3b6fd4;
	--prm-good: #16a34a;
	--prm-line: rgba(127, 127, 127, 0.18);
	--prm-soft: rgba(127, 127, 127, 0.09);
	--prm-track: rgba(127, 127, 127, 0.22);

	display: flex;
	align-items: center;
	gap: 32px;
	margin: 32px 0;
	padding: 22px 26px;
	background: transparent;
	border: 1px solid var(--prm-line);
	border-radius: 14px;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	line-height: 1.5;
	box-sizing: border-box;
}

.prm-review *,
.prm-review *::before,
.prm-review *::after {
	box-sizing: border-box;
}

/* 结构化数据容器：只承载 meta，不参与布局 */
.prm-review .prm-rating {
	display: none;
}

/* 固定浅色卡片 */
.prm-scheme-light {
	--prm-accent: #3b6fd4;
	--prm-good: #16a34a;
	--prm-line: #eceef1;
	--prm-soft: #eef1f4;
	--prm-track: #e5e7eb;
	background: #f7f8fa;
	color: #1f2937;
}

/* 固定深色卡片 */
.prm-scheme-dark {
	--prm-accent: #6ea8fe;
	--prm-good: #34d399;
	--prm-line: rgba(255, 255, 255, 0.14);
	--prm-soft: rgba(255, 255, 255, 0.06);
	--prm-track: rgba(255, 255, 255, 0.16);
	background: #1b1e23;
	color: #e5e7eb;
}

/* 左侧：标题卡（随机文字，居中大字） */
.prm-left {
	flex: 0 0 210px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: rgb(110 107 107 / 3%);
	border-radius: 10px;
	padding: 16px;
}

/* 文字底样式（被 .prm-left-title-lg 覆盖） */
.prm-left-title {
	font-size: 16px;
	font-weight: 700;
	color: currentColor;
	line-height: 1.3;
}

/* 居中布局 */
.prm-left-bigtext {
	align-items: center;
	justify-content: center;
	text-align: center;
}

/* 左侧大字：随机色（与评分数字同一变量） */
.prm-left-title-lg {
	font-size: 30px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: 0;
	text-align: center;
	color: var(--prm-score-color, var(--prm-accent));
	overflow-wrap: anywhere;
	max-width: 100%;
}

/* 5-8 字：中号 */
.prm-left-title-lg.prm-t-md {
	font-size: 28px;
}

/* 9 字以上：小号 + 最多两行截断，保证不撑坏布局 */
.prm-left-title-lg.prm-t-sm {
	font-size: 15px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

/* 中间：综合评分（居中放大） */
.prm-mid {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.prm-score {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 6px;
}

.prm-score-num {
	font-size: 56px;
	line-height: 1;
	font-weight: 700;
	/* 随机模式下由 --prm-score-color 指定；未指定时回落强调色 */
	color: var(--prm-score-color, var(--prm-accent));
	letter-spacing: -2px;
}

.prm-score-den {
	font-size: 20px;
	font-weight: 600;
	color: currentColor;
	opacity: 0.45;
}

.prm-score-label {
	font-size: 14px;
	color: currentColor;
	opacity: 0.62;
	margin-left: 12px;
}

/* 右侧：摘要 + 进度条 */
.prm-right {
	flex: 0 0 260px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
}

.prm-summary {
	font-size: 15px;
	font-weight: 700;
	color: currentColor;
}

.prm-bar {
	height: 10px;
	border-radius: 999px;
	background: var(--prm-track);
	overflow: hidden;
}

.prm-bar span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #34d399, #10b981);
}

/* 响应式：窄屏纵向堆叠 */
@media (max-width: 768px) {
	.prm-review {
		flex-direction: column;
		align-items: stretch;
		gap: 18px;
		padding: 18px;
	}

	.prm-left {
		flex: none;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.prm-right {
		flex: none;
	}

	.prm-score-num {
		font-size: 44px;
		letter-spacing: -1px;
	}

	.prm-score-den {
		font-size: 16px;
	}

	/* 大字模式：窄屏居中 */
	.prm-left-bigtext {
		flex: none;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 12px;
	}

	.prm-left-title-lg {
		font-size: 28px;
	}

	.prm-left-title-lg.prm-t-md {
		font-size: 28px;
	}

	.prm-left-title-lg.prm-t-sm {
		font-size: 15px;
	}
}
