:root {
  --gold: #d7b56a;
  --gold-soft: #f3e0ad;
  --ink: #f6efe2;
  --muted: rgba(246, 239, 226, 0.72);
  --line: rgba(215, 181, 106, 0.45);
  --shadow: rgba(8, 5, 3, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Noto Serif SC", "Songti SC", serif;
  background:
    radial-gradient(1200px 800px at 50% 40%, #2a1c12 0%, #0b0806 62%);
  color: var(--ink);
  overflow: hidden;
}

.stage {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.phone {
  position: relative;
  width: min(420px, 100vw);
  height: min(860px, 100dvh);
  overflow: hidden;
  background: #120c08;
  box-shadow:
    0 0 0 1px rgba(215, 181, 106, 0.28),
    0 30px 80px rgba(0, 0, 0, 0.55);
}

@media (max-width: 520px) {
  .stage { padding: 0; }
  .phone {
    width: 100vw;
    height: 100dvh;
    box-shadow: none;
  }
}

.grain, .vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 6;
}
.grain {
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.vignette {
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.38) 100%);
}

.loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: #100b08;
  transition: opacity .8s ease, visibility .8s ease;
}
.loader.is-gone {
  opacity: 0;
  visibility: hidden;
}
.loader-seal {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--gold), 0 0 36px rgba(215,181,106,.35);
  animation: pulse 2.4s ease-in-out infinite;
}
.loader-brand {
  font-family: "ZCOOL XiaoWei", serif;
  font-size: 32px;
  letter-spacing: 0.42em;
  margin-left: 0.42em;
}
.loader-sub {
  font-size: 12px;
  letter-spacing: 0.38em;
  color: var(--gold);
}
.loader-bar {
  width: 88px;
  height: 1px;
  background: rgba(215,181,106,.2);
  margin-top: 8px;
  overflow: hidden;
}
.loader-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  animation: load 1.6s ease forwards;
}

.deck {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(28px) scale(1.02);
  transition: opacity .7s ease, transform .8s cubic-bezier(.22,1,.36,1);
}
.slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  z-index: 2;
}
.slide.is-leave {
  opacity: 0;
  transform: translateY(-24px) scale(.98);
}

.bg-wrap {
  position: absolute;
  inset: -10%;
  transition: transform .45s ease-out;
  transform: translate3d(var(--tx, 0), var(--ty, 0), 0);
}
.bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.kenburns { animation: ken 18s ease-in-out infinite alternate; }
.slide.is-active .kenburns { animation-play-state: running; }

.veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12,8,6,.18) 0%, rgba(12,8,6,.2) 28%, rgba(12,8,6,.78) 72%, rgba(8,5,3,.92) 100%);
}
.veil-deep {
  background:
    linear-gradient(180deg, rgba(12,8,6,.35) 0%, rgba(12,8,6,.22) 30%, rgba(8,5,3,.86) 100%);
}
.veil-warm {
  background:
    linear-gradient(180deg, rgba(40,18,8,.2) 0%, rgba(12,8,6,.35) 40%, rgba(8,5,3,.9) 100%);
}
.veil-night {
  background:
    linear-gradient(180deg, rgba(6,8,16,.15) 0%, rgba(12,8,6,.35) 42%, rgba(8,5,3,.92) 100%);
}

