.conversation-controls { display:flex; flex-direction:column; gap:10px; width:100%; min-width:0; box-sizing:border-box; }
.conversation-user, .conversation-heading, .conversation-settings { display:flex; align-items:center; gap:8px; min-width:0; }
.conversation-user .select { min-width:120px; max-width:200px; }
.conversation-label { font-size:12px; font-weight:600; color:var(--muted, #757a84); }
.conversation-history { border:1px solid var(--line, #dfe2e8); border-radius:12px; overflow:hidden; background:var(--panel, #fff); }
.conversation-heading { padding:5px 10px; justify-content:space-between; border-bottom:1px solid var(--line, #e8eaf0); }
.conversation-heading .btn { font-size:12px; padding:4px 8px; min-height:28px; }
.conversation-list { max-height:156px; overflow-y:auto; overscroll-behavior:contain; padding:4px; }
.conversation-item { display:flex; align-items:center; border-radius:8px; min-width:0; }
.conversation-item:hover { background:rgba(120,130,150,.08); }
.conversation-item.is-selected { background:rgba(0,104,220,.09); box-shadow:inset 3px 0 #0875de; }
.conversation-open { flex:1; display:flex; flex-direction:column; gap:3px; min-width:0; border:0; background:none; padding:8px 12px; text-align:left; color:inherit; cursor:pointer; font:inherit; }
.conversation-title { display:block; width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; font-weight:550; }
.conversation-meta { font-size:11px; color:var(--muted, #757a84); line-height:1.4; }
.conversation-rename-button { flex:none; margin-right:8px; padding:5px 7px; border:0; background:none; color:var(--muted, #757a84); font-size:11px; cursor:pointer; border-radius:5px; }
.conversation-rename-button:hover { color:#0875de; background:rgba(0,104,220,.07); }
.conversation-rename { display:flex; gap:5px; align-items:center; padding:8px; border-top:1px solid var(--line, #e8eaf0); }
.conversation-rename[hidden] { display:none; }
.conversation-rename input { min-width:0; flex:1; padding:6px 8px; border:1px solid var(--line, #dfe2e8); border-radius:6px; font:inherit; }
.conversation-settings { flex-wrap:wrap; }
.conversation-settings .select { min-width:0; max-width:100%; flex:1 1 100px; }
.conversation-empty { padding:18px 10px; color:var(--muted, #757a84); text-align:center; font-size:12px; }
.conversation-open:focus-visible, .conversation-rename-button:focus-visible { outline:2px solid #0875de; outline-offset:-2px; }
/* Compact navigation leaves the conversation visible on 13-inch displays. */
.conversation-history .conversation-heading { padding:4px 8px; border-bottom:0; min-height:36px; }
.conversation-toggle { display:flex; align-items:center; gap:10px; min-width:0; flex:1; text-align:left; padding:6px; border:0; background:none; color:inherit; font:inherit; cursor:pointer; }
.conversation-toggle .conversation-title { font-weight:500; }
.conversation-chevron { color:var(--text-3, #858a94); font-size:15px; }
.conversation-list[hidden] { display:none; }
.conversation-list:not([hidden]) { border-top:1px solid var(--hair, #e8eaf0); }
.conversation-user .sess-work { margin-left:auto; font-size:12px; }
.conversation-settings .select { min-height:32px; border-radius:8px; background-color:var(--surface, #fff); }
.conversation-history .conversation-heading > .btn { flex:none; }
@media (max-height:800px) { .conversation-list { max-height:136px; } .conversation-controls { gap:8px; } }
.task-progress { margin:12px 0 0; }
.task-checklist { border:1px solid var(--hair,#ddd); border-radius:10px; padding:10px; margin:8px 0; font-size:12px; }
.task-checklist summary { cursor:pointer; font-weight:600; overflow-wrap:anywhere; }
.task-step { display:flex; flex-direction:column; gap:3px; padding:6px 0; }.task-step span { color:var(--text-2,#777); }
.task-step.is-completed { color:#268649; }.task-step.is-waiting_review { color:#af6b0c; }.task-step.is-blocked { color:#be3a30; }

.conversation-controls { gap:12px; }
.conversation-heading .btn { min-height:36px; }
.conversation-toggle .conversation-title { white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
.conversation-settings-panel { border:1px solid var(--hair, #e1e4e8); border-radius:12px; padding:10px 12px; background:var(--surface, #fff); }
.conversation-settings-panel > summary { cursor:pointer; font-size:13px; line-height:1.6; color:var(--text-2, #555); }
.conversation-settings-panel .conversation-settings { margin-top:12px; gap:10px; }
.conversation-settings .select { min-height:38px; }

/* Composer footer: one line of controls; panels open above without moving messages. */
.conversation-controls.is-compact { position:relative; flex-direction:row; align-items:center; gap:8px; padding-top:4px; }
.is-compact .conversation-history { flex:1; min-width:0; border:0; border-radius:0; background:none; overflow:visible; }
.is-compact .conversation-heading { padding:0; min-height:32px; }
.is-compact .conversation-toggle { padding:5px 0; gap:6px; }
.is-compact .conversation-toggle .conversation-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12px; color:var(--text-2,#555); }
.is-compact .conversation-list:not([hidden]), .is-compact .conversation-settings {
 position:absolute; bottom:calc(100% + 12px); left:0; right:0; z-index:5;
 max-height:min(55dvh,420px); overflow:auto; overscroll-behavior:contain; margin:0;
 padding:12px; background:var(--surface,#fff); border:1px solid var(--hair,#ddd); border-radius:14px;
 box-shadow:0 8px 36px #0002;
}
.is-compact .conversation-list > .conversation-user { margin-bottom:8px; }
.is-compact .conversation-list > .btn { margin:0 0 8px; }
.is-compact .conversation-settings-panel { flex:none; padding:0; border:0; background:none; }
.is-compact .conversation-settings-panel > summary { list-style:none; padding:6px; border-radius:7px; font-size:12px; white-space:nowrap; }
.is-compact summary::-webkit-details-marker { display:none; }
.is-compact .conversation-settings-panel > summary::after { content:'⌄'; margin-left:6px; }
.is-compact details[open] > summary { background:var(--accent-soft,#edf4ff); color:var(--accent,#0875de); }
.is-compact .conversation-settings-panel .conversation-settings { margin-top:0; }
.task-progress:empty::before { content:'这条会话还没有制作计划'; color:var(--text-2,#777); font-size:12px; }
.is-compact summary:focus-visible, .is-compact .conversation-toggle:focus-visible { outline:2px solid var(--accent,#0875de); outline-offset:2px; }
@media(max-width:480px) { .conversation-controls.is-compact { gap:2px; } .is-compact .conversation-settings-panel > summary { padding:6px 4px; } }
/* Persistent overview below the assistant header, independent of the scrolling chat. */
.assistant-progress-host { flex:none; padding:0 24px; max-height:40dvh; overflow:auto; overscroll-behavior:contain; border-bottom:1px solid var(--hair,#e5e7eb); }
.assistant-progress-host .task-progress { margin:0; }
.task-roadmap { font-size:12px; color:var(--text,#26313f); }
.task-roadmap-heading { display:flex; gap:12px; align-items:baseline; justify-content:space-between; margin:6px 0; }
.task-roadmap-heading > strong { font-size:13px; overflow-wrap:anywhere; }
.task-stage-count { color:var(--text-2,#697386); white-space:nowrap; }
.task-focus { display:flex; flex-direction:column; gap:4px; padding:8px 10px; background:var(--accent-soft,#eef5ff); border-radius:9px; }
.task-focus > strong { color:var(--accent,#076cd3); }
.task-focus-detail { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.5; }
.task-attention { color:#ad5416; line-height:1.5; }
.task-stage-track { display:flex; list-style:none; gap:6px; padding:0; margin:9px 0; overflow:auto; }
.task-stage-track > li { flex:1 0 100px; min-width:0; border-top:3px solid #dbe1ea; }
.task-stage-track > .is-completed { border-color:#37916e; }
.task-stage-track > .is-in_progress { border-color:#0875de; }
.task-stage-track > .is-blocked { border-color:#c95039; }
.task-stage-track > .is-waiting_review { border-color:#c98b20; }
.task-stage { display:flex; flex-direction:column; gap:3px; width:100%; height:100%; padding:7px; background:transparent; border:0; color:inherit; text-align:left; cursor:pointer; font:inherit; border-radius:0 0 7px 7px; }
.task-stage:hover,.task-stage[aria-expanded=true] { background:var(--accent-soft,#eef5ff); }
.task-stage-label,.task-stage-state { color:var(--text-2,#697386); font-size:11px; }
.is-in_progress .task-stage-state::before { content:''; display:inline-block; width:7px; height:7px; margin-right:5px; border:1px solid #aacbef; border-top-color:#0875de; border-radius:50%; animation:task-spin .9s linear infinite; }
.task-stage-detail { padding:10px; background:var(--surface,#f8fafc); border:1px solid var(--hair,#e5e7eb); border-radius:8px; line-height:1.55; }
.task-stage-detail p { margin:4px 0 8px; white-space:pre-wrap; overflow-wrap:anywhere; }
.task-step { display:block; padding:6px 0 6px 10px; border-left:2px solid #e5e7eb; margin:5px 0; }
.task-step > summary { cursor:pointer; font-weight:600; }
.task-step-detail { color:var(--text-2,#697386); }
.task-finished,.task-history { margin:6px 0; color:var(--text-2,#697386); }
.task-finished > summary,.task-history > summary,.task-history-plan > summary { cursor:pointer; padding:5px 0; }
.task-progress-empty { margin:4px 0; color:var(--text-2,#697386); font-size:12px; }
.task-progress-error { color:#b63c27; }
.task-stage:focus-visible { outline:2px solid #0875de; outline-offset:-2px; }
@keyframes task-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .is-in_progress .task-stage-state::before { animation:none; } }
@media(max-width:600px) { .assistant-progress-host { padding:0 16px; max-height:40dvh; } .task-roadmap-heading { flex-wrap:wrap; gap:3px; } .task-stage-track > li { flex-basis:95px; } }

/* Account health stays visible even when the settings picker is collapsed. */
.conversation-account-status { display:flex; flex-wrap:wrap; align-items:center; gap:5px 12px; padding:9px 12px; border:1px solid var(--hair,#dce3eb); border-radius:10px; background:var(--surface,#fff); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.conversation-account-status progress { width:90px; height:7px; accent-color:#238768; }
.conversation-account-status.is-error { border-color:#e6a797; background:#fff3ed; color:#9a351f; }
.conversation-account-status.is-error strong { font-size:13px; }
.conversation-switch-help { flex-basis:100%; margin:4px 0; font-size:12px; color:var(--text-2,#666); line-height:1.5; }
.conversation-controls.is-compact { flex-wrap:wrap; }
.is-compact > .conversation-account-status { flex:1 0 100%; box-sizing:border-box; }
/* Scoped Goal summary: keep the composer and chat available in the existing drawer. */
.native-goal { font-size:13px; padding:10px 0; color:var(--text,#26313f); }
.native-goal-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin:4px 0; }
.native-goal-title { font-weight:600; margin:6px 0; overflow-wrap:anywhere; }
.native-goal-state { color:var(--accent,#076cd3); }
.native-goal-state.state-blocked,.native-goal-state.state-budgetLimited,.native-goal-state.state-usageLimited { color:#a16009; }
.native-goal-state.state-complete { color:#248268; }
.native-goal-meta { color:var(--muted,#667384); font-size:12px; margin:4px 0; overflow-wrap:anywhere; }
.native-goal-error { color:#ad4545; font-size:12px; margin:5px 0; overflow-wrap:anywhere; }
.native-goal-error:empty { display:none; }
.native-goal-meter { display:block; width:100%; height:7px; appearance:none; border:0; border-radius:6px; overflow:hidden; margin:8px 0; background:#e9edf3; }
.native-goal-meter::-webkit-progress-bar { background:#e9edf3; }
.native-goal-meter::-webkit-progress-value { background:var(--accent,#076cd3); }
.native-goal-meter::-moz-progress-bar { background:var(--accent,#076cd3); }
.native-production,.native-goal-budget { margin-top:10px; }
.native-goal summary { cursor:pointer; color:var(--accent,#076cd3); }
.native-production-group { margin:12px 0; padding-top:8px; border-top:1px solid var(--hair,#e5e7eb); }
.native-production-stages { display:flex; flex-wrap:wrap; gap:12px; margin:8px 0; }
.native-production-stages > div { flex:1 1 90px; min-width:0; }
.native-unit { margin:6px 0; font-size:12px; }
.native-goal-budget input { width:130px; max-width:100%; padding:5px; margin:6px; }
.native-goal-budget button { margin:6px 0; }

/* Assistant goal: one status line (dot · state · goal · 详情); everything else folds below it. */
.assistant-goal { font-size:13px; color:var(--text,#26313f); }
.assistant-goal-line { display:flex; align-items:center; gap:8px; min-height:40px; min-width:0; }
.assistant-goal-dot { flex:none; width:8px; height:8px; border-radius:50%; background:var(--text-3,#9aa1ab); }
.assistant-goal-dot.tone-working { background:var(--accent,#076cd3); animation:assistant-goal-pulse 1.4s ease-in-out infinite; }
.assistant-goal-dot.tone-done { background:#248268; }
.assistant-goal-dot.tone-warn { background:#c98b20; }
.assistant-goal-dot.tone-error { background:#c4473a; }
.assistant-goal-state { flex:none; font-size:12.5px; font-weight:600; white-space:nowrap; color:var(--text-2,#555); }
.assistant-goal-state.tone-working { color:var(--accent,#076cd3); }
.assistant-goal-state.tone-done { color:#248268; }
.assistant-goal-state.tone-warn { color:#a16009; }
.assistant-goal-state.tone-error { color:#ad4545; }
.assistant-goal-title { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
.assistant-goal-count { flex:none; font-size:12px; color:var(--text-2,#697386); font-variant-numeric:tabular-nums; }
.assistant-goal-line .btn { flex:none; min-height:28px; padding:2px 10px; font-size:12px; }
.assistant-goal-toggle { flex:none; margin-left:auto; display:inline-flex; align-items:center; gap:4px; padding:4px 8px; border:0; border-radius:7px; background:none; color:var(--accent,#076cd3); font:inherit; font-size:12.5px; cursor:pointer; }
.assistant-goal-toggle::after { content:'⌄'; font-size:13px; line-height:1; transform:translateY(-2px); }
.assistant-goal-toggle[aria-expanded=true]::after { content:'⌃'; transform:translateY(2px); }
.assistant-goal-toggle:hover, .assistant-goal-toggle[aria-expanded=true] { background:var(--accent-soft,#edf4ff); }
.assistant-goal-toggle:focus-visible { outline:2px solid var(--accent,#0875de); outline-offset:1px; }
.assistant-goal-title + .assistant-goal-toggle, .assistant-goal-count + .assistant-goal-toggle { margin-left:0; }
.assistant-goal > .native-goal-error { margin:0 0 6px; }
.assistant-goal-detail { padding:2px 0 12px; border-top:1px dashed var(--hair,#e5e7eb); }
.assistant-goal-detail .native-goal { padding:8px 0 4px; }
.assistant-goal-detail .native-goal-head:first-child .native-goal-state { font-size:12.5px; }
@keyframes assistant-goal-pulse { 0%,100% { opacity:1; } 50% { opacity:.35; } }
@media(prefers-reduced-motion:reduce) { .assistant-goal-dot.tone-working { animation:none; } }
@media(max-width:480px) { .assistant-goal-count { display:none; } .assistant-goal-line { gap:6px; } }

/* Codex quota as a chip in the compact composer row; the full box opens above it. */
.conversation-quota { flex:none; position:static; }
.conversation-quota > summary { list-style:none; display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border-radius:7px; font-size:12px; color:var(--text-2,#555); white-space:nowrap; cursor:pointer; font-variant-numeric:tabular-nums; }
.conversation-quota > summary::-webkit-details-marker { display:none; }
.conversation-quota > summary::before { content:''; width:7px; height:7px; border-radius:50%; background:#238768; }
.conversation-quota > summary:hover { background:rgba(120,130,150,.08); }
.is-compact .conversation-quota > .conversation-account-status { position:absolute; bottom:calc(100% + 12px); left:0; right:0; z-index:5; box-shadow:0 8px 36px #0002; }

/* 第二轮（2026-10-08）：目标行只有警告/出错才上色，正常状态用灰字，
   抬头的「执行中」已经回答了「在不在干活」，这里不再抢一份颜色。 */
.assistant-goal-state { font-weight:500; }
.assistant-goal-state.tone-working, .assistant-goal-state.tone-done { color:var(--text-2,#555); }
.assistant-goal-title { font-weight:400; }
.assistant-goal-toggle { font-size:12px; }
/* 会话名后的 ⌄ 紧跟着名字，不再被撑到行尾、看着像旁边模型选择的箭头 */
.is-compact .conversation-toggle { flex:0 1 auto; }
.is-compact .conversation-toggle .conversation-title { width:auto; flex:0 1 auto; }
.is-compact .conversation-chevron { font-size:12px; }
