/* 剧本 Harness · 暖灰单色 + 淡色语义色（参考 taste-skill / minimalist-ui）
   无渐变、无重阴影；边框 1px；圆角 8 / 12；数字用 tabular-nums */
:root {
  --bg: #FBFBFA;
  --surface: #FFFFFF;
  --sunk: #F7F6F3;
  --line: #EAEAEA;
  --line-2: #DEDDD9;
  --ink: #111111;
  --ink-2: #37352F;
  --mute: #787774;
  --faint: #A5A4A0;
  --accent: #2F3437;
  --sel: #EEF3F8;
  --sel-line: #9DB7CF;
  --red-bg: #FDEBEC; --red: #9F2F2D;
  --green-bg: #EDF3EC; --green: #346538;
  --yellow-bg: #FBF3DB; --yellow: #956400;
  --blue-bg: #E1F3FE; --blue: #1F6C9F;
  --purple-bg: #F1EEFA; --purple: #5B4A9E;
  --sans: "SF Pro Text", "PingFang SC", "Helvetica Neue", "Hiragino Sans GB", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, monospace;
  --r: 8px;
  --r-lg: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink-2); font: 14px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
}
button, select, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--sel-line); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
kbd {
  font: 11px var(--mono); padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; background: var(--sunk); color: var(--mute);
}
.num { font-variant-numeric: tabular-nums; }

#app { display: grid; grid-template-rows: auto 1fr; height: 100vh; }
/* 看板、对话、输入框共用一条内容轨道，左右对齐 */
:root { --lane: 864px; --gut: 28px; }

