/* AI Playground · 强赛博朋克沙箱 */
.lx-pg {
	--pg-bg: #03050c;
	--pg-panel: rgba(6, 12, 26, 0.72);
	--pg-line: rgba(0, 255, 240, 0.28);
	--pg-cyan: #00fff0;
	--pg-violet: #8b5cff;
	--pg-pink: #ff2bd6;
	--pg-text: #e8f7ff;
	--pg-muted: #8aa0b8;
	--pg-radius: 14px;
	--pg-scroll-thumb: rgba(0, 255, 240, 0.55);
	--pg-scroll-thumb-hover: rgba(0, 255, 240, 0.85);
	--pg-scroll-track: rgba(8, 12, 24, 0.55);
	position: relative;
	color: var(--pg-text);
	font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	margin: 0 auto;
	max-width: 1400px;
	padding: 14px 12px 24px;
	min-height: 72vh;
	display: flex;
	flex-direction: column;
	isolation: isolate;
}

/* 背景 FX */
.lx-pg__fx {
	pointer-events: none;
	position: absolute;
	inset: -12px;
	z-index: 0;
	overflow: hidden;
}
.lx-pg__fx-grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(0, 255, 240, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 255, 240, 0.04) 1px, transparent 1px);
	background-size: 32px 32px;
	mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, #000 15%, transparent 75%);
	animation: lx-pg-grid 18s linear infinite;
}
.lx-pg__fx-glow {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 50% 40% at 10% 0%, rgba(0, 255, 240, 0.14), transparent 55%),
		radial-gradient(ellipse 45% 35% at 90% 5%, rgba(255, 43, 214, 0.12), transparent 50%),
		radial-gradient(ellipse 40% 30% at 50% 100%, rgba(139, 92, 255, 0.1), transparent 55%);
}
@keyframes lx-pg-grid {
	to { background-position: 0 32px, 32px 0; }
}
.lx-pg > *:not(.lx-pg__fx):not(.lx-pg__glow) { position: relative; z-index: 1; }

/* 游客门禁 */
.lx-pg.is-guest .lx-pg__composer.is-locked {
	position: relative;
}
.lx-pg__gate {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px;
	border-radius: 14px;
	background: rgba(2, 6, 16, 0.72);
	border: 1px solid rgba(0, 255, 240, 0.25);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	text-align: center;
}
.lx-pg__gate-ic {
	font-size: 22px;
	filter: drop-shadow(0 0 10px rgba(0, 255, 240, 0.45));
}
.lx-pg__gate p {
	margin: 0;
	font-size: 13.5px;
	color: #c5d5e8;
	font-weight: 600;
}

/* 赛博细滚动条（Firefox + WebKit） */
.lx-pg__scroll,
.lx-pg__agents,
.lx-pg__msgs,
.lx-pg__art-body,
.lx-pg__artifact-body,
.lx-pg__sample-out,
.lx-pg__rate-comments,
.lx-pg__bubble pre {
	scrollbar-width: thin;
	scrollbar-color: var(--pg-scroll-thumb) var(--pg-scroll-track);
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.lx-pg__scroll::-webkit-scrollbar,
.lx-pg__agents::-webkit-scrollbar,
.lx-pg__msgs::-webkit-scrollbar,
.lx-pg__art-body::-webkit-scrollbar,
.lx-pg__artifact-body::-webkit-scrollbar,
.lx-pg__sample-out::-webkit-scrollbar,
.lx-pg__rate-comments::-webkit-scrollbar,
.lx-pg__bubble pre::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

.lx-pg__scroll::-webkit-scrollbar-track,
.lx-pg__agents::-webkit-scrollbar-track,
.lx-pg__msgs::-webkit-scrollbar-track,
.lx-pg__art-body::-webkit-scrollbar-track,
.lx-pg__artifact-body::-webkit-scrollbar-track,
.lx-pg__sample-out::-webkit-scrollbar-track,
.lx-pg__rate-comments::-webkit-scrollbar-track,
.lx-pg__bubble pre::-webkit-scrollbar-track {
	margin: 3px 0;
	background: var(--pg-scroll-track);
	border-radius: 999px;
	box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.06);
}

