/* dsh-webapp 设计系统：明亮主题，移动端优先响应式。 */
:root {
	color-scheme: light;
	--bg: #f3f5fa;
	--panel: #ffffff;
	--panel-2: #f0f3f9;
	--column: #ebeef5;
	--border: #e3e7f0;
	--text: #182136;
	--text-2: #55617a;
	--text-3: #667089; /* F9：加深至 ≥4.5:1 对比（原 #8b96ad ≈3.0:1） */
	--accent: #4f46e5;
	--accent-hover: #4338ca;
	--accent-soft: rgba(79, 70, 229, 0.1);
	--accent-hi: #a5b4fc;            /* 扫字渐变亮端（生成状态行） */
	--accent-grad: #7c73f0;           /* 进度条渐变亮端 */
	--accent-border: rgba(79, 70, 229, 0.25); /* 选中态描边 */
	--accent-sweep: rgba(79, 70, 229, 0.08);  /* running 扫光带 */
	--ctx-tools: #0ea5e9;             /* 上下文分类点：系统工具 */
	--ctx-system: #22c55e;            /* 上下文分类点：系统提示词 */
	--ctx-other: #94a3b8;             /* 上下文分类点：其他 */
	--skel-hi: #e9edf6;               /* 骨架屏扫光亮端 */
	--danger: #dc2626;
	--danger-soft: #fef2f2;
	--ok: #059669;
	--ok-soft: #ecfdf5;
	--warn: #d97706;
	--warn-soft: #fef3c7;
	--mono: ui-monospace, "SF Mono", Consolas, "Cascadia Mono", monospace;
	--shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
	--shadow-md: 0 4px 14px rgba(16, 24, 40, 0.09);
	--shadow-lg: 0 16px 40px rgba(16, 24, 40, 0.16);
	--radius: 12px;
	--topbar-h: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; }
body {
	font: 14px/1.55 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
	background: var(--bg);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	overscroll-behavior: none;
}
h1, h2, h3 { margin: 0; font-weight: 650; }
a { color: var(--accent); text-decoration: none; }
::placeholder { color: var(--text-3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ———— 控件 ———— */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 8px 14px; border-radius: 10px; border: 1px solid transparent;
	font: inherit; font-weight: 550; font-size: 13.5px; cursor: pointer;
	background: var(--panel-2); color: var(--text);
	transition: background 0.15s, transform 0.05s, box-shadow 0.15s, border-color 0.15s;
	white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
/* 异步动作提交中（ui.js 自动附加）：转圈 + 禁止重复点击（§11.1 防重） */
.btn.loading { pointer-events: none; }
.btn.loading::before {
	content: ""; width: 12px; height: 12px; flex: none; border-radius: 50%;
	border: 2px solid currentColor; border-top-color: transparent; opacity: 0.6;
	animation: spin 0.8s linear infinite;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-icon {
	padding: 7px; border-radius: 8px; background: transparent; color: var(--text-2);
	border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: var(--accent-soft); color: var(--accent); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn-icon svg { width: 16px; height: 16px; }

.input, .select, .textarea {
	width: 100%; padding: 9px 12px; border-radius: 10px;
	border: 1px solid var(--border); background: var(--panel); color: var(--text);
	font: inherit; font-size: 13.5px;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
	outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
/* 模型页档位内联下拉（原内联样式改为类，移动端可覆盖字号防 iOS 缩放） */
.effort-select { width: auto; padding: 4px 26px 4px 10px; font-size: 12.5px; }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
/* 必填标记：红色星号（label 内联） */
.req-star { color: var(--danger); font-weight: 700; }
/* 字段级必填提醒：挂字段下方，失焦或点提交时展示（默认 hidden 由 JS 控制） */
.field-err { font-size: 12px; color: var(--danger); margin: 6px 0 0; }
/* 「？」悬浮说明（qhint）：黑底圆标；气泡由 JS 挂 body + fixed 顶层展示（不被弹窗边沿遮挡） */
.qhint { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 15px; height: 15px; margin-left: 4px; border: 1px solid #182136; border-radius: 50%; background: #182136; color: #f5f7fb; font-size: 11px; font-weight: 600; cursor: help; user-select: none; vertical-align: middle; }
.qhint:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.qhint-tip { position: fixed; width: max-content; max-width: 360px; padding: 8px 10px; background: #182136; color: #f5f7fb; font-size: 12px; font-weight: 400; line-height: 1.6; border-radius: 6px; box-shadow: 0 4px 14px rgba(16, 24, 40, 0.35); z-index: 2147483000; text-align: left; white-space: normal; }
.secret-input { position: relative; }
.secret-input .input { padding-right: 42px; }
.secret-input .secret-eye { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); padding: 5px; color: var(--text-3); }
.secret-input .secret-eye:hover { background: transparent; color: var(--accent); }
.secret-input .secret-eye svg { width: 15px; height: 15px; }
.secret-input .secret-eye[disabled] { opacity: 0.5; pointer-events: none; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--accent); }

/* ———— 登录页（明亮渐变） ———— */
.login-wrap {
	min-height: 100vh; min-height: 100dvh;
	display: flex; align-items: center; justify-content: center; padding: 24px;
	background:
		radial-gradient(1000px 520px at 12% -12%, rgba(99, 102, 241, 0.16), transparent 60%),
		radial-gradient(820px 420px at 92% 108%, rgba(16, 185, 129, 0.13), transparent 55%),
		linear-gradient(165deg, #f8faff, #edf1fa);
}
.login-card {
	width: min(400px, 100%); background: var(--panel);
	border: 1px solid var(--border); border-radius: 20px;
	padding: 36px 32px; color: var(--text); box-shadow: 0 22px 56px rgba(30, 41, 82, 0.13);
}
.login-card .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-card .logo svg { width: 30px; height: 30px; }
.login-card h1 { font-size: 20px; }
.login-card .sub { color: var(--text-2); font-size: 13px; margin: 2px 0 24px; }
.login-card .input { margin-bottom: 12px; }
.login-card .btn-primary { width: 100%; padding: 11px; margin-top: 6px; }
.login-err { background: var(--danger-soft); color: var(--danger); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--text-3); text-align: center; }

/* ———— 应用外壳 ———— */
#app { display: flex; height: 100vh; height: 100dvh; }
#sidebar {
	width: 250px; flex: none; display: flex; flex-direction: column;
	background: var(--panel); border-right: 1px solid var(--border);
	color: var(--text-2); height: 100vh; height: 100dvh;
	position: sticky; top: 0; z-index: 30;
}
#sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: var(--text); }
#sidebar .brand svg { width: 26px; height: 26px; }
#sidebar .brand b { font-size: 15px; letter-spacing: 0.2px; }
#sidebar .brand span { font-size: 11px; color: var(--text-3); display: block; }
#sidebar .brand .brand-beta {
	display: inline-block; width: fit-content; margin-top: 3px;
	font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: 0.8px; text-transform: uppercase;
	padding: 3px 8px; border-radius: 99px;
	background: var(--accent-soft); color: var(--accent);
}
.nav-section { padding: 10px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); display: flex; justify-content: space-between; align-items: center; }
.nav-list { list-style: none; margin: 0; padding: 0 10px; overflow-y: auto; }
.nav-list li {
	display: flex; align-items: center; gap: 9px; padding: 8px 10px; margin: 1px 0;
	border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--text-2);
	transition: background 0.12s, color 0.12s; user-select: none;
}
.nav-list li svg { width: 16px; height: 16px; flex: none; opacity: 0.8; }
.nav-list li:hover { background: var(--panel-2); color: var(--text); }
.nav-list li.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-list li.active svg { opacity: 1; }
.nav-list li .count { margin-left: auto; font-size: 11px; background: var(--panel-2); color: var(--text-3); border-radius: 99px; padding: 1px 8px; }
.nav-list li.active .count { background: rgba(79, 70, 229, 0.14); color: var(--accent); }
.nav-add { border: 0; background: transparent; color: var(--text-3); cursor: pointer; padding: 2px; border-radius: 6px; display: inline-flex; }
.nav-add:hover { color: var(--accent); background: var(--accent-soft); }
.nav-add svg { width: 14px; height: 14px; }

/* 项目二级菜单：需求中心 / 版本面板 / 知识库 与项目强绑定 */
.nav-list li.nav-project { display: block; padding: 0; cursor: default; }
.nav-list li.nav-project:hover { background: transparent; color: inherit; }
.nav-row {
	display: flex; align-items: center; gap: 9px; padding: 8px 10px; margin: 1px 0;
	border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--text-2);
	transition: background 0.12s, color 0.12s; user-select: none;
}
.nav-row svg { width: 16px; height: 16px; flex: none; opacity: 0.8; }
.nav-row:hover { background: var(--panel-2); color: var(--text); }
.nav-row.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-row.active svg { opacity: 1; }
.nav-row .count { margin-left: auto; font-size: 11px; background: var(--panel-2); color: var(--text-3); border-radius: 99px; padding: 1px 8px; }
.nav-row.active .count { background: rgba(79, 70, 229, 0.14); color: var(--accent); }
ul.nav-sub { list-style: none; margin: 0; padding: 0 4px 3px 14px; }
ul.nav-sub li {
	display: flex; align-items: center; gap: 8px; padding: 5.5px 10px; margin: 1px 0;
	border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--text-3);
	transition: background 0.12s, color 0.12s; user-select: none;
}
ul.nav-sub li svg { width: 14px; height: 14px; flex: none; opacity: 0.8; }
ul.nav-sub li:hover { background: var(--panel-2); color: var(--text); }
ul.nav-sub li.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
ul.nav-sub li.active svg { opacity: 1; }
ul.nav-sub li .count { margin-left: auto; font-size: 10.5px; border-radius: 99px; padding: 0 7px; }
.dm-pending-badge { background: rgba(239, 68, 68, 0.14); color: var(--danger); font-weight: 650; }
.mod-checks { display: flex; gap: 8px; flex-wrap: wrap; }
.mod-check {
	display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; cursor: pointer;
	border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text-2);
	background: var(--panel); transition: border-color 0.12s, color 0.12s;
}
.mod-check:hover { border-color: var(--accent); color: var(--text); }
#sidebar .spacer { flex: 1; }
#sidebar .userbox { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.avatar {
	width: 32px; height: 32px; border-radius: 50%; flex: none;
	background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
	display: flex; align-items: center; justify-content: center; font-weight: 650; font-size: 14px;
}
#sidebar .userbox .name { color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.2; }
#sidebar .userbox .role { font-size: 11px; color: var(--text-3); }
#sidebar .brand .sidebar-collapse { margin-left: auto; }

/* ———— 桌面端侧栏折叠：body.sidebar-collapsed 收窄为 64px 图标栏 ————
   限 ≥901px：≤900px 是移动端抽屉（body.nav-open），两态互不干扰 */
@media (min-width: 901px) {
	#sidebar { transition: width 0.18s ease; }
	body.sidebar-collapsed #sidebar { width: 64px; }
	body.sidebar-collapsed #sidebar .brand { flex-direction: column; gap: 12px; padding: 16px 0 10px; }
	body.sidebar-collapsed #sidebar .brand .brand-text { display: none; }
	body.sidebar-collapsed #sidebar .sidebar-collapse { margin: 0; }
	body.sidebar-collapsed #sidebar .nav-section { justify-content: center; padding: 10px 0 4px; }
	body.sidebar-collapsed #sidebar .nav-section > span { display: none; }
	body.sidebar-collapsed #sidebar .nav-list > li { justify-content: center; }
	body.sidebar-collapsed #sidebar .nav-list li .label,
	body.sidebar-collapsed #sidebar .nav-list li .count { display: none; }
	body.sidebar-collapsed #sidebar .nav-row { justify-content: center; padding: 8px 0; }
	body.sidebar-collapsed #sidebar .nav-row .nav-chevron,
	body.sidebar-collapsed #sidebar .nav-row .nav-add { display: none; }
	/* 二级菜单显隐由 JS 内联 style 控制，须 !important 才能盖过内联；展开侧栏即恢复 */
	body.sidebar-collapsed #sidebar ul.nav-sub { display: none !important; }
	body.sidebar-collapsed #sidebar .userbox { justify-content: center; padding: 12px 0; }
	body.sidebar-collapsed #sidebar .userbox .meta,
	body.sidebar-collapsed #sidebar .userbox .btn-icon { display: none; }
}

/* 移动端抽屉导航：默认收起，body.nav-open 时滑入 */
.nav-toggle { display: none; }
#nav-scrim { display: none; }

#main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
#topbar {
	height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 20px;
	background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border); z-index: 20;
}
#topbar h1 { font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#topbar .desc { color: var(--text-3); font-size: 12.5px; margin-top: 1px; max-width: 480px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#topbar .grow { flex: 1; }
.health-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--border); padding: 5px 12px; border-radius: 99px; white-space: nowrap; }
.health-pill .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.health-pill.ok .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.health-pill.bad .dot { background: var(--danger); }
#view { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* ———— 看板 ———— */
#board { display: flex; gap: 14px; padding: 18px 20px 24px; overflow-x: auto; flex: 1; min-height: 0; align-items: flex-start; }
.column {
	width: 296px; flex: none; background: var(--column); border: 1px solid var(--border);
	border-radius: 14px; display: flex; flex-direction: column; max-height: 100%;
	transition: box-shadow 0.15s, border-color 0.15s;
}
.column.drop-target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.col-head .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.col-head .name { font-weight: 650; font-size: 13px; }
.col-head .count { font-size: 11.5px; color: var(--text-3); background: var(--panel); border: 1px solid var(--border); border-radius: 99px; padding: 0 8px; }
.col-head .btn-icon { margin-left: auto; width: 26px; height: 26px; padding: 5px; }
.col-body { flex: 1; overflow-y: auto; padding: 4px 10px 10px; min-height: 60px; }
.col-body::-webkit-scrollbar { width: 8px; }
.col-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.card {
	position: relative;
	background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
	padding: 11px 12px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow-sm);
	transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
	-webkit-touch-callout: none;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.card.dragging { opacity: 0.45; }
