:root {
  --night-950: #030817;
  --night-900: #071127;
  --night-800: #0b1937;
  --ink: #4a3024;
  --ink-soft: #795a45;
  --paper: #ead8ba;
  --paper-light: #f5e8cf;
  --paper-deep: #c7aa7d;
  --gold: #e8b35b;
  --gold-light: #ffd98c;
  --gold-glow: rgba(255, 190, 92, 0.48);
  --mauve: #ad7a78;
  --violet: #9a8ae2;
  --text-light: #f7edda;
  --muted-light: #c8bed1;
  --shadow-deep: 0 30px 80px rgba(0, 0, 0, 0.52);
  --shadow-paper: 0 18px 45px rgba(1, 4, 14, 0.4), 0 2px 4px rgba(52, 30, 20, 0.28);
  --paper-texture:
    radial-gradient(circle at 18% 21%, rgba(105, 69, 37, 0.07) 0 1px, transparent 1.5px),
    radial-gradient(circle at 73% 62%, rgba(105, 69, 37, 0.06) 0 1px, transparent 1.6px),
    repeating-linear-gradient(87deg, rgba(95, 59, 34, 0.025) 0 1px, transparent 1px 5px),
    linear-gradient(135deg, var(--paper-light), var(--paper));
  --header-height: 72px;
  --content-width: 1220px;
  --reveal-ms: 760ms;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--paper-deep) var(--night-950);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text-light);
  background:
    radial-gradient(circle at 80% 14%, rgba(70, 55, 141, 0.2), transparent 28%),
    radial-gradient(circle at 16% 48%, rgba(22, 58, 116, 0.3), transparent 36%),
    linear-gradient(180deg, var(--night-900), var(--night-950) 60%, #02050f);
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
  line-height: 1.7;
  overflow-x: hidden;
}

body.opening-active,
body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}

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

[hidden] {
  display: none !important;
}

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

.ambient-glow {
  position: fixed;
  z-index: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.13;
  pointer-events: none;
}

.ambient-glow--one {
  top: 18%;
  right: -180px;
  background: #ed9c45;
}

.ambient-glow--two {
  bottom: 8%;
  left: -160px;
  background: #7564d3;
}

.opening {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(86, 70, 145, 0.22), transparent 30%),
    radial-gradient(circle at 52% 52%, rgba(237, 168, 69, 0.08), transparent 46%),
    rgba(3, 8, 23, 0.94);
  transition: opacity 900ms ease, visibility 900ms ease, transform 900ms ease;
}

.opening::before,
.opening::after {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
}

.opening::before {
  background-image:
    radial-gradient(circle, rgba(255, 232, 180, 0.9) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(171, 180, 255, 0.65) 0 1px, transparent 1.5px);
  background-position: 0 0, 35px 47px;
  background-size: 95px 95px, 137px 137px;
  opacity: 0;
  animation: openingStars 1.5s 0.2s ease forwards, slowDrift 24s linear infinite;
}

.opening::after {
  background: radial-gradient(circle at center, rgba(255, 199, 104, 0.12), transparent 34%);
  transform: scale(0.4);
  opacity: 0;
}

.opening--leaving {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.035);
}

.opening--leaving::after {
  animation: starBurst 850ms ease-out forwards;
}

.opening__skip {
  position: absolute;
  top: 26px;
  right: 30px;
  z-index: 2;
  padding: 8px 15px;
  border: 1px solid rgba(255, 220, 161, 0.28);
  border-radius: 999px;
  color: rgba(255, 241, 215, 0.72);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.opening__skip:hover {
  color: #fff4df;
  background: rgba(255, 255, 255, 0.09);
}

.opening__content {
  position: relative;
  z-index: 1;
  width: min(90vw, 760px);
  text-align: center;
}

.opening__spark {
  display: block;
  margin-bottom: 18px;
  color: var(--gold-light);
  font-size: 42px;
  text-shadow: 0 0 15px var(--gold), 0 0 40px var(--gold-glow);
  opacity: 0;
  transform: scale(0.4) rotate(-30deg);
  animation: openingSpark 900ms 450ms ease forwards, gentleTwinkle 2.7s 1.5s ease-in-out infinite;
}

.opening__eyebrow,
.section-heading__eyebrow,
.surprise-card__eyebrow {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.opening__eyebrow {
  opacity: 0;
  animation: fadeUp 800ms 800ms ease forwards;
}

.opening__title {
  margin: 6px 0 12px;
  font-family: KaiTi, STKaiti, "Noto Serif SC", serif;
  font-size: clamp(3.1rem, 8vw, 6.6rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-shadow: 0 0 28px rgba(255, 202, 116, 0.36);
  opacity: 0;
  animation: fadeUp 900ms 1.05s ease forwards;
}

.opening__subtitle {
  color: #dccdb9;
  font-size: clamp(1rem, 2vw, 1.28rem);
  letter-spacing: 0.18em;
  opacity: 0;
  animation: fadeUp 900ms 1.35s ease forwards;
}

.opening__enter {
  min-width: 138px;
  margin-top: 32px;
  padding: 12px 34px;
  border: 1px solid rgba(255, 214, 145, 0.75);
  border-radius: 999px;
  color: #fff4dc;
  background: linear-gradient(135deg, rgba(229, 171, 78, 0.22), rgba(124, 105, 191, 0.18));
  box-shadow: 0 0 28px rgba(233, 174, 83, 0.2), inset 0 0 18px rgba(255, 255, 255, 0.06);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 800ms 1.7s ease forwards;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.opening__enter:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(229, 171, 78, 0.34), rgba(124, 105, 191, 0.28));
  box-shadow: 0 0 38px rgba(233, 174, 83, 0.34), inset 0 0 18px rgba(255, 255, 255, 0.1);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 72px 1fr 120px;
  align-items: center;
  height: var(--header-height);
  padding: 0 3.2vw;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(3, 8, 23, 0.78), rgba(3, 8, 23, 0.34));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.site-header--scrolled {
  border-color: rgba(232, 179, 91, 0.13);
  background: rgba(4, 9, 24, 0.86);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
}

.brand {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--gold-light);
  font-size: 29px;
  text-decoration: none;
  text-shadow: 0 0 10px var(--gold), 0 0 25px var(--gold-glow);
  transition: transform 200ms ease;
}

.brand:hover {
  transform: rotate(12deg) scale(1.08);
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 4vw, 62px);
}

