@font-face {
  font-family: "Great Vibes";
  src: url("../assets/fonts/GreatVibes-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Infant";
  src: url("../assets/fonts/CormorantInfant-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Infant";
  src: url("../assets/fonts/CormorantInfant-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Infant";
  src: url("../assets/fonts/CormorantInfant-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ma Shan Zheng";
  src: url("../assets/fonts/MaShanZheng-Subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Zhi Mang Xing";
  src: url("../assets/fonts/ZhiMangXing-Subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+5B87, U+5B97, U+6B66, U+738B, U+79C0, U+826F;
}

:root {
  --ivory: #fbf7f1;
  --ivory-deep: #f3ebe1;
  --paper: #fffdf8;
  --blush: #c9a9a6;
  --blush-deep: #b08a86;
  --blush-soft: #ead9d5;
  --blush-wash: #f6eee9;
  --gold: #c4a574;
  --gold-bright: #d9c196;
  --gold-deep: #9a7848;
  --ink: #4a3728;
  --ink-soft: #6e5848;
  --ink-muted: #8a7364;
  --cocoa: #3b2a22;
  --white: #fffcf7;
  --danger: #a65b55;
  --ok: #6f8f6a;
  --shadow-sm: 0 2px 8px rgba(74, 55, 40, 0.06);
  --shadow-md: 0 10px 28px rgba(74, 55, 40, 0.1);
  --shadow-lg: 0 22px 50px rgba(74, 55, 40, 0.16);
  --font-script: "Great Vibes", "Ma Shan Zheng", cursive;
  --font-cn-script: "Ma Shan Zheng", "Great Vibes", cursive;
  --font-cn-xing: "Zhi Mang Xing", "Ma Shan Zheng", cursive;
  --font-serif: "Cormorant Infant", "Noto Serif SC", serif;
  --font-cn: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", "Cormorant Infant", serif;
  --radius: 16px;
  --header-safe: calc(12px + env(safe-area-inset-top));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-cn);
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
}

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

button,
input,
textarea,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

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

[hidden] {
  display: none !important;
}


.share-thumb-wrap {
  position: fixed !important;
  left: -100vw !important;
  top: 0;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--cocoa);
  color: var(--ivory);
  padding: 8px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon rect {
  fill: currentColor;
  stroke: none;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-deep);
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease,
    border-color 220ms ease;
  text-decoration: none;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn:hover {
  background: var(--gold);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-solid {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--cocoa);
  border-color: var(--gold-deep);
}

.btn-solid:hover {
  background: var(--gold-deep);
  color: var(--white);
}

.btn-ghost {
  border-color: rgba(255, 252, 247, 0.55);
  color: var(--ivory);
}

.btn-ghost:hover {
  background: rgba(255, 252, 247, 0.16);
  color: var(--white);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(212, 188, 140, 0.75);
  background: rgba(251, 247, 241, 0.18);
  color: var(--ivory);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 220ms ease, border-color 220ms ease;
  cursor: pointer;
  padding: 0;
}

body.is-locked {
  overflow: hidden;
}

.icon-btn:hover {
  background: rgba(196, 165, 116, 0.35);
  border-color: var(--gold-bright);
}

.icon-btn.is-on {
  background: rgba(196, 165, 116, 0.45);
}

/* Section chrome */
.section {
  position: relative;
  padding: 72px 32px 80px 22px;
}

.btn-block {
  width: 100%;
}

.section-inner {
  width: min(720px, 100%);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-kicker {
  font-family: var(--font-script);
  font-size: 28px;
  color: var(--gold-deep);
  margin: 0 0 4px;
  line-height: 1.2;
}

.section-head h2 {
  font-family: var(--font-cn);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: 0.22em;
  margin: 0 0 16px;
  color: var(--ink);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gold);
}

.ornament-line {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ornament svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.2;
}

.lede {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 0.06em;
  margin: 0 auto 28px;
  max-width: 28em;
}

.wash-ivory {
  background: var(--ivory);
}

.wash-blush {
  background: linear-gradient(180deg, var(--blush-wash), var(--ivory));
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  animation: none;
}

.reveal.is-in {
  animation: fade-up 800ms ease forwards;
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Cover */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: #2c211c center / cover no-repeat;
  transform: scale(1.04);
  z-index: -2;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(43, 30, 24, 0.28) 0%, rgba(43, 30, 24, 0.42) 48%, rgba(32, 22, 18, 0.72) 100%);
}

.hero-frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(217, 193, 150, 0.45);
  pointer-events: none;
  z-index: 1;
}

.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(217, 193, 150, 0.22);
}

.music-dock {
  position: fixed;
  top: var(--header-safe);
  right: max(16px, env(safe-area-inset-right));
  z-index: 40;
}

.music-dock .icon-btn {
  background: rgba(59, 42, 34, 0.62);
  border-color: rgba(217, 193, 150, 0.88);
  color: var(--ivory);
  box-shadow: 0 8px 20px rgba(43, 30, 24, 0.28);
}

.music-dock .icon-btn.is-on {
  background: rgba(59, 42, 34, 0.78);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px 20px 80px;
  width: min(520px, 100%);
}

.hero-en {
  font-family: var(--font-script);
  font-size: clamp(28px, 8vw, 42px);
  margin: 0 0 8px;
  color: var(--gold-bright);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.hero-title {
  font-family: var(--font-cn-script);
  font-size: clamp(40px, 12vw, 64px);
  font-weight: 400;
  letter-spacing: 0.12em;
  margin: 0 0 28px;
  line-height: 1.2;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-names {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-bottom: 28px;
}

.hero-names .name {
  font-family: var(--font-cn);
  font-size: clamp(32px, 9vw, 44px);
  font-weight: 400;
  letter-spacing: 0.28em;
  margin: 0;
  line-height: 1.15;
}

.amp {
  font-family: var(--font-script);
  font-size: 30px;
  color: var(--gold-bright);
  line-height: 1;
}

.hero-date {
  font-size: 15px;
  letter-spacing: 0.22em;
  margin: 0 0 6px;
  font-weight: 400;
}

.hero-time {
  font-size: 13px;
  letter-spacing: 0.28em;
  margin: 0;
  color: rgba(251, 247, 241, 0.86);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(251, 247, 241, 0.88);
  background: none;
  border: 0;
  letter-spacing: 0.2em;
  font-size: 11px;
  padding: 0;
}

.scroll-hint .chevron {
  width: 22px;
  height: 22px;
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(7px);
  }
}

.petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.petal {
  position: absolute;
  top: -12%;
  width: 18px;
  height: 22px;
  background: radial-gradient(circle at 30% 30%, #f7e3dc, var(--blush) 55%, #b88782);
  border-radius: 80% 0 80% 0;
  opacity: 0.9;
  animation: fall linear infinite;
  filter: drop-shadow(0 2px 2px rgba(74, 55, 40, 0.15));
}

.petal:nth-child(odd) {
  border-radius: 0 80% 0 80%;
  background: radial-gradient(circle at 70% 30%, #fff6ee, var(--gold-bright) 60%, var(--gold));
}

@keyframes fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 0.85;
  }
  100% {
    transform: translate3d(var(--drift, 40px), 118vh, 0) rotate(360deg);
    opacity: 0.15;
  }
}

/* Countdown */
.flip-board {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.flip-digit {
  position: relative;
  width: 34px;
  height: 48px;
  perspective: 240px;
  border-radius: 8px;
}

.flip-group {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.flip-pair {
  display: flex;
  gap: 5px;
}

.flip-label {
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--ink-muted);
}

.flip-digit .face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--cocoa);
  background: linear-gradient(180deg, #fffdf8 0%, #f4eadc 48%, #efe2d0 52%, #e8d8c4 100%);
  border: 1px solid var(--gold-bright);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), var(--shadow-sm);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-digit .face::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(154, 120, 72, 0.28);
}

.flip-digit .back {
  transform: rotateX(90deg);
}

.flip-digit.is-flipping .front {
  animation: flip-front 0.32s ease-in forwards;
}

.flip-digit.is-flipping .back {
  animation: flip-back 0.32s ease-out 0.32s forwards;
}

@keyframes flip-front {
  to {
    transform: rotateX(-90deg);
  }
}

@keyframes flip-back {
  from {
    transform: rotateX(90deg);
  }
  to {
    transform: rotateX(0deg);
  }
}

.countdown-done {
  display: none;
  text-align: center;
  padding: 12px 8px 0;
}

.countdown-done.is-visible {
  display: block;
}

.countdown-done h3 {
  font-family: var(--font-cn-script);
  font-size: 36px;
  font-weight: 400;
  margin: 0 0 12px;
}

.countdown-live.is-hidden {
  display: none;
}

/* Story timeline */
.timeline {
  position: relative;
  display: grid;
  gap: 36px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 18px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

.story-item {
  position: relative;
  padding-left: 48px;
}

.story-item .node {
  position: absolute;
  left: 10px;
  top: 18px;
  width: 17px;
  height: 17px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  background: var(--ivory);
  box-shadow: 0 0 0 4px var(--blush-wash);
}

.story-card {
  background: var(--paper);
  border: 1px solid rgba(196, 165, 116, 0.35);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.story-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.story-card img.portrait {
  object-position: center 18%;
}

.story-body {
  padding: 18px 18px 20px;
}

.story-when {
  margin: 0 0 6px;
  color: var(--gold-deep);
  letter-spacing: 0.18em;
  font-size: 12px;
}

.story-body h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.story-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* Gallery */
#gallery .section-inner {
  width: min(1080px, 100%);
}

.drift-wall-wrap {
  height: min(70vh, 640px);
  min-height: 400px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(196, 165, 116, 0.35);
  background: linear-gradient(180deg, #f6eee9, #fbf7f1);
}

.drift-wall {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  perspective: var(--dw-perspective, 1200px);
  perspective-origin: 50% 50%;
  --dw-tile-w: 186px;
  --dw-tile-h: 248px;
  --dw-gap: 16px;
  --dw-radius: 14px;
  --dw-lift: 64px;
  --dw-dim: 0.62;
  --dw-gray: 0;
  --dw-overlay: #3b2a22;
  --dw-edge: 40%;
  touch-action: pan-y;
  cursor: pointer;
}

.drift-wall__fade {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(246, 238, 233, 0.94) 0%,
      rgba(246, 238, 233, 0) var(--dw-edge),
      rgba(251, 247, 241, 0) calc(100% - var(--dw-edge)),
      rgba(251, 247, 241, 0.96) 100%
    ),
    radial-gradient(
      ellipse 82% 86% at 50% 46%,
      rgba(251, 247, 241, 0) var(--dw-edge),
      rgba(251, 247, 241, 0.9) 100%
    );
}

.drift-wall__plane {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  transform-style: preserve-3d;
  cursor: pointer;
  transform-origin: 50% 50%;
  will-change: transform;
}

.drift-wall__col {
  position: relative;
  width: calc(var(--dw-tile-w) + var(--dw-gap));
  height: 100%;
  flex: 0 0 auto;
  overflow: visible;
  transform-style: preserve-3d;
}

.drift-wall__track {
  display: flex;
  flex-direction: column;
  gap: 0;
  will-change: transform;
  transform-style: preserve-3d;
}

.drift-wall__tile {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: calc(var(--dw-tile-h) + var(--dw-gap));
  flex: 0 0 calc(var(--dw-tile-h) + var(--dw-gap));
  min-height: 0;
  margin: 0;
  line-height: 0;
  font-size: 0;
  outline: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
  transform-style: preserve-3d;
  pointer-events: auto;
  touch-action: manipulation;
}

.drift-wall__inner {
  position: absolute;
  inset: calc(var(--dw-gap) / 2);
  display: block;
  border-radius: var(--dw-radius);
  overflow: hidden;
  background: #2c211c;
  opacity: var(--dw-dim);
  transform: translateZ(0);
  pointer-events: none;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.drift-wall__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  filter: grayscale(var(--dw-gray)) saturate(0.92);
  transition: filter 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.drift-wall__overlay {
  position: absolute;
  inset: 0;
  background: var(--dw-overlay);
  opacity: 0.28;
  pointer-events: none;
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.drift-wall__tile.is-active .drift-wall__inner,
.drift-wall__tile:focus-visible .drift-wall__inner {
  opacity: 1;
  transform: translateZ(var(--dw-lift));
  box-shadow: 0 24px 60px -18px rgba(74, 55, 40, 0.55);
}

.drift-wall__tile.is-active img,
.drift-wall__tile:focus-visible img {
  filter: grayscale(0) saturate(1.05);
}

.drift-wall__tile.is-active .drift-wall__overlay,
.drift-wall__tile:focus-visible .drift-wall__overlay {
  opacity: 0;
}

.drift-wall__tile:focus-visible .drift-wall__inner {
  box-shadow:
    0 24px 60px -18px rgba(74, 55, 40, 0.55),
    0 0 0 2px var(--gold-bright);
}

/* Info cards */
.info-grid {
  display: grid;
  gap: 12px;
}

.info-card {
  background: var(--paper);
  border: 1px solid rgba(196, 165, 116, 0.38);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--gold-deep);
}

.info-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: 0.16em;
  font-weight: 500;
}

.info-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.address-card {
  margin-top: 16px;
  text-align: center;
  padding: 22px 18px;
  border: 1px solid rgba(196, 165, 116, 0.4);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.address-card h3 {
  margin: 0 0 8px;
  letter-spacing: 0.2em;
  font-weight: 500;
}

.address-card p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

/* Schedule */
.flow {
  position: relative;
  padding-left: 28px;
}

.flow::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--gold);
}

.flow-item {
  position: relative;
  padding: 0 0 28px 18px;
}

.flow-item:last-child {
  padding-bottom: 0;
}

.flow-item .dot {
  position: absolute;
  left: -25px;
  top: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--ivory);
  box-shadow: 0 0 0 4px rgba(196, 165, 116, 0.16);
}

.flow-time {
  margin: 0;
  color: var(--gold-deep);
  letter-spacing: 0.16em;
  font-size: 13px;
  font-family: var(--font-serif);
}

.flow-item h3 {
  margin: 2px 0 4px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.flow-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* Form */
.form-card {
  background: var(--paper);
  border: 1px solid rgba(196, 165, 116, 0.38);
  border-radius: 20px;
  padding: 22px 18px 24px;
  box-shadow: var(--shadow-md);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(196, 165, 116, 0.45);
  background: var(--ivory);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 165, 116, 0.22);
}

.field-error {
  display: none;
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.field.is-invalid .field-error {
  display: block;
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-color: var(--danger);
}

.form-success {
  display: none;
  text-align: center;
  padding: 18px 8px 8px;
}

.form-success.is-visible {
  display: block;
}

.form-card.is-sent form {
  display: none;
}

.success-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--gold-deep);
}

