/* 家长会叙事页：与下载页同系的深底、金线、全屏分镜；独立样式避免与 .page-download 冲突 */
:root {
  --bg: #0a0a0c;
  --bg-deep: #050506;
  --surface: #16161c;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --text-muted: #71717a;
  --gold: #f0b429;
  --gold-bright: #fde047;
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --pm-header-h: 3.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  scroll-snap-type: y proximity;
  scroll-padding-top: 4.75rem;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: none;
  }
}
html.pm-no-smooth {
  scroll-behavior: auto;
}

body.page-parent {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.page-parent .pm-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(118deg, rgba(240, 180, 41, 0.1) 0%, transparent 48%),
    linear-gradient(180deg, #0c0c0e 0%, var(--bg-deep) 100%);
  pointer-events: none;
}
.page-parent .pm-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 12%, #000 18%, transparent 70%);
  opacity: 0.55;
}
.page-parent .pm-aurora {
  position: fixed;
  top: -20%;
  right: -15%;
  width: min(90vw, 48rem);
  height: min(90vw, 48rem);
  z-index: -1;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.12) 0%, transparent 55%);
  filter: blur(60px);
  pointer-events: none;
  animation: pmAurora 18s var(--ease) infinite;
}
@keyframes pmAurora {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.9;
  }
  50% {
    transform: translate(-3%, 4%) scale(1.05);
    opacity: 0.7;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-parent .pm-aurora {
    animation: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 顶栏 */
.pm-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.92) 0%, rgba(10, 10, 12, 0) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pm-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
}
.pm-brand img {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.4rem;
}
.pm-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-left: 1.25rem;
  transition: color 0.2s;
}
.pm-nav a:hover,
.pm-nav a:focus-visible {
  color: var(--gold-bright);
  outline: none;
}

/* 底部进度 + 分镜点 */
.pm-rail {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem 1rem;
  background: linear-gradient(0deg, rgba(5, 5, 6, 0.95) 0%, transparent 100%);
  pointer-events: none;
}
.pm-dots {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 90vw;
  pointer-events: auto;
}
.pm-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.pm-dot[aria-current="true"] {
  background: var(--gold);
  transform: scale(1.25);
}
.pm-dot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.pm-progress-wrap {
  width: min(32rem, 86vw);
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  pointer-events: none;
}
.pm-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a16207, var(--gold), var(--gold-bright));
  border-radius: 2px;
  transform-origin: left;
}

/* 分镜主舞台 */
#pm-main {
  padding-top: var(--pm-header-h);
  padding-bottom: 5rem;
}

.pm-scene {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 1.25rem 3rem;
  max-width: 44rem;
  margin: 0 auto;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin-top: 3.5rem;
}
@media (min-width: 50rem) {
  .pm-scene {
    max-width: 52rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.pm-chapter {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.25rem;
  opacity: 0.95;
}
.pm-scene h1,
.pm-scene h2 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 1.1rem + 2.2vw, 2.75rem);
}
.pm-scene h2 {
  font-size: clamp(1.45rem, 0.95rem + 1.4vw, 2rem);
}
.pm-lead {
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
  color: var(--text-dim);
  line-height: 1.75;
  margin: 0 0 1.5rem;
}
.pm-body {
  font-size: 0.98rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin: 0 0 1.25rem;
}
.pm-glow {
  color: #fff;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}
.pm-list {
  margin: 0.5rem 0 0;
  padding: 0 0 0 1.1rem;
  color: var(--text-dim);
  line-height: 1.85;
  font-size: 0.95rem;
}
.pm-list li {
  margin: 0.4rem 0;
}
.pm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.35em 0.7em;
  border: 1px solid rgba(240, 180, 41, 0.25);
  border-radius: 999px;
  margin: 0.2rem 0.35rem 0.2rem 0;
  background: rgba(22, 22, 28, 0.6);
}