.site-nav a {
  position: relative;
  padding: 24px 2px 19px;
  color: #d6ccce;
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 200ms ease, text-shadow 200ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
  transform: translateX(-50%);
  transition: width 220ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gold-light);
  text-shadow: 0 0 14px rgba(238, 188, 101, 0.3);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.icon-button,
.menu-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #f4d391;
  font-size: 1.25rem;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.icon-button:hover,
.icon-button.active {
  color: #fff2d3;
  background: rgba(255, 216, 145, 0.09);
  transform: translateY(-1px);
}

.editor-toolbar {
  position: relative;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 28px), 900px);
  margin: 28px auto 0;
  padding: 12px 14px 12px 18px;
  border: 1px solid rgba(255, 218, 155, 0.28);
  border-radius: 18px;
  color: #f8ecd6;
  background: rgba(7, 12, 29, 0.94);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.55), 0 0 28px rgba(232, 179, 91, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: none;
}

.editor-toolbar__status,
.editor-toolbar__actions {
  display: flex;
  align-items: center;
}

.editor-toolbar__status {
  gap: 9px;
  white-space: nowrap;
}

.editor-toolbar__status small {
  color: #bdb2b8;
  font-size: 0.76rem;
}

.editor-toolbar__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8ed59f;
  box-shadow: 0 0 12px rgba(142, 213, 159, 0.8);
  animation: gentleTwinkle 1.8s ease-in-out infinite;
}

