/* Libre Baskerville thiếu chữ có dấu thanh (U+1EA0–1EF1): mượn EB Garamond, phóng cho bằng chiều cao chữ Baskerville.
   shortcut: link cứng file v33 của Google Fonts; nếu Google đổi link thì tự rơi về 'EB Garamond' trong --caps */
@font-face {
  font-family: 'Baskerville VN';
  src: url(https://fonts.gstatic.com/s/ebgaramond/v33/SlGDmQSNjdsmc35JDF1K5E55YMjF_7DPuGi-2fRkC49_S6w.woff2) format('woff2');
  unicode-range: U+1EA0-1EF1;
  size-adjust: 120%;
}

:root {
  --wine: #5e0f1a;
  --wine-deep: #3a0610;
  --ink: #6a1422;
  --ivory: #efe7da;
  --ivory-2: #e2d6c3;
  --gold: #b8975a;
  --gold-ink: #86662f;
  --text: #4a2a2a;
  --muted: #7a5a55;
  /* Font theo mẫu loimoi.io.vn/mai-lan-trang */
  --serif: 'EB Garamond', 'Times New Roman', serif;
  --caps: 'Libre Baskerville', 'Baskerville VN', 'EB Garamond', serif;
  --script: 'Great Vibes', cursive;
  --mono: 'Great Vibes', cursive;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 .1 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --back: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body {
  font: 18px/1.5 var(--serif);
  color: var(--text);
  background: var(--ivory-2) var(--grain);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Lớp phủ toàn trang ---------- */
.window-shadow {
  position: fixed; inset: -10%; z-index: 50; pointer-events: none;
  background: url(assets/web/window-shadow.webp) center / cover;
  mix-blend-mode: multiply; opacity: .9;
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(4%, 2%) rotate(1deg); } }

.light-sweep {
  position: fixed; inset: 0; z-index: 46; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 246, 225, .7) 47%, rgba(255, 238, 200, .35) 53%, transparent 68%);
}
.light-sweep.go { animation: lightSweep 1.7s cubic-bezier(.5, 0, .5, 1); }
@keyframes lightSweep { from { opacity: 1; translate: -100% 0; } to { opacity: 1; translate: 100% 0; } }

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

/* ---------- Chữ ---------- */
.caps { font-family: var(--caps); font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); font-size: 14px; }
.caps i, h1 i { font: 1.5em/1 var(--script); letter-spacing: 0; color: var(--gold); margin: 0 .12em; }
.script { font: clamp(28px, 8.6vw, 40px)/1.25 var(--script); color: var(--ink); }
.script.big { font-size: clamp(40px, 11vw, 52px); }
.small { font-size: 15px; font-style: italic; color: var(--muted); }
.label { font: 400 11px var(--caps); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-ink); margin-top: 16px; }
.lead { font-size: 18px; font-style: italic; text-wrap: balance; }
.line { display: block; }
.amp { font: 34px/1 var(--script); color: var(--gold); }

.mono { font: 128px/1 var(--mono); color: var(--ink); display: flex; justify-content: center; padding-right: .15em; }
.mono span + span { margin-left: -.42em; translate: 0 .16em; }
.mono.light { color: #f6eee2; font-size: 92px; }
.mono.sm { font-size: 64px; }

.btn {
  position: relative; overflow: hidden; display: inline-block; cursor: pointer; text-decoration: none;
  font: 400 12px var(--caps); letter-spacing: .18em; text-transform: uppercase; color: var(--ivory);
  background: var(--wine); border: 1px solid var(--gold); border-radius: 999px; padding: 12px 32px;
  box-shadow: 0 6px 18px rgba(94, 15, 26, .25), inset 0 0 0 3px var(--wine), inset 0 0 0 4px rgba(184, 151, 90, .55);
  transition: background .3s;
}
.btn:hover { background: var(--wine-deep); }
.btn:disabled { opacity: .6; cursor: wait; }
.shimmer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 210, .45) 50%, transparent 65%) no-repeat 100% 0 / 250% 100%;
  animation: shimmer 3.6s ease-in-out 1s infinite;
}
@keyframes shimmer { 50%, 100% { background-position: 0 0; } }

