.transcript-scroll-wrapper {
  display: block;
  padding: 0.5rem 0;
}

/* Block-level sentence display — restored from archive backup.
   The original transcript-sync.js used <p> elements for sentences,
   giving each sentence its own visual line with word spans inside. */
.transcript-sentence {
  display: block;
  color: rgba(232, 228, 240, 0.72);
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
  border-radius: 0.35rem;
  padding: 0.15rem 0.25rem;
  margin-bottom: 0.35rem;
  line-height: 1.85;
  cursor: pointer;
}

.transcript-sentence.past {
  color: rgba(199, 125, 255, 0.78);
}

.transcript-sentence.active {
  color: #ffffff;
  background: rgba(0, 245, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 245, 255, 0.18), 0 0 18px rgba(0, 245, 255, 0.16);
}

/* Sentence hover — matches backup's click-to-seek affordance */
.transcript-sentence:hover {
  background: rgba(99, 102, 241, 0.06);
}

.transcript-empty {
  color: rgba(232, 228, 240, 0.58);
  font-size: 0.95rem;
  text-align: center;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.transcript-empty .tx-hint {
  font-size: 0.9rem;
  color: rgba(232, 228, 240, 0.5);
}
.transcript-empty .tx-action {
  font-size: 0.75rem;
  color: rgba(232, 228, 240, 0.35);
}

/* Word-level transcript container */
.transcript-words {
  display: block;
  padding: 0.5rem 0;
  line-height: 1.85;
  word-wrap: break-word;
}

/* Focus indicator when navigating into transcript words via keyboard */
.transcript-words:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.4);
  border-radius: 0.35rem;
}

/* Word-level highlighting (restored from backup) */
.transcript-word {
  display: inline;
  color: inherit;
  transition: all 150ms ease;
  border-radius: 0.2rem;
  padding: 0;
  cursor: pointer;
}

.transcript-word:hover {
  color: #fff;
  background: rgba(99, 102, 241, 0.2);
}

.transcript-word.active {
  color: #fff;
}

.transcript-word.glow-cyan {
  text-shadow: 0 0 8px rgba(0, 245, 255, 0.6), 0 0 16px rgba(0, 245, 255, 0.3);
}

.transcript-word.glow-violet {
  text-shadow: 0 0 8px rgba(139, 92, 246, 0.6), 0 0 16px rgba(139, 92, 246, 0.3);
}

/* Word indicator panel */
.current-word-panel {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(15, 15, 26, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  margin-bottom: 16px;
}

.current-word-panel.visible {
  display: flex;
}

.current-word-panel .cwp-label {
  font-size: 11px;
  color: rgba(123, 120, 150, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.current-word-panel .cwp-word {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  min-width: 40px;
  text-align: center;
}

/* transcript-placeholder — restored from archived transcript-sync.js
   Shown when a dream has no transcript text. Provides a styled
   empty-state with icon, message, and contextual CTA link
   so the user isn't left staring at a blank panel. */
.transcript-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed rgba(99, 102, 241, 0.18);
  border-radius: 12px;
  background: rgba(15, 15, 26, 0.5);
  min-height: 160px;
}

.transcript-placeholder .tp-icon {
  font-size: 36px;
  opacity: 0.7;
  filter: grayscale(0.2);
  animation: tp-breathe 3s ease-in-out infinite;
}

@keyframes tp-breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.08); }
}

/* Reduced-motion: disable breathing animation */
@media (prefers-reduced-motion: reduce) {
  .transcript-placeholder .tp-icon {
    animation: none;
  }
}

.transcript-placeholder .tp-message {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  font-style: italic;
  color: rgba(232, 228, 240, 0.55);
  line-height: 1.6;
  max-width: 36ch;
}

.transcript-placeholder .tp-hint {
  font-size: 12px;
  color: rgba(123, 120, 150, 0.6);
  margin-top: 4px;
}

.transcript-placeholder .tp-cta {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 18px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 8px;
  color: var(--accent, #6366f1);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.transcript-placeholder .tp-cta:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.transcript-placeholder .tp-cta:active {
  transform: translateY(0);
}

/* Visible empty-state for dreams without transcript segments.
   Companion to the .transcript-empty upgrade in dream-player.html so the
   word-level transcript path shows the same centered panel on narrow
   viewports instead of a small italic line. */
.transcript-empty--visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  padding: 28px 18px;
  font-style: normal;
  color: rgba(232, 228, 240, 0.78);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.04), rgba(139, 92, 246, 0.03));
  border: 1px dashed rgba(99, 102, 241, 0.28);
  border-radius: 12px;
  text-align: center;
  margin: 8px 0;
}
.transcript-empty--visible .te-icon {
  font-size: 28px;
  line-height: 1;
  color: var(--accent, #6366f1);
  opacity: 0.85;
  animation: te-breathe 3s ease-in-out infinite;
  text-shadow: 0 0 18px rgba(99, 102, 241, 0.45);
}
@keyframes te-breathe {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
.transcript-empty--visible strong {
  color: #fff;
  font-weight: 500;
  font-style: normal;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  letter-spacing: 0.01em;
  margin: 0;
  display: block;
}
.transcript-empty--visible .te-msg {
  font-size: 14px;
  color: rgba(232, 228, 240, 0.7);
  max-width: 36ch;
  line-height: 1.5;
}
.transcript-empty--visible .te-hint {
  font-size: 12px;
  color: rgba(123, 120, 150, 0.75);
  font-style: italic;
  max-width: 40ch;
  line-height: 1.5;
  margin-top: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .transcript-empty--visible .te-icon { animation: none; }
}
@media (max-width: 600px) {
  .transcript-empty--visible {
    min-height: 140px;
    padding: 24px 14px;
    gap: 6px;
  }
  .transcript-empty--visible strong { font-size: 16px; }
  .transcript-empty--visible .te-msg { font-size: 13px; }
  .transcript-empty--visible .te-hint { font-size: 11px; }
}
