/* Prompt 详情 — 左中右布局 */
.yw-prompt-single {
	padding-bottom: 48px;
	background: linear-gradient(180deg, #f8faff 0%, var(--yw-bg) 220px);
}

.yw-prompt-single__grid {
	align-items: start;
}

.yw-prompt-single__nav,
.yw-prompt-single__aside {
	max-height: calc(100vh - 100px);
	overflow: auto;
}

.yw-prompt-single__main {
	min-width: 0;
}

.yw-prompt-single__main .yw-breadcrumbs {
	margin-bottom: 16px;
}

.yw-prompt-single__article {
	background: var(--yw-surface);
	border: 1px solid var(--yw-border);
	border-radius: 20px;
	box-shadow: var(--yw-shadow);
	overflow: hidden;
}

.yw-prompt-single__hero {
	padding: 24px 24px 20px;
	border-bottom: 1px solid var(--yw-border);
}

.yw-prompt-single__crumb {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--yw-muted);
}

.yw-prompt-single__crumb a {
	color: var(--yw-primary-dark);
	text-decoration: none;
}

.yw-prompt-single__crumb a:hover {
	text-decoration: underline;
}

.yw-prompt-single__crumb-sep {
	margin: 0 6px;
	opacity: 0.5;
}

.yw-prompt-single__title-row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 8px;
}

.yw-prompt-single__brand {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: linear-gradient(135deg, #eef2ff, #f5f3ff);
	font-size: 22px;
	line-height: 1;
}

.yw-prompt-single__title {
	margin: 0;
	font-size: clamp(24px, 3vw, 32px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.03em;
}

.yw-prompt-single__excerpt {
	margin: 14px 0 0;
	font-size: 15px;
	line-height: 1.65;
	color: #475569;
}

.yw-prompt-single__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.yw-prompt-single__cover {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 14px;
	object-fit: cover;
	border: 1px solid var(--yw-border);
}

.yw-prompt-single__params {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 20px 48px;
	margin: 20px 0 0;
	padding: 0;
}

.yw-prompt-single__param {
	margin: 0;
	min-width: 0;
	flex: 0 0 auto;
}

.yw-prompt-single__param-label {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: #94a3b8;
}

.yw-prompt-single__param-value {
	display: block;
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: #1e293b;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.yw-prompt-single__prompt-section,
.yw-prompt-single__steps,
.yw-prompt-single__content,
.yw-prompt-single__vars-section,
.yw-prompt-single__keywords,
.yw-prompt-single__comments {
	padding: 24px;
	border-top: 1px solid var(--yw-border);
}

.yw-prompt-single__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.yw-prompt-single__section-title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.yw-prompt-single__section-head .yw-prompt-single__section-title {
	margin-bottom: 0;
}

.yw-prompt-single__blocks {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.yw-prompt-single__block-title {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 700;
	color: var(--yw-text);
}

.yw-prompt-single__box {
	margin: 0;
	position: relative;
	padding: 0;
	overflow: hidden;
}

.yw-prompt-box__toolbar {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(0, 0, 0, 0.2);
}

.yw-prompt-single__box .yw-prompt-box__copy {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	font-size: 13px;
	border-color: rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.1);
	transition: background 0.15s ease, border-color 0.15s ease;
}

.yw-prompt-single__box .yw-prompt-box__copy:hover {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.35);
}

.yw-prompt-single__box .yw-prompt-box__copy.is-copied {
	background: rgba(34, 197, 94, 0.22);
	border-color: rgba(34, 197, 94, 0.45);
}

.yw-prompt-single__section-head .yw-copy.is-copied {
	background: #16a34a;
	border-color: #16a34a;
}

.yw-prompt-single__box .yw-prompt-box__pre {
	margin: 0;
	padding: 16px 18px;
	max-height: 420px;
	overflow: auto;
	white-space: pre-wrap;
	word-break: break-word;
	overflow-wrap: anywhere;
	line-height: 1.65;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	tab-size: 4;
}

.yw-prompt-single__vars-section .yw-prompt-single__section-title {
	margin-bottom: 12px;
}

.yw-prompt-single__vars-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.yw-prompt-single__var {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #334155;
	font-size: 12px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	white-space: nowrap;
}

.yw-prompt-single__keywords-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.yw-prompt-box__lang {
	font-size: 12px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.65);
	margin-right: auto;
}

.yw-prompt-single__steps-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 14px;
}

.yw-prompt-single__step {
	border: 1px solid var(--yw-border);
	border-radius: 14px;
	padding: 14px 16px;
	background: #fafbff;
}

.yw-prompt-single__step-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

.yw-prompt-single__step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--yw-primary), #7c3aed);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	flex: 0 0 auto;
}

.yw-prompt-single__step-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
}

.yw-prompt-single__step-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #475569;
}