.editor-toolbar__actions {
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-button {
  padding: 8px 14px;
  border: 1px solid rgba(255, 222, 169, 0.2);
  border-radius: 10px;
  color: #e8ddcb;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.editor-button:hover {
  border-color: rgba(255, 222, 169, 0.52);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.editor-button--media {
  color: var(--gold-light);
}

.editor-button--danger {
  color: #e6b8ae;
}

.editor-button--save {
  border-color: #f1c779;
  color: #25180e;
  font-weight: 700;
  background: linear-gradient(135deg, #ffdfa0, #d9a64f);
  box-shadow: 0 0 18px rgba(240, 188, 91, 0.24);
}

.save-toast {
  position: fixed;
  left: 50%;
  top: 92px;
  z-index: 1500;
  max-width: min(88vw, 480px);
  padding: 11px 18px;
  border: 1px solid rgba(255, 218, 155, 0.3);
  border-radius: 999px;
  color: #fff2d7;
  text-align: center;
  background: rgba(10, 17, 36, 0.94);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
}

.editing-mode [data-edit-path][contenteditable="true"] {
  min-width: 1em;
  border-radius: 5px;
  outline: 1px dashed rgba(138, 222, 166, 0.68);
  outline-offset: 4px;
  cursor: text;
  transition: outline-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.editing-mode [data-edit-path][contenteditable="true"]:hover,
.editing-mode [data-edit-path][contenteditable="true"]:focus {
  outline: 2px solid #9cdeb0;
  background: rgba(125, 213, 154, 0.08);
  box-shadow: 0 0 0 5px rgba(105, 205, 139, 0.08);
}

.editing-mode [data-edit-photo][data-photo-active="true"] {
  outline: 3px dashed #9cdeb0;
  outline-offset: -5px;
  cursor: pointer;
  filter: brightness(0.9);
  transition: filter 160ms ease, outline-color 160ms ease;
}

.editing-mode [data-edit-photo][data-photo-active="true"]:hover {
  outline-color: var(--gold-light);
  filter: brightness(1.05);
}

.editing-mode .gallery-card,
.editing-mode .surprise-button {
  cursor: default;
}

.editing-mode .reveal {
  opacity: 1;
  transform: none;
}

.editing-mode .edit-trigger {
  opacity: 0.38;
  pointer-events: none;
}

.editing-mode .edit-trigger.is-editing {
  opacity: 1;
  color: #365f40;
  border-color: rgba(57, 126, 77, 0.72);
  background: rgba(174, 225, 183, 0.42);
}

.menu-toggle {
  display: none;
}

main,
.site-footer {
  position: relative;
  z-index: 2;
}

.section-anchor {
  scroll-margin-top: calc(var(--header-height) + 18px);
}

.hero {
  position: relative;
  min-height: 930px;
  padding: calc(var(--header-height) + 62px) 3.5vw 72px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 60%, rgba(2, 5, 15, 0.84) 98%),
    radial-gradient(ellipse at 50% 92%, rgba(190, 119, 55, 0.15), transparent 42%);
  pointer-events: none;
}

.hero__scene {
  position: relative;
  width: min(100%, 1420px);
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
  align-items: center;
  gap: 20px;
}

.hero__back-paper {
  position: absolute;
  z-index: -1;
  inset: 4% 1% 0;
  background:
    linear-gradient(112deg, rgba(38, 26, 23, 0.9), rgba(119, 86, 59, 0.75)),
    var(--paper-texture);
  clip-path: polygon(2% 8%, 15% 4%, 31% 7%, 45% 1%, 60% 6%, 73% 3%, 90% 8%, 98% 5%, 97% 91%, 83% 96%, 69% 92%, 52% 98%, 36% 93%, 21% 97%, 3% 91%);
  box-shadow: var(--shadow-deep);
  opacity: 0.62;
  transform: rotate(-1.4deg);
}

.paper-card {
  position: relative;
  isolation: isolate;
  color: var(--ink);
  background: var(--paper-texture);
  box-shadow: var(--shadow-paper);
  clip-path: polygon(1% 3%, 7% 1%, 13% 2%, 20% 0, 28% 2%, 35% 1%, 44% 2%, 51% 0, 59% 2%, 67% 1%, 75% 2%, 83% 1%, 91% 3%, 99% 1%, 98% 10%, 100% 20%, 98% 31%, 99% 42%, 97% 53%, 100% 65%, 98% 77%, 99% 89%, 96% 98%, 87% 97%, 79% 99%, 70% 97%, 61% 99%, 51% 97%, 42% 100%, 32% 97%, 23% 99%, 14% 97%, 3% 99%, 2% 88%, 0 78%, 2% 67%, 0 56%, 2% 45%, 0 33%, 2% 22%, 0 12%);
}

.paper-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(95deg, transparent 0 48%, rgba(94, 58, 31, 0.035) 49%, transparent 51%),
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.22), transparent 18%),
    radial-gradient(circle at 75% 74%, rgba(80, 42, 22, 0.06), transparent 26%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.hero-note {
  min-height: 548px;
  padding: 56px clamp(44px, 5vw, 76px) 54px;
  transform: rotate(-0.8deg);
}

.hero-note__content {
  position: relative;
  z-index: 3;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-note__date {
  margin: 0 0 15px;
  color: rgba(103, 72, 49, 0.72);
  font-family: Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
}

.hero-note__title {
  margin: 12px 0 22px;
  font-family: KaiTi, STKaiti, "Noto Serif SC", serif;
  font-size: clamp(4.7rem, 8.3vw, 8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.07em;
  text-shadow: 1px 2px rgba(255, 255, 255, 0.4);
}

.hero-note__ribbon {
  width: fit-content;
  min-width: 70%;
  margin: 0 auto 24px;
  padding: 7px 36px 8px;
  color: #533025;
  background: linear-gradient(90deg, transparent, rgba(174, 116, 107, 0.62) 9%, rgba(184, 126, 117, 0.64) 91%, transparent);
  clip-path: polygon(0 18%, 7% 5%, 15% 15%, 23% 2%, 34% 10%, 43% 1%, 53% 12%, 62% 3%, 72% 14%, 81% 5%, 91% 13%, 100% 0, 96% 47%, 100% 88%, 90% 78%, 80% 94%, 69% 82%, 58% 95%, 49% 83%, 38% 96%, 27% 82%, 16% 94%, 7% 80%, 0 92%, 4% 53%);
  font-size: clamp(1rem, 1.7vw, 1.34rem);
  letter-spacing: 0.13em;
}

.hero-note__blessing {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: 17px 24px;
  border: 1px dashed rgba(112, 74, 45, 0.25);
  border-radius: 3px;
  color: #614637;
  background: rgba(255, 248, 232, 0.15);
  font-size: clamp(0.92rem, 1.25vw, 1.07rem);
  line-height: 1.9;
}

.hero-note__blessing p {
  margin: 0;
}

.editable-tag {
  position: absolute;
  top: 34px;
  right: 48px;
  z-index: 4;
  padding: 5px 10px;
  border: 1px dashed rgba(92, 57, 33, 0.34);
  border-radius: 3px;
  color: rgba(82, 52, 34, 0.75);
  background: rgba(255, 244, 222, 0.28);
  font-family: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.editable-tag:hover {
  color: #54331f;
  border-color: rgba(92, 57, 33, 0.66);
  background: rgba(255, 244, 222, 0.58);
  transform: translateY(-1px);
}

.section-edit-tag {
  top: 114px;
  right: 12px;
  color: rgba(245, 215, 164, 0.82);
  border-color: rgba(242, 199, 125, 0.36);
  background: rgba(7, 14, 32, 0.58);
}

.section-edit-tag:hover {
  color: var(--gold-light);
  border-color: rgba(255, 217, 140, 0.72);
  background: rgba(232, 179, 91, 0.12);
}

.surprise-edit-tag {
  top: 27px;
  right: 72px;
}

.stamp {
  position: absolute;
  z-index: 2;
  top: 88px;
  right: 50px;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 82, 53, 0.42);
  border-radius: 50%;
  color: rgba(139, 82, 53, 0.6);
  font-family: Georgia, serif;
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.15;
  text-align: center;
  transform: rotate(12deg);
}

.stamp::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed currentColor;
  border-radius: inherit;
}

.paper-spark {
  position: absolute;
  color: #be7138;
  font-size: 26px;
}

.paper-spark--one {
  top: 130px;
  left: 32%;
}

.paper-spark--two {
  top: 106px;
  left: 41%;
}

.tape {
  position: absolute;
  z-index: 8;
  width: 110px;
  height: 34px;
  background:
    repeating-linear-gradient(90deg, transparent 0 4px, rgba(88, 50, 23, 0.05) 4px 5px),
    rgba(178, 137, 97, 0.58);
  box-shadow: 0 2px 5px rgba(66, 37, 20, 0.12);
  opacity: 0.78;
  clip-path: polygon(3% 8%, 17% 0, 31% 6%, 48% 1%, 65% 8%, 81% 2%, 98% 10%, 94% 92%, 79% 98%, 63% 90%, 46% 100%, 28% 92%, 9% 98%);
}

.tape--top {
  top: 4px;
  left: 17%;
  transform: rotate(-5deg);
}

.tape--corner {
  top: 5px;
  right: 9%;
  transform: rotate(10deg);
}

.tape--message {
  top: -10px;
  left: 44%;
  transform: rotate(-2deg);
}

.tape--modal {
  top: -8px;
  left: 42%;
  transform: rotate(3deg);
}

.dried-flower {
  position: absolute;
  z-index: 2;
  width: 95px;
  height: 210px;
  pointer-events: none;
}

.dried-flower::before,
.dried-flower::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 48%;
  width: 2px;
  height: 88%;
  border-radius: 50%;
  background: #756442;
  transform-origin: bottom;
  transform: rotate(-7deg);
}

.dried-flower::after {
  height: 70%;
  transform: rotate(13deg);
}

.dried-flower i {
  position: absolute;
  z-index: 2;
  width: 20px;
  height: 13px;
  border-radius: 70% 20% 70% 20%;
  background: #b58b54;
  box-shadow: inset 2px 1px rgba(255, 231, 173, 0.18);
  transform: rotate(25deg);
}

.dried-flower i:nth-child(1) { top: 15%; left: 37%; }
.dried-flower i:nth-child(2) { top: 29%; left: 60%; transform: rotate(-25deg); }
.dried-flower i:nth-child(3) { top: 42%; left: 24%; transform: rotate(42deg); }
.dried-flower i:nth-child(4) { top: 57%; left: 59%; transform: rotate(-38deg); }
.dried-flower i:nth-child(5) { top: 70%; left: 28%; }

.dried-flower--left {
  left: -5px;
  bottom: 40px;
  transform: rotate(-10deg);
}

.dried-flower--right {
  right: 1px;
  bottom: 14px;
  transform: rotate(13deg) scale(0.8);
}

.hero-photos {
  position: relative;
  min-height: 560px;
  margin-left: -38px;
}

.photo-stack {
  position: relative;
  width: 100%;
  height: 560px;
}

.polaroid {
  padding: 14px 14px 54px;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 30%, rgba(102, 67, 37, 0.05) 0 1px, transparent 1.5px),
    #e8d5b5;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.44), inset 0 0 0 1px rgba(99, 61, 33, 0.12);
}

.polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) sepia(0.08) contrast(0.98);
}

