.narration-script-viewer-host {
  flex-wrap: wrap !important;
}

.narration-script-viewer {
  flex: 0 0 100%;
  order: 99;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-color, rgba(127, 127, 127, 0.28));
  border-radius: 12px;
  background: var(--surface-card, var(--bg-secondary, rgba(127, 127, 127, 0.08)));
  color: var(--text-primary, inherit);
}

.narration-script-viewer[hidden] {
  display: none !important;
}

.narration-script-viewer summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 650;
  line-height: 1.4;
  list-style-position: inside;
}

.narration-script-viewer summary:focus-visible {
  outline: 2px solid var(--primary-color, #5b7cfa);
  outline-offset: -2px;
}

.narration-script-viewer-count {
  flex: none;
  color: var(--text-secondary, #737a8c);
  font-size: 12px;
  font-weight: 500;
}

.narration-script-viewer-text {
  max-height: min(52vh, 560px);
  overflow: auto;
  border-top: 1px solid var(--border-color, rgba(127, 127, 127, 0.2));
  padding: 16px;
  color: var(--text-primary, inherit);
  font: inherit;
  line-height: 1.9;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .narration-script-viewer summary,
  .narration-script-viewer-text {
    padding-right: 12px;
    padding-left: 12px;
  }
}