.lx-pg__scroll::-webkit-scrollbar-thumb,
.lx-pg__agents::-webkit-scrollbar-thumb,
.lx-pg__msgs::-webkit-scrollbar-thumb,
.lx-pg__art-body::-webkit-scrollbar-thumb,
.lx-pg__artifact-body::-webkit-scrollbar-thumb,
.lx-pg__sample-out::-webkit-scrollbar-thumb,
.lx-pg__rate-comments::-webkit-scrollbar-thumb,
.lx-pg__bubble pre::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, rgba(34, 211, 238, 0.75), rgba(167, 139, 250, 0.65));
	border-radius: 999px;
	border: 1px solid rgba(165, 243, 252, 0.22);
	box-shadow: 0 0 8px rgba(34, 211, 238, 0.28);
}

.lx-pg__scroll::-webkit-scrollbar-thumb:hover,
.lx-pg__agents::-webkit-scrollbar-thumb:hover,
.lx-pg__msgs::-webkit-scrollbar-thumb:hover,
.lx-pg__art-body::-webkit-scrollbar-thumb:hover,
.lx-pg__artifact-body::-webkit-scrollbar-thumb:hover,
.lx-pg__sample-out::-webkit-scrollbar-thumb:hover,
.lx-pg__rate-comments::-webkit-scrollbar-thumb:hover,
.lx-pg__bubble pre::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(180deg, #22d3ee, #a78bfa);
	box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}

.lx-pg__scroll::-webkit-scrollbar-corner,
.lx-pg__agents::-webkit-scrollbar-corner,
.lx-pg__msgs::-webkit-scrollbar-corner,
.lx-pg__art-body::-webkit-scrollbar-corner,
.lx-pg__artifact-body::-webkit-scrollbar-corner,
.lx-pg__sample-out::-webkit-scrollbar-corner,
.lx-pg__rate-comments::-webkit-scrollbar-corner,
.lx-pg__bubble pre::-webkit-scrollbar-corner {
	background: transparent;
}

.lx-pg__glow {
	pointer-events: none;
	position: absolute;
	inset: -20px;
	background:
		radial-gradient(ellipse 50% 40% at 10% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
		radial-gradient(ellipse 45% 35% at 90% 10%, rgba(167, 139, 250, 0.14), transparent 50%),
		radial-gradient(ellipse 40% 30% at 50% 100%, rgba(244, 114, 182, 0.08), transparent 55%);
	z-index: 0;
}

.lx-pg > *:not(.lx-pg__glow) {
	position: relative;
	z-index: 1;
}

/* Top bar */
.lx-pg__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border: 1px solid var(--pg-line);
	border-radius: var(--pg-radius);
	background:
		linear-gradient(135deg, rgba(0, 255, 240, 0.08) 0%, transparent 42%),
		linear-gradient(320deg, rgba(255, 43, 214, 0.07) 0%, transparent 48%),
		rgba(4, 8, 18, 0.75);
	box-shadow:
		0 0 0 1px rgba(139, 92, 255, 0.08) inset,
		0 12px 40px rgba(0, 0, 0, 0.4),
		0 0 28px rgba(0, 255, 240, 0.06);
	margin-bottom: 12px;
	backdrop-filter: blur(10px);
}

.lx-pg__brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.lx-pg__logo {
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	font-size: 24px;
	border-radius: 12px;
	background: linear-gradient(145deg, rgba(34, 211, 238, 0.2), rgba(167, 139, 250, 0.25));
	border: 1px solid rgba(34, 211, 238, 0.35);
	box-shadow: 0 0 20px rgba(34, 211, 238, 0.25);
}