.hero-polaroid {
  position: absolute;
  width: min(90%, 460px);
  height: 400px;
  transition: transform 320ms ease, filter 320ms ease;
}

.hero-polaroid::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: -22px;
  left: 37%;
  width: 112px;
  height: 42px;
  background: rgba(173, 125, 88, 0.72);
  box-shadow: inset 0 0 0 1px rgba(90, 55, 30, 0.08);
  clip-path: polygon(4% 5%, 97% 1%, 94% 97%, 2% 91%);
  opacity: 0.82;
}

.hero-polaroid__image {
  height: calc(100% - 45px);
  overflow: hidden;
}

.hero-polaroid figcaption {
  display: flex;
  align-items: center;
  height: 48px;
  margin-top: 8px;
  padding: 0 5px;
  font-family: KaiTi, STKaiti, serif;
  font-size: 0.9rem;
}

.hero-polaroid:nth-child(1) {
  z-index: 4;
  top: 32px;
  left: 2%;
  transform: rotate(5deg);
}

.hero-polaroid:nth-child(2) {
  z-index: 2;
  top: 118px;
  right: -6%;
  transform: rotate(15deg) scale(0.82);
}

.hero-polaroid:nth-child(3) {
  z-index: 3;
  bottom: 0;
  left: 20%;
  transform: rotate(-7deg) scale(0.78);
}

.hero-polaroid:hover {
  z-index: 6;
  filter: brightness(1.04);
}

.hero-polaroid:nth-child(1):hover { transform: rotate(3deg) translateY(-7px); }
.hero-polaroid:nth-child(2):hover { transform: rotate(12deg) scale(0.86) translateY(-7px); }
.hero-polaroid:nth-child(3):hover { transform: rotate(-4deg) scale(0.82) translateY(-7px); }

.surprise-cta {
  position: relative;
  z-index: 8;
  margin-top: -10px;
  text-align: center;
}

.surprise-cta p {
  margin: 13px 0 0;
  color: #d9ba81;
  font-size: 0.84rem;
  letter-spacing: 0.13em;
}

.surprise-button {
  position: relative;
  min-width: min(88vw, 400px);
  padding: 17px 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 218, 155, 0.9);
  border-radius: 999px;
  color: #fff3d7;
  background:
    linear-gradient(100deg, rgba(217, 147, 62, 0.38), rgba(232, 179, 91, 0.22) 46%, rgba(128, 104, 194, 0.34)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 8px rgba(255, 204, 119, 0.72),
    0 0 34px rgba(229, 162, 67, 0.48),
    0 0 70px rgba(137, 108, 213, 0.26),
    inset 0 0 28px rgba(255, 255, 255, 0.12);
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  letter-spacing: 0.12em;
  cursor: pointer;
  backdrop-filter: blur(9px);
  animation: breathingGlow 2.8s ease-in-out infinite;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.surprise-button:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow:
    0 0 11px rgba(255, 219, 157, 0.94),
    0 0 44px rgba(229, 162, 67, 0.64),
    0 0 90px rgba(137, 108, 213, 0.36),
    inset 0 0 34px rgba(255, 255, 255, 0.17);
}

