:root {
  color-scheme: light;
  --ink: #171716;
  --ink-soft: #3f3b39;
  --paper: #f7f5f2;
  --white: #fffdfb;
  --rose: #b77f8d;
  --rose-light: #efc2bd;
  --ice: #d9e4ea;
  --silver: #d3d0cc;
  --line: rgba(23, 23, 22, 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  height: 100dvh;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

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

[hidden] {
  display: none !important;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  gap: 20px;
  color: var(--ink);
  background: var(--paper);
  transition: opacity 500ms var(--ease), visibility 500ms;
}

.is-loaded .loading-screen {
  opacity: 0;
  visibility: hidden;
}

.loading-monogram {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.loading-line {
  width: 92px;
  height: 1px;
  overflow: hidden;
  background: var(--silver);
}

.loading-line::after {
  content: "";
  display: block;
  width: 50%;
  height: 100%;
  background: var(--rose);
  animation: loading 1.1s ease-in-out infinite;
}

@keyframes loading {
  from { transform: translateX(-100%); }
  to { transform: translateX(200%); }
}

.cover,
.scene {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
}

.cover {
  z-index: 10;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  padding: max(24px, env(safe-area-inset-top)) 24px var(--safe-bottom);
  color: var(--white);
  background: var(--ink);
  isolation: isolate;
  transition: opacity 700ms var(--ease), visibility 700ms;
}

.is-opening .cover {
  position: fixed;
  inset: 0 auto auto 50%;
  width: min(100vw, 520px);
  height: 100dvh;
  min-height: 0;
  transform: translateX(-50%);
}

.is-open .cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover-photo,
.cover-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.cover-photo {
  background: url("/assets/images/architecture.webp") center 62% / cover no-repeat;
  transform: scale(1.04);
  animation: cover-breathe 9s ease-in-out infinite alternate;
}

.cover-shade {
  z-index: -1;
  background: linear-gradient(180deg, rgba(23, 23, 22, 0.26) 0%, rgba(23, 23, 22, 0.05) 38%, rgba(23, 23, 22, 0.78) 100%);
}

@keyframes cover-breathe {
  to { transform: scale(1.08); }
}

.cover-copy {
  align-self: start;
  padding-top: 8vh;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
  transition: opacity 500ms ease, transform 700ms var(--ease);
}

.eyebrow {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cover h1 {
  display: grid;
  width: min-content;
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(34px, 10vw, 46px);
  font-weight: 500;
  line-height: 1.13;
}

.cover h1 b {
  margin: 4px 0;
  color: #e3b6c1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
}

.cover-note {
  margin: 16px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 14px;
}

.envelope-scene {
  position: relative;
  z-index: 5;
  display: grid;
  place-items: center;
  height: 208px;
  perspective: 900px;
}

.envelope {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --shine-x: 50%;
  position: relative;
  width: min(78vw, 310px);
  aspect-ratio: 1.65;
  transform-style: preserve-3d;
  animation: float-envelope 4s ease-in-out infinite;
  transition: transform 260ms var(--ease);
}

.envelope::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  opacity: 0.28;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 22%, rgba(255,255,255,.58) var(--shine-x), transparent 68%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transform: translateZ(6px);
}

.envelope-back,
.envelope-pocket,
.envelope-flap {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(247, 245, 242, 0.9);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.envelope-pocket {
  z-index: 3;
  clip-path: polygon(0 24%, 50% 70%, 100% 24%, 100% 100%, 0 100%);
  background: #e8e3de;
}

.envelope-flap {
  z-index: 4;
  clip-path: polygon(0 0, 100% 0, 50% 63%);
  transform-origin: top;
  background: #f4f0eb;
  transition: transform 700ms var(--ease);
}

.invitation-card {
  position: absolute;
  z-index: 2;
  inset: 12px 17px 16px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 11px;
  color: var(--ink);
  border: 1px solid #c9b5b9;
  background: var(--white);
  transform: translateY(4px);
  transition: transform 800ms 160ms var(--ease);
}

.invitation-card > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.invitation-card span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.invitation-card span,
.invitation-card i,
.invitation-card small {
  opacity: 0;
  transition: opacity 300ms 260ms;
}

.invitation-card small {
  color: #8b7b7e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
}

.invitation-card i,
footer i,
.hero-content h2 i {
  display: block;
  width: 28px;
  height: 1px;
  background: currentColor;
}

.wax-seal {
  position: absolute;
  z-index: 5;
  top: 43%;
  left: 50%;
  display: grid;
  width: 46px;
  aspect-ratio: 1;
  place-items: center;
  color: #f8dce2;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: #8d4252;
  box-shadow: 0 7px 20px rgba(70, 24, 35, 0.35);
  transform: translate(-50%, -50%);
  transition: opacity 300ms, transform 500ms var(--ease);
}

.seal-light {
  position: absolute;
  z-index: 5;
  top: 43%;
  left: 50%;
  width: 46px;
  aspect-ratio: 1;
  pointer-events: none;
  transform: translate(-50%, -50%) translateZ(7px);
}

.seal-light i {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(239, 194, 189, .96);
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 12px rgba(239, 194, 189, .68);
}

.seal-light i:last-child {
  border-color: rgba(217, 228, 234, .8) transparent rgba(217, 228, 234, .8) rgba(217, 228, 234, .8);
  transform: rotate(180deg);
}

.seal-light::before,
.seal-light::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,244,238,.95), transparent);
  box-shadow: 0 0 16px rgba(239,194,189,.8);
  transform-origin: center;
}

.is-opening .envelope-flap { animation: envelope-flap-open 1.1s var(--ease) both; }

.is-opening .invitation-card {
  animation: invitation-rise 1.55s 100ms var(--ease) both;
}

.is-opening .invitation-card span,
.is-opening .invitation-card i,
.is-opening .invitation-card small {
  opacity: 1;
}

.is-opening .cover-copy {
  opacity: .22;
  transform: translate3d(0, -18px, 0);
}

.is-opening .cover-photo { will-change: transform; animation: cover-opening 1.7s var(--ease) both; }
.is-opening .envelope { animation: envelope-open-sequence 1.65s var(--ease) both; }
.is-opening .envelope-pocket,
.is-opening .envelope-back { animation: envelope-shell-fade 1.4s 420ms var(--ease) both; }
.is-opening .open-invitation,
.is-opening .cover-hint { opacity: 0; transform: translate3d(0, 14px, 0); pointer-events: none; }

.is-opening .wax-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.65);
}