.card.touch-dragging {
	position: fixed; z-index: 300; margin: 0; pointer-events: none;
	box-shadow: var(--shadow-lg); opacity: 0.97; transform: none;
}
.drag-handle {
	display: none; position: absolute; top: 5px; right: 5px; width: 30px; height: 30px;
	padding: 6px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3);
	cursor: grab; touch-action: none; align-items: center; justify-content: center;
}
.drag-handle:active { background: var(--accent-soft); color: var(--accent); cursor: grabbing; }
.card-title { font-weight: 600; font-size: 13.5px; line-height: 1.4; word-break: break-word; }
.card-desc {
	font-size: 12px; color: var(--text-2); margin-top: 5px; word-break: break-word;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 11.5px; color: var(--text-3); }
.badge {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px;
	background: var(--accent-soft); color: var(--accent); max-width: 150px;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge.plain { background: var(--panel-2); color: var(--text-3); }
.run-state { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.run-state .dot { width: 7px; height: 7px; border-radius: 50%; }
.run-state.done .dot { background: var(--ok); }
.run-state.error .dot { background: var(--danger); }
.run-state.cancelled .dot { background: var(--text-3); }
.run-state.done { color: var(--ok); }
.run-state.error { color: var(--danger); }
.spinner {
	width: 11px; height: 11px; border-radius: 50%; flex: none;
	border: 2px solid var(--accent-soft); border-top-color: var(--accent);
	animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.drop-line { height: 3px; border-radius: 2px; background: var(--accent); margin: 0 2px 8px; box-shadow: 0 0 6px var(--accent); }

/* ———— 看板布局 ———— */
.board-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
/* 会话页输入区共用基础类（chat 页 .chat-composer/.chat-controls 内使用） */
.composer-input {
	width: 100%; resize: none; border: 1px solid var(--border); border-radius: 12px;
	background: var(--panel); color: var(--text); font: inherit; font-size: 13.5px;
	line-height: 1.55; padding: 10px 14px; min-height: 42px; max-height: 160px; overflow-y: auto;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.composer-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer-tag { font-size: 11.5px; color: var(--text-3); margin: 0 2px 0 8px; }
.composer-tag:first-child { margin-left: 0; }

.empty-board { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-3); padding: 40px; }
.empty-board .art { width: 72px; height: 72px; border-radius: 20px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.empty-board .art svg { width: 34px; height: 34px; color: var(--accent); }

/* ———— 弹窗 ———— */
.modal-overlay {
	position: fixed; inset: 0; background: rgba(18, 25, 43, 0.42); backdrop-filter: blur(3px);
	display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px 16px; z-index: 100;
	animation: fade 0.14s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal-panel {
	background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
	width: min(580px, 100%); max-height: 86vh; max-height: 86dvh; display: flex; flex-direction: column;
	box-shadow: var(--shadow-lg); animation: pop 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.modal-panel.wide { width: min(780px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(0.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; padding: 16px 20px 0; }
.modal-head h2 { font-size: 16px; flex: 1; }
.modal-body { padding: 16px 20px; overflow-y: auto; overscroll-behavior: contain; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; flex-wrap: wrap; }

/* ———— 运行记录 ———— */
.runs { margin-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.run-item { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.run-item .run-head {
	display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer;
	font-size: 12.5px; color: var(--text-2); background: var(--panel-2); flex-wrap: wrap;
}
.run-item .run-head:hover { color: var(--text); }
.run-item .run-body { padding: 10px 12px; border-top: 1px solid var(--border); }
.run-item pre {
	margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.55;
	font-family: ui-monospace, "SF Mono", Consolas, monospace; max-height: 320px; overflow-y: auto;
}
.chip { font-size: 11px; font-weight: 650; padding: 1px 8px; border-radius: 99px; }
.chip.running { background: var(--accent-soft); color: var(--accent); }
.chip.done { background: var(--ok-soft); color: var(--ok); }
.chip.error { background: var(--danger-soft); color: var(--danger); }
.chip.cancelled { background: var(--panel-2); color: var(--text-3); }

/* ———— 页面卡片（模型/用户/流程） ———— */
.page { padding: 22px; overflow-y: auto; flex: 1; min-height: 0; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-head h2 { font-size: 14.5px; flex: 1; }
.panel-head .sub { color: var(--text-3); font-size: 12px; }
.panel-body { padding: 16px 18px; overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { text-align: left; font-size: 11.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.list td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: color-mix(in srgb, var(--panel-2) 45%, transparent); }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--text-3); }
.row-flex { display: flex; gap: 8px; align-items: center; }
/* 移动端横排工具类：.wrap-sm ≤640 允许换行；.full-sm ≤640 子项占整行
   （!important 用于压过 JS 内联固定宽——内联样式无法被普通媒体查询覆盖） */
@media (max-width: 640px) {
	.wrap-sm { flex-wrap: wrap; }
	.full-sm { flex: 1 1 100% !important; width: auto !important; min-width: 0 !important; }
}

/* ———— 流程编辑器 ———— */
.flow-status-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.flow-status-row input[type="color"] { width: 34px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); cursor: pointer; flex: none; }
.flow-status-row .input { flex: 1; }
.flow-section-title { font-size: 12.5px; font-weight: 700; color: var(--text-2); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.flow-section-title:first-child { margin-top: 0; }
.automation-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--panel-2); }
.automation-card .head { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13px; }
.automation-card .head .dot { width: 9px; height: 9px; border-radius: 50%; }
.automation-card .body { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.automation-card .body .full { grid-column: 1 / -1; }
.template-vars { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.template-vars code { font-size: 11px; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 1px 7px; cursor: pointer; }

/* ———— Toast ———— */
#toasts { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
	background: #1b2440; color: #f9fafb; font-size: 13px; padding: 10px 16px; border-radius: 11px;
	box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 8px;
	animation: slide-in 0.18s ease; max-width: 380px;
}
.toast.err { background: var(--danger); }
.toast svg { width: 15px; height: 15px; flex: none; }
@keyframes slide-in { from { transform: translateX(16px); opacity: 0; } }

/* ———— 仪表盘 ———— */
#dash-root { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.dash-toolbar {
	flex: none; display: flex; align-items: center; gap: 10px;
	padding: 12px 22px 0;
}
.dash-body { flex: 1; overflow-y: auto; padding: 16px 22px 28px; display: flex; flex-direction: column; gap: 14px; }
/* 滚动由 dash-body 承担，子项不得收缩（overflow-x:auto 使卡片自动最小高度失效，多卡片超一屏时会被 flex-shrink 压扁） */
.dash-body > * { flex-shrink: 0; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-card {
	background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
	padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }
.stat-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.stat-sub { font-size: 11px; color: var(--text-3); margin-top: 5px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.dash-card {
	background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
	padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
}
.dash-card h3 { font-size: 13.5px; color: var(--text-2); font-weight: 650; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { width: 110px; flex: none; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 10px; border-radius: 6px; background: var(--panel-2); display: flex; overflow: hidden; }
.bar-fill { height: 100%; min-width: 0; border-radius: 6px 0 0 6px; }
.bar-fill:last-child { border-radius: 0 6px 6px 0; }
.bar-fill:only-child { border-radius: 6px; }
.bar-fill.in { background: var(--accent); opacity: 0.55; }
.bar-fill.out { background: var(--accent); }
.bar-value { flex: none; font-size: 12.5px; font-weight: 600; min-width: 42px; text-align: right; }
.bar-sub { flex: none; font-size: 11px; min-width: 40px; }
.trend-chart { width: 100%; height: 130px; display: block; }
.trend-chart rect { fill: var(--accent); }
.trend-chart rect.in { opacity: 0.5; }
.trend-chart rect.out { opacity: 1; }
.chart-axis { display: flex; font-size: 11px; color: var(--text-3); margin-top: 4px; }
.chart-axis .grow { flex: 1; }
.chart-legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); }
.legend-dot.in { opacity: 0.5; }
.proj-row {
	display: flex; align-items: center; gap: 14px; padding: 10px 4px;
	border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.proj-row:last-child { border-bottom: 0; }
.proj-meta { flex: 1; min-width: 180px; }
.proj-name { font-weight: 600; font-size: 13.5px; }
.proj-folder { font-size: 11.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-stat { flex: none; font-size: 12.5px; color: var(--text-2); }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th {
	text-align: left; font-size: 11.5px; color: var(--text-3); font-weight: 600;
	padding: 4px 10px 8px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.dash-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-table tbody tr { cursor: pointer; transition: background 0.12s; }
.dash-table tbody tr:hover { background: var(--accent-soft); }
.dash-table tbody tr:last-child td { border-bottom: 0; }

/* ———— 工作文件夹选择器 ———— */
.folder-picker { display: flex; gap: 16px; min-height: 340px; }
.fp-left { width: 230px; flex: none; border-right: 1px solid var(--border); padding-right: 14px; overflow-y: auto; max-height: 56vh; }
.fp-subtitle { font-size: 11.5px; font-weight: 650; color: var(--text-3); letter-spacing: 0.3px; margin-bottom: 8px; }
.fp-ws { padding: 8px 10px; border-radius: 9px; cursor: pointer; transition: background 0.12s; }
.fp-ws:hover { background: var(--accent-soft); }
.fp-ws.active { background: var(--accent-soft); }
.fp-ws-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-ws-path { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fp-crumbs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 8px; }
.fp-crumb { font-size: 12.5px; color: var(--accent); cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.fp-crumb:hover { background: var(--accent-soft); }
.fp-crumb.cur { color: var(--text-2); font-weight: 600; cursor: default; }
.fp-crumb.cur:hover { background: transparent; }
.fp-mkdir { display: flex; gap: 6px; margin-bottom: 8px; }
.fp-mkdir .input { font-size: 12.5px; padding: 6px 10px; }
.fp-entries {
	flex: 1; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px;
	min-height: 200px; max-height: 42vh; padding: 6px;
}
.fp-entry {
	display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px;
	cursor: pointer; font-size: 13px; transition: background 0.12s;
}
.fp-entry:hover { background: var(--accent-soft); }
.fp-entry svg { width: 15px; height: 15px; color: var(--text-3); flex: none; }

/* ———— 项目表单：文件夹展示 ———— */
.folder-display {
	flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px;
	border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2);
	padding: 6px 6px 6px 12px;
}
.folder-text { flex: 1; min-width: 0; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-text.empty { font-family: inherit; color: var(--text-3); }

/* ================================================================
   响应式：平板（≤900px）—— 侧栏变为抽屉
   ================================================================ */
@media (max-width: 900px) {
	#sidebar {
		position: fixed; left: 0; top: 0; bottom: 0; z-index: 95;
		width: min(282px, 84vw); height: 100vh; height: 100dvh;
		transform: translateX(-105%);
		transition: transform 0.22s ease;
		box-shadow: var(--shadow-lg);
	}
	body.nav-open #sidebar { transform: translateX(0); }
	body.nav-open { overflow: hidden; }
	#nav-scrim {
		display: block; position: fixed; inset: 0; z-index: 94;
		background: rgba(18, 25, 43, 0.4); border: 0; padding: 0;
		opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
	}
	body.nav-open #nav-scrim { opacity: 1; pointer-events: auto; }
	.nav-toggle { display: inline-flex; flex: none; }
	/* 抽屉模式下侧栏始终完整展示，折叠入口无意义 */
	#sidebar .sidebar-collapse { display: none; }

	/* 看板列按视口宽度排列，横向滑动浏览 */
	#board { padding: 14px 12px 18px; scroll-snap-type: x proximity; }
	.column { width: min(84vw, 340px); scroll-snap-align: start; }


	/* 文件夹选择器折叠 */
	.folder-picker { flex-direction: column; }
	.fp-left { width: 100%; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 10px; max-height: 160px; }

	/* 表格列多的管理页（平台/订阅/团队/审计）：平板竖屏起就给 min-width 兜底 + 横滚，避免列被压到换行（原仅 ≤640） */
	table.list { min-width: 600px; }
	.ops-scroll { overflow-x: auto; }
	.ops-scroll table { min-width: 540px; }
}

/* ================================================================
   响应式：手机（≤640px）—— 全面触摸优化
   ================================================================ */
@media (max-width: 640px) {
	:root { --topbar-h: 56px; }

	/* 更大的触摸目标；输入框 16px 字号避免 iOS 聚焦自动缩放 */
	.btn { min-height: 40px; padding: 9px 14px; }
	.btn-sm { min-height: 36px; padding: 6px 12px; }
	.btn-icon { width: 40px; height: 40px; padding: 9px; }
	.input, .select, .textarea { font-size: 16px; padding: 10px 12px; }
	/* 16px 防缩放规则的漏网点：独立类 / 高特异性选择器 / 内联样式改类（.effort-select） */
	.composer-input { font-size: 16px; }
	.fp-mkdir .input { font-size: 16px; }
	.effort-select { font-size: 16px; }
	/* 分段页签/单选触控目标补足 40px */
	.dm-tab, .dm-seg button { min-height: 40px; padding: 9px 14px; font-size: 13px; }
	.nav-list li { padding: 11px 12px; font-size: 14px; }
	/* 项目分组：行/二级项保持独立触控尺寸与缩进（分组容器本身不吃 li 内边距） */
	.nav-list li.nav-project { padding: 0; }
	.nav-row { padding: 11px 12px; font-size: 14px; }
	ul.nav-sub li { padding: 8px 12px 8px 34px; font-size: 13px; }

	/* 顶栏精简：隐藏描述、健康 pill 只留状态点、带图标的按钮只留图标 */
	#topbar { padding: 0 12px; gap: 8px; }
	#topbar h1 { font-size: 15.5px; }
	#topbar .desc { display: none; }
	.health-pill { padding: 6px; }
	.health-pill span:last-child { display: none; }
	#topbar .btn { min-height: 36px; padding: 7px 10px; }
	#topbar .btn:has(svg) .btn-label { display: none; }
	#topbar .btn:has(svg) svg { width: 17px; height: 17px; }

	/* 弹窗变为底部上滑面板 */
	.modal-overlay { padding: 0; align-items: flex-end; }
	.modal-panel {
		width: 100%; max-height: 92vh; max-height: 92dvh;
		border-radius: 18px 18px 0 0; border-bottom: 0;
		animation: sheet-up 0.2s ease;
	}
	.modal-panel.wide { width: 100%; }
	@keyframes sheet-up { from { transform: translateY(28px); opacity: 0.5; } }
	.modal-head { padding: 14px 16px 0; }
	.modal-body { padding: 14px 16px; }
	.modal-foot { padding: 0 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
	.modal-foot .btn { flex: 1 1 auto; }
	body.modal-open { overflow: hidden; }
	.decision-sticky { bottom: -14px; margin: 4px -16px -14px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }

	/* 弹窗内并排字段换行 */
	.modal-body .row-flex:has(> .field) { flex-wrap: wrap; }
	.modal-body .row-flex:has(> .field) > .field { flex: 1 1 150px; }

	/* 看板：列宽贴合视口 */
	.column { width: min(86vw, 340px); }
	.col-head { padding: 12px 12px 8px; }
	.col-head .btn-icon { width: 34px; height: 34px; padding: 7px; }

	/* 页面与表格横向滚动（table.list / ops-scroll 的兜底已上移到 ≤900 档） */
	.page { padding: 14px 12px 20px; }
	.panel-body { padding: 14px; }
	.dash-toolbar { padding: 12px 12px 0; }
	.dash-body { padding: 12px 12px 22px; }
	.dash-grid { grid-template-columns: 1fr; }
	.dash-card { overflow-x: auto; }
	.dash-table { min-width: 520px; }
	.dash-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

	/* 流程自动化卡片单列 */
	.automation-card .body { grid-template-columns: 1fr; }
	/* 流程配置弹窗：状态/流转规则行换行化，select 可收缩（长状态名不再横向溢出弹窗） */
	.flow-status-row { flex-wrap: wrap; row-gap: 6px; }
	.flow-status-row .input { min-width: 0; }
	.flow-status-row .select { width: auto; flex: 1 1 0; min-width: 0; }
	.automation-card .head { flex-wrap: wrap; row-gap: 4px; }

	/* Toast 底部全宽（避开顶栏与输入条） */
	#toasts { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px; align-items: stretch; }
	.toast { max-width: none; justify-content: center; animation: toast-up 0.18s ease; }
	@keyframes toast-up { from { transform: translateY(12px); opacity: 0; } }
}

/* 触屏设备：卡片显示拖动手柄 */
@media (pointer: coarse) {
	.drag-handle { display: inline-flex; }
	.card-title { padding-right: 30px; }
	/* 待处置角标避让拖动手柄热区（两者原本都定位在卡片右上角） */
	.card.pending-gate::after { right: 40px; }
	/* F9：触控目标 ≥36px（btn-icon / nav-add / 轻量图钮原约 26–30px） */
	.btn-icon, .nav-add { min-width: 36px; min-height: 36px; }
	/* 需求缩略图删除钮（原 20×20，叠在 108px 缩略图右上角，误触率高） */
	.dm-img-del { width: 32px; height: 32px; line-height: 32px; font-size: 14px; }
}

/* F1/F7：离线横幅与断网 chip */
.offline-banner {
	position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 400;
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; border-radius: 10px;
	padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow-lg); max-width: min(92vw, 560px);
}
.net-chip { cursor: default; }
.board-loading { color: var(--text-2); padding: 40px 0; text-align: center; }

/* ———— PM 工作站（docs/pm-workstation-ui-design.md §10；追加式，不改既有变量） ———— */
.chip-version {
	font-family: ui-monospace, "SF Mono", Consolas, monospace;
	font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 6px;
	background: var(--panel-2); color: var(--text-2); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.badge-gate-ok { background: var(--ok-soft); color: var(--ok); }
.badge-gate-rework { background: #fef3c7; color: var(--warn); }
.badge-gate-rewrite { background: var(--danger-soft); color: var(--danger); }
.badge-gate-doubt { background: var(--danger-soft); color: var(--danger); animation: doubt-blink 1.2s infinite; }
.badge-gate-na { background: var(--panel-2); color: var(--warn); }
.badge-round { background: var(--panel-2); color: var(--text-3); }
.badge-round.hot { color: var(--warn); font-weight: 650; }
@keyframes doubt-blink { 50% { opacity: 0.45; } }

/* 卡点列 / 阻塞列（§4.1） */
.col-gate { border-left: 2px dashed var(--warn); }
.col-blocked { border-left: 2px solid var(--danger); }
.column.col-gate .col-head .name::before { content: ""; }
.column.col-gate .col-head .dot { box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15); }

/* 待处置卡片（P06：回合结束缺 GATE） */
.card.pending-gate { border-left: 3px solid var(--warn); }
.card.pending-gate::after {
	content: "待处置"; position: absolute; top: 8px; right: 8px;
	font-size: 10px; color: var(--warn); background: #fef3c7; border-radius: 6px; padding: 1px 6px;
}

/* 裁决条（§7.5） */
.decision-bar {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	padding: 10px 12px; margin-bottom: 12px; border-radius: 10px;
	background: var(--panel-2); border: 1px solid var(--border);
}
/* 任务弹窗裁决区吸底（§5/§7.5）：随滚动钉在 modal-body 可视区底缘 */
.decision-sticky {
	position: sticky; bottom: -16px; z-index: 5;
	margin: 4px -20px -16px; padding: 10px 20px;
	background: var(--panel); border-top: 1px solid var(--border);
}
.decision-sticky .decision-bar { margin-bottom: 0; }

/* 卡片状态行（§4.2：仅卡点列显示「🔒 等待批准 · 第 N 轮」） */
.card-gate-line { margin-top: 7px; font-size: 12px; color: var(--warn); }

/* PM 区页签（§5） */
.pm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 10px; overflow-x: auto; }
.pm-tab {
	border: none; background: none; cursor: pointer; font: inherit; font-size: 13px; color: var(--text-2);
	padding: 7px 12px; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0;
	white-space: nowrap; flex: none;
}
.pm-tab:hover { color: var(--text); background: var(--panel-2); }
.pm-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.pm-panel { min-height: 60px; max-height: 46vh; overflow-y: auto; }

/* 迷你 Markdown 渲染（§7.6） */
.md-render { font-size: 13px; line-height: 1.6; }
.md-render h3, .md-render h4, .md-render h5, .md-render h6 { margin: 10px 0 4px; scroll-margin-top: 8px; }
.md-render p { margin: 4px 0; }
.md-render pre { background: #edf0f8; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; overflow-x: auto; font-size: 12px; line-height: 1.55; margin: 6px 0; }
.md-render code { background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: 12px; }
.md-render pre code { background: none; border: 0; padding: 0; }
.md-render ul, .md-render ol { margin: 4px 0; padding-left: 22px; }
.md-render li { margin: 2px 0; }
.md-render li::marker { color: var(--text-3); }
.md-render blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid rgba(79, 70, 229, 0.35); border-radius: 0 8px 8px 0; background: var(--panel-2); color: var(--text-2); }
.md-render blockquote p { margin: 3px 0; }
.md-render hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
.md-render a { color: var(--accent); border-bottom: 1px solid rgba(79, 70, 229, 0.35); }
.md-render a:hover { border-bottom-color: var(--accent); }
.md-table-wrap { overflow-x: auto; margin: 8px 0; }
.md-render table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.md-render th, .md-render td { border: 1px solid var(--border); padding: 4px 8px; text-align: left; vertical-align: top; }
.md-render tr:nth-child(1) td { background: var(--panel-2); font-weight: 600; }
/* 代码块一键复制（§7.6） */
.md-code { position: relative; }
.md-code .md-copy {
	position: absolute; top: 5px; right: 5px; border: 1px solid var(--border); border-radius: 7px;
	background: var(--panel); color: var(--text-3); font-size: 11px; padding: 2px 9px; cursor: pointer;
	opacity: 0; transition: opacity 0.12s;
}
.md-code:hover .md-copy, .md-copy:focus-visible { opacity: 1; }
@media (pointer: coarse) { .md-code .md-copy { opacity: 1; } }
/* md 预览 TOC（§7.6：左目录 + 内容；窄屏折叠为顶部 details） */
.md-preview { display: flex; gap: 16px; align-items: flex-start; }
.md-toc { width: 180px; flex: none; position: sticky; top: 0; max-height: 60vh; overflow-y: auto; border-right: 1px solid var(--border); padding-right: 10px; }
.md-toc-i { display: block; font-size: 12.5px; color: var(--text-2); padding: 3px 6px; border-radius: 6px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-toc-i:hover { background: var(--accent-soft); color: var(--accent); }
.md-toc-i.lv4 { padding-left: 16px; font-size: 12px; }
.md-toc-i.lv5, .md-toc-i.lv6 { padding-left: 26px; font-size: 12px; color: var(--text-3); }
.md-toc-mobile { display: none; margin-bottom: 8px; }
.md-toc-mobile summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.md-content { flex: 1; min-width: 0; }
@media (max-width: 768px) {
	.md-preview { flex-direction: column; gap: 0; }
	.md-toc { display: none; }
	.md-toc-mobile { display: block; }
}

/* 产物清单 / 时间线（§7.1/§5.1） */
.artifact-list { display: flex; flex-direction: column; gap: 2px; }
.artifact-row {
	display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px;
	background: var(--panel); border: 1px solid var(--border); font-size: 13px;
}
.artifact-row.missing { opacity: 0.55; }
.artifact-row .badge { flex: none; }
.timeline { display: flex; flex-direction: column; gap: 4px; }
.timeline-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-left: 2px solid var(--border); font-size: 12.5px; }
.timeline-item:hover { border-left-color: var(--accent); background: var(--panel-2); }

.pm-warn { background: #fef3c7; color: var(--warn); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; margin: 6px 0; }
.upgrade-banner { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--danger-soft); color: var(--danger); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 13px; }
.pm-banner { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pm-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pm-table-wrap { overflow-x: auto; border-radius: 10px; }
.pm-table th, .pm-table td { border-bottom: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.pm-table th { background: var(--panel-2); font-size: 12.5px; }
.diff-stat { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; white-space: pre-wrap; }
/* diff 按文件分组折叠 + 行级三色（§7.3） */
.diff-groups { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.diff-file { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.diff-file summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 7px 10px; background: var(--panel-2); font-size: 12.5px; user-select: none; }
.diff-counts { margin-left: auto; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.diff-body { overflow-x: auto; font-family: var(--mono); font-size: 12px; line-height: 1.5; }
.diff-line { padding: 0 10px; white-space: pre; min-width: fit-content; }
.diff-line.add { background: var(--ok-soft); color: var(--ok); }
.diff-line.del { background: var(--danger-soft); color: var(--danger); }
.diff-line.hunk { background: var(--accent-soft); color: var(--accent); }
.diff-line.ctx { color: var(--text-2); }
/* 意见分类 chips（§7.5） */
.fb-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
/* proto/restore 预览设备宽度切换（§7.2） */
.preview-viewport { margin: 0 auto; transition: max-width 0.15s ease; }
.preview-viewport .preview-frame { display: block; }
/* 锚点意见选中气泡（§7.4） */
.anchor-pop {
	position: fixed; z-index: 320; border: 1px solid var(--border); border-radius: 99px;
	background: #1b2440; color: #f9fafb; font-size: 12.5px; padding: 6px 12px; cursor: pointer;
	box-shadow: var(--shadow-md); animation: pop 0.14s ease;
}
.anchor-pop:hover { background: var(--accent); }
.preview-frame { width: 100%; height: 64vh; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.feedback-carry { cursor: pointer; }

@media (max-width: 768px) {
	.pm-panel { max-height: none; }
	.preview-frame { height: 50vh; }
}
/* 版本面板表格 8 列在中小屏横向滚动，不再纯压缩 */
@media (max-width: 900px) {
	.pm-table { min-width: 660px; }
}

/* ———— 知识库面板（卡片化 + 移动端友好） ———— */
.kb-page { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 22px 28px; }
.kb-loading { display: flex; align-items: center; gap: 10px; padding: 40px 22px; color: var(--text-2); font-size: 13px; }

/* 数据横幅 */
.kb-hero {
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
	padding: 16px 18px; margin-bottom: 16px;
	background: linear-gradient(115deg, var(--accent-soft), transparent 58%), var(--panel);
	border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm);
}
.kb-hero-icon {
	width: 44px; height: 44px; flex: none; border-radius: 13px;
	background: linear-gradient(135deg, var(--accent), #7c3aed); color: #fff;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 14px rgba(79, 70, 229, 0.28);
}
.kb-hero-icon svg { width: 22px; height: 22px; }
.kb-hero-text { min-width: 0; }
.kb-hero-title { font-size: 15.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-hero-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.kb-hero-stats { margin-left: auto; display: flex; gap: 22px; }
.kb-stat { text-align: right; }
.kb-stat b { display: block; font-size: 20px; font-weight: 750; line-height: 1.15; letter-spacing: -0.3px; }
.kb-stat span { font-size: 11.5px; color: var(--text-3); }

/* 双栏：左目录树 + 右内容清单 */
.kb-layout { display: flex; gap: 16px; align-items: flex-start; }
.kb-side {
	width: 260px; flex: none; padding: 12px;
	background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm);
	position: sticky; top: 20px; max-height: calc(100dvh - 40px); overflow-y: auto;
}
.kb-side-title { font-size: 11.5px; font-weight: 650; color: var(--text-3); letter-spacing: 0.4px; padding: 2px 10px 8px; }
/* 移动端「目录」开关（默认隐藏，≤900px 显示） */
.kb-dirtoggle { display: none; }
.kb-dirtoggle svg { width: 15px; height: 15px; }

/* 主区：搜索工具条 + 内容清单 */
.kb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.kb-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.kb-search { position: relative; flex: 1; min-width: 0; max-width: 460px; display: flex; align-items: center; }
.kb-search > svg { position: absolute; left: 13px; width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.kb-search .input { padding-left: 36px; padding-right: 40px; border-radius: 99px; box-shadow: var(--shadow-sm); }
.kb-search-clear { position: absolute; right: 5px; width: 28px; height: 28px; padding: 6px; }
/* 隐藏 search 原生清除钮，避免与自定义 kb-search-clear 双 × 并存 */
.kb-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.kb-count { flex: none; font-size: 12.5px; white-space: nowrap; }

/* 内容清单面板：面包屑 + 行列表 */
.kb-dpanel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.kb-dhead { padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.kb-crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.kb-crumb {
	border: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--accent);
	padding: 3px 7px; border-radius: 6px; cursor: pointer; max-width: 220px;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kb-crumb:hover { background: var(--accent-soft); }
.kb-crumb:last-of-type { color: var(--text); font-weight: 600; cursor: default; }
.kb-crumb:last-of-type:hover { background: transparent; }
.kb-crumb-sep { color: var(--text-3); font-size: 12px; }
.kb-crumb-cur { font-size: 12.5px; color: var(--text-2); padding: 3px 7px; }
.kb-dlist { display: flex; flex-direction: column; padding: 6px; gap: 2px; }
.kb-drow {
	display: flex; align-items: center; gap: 10px; width: 100%;
	font: inherit; text-align: left; cursor: pointer;
	border: 0; background: transparent; border-radius: 10px; padding: 8px 10px;
	transition: background 0.12s; user-select: none;
}
.kb-drow:hover { background: var(--accent-soft); }
.kb-drow > svg:last-child { width: 15px; height: 15px; flex: none; color: var(--text-3); transition: transform 0.15s, color 0.15s; }
.kb-drow:hover > svg:last-child { transform: translateX(2px); color: var(--accent); }
.kb-dmain { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.kb-dname { font-weight: 550; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-dmeta { flex: none; margin-left: auto; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.kb-tone-0 { background: var(--accent-soft); color: var(--accent); }
.kb-tone-1 { background: var(--ok-soft); color: var(--ok); }
.kb-tone-2 { background: #fef3c7; color: var(--warn); }
.kb-tone-3 { background: #fce7f3; color: #db2777; }
.kb-tone-4 { background: #e0f2fe; color: #0284c7; }
.kb-tone-5 { background: #ede9fe; color: #7c3aed; }

/* 空态 */
.kb-empty {
	display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
	padding: 44px 20px; color: var(--text-3);
	background: var(--panel); border: 1px dashed var(--border); border-radius: 14px;
}
.kb-empty .art { width: 60px; height: 60px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.kb-empty .art svg { width: 28px; height: 28px; }
.kb-empty-title { margin: 0; font-size: 14px; font-weight: 650; color: var(--text-2); }
.kb-empty p { margin: 0; font-size: 12.5px; }
.kb-empty .btn { margin-top: 8px; }
.kb-hint { font-size: 12px; color: var(--text-3); margin: 2px 2px 0; }

/* 目录树（真实嵌套缩进 + 引导线；与内容清单选中联动） */
.kb-tree { padding: 2px; }
.kb-tnode {
	display: flex; align-items: center; gap: 7px; width: 100%;
	border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text);
	padding: 6px 8px; border-radius: 8px; cursor: pointer; text-align: left;
	transition: background 0.12s; user-select: none;
}
.kb-tnode:hover { background: var(--accent-soft); }
.kb-tnode.sel { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.kb-tchev { width: 16px; height: 16px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--text-3); transition: transform 0.15s ease; }
.kb-tchev svg { width: 12px; height: 12px; }
.kb-tnode.file .kb-tchev, .kb-tnode.all .kb-tchev { visibility: hidden; }
.kb-twrap-all { border-bottom: 1px solid var(--border); margin-bottom: 5px; padding-bottom: 5px; }
.kb-tnode.open > .kb-tchev { transform: rotate(90deg); color: var(--accent); }
.kb-ticon { width: 22px; height: 22px; flex: none; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.kb-ticon svg { width: 13px; height: 13px; }
.kb-ticon-dir { background: #fef3c7; color: var(--warn); }
.kb-tnode.open > .kb-ticon-dir, .kb-tnode.sel > .kb-ticon-dir { background: var(--accent-soft); color: var(--accent); }
.kb-tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-tcount { flex: none; font-size: 10.5px; color: var(--text-3); background: var(--panel-2); border-radius: 99px; padding: 0 7px; }
.kb-tnode.sel .kb-tcount { background: rgba(79, 70, 229, 0.14); color: var(--accent); }
/* 层级：每层子级容器左缩进 + 竖向引导线，深度天然正确 */
.kb-tkids { margin-left: 15px; padding-left: 6px; border-left: 1px solid var(--border); }
.kb-tempty { padding: 5px 10px; font-size: 12.5px; }

/* 知识库响应式：≤900px 目录树收进「目录」开关面板 */
@media (max-width: 900px) {
	.kb-layout { flex-direction: column; }
	.kb-side { display: none; width: 100%; position: static; max-height: 46vh; }
	.kb-side.show { display: block; }
	.kb-dirtoggle { display: inline-flex; }
	.kb-hero-stats { margin-left: 0; gap: 18px; }
}
@media (max-width: 640px) {
	.kb-page { padding: 14px 12px 20px; }
	.kb-hero { padding: 14px; border-radius: 14px; }
	.kb-hero-icon { width: 40px; height: 40px; }
	.kb-stat b { font-size: 18px; }
	.kb-toolbar { flex-wrap: wrap; }
	.kb-search { max-width: none; flex: 1 1 100%; order: 2; }
	.kb-count { order: 1; margin-left: auto; }
	/* 目录树/清单行：触控行高加大、单层缩进收窄，深层级不易溢出 */
	.kb-tnode { min-height: 38px; padding: 7px 8px; font-size: 13.5px; }
	.kb-tkids { margin-left: 9px; padding-left: 4px; }
	.kb-drow { min-height: 46px; padding: 9px 10px; }
	.kb-dname { font-size: 14px; }
	.kb-dmeta { max-width: 38%; }
	.kb-crumb { min-height: 32px; }
}

/* ———— 版本面板（卡片列表式；hero/工具栏/搜索/空状态复用 kb-* 与 dm-seg） ———— */
.ver-list { display: flex; flex-direction: column; gap: 10px; }
.ver-card {
	background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
	box-shadow: var(--shadow-sm); padding: 12px 16px; display: flex; flex-direction: column; gap: 7px;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.ver-card:hover { border-color: var(--accent); }
.ver-card.cur { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ver-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* max-width:100%：长版本名在卡头行内省略（原 none 会让超长版本名撑破卡片） */
.ver-card-head .chip-version { font-size: 12px; max-width: 100%; }
.ver-cur { font-size: 11px; font-weight: 650; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.ver-status { font-size: 11px; font-weight: 650; padding: 1px 8px; border-radius: 99px; background: var(--panel-2); color: var(--text-2); }
.ver-mtime { margin-left: auto; font-size: 11.5px; white-space: nowrap; }
.ver-desc {
	margin: 0; font-size: 12.5px; color: var(--text-2);
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ver-card-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ver-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.ver-dot {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 11px; padding: 2px 8px; border-radius: 99px; cursor: default;
}
.ver-dot svg { width: 11px; height: 11px; }
.ver-dot.done { background: var(--ok-soft); color: var(--ok); }
.ver-dot.todo { background: var(--panel-2); color: var(--text-3); }
.ver-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ver-sort { flex: none; }
/* ≤768：时间戳独占一行（原仅 ≤640，641-768 区间头行内容多时挤压） */
@media (max-width: 768px) {
	.ver-mtime { margin-left: 0; flex-basis: 100%; order: 5; }
}
@media (max-width: 640px) {
	.ver-card { padding: 10px 12px; }
	.ver-actions { margin-left: 0; }
	/* 描述改两行截断：移动端无 hover 看 title，单行省略丢信息过多 */
	.ver-desc {
		white-space: normal; display: -webkit-box; -webkit-line-clamp: 2;
		-webkit-box-orient: vertical; overflow: hidden;
	}
}

/* —— 需求中心 / 需求看板（requirement-intake）———————————————————— */
/* 需求图片区（v1.3）：URL / 本地上传 / 截图粘贴，名称按顺序 图1、图2… */
.dm-img-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dm-img-url { display: flex; gap: 6px; flex: 1; min-width: 220px; }
.dm-img-url .input { flex: 1; min-width: 160px; }
.dm-img-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.dm-img-grid:empty { display: none; margin: 0; }
.dm-img-thumb { position: relative; margin: 0; width: 108px; }
.dm-img-thumb img {
	display: block; width: 108px; height: 78px; object-fit: cover; border-radius: 8px;
	border: 1px solid var(--border); background: var(--panel-2); cursor: zoom-in;
}
.dm-img-thumb figcaption { font-size: 11.5px; color: var(--text-3); text-align: center; margin-top: 3px; }
.dm-img-del {
	position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: 0; border-radius: 6px;
	background: rgba(16, 24, 40, 0.55); color: #fff; font-size: 11px; line-height: 20px; padding: 0; cursor: pointer;
}
.dm-img-del:hover { background: var(--danger); }
.dm-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dm-toolbar .grow { flex: 1; min-width: 140px; }
/* 需求中心头部筛选/搜索：桌面固定宽，≤640 占整行（宽度由类控制，取代 JS 内联宽——内联无法被媒体查询覆盖） */
.dm-head-proj { width: 180px; }
.dm-head-search { width: 220px; }
@media (max-width: 640px) {
	.dm-head-proj, .dm-head-search { width: 100%; }
}
.dm-tabs, .dm-seg { display: inline-flex; background: var(--panel-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.dm-tab, .dm-seg button {
	border: 0; background: transparent; padding: 5px 11px; border-radius: 8px; font-size: 12.5px;
	color: var(--text-2); cursor: pointer; white-space: nowrap; font-family: inherit;
}
.dm-tab:hover, .dm-seg button:hover { color: var(--text); }
.dm-tab.active, .dm-seg button.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.dm-seg button:disabled { opacity: .45; cursor: default; }
.dm-table-wrap { overflow-x: auto; }
table.dm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dm-table th {
	text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600;
	padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none;
}
.dm-table th.sortable { cursor: pointer; }
.dm-table th.sortable:hover { color: var(--text); }
.dm-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.dm-table tbody tr { cursor: pointer; }
.dm-table tbody tr:hover td { background: var(--panel-2); }
.dm-table .ops { white-space: nowrap; }
.dm-table .ops .btn { margin-right: 4px; }
.badge-dm { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge-dm .dot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; flex: none; }
.badge-dm-pending { background: var(--warn-soft); color: var(--warn); }
/* v1.6 进度派生态：已通过=青（立项未开工）、开发中=主色蓝（在途）、已完成=绿（承接原 approved 配色） */
.badge-dm-approved { background: rgba(6, 182, 212, 0.12); color: #0e7490; }
.badge-dm-developing { background: var(--accent-soft); color: var(--accent); }
.badge-dm-done { background: var(--ok-soft); color: var(--ok); }
.badge-dm-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-dm-withdrawn { background: var(--panel-2); color: var(--text-3); }
.dm-id { font-family: var(--mono); color: var(--text-3); font-size: 12px; margin-right: 6px; }
.prio { font-weight: 700; font-size: 12px; }
.prio-P0 { color: var(--danger); }
.prio-P1 { color: var(--warn); }
.prio-P2 { color: var(--text-2); }
.prio-P3 { color: var(--text-3); }
.dm-round { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.dm-round.hot { color: var(--warn); font-weight: 700; }
.dm-src-badge {
	position: absolute; top: 7px; right: 38px; z-index: 1;
	background: var(--panel-2); color: var(--text-2); font-size: 11px; font-weight: 600;
	border-radius: 6px; padding: 1px 6px; pointer-events: none;
}
.dm-src-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--accent); cursor: pointer; margin-bottom: 10px; }

/* ———— 模型提问闭环（QUESTION 协议）：卡片❓标识 + 内联回答条 ———— */
.ask-badge {
	position: absolute; top: 7px; right: 7px; z-index: 1;
	width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
	font-size: 12px; border-radius: 50%; cursor: pointer;
	background: rgba(245, 158, 11, 0.16); color: #d97706;
	border: 1px solid rgba(245, 158, 11, 0.45);
}
.ask-badge:hover { background: rgba(245, 158, 11, 0.28); }
.card-question { border-color: rgba(245, 158, 11, 0.55); }
.ask-bar { display: none; margin-top: 7px; }
.ask-bar.open { display: block; }
.ask-bar .ask-q {
	font-size: 12px; color: var(--text-2); word-break: break-word;
	background: rgba(245, 158, 11, 0.10); border-left: 3px solid #f59e0b;
	border-radius: 6px; padding: 6px 8px;
}
.run-state.question { color: #d97706; font-weight: 600; }
.ask-box { margin-top: 6px; }
.ask-box .ask-q {
	font-size: 12.5px; color: var(--text-2); word-break: break-word;
	background: rgba(245, 158, 11, 0.10); border-left: 3px solid #f59e0b;
	border-radius: 8px; padding: 8px 10px; margin-bottom: 6px;
}

.drawer-overlay { position: fixed; inset: 0; background: rgba(16, 24, 40, 0.32); z-index: 60; }
.drawer-panel {
	position: fixed; top: 0; right: 0; bottom: 0; width: 500px; max-width: 94vw;
	background: var(--panel); box-shadow: var(--shadow-lg); z-index: 61; display: flex; flex-direction: column;
}
.drawer-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px 10px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 15.5px; line-height: 1.4; word-break: break-word; flex: 1; }
.drawer-body { padding: 14px 18px 24px; overflow-y: auto; flex: 1; }
/* 抽屉裁决底栏（§6.4 吸底）：固定在抽屉底部，不随内容滚动 */
.drawer-foot { flex: none; padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--panel); }
.dm-meta-row { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--text-2); margin: 8px 0 12px; }
.dm-desc { word-break: break-word; font-size: 13px; color: var(--text-2); background: var(--panel-2); border-radius: 10px; padding: 12px 14px; }
/* 描述经 Markdown 渲染后为块级结构，不能用 pre-wrap（避免多余空行） */
.dm-desc .md-render { white-space: normal; }
.dm-timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.dm-timeline li { position: relative; padding: 0 0 14px 22px; font-size: 12.5px; }
.dm-timeline li::before { content: ""; position: absolute; left: 5px; top: 5px; width: 8px; height: 8px; border-radius: 99px; background: var(--text-3); }
.dm-timeline li::after { content: ""; position: absolute; left: 8.5px; top: 17px; bottom: 2px; width: 1px; background: var(--border); }
.dm-timeline li:last-child { padding-bottom: 2px; }
.dm-timeline li:last-child::after { display: none; }
.dm-timeline .tl-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.dm-timeline .tl-act { font-weight: 700; }
.dm-timeline .tl-meta { color: var(--text-3); font-size: 12px; }
.dm-timeline .tl-comment { margin: 4px 0 0; white-space: pre-wrap; color: var(--text-2); background: var(--panel-2); border-radius: 8px; padding: 6px 10px; }
.dm-empty { text-align: center; color: var(--text-3); padding: 46px 16px; }
.dm-count { font-size: 12px; color: var(--text-3); }
.dm-opinion-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.dm-opinion-row .idx { font-size: 12px; color: var(--text-3); width: 16px; text-align: right; flex: none; }
.dm-honeypot { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0; }
/* —— 需求看板（对外公开页 /demand-board.html；2026-08-28 美化）：全宽门户式布局 —— */
.dm-public-page { min-height: 100dvh; padding: 26px 28px 56px; display: flex; flex-direction: column; gap: 14px; }
/* hero（kb-hero 范式：渐变底 + 图标盒；右侧主 CTA 放大——外部访客的核心动作） */
.dm-pub-hero {
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
	padding: 18px 20px;
	background: linear-gradient(115deg, var(--accent-soft), transparent 58%), var(--panel);
	border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm);
}
.dm-pub-hero-icon {
	width: 46px; height: 46px; flex: none; border-radius: 13px;
	background: linear-gradient(135deg, var(--accent), #7c3aed); color: #fff;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 14px rgba(79, 70, 229, 0.28);
}
.dm-pub-hero-icon svg { width: 23px; height: 23px; }
.dm-pub-hero-text { flex: 1; min-width: 200px; }
.dm-pub-hero-title { margin: 0; font-size: 17px; font-weight: 700; }
.dm-pub-hero-sub { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.dm-pub-hero .btn-primary { padding: 10px 20px; font-size: 14px; border-radius: 11px; }
.dm-pub-tabbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 筛选表单卡片：分字段 field 组件网格；按钮组与字段底对齐 */
.dm-pub-filter { margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 14px 16px; }
.dm-pub-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 14px; align-items: end; }
.dm-pub-filter .field { margin-bottom: 0; }
.dm-pub-filter-actions { display: flex; gap: 8px; }
/* 记录表格（美化版）：独立类不复用 .dm-table（避开其移动端 dl 变形与贴边样式），
   圆角面板容器 + 灰底表头 + 行悬浮高亮 + 优先级 pill；窄屏横向滚动保表格形态 */
.dm-pub-table-wrap {
	overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm);
	/* 横向滚动提示（纯 CSS，local/scroll 双层渐变）：内容被裁掉的一侧出现阴影，滚到头即消，无溢出则整体不可见 */
	background:
		linear-gradient(to right, var(--panel), transparent) left center / 36px 100% no-repeat local,
		linear-gradient(to left, var(--panel), transparent) right center / 36px 100% no-repeat local,
		radial-gradient(farthest-side at 0 50%, rgba(16, 24, 40, 0.18), transparent) left center / 14px 100% no-repeat,
		radial-gradient(farthest-side at 100% 50%, rgba(16, 24, 40, 0.18), transparent) right center / 14px 100% no-repeat,
		var(--panel);
}
table.dm-pub-table { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.dm-pub-table th {
	text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: 0.3px;
	padding: 11px 16px; background: var(--panel-2); border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none;
}
.dm-pub-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.dm-pub-table tbody tr { cursor: pointer; transition: background 0.12s; }
.dm-pub-table tbody tr:hover { background: var(--accent-soft); }
.dm-pub-table tbody tr:last-child td { border-bottom: 0; }
.dm-pub-tt { font-weight: 600; font-size: 14px; line-height: 1.4; word-break: break-word; white-space: normal; }
/* 编号列（2026-09-03 起独立首列）：#ref 与轮次 chip 同行不换行 */
.dm-pub-ref { white-space: nowrap; }
.dm-pub-ref .dm-id { margin-right: 8px; font-size: 12.5px; }
/* 优先级 pill 化（作用域限公开表格；内部需求中心表格沿用纯文字样式，不受影响） */
.dm-pub-table .prio { padding: 2px 9px; border-radius: 99px; font-size: 11px; background: var(--panel-2); white-space: nowrap; }
.dm-pub-table .prio-P0 { background: var(--danger-soft); color: var(--danger); }
.dm-pub-table .prio-P1 { background: var(--warn-soft); color: var(--warn); }
.dm-pub-table th:last-child, .dm-pub-table td.ops { text-align: right; }
.dm-pub-table .ops { white-space: nowrap; }
.dm-pub-table .ops .btn { margin-left: 6px; }
@media (max-width: 640px) { table.dm-pub-table { min-width: 800px; } }
.dm-pub-foot { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
@media (max-width: 640px) {
	.dm-public-page { padding: 14px 12px 44px; gap: 12px; }
	.dm-pub-hero { padding: 14px; border-radius: 14px; }
	.dm-pub-hero .btn-primary { width: 100%; padding: 10px 14px; }
	.dm-pub-filter-grid { grid-template-columns: 1fr 1fr; }
	.dm-pub-filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
	.dm-pub-filter-grid { grid-template-columns: 1fr; }
}
.dm-token-box { display: flex; align-items: center; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.dm-token-box code { font-family: var(--mono); background: var(--panel-2); border-radius: 8px; padding: 4px 10px; font-size: 14px; letter-spacing: 1px; word-break: break-all; }
@media (max-width: 768px) {
	.drawer-panel { width: 100vw; max-width: 100vw; }
	.dm-table thead { display: none; }
	.dm-table tbody tr { display: block; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; }
	.dm-table td { display: flex; gap: 10px; border-bottom: 0; }
	.dm-table td[data-col]::before { content: attr(data-col); color: var(--text-3); font-size: 11px; min-width: 60px; flex: none; padding-top: 2px; }
	.dm-table .ops { white-space: normal; }
}
/* 769-900px 平板竖屏：表格既不卡片化也不应纯压缩，改为横向滚动 */
@media (min-width: 769px) and (max-width: 900px) {
	table.dm-table { min-width: 780px; }
}

/* —— 项目 Git 页（#/git/:projectId）—— */
/* 页容器（对齐 .kb-page 范式）：此前 .git-page 类在 CSS 中无定义，整页贴视口边缘且无独立滚动 */
.git-page { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 24px; }
.git-banner { flex-wrap: wrap; row-gap: 4px; }
.git-origin {
	min-width: 0; flex: 1 1 200px;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.git-cols { flex-wrap: wrap; }
.git-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--panel); }
.git-branch-list, .git-file-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; }
.git-file-row { cursor: default; gap: 8px; }
.git-file-row.git-cur { background: var(--panel-2); border-radius: 8px; }
.git-cur .chip-version { outline: 2px solid var(--accent, #3b82f6); }
.git-perm-row { display: flex; align-items: center; margin: 2px 0 4px; }
@media (max-width: 768px) { .git-cols { flex-direction: column; } .git-cols > div { flex: 1 1 100% !important; } }
@media (max-width: 640px) {
	.git-page { padding: 14px 12px 20px; }
	/* 窄屏合并行纵排：源/目标各占一行，箭头失去语义随之隐藏 */
	.git-merge-arrow { display: none; }
	/* 分支行日期让位给分支名/最后提交（列宽 ~322px 时 date 与切换/删除钮互相挤压） */
	.git-branch-date { display: none; }
}

/* —— 项目会话页（#/chat/:projectId）：左会话记录 + 右流式会话框 —— */
.chat-wrap { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 14px; height: calc(100vh - 118px); height: calc(100dvh - 118px); min-height: 420px; }
.chat-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); overflow: hidden; }
.chat-list-head { padding: 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.chat-list-head .hint { margin: 0; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-session-box { flex: 1; overflow-y: auto; padding: 6px; }
.chat-session-item { padding: 9px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.chat-session-item:hover { background: var(--panel-2); }
.chat-session-item.active { background: var(--accent-soft); border-color: var(--accent-border); }
.chat-session-item .label { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-session-item .meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chat-session-item .meta .chat-perm { border: 1px solid var(--border); border-radius: 99px; padding: 0 7px; font-size: 10.5px; }

.chat-pane { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); overflow: hidden; }
.chat-head { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.chat-head .chat-title { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-body { position: relative; flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
/* 会话页滚动结构：.chat-scroll 为相对定位锚（承载悬浮钮），.chat-body 即消息列本体与滚动容器 */
.chat-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.chat-scroll > .chat-body { flex: 1; min-height: 0; }
.chat-empty { margin: auto; text-align: center; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 10px; }
.chat-empty .art { opacity: 0.5; }
.chat-empty h3 { margin: 0; font-size: 15px; color: var(--text-2); }
.chat-empty p { margin: 0; font-size: 12.5px; max-width: 420px; }

/* 会话询问卡（asks 桥：沙箱权限询问 + 模型提问，挂在消息列尾部） */
.ask-card { border: 1px solid var(--border); border-left: 3px solid var(--warn); border-radius: var(--radius); background: var(--panel); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm); }
.ask-card.ask-question { border-left-color: var(--accent); }
.ask-head { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 13.5px; }
.ask-head svg { width: 15px; height: 15px; color: var(--warn); flex: none; }
.ask-question .ask-head svg { color: var(--accent); }
.ask-tool { font-weight: 500; font-size: 12px; color: var(--text-3); background: var(--panel-2); border-radius: 999px; padding: 1px 9px; margin-left: auto; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-reason { margin: 0; padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text-2); white-space: pre-wrap; word-break: break-all; max-height: 180px; overflow-y: auto; }
.ask-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ask-done { font-size: 12.5px; color: var(--ok); background: var(--ok-soft); border-radius: 8px; padding: 5px 10px; align-self: flex-start; }
.ask-q-item { display: flex; flex-direction: column; gap: 6px; padding: 9px 0 0; }
.ask-q-item + .ask-q-item { border-top: 1px dashed var(--border); }
.ask-badge { flex: none; font-size: 11px; font-weight: 600; color: var(--warn); background: var(--panel-2); border: 1px solid var(--warn); border-radius: 999px; padding: 0 7px; line-height: 17px; }
.ask-q-header { font-size: 11.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.ask-q-text { font-size: 13.5px; font-weight: 600; }
.ask-q-detail { font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; }
.ask-q-opts { display: flex; flex-direction: column; gap: 5px; }
.ask-opt { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.ask-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.ask-opt input { margin-top: 3px; accent-color: var(--accent); }
.ask-opt-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ask-opt-label { font-size: 13px; font-weight: 550; }
.ask-opt-desc { font-size: 12px; color: var(--text-3); }
.ask-q-custom { resize: vertical; min-height: 30px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 12.5px; background: var(--panel); color: var(--text); }
.ask-q-custom:focus { outline: none; border-color: var(--accent); }

.chat-row { display: flex; }
.chat-row.user { justify-content: flex-end; }
.chat-row.assistant { justify-content: flex-start; }
.chat-msg { max-width: min(78%, 860px); border-radius: 16px; padding: 10px 15px; font-size: 13.5px; line-height: 1.7; box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }
/* 用户消息：浅灰中性气泡（白底细边框深字）；气泡外下方 hover/聚焦出复制钮 */
.chat-user-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; max-width: min(78%, 860px); }
.chat-user-wrap .chat-msg.user { max-width: 100%; }
.chat-msg.user { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-bottom-right-radius: 6px; }
.chat-user-acts { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s ease; }
.chat-row.user:hover .chat-user-acts, .chat-row.user:focus-within .chat-user-acts { opacity: 1; }
/* AI 消息：无气泡平铺（无背景/边框/阴影），与最终答复操作栏配套；行宽收窄至中文舒适行宽 */
.chat-msg.assistant { background: transparent; border: 0; box-shadow: none; border-radius: 0; padding: 2px 0; max-width: min(100%, 780px); }
.chat-msg .md-render { font-size: 13.5px; }
.chat-msg-time { margin-top: 5px; font-size: 10.5px; line-height: 1.2; color: var(--text-3); text-align: right; user-select: none; }
.chat-img { display: block; max-width: 260px; max-height: 200px; border-radius: 10px; margin-top: 6px; border: 1px solid var(--border); }
.chat-usage { font-size: 10.5px; color: var(--text-3); margin-top: 6px; }
.chat-cursor { color: var(--text-3); font-size: 12.5px; }

/* 答复操作栏（复制 / 赞 / 踩 / 分叉 + 时刻）：幽灵图标钮 */
.chat-actions { display: flex; align-items: center; gap: 2px; margin-top: 4px; }
.chat-act { display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--text-3); padding: 4px; border-radius: 7px; cursor: pointer; }
.chat-act:hover { background: var(--panel-2); color: var(--text-2); }
.chat-act.active { color: var(--accent); }
.chat-act svg { width: 14px; height: 14px; }
.chat-actions-time { margin-left: 6px; font-size: 11px; line-height: 1.2; color: var(--text-3); user-select: none; }

/* 工作日志折叠块：已闭合回合的过程流（中间叙述/工具/思考）收进「已工作 N 秒」，默认收起 */
.chat-worklog { max-width: min(100%, 780px); }
.chat-worklog-head { display: flex; align-items: center; gap: 6px; padding: 3px 6px; margin-left: -6px; border-radius: 8px; cursor: pointer; user-select: none; color: var(--text-3); font-size: 12.5px; line-height: 18px; }
.chat-worklog-head:hover { background: var(--panel-2); color: var(--text-2); }
.chat-worklog-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.chat-worklog-icon { display: inline-flex; flex: none; }
.chat-worklog-icon svg { width: 13px; height: 13px; }
.chat-worklog-title { font-weight: 600; }
.chat-worklog-chevron { display: inline-flex; flex: none; color: var(--text-3); transition: transform 0.15s; }
.chat-worklog-chevron svg { width: 12px; height: 12px; }
.chat-worklog-chevron.open { transform: rotate(180deg); }
.chat-worklog-body { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 2px 11px; padding-left: 13px; border-left: 1px dashed var(--border); }
.chat-worklog-body .chat-tool, .chat-worklog-body .chat-todos { max-width: 100%; }
.chat-worklog-body .chat-msg.assistant { max-width: 100%; }
/* 思考过程折叠行（DSH ReasoningRow 复刻：图标+标题+chevron+摘要，running 态扫光） */
.chat-think { display: flex; flex-direction: column; margin-bottom: 6px; }
.chat-think-row {
	position: relative; overflow: hidden; display: flex; align-items: center; gap: 6px;
	padding: 3px 6px; margin-left: -6px; border-radius: 8px; cursor: pointer; user-select: none;
	color: var(--text-3); font-size: 12px; line-height: 18px;
}
.chat-think-row:hover { background: var(--panel-2); color: var(--text-2); }
.chat-think-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.chat-think-icon { display: inline-flex; flex: none; color: var(--text-3); }
.chat-think-icon svg { width: 14px; height: 14px; }
.chat-think[data-state="running"] .chat-think-icon { color: var(--accent); animation: chatThinkPulse 1.6s ease-in-out infinite; }
@keyframes chatThinkPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.chat-think-title { flex: none; font-weight: 600; }
.chat-think-chevron { display: inline-flex; flex: none; color: var(--text-3); transition: transform 0.15s; }
.chat-think-chevron svg { width: 12px; height: 12px; }
.chat-think-chevron.open { transform: rotate(180deg); }
.chat-think-sep { flex: none; width: 2px; height: 2px; border-radius: 1px; background: var(--text-3); margin: 0 2px; }
.chat-think-summary {
	flex: 1; min-width: 0; color: var(--text-3); font-size: 12px;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-think-summary[data-follow-end] { text-overflow: clip; }
.chat-think-body {
	color: var(--text-3); font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
	padding: 4px 0 4px 22px; max-height: 260px; overflow-y: auto;
}
/* running 态行上扫光（DSH reasoning-row-sweep） */
.chat-think[data-state="running"] .chat-think-row::after {
	content: ""; position: absolute; inset-block: 0; left: 0; width: 300px; pointer-events: none;
	background: linear-gradient(90deg, transparent 0%, var(--accent-sweep) 55%, transparent 100%);
	animation: chatRowSweep 2.6s ease-out infinite;
}
@keyframes chatRowSweep { 0% { left: -300px; } 90%, 100% { left: 100%; } }

/* 生成状态行（DSH TurnStatus 复刻：脉动图标 + 渐变微光扫字 + 计时时钟） */
.chat-status { display: flex; align-items: center; gap: 7px; padding: 4px 2px; }
.chat-status-icon { display: inline-flex; flex: none; color: var(--accent); animation: chatThinkPulse 1.6s ease-in-out infinite; }
.chat-status-icon svg { width: 15px; height: 15px; }
.chat-status-text {
	font-size: 13px; font-weight: 600; white-space: nowrap;
	background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 40%, var(--accent-hi) 50%, var(--accent) 60%, var(--accent) 100%);
	background-size: 250% 100%; background-position: 100% 0;
	-webkit-background-clip: text; background-clip: text;
	color: transparent; -webkit-text-fill-color: transparent;
	animation: chatShimmer 1.8s linear infinite;
}
@keyframes chatShimmer { to { background-position: 0 0; } }
.chat-status-clock { display: inline-flex; align-items: center; gap: 3px; color: var(--text-3); font-size: 11.5px; }
.chat-status-clock svg { width: 12px; height: 12px; }
.chat-status-clock-t { font-variant-numeric: tabular-nums; }

/* 新条目入场（fade+上移；原位 reconciliation 保证不重复播放） */
.chat-in { animation: chatIn 0.18s ease-out; }
@keyframes chatIn { from { opacity: 0; transform: translateY(5px); } }

/* 发送/停止按钮 loading（异步往返期间转圈，防重复提交） */
.chat-circle.loading { pointer-events: none; }
.chat-circle.loading svg { opacity: 0; }
.chat-circle.loading::after {
	content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
	border: 2px solid currentColor; border-top-color: transparent; opacity: 0.85;
	animation: spin 0.8s linear infinite;
}

/* 动效偏好：减弱动画用户（DSH 同款 prefers-reduced-motion 处理） */
@media (prefers-reduced-motion: reduce) {
	.chat-think[data-state="running"] .chat-think-row::after,
	.chat-tool[data-state="running"] .chat-tool-head::after,
	.chat-status-text,
	.chat-status-icon,
	.chat-think[data-state="running"] .chat-think-icon,
	.chat-in { animation: none; }
	.chat-status-text { background: none; color: var(--accent); -webkit-text-fill-color: var(--accent); }
}


/* 工具行卡片（完整定义）：状态图标 + 类型图标 + 等宽 label（主文字色）+ 尾部 chevron 随开合旋转；
   running 态头部扫光；头部点击整体开合结果体 */
.chat-tool { position: relative; max-width: min(88%, 900px); border: 1px solid var(--border); border-radius: 12px; background: var(--panel); overflow: hidden; }
.chat-tool-head { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12.5px; color: var(--text-2); background: transparent; transition: background 0.15s ease; }
.chat-tool-head:hover { background: var(--panel-2); }
.chat-tool-head.err { color: var(--danger); background: var(--danger-soft); }
.chat-tool[data-state="running"] .chat-tool-head::after {
	content: ""; position: absolute; inset-block: 0; left: 0; width: 300px; pointer-events: none;
	background: linear-gradient(90deg, transparent 0%, var(--accent-sweep) 55%, transparent 100%);
	animation: chatRowSweep 2.6s ease-out infinite;
}
.chat-tool-kind { display: inline-flex; flex: none; color: var(--text-3); }
.chat-tool-kind svg { width: 13px; height: 13px; }
.chat-tool-icon { display: inline-flex; }
.chat-tool-icon svg { width: 13px; height: 13px; }
.chat-tool-icon.ok { color: var(--ok); }
.chat-tool-icon.err { color: var(--danger); }
.chat-tool-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); color: var(--text); }
.chat-tool-chev { display: inline-flex; flex: none; margin-left: auto; color: var(--text-3); transition: transform 0.15s ease; }
.chat-tool-chev svg { width: 12px; height: 12px; }
.chat-tool.open .chat-tool-chev { transform: rotate(180deg); }
.chat-tool-body { display: none; border-top: 1px solid var(--border); background: var(--panel); }
.chat-tool.open .chat-tool-body { display: block; }
.chat-tool-result { margin: 0; padding: 8px 10px; font-size: 11.5px; max-height: 240px; overflow-y: auto; white-space: pre-wrap; }
.chat-tool-foot { display: flex; align-items: center; gap: 8px; padding: 3px 8px; border-top: 1px dashed var(--border); }
.chat-tool-more { border: 0; background: none; color: var(--accent); font-size: 11.5px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.chat-tool-more:hover { background: var(--accent-soft); }
.chat-tool-copy { margin-left: auto; border: 0; background: none; color: var(--text-3); font-size: 11.5px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.chat-tool-copy:hover { color: var(--accent); background: var(--accent-soft); }
.chat-todos { max-width: min(88%, 900px); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; background: var(--panel); font-size: 12.5px; }
.chat-todos summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 12px; }
.chat-todos ul { list-style: none; margin: 6px 0 2px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-todos li { display: flex; gap: 7px; align-items: baseline; color: var(--text-2); }
.chat-todos li.completed { color: var(--text-3); text-decoration: line-through; }
.chat-todos .todo-box { font-size: 11px; flex: none; }
.chat-notice { align-self: center; font-size: 11.5px; color: var(--text-3); background: var(--panel-2); border-radius: 99px; padding: 2px 12px; max-width: 90%; text-align: center; }
.chat-notice.err { color: var(--danger); background: var(--danger-soft); }

/* 系统消息（宿主注入：reminder/运行时上下文/权限变更）——默认收起的居中弱化胶囊行，展开看全文 */
.chat-sysmsg { align-self: center; max-width: 92%; font-size: 11.5px; color: var(--text-3); }
.chat-sysmsg > summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; background: var(--panel-2); border-radius: 99px; padding: 2px 12px; max-width: 100%; }
.chat-sysmsg > summary::-webkit-details-marker { display: none; }
.chat-sysmsg > summary:hover { color: var(--text-2); }
.chat-sysmsg-icon { display: inline-flex; flex: none; }
.chat-sysmsg-icon svg { width: 12px; height: 12px; }
.chat-sysmsg-label { flex: none; font-weight: 600; }
.chat-sysmsg-peek { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sysmsg-body { margin: 6px 0 2px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; text-align: left; }

.chat-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.chat-thumb { position: relative; width: 58px; height: 58px; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.chat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.chat-thumb-x { position: absolute; top: 2px; right: 2px; background: rgba(24, 33, 54, 0.65); color: #fff; border: 0; border-radius: 6px; padding: 2px; cursor: pointer; display: flex; }
.chat-thumb-x svg { width: 11px; height: 11px; }

/* 移动端会话列表抽屉开关（仅 ≤900 显示；桌面常驻左栏） */
.chat-sessions-btn { display: none; }
.chat-list-scrim {
	display: none; position: fixed; inset: 0; z-index: 91; border: 0; padding: 0;
	background: rgba(18, 25, 43, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
@media (max-width: 900px) {
	/* 移动端：会话列表收进顶栏「会话」按钮，点开从左滑入全高抽屉（复刻侧栏抽屉范式）、遮罩/选中即收；
	   布局单滚动——列表不再以 300px+70vh 堆叠挤占消息区（双滚动、输入框出首屏的旧问题） */
	.chat-wrap { grid-template-columns: 1fr; height: auto; flex: 1 1 auto; min-height: 0; }
	.chat-list {
		position: fixed; left: 0; top: 0; bottom: 0; z-index: 92;
		width: min(320px, 86vw); max-height: none;
		border-radius: 0 14px 14px 0; box-shadow: var(--shadow-lg);
		transform: translateX(-105%); transition: transform 0.22s ease;
	}
	.chat-list.show { transform: translateX(0); }
	.chat-list-scrim { display: block; }
	.chat-list-scrim.show { opacity: 1; pointer-events: auto; }
	.chat-sessions-btn { display: inline-flex; }
	.chat-pane { min-height: 0; }
	.chat-msg { max-width: 92%; }
	.chat-user-wrap { max-width: 92%; }
}

/* —— 会话页交互优化（主流 harness 样式）—— */
.chat-group-h { font-size: 11px; font-weight: 700; color: var(--text-3); padding: 10px 8px 4px; letter-spacing: 0.04em; }

.chat-jump {
	position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px;
	display: flex; align-items: center; gap: 5px; padding: 6px 14px;
	border: 1px solid var(--border); border-radius: 99px; background: var(--panel);
	color: var(--text-2); font-size: 12px; cursor: pointer; box-shadow: var(--shadow-md);
	transition: all 0.15s ease; z-index: 5;
}
.chat-jump:hover { color: var(--accent); border-color: var(--accent); transform: translateX(-50%) translateY(-1px); }
.chat-jump svg { width: 14px; height: 14px; }

/* 输入区（原型纸片化 20260905-chat-composer-proto-ui）：去边框卡、底栏行内嵌 chip、聚焦改底部强调线 */
.chat-composer { padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--panel) 60%, transparent); }
.chat-input-card {
	border: 0; border-radius: 0; background: transparent;
	padding: 4px 0 6px; box-shadow: none;
	border-bottom: 2px solid var(--border);
	transition: border-color 0.15s ease;
}
.chat-input-card:focus-within { border-bottom-color: var(--accent); }
.chat-input-card .composer-input { border: 0; box-shadow: none; padding: 6px 2px; min-height: 44px; background: transparent; font-size: 13.5px; }
.chat-input-card .composer-input:focus { outline: 0; box-shadow: none; }
.chat-input-bar { display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.chat-input-bar .grow { flex: 1; }
/* 底栏 chip（思考档等）：与 .chat-sel 同构但文字更小、20px 图标（原型底栏口径） */
.chat-input-bar .chat-sel-btn { padding: 3px 8px; font-size: 12px; gap: 5px; min-height: 28px; }
.chat-input-bar .chat-sel-btn svg { width: 14px; height: 14px; }
.chat-input-bar .chat-circle { width: 28px; height: 28px; }
.chat-input-bar .chat-circle svg { width: 13px; height: 13px; }
/* 「+」菜单（原型）：向上弹层 + 图标菜单项 */
.chat-attach-wrap { position: relative; display: inline-flex; flex: none; }
.chat-attach-wrap .chat-circle.ghost.open { border-color: var(--accent); color: var(--accent); }
.chat-attach-pop {
	position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 20; min-width: 220px; padding: 5px;
	background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
	animation: chatSelIn 0.12s ease;
}
.chat-attach-item {
	display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 7px 10px;
	border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer;
	text-align: left;
}
.chat-attach-item:hover { background: var(--panel-2); }
.chat-attach-item svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }
/* 弹层分组（模型弹层原型）：头部组名 + 组折叠行 + 「管理模型」页脚 */
.chat-sel-group-head {
	padding: 6px 10px 4px; font-size: 11px; font-weight: 700; color: var(--text-3);
	letter-spacing: 0.04em; text-transform: none;
}
.chat-sel-group-toggle {
	display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px 10px;
	border: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer;
	border-radius: 8px; text-align: left;
}
.chat-sel-group-toggle:hover { background: var(--panel-2); }
.chat-sel-group-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sel-group-chev { width: 12px; height: 12px; color: var(--text-3); transition: transform 0.15s ease; flex: none; }
.chat-sel-group-chev.open { transform: rotate(90deg); }
.chat-sel-foot {
	display: block; width: 100%; margin-top: 6px; padding: 8px 10px;
	border: 0; border-top: 1px solid var(--border); background: transparent;
	font: inherit; font-size: 12.5px; color: var(--accent); cursor: pointer; text-align: left; border-radius: 0 0 9px 9px;
}
.chat-sel-foot:hover { background: var(--accent-soft); }
.chat-circle {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 32px; height: 32px; border-radius: 50%; border: 1px solid transparent; cursor: pointer;
	transition: all 0.15s ease; background: transparent; color: var(--text-2);
	position: relative;
}
.chat-circle svg { width: 15px; height: 15px; }
.chat-circle.primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.chat-circle.primary:hover:not(:disabled) { background: var(--accent-hover); transform: scale(1.05); }
.chat-circle.ghost { border-color: var(--border); }
.chat-circle.ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.chat-circle.danger { background: var(--danger-soft); color: var(--danger); }
.chat-circle.danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.chat-circle:disabled { opacity: 0.55; cursor: not-allowed; }

/* 触屏：用户消息复制钮常显（无 hover 可言）、答复操作钮与圆形发送/停止钮触控达标 */
@media (pointer: coarse) {
	.chat-user-acts { opacity: 1; }
	.chat-act { min-width: 36px; min-height: 36px; }
	.chat-circle { width: 40px; height: 40px; }
}

/* 打字指示（三点弹跳） */
.chat-typing { display: inline-flex; align-items: center; gap: 5px; padding: 2px 0; }
.chat-typing .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.35; animation: chatDot 1.2s infinite ease-in-out; }
.chat-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.3s; }
.chat-typing .txt { font-size: 12px; color: var(--text-3); margin-left: 4px; }
@keyframes chatDot { 0%, 60%, 100% { opacity: 0.35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* 流式闪烁光标 */
.chat-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: text-bottom; background: var(--accent); animation: chatCaret 0.9s steps(2) infinite; }
@keyframes chatCaret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* 骨架屏 */
.chat-skel { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; }
.chat-skel-bar { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--panel-2) 25%, var(--skel-hi) 50%, var(--panel-2) 75%); background-size: 200% 100%; animation: chatSkel 1.4s linear infinite; }
.chat-skel-bar.sm { height: 10px; }
@keyframes chatSkel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 空态开场建议 */
.chat-starters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; max-width: 520px; }
.chat-starter {
	border: 1px solid var(--border); border-radius: 99px; background: var(--panel); color: var(--text-2);
	padding: 7px 14px; font-size: 12.5px; cursor: pointer; transition: all 0.15s ease;
}
.chat-starter:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.chip.running { display: inline-flex; align-items: center; gap: 5px; }
/* —— 移动端会话页对齐原型（docs/plans/20260905-chat-mobile-proto-ui）：
   控制行图标工具栏化并移到输入卡下方、工具行扁平化（动词+目标+diff 统计）、用户消息条带化、
   头部操作收进「…」溢出菜单、jump 右缘圆钮；桌面（>768px）零变化，新元素基础态一律隐藏 —— */
.chat-tool-verb, .chat-tool-target, .chat-tool-stats { display: none; }
.chat-user-arrow { display: none; }
.chat-sel-ico { display: none; }
.chat-meter-ico { display: none; }
.chat-overflow-wrap { display: none; }

@media (max-width: 768px) {
	/* 头部：平铺操作四钮收进「…」溢出菜单（.chat-head-act 移动端隐藏，桌面恒显） */
	.chat-head { padding: 8px 10px; }
	.chat-head .chat-head-act { display: none; }
	.chat-overflow-wrap { display: inline-flex; position: relative; flex: none; }
	.chat-overflow {
		display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0;
		border: 1px solid var(--border); border-radius: 7px; background: var(--panel); color: var(--text-2); cursor: pointer;
	}
	.chat-overflow svg { width: 15px; height: 15px; }
	.chat-overflow.open, .chat-overflow:hover { border-color: var(--accent); color: var(--accent); }
	.chat-overflow-pop {
		position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 176px; padding: 5px;
		background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
		animation: chatSelIn 0.12s ease;
	}
	.chat-overflow-item {
		display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 8px 10px;
		border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 13px; color: var(--text); cursor: pointer;
	}
	.chat-overflow-item:hover { background: var(--panel-2); }
	.chat-overflow-item svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }

	/* 底部工具栏：输入卡与控制行视觉合并（order 对调，输入卡在上、图标工具栏在下）；
	   纸片化后仅留底部强调线，移动块不再改圆角/边框（桌面同口径） */
	.chat-pane > .chat-composer { order: 2; padding: 8px 10px 0; background: transparent; }
	.chat-pane > .chat-controls { order: 3; gap: 6px; padding: 4px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
	/* 四 chip 图标钮化：隐文字与 chevron、显图标（模式=box / 模型=sparkle / 权限=shield / 计量=activity）；
	   36px 钮 + 16px 图标（原型口径：图标更小更精致，触控面靠 6px 间距补；
	   尺寸须直设 class 本身——class 挂在 svg 上，写后代选择器匹配不到） */
	.chat-controls .chat-sel { flex: 0 0 auto; }
	.chat-controls .chat-sel-btn { width: 36px; min-width: 36px; max-width: none; min-height: 36px; padding: 0; justify-content: center; }
	.chat-controls .chat-sel-label, .chat-controls .chat-sel .chat-sel-value, .chat-controls .chat-sel .chat-sel-chev { display: none; }
	.chat-controls .chat-meter-wrap { flex: 0 0 auto; }
	.chat-controls .chat-meter { width: 36px; min-height: 36px; padding: 0; justify-content: center; }
	.chat-controls .chat-meter-seg, .chat-controls .chat-meter .chat-meter-div { display: none; }
	.chat-sel-ico, .chat-meter-ico { display: inline-flex; color: var(--text-2); width: 16px; height: 16px; }

	/* 过程条目扁平化：工具行去卡片为单行（状态 + 动词 + 目标摘要 + diff 统计），展开恢复卡片边界承载结果体 */
	.chat-tool { max-width: 100%; border: 0; border-radius: 8px; background: transparent; }
	.chat-tool-head { padding: 5px 2px; gap: 7px; }
	.chat-tool-head:hover { background: transparent; }
	.chat-tool-head .chat-tool-label, .chat-tool-head .chat-tool-kind { display: none; }
	.chat-tool-verb { display: inline-flex; flex: none; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
	.chat-tool-target {
		display: block; min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
		font-family: var(--mono); font-size: 12px; color: var(--text-3);
	}
	.chat-tool-stats { display: inline-flex; flex: none; gap: 5px; margin-left: auto; font-size: 11.5px; font-variant-numeric: tabular-nums; }
	.chat-tool-stats .add { color: var(--ok); }
	.chat-tool-stats .del { color: var(--danger); }
	.chat-tool.open { border: 1px solid var(--border); background: var(--panel); }
	.chat-tool.open .chat-tool-head { padding: 6px 10px; }

	/* 用户消息条带化：全宽浅底 + 「→」前缀（float 让 markdown 块内容绕行，呈行内前缀观感） */
	.chat-row.user .chat-user-wrap { width: 100%; max-width: 100%; }
	.chat-msg.user { max-width: 100%; width: 100%; border-radius: 12px; background: var(--panel-2); box-shadow: none; }
	.chat-user-arrow { display: block; float: left; margin-right: 7px; color: var(--accent); font-weight: 700; }
	.chat-user-wrap .chat-user-acts { align-self: flex-end; }

	/* 思考行 / worklog 头紧凑化（与扁平行同密度） */
	.chat-think-row { padding: 4px 2px; margin-left: 0; }
	.chat-worklog-head { padding: 4px 2px; margin-left: 0; }

	/* 回到底部：右缘圆形图标钮（隐文字） */
	.chat-jump { left: auto; right: 12px; transform: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; justify-content: center; }
	.chat-jump:hover { transform: translateY(-1px); }
	.chat-jump-label { display: none; }
}

/* —— 会话页：输入框上方控制行（模式/模型/权限）+ 排队消息条 —— */
.chat-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 16px 4px; }

/* 自绘下拉（模式/模型/权限，docs/plans/20260904-chat-select-popover.md）：
   chip 触发器（标签 + 当前值 + chevron）+ 锚定向上弹层（对齐 .chat-meter-pop 弹层范式）；
   pending 态 spinner 复用 .spinner 基类（.chat-sel-spin 仅作标记类，无专属规则） */
.chat-sel { position: relative; display: inline-flex; flex: none; min-width: 0; }
.chat-sel-btn {
	display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 4px 10px;
	border: 1px solid var(--border); border-radius: 8px; background: var(--panel);
	font: inherit; font-size: 12px; color: var(--text-2); cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease; white-space: nowrap;
}
.chat-sel-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.chat-sel-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.chat-sel-btn:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-sel.open .chat-sel-btn { border-color: var(--accent); color: var(--accent); }
.chat-sel-label { color: var(--text-3); flex: none; }
.chat-sel-value { color: var(--text); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sel-chev { width: 13px; height: 13px; flex: none; color: var(--text-3); transition: transform 0.15s ease; }
.chat-sel.open .chat-sel-chev { transform: rotate(180deg); }
.chat-sel-pop {
	position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 20;
	width: max-content; min-width: 100%; max-width: min(340px, 92vw); max-height: 50vh; overflow-y: auto;
	padding: 5px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
	box-shadow: var(--shadow-lg);
	animation: chatSelIn 0.12s ease;
}
@keyframes chatSelIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.chat-sel-opt {
	display: flex; flex-direction: column; justify-content: center; gap: 1px;
	min-height: 34px; padding: 6px 10px; border-radius: 8px; cursor: pointer;
	font-size: 13px; color: var(--text); position: relative;
}
.chat-sel-opt:hover:not(.disabled), .chat-sel-opt.hi:not(.disabled) { background: var(--panel-2); }
.chat-sel-opt.selected { background: var(--accent-soft); padding-right: 30px; }
.chat-sel-opt.disabled { opacity: 0.45; cursor: not-allowed; }
.chat-sel-opt-text { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-sel-opt-main { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sel-opt-badge {
	flex: none; font-size: 10.5px; line-height: 1; padding: 3px 6px; border-radius: 99px;
	background: var(--panel-2); color: var(--text-3); border: 1px solid var(--border);
}
.chat-sel-opt.selected .chat-sel-opt-badge { background: var(--panel); color: var(--accent); }
.chat-sel-opt-desc { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-sel-opt-check { position: absolute; right: 10px; top: 9px; width: 14px; height: 14px; color: var(--accent); }
@media (max-width: 768px) {
	.chat-sel-opt { min-height: 40px; }
}

/* 计量 chip（上下文容量 + 积分余额合并一框，chat-meter.js，20260904-chat-ctx-credits-chips v1.1）：
   chip 内两段各带 mini 进度条（移动端隐藏 mini 条保密度），点击弹合并明细层 */
.chat-meter-wrap { position: relative; display: inline-flex; flex: none; }
.chat-meter {
	display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px;
	border: 1px solid var(--border); border-radius: 8px; background: var(--panel);
	font: inherit; font-size: 12px; color: var(--text-2); cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease; white-space: nowrap;
}
.chat-meter:hover { border-color: var(--accent); color: var(--accent); }
.chat-meter-seg { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.chat-meter-div { width: 1px; height: 14px; background: var(--border); flex: none; }
.chat-meter-seg[data-level="danger"] .chat-ctx-nums { color: var(--danger); }
.chat-meter .chat-ctx-bar { width: 34px; }
.chat-cr-debt { color: var(--danger); }
.chat-cr-link {
	display: block; width: 100%; margin-top: 10px; padding: 6px 0 0;
	border: 0; border-top: 1px solid var(--border); background: transparent;
	font: inherit; font-size: 12px; color: var(--accent); cursor: pointer; text-align: center;
}
.chat-cr-link:hover { text-decoration: underline; }
.chat-ctx-label { color: var(--text-3); }
.chat-ctx-nums { font-weight: 600; font-variant-numeric: tabular-nums; }
.chat-ctx-pct { color: var(--text-3); }
.chat-ctx-bar { width: 44px; height: 4px; border-radius: 2px; background: var(--panel-2); overflow: hidden; flex: none; }
.chat-ctx-fill { display: block; height: 100%; border-radius: 2px; background: var(--accent); transition: width 0.3s ease; }
.chat-meter-seg[data-level="warn"] .chat-ctx-fill { background: var(--warn); }
.chat-meter-seg[data-level="danger"] .chat-ctx-fill { background: var(--danger); }
.chat-ctx-bar[data-level="danger"] .chat-ctx-fill { background: var(--danger); }
.chat-meter-pop {
	position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
	width: 252px; padding: 12px 14px; z-index: 20;
	background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
	animation: chatPopIn 0.12s ease;
}
/* 弹层统一入场：opacity 淡入（不带 transform，避免覆盖 meter-pop 的 translateX(-50%) 定位） */
@keyframes chatPopIn { from { opacity: 0; } to { opacity: 1; } }
.chat-meter-pop-div { height: 1px; background: var(--border); margin: 12px -14px; }
.chat-meter-empty { margin: 2px 0 4px; font-size: 12px; color: var(--text-3); }
.chat-ctx-pop-head { display: flex; align-items: baseline; margin-bottom: 8px; }
.chat-ctx-pop-title { font-size: 12.5px; font-weight: 700; }
.chat-ctx-pop-nums { margin-left: auto; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.chat-ctx-pop-bar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-bottom: 10px; }
.chat-ctx-pop-bar .chat-ctx-fill { background: linear-gradient(90deg, var(--accent), var(--accent-grad)); }
.chat-ctx-pop-bar.over .chat-ctx-fill { background: var(--danger); }
.chat-ctx-cats { display: flex; flex-direction: column; gap: 6px; }
.chat-ctx-cat { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.chat-ctx-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chat-ctx-dot.messages { background: var(--accent); }
.chat-ctx-dot.tools { background: var(--ctx-tools); }
.chat-ctx-dot.system { background: var(--ctx-system); }
.chat-ctx-dot.other { background: var(--ctx-other); }
.chat-ctx-cat-pct { margin-left: auto; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chat-ctx-hit { display: flex; align-items: center; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.chat-ctx-hit-v { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 768px) {
	.chat-meter .chat-ctx-bar { display: none; } /* mini 条让位密度，弹层内仍有完整进度条 */
	.chat-meter-pop { left: auto; right: 0; transform: none; }
}

.chat-queue { display: flex; align-items: flex-start; gap: 8px; margin: 0 14px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--warn-soft); }
.chat-queue-label { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 11.5px; font-weight: 700; color: var(--warn); padding-top: 3px; }
.chat-queue-label svg { width: 13px; height: 13px; }
.chat-queue-items { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.chat-queue-item { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 4px 8px; }
.chat-queue-tag { flex: none; font-size: 10.5px; font-weight: 650; color: var(--text-2); background: var(--panel-2); border-radius: 99px; padding: 1px 8px; white-space: nowrap; }
.chat-queue-tag.steer { color: var(--accent); background: var(--accent-soft); }
.chat-queue-text { flex: 1; min-width: 0; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-queue-x { flex: none; display: inline-flex; padding: 2px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); cursor: pointer; }
.chat-queue-x:hover { color: var(--danger); background: var(--danger-soft); }
.chat-queue-x svg { width: 12px; height: 12px; }
@media (max-width: 768px) {
	.chat-queue { flex-direction: column; gap: 5px; }
	.chat-queue-items { width: 100%; }
}

/* —— 任务卡片弹窗（会话式）：正文 = 任务完整会话记录，操作条吸底 —— */
.modal-panel.task-modal { width: min(880px, 100%); height: min(82vh, 900px); height: min(82dvh, 900px); }
.task-modal .modal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 20px 16px; overflow: hidden; }
.task-modal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }

/* 顶部元信息行：状态/模型/模式/运行态/定时 一行排开 */
.task-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 30px; }
.task-meta .grow { flex: 1; }
.task-status-chip {
	display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--text);
	background: var(--panel-2); border: 1px solid var(--border); border-radius: 99px; padding: 3px 10px;
}
.task-status-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.task-schedule-chip {
	display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--accent);
	background: var(--accent-soft); border: 1px solid rgba(79, 70, 229, 0.25); border-radius: 99px; padding: 2px 4px 2px 9px;
}
.task-schedule-chip svg { width: 12px; height: 12px; }
.task-schedule-chip .btn-icon { width: 18px; height: 18px; color: var(--text-3); }
.task-schedule-chip .btn-icon:hover { color: var(--danger); background: var(--danger-soft); }

/* 会话记录区：占满剩余高度，内部滚动（复用会话页消息样式） */
.task-transcript-wrap { flex: 1; min-height: 0; display: flex; }
.task-transcript { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg); }
.task-transcript .chat-body { flex: 1; min-height: 0; }

/* 操作条（吸底）：运行控制 + 通过/驳回 + 定时流转 */
.task-actions {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none;
	padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border);
}
.task-actions .grow { flex: 1; }
.task-actions .decision-bar { padding: 0; margin: 0; background: none; border: none; }

@media (max-width: 640px) {
	.modal-panel.task-modal { height: 92dvh; }
	.task-actions .btn { padding: 6px 10px; font-size: 12.5px; }
}
.task-transcript { position: relative; }
.task-meta .run-state { margin-left: 0; }

/* ================================================================
   空间文件页（#/files，2026-08-26 上传 + 交互重排）
   ================================================================ */
.files-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.files-toolbar .fp-crumbs { flex: 1; min-width: 180px; margin-bottom: 0; }
.files-selbar {
	display: flex; align-items: center; gap: 10px; padding: 7px 12px; margin-bottom: 8px;
	background: var(--accent-soft); border-radius: 10px; font-size: 12.5px; color: var(--text-2);
}
.files-drop { position: relative; }
.files-drop.dragging::after {
	content: "松开上传到当前目录"; position: absolute; inset: 0; z-index: 5; pointer-events: none;
	display: flex; align-items: center; justify-content: center;
	background: var(--accent-soft); border: 2px dashed var(--accent); border-radius: 12px;
	color: var(--accent); font-weight: 600; font-size: 14px;
}
.files-head, .file-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; }
.files-head { font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--border); margin-bottom: 2px; }
.file-row { border-radius: 10px; cursor: pointer; user-select: none; font-size: 13px; }
.file-row:hover { background: var(--accent-soft); }
.file-row.picked { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.files-head input[type="checkbox"], .file-row input[type="checkbox"] { width: 15px; height: 15px; flex: none; margin: 0; accent-color: var(--accent); }
.file-row .fcb { width: 15px; height: 15px; flex: none; }
.fico { width: 20px; flex: none; display: flex; color: var(--text-3); }
.fico svg { width: 17px; height: 17px; }
.file-row:hover .fico, .file-parent .fico { color: var(--accent); }
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsize { width: 80px; flex: none; text-align: right; color: var(--text-3); font-size: 12px; }
.ftime { width: 130px; flex: none; color: var(--text-3); font-size: 12px; }
.fdl { width: 34px; flex: none; display: flex; justify-content: center; }
.fdl-btn { min-height: 0; padding: 4px 6px; }
.files-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 0; color: var(--text-3); font-size: 13px; }
.files-empty svg { width: 34px; height: 34px; opacity: 0.45; }
.files-empty p { margin: 0; }
.files-uploads { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.files-uploads:empty { display: none; }
.up-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.up-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.up-row > svg { width: 14px; height: 14px; flex: none; color: var(--text-3); }
.up-row.st-done > svg { color: var(--accent); }
.up-row.st-failed > svg { color: var(--danger); }
.up-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-bar { width: 120px; flex: none; height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; }
.up-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.15s; }
.up-st { flex: none; color: var(--text-3); font-size: 12px; }
.up-row.st-failed .up-st { color: var(--danger); }

@media (max-width: 640px) {
	.files-head .ftime, .file-row .ftime { display: none; }
	.up-bar { width: 72px; }
}

/* —— AI 客服悬浮窗（docs/ai-support-design.md；z-index 150：drawer/modal 之下、toasts 之上互不遮挡）—— */
/* 可拖动改位（2026-09-04）：touch-action:none 让触屏拖动不滚屏；位置由 JS 内联 left/top 接管（记忆于 localStorage） */
/* 默认右侧垂直居中（2026-09-05，原右下角会遮挡会话页发送/停止圆钮；24px = 球高 48 的一半） */
.support-fab {
	position: fixed; right: 20px; top: calc(50% - 24px); z-index: 150;
	width: 48px; height: 48px; border-radius: 50%; border: none; cursor: grab;
	touch-action: none;
	display: flex; align-items: center; justify-content: center;
	color: #fff; background: linear-gradient(135deg, var(--accent), #7c6cf0);
	box-shadow: var(--shadow-md); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.support-fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.support-fab.dragging { cursor: grabbing; transform: none !important; transition: none; }
.support-fab svg { width: 22px; height: 22px; pointer-events: none; }
.support-panel {
	position: fixed; right: 20px; bottom: 84px; z-index: 150;
	width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100vh - 130px));
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
	box-shadow: var(--shadow-lg); animation: pop 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.support-head {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--panel-2);
}
.support-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.support-title svg { width: 18px; height: 18px; color: var(--accent); }
.support-model {
	font-size: 12px; font-weight: 400; color: var(--text-3);
	border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; background: var(--panel);
}
.support-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.support-hint { align-self: center; text-align: center; color: var(--text-3); font-size: 12.5px; line-height: 1.7; padding: 18px 12px; }
.support-msg { max-width: 86%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.65; }
.support-msg.user {
	align-self: flex-end; color: #fff; background: var(--accent);
	border-bottom-right-radius: 4px; box-shadow: var(--shadow-sm);
}
.support-msg.user .support-msg-text { white-space: pre-wrap; word-break: break-word; }
.support-msg.assistant {
	align-self: flex-start; background: var(--panel-2); border: 1px solid var(--border);
	border-bottom-left-radius: 4px;
}
.support-msg.assistant .md-render { font-size: 13px; }
.support-msg.assistant .md-render :first-child { margin-top: 0; }
.support-msg.assistant .md-render :last-child { margin-bottom: 0; }
.support-err { align-self: center; color: var(--danger); font-size: 12px; background: var(--danger-soft); border-radius: 8px; padding: 6px 10px; }
.support-typing { display: flex; gap: 5px; padding: 12px 14px; }
.support-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: support-blink 1.2s infinite; }
.support-typing span:nth-child(2) { animation-delay: 0.2s; }
.support-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes support-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.support-foot { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.support-input { flex: 1; resize: none; font-size: 13px; min-height: 62px; }

/* —— 订阅页改版（2026-09-05）：首屏状态卡 + 套餐/积分包定价卡片（docs/plans/20260905-subscribe-page-overhaul.md） —— */
.sub-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
.sub-hero .panel { margin-bottom: 0; }
.sub-hero-card { display: flex; flex-direction: column; }
.sub-hero-card .panel-body { flex: 1; display: flex; flex-direction: column; }
.sub-big { font-size: 22px; font-weight: 700; line-height: 1.25; }
.sub-big-unit { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.sub-hero-act { margin-top: 12px; display: flex; justify-content: flex-end; }
.sub-anchor { scroll-margin-top: 72px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.plan-card { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--panel); }
.plan-card.current { border-color: var(--accent); }
.plan-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price b { font-size: 24px; font-weight: 700; }
.plan-price .muted { font-size: 12.5px; }
.plan-quota { font-size: 12.5px; color: var(--text-2); }
.plan-feats { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; margin-top: 2px; }
.plan-feat { display: flex; justify-content: space-between; gap: 8px; }
.plan-feat span { color: var(--text-3); }
.plan-buy { margin-top: auto; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.pack-card { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); }
.pack-amt b { font-size: 22px; font-weight: 700; }
.pack-price { font-size: 15px; font-weight: 600; }
.pack-unit { font-size: 12px; }
.pack-card .btn { margin-top: auto; }

/* —— 原型工作台（docs/proto-workbench-design.md M2）：三栏 + 画布 —— */
.proto-banner {
	padding: 8px 14px; font-size: 12.5px; color: var(--text-2, var(--muted));
	background: color-mix(in srgb, var(--accent) 8%, transparent);
	border-bottom: 1px solid var(--border, var(--line));
}
.proto-page { flex: 1; min-height: 0; display: flex; }
.proto-side, .proto-props-side {
	width: 240px; flex: none; border-right: 1px solid var(--border, var(--line));
	background: var(--panel, #fff); overflow-y: auto; display: flex; flex-direction: column;
}
.proto-props-side { width: 280px; border-right: 0; border-left: 1px solid var(--border, var(--line)); padding: 10px 12px; gap: 8px; }
.proto-side-sec { padding: 10px 12px; border-bottom: 1px solid var(--border, var(--line)); }
.proto-side-sec.grow-sec { flex: 1; min-height: 0; overflow-y: auto; border-bottom: 0; }
.proto-side-title { font-size: 12.5px; font-weight: 650; color: var(--text-2, #64748b); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.proto-side .select { width: 100%; }
.proto-files { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow-y: auto; }
.proto-file {
	display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px;
	font-size: 12.5px; cursor: pointer; border: 1px solid transparent;
}
.proto-file:hover { background: var(--hover, rgba(148,163,184,.12)); }
.proto-file.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.proto-file-kind {
	flex: none; width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center;
	font-size: 11px; color: #fff; background: var(--accent);
}
.proto-file-kind.k-component { background: #64748b; }
.proto-file-kind.k-restored { background: #94a3b8; }
.proto-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proto-file-lock { flex: none; font-size: 11px; }
.proto-comp-group { margin-bottom: 10px; }
.proto-comp-group-title { font-size: 11.5px; color: var(--text-2, #64748b); margin-bottom: 6px; }
.proto-comp-items { display: flex; flex-wrap: wrap; gap: 6px; }
.proto-comp {
	padding: 4px 10px; border: 1px solid var(--border, var(--line)); border-radius: 8px; background: var(--panel, #fff);
	font-size: 12.5px; cursor: pointer;
}
.proto-comp:hover { border-color: var(--accent); color: var(--accent); }
.proto-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.proto-toolbar {
	display: flex; align-items: center; gap: 8px; padding: 8px 12px;
	border-bottom: 1px solid var(--border, var(--line)); background: var(--panel, #fff); flex-wrap: wrap;
}
.proto-title { width: 220px; padding: 5px 9px; font-size: 13px; }
.proto-dirty { font-size: 12px; }
.proto-dirty-on { color: var(--warn, #d97706); }
.proto-canvas-box { flex: 1; min-height: 0; overflow: auto; position: relative; background: #eef2f7; }
.px-canvas-root { position: relative; }
.px-canvas-root .px-node { cursor: grab; }
.px-canvas-root .px-node.locked { cursor: not-allowed; }
.px-canvas-root .px-node.selected { outline: 2px solid var(--accent); outline-offset: 1px; }
.px-canvas-root .px-node.walk { outline: 3px solid #d97706; outline-offset: 2px; }
.px-node-tag {
	position: absolute; top: -9px; left: 8px; padding: 0 7px; border-radius: 999px;
	background: var(--accent); color: #fff; font-size: 10.5px; line-height: 17px; white-space: nowrap; pointer-events: none;
}
.px-node.locked .px-node-tag { background: #64748b; }
.px-resize-se {
	position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize;
	background: linear-gradient(135deg, transparent 50%, var(--accent) 50%); border-bottom-right-radius: 10px;
}
.px-guides { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.px-guide { position: absolute; background: #f43f5e; }
.px-guide.v { top: 0; bottom: 0; width: 1px; }
.px-guide.h { left: 0; right: 0; height: 1px; }
.px-walkbar {
	position: sticky; bottom: 10px; margin: 0 auto; width: fit-content; display: flex; align-items: center; gap: 10px;
	padding: 6px 12px; border-radius: 999px; background: var(--panel, #fff); border: 1px solid var(--border, var(--line));
	box-shadow: 0 8px 24px rgba(15, 23, 42, .18); z-index: 30;
}
.px-walk-info { font-size: 12.5px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proto-props { display: flex; flex-direction: column; gap: 10px; }
.proto-props-empty { font-size: 12.5px; }
.proto-prop-row { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.proto-prop-row label { color: var(--text-2, #64748b); }
.proto-prop-check { flex-direction: row; align-items: center; gap: 8px; }
.proto-prop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
@media (max-width: 900px) {
	.proto-page { flex-direction: column; overflow-y: auto; }
	.proto-side, .proto-props-side { width: auto; border: 0; border-bottom: 1px solid var(--border, var(--line)); }
	.proto-canvas-box { min-height: 60vh; }
}