.slide-inner {
  position: relative;
  z-index: 3;
  height: 100%;
  padding: 86px 28px 92px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cover { justify-content: flex-end; text-align: center; align-items: center; }
.invite { padding-bottom: 78px; }

.num {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--gold);
  margin-bottom: 10px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--gold-soft);
  margin-bottom: 8px;
}
.title {
  font-family: "Noto Serif SC", serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-shadow: 0 8px 30px var(--shadow);
}
.title-xl {
  font-family: "Noto Serif SC", serif;
  font-size: 68px;
  font-weight: 900;
  letter-spacing: 0.32em;
  margin-left: 0.32em;
  line-height: 1;
  text-shadow: 0 10px 40px rgba(0,0,0,.55);
}
.title-sub {
  margin-top: 16px;
  font-size: 16px;
  letter-spacing: 0.18em;
  line-height: 1.9;
  color: var(--gold-soft);
}
.cover-poem {
  margin-top: 22px;
  font-size: 13px;
  letter-spacing: 0.16em;
  line-height: 2;
  color: var(--muted);
}
.lead {
  margin: 12px 0 16px;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.06em;
  color: var(--gold-soft);
}
.body {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--muted);
  max-width: 34em;
}
.gold-line {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 14px 0 18px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.chip {
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.18em;
  padding: 6px 10px;
  backdrop-filter: blur(8px);
  background: rgba(18,12,8,.28);
  font-family: inherit;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.chip.is-on {
  background: linear-gradient(180deg, #e4c98a, #b8924a);
  color: #2a1b0c;
  border-color: transparent;
}
.chip-note {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--muted);
  min-height: 4.8em;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 4px 0 18px;
}
.stat {
  border: 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  background: transparent;
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}
.stat.is-on {
  border-top-color: var(--gold);
}
.stat-row b {
  display: block;
  font-size: 20px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.stat-row span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.quote {
  margin-top: 16px;
  padding-left: 12px;
  border-left: 1px solid var(--gold);
  font-size: 13px;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
  line-height: 1.8;
}

.route {
  list-style: none;
  margin: 0 0 14px;
}
.route li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 8px;
}
.route span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  min-width: 22px;
}

.card {
  border: 1px solid var(--line);
  background: rgba(18, 12, 8, 0.42);
  backdrop-filter: blur(14px);
  padding: 14px 14px 6px;
  margin: 4px 0 18px;
}
.card p {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 10px;
}
.card strong {
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.12em;
  font-size: 11px;
}

.cta-row {
  display: flex;
  gap: 10px;
}
.btn {
  flex: 1;
  height: 42px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, #e4c98a, #b8924a);
  color: #2a1b0c;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.2em;
}
.btn.ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--line);
}
.foot {
  margin-top: 16px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(246,239,226,.45);
}

.swipe-hint {
  margin-top: 28px;
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gold);
}
.chevron {
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: rotate(45deg);
  animation: bounce 1.6s infinite;
}

