/* ==========================================================================
   西华·女娲传说 非遗竖版 H5 — 各页面美术与交互样式（P1 ~ P12）
   ========================================================================== */

/* ========================= P1 加载页 ========================= */
.page-1 {
  background:
    radial-gradient(ellipse at 50% 36%, #dcc08a 0%, #bd9458 56%, #8a6335 100%);
}
.rock-art { opacity: .36; pointer-events: none; }
.rock-art svg { width: 100%; height: 100%; }
.page-1 .loader-title {
  left: 0;
  right: 0;
  top: 32%;
  text-align: center;
  font-family: var(--title-font);
  font-size: 64px;
  letter-spacing: 8px;
  color: #4a3218;
  text-shadow: 0 3px 10px rgba(255, 235, 190, .5);
}
.page-1 .t-sep { opacity: .6; margin: 0 4px; }
.page-1 .loader-sub {
  left: 0;
  right: 0;
  top: calc(32% + 108px);
  text-align: center;
  font-size: 27px;
  letter-spacing: 5px;
  color: #5a3f22;
}
.page-1 .loader-hint {
  left: 0;
  right: 0;
  bottom: 236px;
  text-align: center;
  font-size: 23px;
  letter-spacing: 3px;
  color: #5a3f22;
  animation: hintPulse 1.8s ease-in-out infinite;
}
.page-1 .loader-track {
  left: 150px;
  right: 150px;
  bottom: 188px;
  height: 16px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(60, 40, 20, .35);
  border: 1.5px solid rgba(110, 123, 122, .8);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .3);
}
.page-1 .loader-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #a7b8b5, #6e7b7a);
  box-shadow: 0 0 16px #a7b8b5;
  transition: width .12s linear;
}