.is-opening .seal-light i:first-child { animation: seal-release-a 850ms var(--ease) both; }
.is-opening .seal-light i:last-child { animation: seal-release-b 850ms 70ms var(--ease) both; }
.is-opening .seal-light::before { animation: seal-ray-a 880ms var(--ease) both; }
.is-opening .seal-light::after { animation: seal-ray-b 880ms 50ms var(--ease) both; }

@keyframes seal-release-a {
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-48px, -34px) scale(5.6) rotate(185deg); }
}

@keyframes seal-release-b {
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(48px, 34px) scale(5.6) rotate(-185deg); }
}

@keyframes seal-ray-a {
  20% { opacity: .9; transform: translate(-50%, -50%) rotate(24deg) scaleX(.18); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(24deg) scaleX(1.55); }
}

@keyframes seal-ray-b {
  20% { opacity: .82; transform: translate(-50%, -50%) rotate(-31deg) scaleX(.12); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-31deg) scaleX(1.45); }
}

.opening-light-stage {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.is-opening .opening-light-stage { opacity: 1; }

.opening-orbit {
  position: absolute;
  top: 68%;
  left: 50%;
  width: min(92vw, 360px);
  aspect-ratio: 1;
  border: 2px solid rgba(239,194,189,.58);
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 16px rgba(239,194,189,.34);
  will-change: transform, opacity;
}

.is-opening .opening-orbit-a { animation: opening-orbit-a 1.55s 160ms var(--ease) both; }
.opening-orbit-b {
  border-color: rgba(217,228,234,.48) transparent rgba(217,228,234,.48) rgba(217,228,234,.48);
}

.is-opening .opening-orbit-b { animation: opening-orbit-b 1.55s 220ms var(--ease) both; }

.opening-light-gate {
  position: absolute;
  top: 62%;
  left: 50%;
  width: min(76vw, 300px);
  height: 66dvh;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,253,251,.52), transparent);
  clip-path: polygon(47% 0, 53% 0, 100% 100%, 0 100%);
  transform: translate(-50%, -50%) scaleX(.08);
  transform-origin: center bottom;
}

.is-opening .opening-light-gate { animation: opening-gate 1.15s 520ms var(--ease) both; }

.opening-shard {
  position: absolute;
  top: 68%;
  left: 50%;
  width: 42vw;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), rgba(239,194,189,.7), transparent);
  box-shadow: 0 0 14px rgba(239,194,189,.5);
}

.is-opening .opening-shard-a { animation: opening-shard-a 1.05s 360ms var(--ease) both; }
.is-opening .opening-shard-b { animation: opening-shard-b 1.05s 430ms var(--ease) both; }

@keyframes cover-opening {
  from { transform: scale(1.04); }
  to { transform: scale(1.12) translate3d(0, -1.5%, 0); }
}

@keyframes envelope-open-sequence {
  0% { transform: translateY(0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); }
  46% { transform: translateY(-8px) rotateX(-2deg) rotateY(2deg) scale(1.02); }
  76% { opacity: 1; transform: translateY(-12px) rotateX(-1deg) rotateY(0) scale(1.06); }
  100% { opacity: .34; transform: translateY(-20px) scale(1.12); }
}

@keyframes envelope-shell-fade {
  0%, 42% { opacity: 1; }
  100% { opacity: .18; }
}

@keyframes envelope-flap-open {
  0%, 38% { z-index: 4; opacity: 1; }
  38% { transform: rotateX(168deg); }
  39%, 100% { z-index: 1; }
  100% { opacity: .14; transform: rotateX(176deg) translateZ(-16px); }
}

@keyframes invitation-rise {
  0% { transform: translateY(4px) translateZ(0) scale(1); }
  42% { transform: translateY(-54%) translateZ(24px) scale(1.02); }
  72% { transform: translateY(-62%) translateZ(80px) scale(1.1); }
  100% { transform: translateY(-68%) translateZ(120px) scale(1.18); }
}

@keyframes opening-orbit-a {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.08) rotate(-40deg); }
  32%, 68% { opacity: .84; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.85) rotate(190deg); }
}

@keyframes opening-orbit-b {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.08) rotate(150deg); }
  32%, 68% { opacity: .72; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.7) rotate(-180deg); }
}

@keyframes opening-gate {
  0% { opacity: 0; transform: translate(-50%, -50%) scaleX(.05); }
  48% { opacity: .44; }
  100% { opacity: 0; transform: translate(-50%, -50%) scaleX(1.5); }
}

@keyframes opening-shard-a {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(22deg) scaleX(.1); }
  38% { opacity: .9; }
  100% { opacity: 0; transform: translate(-118%, -180px) rotate(22deg) scaleX(1.35); }
}

@keyframes opening-shard-b {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-28deg) scaleX(.1); }
  38% { opacity: .82; }
  100% { opacity: 0; transform: translate(18%, 160px) rotate(-28deg) scaleX(1.3); }
}

@keyframes float-envelope {
  0%, 100% { transform: translateY(0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); }
  50% { transform: translateY(-7px) rotateX(calc(var(--tilt-x) + 2deg)) rotateY(var(--tilt-y)); }
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 50px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.primary-button:active,
.secondary-button:active,
.text-button:active {
  transform: scale(0.98);
}

.primary-button {
  color: var(--white);
  background: var(--ink);
}

.cover .primary-button {
  color: var(--ink);
  background: rgba(255, 253, 251, 0.94);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 12px 36px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
}

.cover-hint {
  margin: 11px 0 0;
  font-size: 11px;
  text-align: center;
  opacity: 0.75;
}

main {
  --vow-progress: 0;
  position: relative;
  background: var(--paper);
}

.global-lightfield {
  position: fixed;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  contain: strict;
  transition: opacity 650ms var(--ease);
}

.is-open .global-lightfield { opacity: .82; }

.interactive-tracks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.track-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 260ms ease;
}

