.transcript-body {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  color: #1f2a44;
  font-size: 14px;
  line-height: 1.6;
}

.transcript-panel,
.thinking-block {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 8px;
  background: rgba(31, 45, 61, 0.035);
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  scrollbar-width: thin;
  transition:
    background var(--motion-normal) var(--ease-standard),
    border-color var(--motion-normal) var(--ease-standard),
    box-shadow var(--motion-normal) var(--ease-standard);
}

.transcript-panel-live {
  border-color: rgba(217, 45, 58, 0.24);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(217, 45, 58, 0.06);
}

.thinking-block {
  max-height: min(28vh, 260px);
  overflow-y: auto;
}

.transcript-panel-tools .tool-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  max-height: min(48vh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.transcript-panel-tools .tool-list::-webkit-scrollbar {
  display: none;
}

.transcript-panel-header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 24px;
  padding: 0 2px;
  color: #66758b;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
  transition: color var(--motion-fast) var(--ease-standard);
}

.transcript-panel-header svg {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
}

.transcript-panel-header:hover {
  color: #2b3650;
}

.transcript-panel-toggle {
  display: inline-flex;
  margin-left: auto;
  color: #98a4b8;
  transition: transform var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard);
}

.transcript-panel-header:hover .transcript-panel-toggle {
  color: #66758b;
  transform: translateX(1px);
}