/* ========================= P2 首页 · 篇章门户 ========================= */
.page-2 {
  background: radial-gradient(ellipse at 50% 28%, #3a3a46 0%, #23232c 46%, #121216 100%);
}
.page-2 .chaos-clouds {
  inset: 0;
  background:
    radial-gradient(circle at 28% 30%, rgba(180, 170, 200, .13), transparent 42%),
    radial-gradient(circle at 72% 48%, rgba(150, 160, 180, .11), transparent 46%),
    radial-gradient(circle at 46% 68%, rgba(120, 110, 140, .10), transparent 50%);
  filter: blur(6px);
}
.page-2 .p2-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f0e6c8;
  box-shadow: 0 0 8px #f0e6c8;
  animation: twinkle 3.4s ease-in-out infinite;
  pointer-events: none;
}
.page-2 .nuwa-silhouette {
  right: -46px;
  top: 96px;
  width: 300px;
  height: 300px;
  z-index: 1;
  opacity: .2;
  pointer-events: none;
  filter: drop-shadow(0 0 22px rgba(232, 200, 120, .3));
}
.page-2 .home-head {
  left: 50px;
  top: 146px;
  width: 420px;
  z-index: 5;
}
.page-2 .home-head h1 {
  font-family: var(--title-font);
  font-size: 84px;
  line-height: 1.15;
  letter-spacing: 10px;
  color: var(--gold);
  text-shadow: 0 4px 18px rgba(0, 0, 0, .7), 0 0 34px rgba(232, 200, 120, .38);
  word-break: break-word;
}
.page-2 .home-sub {
  margin-top: 24px;
  font-size: 25px;
  line-height: 1.85;
  letter-spacing: 3px;
  color: var(--sand);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
}
.page-2 .chapter-grid {
  left: 35px;
  top: 424px;
  width: 680px;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.chapter-entry {
  position: relative;
  height: 128px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border-radius: 12px;
  font-family: var(--title-font);
  color: #33220f;
  background:
    radial-gradient(ellipse at 30% 22%, rgba(255, 246, 220, .75), transparent 55%),
    linear-gradient(150deg, #d9c193 0%, #c2a067 52%, #9d7844 100%);
  border: 2px solid #7a5530;
  box-shadow:
    inset 0 2px 8px rgba(255, 245, 220, .5),
    inset 0 -5px 12px rgba(80, 52, 24, .4),
    0 6px 16px rgba(0, 0, 0, .42);
  transition: transform .28s ease, filter .28s ease, box-shadow .28s ease;
  overflow: hidden;
}
.chapter-entry::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='80'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='1.05'%20numOctaves='2'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}
.chapter-entry:hover {
  transform: translateY(-5px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 2px 8px rgba(255, 245, 220, .7),
    inset 0 -5px 12px rgba(80, 52, 24, .35),
    0 14px 26px rgba(0, 0, 0, .5),
    0 0 22px rgba(232, 200, 120, .4);
}
.chapter-entry:active { transform: translateY(-1px) scale(.985); }
.chapter-entry .ce-idx {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #f3e6c8;
  background: rgba(74, 50, 24, .78);
  box-shadow: inset 0 1px 3px rgba(255, 240, 200, .3);
}
.chapter-entry .ce-name {
  font-size: 29px;
  letter-spacing: 2px;
  line-height: 1.25;
  text-align: left;
  text-shadow: 0 1px 0 rgba(255, 245, 220, .4);
}
.chapter-entry.wide .ce-name { font-size: 22px; letter-spacing: 0; white-space: nowrap; }
.page-2 .home-foot {
  left: 0;
  right: 0;
  bottom: 96px;
  text-align: center;
  font-size: 21px;
  letter-spacing: 4px;
  color: var(--celadon-light);
  opacity: .8;
}
.page-2 .home-progress {
  left: 0;
  right: 0;
  bottom: 44px;
  text-align: center;
  font-family: var(--title-font);
  font-size: 21px;
  letter-spacing: 4px;
  color: var(--celadon-light);
  opacity: .7;
}

/* ========================= P3 混沌蒙昧 ========================= */
.page-3 {
  background: radial-gradient(ellipse at 50% 45%, #2f3a3e 0%, #1c2428 60%, #0f1517 100%);
  transition: background 1.2s ease, filter 1.2s ease;
}
.page-3 .chaos-mist {
  inset: 0;
  background:
    radial-gradient(circle at 38% 46%, rgba(110, 123, 122, .22), transparent 52%),
    radial-gradient(circle at 66% 62%, rgba(90, 105, 105, .16), transparent 48%);
  animation: mistDrift 14s ease-in-out infinite alternate;
  transition: opacity 1.2s ease;
}
@keyframes mistDrift { from { transform: translateX(-26px); } to { transform: translateX(26px); } }
.page-3.lit { background: radial-gradient(ellipse at 50% 45%, #4d5c62 0%, #2e393d 60%, #1d2528 100%); }
.page-3.lit .chaos-mist { opacity: .15; }
.page-3 .star-point {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: radial-gradient(circle, #5a5a55, #33332f);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6), 0 0 0 1px rgba(160, 170, 165, .25);
  transition: background .4s ease, box-shadow .4s ease;
  touch-action: manipulation;
}
.page-3 .star-point::after { content: ''; position: absolute; inset: -20px; }
.page-3 .star-point .sp-core {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #6a6a63;
  transition: all .4s ease;
}
.page-3 .star-point .sp-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0;
  pointer-events: none;
}
.page-3 .star-point.lit {
  background: radial-gradient(circle, #fff6d8, var(--gold) 52%, var(--gold-deep) 100%);
  box-shadow: 0 0 22px 6px rgba(232, 200, 120, .75), 0 0 0 2px rgba(255, 246, 216, .7);
}
.page-3 .star-point.lit .sp-core { background: #fff; box-shadow: 0 0 14px #fff; }
.page-3 .star-point.lit .sp-ripple { animation: ripple 1.1s ease-out; }
.page-3 .chapter-hint { bottom: 268px; }

/* ========================= P4 抟土造人 ========================= */
.page-4 { background: linear-gradient(180deg, #d8c79a 0%, #c9ad74 46%, #b38f54 100%); }
.page-4 .river {
  left: 0;
  right: 0;
  bottom: 0;
  height: 240px;
  background: linear-gradient(180deg, rgba(120, 160, 170, .45), rgba(66, 106, 126, .8));
}
.page-4 .river::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0, transparent 60px, rgba(255, 255, 255, .16) 60px, rgba(255, 255, 255, .16) 88px);
  animation: waterFlow 6s linear infinite;
}
@keyframes waterFlow { from { background-position: 0 0; } to { background-position: 148px 0; } }
.page-4 .nuwa-side {
  left: -6px;
  top: 346px;
  width: 280px;
  height: 536px;
  z-index: 2;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .38));
}
.page-4 .palm-zone {
  left: 138px;
  top: 476px;
  width: 190px;
  height: 190px;
  z-index: 3;
  border: 2px dashed rgba(255, 250, 230, .38);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.page-4 .palm-zone span { font-size: 18px; color: rgba(255, 250, 230, .45); letter-spacing: 4px; }
.page-4 .palm-zone.over {
  border-color: var(--gold);
  background: rgba(232, 200, 120, .16);
  box-shadow: 0 0 26px rgba(232, 200, 120, .6);
}
.page-4 .clay {
  width: 78px;
  height: 70px;
  z-index: 6;
  border-radius: 50% 50% 45% 45%;
  cursor: grab;
  touch-action: none;
  background: radial-gradient(ellipse at 34% 28%, #d29a55, #8a5a2b 68%, #57371a 100%);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .4), 0 4px 10px rgba(0, 0, 0, .3);
}
.page-4 .clay.dragging { z-index: 40; cursor: grabbing; }
.page-4 .clay.used { display: none; }
.page-4 .water-drop {
  width: 64px;
  height: 78px;
  z-index: 6;
  cursor: grab;
  touch-action: none;
}
.page-4 .water-drop svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.page-4 .water-drop.dragging { z-index: 40; cursor: grabbing; }
.page-4 .mound {
  width: 84px;
  height: 56px;
  z-index: 4;
  border-radius: 50%;
  background: radial-gradient(ellipse at 34% 28%, #c8924f, #7a4a20 78%);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .45);
}
.page-4 .mini-person {
  width: 42px;
  height: 62px;
  z-index: 5;
  animation: personHop 1.15s ease-out;
}
.page-4 .mini-person .halo {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 200, 120, .5), transparent 70%);
  animation: glow 2.4s ease-in-out infinite;
}
@keyframes personHop {
  0% { transform: scale(0); opacity: 0; }
  40% { transform: scale(1.15) translateY(-10px); opacity: 1; }
  70% { transform: scale(1) translateY(-20px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ========================= P5 引绳挥洒 ========================= */
.page-5 { background: linear-gradient(180deg, #cdbb8c 0%, #b89e66 55%, #9c7d45 100%); }
.page-5 .ground {
  left: 0;
  right: 0;
  bottom: 0;
  height: 300px;
  background: linear-gradient(180deg, #a88449, #7a5c30);
}
.page-5 .nuwa-hold {
  left: 26px;
  top: 340px;
  width: 250px;
  height: 520px;
  z-index: 2;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .38));
}
.page-5 .mud-pool {
  left: 255px;
  top: 706px;
  width: 230px;
  height: 76px;
  border-radius: 50%;
  z-index: 2;
  background: radial-gradient(ellipse, #6b4a22, #49300f);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, .5);
}
.page-5 .vine {
  left: 318px;
  top: 372px;
  width: 70px;
  height: 320px;
  z-index: 8;
  display: flex;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  transform-origin: top center;
}
.page-5 .vine::after { content: ''; position: absolute; inset: -24px -34px; }
.page-5 .vine svg { height: 100%; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
.page-5 .vine.pulling { cursor: grabbing; }
.page-5 .watcher { width: 34px; height: 52px; z-index: 2; }
.page-5 .mud-splash {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #6b4a22;
  z-index: 6;
  transition: transform 1s cubic-bezier(.35, .6, .45, 1), opacity .3s ease;
}
.page-5 .walker {
  width: 34px;
  height: 52px;
  z-index: 3;
  animation: walkerX var(--dur, 8s) ease-in-out infinite alternate;
}
@keyframes walkerX { from { transform: translateX(0); } to { transform: translateX(var(--dx, 80px)); } }

/* ========================= P6 人间繁兴 ========================= */
.page-6 { background: linear-gradient(180deg, #cdd9a8 0%, #a8c078 50%, #8aa85a 100%); }
.page-6 .grass {
  left: 0;
  right: 0;
  bottom: 0;
  height: 300px;
  background: linear-gradient(180deg, #7fa04e, #5a7934);
}
.page-6 .stream {
  left: -20px;
  bottom: 64px;
  width: 300px;
  height: 190px;
  z-index: 2;
  background: linear-gradient(180deg, rgba(132, 178, 188, .62), rgba(88, 138, 158, .8));
  border-radius: 0 62% 0 0;
  box-shadow: inset 0 4px 12px rgba(255, 255, 255, .25);
}
.page-6 .tree { z-index: 2; }
.page-6 .villager {
  width: 46px;
  height: 62px;
  z-index: 6;
  cursor: pointer;
  transition: transform .25s ease;
}
.page-6 .villager:hover { transform: scale(1.12); }
.page-6 .villager .v-halo {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
  animation: twinkle 1.8s ease-in-out infinite;
}
.page-6 .villager-bubble {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translate(-50%, -110%);
  padding: 12px 20px;
  background: var(--sand);
  border: 1.5px solid var(--ochre-dark);
  border-radius: 16px;
  font-size: 23px;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  z-index: 30;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.page-6 .villager-bubble.show { opacity: 1; animation: bubblePop .32s ease; }
@keyframes bubblePop {
  from { transform: translate(-50%, -100%) scale(.7); opacity: 0; }
  to { transform: translate(-50%, -110%) scale(1); opacity: 1; }
}
/* P6 隐藏彩蛋：溪边娲皇古玉 */
.page-6 .jade-site {
  left: 24px;
  bottom: 140px;
  width: 210px;
  height: 120px;
  z-index: 11;
  cursor: pointer;
  touch-action: manipulation;
}
.page-6 .jade-site::after { content: ''; position: absolute; inset: -10px; }
.page-6 .site-stone {
  position: absolute;
  border-radius: 50% 45% 42% 50%;
  background: radial-gradient(ellipse at 35% 28%, #a3afa5, #5c665e 62%, #343b35 100%);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .45), 0 3px 8px rgba(0, 0, 0, .3);
}
.page-6 .site-stone.s1 { left: 22px; bottom: 6px; width: 74px; height: 34px; }
.page-6 .site-stone.s2 { left: 2px; bottom: 22px; width: 42px; height: 26px; }
.page-6 .site-stone.s3 { left: 150px; bottom: 4px; width: 54px; height: 28px; }
.page-6 .jade-halo {
  position: absolute;
  left: 39px;
  bottom: -27px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 224, 180, .7), rgba(90, 190, 160, .22) 46%, transparent 70%);
  animation: jadeBreath 3.4s ease-in-out infinite;
  pointer-events: none;
}
.page-6 .jade-ripple {
  position: absolute;
  left: 64px;
  bottom: -2px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid rgba(168, 240, 210, .9);
  opacity: 0;
  pointer-events: none;
}
.page-6 .jade-gem {
  position: absolute;
  left: 76px;
  bottom: 16px;
  width: 66px;
  height: 54px;
  transform: rotate(-6deg);
  transform-origin: center;
  filter: drop-shadow(0 0 12px rgba(120, 224, 180, .8)) drop-shadow(0 4px 6px rgba(0, 0, 0, .35));
  transition: filter .3s ease;
}
.page-6 .jade-gem svg { width: 100%; height: 100%; }
.page-6 .jade-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eafff5;
  box-shadow: 0 0 10px #b6ffe0, 0 0 18px rgba(160, 255, 220, .7);
  opacity: 0;
  pointer-events: none;
  animation: jadeSpark 2s ease-in-out infinite;
}
.page-6 .jade-spark.sp1 { left: 66px; bottom: 62px; animation-delay: 0s; }
.page-6 .jade-spark.sp2 { left: 142px; bottom: 50px; animation-delay: .5s; }
.page-6 .jade-spark.sp3 { left: 96px; bottom: 90px; animation-delay: 1.1s; }
.page-6 .jade-spark.sp4 { left: 122px; bottom: 18px; animation-delay: 1.5s; }
.page-6 .jade-site.active .jade-gem { animation: jadePop .7s cubic-bezier(.2, .9, .3, 1.3); }
.page-6 .jade-site.active .jade-ripple { animation: jadeRipple 1.1s ease-out; }
.page-6 .jade-site.active .jade-halo { animation: jadeBreath 1.2s ease-in-out infinite; }
@keyframes jadeBreath {
  0%, 100% { opacity: .38; transform: scale(.86); }
  50% { opacity: .92; transform: scale(1.14); }
}
@keyframes jadeSpark {
  0%, 76%, 100% { opacity: 0; transform: scale(.3); }
  84% { opacity: 1; transform: scale(1.2); }
  92% { opacity: .35; transform: scale(.8); }
}
@keyframes jadePop {
  0% { transform: rotate(-6deg) scale(1); }
  35% { transform: rotate(-2deg) scale(1.34); }
  100% { transform: rotate(-6deg) scale(1); }
}
@keyframes jadeRipple {
  0% { transform: scale(.35); opacity: .9; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ========================= P7 天倾浩劫 ========================= */
.page-7 { background: linear-gradient(180deg, #4a1f1f 0%, #2e1414 60%, #180a0a 100%); }
.page-7 .sky-crack {
  left: 50%;
  top: 92px;
  transform: translateX(-50%);
  width: 84px;
  height: 452px;
  z-index: 1;
  transition: filter .6s ease;
}
.page-7 .sky-crack svg { width: 100%; height: 100%; }
.page-7 .sky-crack.crack-active { filter: drop-shadow(0 0 20px #ff7043); animation: crackGlow 1.2s ease; }
@keyframes crackGlow {
  0% { opacity: .45; }
  50% { opacity: 1; }
  100% { opacity: 1; }
}
.page-7 .flood {
  left: 0;
  right: 0;
  bottom: 0;
  height: 170px;
  background: linear-gradient(180deg, rgba(62, 92, 122, .7), rgba(18, 36, 64, .92));
}
.page-7 .match-item {
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 12px;
  font-family: var(--title-font);
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: 2px;
  border-radius: 10px;
  color: var(--sand);
  background: rgba(32, 18, 18, .76);
  border: 1.5px solid rgba(232, 200, 120, .5);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.page-7 .match-item.left {
  left: 44px;
  top: 540px;
  width: 226px;
  height: 96px;
  cursor: grab;
  color: var(--gold);
  touch-action: none;
  border-color: rgba(232, 200, 120, .8);
  box-shadow: 0 0 16px rgba(232, 200, 120, .22);
}
.page-7 .match-item.left::after { content: ''; position: absolute; inset: -10px; }
.page-7 .match-item.left:active { cursor: grabbing; }
.page-7 .match-item.right {
  right: 34px;
  width: 226px;
  height: 80px;
}
.page-7 .match-item.right[data-result="pillar"] { top: 404px; }
.page-7 .match-item.right[data-result="sky"] { top: 504px; }
.page-7 .match-item.right[data-result="flood"] { top: 604px; }
.page-7 .match-item.right[data-result="fire"] { top: 704px; }
.page-7 .match-item.right.done {
  background: rgba(184, 65, 46, .38);
  border-color: var(--c-red);
  color: #ffe4c8;
}
.page-7 .match-item.right.wrong-flash { animation: shake .35s ease; border-color: #ff5252; }
.page-7 .match-svg { inset: 0; z-index: 4; pointer-events: none; }

/* ========================= P8 炼石补天 ========================= */
.page-8 { background: linear-gradient(180deg, #2a2530 0%, #392a28 42%, #4a3322 100%); }
.page-8 .broken-sky {
  left: 0;
  right: 0;
  top: 0;
  height: 420px;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 100%, rgba(64, 54, 74, .6), transparent 62%);
}
.page-8 .p8-crack {
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  width: 110px;
  height: 140px;
  z-index: 2;
  opacity: .9;
  filter: drop-shadow(0 0 10px rgba(255, 112, 67, .35));
  transition: filter 1s ease, opacity 1s ease;
}
.page-8 .p8-crack svg { width: 100%; height: 100%; }
.page-8 .p8-crack.healed {
  filter: drop-shadow(0 0 26px rgba(232, 200, 120, .9));
  opacity: 1;
}
.page-8 .p8-crack.healed path:nth-child(1) { stroke: #e8c878; }
.page-8 .p8-crack.healed path:nth-child(2) { stroke: #fff3c4; }
.page-8 .mountain {
  left: 0;
  right: 0;
  bottom: 0;
  height: 500px;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent, #2a1f16 34%),
    linear-gradient(180deg, #4a3322, #241810);
  clip-path: polygon(0 56%, 18% 32%, 38% 52%, 54% 22%, 74% 48%, 100% 28%, 100% 100%, 0 100%);
}
.page-8 .chapter-title { top: 168px; }
.page-8 .divine-fire {
  left: 285px;
  top: 400px;
  width: 180px;
  height: 244px;
  z-index: 5;
  border-radius: 50% 50% 42% 42%;
  background: radial-gradient(ellipse at 50% 72%, rgba(255, 176, 84, .45), rgba(255, 112, 67, .16) 46%, transparent 72%);
  box-shadow: 0 0 42px 10px rgba(255, 140, 66, .25);
}
.page-8 .divine-fire .flame {
  position: absolute;
  bottom: 0;
  width: 58px;
  height: 168px;
  border-radius: 50% 50% 30% 30%;
  background: linear-gradient(180deg, #ffe082, #ff7043 55%, #b71c1c);
  filter: blur(1px);
  animation: flameFlicker .55s ease-in-out infinite alternate;
  transition: background .4s ease;
}
@keyframes flameFlicker {
  from { transform: scaleY(1) scaleX(1); opacity: .94; }
  to { transform: scaleY(1.1) scaleX(.9); opacity: 1; }
}
.page-8 .colored-stone {
  width: 82px;
  height: 74px;
  z-index: 8;
  border-radius: 45% 55% 50% 50%;
  cursor: grab;
  touch-action: none;
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .45), 0 4px 12px rgba(0, 0, 0, .4), 0 0 16px currentColor;
  transition: box-shadow .25s ease, filter .25s ease;
}
.page-8 .colored-stone.dragging { z-index: 50; cursor: grabbing; filter: brightness(1.15); }
.page-8 .colored-stone.used { display: none; }
.page-8 .sky-stream {
  left: 50%;
  top: 560px;
  width: 16px;
  height: 0;
  z-index: 4;
  transform: translateX(-50%);
  border-radius: 8px;
  box-shadow: 0 0 24px currentColor;
  pointer-events: none;
}

/* ========================= P9 苍天复宁 ========================= */
.page-9 {
  background: linear-gradient(180deg, #f2dcaa 0%, #efc987 30%, #cfa771 62%, #a8bda0 100%);
}
.page-9 .peace-mountain {
  left: 0;
  right: 0;
  bottom: 170px;
  height: 300px;
  background:
    linear-gradient(180deg, rgba(150, 170, 150, .55), rgba(110, 130, 110, .35)),
    linear-gradient(180deg, transparent, rgba(120, 110, 80, .25));
  clip-path: polygon(0 62%, 16% 34%, 32% 58%, 48% 24%, 64% 52%, 82% 30%, 100% 56%, 100% 100%, 0 100%);
  opacity: .7;
}
.page-9 .peace-river {
  left: 0;
  right: 0;
  bottom: 0;
  height: 240px;
  background: linear-gradient(180deg, rgba(150, 192, 182, .6), rgba(88, 138, 148, .82));
}
.page-9 .dark-cloud {
  inset: 0;
  z-index: 8;
  width: 750px;
  height: 1334px;
  touch-action: none;
  transition: opacity .9s ease;
}
.page-9 .heritage-icon {
  right: 40px;
  width: 118px;
  height: 118px;
  z-index: 11;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(28, 21, 14, .58);
  border: 2px solid var(--gold);
  box-shadow: 0 0 18px rgba(232, 200, 120, .4);
  transition: transform .28s ease, background .28s ease;
}
.page-9 .heritage-icon:hover { transform: scale(1.08); background: rgba(50, 36, 22, .72); }
.page-9 .heritage-icon .hi-orb {
  font-family: var(--title-font);
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
}
.page-9 .heritage-icon .hi-label {
  font-family: var(--title-font);
  font-size: 17px;
  letter-spacing: 1px;
  color: var(--sand);
  line-height: 1.15;
  text-align: center;
}
.page-9 .chapter-title,
.page-9 .chapter-body,
.page-9 .chapter-hint,
.page-9 .continue-btn,
.page-9 .chapter-nav { z-index: 12; }

/* ========================= P10 知识答题 ========================= */
.page-10 { background: linear-gradient(180deg, #ece0c6 0%, #d9c8a4 100%); }
.page-10 .quiz-title {
  left: 0;
  right: 0;
  top: 116px;
  text-align: center;
  font-family: var(--title-font);
  font-size: 44px;
  letter-spacing: 8px;
  color: var(--ochre-deep);
}
.page-10 .quiz-score {
  left: 0;
  right: 0;
  top: 194px;
  text-align: center;
  font-size: 25px;
  letter-spacing: 3px;
  color: var(--celadon-deep);
}
.page-10 .quiz-area {
  left: 90px;
  right: 60px;
  top: 316px;
  z-index: 12;
}
.page-10 .quiz-q {
  font-size: 31px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 36px;
  text-align: center;
}
.page-10 .quiz-opts { display: flex; flex-direction: column; gap: 20px; }
.page-10 .quiz-opt {
  width: 100%;
  padding: 24px 26px;
  text-align: left;
  font-size: 27px;
  letter-spacing: 1px;
  color: var(--ink);
  background: rgba(255, 255, 255, .58);
  border: 2px solid var(--ochre-dark);
  border-radius: 12px;
  transition: background .22s ease, transform .22s ease, border-color .22s ease;
}
.page-10 .quiz-opt:hover { background: rgba(255, 255, 255, .85); transform: translateX(5px); }
.page-10 .quiz-opt.correct { background: #c8e6c9; border-color: #4a8c4f; color: #2e5d32; }
.page-10 .quiz-opt.wrong { background: #f2c1bd; border-color: #b8412e; color: #7a281c; animation: shake .4s ease; }
.page-10 .quiz-opt:disabled { cursor: default; opacity: .75; }
.page-10 .quiz-opt.correct:disabled { opacity: 1; }

/* ========================= P11 总结纪念页 ========================= */
.page-11 { background: linear-gradient(180deg, #d8c79a 0%, #bda06a 56%, #8a6e44 100%); }
.page-11 .nuwa-far {
  left: 50%;
  top: 132px;
  transform: translateX(-50%);
  width: 250px;
  height: 470px;
  z-index: 1;
  opacity: .22;
}
.page-11 .light-dots { inset: 0; z-index: 2; pointer-events: none; }
.page-11 .light-dots .ld {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff3c4;
  box-shadow: 0 0 10px #fff3c4;
  animation: twinkle 3s ease-in-out infinite;
}
.page-11 .stele {
  left: 50%;
  top: 352px;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  z-index: 6;
  cursor: pointer;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(160deg, #6e5a40, #463824);
  border: 3px solid #382c1a;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .5), inset 0 2px 8px rgba(255, 235, 190, .14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.page-11 .stele:hover { transform: translateX(-50%) translateY(-4px); box-shadow: 0 18px 38px rgba(0, 0, 0, .55), inset 0 2px 8px rgba(255, 235, 190, .18); }
.page-11 .stele:active { transform: translateX(-50%) scale(.99); }
.page-11 .stele-text {
  font-family: var(--title-font);
  font-size: 44px;
  letter-spacing: 10px;
  color: var(--gold);
  writing-mode: vertical-rl;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .65);
}
.page-11 .stele-hint { font-size: 18px; letter-spacing: 4px; color: rgba(232, 220, 196, .55); }
.page-11 .stamp-mark {
  right: 30px;
  bottom: 148px;
  width: 130px;
  height: 130px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--title-font);
  font-size: 36px;
  letter-spacing: 2px;
  color: #fff;
  background: var(--c-red);
  border: 3px solid #7a1a10;
  border-radius: 12px;
  opacity: 0;
  transform: scale(2.1) rotate(-14deg);
  box-shadow: 0 0 22px rgba(184, 65, 46, .6);
  pointer-events: none;
}
.page-11 .stamp-mark.stamped { animation: stampDown .65s cubic-bezier(.2, .9, .3, 1.25) forwards; }
@keyframes stampDown { to { opacity: .94; transform: scale(1) rotate(-7deg); } }
.page-11 .video-btn {
  left: 150px;
  right: 150px;
  top: 692px;
  height: 76px;
  font-size: 26px;
  z-index: 8;
}
.page-11 .p11-body {
  left: 64px;
  right: 64px;
  top: 796px;
  z-index: 8;
  padding: 14px 20px;
  font-size: 24px;
  line-height: 1.78;
  color: var(--sand);
  background: rgba(24, 18, 12, .5);
  border-left: 3px solid rgba(232, 200, 120, .45);
  border-radius: 6px;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}
.page-11 .chapter-title h2 { font-size: 36px; letter-spacing: 4px; }
.page-11 .chapter-title { z-index: 8; }
.page-11 .chapter-hint { z-index: 8; }
.page-11 .continue-btn { z-index: 8; }

/* 视频弹窗：横版 MP4，宽度自适应弹窗，保持原始比例不变形 */
.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(122, 85, 48, .45);
}
.p11-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}
.video-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  color: var(--sand);
  background: rgba(12, 9, 6, .94);
}
.video-fallback strong {
  font-family: var(--title-font);
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--gold);
}
.video-fallback span {
  font-size: 18px;
  line-height: 1.6;
  color: var(--celadon-light);
}
.video-fallback.show { display: flex; }
.video-note {
  margin-top: 14px;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--celadon-deep);
}

/* ========================= P12 尾页 ========================= */
.page-12 { background: linear-gradient(180deg, #efe6d2 0%, #e0d2b4 100%); }
.page-12 .nuwa-line {
  left: 22px;
  bottom: 80px;
  width: 150px;
  height: 280px;
  opacity: .2;
  pointer-events: none;
}
.page-12 .end-line {
  left: 0;
  right: 0;
  top: 398px;
  text-align: center;
}
.page-12 .end-title {
  font-family: var(--title-font);
  font-size: 58px;
  letter-spacing: 8px;
  color: var(--ochre-deep);
  text-shadow: 0 2px 8px rgba(122, 85, 48, .28);
}
.page-12 .end-title .t-sep { opacity: .6; margin: 0 4px; }
.page-12 .end-sub {
  margin-top: 26px;
  font-size: 27px;
  letter-spacing: 6px;
  color: var(--celadon-deep);
}
.page-12 .end-btns {
  left: 0;
  right: 0;
  top: 632px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  z-index: 5;
}
.page-12 .end-btn {
  width: 400px;
  height: 92px;
  font-size: 30px;
}
