:root {
  --bg: #e8eaf0;
  --ink: #3b3e46;
  --ink-2: #565a64;
  --muted: #868a94;
  --line: #a9adb7;
  --rose: #a97880;
  --paper: url("assets/nen/giay-la.webp");
  --raise: 4px 4px 10px rgba(146, 152, 168, .42), -4px -4px 10px rgba(255, 255, 255, .92);
  --f-serif: "Cormorant Garamond", "Times New Roman", serif;
  --f-sans: "Montserrat", "Segoe UI", Arial, sans-serif;
  --f-script: "Pinyon Script", "Segoe Script", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  background: linear-gradient(rgba(70, 76, 92, .16), rgba(70, 76, 92, .16)), var(--paper) center top / 600px, #d9dce3;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--f-sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; height: 100svh; }
body.has-dialog { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
p, h1, h2, h3, figure { margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.noscript { padding: 40px 20px; text-align: center; }

.page {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg) var(--paper) center top / 600px;
  box-shadow: 0 0 46px rgba(40, 46, 60, .2);
}

.std {
  display: flex; align-items: baseline; justify-content: center; gap: .45em;
  font-family: var(--f-serif); font-weight: 400; font-size: 24px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink);
}
.std i {
  font-family: var(--f-script); font-style: normal; font-size: 1.3em;
  letter-spacing: 0; text-transform: none;
  transform: translateY(.12em);
  color: var(--ink-2);
}
.std--sm { font-size: 17px; }

.intro {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: var(--bg) var(--paper) center / 600px;
  cursor: pointer;
}
.intro__inner { text-align: center; transform: translateY(-5vh); }
.intro .std { animation: stdIn 1.6s cubic-bezier(.2, .7, .2, 1) .2s both; }
.intro__date {
  min-height: 1.5em;
  margin-top: 26px;
  font-family: var(--f-sans); font-weight: 300; font-size: 19px; letter-spacing: .16em;
  color: var(--ink);
}
.caret { display: inline-block; width: 1px; height: 1.05em; margin-left: 4px; vertical-align: -.14em; background: var(--ink); animation: blink 1s steps(1) infinite; }
.intro__guest { margin-top: 30px; font-family: var(--f-serif); font-style: italic; font-size: 21px; color: var(--ink-2); opacity: 0; transition: opacity 1s .3s; }
.intro__guest strong { margin-left: .3em; font-weight: 500; color: var(--ink); }
.intro.is-typed .intro__guest { opacity: 1; }
.intro__tap {
  position: absolute; left: 50%; bottom: calc(11vh + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 11px 26px;
  border: 1px solid rgba(110, 115, 128, .45); border-radius: 999px;
  background: linear-gradient(145deg, #f3f4f8, #e2e5ec);
  box-shadow: var(--raise);
  font-family: var(--f-sans); font-weight: 500; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  opacity: 0; transition: opacity .8s;
}
.intro.is-typed .intro__tap { opacity: 1; animation: breathe 2.6s ease-in-out .8s infinite; }
.is-open .intro { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 1.1s ease, visibility 0s 1.1s; }

.hero { position: relative; height: 100svh; min-height: 560px; max-height: 980px; overflow: hidden; }
.hero__slides {
  position: absolute; inset: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 46%, rgba(0, 0, 0, .55) 70%, transparent 94%);
  mask-image: linear-gradient(to bottom, #000 0, #000 46%, rgba(0, 0, 0, .55) 70%, transparent 94%);
}
.slide { position: absolute; inset: 0; opacity: 0; }
.slide.is-active { opacity: 1; }
.slide.is-top { z-index: 2; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; transform: scale(1.1); }
.is-open .slide.is-active img { transform: scale(1); transition: transform 7.5s cubic-bezier(.2, .6, .3, 1); }
.fx-split { animation: fxSplit 1.5s cubic-bezier(.7, 0, .3, 1) both; }
.fx-wipe { animation: fxWipe 1.5s cubic-bezier(.7, 0, .3, 1) both; }
.fx-rise { animation: fxRise 1.5s cubic-bezier(.7, 0, .3, 1) both; }
.fx-fade { animation: fxFade 1.6s ease both; }
.hero__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; z-index: 3; background: linear-gradient(to bottom, rgba(232, 234, 240, 0), rgba(232, 234, 240, .5)); pointer-events: none; }
.hero__text { position: absolute; left: 0; right: 0; bottom: calc(7% + env(safe-area-inset-bottom)); z-index: 4; text-align: center; }
.hero__text > * { opacity: 0; }
.is-open .hero__text > * { animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) 1s forwards; }
.is-open .hero__text > .hero__names { animation-delay: 1.5s; }
.hero__names {
  margin-top: 16px;
  font-family: var(--f-serif); font-weight: 400; font-size: 32px; line-height: 1.12;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink);
}
.hero__n1 { display: block; padding-right: 22%; }
.hero__n2 { display: block; padding-left: 16%; }
.hero__n2 i { margin-right: .3em; font-family: var(--f-script); font-style: normal; font-size: 1em; letter-spacing: 0; text-transform: none; color: var(--ink-2); }

