/* Reserve stable 2-line Songti display height across desktop & mobile. */
.home-page #hero-title {
  min-block-size: calc(2 * 1.14em);
  display: block;
}

.home-page .hero-typewriter {
  display: inline;
  white-space: normal;
}

.home-page .hero #hero-title br:not([hidden]) {
  display: inline !important;
}

.home-page .hero #hero-title br[hidden] {
  display: none !important;
}

.home-page .hero-typewriter.is-playing::after {
  content: "";
  display: inline-block;
  inline-size: 0.04em;
  min-inline-size: 2px;
  block-size: 0.84em;
  margin-inline-start: 0.08em;
  vertical-align: -0.05em;
  background: currentColor;
  animation: hero-caret 1.1s steps(1, end) infinite;
}

@keyframes hero-caret {
  0%, 48% { opacity: 0.85; }
  49%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .hero-typewriter::after {
    display: none !important;
    animation: none !important;
  }
}
