/* CP Reader 对话阅读样式 */

.cprt-reader {
	max-width: 720px;
	margin: 0 auto;
}

/* 场景标题 */
.cpr-scene-head { text-align: center; margin: 6px 0 26px; }
.cpr-scene-head h2 {
	margin: 0;
	font-size: 22px;
	letter-spacing: 2px;
	position: relative;
	display: inline-block;
}
.cpr-scene-head h2::before,
.cpr-scene-head h2::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 34px;
	height: 1px;
	background: var(--line);
}
.cpr-scene-head h2::before { right: calc(100% + 14px); }
.cpr-scene-head h2::after { left: calc(100% + 14px); }

/* 旁白 */
.cpr-narr {
	text-align: center;
	margin: 24px auto;
	max-width: 88%;
	color: #8a80b5;
	font-size: 13.5px;
	line-height: 2;
}
.cpr-narr span { display: inline-block; }

/* 对话气泡 */
.cpr-msg {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 16px 0;
	animation: cpr-in .3s ease both;
}
@keyframes cpr-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}
.cpr-msg.left { flex-direction: row; }
.cpr-msg.right { flex-direction: row-reverse; }

.cpr-avatar {
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
}
.cpr-avatar-img,
.cpr-avatar-initial {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	object-fit: cover;
	box-shadow: 0 2px 6px rgba(45, 42, 53, .12);
}
.cpr-avatar-initial {
	background: linear-gradient(135deg, hsl(var(--hue), 70%, 66%), hsl(var(--hue), 70%, 52%));
	color: #fff;
	font-size: 19px;
	font-weight: 700;
}

.cpr-msg-main { max-width: 76%; }
.cpr-name {
	font-size: 12px;
	font-weight: 700;
	color: hsl(var(--hue), 55%, 45%);
	margin: 0 6px 5px;
	letter-spacing: .5px;
}
.cpr-msg.right .cpr-name { text-align: right; }

.cpr-bubble {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 10px 15px;
	line-height: 1.85;
	font-size: 15px;
	box-shadow: 0 1px 3px rgba(45, 42, 53, .05);
	word-break: break-word;
}
.cpr-msg.left .cpr-bubble { border-top-left-radius: 5px; }
.cpr-msg.right .cpr-bubble {
	border-top-right-radius: 5px;
	background: rgba(124, 92, 255, .1);
	border-color: #e3dbff;
}

/* 选项卡片 */
.cpr-choices {
	margin-top: 34px;
	border-top: 1px dashed #dcd4f5;
	padding-top: 22px;
}
.cpr-choices-hint {
	text-align: center;
	color: #b3aab8;
	font-size: 12.5px;
	letter-spacing: 3px;
	margin: 0 0 18px;
}
.cpr-choice {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--surface);
	border: 1.5px solid var(--line);
	border-radius: 14px;
	padding: 13px 16px;
	margin-bottom: 12px;
	text-decoration: none;
	color: var(--ink);
	transition: all .16s ease;
	cursor: pointer;
}
a.cpr-choice:hover {
	border-color: var(--accent);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(124, 92, 255, .16);
}
.cpr-choice-tag {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ece7ff;
	color: var(--accent-dark);
	font-weight: 800;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .16s ease;
}
a.cpr-choice:hover .cpr-choice-tag { background: var(--accent); color: #fff; }
.cpr-choice-text { flex: 1; font-size: 15px; }
.cpr-choice-text em {
	font-style: normal;
	font-size: 12px;
	color: #b3aab8;
	margin-left: 4px;
}
.cpr-choice.cpr-choice-end { opacity: .8; cursor: default; }

.cpr-end-card {
	text-align: center;
	color: #b3aab8;
	letter-spacing: 5px;
	font-size: 13px;
	margin: 26px 0 14px;
}
.cpr-restart {
	display: block;
	text-align: center;
	color: var(--accent);
	font-weight: 600;
	text-decoration: none;
	font-size: 14px;
	margin: 8px auto 0;
}
.cpr-restart:hover { text-decoration: underline; }

.cpr-empty {
	text-align: center;
	color: var(--muted);
	padding: 60px 0;
}

/* 加载动画 */
.cpr-loading {
	text-align: center;
	color: var(--muted);
	padding: 40px 0;
	font-size: 14px;
}
.cpr-loading::before {
	content: "";
	display: inline-block;
	width: 18px;
	height: 18px;
	margin-right: 8px;
	vertical-align: -3px;
	border: 2.5px solid #e4dcff;
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: cpr-spin .7s linear infinite;
}
@keyframes cpr-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
	.cpr-avatar { flex-basis: 38px; width: 38px; height: 38px; }
	.cpr-msg-main { max-width: 80%; }
	.cpr-bubble { font-size: 14.5px; }
	.cpr-scene-head h2::before, .cpr-scene-head h2::after { width: 20px; }
}