.surprise-button__icon {
  margin-right: 13px;
  color: var(--gold-light);
  font-size: 1.2em;
}

.surprise-button__star {
  position: absolute;
  top: 11px;
  right: 28px;
  color: var(--gold-light);
  font-size: 18px;
  animation: gentleTwinkle 1.8s ease-in-out infinite;
}

.surprise-button__glint {
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -25%;
  width: 18%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: rotate(18deg);
  animation: buttonGlint 4s 1.4s ease-in-out infinite;
}

.content-section {
  position: relative;
  width: min(calc(100% - 40px), var(--content-width));
  margin: 0 auto;
  padding: 104px 0 76px;
}

.section-heading {
  width: min(100%, 720px);
  margin: 0 auto 48px;
  text-align: center;
}

.section-heading__eyebrow {
  margin: 0 0 8px;
}

.section-heading h2 {
  margin: 0;
  font-family: KaiTi, STKaiti, "Noto Serif SC", serif;
  font-size: clamp(2.3rem, 5vw, 4.1rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-shadow: 0 0 30px rgba(241, 194, 109, 0.13);
}

.section-heading__copy {
  margin: 14px auto 0;
  color: var(--muted-light);
  font-size: 0.96rem;
  letter-spacing: 0.05em;
}

.blessing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  align-items: center;
  gap: 50px;
}

.blessing-letter {
  min-height: 390px;
  padding: 64px clamp(38px, 6vw, 82px);
  transform: rotate(-0.7deg);
}

.blessing-letter p {
  margin: 0 0 18px;
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  line-height: 2;
}

.blessing-letter__signature {
  margin-top: 32px !important;
  color: var(--ink-soft);
  text-align: right;
}

.wax-seal {
  position: absolute;
  right: 9%;
  bottom: 12%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 3px double rgba(255, 218, 167, 0.32);
  border-radius: 48% 53% 49% 47%;
  color: #e3bd90;
  background: #945844;
  box-shadow: 0 4px 10px rgba(72, 32, 20, 0.35);
  transform: rotate(-12deg);
}

.blessing-quote {
  position: relative;
  padding: 40px 32px 38px 50px;
  border-left: 1px solid rgba(235, 187, 101, 0.36);
  color: #e4d5c5;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 2;
  letter-spacing: 0.05em;
}

.blessing-quote > span {
  position: absolute;
  top: -18px;
  left: 24px;
  color: rgba(231, 179, 87, 0.44);
  font-family: Georgia, serif;
  font-size: 7rem;
  line-height: 1;
}

.blessing-quote p {
  position: relative;
  margin: 0;
}

.gallery-shell {
  padding: 54px 66px 64px;
  overflow: visible;
}

.gallery-viewport {
  overflow: hidden;
  padding: 18px 4px 30px;
}

.gallery-track {
  display: flex;
  gap: 24px;
  transition: transform 650ms cubic-bezier(0.22, 0.75, 0.22, 1);
  will-change: transform;
}

.gallery-card {
  flex: 0 0 calc((100% - 48px) / 3);
  margin: 0;
  padding: 11px 11px 44px;
  cursor: zoom-in;
  transform: rotate(var(--card-rotation, -1deg));
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.gallery-card:hover {
  z-index: 2;
  transform: rotate(0) translateY(-7px) scale(1.025);
  box-shadow: 0 26px 42px rgba(56, 33, 22, 0.28);
}

.gallery-card__image {
  height: 245px;
  overflow: hidden;
  background: #1a2238;
}

.gallery-card figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-family: KaiTi, STKaiti, serif;
  font-size: 0.9rem;
  line-height: 1.4;
}

.gallery-arrow {
  position: absolute;
  z-index: 5;
  top: 48%;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(94, 58, 34, 0.26);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(247, 232, 205, 0.74);
  box-shadow: 0 7px 18px rgba(57, 32, 17, 0.18);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 180ms ease, transform 180ms ease;
}

.gallery-arrow:hover {
  background: #f4e2c4;
  transform: translateY(-50%) scale(1.08);
}

.gallery-arrow--prev { left: 13px; }
.gallery-arrow--next { right: 13px; }

.gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.gallery-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(91, 57, 35, 0.3);
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease;
}

.gallery-dot.active {
  width: 25px;
  border-radius: 999px;
  background: #8f633e;
}

.letter-scene {
  position: relative;
  width: min(100%, 920px);
  min-height: 610px;
  margin: 0 auto;
  padding-top: 34px;
}

.envelope {
  position: absolute;
  z-index: -1;
  right: -6%;
  bottom: 3%;
  width: 58%;
  height: 270px;
  background: linear-gradient(145deg, #a98b68, #d0b48e);
  clip-path: polygon(0 12%, 50% 54%, 100% 10%, 96% 94%, 4% 98%);
  box-shadow: var(--shadow-deep);
  transform: rotate(5deg);
  opacity: 0.78;
}

.message-paper {
  min-height: 510px;
  padding: 72px clamp(48px, 9vw, 115px) 70px;
  transform: rotate(0.6deg);
}

.message-paper::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 42px 58px;
  background: repeating-linear-gradient(180deg, transparent 0 37px, rgba(112, 81, 55, 0.14) 38px, transparent 39px);
}

.message-paper__body {
  position: relative;
  z-index: 2;
  min-height: 300px;
  white-space: pre-wrap;
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
  line-height: 2.05;
}

.message-paper__body p {
  margin: 0 0 18px;
}

