/* ============================================================
   一帛入梦 · 五境科普尾声 realm-coda.css
   纯 HTML/CSS，无 JS。手机优先：左对齐、16px、行高 1.85、左右 24px。
   默认全文可见；仅在支持滚动时间线且未开启减少动态时，
   增强为「标题先现、正文随进入视口渐显并轻移 8px」。
   ============================================================ */

.realm-end.coda {
  align-items: stretch;
  gap: 18px;
  text-align: left;
  padding-top: 84px;
  padding-left: 24px;
  padding-right: 24px;
}

/* 小标签沿用 end-eyebrow，仅在左对齐布局里贴左 */
.realm-end.coda .end-eyebrow {
  align-self: flex-start;
}

/* 问题标题 */
.realm-end.coda .coda-q {
  margin: 0;
  font-family: Painting, "Songti SC", serif;
  font-weight: 400;
  font-size: clamp(24px, 6.4vw, 36px);
  line-height: 1.42;
  letter-spacing: .06em;
  color: #ece0c8;
  text-shadow: 0 2px 16px rgba(2, 12, 16, .7);
}

/* 两段正文 */
.realm-end.coda .coda-p {
  margin: 0;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .02em;
  color: #c4cfc6;
}

/* 返回按钮在左对齐布局里贴左，并与正文留出间距 */
.realm-end.coda .realm-exit-btn {
  align-self: flex-start;
  margin-top: 18px;
}

/* 平板 / 桌面：限制阅读宽度，整体居中，文字仍左对齐 */
@media (min-width: 768px) {
  .realm-end.coda {
    padding-top: 110px;
    padding-left: 32px;
    padding-right: 32px;
    gap: 22px;
  }
  .realm-end.coda .end-eyebrow,
  .realm-end.coda .coda-q,
  .realm-end.coda .coda-p,
  .realm-end.coda .realm-exit-btn {
    width: 100%;
    max-width: 720px;
    align-self: center;
  }
  .realm-end.coda .coda-p {
    font-size: 17px;
  }
}


.realm-end.coda {
  background: linear-gradient(155deg, rgb(6 20 24 / .68), rgb(5 17 21 / .87)),
              var(--static-scenery) center / cover no-repeat;
}
.realm-end.coda .coda-p { color: #e1dfd1; }
.coda-q { text-wrap: balance; }
.coda-q span { display: inline-block; }
.coda-reading strong { display: block; margin-bottom: .4em; color: #efd4a1; }

@supports (animation-trigger: --read play-once) and (timeline-trigger: --read view() entry 5%) {
  @media (prefers-reduced-motion: no-preference) {
    .realm-end.coda { timeline-trigger: --read view() entry 5%; }
    .coda-q span, .coda-p {
      animation: reading-arrives .76s ease-out both;
      animation-trigger: --read play-once;
    }
    .coda-q span + span { animation-delay: .18s; }
    .coda-p:nth-of-type(1) { animation-delay: .4s; }
    .coda-p:nth-of-type(2) { animation-delay: .75s; }
    .coda-p:nth-of-type(3) { animation-delay: 1.1s; }
    .coda-p:nth-of-type(4) { animation-delay: 1.45s; }
  }
}
@keyframes reading-arrives {
  from { opacity: 0; transform: translateY(.5em); }
  to { opacity: 1; transform: none; }
}