.yw-prompt-single__comments .yw-comments {
	margin-top: 0;
}

.yw-prompt-single__back {
	margin: 16px 0 0;
}

/* 左侧导航 */
.yw-prompt-single__siblings .yw-aside-list__link {
	align-items: flex-start;
}

.yw-prompt-single__sibling-label {
	flex: 1;
	min-width: 0;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* 右侧栏：外层 .yw-aside 为唯一卡片，内层 __aside-card 仅作分区 */
.yw-prompt-single__aside.yw-aside {
	padding: 0;
	overflow: hidden;
}

.yw-prompt-single__aside-card {
	padding: 16px 18px;
	margin-bottom: 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	border-bottom: 1px solid var(--yw-border);
}

.yw-prompt-single__aside-card:last-of-type {
	border-bottom: 0;
}

.yw-prompt-single__aside > .yw-aside__cta.yw-prompt-sidebar__cta {
	margin: 0;
	border-top: 1px solid var(--yw-border);
	border-radius: 0;
}

.yw-prompt-single__aside-title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 800;
}

.yw-prompt-single__aside-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.yw-prompt-single__aside-head .yw-prompt-single__aside-title {
	margin: 0;
}

.yw-prompt-single__aside-kv {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 10px;
}

.yw-prompt-single__aside-kv li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 13px;
}

.yw-prompt-single__aside-kv span {
	color: var(--yw-muted);
}

.yw-prompt-single__aside-kv strong {
	font-weight: 700;
	color: var(--yw-text);
}

.yw-prompt-single__aside-tags {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--yw-border);
	display: grid;
	gap: 10px;
}

.yw-prompt-single__aside-tag-group {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.yw-prompt-single__aside-tags-label {
	flex-shrink: 0;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--yw-muted);
}

.yw-prompt-single__tag-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
}

.yw-prompt-single__tag {
	display: inline-flex;
	padding: 4px 10px;
	border-radius: 999px;
	background: #eef2ff;
	color: var(--yw-primary-dark);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
}

.yw-prompt-single__tag:hover {
	background: #e0e7ff;
}

.yw-prompt-single__tag--scene {
	background: #f0fdf4;
	color: #166534;
}

.yw-prompt-single__tool-list,
.yw-prompt-single__related {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 8px;
}

.yw-prompt-single__tool,
.yw-prompt-single__related-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: background 0.15s ease;
}

.yw-prompt-single__tool:hover,
.yw-prompt-single__related-link:hover {
	background: #f8fafc;
}

.yw-prompt-single__tool-logo {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	overflow: hidden;
	background: #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: center;
}

.yw-prompt-single__tool-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.yw-prompt-single__tool-ph {
	font-weight: 800;
	color: var(--yw-primary);
}

.yw-prompt-single__tool-body,
.yw-prompt-single__related-body {
	min-width: 0;
	flex: 1;
}

.yw-prompt-single__tool-name,
.yw-prompt-single__related-title {
	display: block;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

.yw-prompt-single__tool-meta,
.yw-prompt-single__related-meta {
	display: block;
	margin-top: 2px;
	font-size: 11px;
	color: var(--yw-muted);
}

.yw-prompt-single__related-ico {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: #f8fafc;
	font-size: 16px;
}

@media (max-width: 640px) {
	.yw-prompt-single__hero,
	.yw-prompt-single__prompt-section,
	.yw-prompt-single__steps,
	.yw-prompt-single__content,
	.yw-prompt-single__vars-section,
	.yw-prompt-single__keywords,
	.yw-prompt-single__comments {
		padding: 18px 16px;
	}

	.yw-prompt-single__params {
		gap: 16px 28px;
	}

	.yw-prompt-single__param-value {
		font-size: 16px;
	}

	.yw-prompt-single__section-head {
		flex-direction: column;
		align-items: stretch;
	}

	.yw-prompt-single__section-head .yw-btn {
		width: 100%;
	}
}

@media (max-width: 1080px) {
	.yw-prompt-single__grid {
		grid-template-columns: 1fr;
	}

	.yw-prompt-single__nav,
	.yw-prompt-single__aside {
		max-height: none;
		overflow: visible;
	}

	.yw-prompt-single__main {
		order: 1;
	}

	.yw-prompt-single__nav {
		order: 2;
	}

	.yw-prompt-single__aside {
		order: 3;
	}
}

@media (max-width: 720px) {
	.yw-prompt-single__hero,
	.yw-prompt-single__prompt-section,
	.yw-prompt-single__steps,
	.yw-prompt-single__content,
	.yw-prompt-single__author,
	.yw-prompt-single__comments {
		padding-left: 16px;
		padding-right: 16px;
	}

	.yw-prompt-single__hero {
		padding-top: 18px;
		padding-bottom: 16px;
	}
}
