.segment {
  margin: 0;
  border-radius: 10px 10px 10px 3px;
  border: 1px solid #e8ecf0;
  background: #fff;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: #1a1a1a;
}

.summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  min-height: 0;
  user-select: none;
  font-size: 13px;
  line-height: 1.4;
}

.summary::-webkit-details-marker {
  display: none;
}

.summary::before {
  content: "";
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  border-left: 4px solid #818b98;
  transition: transform 0.15s ease;
}

.segment[open] > .summary::before {
  transform: rotate(90deg);
}

.summaryTitle {
  flex-shrink: 0;
  font-weight: 500;
  color: #57606a;
}

.summaryPreview {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #656d76;
}

.summaryTitleGrow {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  color: #57606a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail {
  margin: 0;
  padding: 0 10px 6px;
  border-top: 1px solid #e8ecf0;
  max-height: min(200px, 30vh);
  overflow: auto;
}

.body {
  margin: 0;
  padding: 4px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.4;
  color: #374151;
}

.bodyItalic {
  font-style: italic;
  color: #6b7280;
}

.textSegment {
  composes: segment;
  padding: 6px 10px;
}

.textBody {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.textBody:global(.markdown-body) {
  font-size: 14px;
  line-height: 1.4;
  background: transparent;
}

.streamingPlain {
  composes: textBody;
}