:root {
  --red: #e83f4f;
  --deep-red: #b92038;
  --pink: #ff9ca7;
  --blush: #ffd9d7;
  --cream: #fff5df;
  --paper: #fffaf0;
  --yellow: #ffd45f;
  --mint: #79b89e;
  --ink: #4d2630;
  --muted: #9c6870;
  --shadow: 0 20px 50px rgba(128, 34, 51, .14);
  --display: "FZKai-Z03", "STKaiti", "KaiTi", serif;
  --body: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #f4b5ad; }
body {
  margin: 0;
  color: var(--ink);
  background: #f4b5ad;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

.desktop-backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.55) 0 6px, transparent 7px),
    radial-gradient(circle at 88% 78%, rgba(232,63,79,.35) 0 8px, transparent 9px),
    repeating-linear-gradient(135deg, #ffc9c2 0 24px, #ffbbb5 24px 48px);
}

.invitation {
  position: relative;
  width: min(100%, 480px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 0 80px rgba(92, 23, 35, .2);
}

.hero {
  position: relative;
  min-height: 100svh;
  background: var(--cream);
  isolation: isolate;
}

.hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: -3;
}

.hero__wash {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, rgba(255,248,227,.05) 0%, rgba(255,248,227,.13) 55%, rgba(116,24,40,.12) 100%);
}

.hero__copy {
  position: absolute;
  top: clamp(17%, 21svh, 25%);
  left: 8%;
  right: 8%;
  text-align: center;
  animation: float-in 1.1s cubic-bezier(.2,.8,.2,1) both;
}

.eyebrow, .section-number, .letter-card__mini, .ending__tiny {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-block;
  padding: 7px 14px 6px;
  color: white;
  background: var(--red);
  border-radius: 999px;
  transform: rotate(-2deg);
  box-shadow: 3px 4px 0 var(--yellow);
}

.mini-hearts { margin: 16px 0 8px; color: var(--red); }
.mini-hearts span { display: inline-block; margin: 0 5px; font-size: 11px; }
.mini-hearts span:nth-child(2) { font-size: 18px; transform: translateY(2px); }

.hero h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  color: var(--deep-red);
  font-family: var(--display);
  font-size: clamp(38px, 11vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: .02em;
  text-shadow: 0 2px 0 rgba(255,255,255,.65);
}

.hero h1 b {
  color: var(--pink);
  font-family: Georgia, serif;
  font-size: .52em;
  font-weight: 400;
}

.hero__english {
  margin: 10px 0 0;
  color: var(--muted);
  font: 700 10px/1 Georgia, serif;
  letter-spacing: .35em;
}

.hero__confetti span {
  position: absolute;
  top: -30px;
  left: var(--x);
  width: 8px;
  height: 14px;
  z-index: 2;
  border-radius: 2px;
  background: var(--c);
  opacity: .85;
  transform: rotate(var(--r));
  animation: confetti-fall var(--d) linear var(--delay) infinite;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  gap: 8px;
  color: #fff;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .08em;
  text-shadow: 0 1px 5px rgba(78,15,26,.55);
  transform: translateX(-50%);
}
.scroll-cue i { width: 1px; height: 30px; background: linear-gradient(#fff, transparent); animation: pulse 1.6s ease-in-out infinite; }

.section-pad { position: relative; padding: 84px 26px; }
.section-number { color: var(--red); }
.section-pad > h2 {
  margin: 14px 0 34px;
  font-family: var(--display);
  font-size: clamp(34px, 10vw, 48px);
  line-height: 1.18;
  letter-spacing: -.02em;
}

.notice {
  min-height: 100svh;
  background:
    radial-gradient(circle at 10% 12%, rgba(255,156,167,.23) 0 70px, transparent 71px),
    radial-gradient(circle at 90% 78%, rgba(255,212,95,.27) 0 90px, transparent 91px),
    var(--cream);
}

.section-sticker {
  position: absolute;
  top: 54px;
  right: 18px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--deep-red);
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  border: 2px solid var(--deep-red);
  border-radius: 43% 57% 51% 49% / 55% 41% 59% 45%;
  transform: rotate(8deg);
}
.sticker-yellow { background: var(--yellow); box-shadow: 4px 5px 0 var(--red); }

.date-card {
  position: relative;
  padding: 42px 24px 28px;
  text-align: center;
  background: rgba(255,250,240,.92);
  border: 2px solid var(--deep-red);
  border-radius: 26px 26px 48px 26px;
  box-shadow: var(--shadow), 8px 9px 0 var(--blush);
  transform: rotate(-1deg);
}
.candy-border::before {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: 2px dashed rgba(232,63,79,.35);
  border-radius: 18px 18px 40px 18px;
}
.date-card__pin {
  position: absolute;
  top: -24px;
  left: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--red);
  border: 4px solid var(--cream);
  border-radius: 50%;
  transform: translateX(-50%) rotate(8deg);
}
.date-card p { position: relative; margin: 0; }
.date-card__date { color: var(--deep-red); font-family: var(--display); font-size: 25px; font-weight: 800; }
.date-card__time { margin-top: 8px !important; color: var(--muted); font-size: 13px; }
.dotted-line { width: 70%; margin: 24px auto; border-top: 2px dotted var(--pink); }
.date-card__venue { font-family: var(--display); font-size: 23px; font-weight: 800; }
.date-card__address { margin-top: 8px !important; color: var(--muted); font-size: 13px; line-height: 1.6; }
.map-button {
  position: relative;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
  padding: 11px 18px;
  color: white;
  background: var(--red);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 3px 4px 0 var(--yellow);
}
.map-button.is-disabled { pointer-events: none; opacity: .5; }
.doodle-row { display: flex; justify-content: center; gap: 24px; align-items: center; margin-top: 48px; color: var(--red); }
.doodle-row .bow { color: var(--pink); font-size: 32px; }