.lx-pg__brand-title {
	font-weight: 900;
	font-size: 17px;
	letter-spacing: 0.06em;
	background: linear-gradient(90deg, #67e8f9, #e0f2fe, #f0abfc, #67e8f9);
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: lx-pg-shine 5s linear infinite;
}
@keyframes lx-pg-shine {
	to { background-position: 200% center; }
}

.lx-pg__brand-sub {
	font-size: 10.5px;
	font-family: Orbitron, ui-monospace, monospace;
	letter-spacing: 0.14em;
	color: rgba(0, 255, 240, 0.65);
	margin-top: 3px;
	font-weight: 700;
}

.lx-pg__top-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.lx-pg__quota,
.lx-pg__rounds {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--pg-muted);
	padding: 6px 10px;
	border-radius: 999px;
	border: 1px solid rgba(148, 163, 184, 0.2);
	background: rgba(15, 23, 42, 0.6);
}

.lx-pg__quota-val {
	color: var(--pg-cyan);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.lx-pg__bar {
	width: 72px;
	height: 6px;
	border-radius: 99px;
	background: rgba(148, 163, 184, 0.2);
	overflow: hidden;
}

.lx-pg__bar > i {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--pg-cyan), var(--pg-violet));
	border-radius: 99px;
	transition: width 0.35s ease;
}

/* Buttons */
.lx-pg__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	border: 1px solid rgba(0, 255, 240, 0.22);
	cursor: pointer;
	text-decoration: none !important;
	line-height: 1.2;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s;
	color: var(--pg-text);
	background: rgba(0, 255, 240, 0.06);
}

.lx-pg__btn:hover {
	transform: translateY(-1px);
	border-color: rgba(0, 255, 240, 0.5);
	box-shadow: 0 0 14px rgba(0, 255, 240, 0.15);
}

.lx-pg__btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.lx-pg__btn--primary {
	background: linear-gradient(135deg, rgba(0, 255, 240, 0.22), rgba(139, 92, 255, 0.35));
	border-color: rgba(0, 255, 240, 0.45);
	color: #a5f3fc;
}

.lx-pg__btn--cta {
	background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 52%, #6d28d9 100%);
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	border: none;
	font-weight: 800;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
	box-shadow: 0 4px 16px rgba(29, 78, 216, 0.42);
}

.lx-pg__btn--ghost {
	background: transparent;
	border-color: rgba(148, 163, 184, 0.3);
	color: var(--pg-muted);
}

.lx-pg__btn--soft {
	background: rgba(167, 139, 250, 0.12);
	border-color: rgba(167, 139, 250, 0.35);
	color: #ddd6fe;
}

.lx-pg__btn--send {
	min-width: 88px;
	background: linear-gradient(135deg, #0e7490, #6d28d9);
	color: #fff;
	border: none;
	font-weight: 800;
	box-shadow: 0 0 18px rgba(0, 255, 240, 0.2);
}

/* Notice / 旧升级 CTA：默认隐藏 */
.lx-pg__notice,
.lx-pg__cta-banner,
.lx-pg__art-cta,
.lx-och-upgrade-bar,
.lx-pg__qa-bar {
	display: none !important;
}

.lx-pg__notice-legacy {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 14px;
	margin-bottom: 10px;
	border-radius: 10px;
	font-size: 12.5px;
	line-height: 1.5;
	color: #c4b5fd;
	background: rgba(76, 29, 149, 0.25);
	border: 1px solid rgba(167, 139, 250, 0.3);
}

.lx-pg__notice strong {
	color: #e9d5ff;
}

.lx-pg__notice-x {
	margin-left: auto;
	background: none;
	border: none;
	color: #a78bfa;
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
}

/* Layout：桌面端锁视口高度，面板内滚动，避免整页长条滚动 */
.lx-pg__layout {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr) 300px;
	gap: 10px;
	/* 顶栏+导航约占 140–200px；min 保证矮屏可用 */
	height: clamp(560px, calc(100vh - 168px), 920px);
	max-height: calc(100vh - 148px);
	min-height: 560px;
	flex: 1 1 auto;
}

.lx-pg__side,
.lx-pg__main,
.lx-pg__art {
	border: 1px solid var(--pg-line);
	border-radius: var(--pg-radius);
	background:
		linear-gradient(160deg, rgba(0, 255, 240, 0.05) 0%, transparent 40%),
		rgba(4, 8, 18, 0.65);
	backdrop-filter: blur(8px);
	box-shadow:
		0 0 0 1px rgba(139, 92, 255, 0.06) inset,
		0 10px 36px rgba(0, 0, 0, 0.35);
	min-height: 0;
}