.form-success h3 {
  margin: 0 0 8px;
  letter-spacing: 0.16em;
  font-weight: 500;
}

.form-success p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

/* Traffic */
.traffic-grid {
  display: grid;
  gap: 12px;
}

.traffic-card {
  background: var(--paper);
  border: 1px solid rgba(196, 165, 116, 0.35);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
}

.traffic-card h3 {
  margin: 10px 0 8px;
  font-size: 17px;
  letter-spacing: 0.16em;
  font-weight: 500;
}

.traffic-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* Blessings */
.blessing-list {
  display: grid;
  gap: 12px;
}

.blessing-card {
  background: var(--paper);
  border: 1px solid rgba(196, 165, 116, 0.28);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.blessing-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--gold-deep);
}

.blessing-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.empty-blessing {
  text-align: center;
  color: var(--ink-muted);
  font-size: 14px;
}

/* Finale */
.finale {
  background: radial-gradient(circle at 50% 20%, #5a4336, var(--cocoa) 70%);
  color: var(--ivory);
  padding-top: 88px;
  padding-bottom: 96px;
}

.finale .section-kicker,
.finale .section-head h2,
.finale .ornament {
  color: var(--gold-bright);
}

.finale .section-head h2 {
  font-family: var(--font-cn-script);
  letter-spacing: 0.16em;
  color: var(--ivory);
}

.finale-copy {
  text-align: center;
}

.finale-copy .big {
  font-family: var(--font-cn-script);
  font-size: clamp(32px, 10vw, 48px);
  margin: 0 0 18px;
}

.finale-copy p {
  margin: 0 0 8px;
  letter-spacing: 0.12em;
}

.finale-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

/* Dots nav */
.dot-nav {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 8px 6px;
}

.dot-nav a {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  display: block;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease, width 200ms ease,
    border-radius 200ms ease;
}

.dot-nav a.is-active {
  background: var(--gold);
  height: 18px;
  border-radius: 8px;
}

.dot-nav a span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Overlays */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(32, 22, 18, 0.72);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.overlay.is-open {
  display: flex;
}

.sheet {
  width: min(420px, 100%);
  background: var(--paper);
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(196, 165, 116, 0.35);
}

.sheet h3 {
  margin: 0 0 14px;
  text-align: center;
  letter-spacing: 0.18em;
  font-weight: 500;
}

.sheet-list {
  display: grid;
  gap: 10px;
}

.sheet-list button {
  width: 100%;
}

.wechat-guide {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: none;
  background: rgba(12, 8, 6, 0.9);
  color: var(--ivory);
}

.wechat-guide.is-open {
  display: block;
}

.wechat-guide .arrow {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  right: 8px;
  width: 108px;
  height: 96px;
  color: var(--gold-bright);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.wechat-guide .guide-copy {
  position: absolute;
  top: calc(92px + env(safe-area-inset-top));
  right: 16px;
  text-align: right;
  width: min(250px, calc(100vw - 32px));
  background: rgba(43, 30, 24, 0.94);
  border: 1px solid rgba(196, 165, 116, 0.45);
  border-radius: 16px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-lg);
}

.wechat-guide h3 {
  margin: 0 0 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
  font-size: 18px;
}

.wechat-guide p {
  margin: 0;
  color: rgba(251, 247, 241, 0.88);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.wechat-guide .guide-note {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(217, 193, 150, 0.9);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  width: 100%;
  height: 100%;
  background: #110c0a;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-ui {
  position: absolute;
  z-index: 4;
  color: var(--ivory);
}

.lightbox-close {
  top: calc(10px + env(safe-area-inset-top));
  right: 14px;
}

.lightbox-count {
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: 0.16em;
  font-size: 13px;
  font-family: var(--font-serif);
  pointer-events: none;
}

.depth-carousel {
  position: absolute;
  inset: 0;
  z-index: 1;
  perspective: var(--dc-perspective, 1400px);
  outline: none;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.depth-carousel__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  perspective: var(--dc-perspective, 1400px);
}

.depth-carousel__card {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: var(--dc-radius, 18px);
  background: #1a120f;
  overflow: hidden;
  cursor: pointer;
  transform-origin: center center;
  transform-style: preserve-3d;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46);
  -webkit-tap-highlight-color: transparent;
}

.depth-carousel__card.is-front {
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(217, 193, 150, 0.32);
}

.depth-carousel__face {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.depth-carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  pointer-events: none;
}

.depth-carousel__tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0;
}