/* ---------- Hiệu ứng vào cảnh: gốc ẩn, .in hiện (giảm chuyển động thì hiện ngay) ---------- */
.rv { opacity: 0; filter: blur(6px); translate: 0 14px; transition: opacity 1s ease, filter 1s ease, translate 1s ease; transition-delay: var(--t0, 0s); }
.rv.from-l { translate: -40px 0; }
.rv.from-r { translate: 40px 0; }
.in .rv { opacity: 1; filter: none; translate: 0 0; }

.pop { opacity: 0; scale: .4; transition: opacity .6s ease var(--t0, 0s), scale .9s var(--back) var(--t0, 0s); }
.in .pop { opacity: 1; scale: 1; }

/* Từng ký tự (main.js tách) */
[data-split] { --step: 45ms; }
[data-split=random] { --step: 70ms; }
.ch { opacity: 0; filter: blur(4px); transition: opacity .5s ease, filter .5s ease; transition-delay: calc(var(--t0, 0s) + var(--i) * var(--step)); }
.in .ch { opacity: 1; filter: none; }

/* Viết tay: lộ dần từ trái sang, lề âm để không cắt nét bay của font */
.write:not(.mono), .mono.write span { clip-path: inset(-50% 100% -50% -50%); transition: clip-path 1.4s cubic-bezier(.45, .05, .55, .95) var(--t0, 0s); }
.mono.write span { transition-duration: .9s; }
.mono.write span + span { transition-delay: calc(var(--t0, 0s) + .8s); }
.in .write:not(.mono), .in .mono.write span { clip-path: inset(-50%); }

/* Hoa, ngọc trai, nhung */
.fl, .deco { position: absolute; z-index: 1; pointer-events: none; }
[data-depth] { transform: translateY(var(--py, 0px)); }
.fl {
  opacity: 0; scale: .75;
  transition: opacity 1.2s ease var(--t0, 0s), scale 2s var(--ease-out) var(--t0, 0s), clip-path 2.4s ease var(--t0, 0s);
  animation: sway 8s ease-in-out infinite alternate;
}
.in .fl { opacity: 1; scale: 1; }
.cascade { clip-path: inset(-10% -10% 100% -10%); }
.grow-up { clip-path: inset(100% -10% -10% -10%); }
.in .cascade, .in .grow-up { clip-path: inset(-10%); }
.fl-tr { transform-origin: top right; }
.fl-b { transform-origin: bottom center; }
.hang { transform-origin: top center; animation: swing 4.5s ease-in-out infinite alternate; }
@keyframes sway { from { rotate: -1.5deg; } to { rotate: 1.5deg; } }
@keyframes swing { from { rotate: -4deg; } to { rotate: 4deg; } }

.deco {
  opacity: 0;
  transition: opacity 1s ease var(--t0, 0s), translate 1.6s var(--ease-out) var(--t0, 0s), rotate 1.6s var(--ease-out) var(--t0, 0s), clip-path 2.6s ease-in-out var(--t0, 0s);
}
.in .deco { opacity: 1; translate: 0 0; rotate: 0deg; }
.draw { clip-path: inset(-5% 100% -5% -5%); }
.in .draw { clip-path: inset(-5%); }

/* Bướm: cánh vỗ bằng scaleX quanh trục giữa */
.bfly { position: absolute; z-index: 5; width: 42px; pointer-events: none; }
.bfly img { width: 100%; animation: flap .18s ease-in-out infinite alternate; }
@keyframes flap { to { scale: .2 1; } }
@keyframes flapSlow { 0%, 70% { scale: 1 1; } 100% { scale: .35 1; } }

