/* Chapter title card shown between chapters. Durations match src/ui/chapterCard.js. */
.chapter-card {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: #000;
  pointer-events: auto;
  touch-action: none;
}

.chapter-card-text {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(36px, 9vw, 96px);
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--text, #eee);
  text-shadow: 0 0 18px rgba(196, 38, 46, 0.5);
  opacity: 0;
  transition: opacity 0.9s ease-in;
}

.chapter-card-visible .chapter-card-text {
  opacity: 1;
}

.chapter-card-leaving .chapter-card-text {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .chapter-card-text,
  .chapter-card-leaving .chapter-card-text {
    transition-duration: 0.01s;
  }
}
