/*!
 * director-agent.css — 导演 Agent Beta 主区 / 右侧长期聊天
 * 依赖项目既有主题变量（studio-design.css / core.css）：
 *   --bg --surface --surface-2 --text --muted --line --accent --accent-2 --on-accent --soft --success --warning --danger --radius
 * 不引入新的品牌色；所有颜色由现有主题变量派生，夜间/日间主题自动适配。
 */

.da-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.da-shell *,
.da-shell *::before,
.da-shell *::after { box-sizing: border-box; }
.da-shell button,
.da-shell input,
.da-shell textarea,
.da-shell select { font: inherit; color: inherit; }
.da-shell h1, .da-shell h2, .da-shell h3, .da-shell h4, .da-shell h5, .da-shell p { margin: 0; }
.da-shell h1 { font-size: 21px; line-height: 1.35; }
.da-shell h2 { font-size: 19px; line-height: 1.4; }
.da-shell h3 { font-size: 16px; line-height: 1.45; }
.da-shell h4 { font-size: 14px; line-height: 1.45; }
.da-shell h5 { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.da-shell p { line-height: 1.75; }
.da-shell small { font-size: 12px; color: var(--muted); }
.da-shell a { color: var(--accent); text-decoration: none; }
.da-shell a:hover { text-decoration: underline; }
.da-shell :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.da-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  min-width: 0;
}
.da-brand { min-width: 0; }
.da-brand-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-width: 0; }
.da-brand-line h1 { font-weight: 650; letter-spacing: -0.01em; }
.da-project { color: var(--muted); font-size: 13px; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-meta { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-top: 7px; font-size: 12px; color: var(--muted); }
.da-meta-item { white-space: nowrap; }
.da-connection::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; background: var(--success); vertical-align: middle; }
.da-header-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.da-eyebrow { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* ---------- Buttons / chips / badges ---------- */
.da-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--surface-2) 72%, var(--surface));
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
.da-button:hover:enabled { background: var(--surface-2); }
.da-button:disabled { opacity: 0.5; cursor: not-allowed; }
.da-button-primary { background: var(--accent); color: var(--on-accent); }
.da-button-primary:hover:enabled { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.da-button-secondary { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--accent); }
.da-button-ghost { background: transparent; color: var(--muted); }
.da-button-ghost:hover:enabled { background: var(--soft); color: var(--text); }
.da-button-danger { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); color: var(--danger); }
.da-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.da-chip-ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 28%, var(--line)); background: color-mix(in srgb, var(--success) 7%, transparent); }
.da-chip-warn { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, var(--line)); background: color-mix(in srgb, var(--warning) 7%, transparent); }
.da-chip-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, transparent); }
.da-chip-info { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); }
.da-chip-beta { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.da-chip-camera { border-color: color-mix(in srgb, var(--accent-2) 40%, var(--line)); color: var(--accent-2); }
.da-chip-style { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); }
.da-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}
.da-badge-ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, var(--line)); background: color-mix(in srgb, var(--success) 9%, var(--surface)); }
.da-badge-warn { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, var(--line)); background: color-mix(in srgb, var(--warning) 9%, var(--surface)); }
.da-badge-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.da-badge-info { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.da-badge-muted { color: var(--muted); }

/* ---------- Notice ---------- */
.da-notice-wrap { padding: 8px 20px 0; }
.da-notice { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; }
.da-notice-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.da-notice-error { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.da-notice-warn { border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); color: var(--warning); }
.da-notice-success { border-color: color-mix(in srgb, var(--success) 32%, var(--line)); color: var(--success); }
.da-notice-info { color: var(--text); }

/* ---------- Body layout ---------- */
.da-body {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr) var(--da-chat-width, 360px);
  flex: 1;
  min-height: 0;
  min-width: 0;
}
.da-rail {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding: 14px 12px 22px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.da-rail-head { padding: 1px 4px 7px; }
.da-rail-title { display: block; font-size: 12px; font-weight: 600; color: var(--text); }
.da-rail-scope { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.da-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}
.da-stage:hover { background: var(--soft); color: var(--text); }
.da-stage.active { color: var(--text); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); }
.da-stage-name { font-size: 13px; }
.da-stage small { font-size: 10px; white-space: nowrap; }
.da-rail-section { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.da-rail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 7px; color: var(--muted); font-size: 11px; }
.da-node-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.da-node-row:hover { background: var(--soft); }
.da-node-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.da-node-main strong { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.da-node-main small { font-size: 10px; line-height: 1.5; }
.da-node-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; max-width: 45%; }
.da-blocking { color: var(--warning); font-size: 10px; line-height: 1.4; text-align: right; }
.da-muted { color: var(--muted); font-size: 12px; line-height: 1.7; }
.da-small-note { color: var(--muted); font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.da-error { color: var(--danger); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.da-warning { color: var(--warning); font-size: 12px; line-height: 1.6; }
.da-success { color: var(--success); font-size: 12px; line-height: 1.6; }
.da-mono { font-family: ui-monospace, Consolas, monospace; }
.da-pre { max-height: 300px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.da-slot, .da-slot-line { font-family: ui-monospace, Consolas, monospace; font-size: 10px; color: var(--muted); overflow-wrap: anywhere; }
.da-slot-line { margin: 7px 0; padding: 5px 7px; border: 1px dashed var(--line); border-radius: 6px; }

/* ---------- Main ---------- */
.da-main { min-width: 0; min-height: 0; overflow: auto; padding: 16px 20px 34px; background: var(--bg); }
.da-approvals { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.da-approvals-empty { color: var(--muted); font-size: 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.da-approvals-title { margin-top: 4px; }
.da-approvals-title h2 { font-size: 16px; }
.da-approvals-title p { color: var(--muted); font-size: 11px; margin-top: 3px; }
.da-run-bar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.da-run-title { flex: 1; min-width: 180px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.da-view { min-width: 0; }
.da-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.da-page-head h2 { margin-bottom: 4px; }
.da-page-subtitle { color: var(--muted); font-size: 12px; line-height: 1.7; max-width: 76ch; }
.da-page-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.da-panel-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.da-card { padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.da-card-title { margin-bottom: 10px; font-size: 15px; }
.da-empty { display: flex; flex-direction: column; gap: 6px; padding: 26px 20px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.da-empty strong { color: var(--text); font-size: 14px; }
.da-empty p { max-width: 60ch; margin: 0 auto; font-size: 12px; line-height: 1.75; }
.da-kv { display: grid; grid-template-columns: minmax(90px, 0.26fr) minmax(0, 1fr); gap: 10px; padding: 5px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: 12px; }
.da-kv:last-child { border-bottom: 0; }
.da-kv > span { color: var(--muted); }
.da-kv > div { min-width: 0; overflow-wrap: anywhere; }
.da-kv-list { display: flex; flex-direction: column; }
.da-field { display: flex; flex-direction: column; gap: 5px; margin: 9px 0; font-size: 12px; }
.da-field > span { color: var(--muted); }
.da-input { width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px; background: var(--surface-2); color: var(--text); font-size: 13px; line-height: 1.55; }
.da-input:hover { border-color: color-mix(in srgb, var(--accent) 18%, transparent); }
.da-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.da-textarea { resize: vertical; min-height: 82px; }
.da-input-mini { width: 88px; padding: 5px 7px; font-size: 12px; }
.da-inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; min-width: 0; }
.da-file-input { max-width: 100%; font-size: 12px; }
.da-hidden-input { display: none !important; }
.da-plain-list { margin: 4px 0 10px; padding-left: 18px; font-size: 12px; line-height: 1.75; }
.da-plain-list li { margin-bottom: 3px; overflow-wrap: anywhere; }
.da-alert { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; line-height: 1.65; }
.da-alert-warn { border-color: color-mix(in srgb, var(--warning) 30%, var(--line)); background: color-mix(in srgb, var(--warning) 5%, var(--surface)); color: var(--warning); }
.da-alert p { margin: 2px 0; overflow-wrap: anywhere; }
.da-fold { border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: var(--surface); }
.da-fold > summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.da-fold[open] > summary { color: var(--text); margin-bottom: 8px; }
.da-fold-body { font-size: 12px; min-width: 0; }
.da-decision, .da-history-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); font-size: 12px; }
.da-decision { display: block; }
.da-decision p { margin: 3px 0; color: var(--muted); overflow-wrap: anywhere; }
.da-lock-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: 11px; }
.da-lock-row span { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Approvals ---------- */
.da-approval { border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 12px; background: var(--surface); padding: 14px 15px; min-width: 0; }
.da-approval-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.da-approval-head h3 { margin-top: 2px; }
.da-approval-badges { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.da-approval-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(210px, 0.75fr); gap: 16px; margin-top: 10px; }
.da-approval-grid h4 { font-size: 12px; color: var(--muted); margin: 9px 0 4px; font-weight: 600; }
.da-fee-box { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-size: 11px; }
.da-fee-box span { color: var(--muted); }
.da-fee-box strong { font-size: 15px; font-weight: 600; margin-bottom: 5px; overflow-wrap: anywhere; }
.da-approval-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.da-approval-missing { border-color: var(--warning); }
.da-reject-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.da-reject-form label { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.da-node-controls { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 9px; }

/* ---------- Plan / style / matrix / skills ---------- */
.da-style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 11px; }
.da-style-card { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.da-style-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.da-style-card h4 { font-size: 13px; }
.da-matrix-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.da-matrix-entity { min-width: 0; }
.da-matrix-entity strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.da-matrix-cards { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.da-matrix-card { display: flex; flex-direction: column; gap: 3px; width: 168px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); text-align: left; cursor: pointer; color: var(--text); min-width: 0; }
.da-matrix-card:hover { border-color: color-mix(in srgb, var(--accent) 36%, var(--line)); }
.da-matrix-card strong { font-size: 12px; }
.da-matrix-card small { font-size: 10px; overflow-wrap: anywhere; }
.da-matrix-status { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.da-skill-row { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.da-skill-row:first-of-type { border-top: 0; }
.da-skill-main { min-width: 0; }
.da-skill-main strong { font-size: 13px; overflow-wrap: anywhere; }
.da-skill-main p { font-size: 12px; color: var(--muted); margin: 4px 0; overflow-wrap: anywhere; }
.da-skill-meta { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0; }

/* ---------- Assets ---------- */
.da-asset-group { border-top: 1px solid var(--line); padding-top: 12px; }
.da-asset-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.da-state-group { margin: 10px 0 16px; }
.da-state-group h4 { margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.da-artifact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 11px; }
.da-artifact-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); min-width: 0; }
.da-artifact-card.is-stale { border-color: color-mix(in srgb, var(--warning) 45%, var(--line)); }
.da-artifact-media { background: var(--surface-2); aspect-ratio: 16 / 10; overflow: hidden; }
.da-media { display: block; width: 100%; height: 100%; object-fit: cover; }
.da-media-empty { display: grid; place-items: center; height: 100%; min-height: 118px; color: var(--muted); font-size: 11px; text-align: center; padding: 10px; background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--line) 22%, transparent) 10px 11px); }
.da-artifact-body { padding: 10px 11px 11px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.da-artifact-body header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.da-artifact-body h4 { font-size: 13px; margin-top: 1px; }
.da-artifact-badges { display: flex; gap: 4px; flex-wrap: wrap; align-items: flex-start; }
.da-artifact-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.da-edit-form { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }

/* ---------- Storyboard / tracks ---------- */
.da-group { margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.da-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.da-group-head h3 { font-size: 14px; }
.da-shot { padding: 13px 14px 10px; border-bottom: 1px solid var(--line); min-width: 0; }
.da-shot:last-child { border-bottom: 0; }
.da-shot-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.da-shot-head h4 { font-size: 14px; }
.da-shot-meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: flex-start; }
.da-shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 9px 0; }
.da-shot-grid p { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.da-track-columns { display: flex; flex-direction: column; gap: 9px; margin: 9px 0; }
.da-track-block { border: 1px solid var(--line); border-radius: 9px; padding: 8px; background: var(--surface-2); min-width: 0; }
.da-track-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.da-track-head strong { font-size: 11px; }
.da-track-head small { font-size: 10px; }
.da-track { position: relative; height: 40px; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--line) 45%, var(--surface)); }
.da-track-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.da-track-seg { position: absolute; top: 3px; bottom: 3px; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 2px 5px; border-radius: 4px; overflow: hidden; border: 1px solid transparent; min-width: 2px; }
.da-track-seg-style { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); }
.da-track-seg-camera { background: color-mix(in srgb, var(--accent-2) 15%, var(--surface)); border-color: color-mix(in srgb, var(--accent-2) 32%, transparent); color: var(--text); }
.da-track-seg-label { font-size: 10px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-track-seg small { font-size: 9px; color: var(--muted); white-space: nowrap; }
.da-track-legend { display: flex; gap: 5px 10px; flex-wrap: wrap; margin-top: 6px; font-size: 10px; }
.da-legend-item { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.da-transition-list { display: flex; flex-direction: column; gap: 6px; margin: 7px 0; }
.da-transition { padding: 8px 9px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 7px; background: var(--surface-2); font-size: 11px; }
.da-transition.is-unsupported { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); }
.da-transition-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.da-transition p { font-size: 11px; color: var(--muted); margin: 2px 0; overflow-wrap: anywhere; }
.da-lock-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.da-lock-chip { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Video / film ---------- */
.da-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.da-video-card { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); min-width: 0; }
.da-video-media { background: #000; aspect-ratio: 16 / 9; }
.da-video-media video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.da-video-media .da-media-empty { background: var(--surface-2); }
.da-video-body { padding: 10px 11px; }
.da-video-body header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.da-video-body h4 { font-size: 13px; }
.da-video-body header > div { display: flex; gap: 4px; flex-wrap: wrap; }
.da-film-media { border-radius: 9px; overflow: hidden; background: #000; margin-bottom: 9px; }
.da-film-media video { width: 100%; max-height: 420px; object-fit: contain; background: #000; }
.da-format-row { display: flex; gap: 6px 14px; flex-wrap: wrap; margin: 8px 0; }
.da-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.da-check input { accent-color: var(--accent); }
.da-export-result { margin-top: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-size: 12px; }
.da-export-result .da-link { overflow-wrap: anywhere; }

/* ---------- Chat ---------- */
.da-chat { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; border-left: 1px solid var(--line); background: var(--surface); order: 3; }
.da-chat-resizer { position: absolute; left: -3px; top: 0; bottom: 0; width: 7px; z-index: 6; cursor: col-resize; touch-action: none; }
.da-chat-resizer:hover, .da-chat-resizer:focus-visible { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.da-chat-resizer::after { content: ""; position: absolute; top: 50%; left: 3px; width: 1px; height: 34px; margin-top: -17px; background: var(--line); }
.da-chat-head { padding: 10px 13px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 7px; }
.da-chat-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.da-chat-title > div:first-child { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.da-chat-title strong { font-size: 14px; }
.da-chat-title small { font-size: 10px; }
.da-chat-meta { display: flex; align-items: center; gap: 5px 10px; flex-wrap: wrap; font-size: 10px; color: var(--muted); margin-top: 3px; width: 100%; }
.da-chat-connection::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 4px; background: var(--success); vertical-align: middle; }
.da-chat-budget { overflow-wrap: anywhere; }
.da-chat-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.da-chat-actions .da-button { min-height: 28px; padding: 3px 9px; font-size: 11px; }
.da-chat-status { padding: 0 13px; }
.da-status-card { margin-top: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 11px; }
.da-status-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.da-status-card header strong { font-size: 12px; }
.da-status-card .da-kv { grid-template-columns: 78px minmax(0, 1fr); font-size: 11px; }
.da-status-card .da-alert { margin: 7px 0; }
.da-messages { flex: 1; min-height: 0; overflow: auto; padding: 12px 13px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: auto; }
.da-chat-empty { margin: auto 0; padding: 18px 6px; text-align: center; color: var(--muted); }
.da-chat-empty strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 6px; }
.da-chat-empty p { font-size: 12px; line-height: 1.7; margin-bottom: 6px; }
.da-message { max-width: 100%; }
.da-message-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.da-message-head strong { font-size: 11px; color: var(--text); }
.da-message-head small { font-size: 10px; }
.da-message-text { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; }
.da-message-user .da-message-text { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); }
.da-message-attachments, .da-message-skills { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.da-message .da-approval { margin-top: 8px; }
.da-action-card { margin-top: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.da-action-card header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.da-action-card header strong { font-size: 12px; }
.da-action-card p { font-size: 12px; color: var(--muted); margin: 3px 0; overflow-wrap: anywhere; }
.da-action-card small { display: block; }
.da-message .da-approval-grid { grid-template-columns: 1fr; }
.da-message .da-fee-box { margin-top: 8px; }

/* ---------- Composer ---------- */
.da-chat-foot { border-top: 1px solid var(--line); padding: 9px 12px 11px; background: var(--surface); position: relative; }
.da-mention-panel { max-height: 250px; overflow: auto; margin-bottom: 8px; padding: 8px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 10px; background: var(--surface-2); }
.da-mention-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
.da-mention-head strong { font-size: 12px; }
.da-mention-head small { font-size: 10px; }
.da-mention-list { display: flex; flex-direction: column; gap: 4px; }
.da-mention-item { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 7px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.da-mention-item:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.da-mention-item strong { font-size: 12px; }
.da-mention-item small { font-size: 10px; }
.da-mention-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.da-compose-chips, .da-compose-attachments, .da-compose-skill-import, .da-compose-paste { display: flex; flex-direction: column; gap: 5px; margin-bottom: 6px; }
.da-skill-chip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 5px 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.da-skill-chip-main { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; flex: 1; }
.da-skill-chip-main strong { font-size: 11px; overflow-wrap: anywhere; }
.da-skill-chip-main small { font-size: 10px; }
.da-intent-select { padding: 3px 5px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 10px; }
.da-attachment { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 5px 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.da-attachment-main { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 1px; }
.da-attachment-main strong { font-size: 11px; overflow-wrap: anywhere; }
.da-attachment-main small { font-size: 10px; }
.da-quote { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.da-quote-ok { border-color: color-mix(in srgb, var(--success) 30%, var(--line)); color: var(--success); }
.da-quote-warn { border-color: color-mix(in srgb, var(--warning) 32%, var(--line)); color: var(--warning); }
.da-quote-danger { border-color: color-mix(in srgb, var(--danger) 32%, var(--line)); color: var(--danger); }
.da-compose-quote { margin-bottom: 6px; }
.da-paste-offer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 8px; background: var(--surface-2); font-size: 11px; }
.da-paste-offer span { flex: 1; min-width: 160px; }
.da-skill-import { display: flex; flex-direction: column; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.da-skill-import strong { font-size: 12px; }
.da-skill-import label { display: flex; flex-direction: column; gap: 3px; font-size: 10px; color: var(--muted); }
.da-composer { display: flex; flex-direction: column; gap: 6px; }
.da-composer-input { width: 100%; min-height: 74px; max-height: 220px; resize: vertical; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: 13px; line-height: 1.65; }
.da-composer-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.da-composer-input:disabled { opacity: 0.6; }
.da-composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.da-composer-tools, .da-composer-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.da-composer-toolbar .da-button { min-height: 31px; padding: 4px 10px; font-size: 12px; }
.da-purpose-select { max-width: 150px; min-height: 31px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 11px; }
.da-chat-scope { max-width: 100%; overflow-wrap: anywhere; }
.da-composer-hint { color: var(--muted); font-size: 10px; line-height: 1.5; }

/* ---------- Responsive ---------- */
.da-chat-tab { display: none; }
@media (max-width: 1100px) {
  .da-body { grid-template-columns: 200px minmax(0, 1fr); }
  .da-chat {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 94vw);
    z-index: 60;
    box-shadow: -18px 0 60px #0004;
    border-left: 1px solid var(--line);
  }
  .da-chat-resizer { display: none; }
  .da-shell[data-chat="closed"] .da-chat { display: none; }
  .da-shell[data-chat="open"] .da-chat { display: flex; }
  .da-chat-tab {
    display: inline-flex;
    position: fixed;
    right: 14px;
    bottom: 16px;
    z-index: 55;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 6px 20px #0003;
    cursor: pointer;
    font-size: 12px;
  }
  .da-shell[data-chat="open"] .da-chat-tab { display: none; }
  .da-approval-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .da-header { padding: 10px 12px; }
  .da-project { max-width: 100%; }
  .da-body { grid-template-columns: minmax(0, 1fr); }
  .da-rail {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 7px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .da-rail-head, .da-rail-section, .da-rail > .da-fold { display: none; }
  .da-stage { width: auto; flex: none; min-height: 34px; padding: 5px 10px; border-color: var(--line); }
  .da-stage small { display: none; }
  .da-main { padding: 12px 11px 96px; }
  .da-chat { width: 100vw; box-shadow: none; }
  .da-chat-tab { right: 10px; bottom: 12px; }
  .da-artifact-grid, .da-video-grid, .da-style-grid { grid-template-columns: 1fr; }
  .da-matrix-row { grid-template-columns: 1fr; gap: 6px; }
  .da-matrix-card { width: 100%; }
  .da-shot-grid { grid-template-columns: 1fr 1fr; }
  .da-approval { padding: 11px; }
  .da-approval-actions .da-button { flex: 1; }
  .da-notice-wrap { padding: 7px 11px 0; }
  .da-run-bar .da-button { flex: 1; }
}
@media (max-width: 480px) {
  .da-shot-grid { grid-template-columns: 1fr; }
  .da-header-actions { width: 100%; }
  .da-header-actions .da-button { flex: 1; }
  .da-meta { gap: 4px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .da-shell *, .da-shell *::before, .da-shell *::after { animation: none !important; transition: none !important; }
}

/* Host integration: the mount element should provide height. */
.da-host, [data-director-agent] { min-height: 0; height: 100%; }
/* ---------- 嵌入经典导演工作区右栏（railOnly：只渲染对话列） ---------- */
.da-shell--rail { background: transparent; height: 100%; }
.da-shell--rail > .da-header { display: none; }
.da-shell--rail .da-notice-wrap { padding: 0 0 8px; }
.da-shell--rail .da-body--rail { display: grid; grid-template-columns: minmax(0, 1fr); flex: 1 1 auto; min-height: 0; min-width: 0; }
.da-shell--rail .da-chat { order: 0; height: 100%; border-left: 0; background: transparent; }
.da-shell--rail .da-chat-head { padding: 0 0 8px; }
.da-shell--rail .da-chat-resizer { left: -15px; width: 15px; }
.da-shell--rail .da-chat-status { padding: 0; }
.da-shell--rail .da-messages { padding: 4px 0 10px; }
.da-shell--rail .da-chat-foot { padding: 10px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.da-shell--rail .da-chat-head { padding-top: 0; }
.da-shell--rail .da-composer { border: 0; background: transparent; padding: 0; }
.da-shell--rail .da-composer-hint { display: none; }

/* ---------- 右栏 = 对话框（第二版：去掉说明文字，只留对话） ---------- */
.da-shell--rail .da-chat-head { padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.da-shell--rail .da-chat-title--rail { align-items: center; justify-content: space-between; gap: 8px; }
.da-shell--rail .da-chat-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.da-shell--rail .da-chat-who strong { font-size: 13px; font-weight: 600; letter-spacing: .01em; }
/* 小魔女头像：沿用站点空态里那枚奶油圆底的魔女，尺寸缩到头像大小 */
.da-chat-avatar { position: relative; width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #FFFDF8, #F4EEE1 100%); box-shadow: inset 0 0 0 1px rgba(11, 11, 10, .12), 0 1px 2px rgba(0, 0, 0, .3); }
.da-witch { display: inline-flex; align-items: center; justify-content: center; }
.da-witch-img { display: block; image-rendering: pixelated; }
.da-chat-avatar .da-witch, .da-chat-avatar .da-witch img { width: 22px; height: 22px; }
.da-chat-avatar .da-chat-dot { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border: 2px solid var(--surface); box-shadow: none; }
.da-chat-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.da-shell--rail .da-chat-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted) 16%, transparent); }
.da-shell--rail .da-chat-dot[data-state="open"] { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .15); }
.da-shell--rail .da-chat-dot[data-state="connecting"],
.da-shell--rail .da-chat-dot[data-state="reconnecting"] { background: var(--warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 18%, transparent); }
.da-shell--rail .da-chat-actions .da-button { min-height: 24px; padding: 1px 8px; font-size: 11px; border-radius: 8px; }

.da-shell--rail .da-messages { padding: 14px 0 10px; gap: 16px; }
.da-shell--rail .da-message { display: flex; flex-direction: column; gap: 5px; }
.da-shell--rail .da-message-agent { align-items: flex-start; }
.da-shell--rail .da-message-user { align-items: flex-end; }
.da-shell--rail .da-message-head { margin: 0; gap: 6px; }
.da-shell--rail .da-message-head strong { font-size: 11px; font-weight: 500; color: var(--muted); }
.da-shell--rail .da-message-head small { font-size: 10.5px; color: var(--muted); opacity: .8; }
.da-shell--rail .da-message-text { border: 0; max-width: 92%; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 13px; line-height: 1.7; max-height: none; }
.da-shell--rail .da-message-agent .da-message-text { border-radius: 14px 14px 14px 4px; }
.da-shell--rail .da-message-user .da-message-text { border-radius: 14px 14px 4px 14px; background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); }
.da-shell--rail .da-message .da-approval { width: 100%; }
/* 流式回复：正文后跟一枚方角光标，等最终消息落库后整条替换 */
@keyframes da-caret-blink { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }
.da-caret { display: inline-block; width: 2px; height: 1.02em; margin-left: 3px; vertical-align: -0.16em; background: var(--accent); animation: da-caret-blink 1s steps(1) infinite; }
.da-message--streaming .da-message-text { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .da-caret { animation: none; opacity: .7; } }
.da-shell--rail .da-message-attachments,
.da-shell--rail .da-message-skills { justify-content: flex-start; }

.da-shell--rail .da-chat-empty--rail { margin: 0; text-align: left; padding: 6px 0 0; }
.da-shell--rail .da-chat-empty--rail strong { font-size: 17px; line-height: 1.35; letter-spacing: -.01em; margin-bottom: 14px; }
.da-shell--rail .da-suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.da-shell--rail .da-suggest .da-button { min-height: 32px; padding: 5px 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 12.5px; }
.da-shell--rail .da-suggest .da-button:hover { background: var(--surface-2); }

.da-shell--rail .da-notice--rail { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 6px 10px; border-radius: 10px; font-size: 11.5px; line-height: 1.45; }
.da-shell--rail .da-notice--rail .da-notice-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-shell--rail .da-notice--rail .da-button { min-height: 22px; padding: 0 6px; font-size: 11px; flex: none; }
.da-shell--rail .da-chip-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0 8px; }
.da-shell--rail .da-approvals[hidden] { display: none; }
.da-shell--rail .da-composer-tools .da-button:nth-of-type(2) { display: none; }
.da-chip-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.da-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.da-dot--ok { background: #4ade80; }
.da-shell--rail .da-chip-row .da-button { min-height: 28px; padding: 3px 11px; border-radius: 9px; font-size: 12px; }

.da-shell--rail .da-chat-foot { padding: 10px 0 0; border-top: 1px solid var(--line); }
.da-shell--rail .da-composer { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); padding: 4px 6px 4px; gap: 0; transition: border-color .15s ease; }
.da-shell--rail .da-composer:focus-within { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); }
.da-shell--rail .da-composer-input { border: 0; background: transparent; min-height: 46px; max-height: 132px; padding: 8px 6px 4px; resize: none; font-size: 13px; line-height: 1.6; }
.da-shell--rail .da-composer-input:focus { outline: 0; }
.da-shell--rail .da-composer-toolbar { padding: 0 2px 2px; }
.da-shell--rail .da-composer-toolbar .da-button { min-height: 27px; padding: 2px 9px; border-radius: 9px; font-size: 12px; }
.da-shell--rail .da-composer-actions .da-button:not([data-action="send-chat"]) { display: none; }
.da-shell--rail .da-composer-actions .da-button[data-action="send-chat"] { border: 0; background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 2px 14px; }
.da-shell--rail .da-composer-actions .da-button[data-action="send-chat"]:disabled { opacity: .45; }
.da-shell--rail .da-purpose-select { display: none; }
.da-shell--rail .da-quote { font-size: 11px; line-height: 1.5; padding: 6px 9px; border-radius: 9px; margin-bottom: 6px; }

.da-shell--rail .da-chat-title strong { font-size: 15px; }
.da-shell--rail .da-chat-title small,
.da-shell--rail .da-chat-meta span { font-size: 11px; }
.da-shell--rail .da-chat-empty strong { font-size: 17px; line-height: 1.35; letter-spacing: -.01em; }
.da-shell--rail .da-chat-empty p { font-size: 12.5px; }
.da-shell--rail .da-rail-source-note { font-size: 12.5px; }
.da-shell--rail .da-button { font-size: 12.5px; }
.da-shell--rail .da-composer-input { font-size: 13px; }

.da-shell--rail .da-composer { border-radius: 12px; }
.da-shell--rail .da-rail-source[hidden] { display: none; }
.da-shell--rail .da-rail-source { padding: 10px 0 2px; border-bottom: 0; display: flex; flex-direction: column; gap: 6px; }
.da-rail-source-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.da-rail-source-note { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-rail-source-row .da-button { min-height: 30px; padding: 3px 12px; font-size: 12px; flex: none; }

.da-shell--rail .da-approvals { margin: 0 0 8px; padding: 0 0 8px; border-bottom: 1px solid var(--line); max-height: 42%; overflow: auto; overscroll-behavior: contain; gap: 8px; }
.da-shell--rail .da-approvals-title h2 { font-size: 13px; }
.da-shell--rail .da-approvals-title p { font-size: 11px; line-height: 1.6; }
.da-shell--rail .da-approval { padding: 10px 11px; border-radius: 10px; }
.da-shell--rail .da-approval-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
.da-shell--rail .da-approval-actions { margin-top: 8px; padding-top: 8px; }
.da-shell--rail .da-approvals-empty { padding: 7px 9px; font-size: 11px; }
.da-shell--rail .da-run-bar { padding: 6px 8px; gap: 5px; }
.da-shell--rail .da-run-title { min-width: 0; flex: 1 1 100%; font-size: 11px; }
.da-shell--rail .da-run-bar .da-button { min-height: 26px; padding: 2px 8px; font-size: 11px; }

/* Updream Cinema Liquid Glass · Agent Dock */
#page .d-agent-dock {
  background: var(--lg-glass-panel, var(--surface)) !important;
  border-left: 1px solid var(--lg-rim, var(--line)) !important;
  backdrop-filter: var(--lg-blur, blur(18px));
  -webkit-backdrop-filter: var(--lg-blur, blur(18px));
}
.da-shell--rail .da-message-agent .da-message-text {
  background: var(--lg-glass-card, var(--surface-2));
  border: 1px solid var(--lg-rim, var(--line));
}
.da-shell--rail .da-message-user .da-message-text {
  background: color-mix(in srgb, var(--lg-cyan, #38bdf8) 14%, var(--lg-glass-card, var(--surface-2)));
  border: 1px solid color-mix(in srgb, var(--lg-cyan, #38bdf8) 32%, transparent);
}
.da-shell--rail .da-composer {
  background: var(--lg-glass-pill, var(--surface-2));
  border-color: var(--lg-rim, var(--line));
}
.da-shell--rail .da-composer:focus-within {
  border-color: var(--lg-cyan, #38bdf8);
  box-shadow: 0 0 0 1px var(--lg-rim-glow, rgba(56, 189, 248, 0.3));
}
.da-shell--rail .da-composer-actions .da-button[data-action="send-chat"] {
  background: var(--lg-cta-fill, var(--accent));
  color: var(--lg-cta-ink, var(--on-accent));
  border-radius: 10px;
}