.typing-caret::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.15em;
  margin-left: 4px;
  vertical-align: -0.15em;
  background: var(--ink);
  animation: caretBlink 700ms steps(1) infinite;
}

.message-paper__signature {
  position: relative;
  z-index: 2;
  margin: 30px 0 0;
  color: var(--ink-soft);
  text-align: right;
}

.letter-stamp {
  position: absolute;
  top: 50px;
  right: 52px;
  width: 58px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 3px double rgba(126, 80, 50, 0.42);
  color: rgba(126, 80, 50, 0.55);
  font-family: Georgia, serif;
  font-size: 0.7rem;
  line-height: 1.2;
  text-align: center;
  transform: rotate(8deg);
}

.dried-flower--message {
  z-index: 5;
  right: -18px;
  bottom: 20px;
  transform: rotate(24deg) scale(1.2);
}

.timeline-section {
  padding-bottom: 120px;
}

.timeline-shell {
  position: relative;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(var(--timeline-count, 8), minmax(250px, 1fr));
  gap: 0;
  padding: 55px 42px 42px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.timeline::-webkit-scrollbar {
  display: none;
}

.timeline-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(94, 58, 34, 0.28);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(247, 232, 205, 0.94);
  box-shadow: 0 9px 24px rgba(57, 32, 17, 0.24), 0 0 0 5px rgba(234, 211, 171, 0.2);
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.timeline-arrow:hover:not(:disabled) {
  background: #fff0d3;
  transform: translateY(-50%) scale(1.08);
}

.timeline-arrow:disabled {
  opacity: 0.28;
  cursor: default;
}

.timeline-arrow--prev { left: 17px; }
.timeline-arrow--next { right: 17px; }

.timeline::after {
  content: "";
  position: absolute;
  top: 280px;
  left: 42px;
  width: calc(var(--timeline-count, 8) * 250px - 84px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 65, 40, 0.48) 9% 91%, transparent);
}