.letter {
  background:
    linear-gradient(rgba(232,63,79,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,63,79,.06) 1px, transparent 1px),
    #ffd7d3;
  background-size: 22px 22px;
}
.letter-card {
  position: relative;
  padding: 48px 28px 38px;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 22px 50px rgba(100,32,45,.18);
  transform: rotate(1.2deg);
}
.letter-card__mini { color: var(--muted); text-align: center; }
.letter-card h2 { margin: 18px 0; color: var(--deep-red); font-family: var(--display); font-size: 40px; text-align: center; }
.letter-card > p:not(.letter-card__mini) { margin: 0; font-size: 16px; line-height: 2.05; text-align: justify; }
.tape { position: absolute; top: -13px; width: 76px; height: 26px; background: rgba(255,212,95,.72); }
.tape-left { left: -17px; transform: rotate(-13deg); }
.tape-right { right: -17px; transform: rotate(12deg); }
.signature { display: flex; justify-content: flex-end; gap: 9px; align-items: center; margin-top: 28px; font-family: var(--display); font-size: 18px; font-weight: 800; }
.signature i { color: var(--red); font-style: normal; font-size: 12px; }
.candy-doodle { display: flex; justify-content: center; align-items: center; margin: 46px 0 -20px; color: var(--red); font-size: 30px; }
.candy-doodle b { display: grid; place-items: center; width: 64px; height: 64px; color: white; background: var(--red); border-radius: 50%; font-family: var(--display); font-size: 28px; }

.gallery { min-height: 90svh; background: var(--paper); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery-card {
  position: relative;
  margin: 0;
  padding: 8px 8px 26px;
  background: white;
  box-shadow: 0 12px 24px rgba(98,40,49,.13);
}
.gallery-card:nth-child(odd) { transform: rotate(-2deg); }
.gallery-card:nth-child(even) { transform: rotate(2deg) translateY(18px); }
.gallery-card img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; background: var(--blush); }
.gallery-card figcaption { position: absolute; bottom: 7px; left: 0; right: 0; color: var(--muted); font: 700 9px/1 Georgia, serif; letter-spacing: .16em; text-align: center; }
.gallery-empty { padding: 54px 20px; text-align: center; border: 2px dashed var(--pink); border-radius: 50% 46% 48% 52%; background: rgba(255,217,215,.28); }
.gallery-empty__camera { display: inline-grid; place-items: center; width: 58px; height: 48px; color: white; background: var(--red); border-radius: 12px; font-size: 27px; transform: rotate(-6deg); }
.gallery-empty p { margin: 18px 0 6px; font-family: var(--display); font-size: 23px; font-weight: 800; }
.gallery-empty small { color: var(--muted); }

.ending { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; color: white; background: var(--red); text-align: center; }
.ending::before, .ending::after { content: ""; position: absolute; width: 160px; height: 160px; border: 24px solid rgba(255,212,95,.18); border-radius: 50%; }
.ending::before { top: -70px; left: -70px; }
.ending::after { right: -80px; bottom: 130px; }
.ending__content { position: relative; z-index: 2; padding: 70px 26px 150px; }
.ending__tiny { color: var(--yellow); }
.ending__heart { margin: 28px auto 18px; font-size: 54px; animation: heartbeat 1.8s ease-in-out infinite; }
.ending h2 { margin: 0; font-family: var(--display); font-size: clamp(56px, 16vw, 74px); line-height: 1.08; text-shadow: 5px 6px 0 var(--deep-red); }
.ending__content > p:not(.ending__tiny) { margin: 24px 0 0; font-family: var(--display); font-size: 18px; }
.ending__names { display: inline-flex; gap: 12px; align-items: center; margin-top: 48px; padding: 10px 18px; color: var(--deep-red); background: var(--yellow); border-radius: 999px; font-family: var(--display); font-weight: 800; transform: rotate(-2deg); }
.ending__names i { color: var(--red); font-style: normal; }
.ending__waves { position: absolute; left: -5%; right: -5%; bottom: -45px; height: 165px; }
.ending__waves i { position: absolute; left: 0; width: 110%; height: 110px; border-radius: 50% 50% 0 0; }
.ending__waves i:nth-child(1) { bottom: 55px; background: var(--pink); transform: rotate(-3deg); }
.ending__waves i:nth-child(2) { bottom: 20px; background: var(--yellow); transform: rotate(3deg); }
.ending__waves i:nth-child(3) { bottom: -22px; background: var(--cream); transform: rotate(-2deg); }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes float-in { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { opacity: .3; transform: scaleY(.7); } 50% { opacity: 1; transform: scaleY(1); } }
@keyframes heartbeat { 0%,100% { transform: scale(1) rotate(-3deg); } 45% { transform: scale(1.12) rotate(3deg); } }
@keyframes confetti-fall { 0% { transform: translate3d(0,-20px,0) rotate(0); } 100% { transform: translate3d(var(--drift),110svh,0) rotate(540deg); } }

@media (min-width: 481px) {
  .invitation { margin-top: 28px; margin-bottom: 28px; border-radius: 28px; }
  .hero { min-height: 820px; }
  .ending { min-height: 760px; }
}

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