/* ==========================================================================
   《流浪地球2》台词静态页样式 — 影院摄影画廊与全维度手机适配
   ========================================================================== */

:root {
  --bg-void: #04070d;
  --text-primary: #f8fafc;
  --text-secondary: rgba(236, 242, 250, 0.9);
  --text-muted: rgba(186, 198, 214, 0.78);
  --alert: #ef4444;
  --alert-glow: rgba(239, 68, 68, 0.65);

  /* 默认纪元（当下·行星发动机蓝焰） */
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.18);
  --accent-glow: rgba(56, 189, 248, 0.58);

  --border-hud: rgba(186, 200, 220, 0.22);
  --surface-glass: rgba(8, 14, 26, 0.62);

  --font-serif: 'Songti SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'STSong', 'SimSun', Georgia, serif;
  --font-sans: 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei', 'Hiragino Sans GB', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', 'Menlo', 'Courier New', monospace;
}

body[data-era="history"] {
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.18);
  --accent-glow: rgba(251, 191, 36, 0.58);
}

body[data-era="present"] {
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.18);
  --accent-glow: rgba(56, 189, 248, 0.58);
}

body[data-era="future"] {
  --accent: #818cf8;
  --accent-soft: rgba(129, 140, 248, 0.2);
  --accent-glow: rgba(129, 140, 248, 0.62);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100dvh;
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   全屏动态电影摄影背景层 + 遮罩 + 透明画布
   ========================================================================== */

.backdrop-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: var(--bg-void);
  pointer-events: none;
}

.backdrop-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  filter: saturate(1.08) contrast(1.04);
  transition:
    opacity 1.1s ease,
    transform 9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.backdrop-img[data-era="history"] {
  object-position: 46% 24%;
}

.backdrop-img[data-era="present"] {
  object-position: 44% 18%;
}

.backdrop-img[data-era="future"] {
  object-position: 50% 34%;
}

.backdrop-img.is-active {
  opacity: 0.72;
  transform: scale(1.01);
}

body.zen-mode .backdrop-img.is-active {
  opacity: 0.84;
}

.backdrop-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 50% 44%,
      rgba(4, 7, 13, 0.36) 0%,
      rgba(4, 7, 13, 0.62) 70%,
      rgba(2, 4, 9, 0.86) 100%
    ),
    linear-gradient(
      180deg,
      rgba(4, 7, 13, 0.66) 0%,
      rgba(4, 7, 13, 0.32) 38%,
      rgba(4, 7, 13, 0.36) 66%,
      rgba(3, 6, 12, 0.88) 100%
    );
  transition: opacity 0.6s ease;
}

body.zen-mode .backdrop-scrim {
  opacity: 0.82;
}

#cosmos-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  pointer-events: none;
}

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    repeating-radial-gradient(
      circle at 17% 32%,
      rgba(255, 255, 255, 0.85) 0,
      transparent 1px
    ),
    repeating-radial-gradient(
      circle at 83% 68%,
      rgba(255, 255, 255, 0.7) 0,
      transparent 1.2px
    );
  background-size: 6px 6px, 9px 9px;
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 48%,
    rgba(4, 7, 13, 0) 48%,
    rgba(2, 4, 9, 0.76) 100%
  );
}

/* ==========================================================================
   UEG 极简 HUD 框架
   ========================================================================== */

.hud-chrome {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  padding:
    max(14px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.corner-bracket {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--border-hud);
  border-style: solid;
  transition: border-color 0.6s ease;
}

.corner-tl {
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  border-width: 1px 0 0 1px;
}

.corner-tr {
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  border-width: 1px 1px 0 0;
}

.corner-bl {
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(10px, env(safe-area-inset-left));
  border-width: 0 0 1px 1px;
}

.corner-br {
  bottom: max(10px, env(safe-area-inset-bottom));
  right: max(10px, env(safe-area-inset-right));
  border-width: 0 1px 1px 0;
}

.hud-top,
.hud-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--alert);
  box-shadow: 0 0 10px var(--alert-glow);
  animation: pulse-alert 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-alert {
  0%,
  100% {
    opacity: 0.95;
    transform: scale(1);
    box-shadow: 0 0 10px var(--alert-glow);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.82);
    box-shadow: 0 0 3px var(--alert-glow);
  }
}