.track-haze {
  stroke-width: 15;
  opacity: .07;
}

.track-body {
  stroke-width: 4.5;
  opacity: .28;
}

.track-core {
  stroke-width: 1.25;
  opacity: .62;
}

.track-lane-left .track-path { stroke: var(--rose-light); }
.track-lane-right .track-path { stroke: var(--ice); }

.track-comet {
  opacity: .76;
  filter: drop-shadow(0 0 7px rgba(239,194,189,.72));
  will-change: transform, opacity;
}

.track-lane-right .track-comet {
  filter: drop-shadow(0 0 7px rgba(217,228,234,.72));
}

.comet-tail {
  stroke-width: 5;
  stroke-linecap: round;
  transform: scaleX(var(--comet-tail, 1));
  transform-box: fill-box;
  transform-origin: right center;
}

.comet-head { fill: #fffaf6; }
.track-lane-right .comet-head { fill: #f4fbff; }

.global-lightfield.is-dragging .track-haze { opacity: .16; }
.global-lightfield.is-dragging .track-body { opacity: .42; }

.global-lightfield.is-resonating .interactive-tracks {
  animation: lightfield-resonance 1.45s var(--ease) both;
  transform-origin: center;
}

@keyframes lightfield-resonance {
  0% { opacity: .76; transform: scaleX(1); }
  34% { opacity: 1; transform: scaleX(1.012); }
  100% { opacity: .82; transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .track-comet { opacity: .62; filter: none; }
}

.hero {
  display: grid;
  align-items: end;
  color: var(--white);
  background: var(--ink);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 32px;
  bottom: -34px;
  width: 220px;
  height: 138px;
  border: 2px solid rgba(239,194,189,.68);
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-28deg);
  filter: drop-shadow(0 0 13px rgba(239,194,189,.55));
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img,
.crystal-frame img,
.portrait-media img {
  height: 100%;
  object-fit: cover;
}

.hero-media img {
  object-position: center 61%;
}

.hero-overlay {
  background: linear-gradient(180deg, rgba(23,23,22,.16), rgba(23,23,22,.07) 45%, rgba(23,23,22,.77));
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px calc(76px + var(--safe-bottom));
}

.hero-content h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(30px, 9vw, 42px);
  font-weight: 500;
  line-height: 1.2;
}

.hero-content h2 i {
  width: 20px;
  color: #e3b6c1;
}

.event-date {
  margin: 18px 0 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 15px;
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: calc(70px + var(--safe-bottom));
  width: 1px;
  height: 64px;
  overflow: hidden;
  background: rgba(255,255,255,.3);
}

.scroll-cue span {
  display: block;
  width: 100%;
  height: 45%;
  background: var(--white);
  animation: scroll-cue 2s ease-in-out infinite;
}

@keyframes scroll-cue {
  from { transform: translateY(-110%); }
  to { transform: translateY(230%); }
}

.letter-section {
  display: grid;
  min-height: 120dvh;
  color: var(--white);
  background: var(--ink);
}

.letter-section::before,
.letter-section::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.letter-section::before {
  top: 34%;
  right: -54vw;
  width: 116vw;
  height: 52vw;
  border: 2px solid rgba(239,194,189,.34);
  border-left-color: transparent;
  border-radius: 50%;
  filter: drop-shadow(0 0 14px rgba(183,127,141,.36));
  transform: rotate(28deg);
}

.letter-section::after {
  top: 56%;
  right: -20%;
  left: -20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(217,228,234,.48), rgba(239,194,189,.72), transparent);
  box-shadow: 0 0 14px rgba(183,127,141,.3);
  transform: rotate(-12deg);
}

.ring-section {
  --ring-settle: 0;
  --ring-energy: .12;
  --ring-aperture-scale: .92;
  --ring-aperture-opacity: 0;
  --engrave-x: 50%;
  --engrave-y: 55%;
  --engrave-radius: 3%;
  --engrave-opacity: .003;
  --music-energy: 0;
  min-height: 240dvh;
  color: var(--white);
  background: #121110;
  overflow: visible;
}

.ring-stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  min-height: 620px;
  overflow: hidden;
  contain: layout style paint;
  isolation: isolate;
}

.ring-stage::before,
.ring-stage::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.ring-stage::before {
  inset: 0;
  background: linear-gradient(180deg, rgba(18,17,16,.96) 0%, transparent 23%, transparent 72%, rgba(18,17,16,.92) 100%);
}

.ring-stage::after {
  top: 50%;
  right: -28%;
  left: -28%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239,194,189,.45), rgba(217,228,234,.26), transparent);
  box-shadow: 0 0 12px rgba(183,127,141,.2);
  transform: rotate(-12deg);
}

.ring-canvas-host,
.ring-fallback {
  position: absolute;
  inset: 0;
}

.ring-canvas-host {
  z-index: 2;
  opacity: 0;
  transition: opacity 700ms var(--ease);
  touch-action: pan-y pinch-zoom;
}

.ring-canvas-host canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.ring-fallback {
  z-index: 2;
  display: grid;
  place-items: center;
  perspective: 900px;
  transition: opacity 500ms var(--ease);
}

.fallback-ring {
  position: absolute;
  width: min(50vw, 220px);
  aspect-ratio: 1;
  border: 12px solid #cfaaa7;
  border-radius: 50%;
  box-shadow: inset 8px -7px 18px rgba(255,255,255,.32), inset -8px 8px 18px rgba(34,24,24,.55), 0 28px 60px rgba(0,0,0,.25);
}

