/* 时光票根 · 演唱会现场主题
   深夜场暗底 + 舞台追光 + 光尘 + 纯 CSS 纪念票根卡片 */
:root {
  color-scheme: dark;
  --night: #05070d;
  --ink: #fff6e7;
  --muted: rgba(255, 246, 231, .62);
  --faint: rgba(255, 246, 231, .38);
  --line: rgba(255, 246, 231, .13);
  --gold: #f5b85c;
  --gold-soft: #ffd9a0;
  --pink: #ff5ea8;
  --cyan: #3fe0d0;
  --violet: #b9a1ff;
  --paper-ink: #2a1c0c;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--night);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(255, 94, 168, .10), transparent 60%),
    radial-gradient(1000px 600px at -12% 22%, rgba(63, 224, 208, .08), transparent 62%),
    radial-gradient(1400px 800px at 50% 110%, rgba(245, 184, 92, .07), transparent 60%),
    linear-gradient(180deg, #080b14 0%, var(--night) 38%, #04060b 100%);
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

[id] {
  scroll-margin-top: 88px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: #10141f;
  color: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 0 max(clamp(24px, 5vw, 72px), calc((100% - 1240px) / 2 + 64px));
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 13, .72);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  font-weight: 800;
  font-size: 17px;
}

.brand img {
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
}

.site-header nav {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.site-header nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color .25s ease;
}

.site-header nav a:hover {
  color: var(--ink);
}

.store-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px dashed rgba(255, 246, 231, .3);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

/* ---------- shared type ---------- */

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
  text-wrap: balance;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  align-items: center;
  gap: clamp(24px, 3.5vw, 52px);
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(56px, 9vh, 110px) clamp(24px, 5vw, 64px) clamp(48px, 8vh, 96px);
  overflow: hidden;
}

/* 舞台追光 */
.stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.beam {
  position: absolute;
  top: -14%;
  width: clamp(160px, 24vw, 340px);
  height: 130%;
  transform-origin: 50% 0;
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
  mix-blend-mode: screen;
  filter: blur(7px);
  animation: beam-sway 11s ease-in-out infinite alternate;
}

.beam--gold {
  left: 22%;
  background: linear-gradient(180deg, rgba(245, 184, 92, .34), rgba(245, 184, 92, .05) 72%, transparent);
}

.beam--pink {
  left: 52%;
  background: linear-gradient(180deg, rgba(255, 94, 168, .28), rgba(255, 94, 168, .04) 72%, transparent);
  animation-duration: 13s;
  animation-delay: -5s;
}

.beam--cyan {
  left: 76%;
  background: linear-gradient(180deg, rgba(63, 224, 208, .24), rgba(63, 224, 208, .04) 72%, transparent);
  animation-duration: 15s;
  animation-delay: -9s;
}

@keyframes beam-sway {
  from {
    transform: rotate(-9deg);
  }
  to {
    transform: rotate(8deg);
  }
}

/* 光尘粒子 */
.dust {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 231, .95), rgba(255, 246, 231, 0) 70%);
  opacity: 0;
  animation: dust-drift 9s ease-in-out infinite;
}

.dust:nth-of-type(4)  { left: 12%; top: 30%; animation-delay: 0s;    animation-duration: 8s; }
.dust:nth-of-type(5)  { left: 24%; top: 62%; animation-delay: -2s;   animation-duration: 10s; width: 3px; height: 3px; }
.dust:nth-of-type(6)  { left: 35%; top: 18%; animation-delay: -4.5s; animation-duration: 9s; }
.dust:nth-of-type(7)  { left: 46%; top: 70%; animation-delay: -1s;   animation-duration: 11s; width: 5px; height: 5px; }
.dust:nth-of-type(8)  { left: 55%; top: 36%; animation-delay: -6s;   animation-duration: 8.5s; width: 3px; height: 3px; }
.dust:nth-of-type(9)  { left: 64%; top: 58%; animation-delay: -3s;   animation-duration: 10.5s; }
.dust:nth-of-type(10) { left: 72%; top: 24%; animation-delay: -7.5s; animation-duration: 9.5s; width: 3px; height: 3px; }
.dust:nth-of-type(11) { left: 82%; top: 66%; animation-delay: -5s;   animation-duration: 12s; }
.dust:nth-of-type(12) { left: 88%; top: 40%; animation-delay: -8.5s; animation-duration: 8s; width: 5px; height: 5px; }
.dust:nth-of-type(13) { left: 6%;  top: 74%; animation-delay: -6.5s; animation-duration: 10s; width: 3px; height: 3px; }