.timeline-item {
  position: relative;
  z-index: 2;
  min-height: 370px;
  padding: 0 18px;
  text-align: center;
  scroll-snap-align: start;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.timeline.in-view .timeline-item {
  opacity: 1;
  transform: translateY(0);
}

.timeline.in-view .timeline-item:nth-child(2) { transition-delay: 120ms; }
.timeline.in-view .timeline-item:nth-child(3) { transition-delay: 240ms; }
.timeline.in-view .timeline-item:nth-child(4) { transition-delay: 360ms; }
.timeline.in-view .timeline-item:nth-child(5) { transition-delay: 480ms; }
.timeline.in-view .timeline-item:nth-child(6) { transition-delay: 600ms; }
.timeline.in-view .timeline-item:nth-child(7) { transition-delay: 720ms; }
.timeline.in-view .timeline-item:nth-child(8) { transition-delay: 840ms; }

.timeline-item__date {
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 0.87rem;
  letter-spacing: 0.09em;
}

.timeline-item h3 {
  margin: 7px 0 0;
  font-family: KaiTi, STKaiti, serif;
  font-size: 1.28rem;
}

.timeline-item__photo {
  position: relative;
  width: 190px;
  height: 125px;
  margin: 14px auto 42px;
  padding: 7px 7px 20px;
  border: 1px solid rgba(98, 62, 37, 0.2);
  background: #ead4ad;
  box-shadow: 0 10px 20px rgba(71, 42, 23, 0.2);
  transform: rotate(-1deg);
}

.editing-mode .timeline-item__photo::after {
  content: "点击换照片";
  position: absolute;
  left: 50%;
  bottom: 25px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff7e7;
  font-size: 0.68rem;
  white-space: nowrap;
  background: rgba(42, 28, 19, 0.7);
  transform: translateX(-50%);
  pointer-events: none;
}

.timeline-item:nth-child(even) .timeline-item__photo {
  transform: rotate(1.2deg);
}

.timeline-item__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-item__node {
  position: absolute;
  top: 225px;
  left: 50%;
  width: 15px;
  height: 15px;
  border: 3px solid #ddc39d;
  border-radius: 50%;
  background: #86603f;
  box-shadow: 0 0 0 1px rgba(96, 59, 34, 0.45);
  transform: translate(-50%, -50%);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.timeline-item__description {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  margin: 0;
  padding: 12px 10px;
  border: 1px dashed rgba(103, 67, 42, 0.24);
  border-radius: 4px;
  color: #6f503b;
  background: rgba(255, 246, 227, 0.22);
  font-size: 0.86rem;
  line-height: 1.55;
  opacity: 0.72;
  transform: translateY(4px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.timeline-item:hover .timeline-item__node {
  background: var(--gold);
  box-shadow: 0 0 18px rgba(213, 142, 55, 0.7);
  transform: translate(-50%, -50%) scale(1.22);
}

.timeline-item:hover .timeline-item__description {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 32px 20px 44px;
  color: rgba(229, 211, 194, 0.62);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.site-footer span {
  color: var(--gold);
}

.music-panel {
  position: fixed;
  z-index: 90;
  top: 82px;
  right: 24px;
  width: min(330px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(255, 217, 153, 0.18);
  border-radius: 14px;
  background: rgba(7, 13, 31, 0.88);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 200ms ease, visibility 200ms ease, transform 200ms ease;
}

.music-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.music-panel__head {
  display: grid;
  grid-template-columns: 40px 1fr 30px;
  align-items: center;
  gap: 10px;
}

.music-panel__head strong,
.music-panel__head small {
  display: block;
}

.music-panel__head strong {
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-panel__head small {
  color: #b9acb6;
  font-size: 0.72rem;
}

.music-panel__head button,
.music-panel__controls button {
  border: 0;
  color: #f4d391;
  background: transparent;
  cursor: pointer;
}

.music-disc {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 220, 158, 0.38);
  border-radius: 50%;
  background: radial-gradient(circle, #e1b66e 0 3px, #17192a 4px 11px, #b7854a 12px 13px, #101423 14px);
}

.music-disc.playing {
  animation: discSpin 4s linear infinite;
}

.music-panel__controls {
  display: grid;
  grid-template-columns: 30px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.music-panel input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

#music-time {
  color: #bdb2b9;
  font-family: Arial, sans-serif;
  font-size: 0.7rem;
  text-align: right;
}

.volume-control {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  color: #bdb2b9;
  font-size: 0.7rem;
}

.modal-backdrop,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 4, 15, 0.75);
  backdrop-filter: blur(9px);
  animation: modalFade 300ms ease;
}

.surprise-card {
  width: min(720px, 94vw);
  max-height: 90vh;
  padding: 56px clamp(34px, 6vw, 70px) 48px;
  overflow-y: auto;
  text-align: center;
  animation: cardArrival 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.surprise-card h2 {
  margin: 4px 0 20px;
  font-family: KaiTi, STKaiti, serif;
  font-size: clamp(2.6rem, 7vw, 4.7rem);
  font-weight: 600;
  line-height: 1.2;
}

.surprise-card__gift-title {
  margin: -8px 0 16px;
  color: #6d4731;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.surprise-card__photo {
  position: relative;
  width: min(100%, 430px);
  height: 300px;
  margin: 0 auto 24px;
  padding: 11px 11px 40px;
  transform: rotate(-2deg);
}

.editing-mode .surprise-card__photo::after {
  content: "点击礼物照片即可替换";
  position: absolute;
  left: 50%;
  bottom: 44px;
  z-index: 4;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff7e7;
  font-size: 0.75rem;
  background: rgba(37, 25, 18, 0.72);
  transform: translateX(-50%);
  pointer-events: none;
}

.surprise-card__gift-caption {
  margin: -10px auto 18px;
  color: #7b5944;
  font-size: 0.9rem;
}

.surprise-card__message p {
  margin: 0 0 10px;
  line-height: 1.85;
}

.surprise-card__spark {
  position: absolute;
  top: 28px;
  left: 8%;
  color: #b8783d;
  font-size: 28px;
}

.modal-close,
.lightbox__close {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.modal-close {
  z-index: 10;
  top: 28px;
  right: 34px;
  color: var(--ink-soft);
  font-size: 1.7rem;
}

.paper-button {
  margin-top: 24px;
  padding: 10px 27px;
  border: 1px solid rgba(91, 55, 32, 0.4);
  border-radius: 3px;
  color: var(--ink);
  background: rgba(255, 244, 220, 0.26);
  box-shadow: 3px 3px rgba(105, 65, 38, 0.1);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.paper-button:hover {
  background: rgba(255, 244, 220, 0.6);
  transform: translateY(-2px);
}

.modal-particles span {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--particle-color, #edc67d);
  font-size: var(--particle-size, 13px);
  opacity: 0;
  animation: particleFloat var(--particle-duration, 3s) var(--particle-delay, 0s) ease-out infinite;
}

.lightbox {
  z-index: 600;
  background: rgba(1, 3, 10, 0.9);
}

.lightbox figure {
  width: min(1100px, 92vw);
  margin: 0;
  text-align: center;
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border: 9px solid #ead8ba;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.lightbox figcaption {
  margin-top: 14px;
  color: #e6d7c8;
}

.lightbox__close {
  top: 20px;
  right: 28px;
  color: #f8ead6;
  font-size: 2.2rem;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--reveal-ms) ease, transform var(--reveal-ms) cubic-bezier(0.2, 0.75, 0.25, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.soft-mode {
  --night-950: #0a0d20;
  --night-900: #101a38;
  --night-800: #17264a;
  --gold-glow: rgba(255, 198, 105, 0.55);
}

.soft-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(99, 78, 155, 0.05);
  pointer-events: none;
}

@keyframes openingStars {
  to { opacity: 0.75; }
}

@keyframes openingSpark {
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slowDrift {
  to { transform: translate3d(50px, 30px, 0); }
}

@keyframes starBurst {
  0% { opacity: 0; transform: scale(0.3); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: scale(2.2); }
}

@keyframes gentleTwinkle {
  0%, 100% { opacity: 0.55; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1.12); }
}

@keyframes breathingGlow {
  0%, 100% { filter: brightness(0.96); }
  50% { filter: brightness(1.12); }
}

@keyframes buttonGlint {
  0%, 55% { left: -25%; opacity: 0; }
  63% { opacity: 0.9; }
  80%, 100% { left: 120%; opacity: 0; }
}

@keyframes caretBlink {
  50% { opacity: 0; }
}

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

@keyframes modalFade {
  from { opacity: 0; }
}

@keyframes cardArrival {
  from { opacity: 0; transform: translateY(30px) scale(0.94) rotate(-1deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.6); }
  22% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(var(--particle-x), var(--particle-y)) rotate(180deg) scale(1); }
}

@media (max-width: 1050px) {
  .site-header {
    grid-template-columns: 58px 1fr 104px;
    padding-inline: 2vw;
  }

  .site-nav {
    gap: 23px;
  }

  .site-nav a {
    font-size: 0.88rem;
  }

  .hero {
    min-height: 870px;
    padding-inline: 2vw;
  }

  .hero__scene {
    grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  }

  .hero-note {
    padding-inline: 40px;
  }

  .hero-note__title {
    font-size: clamp(4.4rem, 9vw, 6.2rem);
  }

  .hero-photos {
    margin-left: -55px;
  }

  .gallery-card {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 780px) {
  :root {
    --header-height: 64px;
  }

  .site-header {
    grid-template-columns: 48px 1fr 96px;
    padding: 0 14px;
  }

  .header-actions {
    gap: 4px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .editor-toolbar {
    display: grid;
    gap: 9px;
    padding: 11px;
    border-radius: 15px;
  }

  .editor-toolbar__status {
    justify-content: center;
  }

  .editor-toolbar__actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
  }

  .editor-button {
    padding: 8px 5px;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .menu-toggle {
    position: absolute;
    left: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
  }

  .menu-toggle span {
    width: 22px;
    height: 1px;
    background: #f0ddbd;
    transition: transform 200ms ease, opacity 200ms ease;
  }

  .menu-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 62px;
    left: 12px;
    right: 12px;
    display: grid;
    gap: 0;
    padding: 12px 18px;
    border: 1px solid rgba(244, 207, 143, 0.13);
    border-radius: 10px;
    background: rgba(5, 10, 26, 0.96);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
  }

  .site-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 10px 4px;
  }

  .site-nav a::after {
    right: auto;
    bottom: 5px;
  }

  .hero {
    min-height: 1220px;
    padding: calc(var(--header-height) + 48px) 14px 74px;
  }

  .hero__scene {
    min-height: auto;
    display: block;
  }

  .hero__back-paper {
    inset: 0 -18px 2%;
  }

  .hero-note {
    min-height: 525px;
    padding: 62px 28px 48px;
  }

  .hero-note__title {
    margin-top: 30px;
    font-size: clamp(4.1rem, 21vw, 6rem);
    letter-spacing: 0.02em;
  }

  .hero-note__ribbon {
    width: 100%;
    padding-inline: 20px;
  }

  .hero-note__blessing {
    padding-inline: 14px;
    font-size: 0.86rem;
  }

  .editable-tag {
    top: 24px;
    right: 28px;
  }

  .stamp {
    top: 70px;
    right: 25px;
    transform: scale(0.78) rotate(12deg);
  }

  .dried-flower--left {
    opacity: 0.7;
    transform: scale(0.75) rotate(-10deg);
  }

  .hero-photos {
    min-height: 500px;
    margin: -28px auto 0;
  }

  .photo-stack {
    height: 500px;
  }

  .hero-polaroid {
    width: min(84vw, 390px);
    height: 335px;
  }

  .hero-polaroid:nth-child(1) { left: 4%; }
  .hero-polaroid:nth-child(2) { right: -4%; top: 120px; }
  .hero-polaroid:nth-child(3) { left: 8%; }

  .surprise-cta {
    margin-top: -3px;
  }

  .surprise-button {
    min-width: min(92vw, 360px);
    padding-inline: 28px;
  }

  .content-section {
    width: min(calc(100% - 28px), var(--content-width));
    padding: 82px 0 58px;
  }

  .section-edit-tag {
    top: 88px;
    right: 2px;
  }

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

  .blessing-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .blessing-letter {
    min-height: 430px;
    padding: 58px 30px;
  }

  .blessing-quote {
    padding: 35px 24px 28px 42px;
  }

  .gallery-shell {
    padding: 40px 45px 58px;
  }

  .gallery-card {
    flex-basis: 100%;
  }

  .gallery-card__image {
    height: min(62vw, 320px);
  }

  .gallery-arrow--prev { left: 4px; }
  .gallery-arrow--next { right: 4px; }

  .letter-scene {
    min-height: 590px;
  }

  .message-paper {
    min-height: 540px;
    padding: 70px 34px 60px;
  }

  .message-paper::after {
    inset-inline: 28px;
  }

  .letter-stamp {
    top: 42px;
    right: 30px;
    transform: scale(0.8) rotate(8deg);
  }

  .dried-flower--message {
    right: -35px;
    transform: scale(0.9) rotate(24deg);
  }

  .timeline {
    display: block;
    padding: 50px 34px;
    min-width: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .timeline-arrow {
    display: none;
  }

  .timeline::after {
    top: 7%;
    bottom: 7%;
    left: 52px;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, transparent, rgba(100, 65, 40, 0.48) 9% 91%, transparent);
  }

  .timeline-item {
    min-height: 320px;
    padding: 0 0 22px 52px;
    text-align: left;
    scroll-snap-align: none;
  }

  .timeline-item__node {
    top: 22px;
    left: 18px;
  }

  .timeline-item__photo,
  .timeline-item:nth-child(even) .timeline-item__photo {
    width: min(100%, 230px);
    height: 135px;
    margin: 14px 0 18px;
    transform: rotate(-0.6deg);
  }

  .timeline-item__description {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 15px;
  }

  .site-footer {
    padding-inline: 28px;
  }

  .music-panel {
    top: 72px;
    right: 12px;
  }

  .surprise-card {
    padding: 50px 27px 40px;
  }

  .modal-close {
    top: 20px;
    right: 24px;
  }
}

@media (max-width: 420px) {
  .editor-toolbar__status small {
    display: none;
  }

  .editor-toolbar__actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 1180px;
  }

  .hero-note {
    min-height: 500px;
  }

  .hero-note__title {
    font-size: 4.1rem;
  }

  .hero-note__date,
  .paper-spark,
  .dried-flower--right {
    display: none;
  }

  .hero-polaroid {
    height: 300px;
  }

  .surprise-cta p {
    letter-spacing: 0.04em;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