.fallback-ring-a { transform: translateX(-18%) rotateX(62deg) rotateY(16deg) rotateZ(-14deg); }
.fallback-ring-b { border-color: #d8d6d2; transform: translateX(18%) rotateX(55deg) rotateY(-22deg) rotateZ(17deg); }
.webgl-ready .ring-canvas-host { opacity: 1; }
.webgl-ready .ring-fallback { opacity: 0; }
.webgl-failed .ring-canvas-host { display: none; }

.ring-engraving {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(255,238,232,.88);
  pointer-events: none;
  opacity: var(--engrave-opacity);
  filter: drop-shadow(0 0 5px rgba(239,194,189,.28));
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(circle at var(--engrave-x) var(--engrave-y), #000 0, #000 var(--engrave-radius), rgba(0,0,0,.76) calc(var(--engrave-radius) + 7%), transparent calc(var(--engrave-radius) + 22%));
  mask-image: radial-gradient(circle at var(--engrave-x) var(--engrave-y), #000 0, #000 var(--engrave-radius), rgba(0,0,0,.76) calc(var(--engrave-radius) + 7%), transparent calc(var(--engrave-radius) + 22%));
  transition: opacity 240ms ease;
}

.ring-engraving text {
  fill: currentColor;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 9px;
  letter-spacing: 0;
}

.engraving-orbit {
  transform-box: view-box;
  transform-origin: 195px 505px;
}

.engraving-orbit-rose { transform: rotate(-11deg); }
.engraving-orbit-ice { color: rgba(226,239,246,.7); transform: rotate(17deg); }
.ring-section[data-vow-sealed="true"] .ring-engraving { opacity: 0; }

.ring-word {
  position: absolute;
  z-index: 0;
  top: 48%;
  left: 42%;
  color: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  font-weight: 700;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(255,255,255,.075);
  transform: translate(-50%, -50%) rotate(-12deg);
}

.ring-copy,
.ring-vow,
.ring-monogram,
.ring-signal,
.ring-aperture,
.scene-motion-toggle,
.ring-progress {
  position: absolute;
  z-index: 4;
}

.ring-copy-top {
  top: max(72px, calc(env(safe-area-inset-top) + 54px));
  left: 24px;
  width: min(calc(100% - 106px), 300px);
}

.ring-copy h2 {
  margin: 0;
  max-width: 8em;
  font-family: "Songti SC", "STSong", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.45;
}

.ring-signal {
  top: 244px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.54);
  font-size: 10px;
  transition: opacity 300ms ease, transform 500ms var(--ease);
}

.ring-signal span {
  display: grid;
  width: 28px;
  height: 14px;
  place-items: center;
  color: var(--rose-light);
  border-right: 1px solid rgba(239,194,189,.44);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1;
}

.ring-signal p { margin: 0; color: rgba(255,255,255,.68); font-family: Georgia, "Times New Roman", serif; font-size: 9px; }

.ring-monogram {
  top: 48%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255,255,255,.64);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  opacity: calc(1 - var(--ring-settle));
  transform: translate(-50%, -50%);
  transition: opacity 240ms ease;
}

.ring-monogram i {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--rose);
}

.ring-aperture {
  top: 54%;
  left: 50%;
  display: grid;
  width: min(68vw, 250px);
  place-items: center;
  gap: 7px;
  color: rgba(255,255,255,.88);
  text-align: center;
  opacity: var(--ring-aperture-opacity);
  pointer-events: none;
  text-shadow: 0 1px 7px rgba(18,17,16,.9), 0 0 16px rgba(18,17,16,.62);
  transform: translate(-50%, -50%) scale(var(--ring-aperture-scale));
  transform-origin: center;
  transition: opacity 160ms linear;
}

.ring-aperture::before {
  content: "";
  position: absolute;
  width: min(42vw, 168px);
  aspect-ratio: 1;
  border: 1px solid rgba(239,194,189,.46);
  border-radius: 50%;
  opacity: 0;
  transform: scale(.72);
}

.ring-section[data-vow-sealed="true"] .ring-aperture::before {
  animation: vow-seal 1.45s var(--ease) both;
}

.ring-aperture span {
  color: rgba(249,211,205,.88);
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
}

.ring-aperture strong {
  color: rgba(255,253,251,.98);
  font-family: "Songti SC", "STSong", serif;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.ring-aperture strong i {
  margin: 0 5px;
  color: var(--rose-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  font-style: normal;
}

.ring-aperture time {
  color: rgba(255,255,255,.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
}

@keyframes vow-seal {
  0% { opacity: 0; transform: scale(.72); }
  24% { opacity: .72; }
  100% { opacity: 0; transform: scale(1.46); }
}

.ring-vow {
  right: 24px;
  bottom: calc(76px + var(--safe-bottom));
  margin: 0;
  text-align: right;
  font-family: "Songti SC", "STSong", serif;
  font-size: 16px;
  line-height: 1.8;
}

.scene-motion-toggle {
  top: max(68px, calc(env(safe-area-inset-top) + 52px));
  right: 18px;
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(18,17,16,.38);
  backdrop-filter: blur(10px);
}

.scene-motion-toggle:disabled {
  opacity: 0.42;
  cursor: wait;
}

.scene-motion-toggle svg {
  width: 15px;
  fill: currentColor;
}

.scene-motion-toggle .play-icon,
.scene-motion-toggle[aria-pressed="false"] .pause-icon { display: none; }
.scene-motion-toggle[aria-pressed="false"] .play-icon { display: block; }

.ring-progress {
  top: 32%;
  right: 18px;
  width: 1px;
  height: 32%;
  overflow: hidden;
  background: rgba(255,255,255,.14);
}

.ring-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--rose);
  transform: scaleY(.08);
  transform-origin: top;
}

.crystal-frame {
  position: relative;
  height: 72dvh;
  min-height: 540px;
  overflow: hidden;
  clip-path: inset(5% 5% 0 5%);
}

.crystal-frame img {
  object-position: center 8%;
  transform: scale(1.08);
  transition: transform 1.4s var(--ease);
}

.crystal-frame.is-visible img {
  transform: scale(1);
}

.crystal-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,23,22,.02), var(--ink));
}

.letter-copy {
  position: relative;
  z-index: 2;
  margin-top: -100px;
  padding: 0 24px 90px;
}