/* ---------------- 按钮 */
.primary, .ghost, .link, .icon, .chip-btn {
  border: 1px solid transparent; background: none; border-radius: 6px;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s, transform .08s;
}
.primary { background: var(--accent); color: #fff; padding: 5px 14px; font-weight: 500; }
.primary:hover { background: #111; }
.primary:active, .ghost:active, .chip-btn:active { transform: scale(.98); }
.primary:disabled { background: #C9C8C4; cursor: default; }
.ghost { border-color: var(--line); background: var(--surface); padding: 4px 12px; color: var(--ink-2); }
.ghost:hover { border-color: var(--line-2); background: var(--sunk); }
.ghost.danger { color: var(--red); }
.ghost:disabled { color: var(--faint); cursor: default; }
.link { color: var(--mute); padding: 2px 6px; font-size: 12px; }
.link:hover { color: var(--ink); background: var(--sunk); }
.icon { width: 28px; height: 28px; display: inline-grid; place-items: center; color: var(--mute); }
.icon:hover { background: var(--sunk); color: var(--ink); }
.sm { font-size: 12px; padding: 2px 10px; }

/* ---------------- 顶栏 */
.top {
  display: flex; align-items: center; gap: 20px; padding: 0 20px; height: 48px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); letter-spacing: -.01em;
  border: 0; background: none; padding: 5px 8px; margin-left: -8px; border-radius: 8px;
}
.brand:hover, .brand[aria-expanded="true"] { background: var(--sunk); }
.brand .chev { color: var(--faint); }
/* 顶栏按钮：同一种样式（文字 + 悬停底色），开关态用浅底 */
.tb {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 10px;
  border-radius: 6px; font-size: 13px; color: var(--mute);
}
.tb:hover { background: var(--sunk); color: var(--ink); }
.tb.on { color: var(--ink); background: var(--sunk); }
.mark { width: 14px; height: 14px; border-radius: 4px; background: var(--ink); position: relative; }
.mark::after { content: ""; position: absolute; inset: 4px 3px 4px 7px; background: #fff; border-radius: 1px; }
.seg { display: flex; padding: 2px; border-radius: 8px; background: var(--sunk); gap: 2px; }
.seg button {
  border: 0; background: none; padding: 3px 12px; border-radius: 6px; color: var(--mute); font-size: 13px;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.rt { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--mute); }
.rt .bar { width: 120px; height: 4px; background: var(--sunk); border-radius: 2px; overflow: hidden; }
.rt .bar i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .4s var(--ease); }
/* 不定进度：一集都还没读完时来回滑动，表示"在跑" */
.rt .bar.indet i { width: 35%; animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
.rt-sec { color: var(--faint); min-width: 3.5em; }
.rt-eps { color: var(--ink-2); max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-label { color: var(--mute); }
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 360px; max-height: 60vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
}
.menu.left { left: 0; right: auto; width: 320px; }
.menu-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; }
.menu-item:hover { background: var(--sunk); }
.menu-item:disabled { opacity: .45; cursor: default; background: none; }
.menu-item .t .sp { flex: 1; }
.menu-item .t .tt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item .faint { color: var(--faint); font-size: 12px; }
.menu-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 8px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 10px;
  font-size: 12px; color: var(--mute);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.menu-item .t { color: var(--ink); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.menu-item .s { color: var(--mute); font-size: 12px; }
.menu-empty { padding: 14px 10px; color: var(--mute); font-size: 13px; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu-head { font-size: 11px; color: var(--faint); padding: 6px 10px 2px; }

.seg.sm button { padding: 1px 10px; font-size: 12px; }

/* ---------------- 主区 */
.main { display: flex; min-height: 0; }
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-scroll { flex: 1; overflow-y: auto; scroll-behavior: smooth; }
.chat-inner { max-width: calc(var(--lane) + var(--gut) * 2); margin: 0 auto; padding: 24px var(--gut) 12px; }
.composer-wrap { padding: 0 var(--gut) 18px; flex: none; position: relative; }
/* 输入框三层：上 = 引用 chip（在看的文件 / 范围）；中 = 自适应输入；下 = 加素材 · 用量 · 模型 · 圆形发送
   宽度跟随中栏：最宽 960，窄屏铺满 */
.composer {
  max-width: min(960px, 100%); margin: 0 auto; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 18px; padding: 10px 10px 8px 16px; transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
.composer:focus-within { border-color: #BDBCB8; box-shadow: 0 4px 16px rgba(0, 0, 0, .05); }
.composer.drag { border-color: var(--sel-line); background: var(--sel); }
.composer-ctx { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.composer-ctx:empty { display: none; }
.composer-ctx + #input { margin-top: 6px; }
#input {
  display: block; width: 100%; border: 0; outline: 0; resize: none; background: none; padding: 4px 0;
  min-height: 48px; max-height: 40vh; line-height: 1.6; font-size: 14px; color: var(--ink);
}
#input::placeholder { color: var(--faint); }
.composer-bar { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.composer-bar .sp { flex: 1; }
.composer-bar select {
  border: 0; background: none; color: var(--mute); font-size: 12px; padding: 4px 6px; border-radius: 8px;
}
.composer-bar select:hover { background: var(--sunk); color: var(--ink); }
.cbtn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; color: var(--mute); flex: none;
}
.cbtn:hover { background: var(--sunk); color: var(--ink); border-color: var(--line-2); }
.send {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; flex: none;
  display: inline-grid; place-items: center; transition: background .15s, opacity .15s, transform .08s;
}
.send:hover { background: #111; }
.send:active { transform: scale(.95); }
.send:disabled { background: #D6D5D1; cursor: default; }
.send.stop { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.send.stop:hover { background: var(--sunk); }
/* 拖文件进来时整页蒙一层 */
.drop-mask {
  position: fixed; inset: 0; z-index: 60; background: rgba(238, 243, 248, .72); display: grid; place-items: center;
  pointer-events: none;
}
.drop-mask > div {
  padding: 18px 26px; border: 1.5px dashed var(--sel-line); border-radius: 14px; background: var(--surface);
  color: var(--blue); font-size: 14px;
}
.fgrp.drop-on > .fdir { background: var(--sel); color: var(--blue); }
/* 引用 chip：在看的文件 / 选中的范围 */
.ctx-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 4px 2px 8px; border-radius: 8px;
  background: var(--sunk); color: var(--ink-2); border: 1px solid var(--line); max-width: 320px;
}
.ctx-chip .ct { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-chip svg { flex: none; color: var(--mute); }
.ctx-chip button { border: 0; background: none; color: var(--mute); padding: 0 4px; border-radius: 4px; line-height: 1; }
.ctx-chip button:hover { background: var(--line); color: var(--ink); }
.ctx-chip.off { opacity: .55; }
.ctx-chip.off .ct { text-decoration: line-through; }

/* ---------------- 对话 */
.msg { margin-bottom: 22px; animation: rise .28s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; }
.bubble {
  max-width: 82%; background: var(--sunk); padding: 8px 14px; border-radius: 14px; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.msg.user .meta { font-size: 11px; color: var(--faint); margin-bottom: 4px; }
.prose { color: var(--ink-2); word-break: break-word; }
.prose p { margin: 0 0 8px; }
.prose ul, .prose ol { margin: 0 0 8px; padding-left: 20px; }
.prose li { margin: 2px 0; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose code { font: 12px var(--mono); background: var(--sunk); padding: 1px 4px; border-radius: 4px; }
.prose h3, .prose h4 { font-size: 14px; font-weight: 500; color: var(--ink); margin: 12px 0 4px; }
.prose h3 { font-size: 15px; }
.prose > :first-child { margin-top: 0; }
.prose li > ul, .prose li > ol { margin: 2px 0 0; }
.prose em { font-style: italic; }
.prose del { color: var(--faint); }
.math { font-family: "Cambria Math", "STIX Two Math", var(--sans); white-space: nowrap; margin: 0 1px; }
.math sup, .math sub { font-size: .75em; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.prose blockquote { margin: 0 0 8px; padding: 2px 0 2px 12px; border-left: 3px solid var(--line); color: var(--mute); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose pre { margin: 0 0 8px; padding: 8px 10px; background: var(--sunk); border-radius: 6px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; white-space: pre; }
.prose .tbl-wrap { overflow-x: auto; margin: 4px 0 10px; }
.prose .tbl-wrap .doc-tbl { margin: 0; }
/* 集号链接：正文里的虚线下划线文字，不再是一块块灰底按钮 */
.eplink {
  border: 0; background: none; padding: 0; color: inherit; font-size: inherit; line-height: inherit;
  text-decoration: underline dashed var(--faint); text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.eplink:hover { color: var(--blue); text-decoration-color: var(--blue); }

/* ---------------- 过程区：运行中 = 带流光边框的状态胶囊 + 实时步骤；结束 = 一行可展开的摘要
   流光边框参考 libraries.dev/beam（rotate 款），用 conic-gradient + @property 角度动画实现，不引第三方库 */
@property --beam { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.proc { margin: 2px 0 10px; }
.proc.bare { display: none; }
.proc-head {
  position: relative; display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  font-size: 12.5px; color: var(--mute); background: transparent; border: 1px solid transparent;
  padding: 3px 10px 3px 8px; border-radius: 999px; isolation: isolate;
}
.proc-head .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proc-head .tm { color: var(--faint); font-size: 11.5px; }
.proc-head .tm:empty, .proc-head .meta:empty { display: none; }
.proc-head .meta { font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--sunk); color: var(--mute); }
.proc-head .chev { color: var(--faint); transition: transform .18s var(--ease); display: none; }
.proc.done .proc-head { cursor: pointer; padding-left: 6px; }
.proc.done .proc-head .chev { display: inline-block; order: -1; }
.proc.done:not(.fold) .proc-head .chev { transform: rotate(90deg); }
.proc.done .proc-head:hover { background: var(--sunk); color: var(--ink-2); }
.proc.done .orb { display: none; }

/* 运行中：白底胶囊 + 沿边框转动的单色蓝灰流光（取自界面选中色，不跳色、无光晕） */
.proc { --beam-c: #7E9DBB; }
.proc.live .proc-head { background: var(--surface); border-color: var(--line); cursor: default; color: var(--ink-2); }
.proc.live .proc-head::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--beam), transparent 0 62%, var(--sel-line) 82%, var(--beam-c) 92%, transparent 99%);
  animation: beam 2.8s linear infinite;
  padding: 1.2px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
@keyframes beam { to { --beam: 360deg; } }

/* 状态光点：同色静止小圆，只做提示不做动画 */
.orb { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--beam-c); }

/* 状态短语：微光扫过 + 换句时轻轻上浮 */
.proc.live .lbl {
  background: linear-gradient(90deg, var(--mute) 0 38%, var(--ink) 50%, var(--mute) 62% 100%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 2.2s linear infinite;
}
.proc.live .lbl.swap { animation: lblin .34s var(--ease), shimmer 2.2s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -160% 0; } }
@keyframes lblin { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* 步骤列表 */
.proc-list { list-style: none; margin: 6px 0 0 13px; padding: 0 0 0 14px; border-left: 1px solid var(--line); }
.proc-list:empty { display: none; }
.proc.fold .proc-list { display: none; }
.ps { font-size: 12px; color: var(--mute); padding: 2px 0; animation: rise .26s var(--ease); }
.ps-row { display: flex; align-items: center; gap: 8px; min-height: 20px; border-radius: 6px; }
.ps-lb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-tm { margin-left: auto; padding-left: 10px; color: var(--faint); font-size: 11px; flex: none; }
.ps-ic { position: relative; width: 12px; height: 12px; flex: none; border-radius: 50%; margin-left: -21px;
  background: var(--bg); box-shadow: 0 0 0 3px var(--bg); }
.ps.run { color: var(--ink-2); }
.ps.run .ps-ic { border: 1.5px solid var(--line-2); border-top-color: var(--beam-c); animation: spin .8s linear infinite; }
.ps.ok .ps-ic { background: var(--green-bg); }
.ps.ok .ps-ic::after {
  content: ""; position: absolute; left: 4px; top: 2px; width: 3px; height: 6px;
  border: solid var(--green); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.ps.err { color: var(--red); }
.ps.err .ps-ic { background: var(--red-bg); }
.ps.err .ps-ic::before, .ps.err .ps-ic::after {
  content: ""; position: absolute; left: 5.25px; top: 2.5px; width: 1.5px; height: 7px; background: var(--red); border-radius: 1px;
}
.ps.err .ps-ic::before { transform: rotate(45deg); }
.ps.err .ps-ic::after { transform: rotate(-45deg); }
/* 思考：运行中是和其他步骤一致的转圈；结束后是淡紫小圆 */
.ps.think .ps-ic { background: var(--purple-bg); }
.ps.think.ok .ps-ic::after { content: none; }
.ps.think.ok .ps-ic::before {
  content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--purple);
  opacity: .55;
}
.ps.think.has-body .ps-row { cursor: pointer; }
.ps.think.has-body .ps-row:hover .ps-lb { color: var(--ink-2); }
.ps.think.has-body .ps-lb::after { content: " ›"; color: var(--faint); }
.ps.think.has-body.open .ps-lb::after { content: " ⌄"; }
.think-body {
  margin: 4px 0 4px; padding: 6px 10px; border-radius: 8px; background: var(--sunk);
  font-size: 12px; line-height: 1.7; color: var(--mute); white-space: pre-wrap; word-break: break-word;
  max-height: 7.2em; overflow: hidden;
}
/* 运行中内容超过三四行时，顶部渐隐，像一段不断往上滚的思绪 */
.think-body.over { -webkit-mask: linear-gradient(to bottom, transparent 0, #000 2.2em); mask: linear-gradient(to bottom, transparent 0, #000 2.2em); }
.ps.think.has-body:not(.open) .think-body { display: none; }
.ps.think.has-body.open .think-body { max-height: 22em; overflow-y: auto; }
.ps.think.en .think-body { font-size: 11.5px; line-height: 1.6; }
.ps.note { color: var(--faint); font-style: italic; }
.ps.note .ps-ic { background: transparent; }
.ps.note .ps-ic::after { content: ""; position: absolute; left: 4px; top: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }

.spin {
  width: 10px; height: 10px; border: 1.5px solid var(--line-2); border-top-color: var(--ink); border-radius: 50%;
  display: inline-block; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.working { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); }
.working .stop { margin-left: 6px; }
.status:empty { display: none; }
.prose.muted { color: var(--faint); }
.banner {
  display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--yellow); background: var(--yellow-bg);
  padding: 8px 12px; border-radius: 8px; margin-bottom: 16px;
}
.banner .link { margin-left: auto; color: var(--yellow); }

/* 卡片：方案 / 提案组 */
.card {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin: 10px 0;
  overflow: hidden;
}
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.card-head .kicker { font-size: 11px; color: var(--mute); }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.card-head .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--sunk); color: var(--mute); white-space: nowrap; }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.warn { background: var(--yellow-bg); color: var(--yellow); }
.badge.bad { background: var(--red-bg); color: var(--red); }
.badge.info { background: var(--blue-bg); color: var(--blue); }
.diag { padding: 0 14px 10px; color: var(--ink-2); font-size: 13px; }
.plan-items { border-top: 1px solid var(--line); }
.plan-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); align-items: start; }
.plan-item:last-child { border-bottom: 0; }
.plan-item .ep { font-size: 12px; color: var(--ink); font-weight: 500; padding-top: 1px; }
.plan-item .ch { color: var(--ink); font-size: 13px; }
.plan-item .why { color: var(--mute); font-size: 12px; }
.plan-item .delta { font-size: 11px; color: var(--mute); white-space: nowrap; text-align: right; }
.delta .up { color: var(--blue); }
.card-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--sunk); border-top: 1px solid var(--line); }
.card-foot .note { font-size: 12px; color: var(--mute); }
.card-foot .right { margin-left: auto; display: flex; gap: 6px; }
.card.plan { transition: border-color .15s; }
.card.plan:hover { border-color: var(--sel-line); }
.card.plan.settled { opacity: .7; }
.card.plan.settled:hover { border-color: var(--line); }
.card-head .ttl { font-variant-numeric: tabular-nums; }
.prop-group-head .cnt { color: var(--faint); }
.prop-group-head .sp { flex: 1; }
.prop-top .st:empty { display: none; }
.ghost.strong { color: var(--ink); font-weight: 500; }
.ghost.strong:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.rej-box { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.rej-box input {
  flex: 1; border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 10px; font-size: 12px; outline: 0; background: var(--surface);
}
.rej-box input:focus { border-color: #BDBCB8; }

.prop-group { border-top: 1px solid var(--line); }
.prop-group-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 12px; color: var(--mute);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.prop-group-head b { color: var(--ink); font-weight: 500; font-size: 13px; }
.prop { padding: 10px 14px; border-bottom: 1px solid var(--line); transition: background .2s, opacity .2s; outline: 0; }
.prop:last-child { border-bottom: 0; }
.prop.done { opacity: .55; }
.prop:not(.done):hover, .prop:not(.done):focus-within { background: var(--bg); }
.prop:focus-visible { box-shadow: inset 2px 0 0 var(--sel-line); }
.prop-top { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.prop-top .reason { color: var(--ink); font-size: 13px; flex: 1; min-width: 0; }
/* 单条按钮：悬停 / 聚焦时才出现（占位保留，不跳动）；触屏常显 */
.prop-top .acts { display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.prop:hover .acts, .prop:focus-within .acts, .prop:focus .acts { opacity: 1; }
@media (hover: none) { .prop-top .acts { opacity: 1; } }
.prop .fact { margin-top: 6px; font-size: 12px; color: var(--yellow); background: var(--yellow-bg); padding: 3px 8px; border-radius: 6px; display: inline-block; }
.diff {
  margin-top: 8px; font: 13px/1.75 var(--serif); color: var(--ink-2); white-space: pre-wrap; word-break: break-word;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; max-height: 260px; overflow: auto;
}
.diff del { background: var(--red-bg); color: var(--red); text-decoration: line-through; text-decoration-color: rgba(159, 47, 45, .45); }
.diff ins { background: var(--green-bg); color: var(--green); text-decoration: none; }
.diff .ctx { color: var(--faint); }

.result { font-size: 13px; padding: 10px 14px; border-radius: var(--r-lg); background: var(--green-bg); color: var(--green); margin: 10px 0; }
.result.warn { background: var(--yellow-bg); color: var(--yellow); }
.result .acts { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.result .acts button { font-size: 12px; }
.result .chk { font-size: 12px; opacity: .8; margin-top: 2px; }
.err-line { color: var(--red); background: var(--red-bg); padding: 8px 12px; border-radius: 8px; font-size: 13px; margin: 8px 0; }
/* 用量行：数据全保留；改为细分隔点 + 更低对比，不和正文抢视线 */
.usage {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0;
  font-size: 11px; color: var(--faint); margin-top: 8px; font-variant-numeric: tabular-nums;
}
.usage > span + span::before { content: "·"; margin: 0 8px; color: var(--line-2); }
.usage .why { color: var(--mute); }
.usage .u-item b { font-weight: 500; color: var(--mute); margin-left: 3px; }
.usage .u-item.hit.good b { color: var(--green); }
.usage .u-item.hit.mid b { color: var(--yellow); }
.usage .u-item i { font-style: normal; margin-left: 6px; padding: 0 5px; border-radius: 4px; font-size: 10.5px; }
.usage .u-item .saved { background: var(--green-bg); color: var(--green); }
.usage .u-item .peak { background: var(--yellow-bg); color: var(--yellow); }
.usage .u-model { color: var(--mute); }
/* 复制：用量行右端的轻按钮，不加分隔点 */
.usage .u-copy {
  margin-left: auto; font-size: 11px; color: var(--mute); background: transparent;
  border: 1px solid transparent; border-radius: 5px; padding: 1px 7px; cursor: pointer;
}
.usage .u-copy::before { content: none; }
.usage .u-copy:hover { background: var(--sunk); color: var(--ink-2); border-color: var(--line); }
.usage .u-copy.done { color: var(--green); }
.sess-usage { font-size: 11.5px; color: var(--faint); cursor: default; }
.prose.streaming > :last-child::after {
  content: ""; display: inline-block; width: 6px; height: 1em; margin-left: 2px; vertical-align: -2px;
  background: var(--faint); animation: blink 1s steps(2) infinite;
}
.prose.streaming:empty::after { content: ""; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .prose.streaming > :last-child::after { animation: none; } }

/* 空状态 */
.empty { padding: 3vh 0 8px; }
.empty h1 {
  font: 500 28px/1.2 var(--serif); letter-spacing: -.02em; color: var(--ink); margin: 0 0 8px;
}
.empty .sect { margin-top: 4px; }
/* 首页统计压成一行 */
.stat-line { margin: 0 0 22px; font-size: 13px; color: var(--mute); }
.stat-line b { color: var(--ink); font-weight: 500; }
.stat-line i { font-style: normal; color: var(--line-2); margin: 0 10px; }
.starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.starter {
  text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg);
  padding: 12px 14px; transition: border-color .15s, background .15s;
}
.starter:hover { border-color: var(--line-2); background: var(--sunk); }
.starter .t { color: var(--ink); font-size: 13px; font-weight: 500; }
.starter .s { color: var(--mute); font-size: 12px; margin-top: 2px; }
.starter .sc { font-size: 11px; color: var(--blue); margin-top: 6px; }

/* ---------------- 联动面板 */
.panel {
  width: min(46vw, 720px); border-left: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; min-width: 0; animation: slide .22s var(--ease);
}
@keyframes slide { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.panel.full { position: fixed; inset: 0; width: auto; z-index: 40; border: 0; }
.panel.full .panel-body { max-width: 860px; margin: 0 auto; width: 100%; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); }
.panel-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.panel-title h2 { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-actions { display: flex; gap: 2px; }
.panel-body { flex: 1; overflow-y: auto; padding: 16px 24px 40px; }
/* 正文 / 审读：并入标题栏右侧的小分段控件 */
.panel-title .tabs { margin-left: auto; flex: none; }
.panel-title .badge { flex: none; }
.script { font: 15px/1.95 var(--serif); color: var(--ink-2); }
.script h3 {
  font: 500 13px/1.5 var(--sans); color: var(--mute); margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid var(--line);
  letter-spacing: .01em;
}
.script h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.script p { margin: 0 0 6px; }
.script .who { color: var(--ink); font-weight: 500; font-family: var(--sans); font-size: 14px; }
.script .act { color: var(--faint); }
.script .ppl { font: 12px var(--sans); color: var(--faint); }
.script mark { background: var(--yellow-bg); color: inherit; border-radius: 2px; padding: 0 1px; }
.script mark.obs { background: var(--purple-bg); }
.script .pend { box-shadow: inset 2px 0 0 var(--green); padding-left: 8px; margin-left: -10px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.fact-box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.fact-box .k { font-size: 11px; color: var(--mute); }
.fact-box .v { font-size: 15px; color: var(--ink); font-weight: 500; }
.fact-box .n { font-size: 12px; color: var(--mute); line-height: 1.45; margin-top: 2px; }
.sect { margin: 18px 0 8px; font-size: 12px; color: var(--mute); display: flex; align-items: center; gap: 8px; }
.sect::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.line-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; font-size: 13px; }
.line-item .q { font-family: var(--serif); color: var(--ink); }
.line-item .w { color: var(--mute); font-size: 12px; margin-top: 2px; }
.line-item .f { color: var(--green); font-size: 12px; margin-top: 2px; }
.line-item .f::before { content: "改法  "; color: var(--faint); }
.ai-note { font-size: 11px; color: var(--faint); margin-top: 10px; }
.line-item .q.quote { font-size: 12px; color: var(--mute); margin-top: 4px; }
.li-acts { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.li-acts .link { margin: 0; }
.sect .link { margin-left: auto; order: 2; color: var(--ink-2); }
.sect:has(.link)::after { order: 1; }
/* 读取中 */
.reading-box {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 14px;
  border-radius: 10px; background: var(--blue-bg); color: var(--blue);
}
.reading-box .spin { margin-top: 4px; border-top-color: var(--blue); }
.reading-box .t { font-size: 13px; font-weight: 500; }
.reading-box .s { font-size: 12px; opacity: .85; margin-top: 2px; }
.skel-lines { display: grid; gap: 8px; margin-bottom: 16px; }
.skel-lines i { display: block; height: 10px; border-radius: 4px; background: var(--sunk); animation: pulse 1.4s infinite; }
.review-body.dim { opacity: .45; pointer-events: none; }
.summary { font: 14px/1.8 var(--serif); color: var(--ink); margin: 0 0 12px; }
.notes { font-size: 12px; color: var(--mute); display: grid; gap: 4px; margin-bottom: 4px; }
.notes b { color: var(--ink-2); font-weight: 500; margin-right: 8px; }
.people { display: grid; gap: 4px; font-size: 13px; }
.people b { color: var(--ink); font-weight: 500; margin-right: 8px; }
.panel-empty { padding: 24px 0; color: var(--mute); font-size: 13px; }
.script-legend { display: flex; gap: 14px; font-size: 11px; color: var(--mute); margin-bottom: 12px; align-items: center; }
.script-legend mark { background: var(--yellow-bg); padding: 0 4px; border-radius: 2px; margin-right: 4px; color: var(--yellow); }
.script-legend mark.obs { background: var(--purple-bg); color: var(--purple); }
.pend-bar { display: inline-block; width: 2px; height: 11px; background: var(--green); margin-right: 5px; vertical-align: middle; }
.round-meta { font-size: 12px; color: var(--mute); margin-bottom: 8px; }
.round-acts { display: flex; gap: 6px; margin-bottom: 8px; }
.diff.tall { max-height: none; }
.round-ep { margin-bottom: 18px; }
.round-ep h4 { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.cmp { display: flex; gap: 14px; font-size: 12px; color: var(--mute); margin-bottom: 6px; }
.cmp b { color: var(--ink); font-weight: 500; }
.cmp .up { color: var(--blue); }
.cmp .down { color: var(--red); }

/* ---------------- 弹窗 / 提示 */
dialog {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px 14px; width: 400px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .08); color: var(--ink-2);
}
dialog::backdrop { background: rgba(251, 251, 250, .7); }
dialog p { margin: 0 0 14px; white-space: pre-wrap; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 13px; padding: 7px 14px; border-radius: 8px;
  transition: opacity .2s, transform .2s var(--ease); z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.actionable.show { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding-right: 6px; }
.toast .tact {
  border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 6px;
}
.toast .tact:hover { background: rgba(255, 255, 255, .26); }

@media (max-width: 1100px) {
  .panel { width: 52vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------- 对标重写 */
.ne-check { margin: 8px 0 6px; padding: 8px 10px; border-radius: var(--r); background: var(--blue-bg); color: var(--blue); font-size: 12px; line-height: 1.6; }
.ne-check.warn { background: var(--yellow-bg); color: var(--yellow); }
.ne-check b { font-weight: 500; margin-right: 6px; }
.ne-miss, .ne-ai { margin-top: 4px; color: var(--ink-2); }
.ne-guide { margin: 0 0 6px; padding: 8px 10px; border-radius: var(--r); background: var(--sunk); color: var(--ink-2); font-size: 12px; line-height: 1.6; }
.ne-guide.warn { background: var(--yellow-bg); }
.ne-guide summary { cursor: pointer; }
.ne-guide b { font-weight: 500; color: var(--ink); margin-right: 6px; }
.ne-guide .sum { margin-top: 4px; color: var(--ink); }
.ne-guide ul { margin: 4px 0 0; padding-left: 16px; }
.ne-guide li { margin: 3px 0; }
.ne-guide .fix { color: var(--mute); }
.ne-guide .hint { margin-top: 4px; color: var(--mute); }
.ne-full { margin-top: 6px; font-size: 12px; }
.ne-full summary { cursor: pointer; color: var(--blue); }
.ne-text { max-height: 420px; overflow-y: auto; margin-top: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.ne-text .script, .script.small { font-size: 13px; line-height: 1.8; }
.script.small h3 { font-size: 13px; }
.script .beat { font: 12px/1.6 var(--sans); color: var(--ink-2); }
.script .bid { color: var(--mute); margin-right: 6px; }
.script .btag { font-size: 10px; padding: 0 5px; border-radius: 999px; background: var(--green-bg); color: var(--green); margin-right: 6px; }
.script .btag.guess { background: var(--yellow-bg); color: var(--yellow); }
.script .role { font: 12px var(--sans); color: var(--purple); margin-right: 4px; }
.pair-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; color: var(--mute); margin-bottom: 12px; }
.pair-meta .sp { flex: 1; }
.pair-meta .stale { color: var(--yellow); }
.pair-meta .ev { color: var(--ink-2); }
.pair-meta .gate { color: var(--yellow); }
.pair-meta .ok-tag { font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--green-bg); color: var(--green); }
.pair-meta .ok-tag + .link { margin-left: -8px; }
.ghost.strong { color: var(--ink); border-color: var(--line-2); font-weight: 500; }
/* 同一集三份文件的切换 */
.seg.trio { flex: none; }
.seg.trio button { white-space: nowrap; }
/* 文件面板编辑模式 */
.edit-bar {
  display: flex; align-items: center; gap: 8px; position: sticky; top: -16px; z-index: 2;
  margin: -4px 0 10px; padding: 6px 0; background: var(--surface); font-size: 12px; color: var(--mute);
}
.edit-bar .sp { flex: 1; }
.edit-bar .kbd {
  margin-left: 4px; font: 10px var(--mono); padding: 0 4px; border-radius: 3px;
  background: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .85);
}
.doc-edit {
  display: block; width: 100%; min-height: calc(100vh - 220px); resize: vertical;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  font: 13px/1.8 var(--mono); color: var(--ink); tab-size: 2;
}
.doc-edit:focus { outline: none; border-color: var(--sel-line); box-shadow: 0 0 0 3px var(--sel); }

/* ---------------- 文件夹式项目（对标重写）：左文件栏 / 中对话 / 右单文件 */
.files {
  width: 248px; flex: none; border-right: 1px solid var(--line); background: var(--sunk);
  display: flex; flex-direction: column; min-height: 0;
}
/* 左栏上半：项目 → 会话 */
.side-head { display: flex; align-items: center; gap: 6px; padding: 10px 8px 4px 14px; }
.side-lbl { font-size: 11px; font-weight: 500; color: var(--faint); letter-spacing: .04em; flex: none; }
.side-head .side-lbl { flex: 1; }
.proj-list { max-height: 42vh; overflow-y: auto; padding: 0 6px 8px; border-bottom: 1px solid var(--line); flex: none; }
.pgrp { margin-bottom: 2px; }
.prow { display: flex; align-items: center; }
.pchev { flex: none; width: 18px; height: 26px; border: 0; background: none; display: grid; place-items: center; border-radius: 4px; color: var(--faint); }
.pchev:hover:not(:disabled) { background: rgba(0, 0, 0, .04); }
.pchev:disabled { cursor: default; }
.pchev[aria-expanded="true"] .fchev { transform: rotate(90deg); }
.pname {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; border: 0; background: none; text-align: left;
  padding: 4px 6px; border-radius: 6px; font-size: 13px; color: var(--ink-2);
}
.pname:hover { background: rgba(0, 0, 0, .04); }
.pgrp.cur .pname { color: var(--ink); font-weight: 500; }
.pico { flex: none; color: var(--mute); }
.pn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slist { padding-left: 24px; }
.sitem {
  display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; text-align: left;
  padding: 3px 8px; border-radius: 6px; font-size: 12px; color: var(--mute);
}
.sitem:hover { background: rgba(0, 0, 0, .04); color: var(--ink); }
.sitem.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.sitem.draft { cursor: default; font-style: italic; }
.sitem .spin { width: 10px; height: 10px; flex: none; }
.sico { flex: none; color: var(--faint); }
.st { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stm { flex: none; font-size: 10px; color: var(--faint); }
.smore, .snew { display: block; border: 0; background: none; padding: 2px 8px; font-size: 12px; color: var(--faint); border-radius: 6px; }
.smore:hover, .snew:hover { color: var(--ink); background: rgba(0, 0, 0, .04); }
.sempty { padding: 2px 8px 4px; font-size: 12px; color: var(--faint); }
/* 左栏下半：当前项目里的文件 */
.files-head { display: flex; align-items: center; gap: 6px; padding: 10px 8px 6px 14px; }
.files-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.files-body { flex: 1; overflow-y: auto; padding: 0 6px 16px; }
/* 账号：顶栏右上头像 + 左栏底部账号条（两处打开同一份菜单） */
.avatar {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 500; line-height: 1;
}
.acct-btn {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 3px 10px 3px 4px;
  border-radius: 999px; font-size: 13px; color: var(--ink-2);
}
.acct-btn:hover { background: var(--sunk); color: var(--ink); }
.acct-name { max-width: 9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot-wrap { flex: none; border-top: 1px solid var(--line); padding: 6px; }
.side-foot {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left;
  padding: 6px 8px; border-radius: 8px; font-size: 13px; color: var(--ink-2);
}
.side-foot:hover { background: rgba(0, 0, 0, .04); color: var(--ink); }
.side-foot .sf-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .chev { color: var(--faint); flex: none; }
.menu.up { top: auto; bottom: calc(100% + 4px); left: 6px; right: auto; width: 260px; }
.acct-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 6px; }
.acct-head .avatar { width: 30px; height: 30px; font-size: 14px; }
.acct-head .an { font-size: 13px; color: var(--ink); font-weight: 500; }
.acct-head .ap { font-size: 12px; color: var(--mute); }
.fgrp { margin-bottom: 2px; }
.fdir {
  display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; text-align: left;
  padding: 5px 8px; border-radius: 6px; font-size: 13px; color: var(--ink-2);
}
.fdir:hover { background: rgba(0, 0, 0, .04); }
.fchev { color: var(--faint); transition: transform .15s var(--ease); flex: none; }
.fdir[aria-expanded="true"] .fchev { transform: rotate(90deg); }
.fdn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcount { font-size: 11px; color: var(--faint); }
.flist { padding-left: 14px; }
.fitem {
  display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; text-align: left;
  padding: 3px 8px; border-radius: 6px; font-size: 13px; color: var(--mute);
}
.fitem:hover { background: rgba(0, 0, 0, .04); color: var(--ink); }
.fitem.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.fitem .fn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fempty { padding: 3px 8px 6px; font-size: 12px; color: var(--faint); }
.fb { flex: none; font-size: 10px; padding: 0 5px; border-radius: 999px; background: var(--line); color: var(--mute); }
.fb.info { background: var(--blue-bg); color: var(--blue); }
.fb.warn { background: var(--yellow-bg); color: var(--yellow); }
.fb.run { background: none; padding: 0; }
.fb.run .spin { width: 10px; height: 10px; }
/* 文件内容 */
.doc { font-size: 14px; line-height: 1.8; }
.doc-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 14px; }
.doc-tbl th, .doc-tbl td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
.doc-tbl th { background: var(--sunk); font-weight: 500; color: var(--ink); }
.subs { font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.subs p { margin: 0 0 4px; }
.subs .ts { color: var(--faint); font-size: 11px; margin-right: 8px; }
.subs .sh { color: var(--ink); font-weight: 500; margin-top: 8px; }
.script h1 { font-size: 16px; font-weight: 500; color: var(--ink); margin: 0 0 12px; font-family: var(--sans); }
.script .snd { color: var(--blue); font: 12px var(--sans); }
.script .flash { color: var(--purple); font: 12px var(--sans); }

/* 任务列表卡：AI 维护，编剧只看；进行中转圈、完成打勾，全部完成后自动收起 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.card.todos { --beam-c: #7E9DBB; }
.todo-head { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 10px 14px; }
.todo-head:focus-visible { outline: 2px solid var(--sel-line); outline-offset: -2px; border-radius: var(--r-lg); }
.todo-head h3 { font-size: 13px; }
.todo-head .chev { margin-left: auto; color: var(--faint); transform: rotate(90deg); transition: transform .15s var(--ease); }
.card.todos.fold .todo-head .chev { transform: none; }
.card.todos.fold .todo-list { display: none; }
.todo-list { list-style: none; margin: 0; padding: 2px 14px 10px; border-top: 1px solid var(--line); }
.td { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.td-ic { position: relative; flex: none; width: 13px; height: 13px; margin-top: 3px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.td.in_progress { color: var(--ink); font-weight: 500; }
.td.in_progress .td-ic { border-top-color: var(--beam-c); animation: spin .8s linear infinite; }
.card.todos.settled .td.in_progress .td-ic { animation: none; border-top-color: var(--line-2); }
.td.completed { color: var(--mute); }
.td.completed .td-tx { text-decoration: line-through; text-decoration-color: var(--faint); }
.td.completed .td-ic { border-color: var(--green-bg); background: var(--green-bg); }
.td.completed .td-ic::after {
  content: ""; position: absolute; left: 3.5px; top: 1px; width: 3px; height: 6px;
  border: solid var(--green); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
@media (prefers-reduced-motion: reduce) { .td.in_progress .td-ic { animation: none; border-color: var(--beam-c); } }

/* ---------------- 核心设定确认卡 / 写集提醒卡 / 常驻条 / 待审总览 */
.card.bible-card { border-color: #E6D7A8; }
.card.bible-card .kicker { color: var(--yellow); }
.card.bible-card.settled { border-color: var(--line); opacity: .75; }
.card.bible-card.settled .kicker { color: var(--mute); }
.bc-item { padding: 10px 14px; border-top: 1px solid var(--line); }
.bc-item.done { opacity: .6; }
.bc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bc-top .reason { flex: 1; min-width: 0; color: var(--ink); font-size: 13px; }
.bc-body { max-height: 360px; overflow-y: auto; font-size: 13px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.bc-body > :first-child { margin-top: 0; }
.bc-diff { margin-top: 6px; font-size: 12px; }
.bc-diff summary { cursor: pointer; color: var(--mute); }

.card.gate-card { border-color: #E6D7A8; background: var(--yellow-bg); }
.card.gate-card.settled { background: var(--surface); border-color: var(--line); }
.gate-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.gate-ic { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow); color: #fff; font: 600 12px/18px var(--sans); text-align: center; }
.gate-card.settled .gate-ic { background: var(--faint); }
.gate-tx { flex: 1; min-width: 200px; display: flex; flex-direction: column; font-size: 13px; color: var(--ink-2); }
.gate-tx b { color: var(--ink); font-weight: 500; }
.gate-row .right { display: flex; gap: 6px; margin-left: auto; }

.ne-pre { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; padding: 6px 10px; border-radius: var(--r); background: var(--yellow-bg); color: var(--yellow); font-size: 12px; }
.ne-pre-slot:empty { display: none; }

.composer-pend-bar {
  max-width: min(960px, 100%); width: 100%; margin: 0 auto 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.pb-bar-item {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; font-size: 12px;
  padding: 6px 12px; border-radius: 10px; white-space: nowrap; transition: border-color .15s, background .15s;
}
.pb-bar-item.bible { border: 1px solid #E6D7A8; background: var(--yellow-bg); color: var(--yellow); }
.pb-bar-item.bible:hover { border-color: var(--yellow); }
.pb-bar-item.general { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.pb-bar-item.general:hover { border-color: #BDBCB8; background: var(--sunk); }
.pb-bar-item b { font-weight: 500; flex: none; }
.pb-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; }
.pb-bar-item.bible .pb-dot { background: var(--yellow); }
.pb-bar-item.general .pb-dot { background: var(--blue); }
.pb-s { color: var(--ink-2); opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.pb-go { margin-left: auto; white-space: nowrap; font-weight: 500; flex: none; }
.pb-rest-btn {
  flex: none; font-size: 12px; padding: 4px 10px; border-radius: 8px; color: var(--mute);
  background: var(--surface); border: 1px solid var(--line); white-space: nowrap;
}
.pb-rest-btn:hover { color: var(--ink); background: var(--sunk); border-color: var(--line-2); }

.bible-pre {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 12px;
  border: 1px solid #E6D7A8; background: var(--yellow-bg); border-radius: var(--r-lg); font-size: 12px;
}
.bp-tx { flex: 1; min-width: 200px; display: flex; flex-direction: column; color: var(--ink-2); }
.bp-tx b { color: var(--yellow); font-weight: 500; font-size: 13px; }
.bible-pre .right { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.card.pend-group { margin: 0 0 12px; }
.card.pend-group .prop-group-head { border-top: 0; }
.pend-empty { color: var(--mute); font-size: 13px; }
.stat-line .stat-pend { font-size: inherit; padding: 0 4px; color: var(--blue); }

/* 场次调整提案 */
.rs-list { margin: 4px 0 6px; font-size: 12px; line-height: 1.7; }
.rs-row { display: flex; gap: 6px; align-items: center; }
.rs-row b { font-weight: 500; min-width: 34px; }
.rs-from { color: var(--ink-2); margin-left: auto; }
.rs-del { color: var(--red, #c0392b); }