/* Side agents */
.lx-pg__side {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0;
}

.lx-pg__side-h {
	padding: 12px 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pg-muted);
	border-bottom: 1px solid rgba(34, 211, 238, 0.12);
}

.lx-pg__agents {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overflow-x: hidden;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	/* 内容区预留滚动条槽，减少布局跳动 */
	scrollbar-gutter: stable;
}

.lx-pg__agent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	text-align: left;
	padding: 10px;
	border-radius: 12px;
	border: 1px solid rgba(0, 255, 240, 0.12);
	background: rgba(0, 0, 0, 0.28);
	color: inherit;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.lx-pg__agent:hover {
	border-color: color-mix(in srgb, var(--ag, var(--pg-cyan)) 55%, transparent);
	background: rgba(0, 255, 240, 0.05);
	transform: translateX(2px);
}

.lx-pg__agent.is-on {
	border-color: var(--ag, var(--pg-cyan));
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--ag, var(--pg-cyan)) 35%, transparent),
		0 0 22px color-mix(in srgb, var(--ag, var(--pg-cyan)) 22%, transparent);
	background: linear-gradient(135deg, rgba(4, 10, 22, 0.95), color-mix(in srgb, var(--ag, var(--pg-cyan)) 14%, transparent));
}

.lx-pg__agent-icon {
	font-size: 22px;
	line-height: 1;
	filter: drop-shadow(0 0 8px color-mix(in srgb, var(--ag, var(--pg-cyan)) 50%, transparent));
}

.lx-pg__agent-name {
	display: block;
	font-weight: 700;
	font-size: 13.5px;
}

.lx-pg__agent-tag {
	display: block;
	font-size: 11px;
	color: var(--pg-muted);
	margin-top: 2px;
	line-height: 1.35;
}

.lx-pg__side-foot {
	padding: 10px 12px;
	border-top: 1px solid rgba(34, 211, 238, 0.12);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.lx-pg__side-foot a {
	font-size: 12px;
	color: var(--pg-cyan);
	text-decoration: none;
}

.lx-pg__side-foot a:hover {
	text-decoration: underline;
}

/* Main chat */
.lx-pg__main {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

.lx-pg__chat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 14px;
	border-bottom: 1px solid rgba(34, 211, 238, 0.12);
}

.lx-pg__agent-now {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.lx-pg__agent-now-icon {
	font-size: 26px;
}

.lx-pg__agent-now-name {
	font-weight: 800;
	font-size: 15px;
}

.lx-pg__agent-now-sub {
	font-size: 12px;
	color: var(--pg-muted);
}

.lx-pg__msgs {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overflow-x: hidden;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-behavior: smooth;
	scrollbar-gutter: stable;
	background:
		linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
	background-size: 24px 24px;
}

.lx-pg__welcome {
	margin: auto;
	text-align: center;
	max-width: 520px;
	padding: 24px 12px;
}

.lx-pg__welcome-orb {
	width: 64px;
	height: 64px;
	margin: 0 auto 12px;
	display: grid;
	place-items: center;
	font-size: 28px;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, #f0abfc, #6366f1 60%, #0ea5e9);
	box-shadow: 0 0 40px rgba(99, 102, 241, 0.45);
	animation: lx-pg-pulse 2.2s ease-in-out infinite;
}

@keyframes lx-pg-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.05); }
}