.letter-copy h2,
.section-heading h2,
.rsvp-copy h2 {
  margin: 0;
  max-width: 10em;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(30px, 9vw, 40px);
  font-weight: 500;
  line-height: 1.35;
}

.letter-copy > p:not(.eyebrow) {
  max-width: 31em;
  margin: 25px 0 0;
  color: rgba(255,255,255,.74);
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  line-height: 2;
}

.signature {
  display: block;
  margin-top: 26px;
  color: #e3b6c1;
  font-family: "Songti SC", "STSong", serif;
}

.details-section {
  position: relative;
  min-height: auto;
  padding: 92px 24px 104px;
  background: var(--paper);
  isolation: isolate;
}

.details-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 145px;
  left: 50%;
  width: 2px;
  height: 360px;
  background: linear-gradient(transparent, rgba(183,127,141,.64), rgba(217,228,234,.5), transparent);
  box-shadow: 0 0 16px rgba(183,127,141,.18);
}

.section-heading {
  margin-bottom: 54px;
}

.time-crystal {
  --crystal-turn: -8deg;
  position: relative;
  display: grid;
  width: min(100%, 310px);
  height: 224px;
  margin: -18px auto 54px;
  place-items: center;
  perspective: 900px;
}

.crystal-core {
  position: relative;
  z-index: 2;
  display: grid;
  width: 230px;
  height: 148px;
  place-content: center;
  text-align: center;
  filter: drop-shadow(0 22px 28px rgba(23,23,22,.13));
}

.crystal-core::before,
.crystal-core::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.crystal-core::before {
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(217,228,234,.5) 48%, rgba(239,194,189,.3));
}

.crystal-core::after {
  inset: 2px;
  background: rgba(247,245,242,.72);
  transform: scale(.84);
}

.crystal-core span,
.crystal-core small { position: relative; z-index: 2; }

.crystal-core span {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 18px;
}

.crystal-core small {
  margin-top: 8px;
  color: #837b77;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
}

.crystal-orbit {
  position: absolute;
  width: 270px;
  height: 105px;
  border: 2px solid rgba(183,127,141,.48);
  border-radius: 50%;
  transform: rotateX(64deg) rotateZ(var(--crystal-turn));
  box-shadow: 0 0 18px rgba(183,127,141,.18);
  animation: orbit-breathe 4.8s ease-in-out infinite alternate;
}

.crystal-orbit-b {
  width: 210px;
  height: 154px;
  border-color: rgba(122,143,154,.42);
  transform: rotateY(68deg) rotateZ(8deg);
}

@keyframes orbit-breathe {
  from { opacity: .58; filter: drop-shadow(0 0 1px rgba(183,127,141,.08)); }
  to { opacity: 1; filter: drop-shadow(0 0 8px rgba(183,127,141,.34)); }
}

.event-details {
  border-top: 1px solid var(--line);
}

.detail-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: baseline;
  min-height: 74px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row span {
  color: #77716d;
  font-size: 12px;
}

.detail-row strong {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
}

.venue-address {
  display: block;
  margin-top: 5px;
  color: #77716d;
  font-size: 11px;
  line-height: 1.65;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 38px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.countdown div {
  display: grid;
  place-items: center;
  min-height: 92px;
  border-right: 1px solid var(--line);
}

.countdown div:last-child { border-right: 0; }
.countdown strong { font-family: Georgia, serif; font-size: 28px; font-weight: 400; }
.countdown span { color: #77716d; font-size: 10px; }

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 32px;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
}

.venue-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.venue-map {
  position: relative;
  margin-top: 34px;
  perspective: 900px;
}

.venue-map-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(23,23,22,.14);
  border-radius: 6px;
  background: #e8e5df;
  box-shadow: 0 18px 40px rgba(49,44,41,.12), inset 0 1px 0 rgba(255,255,255,.8);
  cursor: pointer;
  transform: rotateX(0deg) translateZ(0);
  transform-origin: 50% 100%;
  transition: transform 280ms var(--ease), box-shadow 280ms var(--ease);
  text-align: left;
  touch-action: manipulation;
}

.venue-map::before {
  content: "";
  display: block;
  aspect-ratio: 5 / 3;
}

.venue-map-button:active {
  box-shadow: 0 10px 24px rgba(49,44,41,.1);
  transform: rotateX(1.5deg) scale(.988);
}

.venue-map-button > img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  filter: saturate(.72) contrast(.94) brightness(1.04);
  transform: scale(1.015);
}

.venue-map-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: inherit;
  box-shadow: inset 0 -70px 72px rgba(35,31,29,.18);
  pointer-events: none;
}

.venue-map-light {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: -22%;
  width: 18%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  opacity: .55;
  transform: skewX(-14deg);
  animation: map-light 5.6s ease-in-out infinite;
}

@keyframes map-light {
  0%, 42% { opacity: 0; transform: translateX(0) skewX(-14deg); }
  56% { opacity: .58; }
  78%, 100% { opacity: 0; transform: translateX(680%) skewX(-14deg); }
}

.venue-map-pin {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: 40px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 50%;
  background: rgba(23,23,22,.88);
  box-shadow: 0 8px 20px rgba(23,23,22,.28), 0 0 0 7px rgba(183,127,141,.15);
  transform: translate(-50%, -72%);
  animation: map-pin-float 3.4s ease-in-out infinite;
}

.venue-map-pin::after {
  content: "";
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: 23px;
  height: 8px;
  border: 1px solid rgba(99,72,79,.32);
  border-radius: 50%;
  transform: translateX(-50%);
}

.venue-map-pin svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

@keyframes map-pin-float {
  0%, 100% { transform: translate(-50%, -72%); }
  50% { transform: translate(-50%, -82%); }
}

.venue-map-copy {
  position: absolute;
  z-index: 5;
  bottom: 12px;
  left: 12px;
  display: grid;
  max-width: calc(100% - 116px);
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 4px;
  background: rgba(255,253,251,.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.74);
  backdrop-filter: blur(10px);
}