.parents { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 20px 6px; }
.parents--one { grid-template-columns: 1fr; text-align: center; }
.family--1 { text-align: left; }
.family--2 { text-align: right; margin-top: 44px; }
.parents--one .family { text-align: center; margin-top: 0; }
.family__label { font-family: var(--f-script); font-size: 23px; line-height: 1.2; color: var(--ink-2); }
.family__names { margin-top: 4px; font-weight: 500; font-size: 10.5px; line-height: 1.8; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.family__addr { margin-top: 6px; font-size: 10.5px; line-height: 1.5; color: var(--ink-2); }
.family__old { margin-top: 3px; font-size: 9.5px; font-style: italic; line-height: 1.5; color: var(--muted); }

.announce { padding: 34px 20px 20px; text-align: center; }
.caps-sm { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.fullname { margin-top: 10px; font-family: var(--f-serif); font-style: italic; font-weight: 500; font-size: 40px; line-height: 1.1; color: var(--ink); transform: translateX(-9%); }
.fullname--2 { margin-top: 0; transform: translateX(9%); }
.and-script { font-family: var(--f-script); font-size: 24px; line-height: 1.1; color: var(--muted); }
.fullname.reveal { transform: translate(-9%, 22px); }
.fullname--2.reveal { transform: translate(9%, 22px); }
.fullname.reveal.is-in { transform: translateX(-9%); }
.fullname--2.reveal.is-in { transform: translateX(9%); }

.wide { margin: 14px 14px 0; border: 5px solid #f8f9fb; box-shadow: 0 12px 26px rgba(70, 76, 92, .22); background: #dcdfe6; }
.wide img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.welcome { padding: 40px 22px 4px; text-align: center; }
.welcome__lead { font-family: var(--f-serif); font-weight: 500; font-size: 19px; letter-spacing: .16em; text-transform: uppercase; color: #8e929c; text-shadow: 1px 1px 0 rgba(255, 255, 255, .9); }
.welcome__guest { margin-top: 2px; font-family: var(--f-serif); font-style: italic; font-weight: 500; font-size: 32px; line-height: 1.2; color: var(--ink); }
.rule { display: block; width: 64px; height: 1px; margin: 14px auto 12px; background: var(--line); }
.welcome__after { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.caps-sm, .welcome__after, .welcome__lead, .event__addr, .rsvp__lead, .closing__lines, .event__place { text-wrap: balance; }

.events { padding-top: 8px; }
.event { padding: 30px 22px 6px; text-align: center; }
.pill {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 30px 6px;
  border-radius: 999px;
  background: linear-gradient(145deg, #f4f5f9, #e1e4eb);
  box-shadow: var(--raise), inset 0 0 0 1px rgba(255, 255, 255, .7);
  font-family: var(--f-serif); font-weight: 500; font-size: 18px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2);
}
.split { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center; gap: 0 20px; max-width: 300px; margin: 0 auto; }
.split__col span { display: block; font-size: 12px; color: var(--ink-2); }
.split__col b { display: block; margin-top: 6px; font-weight: 600; font-size: 15.5px; letter-spacing: .06em; color: var(--ink); }
.split__line { width: 1px; height: 52px; background: var(--line); }
.event__lunar { margin-top: 14px; font-size: 10.5px; font-style: italic; color: var(--muted); }
.event__place { margin-top: 8px; font-weight: 500; font-size: 13px; color: var(--ink); }
.event__place--strong { margin-top: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.event__addr { margin-top: 4px; font-size: 11.5px; line-height: 1.55; color: var(--ink-2); }
.event__at { font-weight: 500; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.event__date { margin-top: 8px; font-weight: 600; font-size: 23px; letter-spacing: .12em; color: var(--ink); }
.event__date i { font-style: normal; font-weight: 300; color: var(--muted); }
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 18px;
  padding: 9px 22px;
  border: 1px solid #9ea2ac; border-radius: 999px;
  background: linear-gradient(145deg, #f4f5f9, #e3e6ec);
  box-shadow: 3px 3px 8px rgba(146, 152, 168, .35), -3px -3px 8px rgba(255, 255, 255, .85);
  font-family: var(--f-sans); font-weight: 500; font-size: 12px; letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
}
.pill-btn:active, .btn:active, .gift-card:active { transform: scale(.97); }
.map { height: 300px; margin: 20px -22px 0; background: #d4d7de; }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

.calendar { padding: 40px 30px 6px; text-align: center; }
.month {
  padding: 18px 14px 16px;
  border: 1px solid var(--line);
  outline: 1px solid var(--line); outline-offset: -6px;
  background: rgba(255, 255, 255, .22);
}
.month__title { display: flex; justify-content: center; gap: 16px; font-family: var(--f-script); font-size: 31px; line-height: 1.3; color: var(--ink-2); }
.month__grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; margin-top: 8px; font-size: 12.5px; }
.month__grid b { padding-bottom: 4px; font-weight: 500; font-size: 10.5px; color: var(--ink-2); }
.month__grid span { position: relative; display: grid; place-items: center; height: 32px; color: var(--ink-2); }
.month__grid .is-day { font-weight: 600; color: var(--ink); }
.is-day svg { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -20px 0 0 -19px; color: var(--rose); animation: beat 1.8s ease-in-out infinite; }
.calendar .pill-btn { margin-top: 18px; }

.rsvp { padding: 46px 26px 6px; text-align: center; }
.script-title { font-family: var(--f-script); font-weight: 400; font-size: 41px; line-height: 1.3; color: var(--ink); }
.rsvp .rule { margin: 4px auto 12px; }
.rsvp__lead { margin-bottom: 18px; font-size: 11.5px; line-height: 1.65; color: var(--ink-2); }
.rsvp__form, .rsvp__extra { display: grid; gap: 10px; text-align: left; }
.field {
  width: 100%;
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid #c2c6cf; border-radius: 11px;
  background: rgba(255, 255, 255, .6);
  box-shadow: inset 1px 1px 3px rgba(120, 126, 140, .12);
  font-family: var(--f-sans); font-weight: 400; font-size: 13.5px;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none; appearance: none;
}
select.field {
  padding-right: 40px;
  background: rgba(255, 255, 255, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23565a64' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 15px no-repeat;
}
.field--area { min-height: 88px; resize: vertical; }
.field::placeholder { color: #7d818b; }
.field:focus { border-color: #8f939d; box-shadow: 0 0 0 3px rgba(140, 146, 160, .18); }
.form-error { min-height: 1em; font-size: 13px; color: #a3404d; text-align: center; }
.form-error:empty { display: none; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  padding: 12px 18px;
  border: 1.5px solid #8f939d; border-radius: 999px;
  background: linear-gradient(145deg, #f6f7fa, #e1e4ea);
  box-shadow: var(--raise);
  font-family: var(--f-sans); font-weight: 600; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s;
}
.btn:disabled { opacity: .6; }
.btn--ghost { border-color: var(--line); background: transparent; box-shadow: none; font-weight: 500; }
.rsvp-done { display: grid; gap: 12px; padding: 20px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .35); }
.rsvp-done__text { font-size: 13.5px; line-height: 1.6; color: var(--ink); }

.gift { display: grid; place-items: center; padding: 40px 0 16px; }
.gift-card {
  display: grid; justify-items: center; gap: 10px;
  width: 158px;
  padding: 18px 16px 14px;
  border: 0; border-radius: 6px;
  background: #fbfbfc;
  box-shadow: 0 12px 24px rgba(80, 86, 102, .22), 0 2px 4px rgba(80, 86, 102, .12);
  transform: rotate(-3deg);
  transition: transform .3s;
}
.gift-card.reveal { transform: rotate(-3deg) translateY(22px); }
.gift-card.reveal.is-in { transform: rotate(-3deg); animation: sway 4s ease-in-out 1s infinite; }
.gift-card__env { width: 100%; height: auto; }
.gift-card__label { font-family: var(--f-serif); font-weight: 500; font-size: 14.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }

.album { padding: 36px 8px 6px; }
.album .script-title { margin-bottom: 16px; text-align: center; }
.masonry { display: grid; gap: 8px; }
.masonry__block { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: stretch; }
.masonry__col { display: flex; flex-direction: column; gap: 8px; }
.tile { position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden; background: #d6d9e0; cursor: zoom-in; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.tile--fill { flex: 1 1 auto; }
.tile--wide { aspect-ratio: 3 / 2; }

.closing { padding: 46px 26px calc(96px + env(safe-area-inset-bottom)); text-align: center; }
.closing__lines { margin-top: 8px; font-size: 12px; line-height: 1.75; color: var(--ink-2); }
.closing__sign { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; font-family: var(--f-serif); font-style: italic; font-weight: 500; font-size: 24px; color: var(--ink); }
.closing__sign svg { color: var(--rose); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.reveal--left { transform: translateX(-36px); }
.reveal--right { transform: translateX(36px); }
.reveal--zoom { transform: scale(.93); }
.reveal.is-in { opacity: 1; transform: none; }
.masonry__col .reveal:nth-child(even) { transition-delay: .12s; }

.fab {
  position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 1.3px solid var(--ink); border-radius: 50%;
  background: rgba(241, 242, 246, .72);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  color: var(--ink);
}
.fab--music { left: max(14px, calc(50% - 220px + 14px)); }
.fab--top { right: max(14px, calc(50% - 220px + 14px)); animation: fadeIn .4s ease; }
.fab--music.is-playing svg { animation: spin 4s linear infinite; }
.fab--music:not(.is-playing)::after { content: ""; position: absolute; width: 1.3px; height: 26px; background: var(--ink); transform: rotate(45deg); }
.fab--music.is-waiting::before {
  content: attr(data-hint);
  position: absolute; left: 50px; top: 50%; transform: translateY(-50%);
  white-space: nowrap;
  padding: 6px 12px; border-radius: 999px;
  background: #fff; color: var(--ink);
  font-size: 12.5px; box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
}

dialog { padding: 0; border: 0; color: var(--ink); }
dialog::backdrop { background: rgba(40, 44, 56, .55); }
.lightbox { width: 100vw; max-width: none; height: 100svh; max-height: none; margin: 0; background: rgba(22, 24, 30, .95); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__img { max-width: 94vw; max-height: 86svh; object-fit: contain; }
.lightbox__count { position: absolute; top: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; letter-spacing: .1em; }
.lightbox__close, .lightbox__nav { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 26px; line-height: 1; }
.lightbox__close { top: 10px; right: 10px; font-size: 20px; }
.lightbox__nav { top: 50%; margin-top: -23px; font-size: 32px; }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

.sheet { width: min(92vw, 400px); max-height: 90svh; overflow: auto; padding: 30px 20px 22px; border-radius: 20px; background: var(--bg) var(--paper) center / 600px; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.sheet__close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, .6); color: var(--ink); font-size: 15px; }
.sheet__title { font-family: var(--f-script); font-weight: 400; font-size: 36px; line-height: 1.3; color: var(--ink); }
.sheet__sub { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.sheet__foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.cal-links { display: grid; gap: 10px; margin-top: 16px; }
.tabs { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.tab { flex: 1; min-height: 40px; padding: 6px 12px; border: 1px solid #8f939d; border-radius: 999px; background: rgba(255, 255, 255, .5); color: var(--ink); font-family: var(--f-sans); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.bank { display: grid; gap: 6px; justify-items: center; margin-top: 14px; }
.bank__who { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.bank__qr { width: min(64vw, 240px); padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(60, 70, 90, .15); }
.bank__qr canvas, .bank__qr img { width: 100%; height: auto; }
.bank__empty { font-size: 13px; color: var(--muted); }
.bank__name { margin-top: 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.bank__acc { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 22px; letter-spacing: .06em; color: var(--ink); }
.copy-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, .6); color: var(--ink); }
.bank__owner { font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; }
.bank #bankSave { width: auto; margin-top: 6px; padding: 10px 26px; }
.bank__status { min-height: 1.2em; font-size: 12.5px; color: var(--ink-2); }

.no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; }

@keyframes stdIn { from { opacity: 0; letter-spacing: .5em; } to { opacity: 1; letter-spacing: .2em; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.05); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.1); } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-5px); } }
@keyframes fxSplit { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
@keyframes fxWipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fxRise { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fxFade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .fullname.reveal, .fullname--2.reveal, .gift-card.reveal { opacity: 1; transition: none; }
  .intro .std, .intro.is-typed .intro__tap, .is-day svg, .gift-card.reveal.is-in, .fab--music.is-playing svg { animation: none; }
  .is-open .slide.is-active img { transition: none; }
}