.transcript-panel-count {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  background: rgba(102, 117, 139, 0.12);
  border-radius: 999px;
  color: #66758b;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.agent-text {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agent-text p,
.agent-text li,
.agent-text blockquote {
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agent-text > :first-child {
  margin-top: 0;
}

.agent-text > :last-child {
  margin-bottom: 0;
}

.agent-text p,
.agent-text ul,
.agent-text ol,
.agent-text pre,
.agent-text blockquote {
  margin: 8px 0;
}

.agent-text code {
  padding: 1px 6px;
  background: #f4f7fb;
  border-radius: 6px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agent-text pre {
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  overflow-x: hidden;
  background: #0f1626;
  border-radius: 12px;
  color: #e8eef9;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agent-text pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  white-space: inherit;
}

.agent-text .mermaid-diagram {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  margin: 8px 0;
  padding: 12px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  color: #1f2a44;
  scrollbar-width: thin;
}

.agent-text .mermaid-diagram svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.agent-text .mermaid-diagram[aria-busy="true"] {
  min-height: 96px;
  background: #f9fbfd;
}

.agent-text .mermaid-diagram-error {
  border-color: #f4b7bf;
  background: #fff8f9;
}

.agent-text .mermaid-error-label {
  color: #b1334a;
  font-size: 12px;
  font-weight: 700;
}

.agent-text .mermaid-diagram-error pre {
  margin: 8px 0 0;
}

.agent-text table {
  max-width: 100%;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.agent-text th,
.agent-text td {
  padding: 6px 10px;
  border: 1px solid #e7edf4;
  overflow-wrap: anywhere;
  text-align: left;
  word-break: break-word;
}

.agent-text th {
  background: #f9fbfd;
}

.agent-text a {
  color: #d92d3a;
  text-decoration: underline;
}

.agent-text blockquote {
  padding: 4px 12px;
  border-left: 3px solid #d92d3a;
  background: #fff5f6;
  color: #5a2533;
}

.caret {
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: #d92d3a;
  border-radius: 2px;
  animation: caretBlink 1.1s steps(2) infinite;
}

.agent-pending {
  display: inline-flex;
  gap: 6px;
  padding: 6px 0;
}

.agent-pending span {
  width: 7px;
  height: 7px;
  background: #cad6e5;
  border-radius: 50%;
  animation: agentPending 1.2s ease-in-out infinite;
}

.agent-pending span:nth-child(2) { animation-delay: 160ms; }
.agent-pending span:nth-child(3) { animation-delay: 320ms; }

.agent-error {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fde7e9;
  border-radius: 10px;
  color: #b1334a;
  font-size: 13px;
}

.thinking-block-active {
  border-color: rgba(217, 45, 58, 0.32);
  box-shadow: 0 0 0 3px rgba(217, 45, 58, 0.06);
}

.thinking-body {
  position: relative;
  min-width: 0;
  max-width: 100%;
  max-height: 132px;
  overflow: hidden;
}

.thinking-text {
  margin: 0;
  max-width: 100%;
  max-height: 132px;
  box-sizing: border-box;
  padding: 6px 4px;
  overflow-y: auto;
  color: #2b3650;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  scrollbar-width: none;
}

.thinking-text::-webkit-scrollbar {
  display: none;
}

.thinking-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 26px;
  pointer-events: none;
  z-index: 1;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.thinking-fade-top {
  top: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 100%);
}

.thinking-fade-bottom {
  bottom: 0;
  -webkit-mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 100%);
}

.execution-row {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  height: auto;
  overflow: clip;
  background: #ffffff;
  border: 1px solid #e7edf4;
  border-radius: 6px;
  animation: rowFadeIn 180ms var(--ease-emphasized) both;
  transition:
    border-color var(--motion-normal) var(--ease-standard),
    box-shadow var(--motion-normal) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.execution-row-running,
.execution-row-subagent-running {
  border-color: #f3d9a4;
}

.execution-row-error,
.execution-row-subagent-failed,
.execution-row-subagent-canceled {
  border-color: #f3c3c9;
}

.execution-row-ok,
.execution-row-subagent-completed {
  border-color: #c7e6e4;
}

.execution-row-selected,
.nested-panel-selected {
  border-color: rgba(33, 150, 153, 0.7);
  box-shadow: inset 0 0 0 1px rgba(33, 150, 153, 0.18);
}

.execution-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  background: transparent;
  border: 0;
  color: #2f4057;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: background var(--motion-fast) var(--ease-standard);
}

.execution-row-expand {
  flex: 0 0 auto;
  color: #66758b;
  font-size: 12px;
}

.execution-row-head:hover {
  background: #f9fbfd;
}

.execution-row-head-static {
  cursor: default;
}

.execution-row-head-static:hover {
  background: transparent;
}

.execution-row-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #162033;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-row-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  color: #94a3b8;
}

.execution-row-detail {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px;
  overflow: visible;
  border-top: 1px dashed #e7edf4;
  background: #fbfdff;
  animation: contentFadeUp 180ms var(--ease-emphasized) both;
}

.execution-section {
  display: block;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
}

.execution-section-label {
  color: #66758b;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.execution-section-body {
  margin: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 10px 12px;
  overflow-x: hidden;
  background: #0f1626;
  border-radius: 8px;
  color: #e8eef9;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.execution-json-body {
  overflow-x: auto;
}

.json-token-key {
  color: #8bd5ff;
}

.json-token-string {
  color: #a6e3a1;
}

.json-token-number {
  color: #f9c57a;
}

.json-token-boolean {
  color: #f38ba8;
}

.json-token-null {
  color: #94a3b8;
}

.execution-section-error .execution-section-body {
  background: #1f0d12;
  color: #ff8c9c;
}

.nested-panel {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: rgba(31, 45, 61, 0.04);
  border: 1px solid rgba(31, 45, 61, 0.08);
  border-left: 3px solid rgba(33, 150, 153, 0.55);
  border-radius: 6px;
  animation: rowFadeIn 180ms var(--ease-emphasized) both;
  transition:
    background var(--motion-normal) var(--ease-standard),
    border-color var(--motion-normal) var(--ease-standard),
    box-shadow var(--motion-normal) var(--ease-standard);
}

.nested-panel-live {
  border-left-color: rgba(217, 45, 58, 0.65);
  background: rgba(217, 45, 58, 0.04);
}

.nested-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  background: transparent;
  border: 0;
  color: #2f4057;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.nested-panel-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nested-panel-count {
  flex: 0 0 auto;
  padding: 1px 6px;
  background: rgba(31, 45, 61, 0.08);
  border-radius: 999px;
  color: #66758b;
  font-size: 11px;
}

.transcript-empty {
  padding: 18px;
  color: #66758b;
  background: #f9fbfd;
  border: 1px dashed #dce5f0;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}