.venue-map-copy small { color: #847a74; font-size: 8px; }
.venue-map-copy strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.venue-map-attribution {
  position: absolute;
  z-index: 5;
  right: 8px;
  bottom: 8px;
  padding: 3px 5px;
  color: rgba(255,255,255,.88);
  border-radius: 3px;
  background: rgba(23,23,22,.46);
  font-size: 7px;
  backdrop-filter: blur(5px);
}

.venue-actions .secondary-button { margin-top: 0; }
.venue-actions { grid-template-columns: 1fr auto; }
.text-outline-button {
  min-height: 50px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
}

.secondary-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.gallery-section {
  position: relative;
  min-height: auto;
  padding: 92px 0 96px;
  color: var(--white);
  background: var(--ink);
  isolation: isolate;
}

.gallery-section .section-heading {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.gallery-corridor {
  position: absolute;
  z-index: -1;
  inset: 190px 0 70px;
  overflow: hidden;
  opacity: .88;
  pointer-events: none;
}

.gallery-corridor i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(transparent, rgba(239,194,189,.38), rgba(217,228,234,.3), transparent);
  box-shadow: 0 0 10px rgba(183,127,141,.18);
}

.gallery-corridor i:first-child { left: 8%; transform: rotate(-8deg); transform-origin: top; }
.gallery-corridor i:nth-child(2) { right: 8%; transform: rotate(8deg); transform-origin: top; }

.gallery-corridor span {
  position: absolute;
  top: 46%;
  right: -25%;
  left: -25%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(239,194,189,.7), transparent);
  box-shadow: 0 0 24px rgba(183,127,141,.46);
  transform: translateX(var(--gallery-light-x, 0)) rotate(-5deg);
}

.photo-rail {
  --photo-card-width: min(72vw, 304px);
  position: relative;
  z-index: 2;
  display: grid;
  grid-auto-columns: var(--photo-card-width);
  grid-auto-flow: column;
  gap: 18px;
  overflow-x: auto;
  padding: 26px calc((100% - var(--photo-card-width)) / 2) 66px;
  scroll-padding-inline: calc((100% - var(--photo-card-width)) / 2);
  scroll-behavior: auto;
  scroll-snap-type: none;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  perspective: 1200px;
  perspective-origin: 50% 42%;
  transform-style: preserve-3d;
  touch-action: pan-x pan-y;
}

.photo-rail::-webkit-scrollbar { display: none; }

.photo-card {
  --card-rotation: 10deg;
  --card-scale: .88;
  --card-depth: -110px;
  --card-opacity: .58;
  --card-lift: 18px;
  --card-velocity-tilt: 0deg;
  --card-shine-x: 50%;
  --card-shine-opacity: 0;
  position: relative;
  height: min(112vw, 480px);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  background: #2c2928;
  box-shadow: 0 18px 30px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.12);
  scroll-snap-align: center;
  opacity: var(--card-opacity);
  transform: translate3d(0, var(--card-lift), var(--card-depth)) rotateX(-1.5deg) rotateY(var(--card-rotation)) scale(var(--card-scale));
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: opacity 220ms ease, border-color 260ms ease;
  contain: layout style paint;
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 22%, rgba(255,255,255,.48) var(--card-shine-x), transparent 66%);
  opacity: var(--card-shine-opacity);
  transform: translateZ(12px);
  transition: opacity 240ms ease;
}

.photo-card.is-active {
  --card-shine-opacity: .12;
  border-color: rgba(239,194,189,.5);
  box-shadow: 0 34px 58px rgba(0,0,0,.38), 0 0 28px rgba(183,127,141,.13), inset 0 1px 0 rgba(255,255,255,.24);
}

.photo-rail.is-dragging .photo-card {
  will-change: transform;
  transition: opacity 120ms linear, border-color 120ms linear;
}

.photo-rail.is-snapping .photo-card {
  will-change: transform;
  transition: opacity 120ms linear, border-color 120ms linear;
}

.photo-rail.is-dragging .photo-card.is-active { --card-shine-opacity: .2; }

.photo-rail.is-settling .photo-card {
  transition: transform 260ms var(--ease), opacity 220ms ease, border-color 220ms ease, box-shadow 260ms var(--ease);
}

.photo-card img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.015);
  transition: transform 800ms var(--ease), filter 300ms ease;
}

.photo-card.is-active img { transform: scale(1.045); }

.photo-card-landscape {
  align-self: center;
  height: min(112vw, 480px);
}

.photo-card-landscape img { object-fit: contain; background: #151414; }

.photo-card figcaption {
  z-index: 3;
  position: absolute;
  inset: auto 0 0;
  padding: 48px 18px 18px;
  color: var(--white);
  background: linear-gradient(transparent, rgba(23,23,22,.78));
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  transform: translateZ(18px);
}

.swipe-hint {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 24px 0;
  color: rgba(255,255,255,.5);
  font-size: 11px;
}

.swipe-hint span {
  width: 28px;
  height: 1px;
  background: var(--rose);
}

.portrait-section {
  position: relative;
  display: grid;
  min-height: 106dvh;
  background: #e8e2dc;
  isolation: isolate;
}

.portrait-section::before,
.portrait-section::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.portrait-section::before {
  top: 12%;
  left: -58%;
  width: 126%;
  height: 46%;
  border: 2px solid rgba(239,194,189,.48);
  border-bottom-color: transparent;
  border-radius: 50%;
  filter: drop-shadow(0 0 12px rgba(183,127,141,.4));
  transform: rotate(-24deg);
}

.portrait-section::after {
  right: -18%;
  bottom: 30%;
  left: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), rgba(183,127,141,.72), transparent);
  box-shadow: 0 0 14px rgba(183,127,141,.35);
  transform: rotate(17deg);
}

.portrait-media {
  position: relative;
  z-index: 0;
  height: 82dvh;
  min-height: 590px;
  clip-path: inset(0 0 7% 0);
}

.portrait-media img { object-position: center 58%; }

