@font-face {
  font-family: "Xiaolai Wedding";
  src: url("/assets/fonts/xiaolai-wedding.woff2?v=20260803") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

: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;
  --handwriting: "Xiaolai Wedding", "HanziPen SC", "STXingkai", "FZShuTi", "KaiTi", cursive;
  --body: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}

* { box-sizing: border-box; }
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  scroll-behavior: smooth;
  overscroll-behavior: none;
  background: #f4b5ad;
}
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: #f4b5ad;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.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 {
  --page-height: 100svh;
  position: relative;
  width: min(100%, 480px);
  height: var(--page-height);
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--cream);
  box-shadow: 0 0 80px rgba(92, 23, 35, .2);
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pinch-zoom;
}
.invitation::-webkit-scrollbar { display: none; }

.invite-page {
  width: 100%;
  height: var(--page-height);
  min-height: var(--page-height) !important;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

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

.page-dots {
  position: fixed;
  top: 50%;
  right: max(10px, calc((100vw - 480px) / 2 + 10px));
  z-index: 36;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 10px 9px;
  background: rgba(255,250,240,.72);
  border: 1px solid rgba(185,32,56,.16);
  border-radius: 999px;
  box-shadow: 0 7px 20px rgba(91,25,38,.12);
  opacity: .5;
  transform: translateY(-50%);
  backdrop-filter: blur(7px);
  transition: opacity 1.5s linear;
}
.page-dots.is-awake, .page-dots:hover, .page-dots:focus-within { opacity: 1; transition-duration: .08s; }
.page-dot {
  position: relative;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.page-dot::after { content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; background: rgba(185,32,56,.28); border-radius: 50%; transform: translate(-50%, -50%); transition: opacity .18s ease, transform .18s ease; }
.page-heart-goo {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  color: var(--red);
  filter: drop-shadow(0 1px 1px rgba(255,250,240,.98)) drop-shadow(0 3px 4px rgba(185,32,56,.18));
  pointer-events: none;
}
.page-dot:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

.music-control {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, calc((100vw - 480px) / 2 + 14px));
  z-index: 40;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--deep-red);
  background: transparent;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 5px 8px rgba(91, 25, 38, .18));
}
.music-control[hidden] { display: none; }
.music-control__disc {
  position: relative;
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--yellow);
  background: var(--red);
  border: 4px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--deep-red), 3px 3px 0 var(--yellow);
}
.music-control__disc::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(255,255,255,.58);
  border-radius: 50%;
}
.music-control__disc::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--cream);
  border: 3px solid var(--yellow);
  border-radius: 50%;
}
.music-control__note {
  position: absolute;
  top: 5px;
  right: 7px;
  z-index: 2;
  font: 900 16px/1 Georgia, serif;
  transform: rotate(9deg);
}
.music-control__disc i {
  position: absolute;
  left: 6px;
  width: 4px;
  height: 4px;
  background: var(--pink);
  border-radius: 50%;
  opacity: .35;
}
.music-control__disc i:nth-of-type(1) { top: 15px; }
.music-control__disc i:nth-of-type(2) { top: 22px; left: 4px; }
.music-control.is-playing .music-control__disc { animation: music-spin 4.8s linear infinite; }
.music-control.is-playing .music-control__disc i { opacity: 1; animation: music-pulse 1s ease-in-out infinite alternate; }
.music-control.is-error .music-control__disc { background: var(--muted); }
.music-control:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; border-radius: 50%; }

.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 h1 > span {
  font-family: var(--handwriting);
  font-weight: 400;
  letter-spacing: .06em;
  font-synthesis: none;
}

.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: clamp(46px, 7.5svh, 76px) 26px clamp(34px, 5.5svh, 56px);
}
.section-number { color: var(--red); }
.section-pad > h2 {
  margin: clamp(9px, 1.8svh, 14px) 0 clamp(18px, 3.3svh, 32px);
  font-family: var(--display);
  font-size: clamp(30px, 8.8vw, 46px);
  line-height: 1.18;
  letter-spacing: -.02em;
}

.date-page {
  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); }
.sticker-pink { background: var(--blush); box-shadow: 4px 5px 0 var(--yellow); }