.hud {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}
.hud-top {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--gold-soft);
}
.hud-top img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--gold);
}
.dots {
  pointer-events: auto;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  list-style: none;
  display: grid;
  gap: 9px;
}
.dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0;
  background: rgba(246,239,226,.28);
  cursor: pointer;
  padding: 0;
}
.dots button.is-on {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(215,181,106,.8);
  transform: scale(1.2);
}
.sound {
  pointer-events: auto;
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(12,8,6,.35);
  color: var(--gold);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sound.is-off .wave { display: none; }

.slide.is-active .fade {
  animation: rise .85s cubic-bezier(.22,1,.36,1) both;
}
.slide.is-active .fade:nth-child(1) { animation-delay: .08s; }
.slide.is-active .fade:nth-child(2) { animation-delay: .16s; }
.slide.is-active .fade:nth-child(3) { animation-delay: .24s; }
.slide.is-active .fade:nth-child(4) { animation-delay: .32s; }
.slide.is-active .fade:nth-child(5) { animation-delay: .4s; }
.slide.is-active .fade:nth-child(6) { animation-delay: .48s; }
.slide.is-active .fade:nth-child(7) { animation-delay: .56s; }
.slide.is-active .fade:nth-child(8) { animation-delay: .64s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes ken {
  from { transform: scale(1) translate3d(0,0,0); }
  to { transform: scale(1.08) translate3d(1.5%, -1%, 0); }
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: .4; }
  50% { transform: rotate(45deg) translateY(5px); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes load {
  to { width: 100%; }
}

.loader-skip {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}
.title-sm { font-size: 34px; letter-spacing: 0.14em; }
.gate-btn, .stamp-btn, .ghost-link {
  margin-top: 18px;
  height: 42px;
  padding: 0 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #e4c98a, #b8924a);
  color: #2a1b0c;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.28em;
  cursor: pointer;
}
.stamp-btn, .ghost-link {
  background: transparent;
  color: var(--gold);
  width: 100%;
}
.ghost-link {
  height: auto;
  padding: 8px 0;
  border: 0;
  text-align: left;
  letter-spacing: 0.16em;
  font-size: 12px;
}

.tale-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0 14px;
}
.tale-tabs button {
  height: 36px;
  border: 1px solid var(--line);
  background: rgba(18,12,8,.3);
  color: var(--gold);
  font-family: inherit;
  letter-spacing: 0.18em;
  cursor: pointer;
}
.tale-tabs button.is-on {
  background: linear-gradient(180deg, #e4c98a, #b8924a);
  color: #2a1b0c;
  border-color: transparent;
}
.tale-panel {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--muted);
  min-height: 6.2em;
}

.route li {
  cursor: pointer;
  padding: 6px 8px;
  margin-left: -8px;
  border-left: 1px solid transparent;
}
.route li.is-on {
  border-left-color: var(--gold);
  background: rgba(215,181,106,.08);
}

.spark {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffe9a8;
  box-shadow: 0 0 18px 8px rgba(255, 200, 80, .45);
  opacity: 0;
  pointer-events: none;
  left: 42%;
  bottom: 28%;
}
.spark.is-on {
  animation: spark .7s ease-out;
}
@keyframes spark {
  0% { opacity: 1; transform: scale(.4); }
  100% { opacity: 0; transform: scale(2.4) translateY(-24px); }
}

.seal-mark {
  display: none;
  margin: 14px auto 0;
  width: 88px;
  height: 88px;
  border: 2px solid #c45b4a;
  color: #c45b4a;
  border-radius: 50%;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  align-content: center;
  transform: rotate(-12deg);
}
.seal-mark.is-on {
  display: grid;
  animation: stamp .45s cubic-bezier(.2,1.4,.3,1);
}
@keyframes stamp {
  0% { transform: rotate(-12deg) scale(1.4); opacity: 0; }
  100% { transform: rotate(-12deg) scale(1); opacity: 1; }
}

.veil-video {
  background:
    linear-gradient(180deg, rgba(12,8,6,.62) 0%, rgba(12,8,6,.42) 38%, rgba(8,5,3,.9) 100%);
}
.video-layout {
  justify-content: center;
  padding-top: 78px;
  padding-bottom: 64px;
}
.film-frame {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  margin: 18px 0 12px;
  border: 1px solid var(--line);
  background: #090705;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.film-corners::before,
.film-corners::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 3;
  pointer-events: none;
  border-color: var(--gold);
  border-style: solid;
}
.film-corners::before {
  top: 8px; left: 8px;
  border-width: 1px 0 0 1px;
}
.film-corners::after {
  right: 8px; bottom: 8px;
  border-width: 0 1px 1px 0;
}
.film-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}
.play-seal {
  position: absolute;
  inset: 0 0 44px;
  z-index: 4;
  border: 0;
  background: rgba(10,7,5,.28);
  color: var(--gold-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  font-family: inherit;
}
.play-seal span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  background: rgba(18,12,8,.45);
  letter-spacing: 0;
  font-size: 18px;
  padding-left: 4px;
}
.play-seal small {
  letter-spacing: 0.22em;
  font-size: 11px;
}
.play-seal.is-hide { display: none; }
.drop {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  padding: 16px 18px;
  background: rgba(10,7,5,.72);
  cursor: pointer;
  color: var(--gold-soft);
}
.drop.is-show { display: grid; }
.film-frame:has(.drop.is-show) .play-seal { display: none; }
.drop strong {
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 14px;
  color: var(--gold);
}
.drop span {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.vbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 6;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: linear-gradient(180deg, transparent, rgba(8,5,3,.78));
  color: var(--gold);
}
.vbar button {
  border: 0;
  background: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 13px;
  width: 24px;
  font-family: inherit;
}
.vbar input[type="range"] {
  flex: 1;
  accent-color: #d7b56a;
  height: 2px;
}
.vbar #time {
  font-size: 10px;
  letter-spacing: 0.08em;
  min-width: 34px;
  color: var(--muted);
}
.film-cap {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-align: center;
}
.phone.is-video .grain { opacity: .08; }