@keyframes dust-drift {
  0%,
  100% {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  35%,
  65% {
    opacity: .8;
  }
  50% {
    transform: translate3d(10px, -16px, 0);
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
  justify-self: end;
  width: min(100%, 540px);
}

.hero h1 {
  font-size: clamp(42px, 6vw, 82px);
  text-shadow: 0 0 42px rgba(245, 184, 92, .18);
}

.hero-summary {
  margin: 22px 0 0;
  max-width: 24em;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.8;
  font-weight: 560;
  text-wrap: balance;
}

.hero-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 34px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
}

.store-button--disabled {
  border: 1px dashed rgba(255, 246, 231, .34);
  color: var(--muted);
  background: rgba(255, 246, 231, .04);
  cursor: default;
}

.hero-action small {
  color: var(--faint);
  font-size: 13px;
}

.hero-scene {
  position: relative;
  z-index: 1;
  justify-self: start;
  width: min(100%, 580px);
  min-height: clamp(360px, 34vw, 480px);
  display: grid;
  place-items: center;
  perspective: 1400px;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  will-change: transform;
}

.hero-glow--pink {
  width: 300px;
  height: 300px;
  right: 4%;
  top: 0;
  background: rgba(255, 94, 168, .20);
}

.hero-glow--cyan {
  width: 340px;
  height: 340px;
  left: -6%;
  bottom: -10%;
  background: rgba(63, 224, 208, .16);
}

.section-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--faint);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  transition: color .25s ease;
}

.section-cue:hover {
  color: var(--ink);
}

.section-cue span {
  display: inline-block;
  animation: cue-bounce 1.8s ease-in-out infinite;
}

@keyframes cue-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

/* ---------- 票根卡片（纯 CSS） ---------- */