.date-card {
  position: relative;
  padding: clamp(32px, 5svh, 42px) 24px clamp(20px, 3.4svh, 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: clamp(14px, 2.8svh, 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: clamp(13px, 2.6svh, 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: clamp(18px, 4svh, 42px); color: var(--red); }
.doodle-row .bow { color: var(--pink); font-size: 32px; }

.calendar-card {
  position: relative;
  width: min(100%, 330px);
  margin: 0 auto;
  background: var(--paper);
  border: 2px solid var(--deep-red);
  border-radius: 22px 22px 36px 22px;
  box-shadow: var(--shadow), 8px 9px 0 var(--blush);
  transform: rotate(-1deg);
}
.calendar-card__rings { position: absolute; top: -14px; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-around; padding: 0 36px; }
.calendar-card__rings i { width: 8px; height: 28px; border: 3px solid var(--deep-red); border-radius: 999px; background: var(--yellow); transform: rotate(3deg); }
.calendar-card__rings i:nth-child(even) { transform: rotate(-4deg); }
.calendar-card__top { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 20px 22px 15px; color: white; background: var(--red); border-radius: 19px 19px 0 0; }
.calendar-card__top span { font: 700 14px/1 Georgia, serif; letter-spacing: .12em; }
.calendar-card__top b { justify-self: end; font: 700 8px/1 Georgia, serif; letter-spacing: .15em; opacity: .75; }
.calendar-card__top strong { grid-column: 1 / -1; margin-top: 7px; color: var(--yellow); font: 800 30px/1 Georgia, serif; letter-spacing: .15em; }
.calendar-card__body { position: relative; padding: 12px 17px 15px; overflow: hidden; text-align: center; }
.calendar-card__month { margin: 0 0 6px; color: var(--muted); font-family: var(--display); font-size: 16px; font-weight: 800; letter-spacing: .25em; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px 3px; align-items: center; }
.calendar-grid > b { display: grid; place-items: center; height: 19px; color: var(--red); font-family: var(--display); font-size: 10px; line-height: 1; }
.calendar-grid__empty, .calendar-grid__day { min-width: 0; height: 29px; }
.calendar-grid__day { position: relative; display: grid; place-items: center; color: var(--ink); font: 700 13px/1 Georgia, serif; }
.calendar-grid__day:nth-child(7n + 1), .calendar-grid__day:nth-child(7n) { color: var(--red); }
.calendar-grid__day.is-selected { z-index: 1; color: var(--deep-red); font-size: 16px; font-weight: 900; }
.calendar-grid__day.is-selected::before, .calendar-grid__day.is-selected::after { content: ""; position: absolute; left: 50%; top: 50%; width: 29px; height: 27px; border: 3px solid var(--red); border-radius: 48% 43% 52% 46%; transform: translate(-50%, -50%) rotate(-9deg); }
.calendar-grid__day.is-selected::after { width: 32px; height: 29px; border-width: 1px; border-color: rgba(232,63,79,.55); transform: translate(-50%, -50%) rotate(8deg); }
.calendar-card__chosen { display: flex; justify-content: center; gap: 7px; align-items: center; margin-top: 7px; color: var(--muted); }
.calendar-card__chosen strong { color: var(--deep-red); font-family: var(--display); font-size: 14px; letter-spacing: .08em; }
.calendar-card__chosen span { color: var(--pink); }
.calendar-card__chosen p { margin: 0; font-size: 10px; letter-spacing: .05em; }
.time-ticket { position: relative; width: min(88%, 290px); display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin: 17px auto 0; padding: 12px 16px; color: var(--deep-red); background: var(--yellow); border: 2px solid var(--deep-red); border-radius: 999px; box-shadow: 4px 5px 0 var(--pink); transform: rotate(1deg); }
.time-ticket span { font-size: 11px; font-weight: 800; }
.time-ticket strong { font-family: var(--display); font-size: 19px; text-align: center; }
.time-ticket i { color: var(--red); font-style: normal; }
.date-page .doodle-row { margin-top: clamp(13px, 2.7svh, 24px); }

.venue-page {
  min-height: 100svh;
  background:
    radial-gradient(circle at 87% 13%, rgba(121,184,158,.2) 0 78px, transparent 79px),
    linear-gradient(rgba(185,32,56,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185,32,56,.05) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 24px 24px, 24px 24px, auto;
}
.venue-postcard { width: min(100%, 350px); margin: 0 auto; padding: 10px 10px 18px; background: white; border: 2px solid var(--deep-red); border-radius: 20px 20px 38px 20px; box-shadow: var(--shadow), 8px 9px 0 var(--yellow); transform: rotate(.7deg); }
.map-thumbnail {
  position: relative;
  height: clamp(166px, 25svh, 220px);
  overflow: hidden;
  background:
    linear-gradient(35deg, transparent 0 48%, rgba(255,255,255,.88) 49% 54%, transparent 55%),
    linear-gradient(125deg, transparent 0 45%, rgba(255,255,255,.92) 46% 52%, transparent 53%),
    #dce9d8;
  border: 1px solid rgba(77,38,48,.12);
  border-radius: 13px;
  isolation: isolate;
}
.map-thumbnail::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(77,38,48,.07) 32px 33px), repeating-linear-gradient(90deg, transparent 0 42px, rgba(77,38,48,.07) 43px 44px); }
.map-block { position: absolute; width: 56px; height: 34px; background: rgba(255,212,95,.52); border: 1px solid rgba(185,32,56,.14); border-radius: 6px; transform: rotate(-7deg); }
.block-one { left: 12%; top: 17%; }
.block-two { right: 10%; top: 18%; width: 72px; background: rgba(255,156,167,.34); transform: rotate(8deg); }
.block-three { left: 16%; bottom: 12%; width: 88px; height: 40px; background: rgba(121,184,158,.35); transform: rotate(5deg); }
.map-road { position: absolute; height: 6px; background: white; border: 1px solid rgba(156,104,112,.18); border-radius: 999px; }
.road-one { width: 130%; left: -12%; top: 48%; transform: rotate(-12deg); }
.road-two { width: 110%; left: -5%; top: 58%; transform: rotate(18deg); }
.road-three { width: 80%; right: -30%; top: 30%; transform: rotate(76deg); }
.map-pin { position: absolute; left: 50%; top: 48%; z-index: 3; width: 48px; height: 48px; display: grid; place-items: center; color: var(--yellow); background: var(--red); border: 4px solid white; border-radius: 50% 50% 50% 8px; box-shadow: 0 6px 12px rgba(91,25,38,.22); transform: translate(-50%, -68%) rotate(-45deg); }
.map-pin i { font-style: normal; font-size: 17px; transform: rotate(45deg); }
.map-pin-label { position: absolute; left: 50%; top: calc(48% + 28px); z-index: 4; max-width: 80%; padding: 5px 10px; color: white; background: var(--deep-red); border-radius: 999px; font-family: var(--display); font-size: 12px; font-weight: 800; white-space: nowrap; transform: translateX(-50%); }
.venue-copy { padding: 14px 12px 0; text-align: center; }
.venue-copy__eyebrow { margin: 0 0 7px; color: var(--red); font: 700 9px/1 Georgia, serif; letter-spacing: .2em; }
.venue-copy h3 { margin: 0; color: var(--deep-red); font-family: var(--display); font-size: clamp(25px, 7vw, 32px); }
.venue-hall { max-width: 100%; display: inline-flex; gap: 7px; align-items: center; margin: 6px 0 0; padding: 4px 10px; color: var(--deep-red); background: var(--cream); border: 1px solid var(--blush); border-radius: 999px; line-height: 1; }
.venue-hall span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.venue-hall strong { min-width: 0; overflow: hidden; font-family: var(--display); font-size: 14px; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.venue-address-copy { width: 100%; max-width: 304px; display: flex; gap: 9px; align-items: center; justify-content: center; margin: 7px auto 0; padding: 7px 10px; color: var(--muted); background: rgba(255,245,223,.58); border: 1px dashed rgba(185,32,56,.25); border-radius: 12px; cursor: pointer; font: inherit; font-size: 12px; line-height: 1.45; text-align: left; transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease; }
.venue-address-copy span { min-width: 0; }
.venue-address-copy i { position: relative; width: 13px; height: 14px; flex: 0 0 13px; border: 1.5px solid currentColor; border-radius: 3px; }
.venue-address-copy i::before { content: ""; position: absolute; left: -4px; top: 3px; width: 9px; height: 10px; border: 1.5px solid currentColor; border-radius: 3px; background: var(--paper); }
.venue-address-copy:hover, .venue-address-copy:focus-visible, .venue-address-copy.is-copied { color: var(--deep-red); background: var(--cream); border-color: var(--red); }
.venue-address-copy:active { transform: scale(.98); }
.venue-address-copy:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
.venue-address-copy:disabled { cursor: not-allowed; opacity: .5; }
.navigation-button { display: inline-flex; gap: 12px; align-items: center; margin-top: 13px; padding: 11px 22px; color: white; background: var(--red); border: 0; border-radius: 999px; box-shadow: 4px 5px 0 var(--yellow); cursor: pointer; font-size: 14px; font-weight: 800; }
.navigation-button b { color: var(--yellow); font-size: 17px; }
.navigation-button:disabled { cursor: not-allowed; opacity: .5; }
.navigation-button:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }
.venue-copy small { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.venue-doodles { display: flex; justify-content: center; gap: 10px; align-items: center; margin-top: 17px; color: var(--red); font-family: var(--display); font-size: 12px; }
.venue-doodles i { width: 32px; border-top: 2px dotted var(--pink); }
.venue-copy-toast { position: fixed; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px)); z-index: 95; margin: 0; padding: 10px 17px; color: white; background: rgba(77,38,48,.92); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; box-shadow: 0 8px 25px rgba(77,38,48,.22); pointer-events: none; opacity: 0; transform: translate(-50%, 10px) scale(.96); transition: opacity .22s ease, transform .22s ease; font-size: 13px; font-weight: 800; white-space: nowrap; }
.venue-copy-toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.venue-copy-toast.is-error { background: rgba(185,32,56,.95); }

.navigation-sheet { position: fixed; inset: 0; z-index: 80; }
.navigation-sheet[hidden] { display: none; }
.navigation-sheet__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(58,25,33,.48); border: 0; opacity: 0; backdrop-filter: blur(4px); transition: opacity .24s ease; }
.navigation-sheet__panel { position: absolute; left: 50%; bottom: 0; width: min(100%, 480px); padding: 16px 22px max(24px, env(safe-area-inset-bottom)); background: var(--paper); border-radius: 28px 28px 0 0; box-shadow: 0 -20px 50px rgba(77,38,48,.2); text-align: center; transform: translate(-50%, 105%); transition: transform .32s cubic-bezier(.2,.8,.2,1); }
.navigation-sheet.is-visible .navigation-sheet__backdrop { opacity: 1; }
.navigation-sheet.is-visible .navigation-sheet__panel { transform: translate(-50%, 0); }
.navigation-sheet__handle { display: block; width: 42px; height: 5px; margin: 0 auto 13px; background: var(--blush); border-radius: 999px; }
.navigation-sheet__close { position: absolute; top: 16px; right: 18px; width: 34px; height: 34px; padding: 0; color: var(--deep-red); background: var(--blush); border: 0; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; }
.navigation-sheet__panel > p { margin: 0; color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.navigation-sheet__panel h2 { margin: 6px 0 17px; font-family: var(--display); font-size: 28px; }
.navigation-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.navigation-option { display: grid; grid-template-columns: 48px 1fr; gap: 2px 10px; align-items: center; padding: 13px 12px; color: var(--ink); background: white; border: 1px solid var(--blush); border-radius: 17px; text-align: left; text-decoration: none; }
.navigation-option > .navigation-option__avatar { grid-row: 1 / 3; width: 48px; height: 48px; display: block; overflow: hidden; background: var(--paper); border: 2px solid; border-radius: 15px; box-shadow: 0 3px 0 rgba(232,63,79,.15); }
.navigation-option__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.navigation-option--baidu > .navigation-option__avatar { border-color: #3978f6; }
.navigation-option--amap > .navigation-option__avatar { border-color: #39a86b; }
.navigation-option b { font-family: var(--display); font-size: 16px; }
.navigation-option small { color: var(--muted); font-size: 9px; }
.navigation-option:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.letter {
  display: flex;
  flex-direction: column;
  padding-bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  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: clamp(30px, 5.2svh, 46px) 28px clamp(25px, 4svh, 36px);
  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: clamp(11px, 2.2svh, 18px) 0; color: var(--deep-red); font-family: var(--handwriting); font-size: clamp(38px, 10vw, 46px); font-weight: 400; letter-spacing: .075em; text-align: center; font-synthesis: none; }
.letter-card > p:not(.letter-card__mini) { margin: 0; font-family: var(--handwriting); font-size: clamp(18px, 4.8vw, 20px); font-weight: 400; line-height: clamp(30px, 4svh, 36px); letter-spacing: .06em; text-align: left; font-synthesis: none; }
.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: clamp(16px, 3svh, 28px); font-family: var(--handwriting); font-size: 23px; font-weight: 400; letter-spacing: .075em; font-synthesis: none; }
.signature i { color: var(--red); font-style: normal; font-size: 12px; }
.candy-doodle { display: flex; flex: 0 0 auto; justify-content: center; align-items: center; margin: auto 0 0; padding-top: clamp(18px, 3svh, 32px); 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 { display: flex; flex-direction: column; background: var(--paper); }
.gallery-camera-stage {
  position: relative;
  z-index: 3;
  display: grid;
  flex: 0 0 clamp(112px, 16svh, 138px);
  place-items: start center;
  padding-top: 9px;
}
.instant-camera {
  position: relative;
  width: 116px;
  height: 76px;
  background: linear-gradient(180deg, #fffaf0 0 38%, var(--red) 38% 100%);
  border: 3px solid var(--deep-red);
  border-radius: 17px 17px 21px 21px;
  box-shadow: 4px 6px 0 var(--yellow), 0 13px 24px rgba(104,31,44,.2);
  transform: rotate(-2deg);
}
.instant-camera::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 19px;
  width: 39px;
  height: 13px;
  background: var(--deep-red);
  border-radius: 8px 8px 2px 2px;
}
.instant-camera::after {
  content: "";
  position: absolute;
  top: -62px;
  right: -52px;
  width: 118px;
  height: 118px;
  opacity: 0;
  background: radial-gradient(circle, rgba(255,255,255,1) 0 10%, rgba(255,230,133,.9) 11% 24%, rgba(255,255,255,.45) 25% 37%, transparent 62%);
  pointer-events: none;
  transform: scale(.25);
}
.instant-camera.is-flashing::after { animation: camera-flash .3s ease-out both; }
.instant-camera__viewfinder { position: absolute; top: 10px; left: 17px; width: 27px; height: 15px; background: #6c4149; border: 3px solid var(--ink); border-radius: 5px; }
.instant-camera__flash { position: absolute; top: 9px; right: 17px; width: 22px; height: 15px; background: var(--yellow); border: 3px solid var(--deep-red); border-radius: 5px; }
.instant-camera__lens { position: absolute; left: 50%; top: 27px; display: grid; width: 49px; height: 49px; place-items: center; background: white; border: 4px solid var(--deep-red); border-radius: 50%; box-shadow: inset 0 0 0 5px var(--pink); transform: translateX(-50%); }
.instant-camera__lens i { width: 21px; height: 21px; background: #65434a; border: 4px solid var(--yellow); border-radius: 50%; box-shadow: inset 0 0 0 3px #2e2630; }
.instant-camera__button { position: absolute; top: -8px; right: 19px; width: 18px; height: 8px; background: var(--yellow); border: 2px solid var(--deep-red); border-radius: 5px 5px 1px 1px; }
.instant-camera__slot { position: absolute; left: 50%; bottom: -8px; width: 58px; height: 9px; background: var(--ink); border: 2px solid var(--deep-red); border-radius: 0 0 8px 8px; transform: translateX(-50%); }
.gallery-camera-stage p { position: absolute; left: 0; right: 0; bottom: 3px; margin: 0; color: var(--deep-red); font-family: var(--handwriting); font-size: 14px; letter-spacing: .08em; text-align: center; }
.gallery-camera-stage.is-complete p { color: var(--muted); }
.gallery-grid {
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: center;
  gap: 12px;
}
.gallery-grid[data-count="1"] { grid-template-columns: minmax(0, 220px); justify-content: center; }
.gallery-grid.is-sequencing { pointer-events: none; }
.gallery-card {
  --card-rotation: -2deg;
  --card-y: 0px;
  position: relative;
  display: block;
  align-self: center;
  width: 100%;
  margin: 0;
  padding: 8px 8px 26px;
  appearance: none;
  color: inherit;
  background: white;
  border: 0;
  box-shadow: 0 12px 24px rgba(98,40,49,.13);
  cursor: default;
  opacity: 0;
  pointer-events: none;
  transform: translateY(var(--card-y)) rotate(var(--card-rotation));
  transform-origin: center center;
}
.gallery-card:nth-child(even) { --card-rotation: 2deg; --card-y: 18px; }
.gallery-card.is-developing { z-index: 12; opacity: 1; }
.gallery-card.is-ready { opacity: 1; pointer-events: auto; cursor: zoom-in; transition: transform .24s ease, box-shadow .24s ease; }
.gallery-card.is-ready:hover, .gallery-card.is-ready:focus-visible { box-shadow: 0 18px 34px rgba(98,40,49,.24); outline: 3px solid var(--yellow); outline-offset: 4px; transform: translateY(calc(var(--card-y) - 4px)) rotate(var(--card-rotation)) scale(1.035); }
.gallery-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: var(--blush);
}
.gallery-card__caption { 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 { margin: auto 0; padding: clamp(34px, 7svh, 54px) 20px; text-align: center; border: 2px dashed var(--pink); border-radius: 50% 46% 48% 52%; background: rgba(255,217,215,.28); }
.gallery-empty p { margin: 0 0 6px; font-family: var(--display); font-size: 23px; font-weight: 800; }
.gallery-empty small { color: var(--muted); }

.photo-lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); opacity: 0; transition: opacity .24s ease; }
.photo-lightbox[hidden] { display: none; }
.photo-lightbox.is-visible { opacity: 1; }
.photo-lightbox__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(47,15,25,.88); border: 0; backdrop-filter: blur(10px); }
.photo-lightbox__dialog { position: relative; z-index: 1; width: min(100%, 460px); transform: scale(.9) translateY(16px); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.photo-lightbox.is-visible .photo-lightbox__dialog { transform: none; }
.photo-lightbox figure { margin: 0; text-align: center; }
.photo-lightbox img { display: block; width: 100%; max-height: 78svh; object-fit: contain; background: #21181c; border: 8px solid white; border-bottom-width: 34px; border-radius: 3px; box-shadow: 0 24px 65px rgba(0,0,0,.42); }
.photo-lightbox figcaption { margin-top: -26px; color: var(--ink); font: 700 10px/1 Georgia, serif; letter-spacing: .13em; }
.photo-lightbox__close, .photo-lightbox__nav { display: grid; place-items: center; color: white; background: var(--red); border: 2px solid rgba(255,255,255,.72); border-radius: 50%; cursor: pointer; box-shadow: 0 7px 20px rgba(0,0,0,.25); }
.photo-lightbox__close { position: absolute; top: -45px; right: 0; width: 38px; height: 38px; font-size: 25px; line-height: 1; }
.photo-lightbox__nav { position: absolute; z-index: 2; top: 50%; width: 38px; height: 38px; font-size: 31px; line-height: 1; transform: translateY(-50%); }
.photo-lightbox__nav--prev { left: -9px; }
.photo-lightbox__nav--next { right: -9px; }
.photo-lightbox__nav:disabled { visibility: hidden; }
.photo-lightbox__close:focus-visible, .photo-lightbox__nav:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.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(--handwriting); font-size: 20px; font-weight: 400; letter-spacing: .04em; transform: rotate(-2deg); font-synthesis: none; }
.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); }
.invite-page.reveal { transform: none; }
.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); } }
@keyframes music-spin { to { transform: rotate(360deg); } }
@keyframes music-pulse { to { transform: scale(1.55); } }
@keyframes camera-flash { 0% { opacity: 0; transform: scale(.22) rotate(0); } 28% { opacity: 1; transform: scale(1.08) rotate(12deg); } 100% { opacity: 0; transform: scale(1.5) rotate(20deg); } }