.portrait-section blockquote {
  position: relative;
  z-index: 2;
  align-self: end;
  margin: -120px 24px 74px;
  padding: 24px 0 0 22px;
  color: var(--ink);
  border-left: 1px solid var(--rose);
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(24px, 7vw, 32px);
  line-height: 1.7;
}

.rsvp-section {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  min-height: 100dvh;
  padding: 90px 24px calc(104px + var(--safe-bottom));
  color: var(--white);
  background: #1c1a19;
  isolation: isolate;
}

.rsvp-section::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 18%;
  right: -58%;
  width: 120%;
  height: 44%;
  border: 2px solid rgba(239,194,189,.28);
  border-left-color: transparent;
  border-radius: 50%;
  filter: drop-shadow(0 0 12px rgba(183,127,141,.34));
  transform: rotate(18deg);
}

.rsvp-section > * { position: relative; z-index: 1; }

.rsvp-copy h2 { max-width: 9em; }
.personal-greeting { margin-top: 20px; color: #e3b6c1; }

.witness-field {
  position: relative;
  display: grid;
  min-height: 236px;
  margin: 34px 0 12px;
  place-items: center;
  text-align: center;
}

.witness-constellation {
  position: absolute;
  inset: 0 8px 54px;
  border: 1px solid rgba(255,255,255,.08);
  border-right-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-7deg);
}

.witness-constellation::before,
.witness-constellation::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(183,127,141,.13);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.witness-constellation::before { width: 62%; height: 86%; transform: translate(-50%, -50%) rotate(36deg); }
.witness-constellation::after { width: 88%; height: 48%; transform: translate(-50%, -50%) rotate(-24deg); }

.witness-constellation i {
  position: absolute;
  z-index: 2;
  width: 4px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  box-shadow: 0 0 5px rgba(255,255,255,.25);
  transition: background 500ms ease, box-shadow 500ms ease, transform 500ms var(--ease);
}

.witness-constellation i.is-lit {
  background: #fff6ee;
  box-shadow: 0 0 5px #fff, 0 0 15px rgba(239,194,189,.9);
  transform: scale(1.45);
}

.witness-constellation i:nth-child(1) { top: 17%; left: 18%; }
.witness-constellation i:nth-child(2) { top: 31%; left: 43%; }
.witness-constellation i:nth-child(3) { top: 15%; left: 72%; }
.witness-constellation i:nth-child(4) { top: 48%; left: 88%; }
.witness-constellation i:nth-child(5) { top: 72%; left: 76%; }
.witness-constellation i:nth-child(6) { top: 80%; left: 49%; }
.witness-constellation i:nth-child(7) { top: 66%; left: 22%; }
.witness-constellation i:nth-child(8) { top: 43%; left: 8%; }
.witness-constellation i:nth-child(9) { top: 51%; left: 57%; }
.witness-constellation i:nth-child(10) { top: 34%; left: 69%; }
.witness-constellation i:nth-child(11) { top: 67%; left: 39%; }
.witness-constellation i:nth-child(12) { top: 29%; left: 27%; }

.witness-flare {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(239,194,189,.45);
  border-radius: 50%;
  box-shadow: 0 0 25px rgba(183,127,141,.22);
  transform: translate(-50%, -50%);
}

.witness-field.is-new .witness-flare { animation: witness-light 1.2s var(--ease) both; }

@keyframes witness-light {
  45% { opacity: 1; transform: translate(-50%, -50%) scale(2.2); box-shadow: 0 0 48px rgba(239,194,189,.72); }
  100% { opacity: .7; transform: translate(-50%, -50%) scale(1); }
}

.witness-field > p {
  position: relative;
  z-index: 3;
  display: grid;
  margin: 0;
  place-items: center;
}

.witness-field > p strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
}

.witness-field > p span { margin-top: 7px; color: rgba(255,255,255,.48); font-size: 10px; }

.rsvp-success {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 4px;
}

.rsvp-success b { color: var(--rose-light); font-family: "Songti SC", "STSong", serif; font-size: 16px; font-weight: 500; }
.rsvp-success span { color: rgba(255,255,255,.48); font-size: 10px; }
.rsvp-share-button {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 7px;
  min-height: 34px;
  margin-top: 6px;
  padding: 0 12px;
  color: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 4px;
  background: rgba(255,255,255,.05);
}
.rsvp-share-button svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.rsvp-share-button span { color: inherit; font-size: 10px; }
.rsvp-actions { display: grid; gap: 10px; margin-top: 20px; }
.rsvp-actions .primary-button { color: var(--ink); background: var(--white); }
.text-button { color: rgba(255,255,255,.65); background: transparent; }
.privacy-note { margin: 13px 0 0; color: rgba(255,255,255,.42); font-size: 10px; text-align: center; }

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 80px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
}

footer i { width: 20px; color: var(--rose); }

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.music-toggle {
  position: fixed;
  z-index: 40;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  background: rgba(23,23,22,.44);
  backdrop-filter: blur(12px);
}

.music-label { font-size: 11px; }
.music-bars { display: flex; align-items: center; gap: 2px; height: 14px; }
.music-bars i { display: block; width: 2px; height: 12px; background: currentColor; animation: music 750ms ease-in-out infinite alternate; }
.music-bars i:nth-child(2) { height: 8px; animation-delay: 180ms; }
.music-bars i:nth-child(3) { height: 5px; animation-delay: 360ms; }
.music-toggle[aria-pressed="false"] .music-bars i { animation-play-state: paused; transform: scaleY(.2); }

@keyframes music { to { transform: scaleY(.35); } }

.action-dock {
  position: fixed;
  z-index: 35;
  right: 14px;
  bottom: var(--safe-bottom);
  left: 14px;
  display: grid;
  grid-template-columns: 44px 44px minmax(0, 1fr);
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 7px;
  background: rgba(255,253,251,.9);
  box-shadow: 0 14px 40px rgba(23,23,22,.18);
  backdrop-filter: blur(16px);
  transition: opacity 220ms, transform 220ms var(--ease);
}