/* Cánh hoa rơi (main.js sinh) */
.petals { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.petals img {
  position: absolute; top: -40px; opacity: .9;
  animation: fall var(--dur) linear var(--delay) infinite, flutter calc(var(--dur) / 4) ease-in-out var(--delay) infinite alternate;
}
@keyframes fall { to { translate: var(--sway) calc(100svh + 80px); rotate: calc(var(--spin) * 540deg); } }
@keyframes flutter { to { scale: .35 1; } }

/* ---------- Màn hình mở thiệp ---------- */
.cover {
  position: fixed; inset: 0; z-index: 40; width: min(100%, 480px); margin-inline: auto;
  display: grid; place-items: center; overflow: hidden; container-type: size;
  background: var(--ivory) var(--grain);
  transition: opacity 1s .6s ease;
}
.cover.out { opacity: 0; pointer-events: none; }
.dolly img { position: absolute; pointer-events: none; }
.d-far {
  z-index: 1; animation: settle 2.8s var(--ease-out) var(--dl) both;
  transition: scale 1.4s cubic-bezier(.6, 0, .4, 1), opacity 1.1s;
}
.d-flip { rotate: 180deg; }
.d-near { z-index: 3; animation: passBy 3.6s cubic-bezier(.55, 0, .8, .45) var(--dl) both; }
@keyframes settle { from { transform: scale(var(--s0)); filter: blur(12px); } }
@keyframes passBy {
  from { transform: translate(0, 0) scale(var(--s0)); filter: blur(2px); }
  to { transform: translate(var(--x), var(--y)) scale(var(--s1)); filter: blur(18px); }
}
.cover.out .d-far { scale: 1.8; opacity: 0; }

.cover-in {
  position: relative; z-index: 2; display: grid; justify-items: center; gap: 6px; text-align: center;
  transition: scale 1.5s cubic-bezier(.7, 0, .84, 0), opacity .9s ease .5s, filter 1.2s ease;
}
.cover.out .cover-in { scale: 7; opacity: 0; filter: blur(10px); }
.kicker { font-style: italic; font-size: 26px; color: var(--ink); }
/* Màn mở chạy ngay khi tải nên dùng animation thay cho transition theo .in */
.cover .ch { opacity: 1; filter: none; transition: none; animation: chIn .5s calc(var(--t0) + var(--i) * var(--step)) both; }
.cover .mono.write span { clip-path: none; transition: none; animation: writeIn .9s var(--t0) both; }
.cover .mono.write span + span { animation-delay: calc(var(--t0) + .8s); }
.cover .guest-label { margin-top: 14px; animation: fadeUp .8s ease 4.3s both; }
.guest { text-wrap: balance; }
.cover .btn { margin-top: 22px; animation: fadeUp .9s ease 5.1s both, glow 2.6s ease-in-out 6s infinite; }
@keyframes chIn { from { opacity: 0; filter: blur(4px); } }
@keyframes writeIn { from { clip-path: inset(-50% 100% -50% -50%); } to { clip-path: inset(-50%); } }
@keyframes fadeUp { from { opacity: 0; translate: 0 12px; } }
@keyframes glow { 50% { box-shadow: 0 6px 26px rgba(184, 151, 90, .6), inset 0 0 0 3px var(--wine), inset 0 0 0 4px rgba(184, 151, 90, .55); } }

.bfly-cover { top: 33%; left: 66%; width: 46px; rotate: 18deg; animation: flyIn 2.8s cubic-bezier(.4, 0, .3, 1) 2.6s both; }
.bfly-cover img { animation: flap .18s ease-in-out 2.6s 16 alternate, flapSlow 2.2s ease-in-out 5.5s infinite alternate; }
@keyframes flyIn {
  from { translate: 60cqi 90cqh; rotate: -50deg; }
  40% { translate: 28cqi 30cqh; rotate: -20deg; }
  75% { translate: -14cqi 6cqh; rotate: 30deg; }
}

/* ---------- Khung chung ---------- */
.card { position: relative; max-width: 480px; margin: 0 auto; overflow: hidden; background: var(--ivory) var(--grain); box-shadow: 0 0 60px rgba(60, 20, 20, .15); }
.scene {
  position: relative; min-height: 100vh; min-height: 100svh; padding: 72px 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  container-type: inline-size; scroll-snap-align: start;
}
.scene > :not(.fl, .deco, .bfly, .petals) { position: relative; z-index: 2; }
/* Cảnh khuất màn hình thì dừng các vòng lặp cho đỡ tốn pin */
.scene:not(.on) *, .scene:not(.on) *::after { animation-play-state: paused; }

/* ---------- 1. Khung gương ---------- */
.hero { padding: 40px 10px; }
.mirror { position: relative; width: 100%; max-width: 440px; aspect-ratio: 2 / 3; container-type: inline-size; }
.mirror-in {
  position: absolute; inset: 15% 17% 13%; border-radius: 50%; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12% 10%;
  background: radial-gradient(ellipse at 50% 35%, #8a1f2c 0%, var(--wine) 45%, var(--wine-deep) 100%);
  box-shadow: inset 0 0 50px rgba(0, 0, 0, .5);
}
.frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; z-index: 1; }
.frame, .mirror-in { opacity: 0; scale: .92; filter: blur(10px); transition: opacity 1.2s ease, scale 1.6s var(--ease-out), filter 1.4s ease; }
.in .frame, .in .mirror-in { opacity: 1; scale: 1; filter: none; }
/* Ánh vàng chạy qua khung: mask bằng chính ảnh khung */
.shine {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen;
  -webkit-mask: url(assets/web/frame-gold-oval.webp) center / contain no-repeat;
  mask: url(assets/web/frame-gold-oval.webp) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 240, 200, .8) 50%, transparent 60%) no-repeat 100% 0 / 300% 100%;
  animation: shine 7s ease-in-out 2.5s infinite;
}
@keyframes shine { 45%, 100% { background-position: 0 0; } }
/* cỡ chữ theo bề ngang khung để giữ bố cục ở mọi màn hình */
.mirror-in .mono.light { font-size: 21cqi; }
.mirror-in .caps { color: #f3e6d0; font-size: 2.5cqi; }
.mirror-in h1 { font: 400 3.4cqi/1.4 var(--caps); letter-spacing: .1em; text-transform: uppercase; color: #f6eee2; margin: 2px 0 4px; }
.mirror-in h1 > span, .mirror-in .date { white-space: nowrap; }
.mirror-in .date { font-size: 2.6cqi; }
.mirror-in .venue { font-size: 2.3cqi; opacity: .85; }
.quote { font-style: italic; font-size: 3.1cqi; line-height: 1.4; color: #e9d9c2; margin-top: 6px; }
.hero .fl-tr { top: -2%; right: -16%; width: 60%; }
.hero .fl-b { bottom: -3%; left: 5%; width: 90%; }
.fl-orchid { top: 40%; left: -9%; width: 28%; transform-origin: left center; }
.hang-hero { top: 20%; right: -1%; width: 12%; }
.bfly-hero { top: 5%; left: 16%; animation: orbit 14s ease-in-out infinite; }
@keyframes orbit {
  0% { translate: 0 0; rotate: 30deg; }
  25% { translate: 34cqi -8cqi; rotate: 95deg; }
  50% { translate: 62cqi 6cqi; rotate: 150deg; }
  75% { translate: 30cqi 16cqi; rotate: 260deg; }
  100% { translate: 0 0; rotate: 390deg; }
}

.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff7e6; box-shadow: 0 0 6px 2px rgba(255, 236, 190, .7); opacity: 0; animation: twinkle 4s var(--t) infinite; }
@keyframes twinkle { 50% { opacity: .9; transform: scale(1.4); } }

/* ---------- 2. Lời mời ---------- */
.hy { font: 700 44px/1 'Noto Serif SC', serif; color: var(--wine); margin: 2px 0 12px; animation: hyGlow 3.2s ease-in-out infinite alternate; }
@keyframes hyGlow { to { text-shadow: 0 0 18px rgba(184, 151, 90, .7); } }
.families { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: 100%; margin-bottom: 14px; font-size: 16px; line-height: 1.45; }
.families .caps { font-size: 12px; color: var(--gold-ink); margin-bottom: 4px; }
.addr { font-size: 14px; font-style: italic; color: var(--muted); margin-top: 4px; }
.invite .fl-tr { top: -3%; right: -20%; width: 58%; }
.invite .fl-b { bottom: -2%; left: -5%; width: 90%; }
.el-side-l { top: 44%; left: -8%; width: 22%; transform-origin: left center; }
.pearls { width: 52%; }
.pearls-tl { top: 1%; left: -12%; }
.pearls-tr { top: 1%; right: -12%; scale: -1 1; }
.bfly-invite { top: 21%; right: 13%; rotate: -20deg; }
.bfly-invite img, .bfly-rsvp img { animation: flapSlow 2.4s ease-in-out infinite alternate; }

/* ---------- 3. Thời gian & địa điểm ---------- */
.ribbon { width: 80%; animation: wave 5s ease-in-out infinite alternate; }
.ribbon-top { top: -3%; left: -24%; }
.ribbon-bot { bottom: -3%; right: -24%; }
.fly-l { translate: -70% -30%; rotate: -14deg; }
.fly-r { translate: 70% 30%; rotate: -14deg; }
@keyframes wave { 50% { scale: 1.04 .92; } }
.when { padding: 130px 64px 100px 20px; } /* chừa chỗ cho dải nhung trên/dưới và dải hoa mép phải */
.side-r { top: 4%; right: -4%; width: 60%; transform-origin: top right; }
.bfly-when { top: 9%; left: -12%; animation: cross 11s linear infinite; }
@keyframes cross {
  0% { translate: 0 0; rotate: 75deg; }
  30% { translate: 40cqi 6cqi; rotate: 95deg; }
  60% { translate: 80cqi -2cqi; rotate: 80deg; }
  100% { translate: 130cqi 4cqi; rotate: 90deg; }
}
.when .btn { margin-top: 8px; }
.when .script:not(.big, .guest) { margin-top: 14px; }
.when .label:first-of-type { margin-top: 0; }
.countdown { display: flex; gap: 10px; margin: 18px 0 4px; perspective: 400px; }
.countdown div {
  width: 66px; padding: 10px 0 8px; border: 1px solid rgba(184, 151, 90, .6); border-radius: 10px; background: rgba(255, 255, 255, .35);
  opacity: 0; transform: rotateX(-90deg); transform-origin: top;
  transition: opacity .4s ease, transform .8s var(--back); transition-delay: calc(var(--t0, 0s) + var(--k) * .15s);
}
.in .countdown div { opacity: 1; transform: none; }
.countdown b { display: block; font: 500 26px/1.2 var(--serif); color: var(--wine); font-variant-numeric: lining-nums tabular-nums; }
.countdown span { font: 400 9px var(--caps); letter-spacing: .15em; text-transform: uppercase; color: var(--gold-ink); }
.tick { animation: tick .45s ease-out; }
@keyframes tick { from { translate: 0 -45%; opacity: 0; } }
.contact { display: grid; gap: 4px; }
.contact a { color: var(--ink); text-decoration: none; font: 400 13px var(--caps); letter-spacing: .08em; }

/* ---------- 4. Xác nhận tham dự ---------- */
.side-l { top: 2%; left: -6%; width: 40%; transform-origin: top left; }
.bfly-rsvp { top: 12%; left: 16%; rotate: 25deg; animation: hover 6s ease-in-out infinite alternate; }
@keyframes hover { to { translate: 6cqi -3cqi; rotate: 40deg; } }
.seal { width: 92px; margin-bottom: -4px; }
.stamp { opacity: 0; scale: 2; rotate: -30deg; transition: opacity .25s ease var(--t0), scale .7s var(--back) var(--t0), rotate .7s ease var(--t0); }
.in .stamp { opacity: 1; scale: 1; rotate: -8deg; }
#rsvp { width: 100%; max-width: 380px; display: grid; gap: 14px; text-align: left; margin-top: 10px; }
#rsvp label, legend { display: grid; gap: 4px; font: 400 11px var(--caps); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
#rsvp input:not([type=radio]), #rsvp select, #rsvp textarea {
  width: 100%; font: 17px var(--serif); color: var(--text); padding: 10px 12px;
  border: 1px solid rgba(134, 102, 47, .45); border-radius: 8px; background: rgba(255, 255, 255, .55);
}
fieldset { border: 0; padding: 0; display: grid; gap: 6px; }
legend { padding: 0; margin-bottom: 4px; }
#rsvp .opt { display: flex; align-items: center; gap: 8px; font: 17px var(--serif); letter-spacing: 0; text-transform: none; color: var(--text); }
.opt input { accent-color: var(--wine); width: 18px; height: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#rsvp .btn { justify-self: center; margin-top: 4px; }
#rsvp-note { text-align: center; min-height: 1.5em; }

/* ---------- 5. Album ---------- */
.album-wrap { justify-content: flex-start; padding-inline: 16px; }
.divider { width: 78%; margin: 2px 0 6px; }
.draw-c { clip-path: inset(0 50%); transition: clip-path 1.4s ease-in-out var(--t0, 0s); }
.in .draw-c { clip-path: inset(0); }
.album { columns: 2; column-gap: 10px; width: 100%; margin-top: 12px; }
.album button {
  display: block; width: 100%; padding: 0; margin: 0 0 10px; border: 0; background: none; cursor: zoom-in; break-inside: avoid;
  border-radius: 6px; overflow: hidden; box-shadow: 0 4px 14px rgba(60, 20, 20, .15);
  opacity: 0; scale: .9; rotate: var(--r, 2deg); filter: blur(6px);
  transition: opacity .8s ease, scale 1s var(--ease-out), rotate 1s ease, filter .8s ease; transition-delay: var(--dl, 0s);
}
.album button.in { opacity: 1; scale: 1; rotate: 0deg; filter: none; }
.album img { width: 100%; aspect-ratio: auto 2 / 3; object-fit: cover; transition: scale .6s; }
.album button:hover img { scale: 1.04; }

#lb { margin: auto; border: 0; padding: 0; background: none; max-width: 100vw; max-height: 100vh; overflow: visible; }
#lb::backdrop { background: rgba(20, 4, 8, .88); }
#lb img { max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: 4px; }
#lb button { position: fixed; top: 10px; right: 16px; font-size: 36px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

/* ---------- 6. Lời cảm ơn ---------- */
.swag-wrap { width: 116%; margin: 8px 0 4px; }
.swag { width: 100%; max-width: none; transform-origin: top center; animation: drape 6s ease-in-out infinite alternate; }
.unfurl {
  opacity: 0; clip-path: inset(0 50%); scale: 1 .55;
  transition: opacity .4s ease var(--t0), clip-path 1.6s cubic-bezier(.6, 0, .2, 1) var(--t0), scale 1.5s var(--back) calc(var(--t0) + .25s);
}
.in .unfurl { opacity: 1; clip-path: inset(-10%); scale: 1; }
@keyframes drape { from { rotate: -.6deg; } to { rotate: .6deg; } }
.swag-wrap .hang { position: absolute; top: 30%; width: 11%; opacity: 0; transition: opacity 1.2s ease 3.8s; }
.in .swag-wrap .hang { opacity: 1; }
.hang-l { left: 21%; }
.hang-r { right: 21%; }
.thanks .lead { font-size: 17px; max-width: 360px; }

/* ---------- Nút nhạc ---------- */
.music {
  position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--gold); background: var(--wine); color: var(--ivory); font-size: 20px; box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
.music[aria-pressed=true] { animation: spin 6s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .d-near, .petals, .bfly, #fx, .light-sweep { display: none; }
}
