:root {
  --plum: #8e6488;
  --plum-dark: #61475d;
  --blush: #eeb9ba;
  --paper: #fcf9f5;
  --ink: #332c2d;
  --muted: #6f6360;
  --line: #e8dedb;
  --sage: #778675;

  /* Cormorant, Be Vietnam Pro và Great Vibes đều hỗ trợ đầy đủ dấu tiếng Việt */
  --font-serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-sans:
    "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  --font-script: "Great Vibes", "Segoe Script", cursive;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--ink);
  background: #e6ecf0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
}
body.invitation-locked {
  overflow: hidden;
}
h1,
h2,
h3,
p {
  margin: 0;
}
img {
  display: block;
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid #0f3455;
  outline-offset: 3px;
}

.page {
  width: min(100%, 560px);
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 0 50px #49353b16;
}

/* Opening envelope */
.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 24px;
  padding: 24px;
  overflow: auto;
  background:
    radial-gradient(ellipse at 50% 42%, #fcf9f5 0%, #e6ecf0 70%),
    var(--paper);
  opacity: 1;
  transition:
    opacity 0.8s ease 1.2s,
    visibility 0s linear 2s;
}
.envelope-screen[hidden] {
  display: none;
}
.envelope-screen.opening {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.envelope-cover {
  position: relative;
  width: min(84vw, 420px);
  aspect-ratio: 1.48;
  perspective: 1000px;
  filter: drop-shadow(0 22px 26px #49353b2b);
}
.envelope-back {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid #2e4e7b;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(145deg, #2e4e7b, #00132f);
}
.envelope-card {
  position: absolute;
  inset: 6% 1% 10%;
  z-index: 2;
  border: 1px solid #eadbd2;
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 20%, #fff 0%, #fffaf6 78%),
    var(--paper);
  box-shadow: 0 2px 6px #49353b14;
  transition: transform 2s cubic-bezier(0.22, 1, 0.36, 1) 0.8s;
}
.envelope-flap {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  height: 79%;
  border: 1px solid #2e4e7b;
  /* border-radius: 8px 8px 0 0; */
  background: linear-gradient(160deg, #2e4e7b, #00132f);
  clip-path: polygon(-24% 0, 124% 0, 50% 98%);
  transform-origin: 50% 0;
  /* backface-visibility: hidden; */
  transition: transform 1s ease;
}
.envelope-front {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 8px;
  background: linear-gradient(145deg, #2e4e7b, #00132f);
  clip-path: polygon(0 25%, 50% 77%, 100% 25%, 100% 100%, 0 100%);
}
.envelope-copy {
  padding-top: 20px;
  right: 12px;
  left: 12px;
  text-align: center;
}
.envelope-copy .eyebrow {
  font-size: 9px;
  letter-spacing: 0.18em;
}
.envelope-copy h1 {
  margin: 3px 0;
  color: #0f3455;
  font-family: var(--font-script);
  font-size: clamp(25px, 7vw, 36px);
  font-weight: 400;
  line-height: 1.2;
}
.envelope-copy h1 span {
  color: #6a81ae;
}
.envelope-copy p {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.envelope-open {
  position: absolute;
  top: 73%;
  left: 50%;
  z-index: 7;
  display: grid;
  width: 76px;
  aspect-ratio: 1;
  place-items: center;
  padding: 0;
  border: 2px solid #f5d6c6;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fdfaf5, #ffe8ca 75%);
  box-shadow: 0 3px 8px #61475d55, inset 0 0 0 3px #ffffff30;
  color: #fffaf6;
  font-family: var(--font-script);
  font-size: 21px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.envelope-open:hover {
  box-shadow: 0 5px 14px #61475d66, inset 0 0 0 3px #ffffff40;
  transform: translate(-50%, -50%) scale(1.06);
}
.envelope-open:active {
  transform: translate(-50%, -50%) scale(0.97);
}
.envelope-open:disabled {
  cursor: default;
}
.envelope-open svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 1px #61475d33);
}
.envelope-hint {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.04em;
}

@keyframes openFlap {
  20% {
    transform: rotateX(0) translateY(-10px);
  }

  50% {
    transform: rotateX(180deg);
    /* transform: translateY(20px); */
  }

  100% {
    z-index: 0;
    /* transform: rotateX(180deg); */
    /* top: -125px; */
  } 
}

.envelope-screen.opening .envelope-flap {
  animation: openFlap 2s forwards;
}
.envelope-screen.opening .envelope-card {
  transform: translateY(-70%);
}

.envelope-screen.opening .envelope-copy {
  transform: translateY(-70%);
}

/* Typography helpers */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #0f3455;
}
.script {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.35;
  color: #0f3455;
  font-size: 40px;
}
.note {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.caps {
  text-transform: uppercase;
}

.section {
  position: relative;
  padding: 32px 28px;
  text-align: center;
}
.section-title {
  font-size: clamp(36px, 10vw, 50px);
  margin: 10px 0 24px;
}
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px auto;
  color: #143896;
}
.divider::before,
.divider::after {
  content: "";
  width: 56px;
  height: 1px;
  background: #6a81ae;
}
.divider span {
  font-size: 18px;
}

.high-light {
  font-size: 35px !important;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: min(190vw, 900px);
  min-height: 680px;
  background: #ded5d6;
}
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 47% 0 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    #fcf9f500 0%,
    #fcf9f5ed 25%,
    #fcf9f5 55%
  );
}
.hero-inner {
  position: absolute;
  inset: auto 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 16px 28px;
  text-align: center;
}
.hero .eyebrow {
  letter-spacing: 0.3em;
}
.hero .divider {
  margin: 6px auto 10px;
}
.hero h1 {
  margin: 10px 0 4px;
  font-family: var(--font-script);
  font-size: clamp(26px, 7.4vw, 44px);
  font-weight: 400;
  white-space: nowrap;
  line-height: 1.2;
  /* color: #0f3455; */
  color: #0f3455;
}
.amp {
  font-family: var(--font-script);
  font-size: 0.8em;
  line-height: 1;
  color: #6a81ae;
}
.hero-date {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Playfair Display", var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-date span {
  padding: 0 14px;
}
.hero-date .day {
  border-left: 1px solid #0f3455;
  border-right: 1px solid #0f3455;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  color: #0f3455;
}
.hero-time {
  margin: 8px 0 16px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 26px;
  border: 0;
  border-radius: 999px;
  background: #0f3455;
  box-shadow: 0 6px 18px #61475d40;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  color: #fff;
  transition: background-color 0.2s;
}
.outline-link:hover {
  background: #0f3455;
}

/* Intro */
.intro {
  padding: 28px 16px 30px;
  text-align: center;
}
.intro-quote {
  font-family: var(--font-script);
  font-size: clamp(20px, 5.4vw, 26px);
  line-height: 1.6;
  color: var(--ink);
}
.intro-title {
  margin-top: 18px;
  font-family: "Dancing Script", cursive;
  font-weight: 500;
  font-size: clamp(36px, 9.5vw, 50px);
  line-height: 1.2;
  color: #0f3455;
}

/* Families */
.families {
  padding-bottom: 40px;
}
.family-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.family-row + .family-row {
  margin-top: 30px;
}
.family-photo {
  flex-shrink: 0;
  width: 50%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}
.family-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.family-photo.left {
  border-radius: 0 60px 0 60px;
}
.family-photo.right {
  border-radius: 60px 0 60px 0;
}
.family-info {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  text-align: center;
}
.branch {
  display: block;
  width: 80%;
  margin: 0 auto 10px;
}
.branch.flip {
  transform: scaleX(-1);
}
.family-title {
  margin-bottom: 18px;
  font-family: "Playfair Display", var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}
.parents {
  margin-bottom: 16px;
  font-family: "Playfair Display", var(--font-serif);
  font-size: clamp(12px, 3.4vw, 14px);
  font-weight: 600;
  line-height: 1.6;
}
.role {
  padding-left: 10px;
  text-align: left;
  font-family: "Dancing Script", cursive;
  font-size: 18px;
}
.name {
  font-family: var(--font-script);
  font-size: clamp(34px, 9vw, 46px);
  line-height: 1.2;
  white-space: nowrap;
  color: #0f3455;
}

/* Invitation */
.invite {
  background: none
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='45' height='45' viewBox='0 0 45 45'%3E%3Ccircle cx='5' cy='7' r='1' fill='%23ddb8d0' opacity='.4'/%3E%3C/svg%3E");
}
.invite .guest {
  margin: 8px 0 12px;
  font-size: clamp(40px, 11vw, 54px);
}
.invite p {
  font-size: 18px;
  line-height: 1.6;
}
.invite .eyebrow {
  margin-top: 18px;
}
.event-date {
  margin: 6px 0 4px;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: #0f3455;
}
.venue {
  margin: 6px 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f3455;
}
.venue-card {
  max-width: 410px;
  margin: 26px auto 0;
  padding: 20px;
  border: 1px solid #e3d3dc;
  border-radius: 16px;
  background: #fffaf8;
}
.venue-card p {
  margin: 8px 0;
}
.venue-map {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 12px;
  background: #eee;
}
.venue-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-link {
  display: inline-block;
  margin-top: 10px;
  padding-bottom: 3px;
  border-bottom: 1px solid #c4a3bd;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  color: #0f3455;
}
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 390px;
  margin: 26px auto 0;
}
.countdown div {
  padding: 14px 6px;
  border-radius: 8px;
  background: #0f3455;
  color: #fff;
}
.countdown strong {
  display: block;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.countdown small {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Calendar */
.dresscode {
  position: relative;
  padding: 50px 0 44px;
}

.calendar-frame {
  position: relative;
  margin: 0 10px;
  padding: 24px 0;
  border: 2px solid #0f3455;
}
.calendar {
  position: relative;
  /* margin-right: 12px; */
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #2e2424;
}
.calendar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.55;
}
.cal-grid {
  position: absolute;
  inset: 18px 12px 12px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  justify-items: center;
  font-family: var(--font-sans);
  font-size: clamp(14px, 4.2vw, 18px);
  font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 4px #0008;
}
.cal-grid .wedding-day {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 46px;
  height: 42px;
  padding-bottom: 4px;
  font-weight: 700;
  color: #fff;
  text-shadow: none;
}
.cal-grid .wedding-day::before {
  content: "";
  position: absolute;
  inset: -10px -12px -8px;
  z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cdefs%3E%3ClinearGradient id='heart-gradient' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%234a90ff'/%3E%3Cstop offset='100%25' stop-color='%230b3eaf'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12 21 C-6 9 3 -4 12 5 C21 -4 30 9 12 21Z' fill='url(%23heart-gradient)'/%3E%3C/svg%3E")
    center / contain no-repeat;
  filter: drop-shadow(0 2px 4px #0006);
  animation: beat 1.4s ease-in-out infinite;
}
.cal-tag {
  position: absolute;
  right: -2px;
  bottom: 0;
  z-index: 2;
  padding: 16px 8px;
  background: #0f3455;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 16px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.ceremony {
  position: relative;
  padding: 36px 10px 6px;
  text-align: center;
}
.ceremony h3 {
  font-family: "Playfair Display", var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
}
.cer-time {
  margin: 4px 0 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.cer-date {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Playfair Display", var(--font-serif);
  font-size: clamp(18px, 5.4vw, 24px);
  font-weight: 600;
}
.cer-date span {
  padding: 0 clamp(10px, 4vw, 18px);
}
.cer-date .day {
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  font-size: clamp(38px, 11vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  color: #0f3455;
}
.cer-lunar {
  margin: 8px 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
}
.cer-place {
  display: inline-block;
  width: 60%;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
}
.flower-cluster {
  position: absolute;
  z-index: 3;
  width: 90px;
  height: 90px;
  pointer-events: none;
  opacity: 0.9;
  background:
    radial-gradient(circle at 30% 30%, #b49ad6 0 9px, transparent 10px),
    radial-gradient(circle at 55% 45%, #d8a8d4 0 12px, transparent 13px),
    radial-gradient(circle at 40% 65%, #9c84c9 0 8px, transparent 9px),
    radial-gradient(circle at 70% 25%, #c7b5e6 0 6px, transparent 7px),
    radial-gradient(circle at 72% 70%, #e2c1e0 0 7px, transparent 8px),
    radial-gradient(circle at 20% 55%, #5a4a9a 0 4px, transparent 5px);
}
.flower-cluster.top-left {
  top: -30px;
  left: -20px;
}
.flower-cluster.bottom-right {
  right: -10px;
  bottom: -10px;
}
@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

/* Timeline */
.timeline {
  padding: 20px 10px 50px;
  text-align: center;
}
.timeline .section-script {
  font-family: "Dancing Script", cursive;
  font-weight: 500;
  font-size: clamp(42px, 11vw, 52px);
  line-height: 1.2;
  color: #0f3455;
}
.tl-items {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
}
.tl-item {
  width: 30%;
}
.tl-icon {
  width: 90px;
  max-width: 100%;
  height: 80px;
}
.tl-time {
  margin-top: 20px;
  font-family: var(--font-sans);
  font-size: clamp(20px, 5.6vw, 24px);
}
.tl-label {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: clamp(14px, 4vw, 17px);
}

/* Gallery – carousel xoay ngang 25 ảnh */
.gallery {
  --w: min(78vw, 400px);
  --h: calc(var(--w) * 1.25);
  /* Bán kính cho 25 ảnh: (w/2) / tan(180deg/25), cộng thêm khoảng hở. */
  --gap: 16px;
  --r: calc(var(--w) * 3.958 + var(--gap));
  padding: 10px 0 50px;
  text-align: center;
}
.wheel-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, calc(var(--w) * 1.6));
  height: var(--h);
  margin-inline: auto;
  overflow: hidden;
  perspective: 600px;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}
.wheel {
  position: relative;
  width: var(--w);
  height: var(--h);
  transform-style: preserve-3d;
  transform: translateZ(calc(var(--r) * -1)) rotateY(var(--rot, 0deg));
  transition: transform 2s cubic-bezier(0.65, 0, 0.35, 1);
}
.wheel.dragging {
  transition: none;
}
.wheel-stage:active {
  cursor: grabbing;
}
.wheel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  backface-visibility: hidden;
  box-shadow: 0 10px 30px #49353b33;
  filter: brightness(0.55) saturate(0.8);
  transform:
    rotateY(calc(var(--i) * var(--step-angle, 14.4deg))) translateZ(var(--r));
  transition: filter 0.8s ease;
  cursor: pointer;
}
.wheel-slide.active {
  filter: none;
  cursor: zoom-in;
}
.wheel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.wheel-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #0f3455;
  border-radius: 50%;
  background: #fff;
  color: #0f3455;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.wheel-btn:hover {
  background: #0f3455;
  color: #fff;
}
.wheel-dots {
  display: flex;
  gap: 7px;
}
.wheel-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #878bb3;
  cursor: pointer;
  transition: width 0.3s, background-color 0.3s;
}
.wheel-dots button.active {
  width: 22px;
  background: #0f3455;
}

/* RSVP */
.rsvp {
  /* background: #f8f1ee; */
}
.rsvp .quote {
  max-width: 420px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.7;
  color: #675d5a;
  text-wrap: balance;
}
.rsvp .eyebrow {
  margin-top: 18px;
  color: var(--muted);
}
.rsvp-label {
  display: block;
  margin-top: 14px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
}
.wish-label {
  display: block;
  margin: 18px auto 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.wish-combobox {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
}
.wish-combobox::after {
  position: absolute;
  top: 8px;
  right: 14px;
  color: var(--muted);
  content: "⌄";
  font-size: 18px;
  pointer-events: none;
}
.wish-search {
  display: block;
  width: 100%;
  padding: 12px 40px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
}
.wish-search:focus {
  border-color: var(--plum);
  outline-color: var(--plum);
}
.wish-search::placeholder {
  color: #8a7f7d;
}
.wish-options {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 5;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px #49353b20;
  text-align: left;
}
.wish-options[hidden] {
  display: none;
}
.wish-option {
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}
.wish-option:hover,
.wish-option.active {
  background: #f7f1ed;
}
.wish-results {
  min-height: 1.5em;
  margin: 6px auto 0;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--muted);
}
.button {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: #191719;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s;
}
.button:hover {
  background: #0f3455;
}

/* Gifts */
.gift-title {
  /* margin-bottom: 22px; */
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0f3455;
}
.gift-list {
  display: grid;
  gap: 14px;
  max-width: 420px;
  margin: auto;
}
.gift {
  display: grid;
  grid-template-columns: 74px 1fr 58px;
  align-items: center;
  gap: 10px;
  padding: 2px;
  border: 1px solid #e9dddd;
  border-radius: 16px;
  background: #fffaf7;
  box-shadow: 0 4px 16px #4a343309;
  text-align: left;
}
.gift:nth-child(even) {
  grid-template-columns: 58px 1fr 60px;
}
.portrait {
  width: 60px;
  height: 65px;
  border-radius: 12px;
  background-color: #eadfe0;
  background-repeat: no-repeat;
  background-size: 260% auto;
}
.portrait.bride {
  background-image: url("../thiep-cuoi-assets/TN__2523.jpg");
  background-position: 64% 1%;
}
.portrait.groom {
  background-image: url("../thiep-cuoi-assets/gallery-1.jpg");
  background-position: 13% 14%;
}
.gift-copy {
  text-align: center;
  font-size: 16px;
  line-height: 1.4;
}
.gift-copy b {
  display: block;
  margin: 2px 0;
  font-size: 20px;
  font-weight: 600;
  color: #0f3455;
}
.gift-copy small {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
}
.gift-icon {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 29px;
  text-align: center;
  cursor: pointer;
}

/* Thank you */
.thanks {
  position: relative;
  overflow: hidden;
  background: #ddd;
}
.thanks img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
footer {
  padding: 24px 16px 35px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Lightbox & toast */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #211c20ed;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: min(95vw, 700px);
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}
.lightbox button {
  position: absolute;
  top: 14px;
  right: 18px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 36px;
  line-height: 1.2;
  cursor: pointer;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 20;
  padding: 12px 18px;
  border-radius: 999px;
  background: #393139;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 30px);
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Animation nhẹ nhàng */
@keyframes kenburns {
  from {
    transform: scale(1) translateY(0);
  }
  to {
    transform: scale(1.08) translateY(-1.5%);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 #d98a9b88;
  }
  100% {
    box-shadow: 0 0 0 12px #d98a9b00;
  }
}
@keyframes fall {
  0% {
    transform: translate3d(0, -8vh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: var(--o, 0.7);
  }
  50% {
    transform: translate3d(var(--sway, 40px), 50vh, 0) rotate(180deg);
  }
  90% {
    opacity: var(--o, 0.7);
  }
  100% {
    transform: translate3d(calc(var(--sway, 40px) * -0.6), 108vh, 0)
      rotate(360deg);
    opacity: 0;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-photo {
  animation: kenburns 20s ease-in-out infinite alternate;
}
.hero-inner > * {
  animation: rise 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-inner > :nth-child(1) {
  animation-delay: 0.3s;
}
.hero-inner > :nth-child(2) {
  animation-delay: 0.55s;
}
.hero-inner > :nth-child(3) {
  animation-delay: 0.8s;
}
.hero-inner > :nth-child(4) {
  animation-delay: 1s;
}
.hero-inner > :nth-child(5) {
  animation-delay: 1.15s;
}
.hero-inner > :nth-child(6) {
  animation-delay: 1.3s;
}
.divider span,
.gift-icon {
  display: inline-block;
  animation: float 4.5s ease-in-out infinite;
}

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 1.1s ease,
    transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

.petals {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}
.petal {
  position: absolute;
  top: 0;
  width: var(--s, 12px);
  height: calc(var(--s, 12px) * 1.3);
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #f7cfd6, #e99c9e);
  opacity: 0;
  will-change: transform;
  animation: fall var(--t, 16s) linear var(--dl, 0s) infinite;
}

.music {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 15;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #ffffffaa;
  border-radius: 50%;
  background: #0f3455;
  box-shadow: 0 4px 16px #49353b55;
  color: #fff;
  cursor: pointer;
  animation: pulse-ring 2.4s ease-out infinite;
}
.music svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.music .i-pause {
  display: none;
}
.music.playing {
  animation: none;
}
.music.playing .i-play {
  display: none;
}
.music.playing .i-pause {
  display: block;
}
.music.playing::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px dashed #0f3455;
  border-radius: 50%;
  animation: spin 6s linear infinite;
}

.map-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 14;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 20px #49353b44;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.map-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px #49353b55;
}
.map-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .section {
    padding-left: 20px;
    padding-right: 20px;
  }
  .event-date {
    font-size: 38px;
  }
  .countdown strong {
    font-size: 24px;
  }
}
@media (min-width: 700px) {
  .page {
    margin: 5px auto;
    border-radius: 12px;
  }
  .hero {
    min-height: 740px;
  }
  .section {
    padding-left: 48px;
    padding-right: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .petals {
    display: none;
  }
}
@media print {
  body {
    background: #fff;
  }
  .page {
    width: 100%;
    max-width: none;
    margin: 0;
    box-shadow: none;
  }
  .outline-link,
  .button,
  .lightbox,
  .toast,
  .music,
  .map-btn,
  .petals {
    display: none !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .section {
    break-inside: avoid;
  }
}