.ticket {
  --r: 9px;
  --paper: radial-gradient(135% 130% at 0% 0%, #fff3dd 0%, #f7e0b2 52%, #eeca8f 100%);
  --ticket-ink: #2a1c0c;
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  aspect-ratio: 2.62;
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, rgba(42, 28, 12, .028) 0 1px, transparent 1px 5px),
    var(--paper);
  color: var(--ticket-ink);
  -webkit-mask:
    radial-gradient(circle var(--r) at left center, transparent 96%, #000 100%) left / 51% calc(var(--r) * 2 + 6px) repeat-y,
    radial-gradient(circle var(--r) at right center, transparent 96%, #000 100%) right / 50% calc(var(--r) * 2 + 6px) repeat-y;
  mask:
    radial-gradient(circle var(--r) at left center, transparent 96%, #000 100%) left / 51% calc(var(--r) * 2 + 6px) repeat-y,
    radial-gradient(circle var(--r) at right center, transparent 96%, #000 100%) right / 50% calc(var(--r) * 2 + 6px) repeat-y;
  filter: drop-shadow(0 26px 44px rgba(0, 0, 0, .55)) drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
}

.ticket--pink {
  --paper: radial-gradient(135% 130% at 0% 0%, #ffe9f3 0%, #f9c4dd 52%, #efa6c8 100%);
  --ticket-ink: #3a1226;
}

.ticket--cyan {
  --paper: radial-gradient(135% 130% at 0% 0%, #e3faf5 0%, #b8ece2 52%, #93dccd 100%);
  --ticket-ink: #0e2b27;
}

.ticket--violet {
  --paper: radial-gradient(135% 130% at 0% 0%, #f0eafe 0%, #d4c6f7 52%, #bca8ec 100%);
  --ticket-ink: #241543;
}

.ticket-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .4em;
  padding: 7% 4% 7% 7%;
  font-size: 12px;
  font-size: clamp(9px, 1.6cqw, 16px);
}

.ticket {
  container-type: inline-size;
}

.ticket-eyebrow {
  margin: 0;
  font-size: .72em;
  font-weight: 800;
  letter-spacing: .26em;
  opacity: .62;
}

.ticket-artist {
  margin: 0;
  font-size: 2.3em;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: .02em;
}

.ticket-tour {
  margin: 0;
  font-size: .88em;
  font-weight: 650;
  opacity: .72;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .3em 1.6em;
  margin: .5em 0 0;
  padding: .55em 0 0;
  border-top: 1px dashed rgba(42, 28, 12, .3);
}

.ticket-meta div {
  display: flex;
  flex-direction: column;
  gap: .1em;
}

.ticket-meta dt {
  font-size: .62em;
  font-weight: 700;
  letter-spacing: .2em;
  opacity: .55;
}

.ticket-meta dd {
  margin: 0;
  font-size: .86em;
  font-weight: 750;
  white-space: nowrap;
}

.ticket-note {
  margin: .45em 0 0;
  font-size: .8em;
  font-weight: 600;
  line-height: 1.5;
  opacity: .8;
}

.ticket-stub {
  flex: 0 0 26%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55em;
  padding: 6% 5% 6% 4%;
  border-left: 2px dashed rgba(42, 28, 12, .34);
  font-size: 10px;
  font-size: clamp(8px, 1.3cqw, 13px);
  text-align: center;
}

.stub-no {
  font-size: .78em;
  font-weight: 800;
  letter-spacing: .18em;
  opacity: .6;
}

.stub-price {
  font-size: 1.15em;
  font-weight: 850;
}

.stub-note {
  font-size: .62em;
  font-weight: 700;
  letter-spacing: .14em;
  opacity: .5;
}

.barcode {
  display: block;
  width: 86%;
  height: 2.6em;
  color: var(--ticket-ink);
  opacity: .82;
  background: repeating-linear-gradient(90deg,
    currentColor 0 2px, transparent 2px 4px,
    currentColor 4px 7px, transparent 7px 9px,
    currentColor 9px 10px, transparent 10px 14px,
    currentColor 14px 15px, transparent 15px 17px,
    currentColor 17px 20px, transparent 20px 23px);
}

/* 镭射反光层（位置由 JS 的 --hx/--hy 驱动） */
.holo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    linear-gradient(105deg,
      transparent 12%,
      rgba(255, 94, 168, .22) calc(var(--hx, 62%) - 20%),
      rgba(63, 224, 208, .26) var(--hx, 62%),
      rgba(245, 184, 92, .24) calc(var(--hx, 62%) + 20%),
      transparent calc(var(--hx, 62%) + 40%)),
    radial-gradient(220px circle at var(--hx, 62%) var(--hy, 34%), rgba(255, 255, 255, .34), transparent 62%);
  opacity: .85;
}

/* hero 票根：3D 倾斜 + 漂浮 */
.ticket--hero {
  width: min(560px, 100%);
  z-index: 2;
  transform-style: preserve-3d;
  transform:
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    rotate(-3deg)
    translate(var(--mx, 0px), var(--my, 0px));
  animation: card-float 7s ease-in-out infinite;
  will-change: transform;
}

@keyframes card-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

/* ---------- marquee（setlist 走马灯） ---------- */

.marquee {
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 246, 231, .03);
  mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}

.marquee-track span {
  color: rgba(255, 246, 231, .5);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .14em;
  white-space: nowrap;
}

.marquee-track i {
  color: var(--gold);
  font-style: normal;
  font-size: 12px;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- story intro ---------- */

.story-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(72px, 12vh, 130px) clamp(24px, 5vw, 64px) clamp(28px, 5vh, 56px);
}

.story-intro h2 {
  font-size: clamp(32px, 4.4vw, 56px);
}

.story-intro > p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.9;
  font-weight: 540;
}

/* ---------- chapters ---------- */

.chapter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 90px);
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(64px, 11vh, 120px) clamp(24px, 5vw, 64px);
}

.chapter--reverse .chapter-copy {
  order: 2;
}

.chapter--reverse .chapter-visual {
  order: 1;
}

.chapter-number {
  position: absolute;
  top: clamp(28px, 6vh, 64px);
  left: clamp(18px, 4vw, 56px);
  z-index: 0;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 246, 231, .16);
  font-size: clamp(88px, 12vw, 180px);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.chapter--reverse .chapter-number {
  left: auto;
  right: clamp(18px, 4vw, 56px);
}

.chapter-copy {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.chapter h2 {
  font-size: clamp(34px, 4.6vw, 60px);
}

.chapter-copy > p {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.9;
  font-weight: 540;
}

.chapter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.chapter-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 246, 231, .05);
  font-size: 13px;
  font-weight: 700;
}

.chapter .eyebrow {
  color: var(--chapter-deep, var(--gold));
}

.chapter-visual {
  position: relative;
  z-index: 1;
  justify-self: center;
  align-self: center;
  margin: 0;
  width: min(430px, 100%);
  will-change: transform;
}

.chapter-visual .visual-plane {
  position: absolute;
  inset: -9% -8%;
  border-radius: 40px;
  background: var(--chapter-tint, rgba(255, 246, 231, .05));
  transform: rotate(-2.5deg);
  transition: transform .6s cubic-bezier(.22, .8, .28, 1);
}

