* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --gold: #f4c86b;
  --warm: #c88448;
  --deep: #201711;
  --ink: #fff4df;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: #201711;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  touch-action: pan-y;
}

.aurora {
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 22% 18%, rgba(244, 200, 107, .24), transparent 24%),
    radial-gradient(circle at 78% 8%, rgba(200, 132, 72, .18), transparent 25%),
    radial-gradient(circle at 45% 88%, rgba(92, 57, 32, .55), transparent 34%),
    linear-gradient(180deg, #2b1c13 0%, #201711 46%, #130f0c 100%);
  filter: saturate(1.08) contrast(1.02);
  animation: auroraMove 12s ease-in-out infinite alternate;
  z-index: 0;
}

.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  mix-blend-mode: soft-light;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px;
}

#sparkCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.phone-stage {
  position: relative;
  z-index: 2;
  width: min(100vw, 480px);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 244, 223, .07), rgba(70, 43, 24, .08));
  box-shadow: 0 0 80px rgba(0, 0, 0, .45);
}

.panel {
  position: absolute;
  inset: 0;
  padding: max(28px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(32px) scale(.98);
  pointer-events: none;
  transition: opacity .7s ease, transform .7s cubic-bezier(.19, 1, .22, 1);
}

.panel.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .28em;
  text-shadow: 0 0 18px rgba(255, 214, 107, .8);
}

h1,
h2 {
  margin: 0;
  line-height: .96;
  letter-spacing: -.06em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, .45);
}

h1 {
  font-size: clamp(54px, 16vw, 86px);
}

h2 {
  font-size: clamp(40px, 12vw, 68px);
}

.hero-copy,
.finale p {
  max-width: 310px;
  margin: 18px 0 0;
  color: rgba(255, 248, 231, .8);
  font-size: 17px;
  line-height: 1.7;
}

.glow-orb {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(8px);
  opacity: .72;
  z-index: -1;
}

.orb-one {
  top: 8%;
  right: -18%;
  background: radial-gradient(circle, rgba(244, 200, 107, .42), transparent 68%);
  animation: float 6s ease-in-out infinite;
}

.orb-two {
  left: -20%;
  bottom: 12%;
  background: radial-gradient(circle, rgba(200, 132, 72, .34), transparent 70%);
  animation: float 7s ease-in-out infinite reverse;
}

.photo-stack {
  position: relative;
  height: 340px;
  margin: 18px 0 20px;
  perspective: 900px;
}

.stack-img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62%;
  max-height: 300px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 28px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .42), 0 0 40px rgba(255, 214, 107, .15);
  transform-origin: 50% 80%;
  animation: cardPulse 4.8s ease-in-out infinite;
}

.img-a { transform: translate(-52%, -50%) rotate(-13deg); }
.img-b { transform: translate(-44%, -47%) rotate(8deg); animation-delay: .45s; }
.img-c { transform: translate(-50%, -44%) rotate(-1deg); animation-delay: .9s; }

.start-btn,
.ghost-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  color: #1d1400;
  background: linear-gradient(135deg, #fff0b8, #e6ad58 52%, #b36f38);
  min-height: 56px;
  padding: 0 26px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 16px 35px rgba(255, 181, 71, .32), inset 0 1px 0 rgba(255,255,255,.72);
}

.start-btn span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: #1d1400;
  box-shadow: 13px 0 0 #1d1400, 26px 0 0 #1d1400;
  animation: dots 1.2s infinite;
}

.ghost-btn {
  margin-top: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .26);
}

.hint,
.footer-love {
  text-align: center;
  color: rgba(255, 248, 231, .58);
  font-size: 13px;
  letter-spacing: .08em;
  animation: breathe 1.8s ease-in-out infinite;
}

.carousel {
  position: relative;
  height: 56vh;
  min-height: 390px;
  margin-top: 24px;
}

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateX(40px) rotateY(-14deg) scale(.94);
  transition: opacity .65s ease, transform .65s cubic-bezier(.19, 1, .22, 1);
}

.slide.current {
  opacity: 1;
  transform: translateX(0) rotateY(0) scale(1);
}

.slide img,
.halo-photo img {
  width: 100%;
  height: calc(100% - 78px);
  object-fit: cover;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .42);
}

.slide figcaption {
  margin-top: 16px;
  color: rgba(255, 248, 231, .86);
  font-size: 18px;
  line-height: 1.65;
}

.dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .34);
  transition: width .3s ease, background .3s ease;
}

.dot.active {
  width: 30px;
  background: var(--gold);
}

.letter-card {
  margin-top: 26px;
  padding: 24px;
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(255,255,255,.2), rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .32);
  backdrop-filter: blur(18px);
}

.letter-card p {
  margin: 0 0 14px;
  color: rgba(255, 248, 231, .86);
  font-size: 16px;
  line-height: 1.82;
}

.letter-card strong {
  display: block;
  margin-top: 18px;
  color: var(--gold);
  font-size: 20px;
  text-align: right;
}

.badge {
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #281800;
  background: var(--gold);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .18em;
  box-shadow: 0 0 34px rgba(255, 214, 107, .5);
}

.halo-photo {
  position: relative;
  height: 42vh;
  min-height: 300px;
  margin: 30px 0;
}

.halo-photo::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 42px;
  background: conic-gradient(from 0deg, var(--gold), #d99a50, #6b4327, var(--gold));
  filter: blur(18px);
  opacity: .8;
  animation: spin 5s linear infinite;
  z-index: -1;
}

.replay {
  width: 100%;
}

@keyframes auroraMove {
  from { transform: translate3d(-2%, -1%, 0) rotate(-1deg) scale(1); }
  to { transform: translate3d(2%, 1%, 0) rotate(1deg) scale(1.08); }
}

@keyframes float {
  50% { transform: translate3d(18px, -26px, 0) scale(1.08); }
}

@keyframes cardPulse {
  0%, 100% { filter: brightness(.96); }
  50% { filter: brightness(1.12); }
}

@keyframes dots {
  50% { opacity: .45; transform: translateY(-2px); }
}

@keyframes breathe {
  50% { opacity: .45; transform: translateY(4px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-height: 720px) {
  .panel { padding-inline: 20px; }
  .photo-stack { height: 270px; }
  .carousel { min-height: 340px; }
  .letter-card { padding: 18px; }
  .letter-card p { font-size: 14px; line-height: 1.68; }
}