.pm-hero {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}
.pm-hero-logo {
  display: block;
  margin: 0 auto 1.5rem;
  width: min(5.5rem, 30vw);
  height: auto;
  border-radius: 0.6rem;
  filter: drop-shadow(0 12px 40px rgba(240, 180, 41, 0.15));
}
.pm-hero h1 {
  font-size: clamp(1.85rem, 1.1rem + 2.4vw, 2.9rem);
  margin-bottom: 0.75rem;
}
.pm-hero .pm-sub {
  font-size: clamp(0.95rem, 0.88rem + 0.3vw, 1.1rem);
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.pm-scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}
.pm-scroll-cue__line {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(180deg, var(--gold), transparent);
  border-radius: 1px;
  animation: pmScrollLine 2.2s var(--ease) infinite;
}
@keyframes pmScrollLine {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(0.5);
  }
  50% {
    opacity: 0.9;
    transform: scaleY(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pm-scroll-cue__line {
    animation: none;
  }
}
.pm-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65em 1.2em;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 0.4rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.pm-btn--gold {
  color: #0a0a0a;
  background: linear-gradient(145deg, #ffe066, var(--gold));
  box-shadow: 0 4px 24px rgba(240, 180, 41, 0.25);
}
.pm-btn--gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(240, 180, 41, 0.35);
  color: #0a0a0a;
}
.pm-btn--outline {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(22, 22, 28, 0.5);
}
.pm-btn--outline:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* 动效由 GSAP 控制；无脚本 / 降级时由 pm-fallback 显式全显 */
.pm-reveal,
[class*="pm-hero-reveal"] {
  will-change: opacity, transform;
}
body.pm-fallback .pm-reveal,
body.pm-fallback [class*="pm-hero-reveal"],
body.pm-fallback .pm-scroll-cue,
body.pm-reduced .pm-reveal,
body.pm-reduced [class*="pm-hero-reveal"],
body.pm-reduced .pm-scroll-cue {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  visibility: visible !important;
}

/* 分镜间装饰 */
.pm-scene::before {
  content: attr(data-pm-idx);
  position: absolute;
  top: 1.2rem;
  right: 0.5rem;
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 28rem) {
  .pm-scene::before {
    font-size: 2.5rem;
    right: 0.25rem;
  }
}

/* 结尾大面板 */
.pm-fin {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}
.pm-fin .pm-burst {
  font-size: 2.5rem;
  line-height: 1;
  margin: 0 0 0.5rem;
  filter: drop-shadow(0 0 24px rgba(240, 180, 41, 0.35));
}

/* 背景配乐：本地 mp3，见 assets/audio/README */
.pm-audio-el {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.pm-music {
  position: fixed;
  z-index: 199;
  top: calc(3.5rem + 0.45rem);
  right: 0.9rem;
  max-width: min(18.5rem, 92vw);
  padding: 0.6rem 0.85rem 0.7rem;
  background: rgba(12, 12, 14, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.55rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.pm-music__hint {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.pm-music__row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.pm-music__btn {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(240, 180, 41, 0.38);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 224, 102, 0.18), rgba(240, 180, 41, 0.1));
  color: var(--gold-bright);
  cursor: pointer;
  font-size: 1.12rem;
  line-height: 1;
  padding: 0;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s, background 0.2s;
}
.pm-music__btn:hover,
.pm-music__btn:focus-visible {
  box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.45);
  outline: none;
  transform: scale(1.04);
  border-color: rgba(255, 224, 102, 0.55);
}
.pm-music__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.pm-music__ic--pause {
  display: none;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
}
.pm-music__btn.is-playing .pm-music__ic--play {
  display: none;
}
.pm-music__btn.is-playing .pm-music__ic--pause {
  display: inline;
}
.pm-music__vol-label {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
}
.pm-music__range {
  width: 100%;
  accent-color: var(--gold);
  height: 0.28rem;
  cursor: pointer;
}
.pm-music__err {
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
  color: #f87171;
  line-height: 1.45;
}
.pm-music__chain {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.5rem 0 0;
  padding: 0.4rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-muted);
  cursor: default;
  pointer-events: auto;
}
.pm-music__chain input {
  margin-top: 0.15rem;
  accent-color: var(--gold);
  flex-shrink: 0;
  cursor: pointer;
}
.pm-music__chain label {
  cursor: pointer;
  user-select: none;
  flex: 1;
  min-width: 0;
}
@media (max-width: 30rem) {
  .pm-music {
    left: 0.7rem;
    right: 0.7rem;
    max-width: none;
  }
}