.depth-carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(217, 193, 150, 0.5);
  background: rgba(43, 30, 24, 0.35);
  color: var(--ivory);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.depth-carousel__arrow--prev {
  left: 12px;
}

.depth-carousel__arrow--next {
  right: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px);
  background: var(--cocoa);
  color: var(--ivory);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  z-index: 65;
  transition: opacity 220ms ease, transform 220ms ease;
  max-width: calc(100vw - 48px);
  text-align: center;
  line-height: 1.4;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

@media (min-width: 768px) {
  .section {
    padding: 96px 40px 100px 32px;
  }

  .section-inner {
    width: min(980px, 100%);
  }

  .timeline {
    display: block;
    max-width: 860px;
    margin: 0 auto;
  }

  .timeline::before {
    left: 50%;
  }

  .story-item {
    width: 50%;
    padding-left: 0;
    padding-right: 36px;
  }

  .story-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 36px;
  }

  .story-item .node {
    left: auto;
    right: -9px;
  }

  .story-item:nth-child(even) .node {
    right: auto;
    left: -9px;
  }

  .story-card img {
    height: 220px;
  }

  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .traffic-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .finale-actions {
    flex-direction: row;
    justify-content: center;
  }

  .dot-nav {
    right: 18px;
  }

  .flip-digit {
    width: 52px;
    height: 72px;
  }

  .flip-digit .face {
    font-size: 36px;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    letter-spacing: 0.22em;
  }
}

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

  .reveal,
  .reveal.is-in,
  .petal,
  .scroll-hint .chevron,
  .flip-digit.is-flipping .front,
  .flip-digit.is-flipping .back {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .drift-wall__plane,
  .drift-wall__track {
    will-change: auto;
  }

  .petal {
    display: none;
  }
}

.host-page {
  min-height: 100svh;
  background: var(--ivory);
}

.host-hint {
  margin: 14px 0 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
}

.host-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.host-stats article {
  background: var(--paper);
  border: 1px solid rgba(196, 165, 116, 0.35);
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
}

.host-stats strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--gold-deep);
}

.host-stats span {
  color: var(--ink-muted);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.host-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.host-table-wrap {
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid rgba(196, 165, 116, 0.28);
  border-radius: 14px;
}

.host-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.host-table th,
.host-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(196, 165, 116, 0.2);
  vertical-align: top;
}

.host-table th {
  letter-spacing: 0.12em;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}

.host-table tr:last-child td {
  border-bottom: 0;
}