.action-dock.is-hidden { opacity: 0; transform: translateY(130%); }
.action-dock button { min-height: 44px; border: 0; border-radius: 4px; }
.dock-route,
.dock-share { display: grid; place-items: center; color: var(--ink); background: #eae6e2; }
.dock-share { background: #f4efec; }
.action-dock svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.dock-rsvp { color: var(--white); background: var(--ink); }

.share-dialog {
  width: min(100%, 520px);
  max-width: none;
  margin: auto auto 0;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  border: 0;
  background: transparent;
}

.share-dialog::backdrop {
  background: rgba(16,15,14,.72);
  backdrop-filter: blur(5px);
}

.share-sheet {
  position: relative;
  max-height: calc(100dvh - 14px);
  padding: 32px 22px calc(20px + env(safe-area-inset-bottom));
  overflow: auto;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 8px 8px 0 0;
  background: var(--paper);
  box-shadow: 0 -22px 60px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.9);
}

.share-dialog[open] .share-sheet { animation: share-sheet-in 440ms var(--ease); }
@keyframes share-sheet-in { from { opacity: 0; transform: translateY(28px); } }

.share-sheet > .eyebrow { margin: 0; text-align: center; }
.share-sheet > h2 {
  max-width: 12em;
  margin: 8px auto 14px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.icon-button {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--ink-soft);
  border: 0;
  background: transparent;
}

.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.5; }
.share-close { position: absolute; z-index: 3; top: 14px; left: 14px; }

.wechat-share-cue {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 12px;
  display: none;
  align-items: flex-start;
  color: #6d6460;
  font-size: 9px;
}

.wechat-share-cue svg { width: 34px; height: 34px; fill: none; stroke: var(--rose); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.4; }
.wechat-share-cue span { margin-top: 24px; }
body.is-wechat .wechat-share-cue { display: flex; }

.share-card-stage {
  display: grid;
  min-height: 316px;
  place-items: center;
  perspective: 1000px;
}

.share-card {
  --share-rx: 0deg;
  --share-ry: 0deg;
  --share-shine: 50%;
  position: relative;
  width: min(68vw, 252px);
  padding: 8px 8px 13px;
  overflow: hidden;
  border: 1px solid rgba(129,112,103,.24);
  border-radius: 6px;
  background: #fffdfb;
  box-shadow: 0 24px 52px rgba(70,58,52,.2), inset 0 1px 0 rgba(255,255,255,.9);
  transform: rotateX(var(--share-rx)) rotateY(var(--share-ry)) translateZ(0);
  transition: transform 180ms ease-out;
  transform-style: preserve-3d;
}

.share-dialog[open] .share-card { animation: share-card-in 620ms var(--ease) both; }
@keyframes share-card-in {
  from { opacity: 0; transform: translateY(24px) rotateX(9deg) rotateY(-5deg) scale(.94); }
}

.share-card::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% var(--share-shine);
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent);
  pointer-events: none;
  transform: translateX(-50%) rotate(12deg);
}

.share-card-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 3px;
  background: #e8e3df;
}

.share-card-photo img { height: 100%; object-fit: cover; }
.share-card-photo span { position: absolute; inset: 5px; border: 1px solid rgba(255,255,255,.72); pointer-events: none; }
.share-card-copy { display: grid; gap: 3px; padding: 11px 3px 0; text-align: center; }
.share-card-copy small { color: #9a8e87; font-size: 7px; }
.share-card-copy strong { font-family: "Songti SC", "STSong", serif; font-size: 17px; font-weight: 500; }
.share-card-copy > span { color: #766d68; font-size: 9px; }

.share-instruction { min-height: 34px; margin: 7px auto 12px; color: #716a66; font-size: 11px; line-height: 1.55; text-align: center; }
.share-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.share-actions button { min-height: 48px; margin: 0; }
.share-actions svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.share-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.share-copy-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; }

.rsvp-dialog {
  width: min(100%, 480px);
  max-width: none;
  margin: auto auto 0;
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 8px 8px 0 0;
  background: var(--paper);
}

.rsvp-dialog::backdrop {
  background: rgba(23,23,22,.62);
  backdrop-filter: blur(3px);
}

.rsvp-dialog[open] { animation: sheet-in 420ms var(--ease); }
@keyframes sheet-in { from { transform: translateY(100%); } }

.rsvp-form {
  position: relative;
  padding: 34px 24px calc(24px + var(--safe-bottom));
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--ink-soft);
  border: 0;
  background: transparent;
  font-family: Arial, sans-serif;
  font-size: 24px;
}

.dialog-title { margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 30px; font-weight: 500; }
.dialog-intro { margin: 10px 0 28px; color: #716b67; font-size: 13px; }
.field { display: grid; gap: 8px; }
.field > span, .party-field legend { font-size: 12px; font-weight: 600; }
.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  font-size: 16px;
}

.field-error { min-height: 18px; color: #a3394e; font-size: 11px; }
.party-field { margin: 18px 0 24px; padding: 0; border: 0; }
.party-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 9px; }
.party-options button { min-height: 42px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 4px; background: transparent; }
.party-options button.is-selected { color: var(--white); border-color: var(--ink); background: var(--ink); }
.form-submit { width: 100%; }
.form-submit[disabled] { cursor: wait; opacity: .65; }
.form-status { min-height: 18px; margin: 10px 0 0; color: #716b67; font-size: 11px; text-align: center; }

.toast {
  position: fixed;
  z-index: 80;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  width: max-content;
  max-width: calc(100vw - 40px);
  padding: 11px 16px;
  color: var(--white);
  border-radius: 4px;
  background: rgba(23,23,22,.9);
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px);
  transition: opacity 220ms, transform 220ms var(--ease);
  font-size: 13px;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  body { width: min(100%, 520px); margin: 0 auto; box-shadow: 0 0 80px rgba(0,0,0,.35); }
  .music-toggle { right: calc((100vw - min(100vw, 520px)) / 2 + 14px); }
  .action-dock { right: calc((100vw - min(100vw, 520px)) / 2 + 14px); left: calc((100vw - min(100vw, 520px)) / 2 + 14px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .reveal { opacity: 1; transform: none; }
}