@media (min-width: 481px) {
  .invitation { border-radius: 28px; }
}

@media (max-height: 640px) {
  .section-pad { padding-top: 34px; padding-bottom: 24px; }
  .section-pad > h2 { margin: 7px 0 14px; font-size: 29px; }
  .section-sticker { top: 28px; width: 52px; height: 52px; font-size: 14px; }
  .calendar-card__top { padding: 16px 19px 11px; }
  .calendar-card__top strong { font-size: 25px; }
  .calendar-card__body { padding: 7px 12px 9px; }
  .calendar-card__month { margin-bottom: 3px; font-size: 13px; }
  .calendar-grid { gap: 0 2px; }
  .calendar-grid > b { height: 15px; font-size: 9px; }
  .calendar-grid__empty, .calendar-grid__day { height: 23px; }
  .calendar-grid__day { font-size: 11px; }
  .calendar-grid__day.is-selected { font-size: 13px; }
  .calendar-grid__day.is-selected::before { width: 23px; height: 22px; border-width: 2px; }
  .calendar-grid__day.is-selected::after { width: 26px; height: 24px; }
  .calendar-card__chosen { gap: 5px; margin-top: 4px; }
  .calendar-card__chosen strong { font-size: 12px; }
  .calendar-card__chosen p { font-size: 9px; }
  .time-ticket { margin-top: 8px; padding: 7px 13px; }
  .time-ticket strong { font-size: 17px; }
  .date-page .doodle-row { margin-top: 9px; }
  .venue-postcard { padding: 8px 8px 12px; }
  .map-thumbnail { height: 126px; }
  .map-pin { width: 40px; height: 40px; }
  .map-pin-label { top: calc(48% + 23px); }
  .venue-copy { padding-top: 9px; }
  .venue-copy h3 { font-size: 23px; }
  .venue-hall { gap: 5px; margin-top: 3px; padding: 3px 8px; }
  .venue-hall strong { font-size: 12px; }
  .venue-address-copy { margin-top: 4px; padding: 4px 8px; font-size: 11px; line-height: 1.3; }
  .navigation-button { margin-top: 8px; padding: 8px 18px; }
  .venue-copy small { margin-top: 6px; }
  .venue-doodles { margin-top: 9px; }
  .date-card { padding-top: 27px; padding-bottom: 15px; }
  .date-card__pin { top: -18px; width: 38px; height: 38px; border-width: 3px; }
  .date-card__date { font-size: 21px; }
  .date-card__venue { font-size: 20px; }
  .date-card__time, .date-card__address { font-size: 12px; }
  .dotted-line { margin: 10px auto; }
  .map-button { margin-top: 10px; padding: 8px 14px; }
  .doodle-row { margin-top: 12px; }
  .doodle-row .bow { font-size: 25px; }
  .letter-card { padding: 24px 22px 19px; }
  .letter-card h2 { margin: 8px 0; font-size: 34px; }
  .letter-card > p:not(.letter-card__mini) { font-size: 15.5px; line-height: 27px; }
  .signature { margin-top: 11px; font-size: 18px; }
  .candy-doodle { padding-top: 14px; font-size: 24px; }
  .candy-doodle b { width: 48px; height: 48px; font-size: 22px; }
  .gallery-camera-stage { flex-basis: 88px; padding-top: 0; }
  .instant-camera { transform: rotate(-2deg) scale(.76); transform-origin: top center; }
  .gallery-camera-stage p { bottom: 0; font-size: 11px; }
  .gallery-card { padding: 6px 6px 22px; }
  .ending__content { padding-top: 38px; padding-bottom: 115px; }
  .ending__heart { margin: 17px auto 12px; font-size: 43px; }
  .ending h2 { font-size: clamp(48px, 14vw, 62px); }
  .ending__content > p:not(.ending__tiny) { margin-top: 16px; }
  .ending__names { margin-top: 28px; }
}

@media (max-width: 350px) {
  .section-pad { padding-left: 20px; padding-right: 20px; }
  .navigation-sheet__panel { padding-left: 16px; padding-right: 16px; }
  .navigation-option { grid-template-columns: 40px 1fr; gap: 2px 7px; padding: 12px 8px; }
  .navigation-option > .navigation-option__avatar { width: 40px; height: 40px; border-radius: 12px; }
  .navigation-option b { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .invitation { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .page-dots { transition-duration: 1.5s !important; }
  .page-dots.is-awake, .page-dots:hover, .page-dots:focus-within { transition-duration: .08s !important; }
  .reveal { opacity: 1; transform: none; }
  .gallery-card.is-ready { transition: none; }
}
