.message.assistant .chat-process-host {
  width: min(300px, 78vw);
  max-width: 100%;
}

.proc-block {
  color: #6b6560;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.proc-row {
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  margin-bottom: 6px;
  padding: 6px 11px 6px 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  color: inherit;
  background: #f3f0ec;
  border: 0;
  border-radius: 20px;
  text-align: left;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}

.proc-row:hover { background: #edeae6; }
.proc-expanded + .proc-row { border-top: 0; }
.proc-icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--coral); line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.proc-icon-svg { width: 15px; height: 15px; display: block; }
.proc-text { flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: #6b6560; font-size: 11.5px; }
.proc-name { color: #6b6560; font-size: 11.5px; font-weight: 400; }
.proc-time { color: #b8b2ab; font-size: 10px; }
.proc-expanded {
  display: none;
  padding: 4px 5px 10px 6px;
  color: #b8b2ab;
  background: transparent;
  border-top: 0;
  font-size: 12px;
  line-height: 1.75;
}
.proc-expanded.show { display: block; }
.thought-text { color: #b8b2ab; font-style: italic; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.proc-expanded .field-label { margin-top: 9px; margin-bottom: 3px; color: #a09890; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.proc-expanded .field-label:first-child { margin-top: 0; }
.proc-expanded .field-value {
  padding: 5px 8px;
  color: #2c2825;
  background: rgba(0, 0, 0, .06);
  border-radius: 6px;
  font-family: "SF Mono", Menlo, monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.proc-expanded .result-ok { color: #6a9e6a; }
.proc-expanded .result-err { color: #c9655a; }

@keyframes process-pulse-fade { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes process-blink { 0%, 100% { opacity: 0; } 40%, 60% { opacity: 1; } }
.proc-row.running { cursor: default; }
.proc-row.running .proc-icon { animation: process-pulse-fade 1.4s infinite; }
.blink-dots span { animation: process-blink 1.4s infinite; }
.blink-dots span:nth-child(2) { animation-delay: .2s; }
.blink-dots span:nth-child(3) { animation-delay: .4s; }

@media (max-width: 520px) {
  .message.assistant .chat-process-host { width: min(440px, 82vw); }
}

@media (prefers-reduced-motion: reduce) {
  .proc-row { transition: none; }
  .proc-row.running .proc-icon, .blink-dots span { animation: none; }
}
/* Agent events use the same compact capsule language as legacy tool progress. */
.agent-timeline-host { width: 100%; max-width: 100%; display: grid; gap: 7px; min-width: 0; }
.agent-text-segment { margin: 0; }
.agent-thought-row { width: min(300px, 100%); max-width: min(88%, 440px); color: #a09890; background: transparent; border-radius: 0; overflow: visible; }
.agent-thought-row summary { width: 100%; max-width: 100%; min-height: 30px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 9px; background: #f3f0ec; border-radius: 20px; cursor: pointer; list-style: none; white-space: nowrap; overflow: hidden; }
.agent-thought-row summary::-webkit-details-marker { display: none; }
.agent-thought-row summary:hover { background: #edeae6; }
.agent-thought-row .proc-icon { color: var(--coral); }
.agent-thought-row .proc-name { flex: 1 1 0; width: 0; color: #6b6560; font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-thought-row[open] { border-radius: 0; }
.agent-thought-row .thought-text { display: none; padding: 7px 0 7px 20px; color: #b8b2ab; font-size: 11px; font-style: italic; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.agent-thought-row[open] .thought-text { display: block; }
.agent-tool-capsule { width: min(300px, 100%); max-width: min(88%, 440px); margin-bottom: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #6b6560; font-size: 11.5px; overflow: visible; }
.agent-tool-capsule summary { width: 100%; max-width: 100%; min-height: 30px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 9px; background: #f3f0ec; border-radius: 20px; cursor: pointer; list-style: none; user-select: none; white-space: nowrap; overflow: hidden; }
.agent-tool-capsule summary::-webkit-details-marker { display: none; }
.agent-tool-capsule summary:hover { background: #edeae6; }
.agent-tool-capsule .proc-text { color: #6b6560; font-size: 11.5px; }
.agent-tool-capsule summary .proc-text { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-tool-capsule .proc-icon { color: #8c857f; }
.agent-tool-capsule .proc-status { margin-left: auto; }
.agent-tool-details { display: none; min-width: 0; padding: 7px 0 7px 20px; color: #b8b2ab; font-size: 11px; font-style: italic; line-height: 1.65; }
.agent-tool-capsule[open] { border-radius: 0; }
.agent-tool-capsule[open] .agent-tool-details { display: grid; gap: 2px; }
.agent-tool-detail { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.agent-tool-detail small { color: #c9655a; overflow-wrap: anywhere; }
.agent-tool-running { cursor: default; color: #6b6560; }
.agent-tool-running .proc-icon { animation: process-pulse-fade 1.4s infinite; }
.agent-run-status { margin: 0; color: var(--muted); font-size: 12px; }
.agent-card-host:empty { display: none; }