.chapter--reverse .chapter-visual .visual-plane {
  transform: rotate(2.5deg);
}

.chapter-visual .ticket {
  position: relative;
  transform: rotate(1.5deg);
  transition: transform .6s cubic-bezier(.22, .8, .28, 1), filter .6s ease;
}

.chapter--reverse .chapter-visual .ticket {
  transform: rotate(-1.5deg);
}

.chapter-visual:hover .ticket {
  transform: rotate(0deg) translateY(-6px);
}

.chapter-visual:hover .visual-plane {
  transform: rotate(0deg) scale(1.02);
}

.chapter--create {
  --chapter-tint: rgba(245, 184, 92, .10);
  --chapter-deep: var(--gold);
}

.chapter--album {
  --chapter-tint: rgba(255, 94, 168, .10);
  --chapter-deep: #ff7ab5;
}

.chapter--edit {
  --chapter-tint: rgba(63, 224, 208, .09);
  --chapter-deep: #54e2d3;
}

.chapter--export {
  --chapter-tint: rgba(185, 161, 255, .10);
  --chapter-deep: var(--violet);
}

/* 02 · 收藏成册：票根叠放 */
.ticket-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.1;
}

.ticket-stack .ticket {
  position: absolute;
  width: 86%;
  --r: 7px;
}

.ticket-stack .ticket:nth-child(1) {
  left: 0;
  top: 2%;
  transform: rotate(-7deg);
}

.ticket-stack .ticket:nth-child(2) {
  right: 0;
  top: 30%;
  transform: rotate(4deg);
  z-index: 2;
}

.ticket-stack .ticket:nth-child(3) {
  left: 7%;
  bottom: 0;
  transform: rotate(-2deg);
  z-index: 3;
}

.ticket-stack .ticket:nth-child(1):hover,
.ticket-stack .ticket:nth-child(2):hover,
.ticket-stack .ticket:nth-child(3):hover {
  transform: rotate(0deg) translateY(-6px);
  z-index: 4;
}

.ticket--mini .ticket-artist {
  font-size: 1.9em;
}

/* 03 · 编辑细节：可编辑字段高亮 */
.field--edit {
  position: relative;
  border-radius: 5px;
  outline: 1.5px dashed rgba(120, 84, 220, .75);
  outline-offset: 4px;
}

.field--edit::after {
  content: "✎";
  position: absolute;
  top: -1.15em;
  right: -1.1em;
  font-size: .9em;
  color: #6d4bd6;
}

/* 04 · 高清导出：裁切框 + HD 角标 */
.export-frame {
  position: relative;
  padding: 9%;
}

.crop {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 246, 231, .65);
}

.crop--tl { top: 0;    left: 0;  border-right: 0; border-bottom: 0; }
.crop--tr { top: 0;    right: 0; border-left: 0;  border-bottom: 0; }
.crop--bl { bottom: 0; left: 0;  border-right: 0; border-top: 0; }
.crop--br { bottom: 0; right: 0; border-left: 0;  border-top: 0; }

.hd-chip {
  position: absolute;
  top: 2%;
  right: 4%;
  z-index: 3;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--pink), var(--violet));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  box-shadow: 0 8px 20px rgba(255, 94, 168, .35);
}

/* ---------- closing ---------- */

.closing {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin: clamp(48px, 9vh, 96px) max(clamp(20px, 5vw, 64px), calc((100% - 1240px) / 2));
  padding: clamp(44px, 7vh, 80px) clamp(24px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 36px;
  background:
    radial-gradient(600px 320px at 90% 0%, rgba(255, 94, 168, .10), transparent 65%),
    radial-gradient(560px 300px at 0% 100%, rgba(63, 224, 208, .09), transparent 65%),
    rgba(255, 246, 231, .03);
}

.privacy-copy h2 {
  font-size: clamp(28px, 3.6vw, 46px);
}

.privacy-copy > p {
  margin: 18px 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.9;
  font-weight: 540;
}

.download-compact {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 246, 231, .05);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .4);
}

.download-compact img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .45);
}

.download-compact strong {
  font-size: 19px;
  font-weight: 800;
}

.download-compact p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 28px;
  padding: 30px max(clamp(24px, 5vw, 64px), calc((100% - 1240px) / 2 + 64px)) 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.site-footer a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  transition: color .25s ease;
}

.site-footer a:hover {
  color: var(--ink);
}