.lx-pg__welcome h2 {
	margin: 0 0 8px;
	font-size: 22px;
	background: linear-gradient(90deg, #67e8f9, #e9d5ff);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lx-pg__welcome p {
	margin: 0 0 16px;
	color: var(--pg-muted);
	font-size: 14px;
}

.lx-pg__welcome-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.lx-pg__wcard {
	padding: 10px;
	border-radius: 12px;
	border: 1px solid rgba(34, 211, 238, 0.2);
	background: rgba(15, 23, 42, 0.65);
	cursor: pointer;
	text-align: left;
	color: inherit;
	transition: border-color 0.15s, transform 0.15s;
}

.lx-pg__wcard:hover {
	border-color: var(--pg-cyan);
	transform: translateY(-2px);
}

.lx-pg__wcard strong {
	display: block;
	font-size: 13px;
	margin-bottom: 4px;
}

.lx-pg__wcard span {
	font-size: 11px;
	color: var(--pg-muted);
}

/* Bubbles */
.lx-pg__msg {
	display: flex;
	gap: 10px;
	max-width: 92%;
	animation: lx-pg-in 0.25s ease;
}

@keyframes lx-pg-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

.lx-pg__msg--user {
	align-self: flex-end;
	flex-direction: row-reverse;
}

.lx-pg__msg-avatar {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	font-size: 16px;
	flex-shrink: 0;
	background: rgba(34, 211, 238, 0.12);
	border: 1px solid rgba(34, 211, 238, 0.25);
}

.lx-pg__msg--user .lx-pg__msg-avatar {
	background: rgba(244, 114, 182, 0.15);
	border-color: rgba(244, 114, 182, 0.3);
}

.lx-pg__bubble {
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.65;
	border: 1px solid rgba(34, 211, 238, 0.15);
	background: rgba(15, 23, 42, 0.85);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	word-break: break-word;
}

.lx-pg__msg--user .lx-pg__bubble {
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(236, 72, 153, 0.2));
	border-color: rgba(244, 114, 182, 0.3);
}

.lx-pg__bubble h1,
.lx-pg__bubble h2,
.lx-pg__bubble h3,
.lx-pg__bubble h4 {
	margin: 0.6em 0 0.35em;
	line-height: 1.3;
	color: #e0f2fe;
}

.lx-pg__bubble p {
	margin: 0.4em 0;
}

.lx-pg__bubble ul,
.lx-pg__bubble ol {
	margin: 0.4em 0;
	padding-left: 1.3em;
}

.lx-pg__bubble code {
	font-family: ui-monospace, Consolas, monospace;
	font-size: 0.9em;
	padding: 1px 5px;
	border-radius: 4px;
	background: rgba(34, 211, 238, 0.1);
	color: #a5f3fc;
}

.lx-pg__bubble pre {
	overflow: auto;
	padding: 10px;
	border-radius: 8px;
	background: #0b1220;
	border: 1px solid rgba(34, 211, 238, 0.15);
	font-size: 12.5px;
}

.lx-pg__bubble table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12.5px;
	margin: 8px 0;
}

.lx-pg__bubble th,
.lx-pg__bubble td {
	border: 1px solid rgba(148, 163, 184, 0.25);
	padding: 6px 8px;
	text-align: left;
}

.lx-pg__bubble th {
	background: rgba(34, 211, 238, 0.08);
	color: #a5f3fc;
}

.lx-pg__bubble blockquote {
	margin: 8px 0;
	padding: 6px 12px;
	border-left: 3px solid var(--pg-violet);
	color: var(--pg-muted);
	background: rgba(167, 139, 250, 0.06);
}

.lx-pg__bubble .lx-pg__wm {
	margin-top: 8px;
	font-size: 11px;
	color: #64748b;
}

/* Tool cards */
.lx-pg__tools {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 4px 0 4px 42px;
	max-width: 92%;
}

.lx-pg__tool {
	border: 1px solid rgba(34, 211, 238, 0.25);
	border-radius: 12px;
	background: rgba(8, 47, 73, 0.35);
	overflow: hidden;
}

.lx-pg__tool-h {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 12.5px;
	font-weight: 600;
	color: #67e8f9;
	user-select: none;
}

.lx-pg__tool-h::before {
	content: "⚙";
	opacity: 0.8;
}

.lx-pg__tool-status {
	margin-left: auto;
	font-size: 11px;
	color: #86efac;
}

.lx-pg__tool-body {
	display: none;
	padding: 0 12px 12px;
	font-size: 13px;
	border-top: 1px dashed rgba(34, 211, 238, 0.15);
	color: var(--pg-muted);
}

.lx-pg__tool.is-open .lx-pg__tool-body {
	display: block;
}

.lx-pg__typing {
	display: inline-flex;
	gap: 4px;
	padding: 4px 0;
}