.hud-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: rgba(226, 232, 240, 0.85);
  text-transform: uppercase;
}

.mono-sub {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(186, 200, 220, 0.26);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(241, 245, 249, 0.92);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.hud-btn:hover {
  border-color: var(--accent);
  color: #ffffff;
  background: rgba(12, 20, 38, 0.8);
  box-shadow: 0 0 16px var(--accent-soft);
}

.hud-btn:active {
  transform: translateY(1px);
}

.hud-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-icon {
  font-size: 0.88rem;
  line-height: 1;
  color: var(--accent);
  transition: color 0.5s ease;
}

/* ==========================================================================
   核心视觉舞台
   ========================================================================== */

.stage {
  position: relative;
  z-index: 6;
  min-height: 100dvh;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding:
    calc(clamp(68px, 10vh, 96px) + env(safe-area-inset-top))
    clamp(18px, 4.5vw, 48px)
    calc(clamp(48px, 7vh, 72px) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.signal-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(14px, 2.4vh, 24px);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-hud);
  background: rgba(6, 11, 22, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  transition: color 0.6s ease, border-color 0.6s ease, opacity 0.5s ease;
}

.signal-bar {
  width: 14px;
  height: 2px;
  background-color: var(--alert);
  box-shadow: 0 0 8px var(--alert-glow);
}

.quote-block {
  max-width: 960px;
  margin-bottom: clamp(12px, 2vh, 20px);
}

.quote-line {
  font-family: var(--font-serif);
  color: var(--text-primary);
}

.quote-lead {
  font-size: clamp(1.15rem, 2.1vw, 1.8rem);
  font-weight: 500;
  letter-spacing: 0.26em;
  color: rgba(241, 245, 249, 0.92);
  margin-bottom: clamp(8px, 1.5vh, 14px);
  padding-left: 0.26em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.quote-core {
  font-size: clamp(1.65rem, 3.85vw, 3.45rem);
  font-weight: 700;
  line-height: 1.44;
  letter-spacing: 0.09em;
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.9),
    0 4px 36px rgba(0, 0, 0, 0.72),
    0 0 38px var(--accent-soft);
  transition: text-shadow 0.6s ease;
}

/* 可点击纪元关键词 */
.era-word {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  padding: 0 0.04em 0.06em;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
  cursor: pointer;
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  transition:
    color 0.45s ease,
    text-shadow 0.45s ease,
    transform 0.25s ease;
}

.era-word::after {
  content: '';
  position: absolute;
  left: 4%;
  right: 12%;
  bottom: 0.04em;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.34;
  transform: scaleX(0.65);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.45s ease;
}

.era-word:hover {
  color: var(--accent);
}

.era-word:hover::after {
  opacity: 0.85;
  transform: scaleX(1);
}

.era-word.is-active {
  color: var(--accent);
  text-shadow:
    0 0 24px var(--accent-glow),
    0 2px 22px rgba(0, 0, 0, 0.88);
}

.era-word.is-active::after {
  opacity: 1;
  transform: scaleX(1);
  box-shadow: 0 0 12px var(--accent-glow);
}

.era-word:focus-visible {
  outline: 1px dashed var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.quote-en {
  max-width: 720px;
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 0.96vw, 0.76rem);
  letter-spacing: 0.16em;
  line-height: 1.65;
  color: rgba(203, 213, 225, 0.84);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  margin-bottom: clamp(14px, 2.4vh, 22px);
}

.quote-attribution {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(20px, 3.2vh, 32px);
  text-align: left;
}

.attribution-rule {
  width: 2px;
  height: 30px;
  background-color: var(--alert);
  box-shadow: 0 0 10px var(--alert-glow);
  flex-shrink: 0;
}

.attribution-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.speaker {
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.film-title {
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   三纪元影像分镜卡片（Gallery）
   ========================================================================== */

.timeline-panel {
  width: 100%;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.era-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.era-card {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(186, 200, 220, 0.18);
  background: rgba(6, 11, 22, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: left;
  cursor: pointer;
  color: var(--text-secondary);
  transition:
    border-color 0.35s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    background-color 0.35s ease;
}

.era-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: opacity 0.35s ease;
}

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #02050c;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  display: block;
  opacity: 0.82;
  transform: scale(1.01);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 13, 0.05) 35%, rgba(4, 7, 13, 0.72) 100%);
  pointer-events: none;
}

.card-index {
  position: absolute;
  top: 6px;
  left: 8px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(4, 7, 13, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.16);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  color: rgba(226, 232, 240, 0.85);
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 6px 4px;
}

.card-title {
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(241, 245, 249, 0.86);
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-year {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.era-card:hover {
  border-color: rgba(226, 232, 240, 0.36);
  transform: translateY(-2px);
}

.era-card:hover .card-thumb img {
  opacity: 0.96;
  transform: scale(1.06);
}

.era-card.is-active {
  border-color: var(--accent);
  background: rgba(10, 18, 34, 0.84);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.55),
    0 0 22px var(--accent-soft);
  transform: translateY(-3px);
}

.era-card.is-active::before {
  opacity: 1;
}

.era-card.is-active .card-thumb img {
  opacity: 1;
  transform: scale(1.04);
}

.era-card.is-active .card-index {
  color: var(--accent);
  border-color: var(--accent);
}

.era-card.is-active .card-title {
  color: var(--accent);
}

.era-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.era-caption {
  min-height: 2.8em;
  max-width: 640px;
  width: 100%;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(186, 200, 220, 0.16);
  background: rgba(6, 11, 22, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.88rem;
  line-height: 1.65;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.5s ease;
}

.era-caption.is-switching {
  opacity: 0;
  transform: translateY(4px);
}

.mobile-swipe-hint {
  display: none;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ==========================================================================
   开场影院渐显动画
   ========================================================================== */

body.is-revealing .reveal-line {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(14px);
}

body.is-revealed .reveal-line {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-revealed .reveal-delay-0 { transition-delay: 0.05s; }
body.is-revealed .reveal-delay-1 { transition-delay: 0.26s; }
body.is-revealed .reveal-delay-2 { transition-delay: 0.62s; }
body.is-revealed .reveal-delay-3 { transition-delay: 1.02s; }
body.is-revealed .reveal-delay-4 { transition-delay: 1.4s; }
body.is-revealed .reveal-delay-5 { transition-delay: 1.66s; }
body.is-revealed .reveal-delay-6 { transition-delay: 1.9s; }

/* ==========================================================================
   纯净模式 (Zen Mode)
   ========================================================================== */

body.zen-mode .hud-chrome,
body.zen-mode .timeline-panel,
body.zen-mode .signal-tag {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.zen-mode .hud-actions {
  pointer-events: none;
}

body.zen-mode .stage {
  min-height: 100dvh;
  justify-content: center;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: max(68px, env(safe-area-inset-bottom));
  transform: translateY(10px) scale(1.02);
  cursor: pointer;
}

.zen-exit-hint {
  position: fixed;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 20;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(186, 200, 220, 0.24);
  background: rgba(6, 11, 22, 0.66);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(226, 232, 240, 0.78);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

body.zen-mode .zen-exit-hint {
  opacity: 0.56;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

body.zen-mode .zen-exit-hint:hover {
  opacity: 1;
  border-color: var(--accent);
}

/* ==========================================================================
   轻提示 Toast
   ========================================================================== */

.toast {
  position: fixed;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  z-index: 30;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: rgba(6, 12, 24, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55), 0 0 18px var(--accent-soft);
  color: #f8fafc;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   手机与平板响应式适配
   ========================================================================== */

@media (max-width: 768px) {
  /* 手机端顶部 HUD 改为紧凑吸顶玻璃条，避免滚动时挡住文字 */
  .hud-chrome {
    bottom: auto;
    padding:
      max(10px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      10px
      max(12px, env(safe-area-inset-left));
    background: linear-gradient(180deg, rgba(4, 7, 13, 0.88) 0%, rgba(4, 7, 13, 0.45) 75%, rgba(4, 7, 13, 0) 100%);
  }

  .corner-bracket,
  .hud-bottom {
    display: none;
  }

  .mono-label {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
  }

  .mono-sub {
    font-size: 0.56rem;
    letter-spacing: 0.1em;
  }

  .hud-actions {
    gap: 6px;
  }

  .hud-btn {
    min-height: 36px;
    min-width: 36px;
    padding: 6px 10px;
  }

  .hud-btn .btn-label {
    display: none;
  }

  .stage {
    justify-content: flex-start;
    padding:
      calc(66px + env(safe-area-inset-top))
      16px
      calc(32px + env(safe-area-inset-bottom));
  }

  .signal-tag {
    margin-bottom: 14px;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    padding: 4px 12px;
  }

  .quote-lead {
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
    letter-spacing: 0.18em;
    padding-left: 0.18em;
    margin-bottom: 8px;
  }

  .quote-core {
    font-size: clamp(1.42rem, 6.1vw, 2.15rem);
    letter-spacing: 0.05em;
    line-height: 1.5;
  }

  .quote-en {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    line-height: 1.6;
    margin-bottom: 14px;
  }

  .quote-attribution {
    gap: 10px;
    margin-bottom: 20px;
  }

  .attribution-rule {
    height: 26px;
  }

  .speaker {
    font-size: 0.84rem;
    letter-spacing: 0.1em;
  }

  .film-title {
    font-size: 0.72rem;
  }

  .timeline-panel {
    gap: 12px;
  }

  .era-cards {
    gap: 8px;
  }

  .era-card {
    padding: 4px;
    border-radius: 10px;
  }

  .card-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 6px;
  }

  .card-index {
    top: 4px;
    left: 4px;
    font-size: 0.56rem;
    padding: 1px 5px;
  }

  .card-info {
    padding: 6px 3px 2px;
  }

  .card-title {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
  }

  .card-year {
    font-size: 0.56rem;
    letter-spacing: 0.06em;
  }

  .era-caption {
    font-size: 0.82rem;
    line-height: 1.6;
    padding: 10px 14px;
  }

  .mobile-swipe-hint {
    display: block;
  }

  body.zen-mode .stage {
    justify-content: center;
    transform: translateY(0) scale(1);
  }
}

/* 超窄屏手机 (<= 350px) 切为横向可滑动卡片避免拥挤 */
@media (max-width: 350px) {
  .era-cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .era-card {
    flex: 0 0 68%;
    scroll-snap-align: center;
  }
}

/* 矮屏横屏手机适配 */
@media (max-height: 680px) and (min-width: 769px) {
  .stage {
    padding-top: 60px;
    padding-bottom: 44px;
  }

  .signal-tag {
    margin-bottom: 10px;
  }

  .quote-block {
    margin-bottom: 8px;
  }

  .quote-en {
    margin-bottom: 10px;
  }

  .quote-attribution {
    margin-bottom: 16px;
  }

  .era-cards {
    max-width: 660px;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .alert-dot {
    animation: none;
  }

  .backdrop-img,
  .backdrop-img.is-active {
    transform: none;
    transition: opacity 0.3s ease;
  }

  body.is-revealing .reveal-line,
  body.is-revealed .reveal-line {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }

  .hud-chrome,
  .timeline-panel,
  .stage,
  .era-card,
  .era-caption,
  .toast,
  .zen-exit-hint {
    transition: none;
  }
}