/* ---------- reveal animation ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity .8s cubic-bezier(.22, .8, .28, 1),
    transform .8s cubic-bezier(.22, .8, .28, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
    text-align: center;
  }

  .hero-copy {
    justify-self: center;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
  }

  .hero-summary {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-action {
    justify-content: center;
  }

  .hero-scene {
    justify-self: center;
    width: 100%;
    min-height: clamp(280px, 52vw, 420px);
    margin-top: 12px;
  }

  .ticket--hero {
    width: min(520px, 94%);
  }

  .story-intro,
  .closing {
    grid-template-columns: 1fr;
  }

  .download-compact {
    justify-self: center;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: absolute;
    left: 0;
    right: 0;
    grid-template-columns: 1fr auto;
    gap: 16px;
    min-height: 64px;
  }

  .site-header nav {
    display: none;
  }

  .chapter {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .chapter--reverse .chapter-copy {
    order: 1;
  }

  .chapter--reverse .chapter-visual {
    order: 2;
  }

  .chapter-number {
    font-size: 84px;
  }

  .chapter-visual {
    width: min(360px, 88vw);
  }

  .closing {
    margin-left: 20px;
    margin-right: 20px;
    padding: 32px 22px;
  }
}

/* ---------- mobile full-screen paging ---------- */

/* JS 接管翻页后（homepage.js 加 .js-pager），原生 snap 与 smooth 滚动必须关闭，
   否则会与 rAF 补间互相抢滚动位置。无 JS 时仍走下面的 CSS snap 兜底。 */
@media (max-width: 720px) {
  html.js-pager {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }
}

@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  html {
    scroll-snap-type: y mandatory;
  }

  .hero,
  .story-intro,
  .chapter,
  .closing {
    scroll-snap-align: start;
  }

  .hero,
  .story-intro,
  .chapter {
    min-height: 100vh;
    min-height: 100svh;
    align-content: center;
    scroll-margin-top: 0;
  }

  .hero {
    height: 100vh;
    height: 100svh;
    padding-top: 76px;
    padding-bottom: 40px;
    grid-template-rows: auto minmax(0, 1fr);
    row-gap: 8px;
  }

  .hero h1 {
    font-size: clamp(30px, 8.2vw, 38px);
  }

  .hero-summary,
  .hero-copy .eyebrow,
  .section-cue {
    display: none;
  }

  .hero-action {
    margin-top: 16px;
  }

  .hero-action .store-button {
    min-height: 46px;
    font-size: 14px;
  }

  .has-app-vh .hero,
  .has-app-vh .chapter {
    height: var(--app-vh);
  }

  .has-app-vh .story-intro {
    min-height: var(--app-vh);
  }

  .has-app-vh .closing {
    min-height: calc(var(--app-vh) - 48px);
  }

  .hero-scene {
    min-height: 0;
  }

  .ticket--hero {
    width: min(360px, 92%);
  }

  .beam {
    width: clamp(120px, 34vw, 200px);
  }

  .story-intro {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .chapter {
    gap: 20px;
    padding-top: 24px;
    padding-bottom: 24px;
    height: 100vh;
    height: 100svh;
    grid-template-rows: auto minmax(0, 1fr);
    scroll-margin-top: 0;
  }

  .chapter h2 {
    font-size: clamp(26px, 7vw, 32px);
  }

  .chapter h2 br {
    display: none;
  }

  .chapter .eyebrow {
    margin-bottom: 8px;
  }

  .chapter-copy > p {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .chapter-tags {
    margin-top: 14px;
  }

  .chapter-tags span {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }

  .chapter-number {
    font-size: 60px;
    top: 12px;
  }

  .chapter-visual {
    width: min(320px, 86vw);
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: center;
  }

  .chapter-visual .ticket,
  .chapter-visual .ticket-stack,
  .chapter-visual .export-frame {
    width: 100%;
  }

  .closing {
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    align-content: center;
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 24px 18px;
    scroll-margin-top: 0;
  }

  .closing .download-compact {
    padding: 18px;
    gap: 10px;
  }

  .closing .download-compact img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .privacy-copy h2 {
    font-size: clamp(24px, 6.4vw, 30px);
  }

  .privacy-copy > p {
    font-size: 13px;
    line-height: 1.75;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .beam,
  .dust,
  .ticket--hero,
  .marquee-track,
  .section-cue span {
    animation: none;
  }

  .dust {
    opacity: .45;
  }

  .holo {
    opacity: .4;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .chapter-visual .ticket,
  .chapter-visual .visual-plane {
    transition: none;
  }
}