.lx-pg__typing i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--pg-cyan);
	animation: lx-pg-dot 1s infinite ease-in-out;
}

.lx-pg__typing i:nth-child(2) { animation-delay: 0.15s; }
.lx-pg__typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes lx-pg-dot {
	0%, 100% { opacity: 0.3; transform: translateY(0); }
	50% { opacity: 1; transform: translateY(-3px); }
}

/* Soft CTA banner in chat */
.lx-pg__cta-banner {
	margin: 4px 0 4px 42px;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid rgba(244, 114, 182, 0.35);
	background: linear-gradient(135deg, rgba(244, 114, 182, 0.12), rgba(167, 139, 250, 0.12));
	font-size: 13px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.lx-pg__cta-banner p {
	margin: 0;
	flex: 1;
	min-width: 180px;
}

/* Composer */
.lx-pg__composer {
	padding: 10px 12px 12px;
	border-top: 1px solid rgba(34, 211, 238, 0.12);
	background: rgba(8, 12, 24, 0.65);
}

.lx-pg__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
	min-height: 0;
}

.lx-pg__chip {
	padding: 5px 10px;
	border-radius: 999px;
	font-size: 12px;
	border: 1px solid rgba(34, 211, 238, 0.25);
	background: rgba(15, 23, 42, 0.7);
	color: #a5f3fc;
	cursor: pointer;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lx-pg__chip:hover {
	border-color: var(--pg-cyan);
	background: rgba(34, 211, 238, 0.1);
}

.lx-pg__input-row {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}

.lx-pg__input-row textarea {
	flex: 1;
	resize: none;
	min-height: 48px;
	max-height: 140px;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid rgba(34, 211, 238, 0.25);
	background: rgba(15, 23, 42, 0.9);
	color: var(--pg-text);
	font: inherit;
	font-size: 14px;
	line-height: 1.45;
	outline: none;
}

.lx-pg__input-row textarea:focus {
	border-color: var(--pg-cyan);
	box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.lx-pg__input-row textarea:disabled {
	opacity: 0.5;
}

.lx-pg__fine {
	margin: 8px 0 0;
	font-size: 11px;
	color: #64748b;
}

/* Artifacts */
.lx-pg__art {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0;
}

.lx-pg__art-h {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--pg-muted);
	border-bottom: 1px solid rgba(34, 211, 238, 0.12);
}

.lx-pg__art-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overflow-x: hidden;
	padding: 10px;
	scrollbar-gutter: stable;
}

.lx-pg__art-empty {
	font-size: 12.5px;
	color: var(--pg-muted);
	line-height: 1.5;
	margin: 8px 4px;
}

.lx-pg__artifact {
	border: 1px solid rgba(34, 211, 238, 0.2);
	border-radius: 12px;
	margin-bottom: 8px;
	background: rgba(15, 23, 42, 0.7);
	overflow: hidden;
}

.lx-pg__artifact-h {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	font-size: 12.5px;
	font-weight: 700;
	color: #e0f2fe;
	border-bottom: 1px solid rgba(34, 211, 238, 0.1);
}

.lx-pg__artifact-h span {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lx-pg__artifact-body {
	padding: 8px 10px;
	font-size: 12px;
	line-height: 1.55;
	max-height: 220px;
	overflow: auto;
	color: var(--pg-muted);
}

.lx-pg__artifact-actions {
	display: flex;
	gap: 6px;
	padding: 8px 10px;
	border-top: 1px solid rgba(34, 211, 238, 0.1);
}

.lx-pg__artifact-actions .lx-pg__btn {
	padding: 5px 10px;
	font-size: 11.5px;
}

.lx-pg__art-cta {
	padding: 12px;
	border-top: 1px solid rgba(244, 114, 182, 0.25);
	background: linear-gradient(180deg, transparent, rgba(244, 114, 182, 0.08));
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.lx-pg__art-cta p {
	margin: 0;
	font-size: 12.5px;
	color: #fbcfe8;
}

/* Toast / Modal */
.lx-pg__toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%);
	z-index: 100000;
	padding: 10px 18px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.95);
	border: 1px solid rgba(34, 211, 238, 0.4);
	color: #a5f3fc;
	font-size: 13px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.lx-pg__modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: grid;
	place-items: center;
}

.lx-pg__modal[hidden] {
	display: none !important;
}

.lx-pg__modal-bd {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, 0.72);
}

.lx-pg__modal-card {
	position: relative;
	width: min(420px, 92vw);
	padding: 22px 20px 18px;
	border-radius: 16px;
	background: linear-gradient(160deg, #0f172a, #1e1b4b);
	border: 1px solid rgba(34, 211, 238, 0.3);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lx-pg__modal-card h3 {
	margin: 0 0 10px;
	font-size: 17px;
}

.lx-pg__modal-card p {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--pg-muted);
	line-height: 1.55;
}

.lx-pg__modal-x {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	color: var(--pg-muted);
	font-size: 22px;
	cursor: pointer;
}

.lx-pg__modal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Mobile：恢复自然文档流高度，避免矮屏锁死 */
@media (max-width: 1024px) {
	.lx-pg {
		display: block;
	}

	.lx-pg__layout {
		grid-template-columns: 1fr;
		height: auto;
		max-height: none;
		min-height: 0;
	}

	.lx-pg__side {
		order: 0;
		max-height: none;
	}

	.lx-pg__agents {
		flex-direction: row;
		overflow-x: auto;
		overflow-y: hidden;
		padding-bottom: 6px;
		max-height: none;
		scrollbar-gutter: auto;
	}

	.lx-pg__agent {
		min-width: 168px;
		flex-shrink: 0;
	}

	.lx-pg__main {
		order: 1;
		min-height: min(520px, 70vh);
		max-height: min(640px, 75vh);
	}

	.lx-pg__msgs {
		scrollbar-gutter: auto;
	}

	.lx-pg__art {
		order: 2;
		max-height: 360px;
	}

	.lx-pg__art.is-collapsed .lx-pg__art-body,
	.lx-pg__art.is-collapsed .lx-pg__art-cta {
		display: none;
	}

	.lx-pg__welcome-cards {
		grid-template-columns: 1fr;
	}

	.lx-pg__tools,
	.lx-pg__cta-banner {
		margin-left: 0;
	}
}

@media (max-width: 560px) {
	.lx-pg {
		padding: 8px 6px 20px;
	}

	.lx-pg__brand-sub {
		display: none;
	}

	.lx-pg__top-meta .lx-pg__btn--ghost {
		display: none;
	}
}

/* Page body polish when on playground */
body.lx-playground-page .entry-content > *:not(.lx-front-pg-wrap):not(.lx-pg),
body.lx-playground-page .wp-block-post-title {
	/* keep page title subtle if theme shows it */
}

/* 页面外壳：减少主题双滚动条 / 多余纵向空白 */
body.lx-playground-page {
	overflow-x: hidden;
}
body.lx-playground-page .lx-front-pg-wrap,
body.lx-playground-page .entry-content {
	max-width: none;
}
@media (min-width: 1025px) {
	body.lx-playground-page .site-main,
	body.lx-playground-page .entry-content,
	body.lx-playground-page .lx-front-pg-wrap {
		/* 让 playground 吃满可用高度 */
		min-height: 0;
	}
}


/* ── Agent 信任层：评分 / 样例 / 质量保障 ── */
.lx-pg__qa-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	padding: 8px 12px;
	border-radius: 12px;
	border: 1px solid rgba(34, 211, 238, 0.18);
	background: rgba(8, 16, 32, 0.65);
}
.lx-pg__qa-pill {
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
	border: 1px solid rgba(148, 163, 184, 0.25);
	color: #cbd5e1;
	background: rgba(15, 23, 42, 0.6);
}
.lx-pg__qa-pill.is-on {
	border-color: rgba(34, 211, 238, 0.45);
	color: #a5f3fc;
	background: rgba(34, 211, 238, 0.1);
}
.lx-pg__qa-note {
	margin-left: auto;
	font-size: 12px;
	color: var(--pg-muted);
}
.lx-pg__agent-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 4px;
	font-size: 11px;
	align-items: center;
}
.lx-pg__stars {
	color: #fbbf24;
	font-weight: 700;
}
.lx-pg__rate-n { color: var(--pg-muted); }
.lx-pg__qa-mini {
	padding: 1px 6px;
	border-radius: 6px;
	background: rgba(167, 139, 250, 0.15);
	color: #ddd6fe;
	border: 1px solid rgba(167, 139, 250, 0.3);
}
.lx-pg__chat-head-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.lx-pg__trust {
	padding: 0 0 10px;
	border-bottom: 1px solid var(--pg-line);
	margin-bottom: 10px;
}
.lx-pg__rate-box {
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid rgba(251, 191, 36, 0.22);
	background: rgba(20, 16, 8, 0.45);
	margin-bottom: 10px;
}
.lx-pg__rate-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}
.lx-pg__rate-score {
	color: #fbbf24;
	font-weight: 800;
	font-size: 14px;
}
.lx-pg__rate-sub {
	margin: 4px 0 8px;
	font-size: 12px;
	color: var(--pg-muted);
}
.lx-pg__rate-stars {
	display: flex;
	gap: 4px;
	margin-bottom: 8px;
}
.lx-pg__star-btn {
	border: 0;
	background: transparent;
	color: #64748b;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
	transition: color .15s, transform .15s;
}
.lx-pg__star-btn:hover,
.lx-pg__star-btn.is-pick,
.lx-pg__star-btn.is-on {
	color: #fbbf24;
	transform: scale(1.08);
}
.lx-pg__rate-comment {
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 8px;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid rgba(148, 163, 184, 0.25);
	background: rgba(2, 6, 23, 0.55);
	color: var(--pg-text);
	font-size: 12.5px;
	resize: vertical;
	min-height: 48px;
}
.lx-pg__rate-submit { width: 100%; }
.lx-pg__rate-comments {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	max-height: 120px;
	overflow: auto;
}
.lx-pg__rate-comments li {
	font-size: 12px;
	color: #cbd5e1;
	padding: 4px 0;
	border-top: 1px dashed rgba(148, 163, 184, 0.15);
}
.lx-pg__samples-h {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .04em;
	color: #a5f3fc;
	margin: 8px 0 6px;
}
.lx-pg__samples.is-flash {
	box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.45);
	border-radius: 10px;
}
.lx-pg__sample {
	border: 1px solid rgba(148, 163, 184, 0.18);
	border-radius: 10px;
	margin-bottom: 8px;
	background: rgba(8, 12, 24, 0.55);
	overflow: hidden;
}
.lx-pg__sample-toggle {
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	color: var(--pg-text);
	padding: 10px 12px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.lx-pg__sample-toggle span {
	font-size: 11px;
	color: var(--pg-muted);
}
.lx-pg__sample-body {
	display: none;
	padding: 0 12px 12px;
	border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.lx-pg__sample.is-open .lx-pg__sample-body { display: block; }
.lx-pg__sample-prompt {
	font-size: 12px;
	color: #94a3b8;
	margin: 8px 0;
}
.lx-pg__sample-out {
	font-size: 12.5px;
	line-height: 1.55;
	color: #e2e8f0;
	max-height: 220px;
	overflow: auto;
	padding: 8px;
	border-radius: 8px;
	background: rgba(2, 6, 23, 0.5);
	margin-bottom: 8px;
}
.lx-pg__sample-out table {
	width: 100%;
	border-collapse: collapse;
	font-size: 11.5px;
}
.lx-pg__sample-out th,
.lx-pg__sample-out td {
	border: 1px solid rgba(148, 163, 184, 0.2);
	padding: 3px 6px;
}
.lx-pg__qa-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}
.lx-pg__qa-badge {
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 999px;
	border: 1px solid rgba(34, 211, 238, 0.28);
	color: #a5f3fc;
	background: rgba(34, 211, 238, 0.08);
	cursor: help;
}
.lx-pg__qa-detail-note {
	font-size: 12px;
	color: #94a3b8;
	line-height: 1.55;
	margin: 0 0 8px;
}
