/* ===== Thiệp cưới — phong cách "Ren trắng trên lụa đen" ===== */
:root {
  --w: min(100vw, 430px);
  --u: calc(var(--w) / 390);
  --taupe: #8f7964;
  --ink: #111;
  --f-caps: 'Playfair Display', 'Times New Roman', serif;
  --f-name: 'Cormorant Garamond', 'Times New Roman', serif;
  --f-amp: 'The Nautigal', 'Great Vibes', cursive;
  --f-full: 'Viaoda Libre', 'Cormorant Garamond', serif;
  --f-amp2: 'Clicker Script', cursive;
  --f-body: 'Lora', Georgia, 'Times New Roman', serif;
  --f-head: 'Tinos', 'Times New Roman', serif;
  --f-ui: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { background: #000; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: #fff;
  font-family: var(--f-body);
  background: transparent; /* để lộ nền mờ body::before khi xem trên máy tính */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lock { overflow: hidden; }
body::before {
  content: '';
  position: fixed;
  inset: -40px;
  background: #000 var(--bg) center / cover no-repeat;
  filter: blur(20px) brightness(.5);
  z-index: -1;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }

.invite {
  position: relative;
  width: var(--w);
  margin: 0 auto;
  background: #000 var(--bg) top center / 100% auto repeat-y;
  overflow: hidden;
  box-shadow: 0 0 70px rgba(0, 0, 0, .85);
  padding-bottom: calc(40 * var(--u));
}
.deco { position: absolute; pointer-events: none; overflow: visible; }

/* ---------- hiệu ứng xuất hiện khi cuộn ---------- */
[data-anim] { opacity: 0; transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); will-change: transform, opacity; }
[data-anim="up"] { transform: translateY(calc(34 * var(--u))); }
[data-anim="down"] { transform: translateY(calc(-26 * var(--u))); }
[data-anim="zoom"] { transform: scale(.9); }
[data-anim].in { opacity: 1; transform: none; }

/* ---------- 1. HERO ---------- */
.hero { position: relative; padding-top: calc(52 * var(--u)); text-align: center; }
.std { font-family: var(--f-caps); font-weight: 600; font-size: calc(15 * var(--u)); letter-spacing: .14em; text-transform: uppercase; }
.env { position: relative; width: calc(300 * var(--u)); height: calc(312 * var(--u)); margin: calc(34 * var(--u)) auto 0; }
.env-photo {
  position: absolute; left: calc(70 * var(--u)); top: 0; width: calc(212 * var(--u)); height: calc(274 * var(--u));
  transform-origin: 50% 100%; transform: translateY(calc(84 * var(--u))) rotate(0);
  transition: transform 1.8s cubic-bezier(.2, .8, .2, 1) .3s;
}
.env.in .env-photo { transform: translateY(0) rotate(5deg); }
.env-photo .frame { width: 100%; height: 100%; padding: calc(7 * var(--u)); background: #fff; box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(0, 0, 0, .5); }
.env-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.env-body { position: absolute; left: 0; bottom: 0; width: calc(300 * var(--u)); height: calc(150 * var(--u)); overflow: visible; filter: drop-shadow(0 calc(14 * var(--u)) calc(22 * var(--u)) rgba(0, 0, 0, .6)); }
.env .r1 { left: calc(-34 * var(--u)); top: calc(58 * var(--u)); width: calc(104 * var(--u)); height: calc(104 * var(--u)); }
.env .r2 { left: calc(24 * var(--u)); top: calc(134 * var(--u)); width: calc(70 * var(--u)); height: calc(70 * var(--u)); }
.env .r3 { left: calc(214 * var(--u)); top: calc(196 * var(--u)); width: calc(66 * var(--u)); height: calc(66 * var(--u)); }
.env .r4 { left: calc(-12 * var(--u)); top: calc(196 * var(--u)); width: calc(54 * var(--u)); height: calc(54 * var(--u)); }
.env .b1 { left: calc(-4 * var(--u)); top: calc(-6 * var(--u)); width: calc(70 * var(--u)); height: calc(160 * var(--u)); }
.hnames { position: relative; margin-top: calc(34 * var(--u)); padding-bottom: calc(48 * var(--u)); }
.hnames .n { position: relative; z-index: 1; font-family: var(--f-name); font-weight: 300; font-size: calc(45 * var(--u)); line-height: 1.45; text-transform: uppercase; }
.hnames .amp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -62%); font-family: var(--f-amp); font-size: calc(100 * var(--u)); color: rgba(255, 255, 255, .16); line-height: 1; z-index: 0; }

/* ---------- khung ren ---------- */
.lace {
  position: relative;
  margin: 0 calc(10 * var(--u)) calc(34 * var(--u));
  padding: calc(14 * var(--u)) calc(4 * var(--u)) calc(14 * var(--u));
  border: calc(40 * var(--u)) solid transparent;
  border-image: url('/img/lace-frame.svg') 40 / calc(40 * var(--u)) round;
  background: radial-gradient(ellipse at 50% 0%, #fff 30%, #f4f1ea 100%) padding-box;
  color: var(--ink);
  text-align: center;
  filter: drop-shadow(0 calc(12 * var(--u)) calc(20 * var(--u)) rgba(0, 0, 0, .6));
}
.lh { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: calc(17 * var(--u)); letter-spacing: .01em; text-transform: uppercase; }

/* ---------- 2. THÔNG TIN LỄ CƯỚI ---------- */
.parents { display: grid; grid-template-columns: 1fr 1px 1fr; gap: calc(10 * var(--u)); margin-top: calc(18 * var(--u)); align-items: start; }
.vsep { background: #d9d5cc; align-self: stretch; }
.pcol .side { font-family: var(--f-name); font-weight: 600; font-size: calc(10.5 * var(--u)); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); margin-bottom: calc(6 * var(--u)); }
.pcol .lbl { font-family: var(--f-body); font-weight: 400; font-size: calc(11.5 * var(--u)); color: var(--taupe); }
.pcol .nm { font-family: var(--f-body); font-weight: 600; font-size: calc(12.5 * var(--u)); line-height: 1.55; }
.pcol .ad { font-family: var(--f-body); font-weight: 400; font-size: calc(10.5 * var(--u)); color: var(--taupe); line-height: 1.5; margin-top: calc(6 * var(--u)); }
.pair { margin-top: calc(30 * var(--u)); }
.pair .full { font-family: var(--f-full); font-size: calc(24 * var(--u)); line-height: 1.25; }
.pair .role { font-family: var(--f-name); font-weight: 400; font-size: calc(10.5 * var(--u)); letter-spacing: .18em; text-transform: uppercase; color: var(--taupe); margin-top: calc(6 * var(--u)); }
.pair .amp2 { font-family: var(--f-amp2); font-size: calc(38 * var(--u)); line-height: 1.3; margin: calc(10 * var(--u)) 0; }
.evt { margin-top: calc(26 * var(--u)); }
.evt + .evt { margin-top: calc(30 * var(--u)); padding-top: calc(22 * var(--u)); border-top: 1px solid #e6e2d9; }
.evt .host { display: inline-block; font-family: var(--f-name); font-weight: 600; font-size: calc(10 * var(--u)); letter-spacing: .2em; text-transform: uppercase; color: var(--taupe); border: 1px solid #d9d2c6; border-radius: 999px; padding: calc(3 * var(--u)) calc(10 * var(--u)); margin-bottom: calc(8 * var(--u)); }
.evt .title { font-family: var(--f-body); font-weight: 400; font-size: calc(16 * var(--u)); letter-spacing: .02em; text-transform: uppercase; }
.evt .lead { font-family: var(--f-body); font-weight: 600; font-size: calc(14.5 * var(--u)); text-transform: uppercase; line-height: 1.4; }
.edate { margin-top: calc(8 * var(--u)); }
.edate .tt, .edate .big { display: grid; grid-template-columns: 1fr 1px 1fr; column-gap: calc(12 * var(--u)); align-items: center; }
.edate .t1, .edate .t2 { font-family: var(--f-head); font-size: calc(11.5 * var(--u)); letter-spacing: .06em; text-transform: uppercase; color: var(--taupe); }
.edate .t1 { text-align: right; }
.edate .t2 { text-align: left; }
.edate .big { margin-top: calc(4 * var(--u)); }
.edate .day { font-family: var(--f-body); font-weight: 400; font-size: calc(52 * var(--u)); line-height: 1; text-align: right; }
.edate .bar { width: 1px; height: calc(44 * var(--u)); background: #111; }
.edate .my { text-align: left; font-family: var(--f-head); font-size: calc(15 * var(--u)); text-transform: uppercase; line-height: 1.55; letter-spacing: .04em; }
.evt .lunar { font-family: var(--f-head); font-size: calc(11 * var(--u)); color: var(--taupe); margin-top: calc(10 * var(--u)); text-transform: uppercase; letter-spacing: .02em; }
.evt .where { font-family: var(--f-body); font-size: calc(12 * var(--u)); color: #444; margin-top: calc(10 * var(--u)); line-height: 1.5; }

/* ---------- 3. ALBUM (coverflow) ---------- */
.album { padding: 0 0 calc(30 * var(--u)); text-align: center; }
.sh { margin: 0; font-family: var(--f-head); font-weight: 700; font-size: calc(20 * var(--u)); letter-spacing: .01em; text-transform: uppercase; color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: calc(14 * var(--u)) calc(16 * var(--u)) 0; justify-content: center; }
.chip { border: 1px solid rgba(255, 255, 255, .55); background: rgba(0, 0, 0, .35); color: #fff; border-radius: 999px; padding: 6px 14px; font: 500 calc(12.5 * var(--u)) / 1.2 var(--f-ui); white-space: nowrap; }
.chip.on { background: #fff; color: #111; border-color: #fff; }
.cf { position: relative; height: calc(380 * var(--u)); margin-top: calc(18 * var(--u)); perspective: calc(1100 * var(--u)); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cf-item {
  position: absolute; left: 50%; top: 50%;
  width: calc(214 * var(--u)); height: calc(322 * var(--u)); margin: calc(-161 * var(--u)) 0 0 calc(-107 * var(--u));
  border-radius: calc(18 * var(--u)); overflow: hidden; background: #1b1b1b;
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 calc(16 * var(--u)) calc(34 * var(--u)) rgba(0, 0, 0, .65);
  transition: transform .65s cubic-bezier(.2, .8, .2, 1), opacity .5s, filter .5s;
  cursor: pointer;
}
.cf-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.cf-item.c { cursor: zoom-in; }
.cf-item .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font: 400 12px/1.3 var(--f-ui); background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
.dots { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: calc(6 * var(--u)); min-height: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .4); transition: width .3s, background .3s; }
.dots i.on { width: 30px; background: #fff; }
.dots span { font: 500 13px var(--f-ui); color: rgba(255, 255, 255, .8); }
.more { margin-top: calc(18 * var(--u)); border: 1px solid rgba(255, 255, 255, .6); background: transparent; color: #fff; border-radius: 999px; padding: 9px 22px; font: 500 calc(13 * var(--u)) var(--f-ui); }

/* ---------- 4. TIỆC CƯỚI / LỊCH / RSVP ---------- */
.party .lead { font-family: var(--f-body); font-weight: 600; font-size: calc(15.5 * var(--u)); text-transform: uppercase; line-height: 1.4; margin-top: calc(22 * var(--u)); }
.party .evt { margin-top: calc(8 * var(--u)); }
.party .evt + .evt { margin-top: calc(24 * var(--u)); }
.party .edate .t1, .party .edate .t2 { font-weight: 600; font-family: var(--f-body); font-size: calc(12.5 * var(--u)); }
.cd-t { font-family: var(--f-body); font-size: calc(17 * var(--u)); letter-spacing: .02em; text-transform: uppercase; color: var(--taupe); margin-top: calc(26 * var(--u)); }
.cd-v { font-family: var(--f-body); font-weight: 600; font-size: calc(17 * var(--u)); color: var(--taupe); margin-top: calc(10 * var(--u)); font-variant-numeric: tabular-nums; }
.cal { margin: calc(22 * var(--u)) calc(2 * var(--u)) 0; background: #fff; border: 1px solid #d3d0c8; border-radius: calc(12 * var(--u)); overflow: hidden; }
.cal .mh { font-family: var(--f-amp); font-weight: 700; font-size: calc(26 * var(--u)); padding: calc(10 * var(--u)) 0 calc(6 * var(--u)); letter-spacing: .02em; }
.cal .dow, .cal .days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal .dow { border-bottom: 2px solid #111; border-top: 1px solid #e6e2d9; padding: calc(7 * var(--u)) 0; font: 500 calc(10.5 * var(--u)) var(--f-ui); }
.cal .days { padding: calc(6 * var(--u)) 0 calc(10 * var(--u)); row-gap: calc(2 * var(--u)); font: 300 calc(13 * var(--u)) var(--f-ui); }
.cal .d { position: relative; height: calc(32 * var(--u)); display: flex; align-items: center; justify-content: center; }
.cal .d.hl { color: #fff; font-weight: 700; font-size: calc(11.5 * var(--u)); }
.cal .d.hl svg { position: absolute; width: calc(30 * var(--u)); height: calc(30 * var(--u)); fill: #000; }
.cal .d.hl span { position: relative; margin-top: -1px; }
.cal .d.main svg { animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.16); } 30% { transform: scale(.98); } 45% { transform: scale(1.1); } 60% { transform: scale(1); } }
.addcal { display: inline-block; margin-top: calc(14 * var(--u)); border: 0; background: none; font-family: var(--f-head); font-size: calc(14.5 * var(--u)); text-decoration: underline; text-underline-offset: 3px; color: var(--ink); padding: 6px; }

.rsvp { margin: calc(34 * var(--u)) calc(2 * var(--u)) 0; padding: calc(24 * var(--u)) calc(22 * var(--u)) calc(24 * var(--u)); background: #fff; border-radius: calc(16 * var(--u)); text-align: left; font-family: var(--f-ui); box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(0, 0, 0, .12); }
.rsvp h3 { margin: 0; font: 600 calc(20 * var(--u)) / 1.25 var(--f-ui); color: #111827; }
.rsvp .lead2 { margin: calc(10 * var(--u)) 0 calc(18 * var(--u)); font: 300 calc(14 * var(--u)) / 1.55 var(--f-ui); color: #6b7280; }
.rsvp label.f { display: block; font: 500 calc(14 * var(--u)) var(--f-ui); color: #374151; margin: calc(14 * var(--u)) 0 calc(6 * var(--u)); }
.rsvp .inp { width: 100%; min-height: 48px; padding: 10px 16px; border: 1px solid #ececec; border-radius: 12px; background: #fff; color: #111; font: 400 16px var(--f-ui); outline: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.rsvp .inp::placeholder { color: #b6bac2; }
.rsvp .inp:focus { border-color: #111; }
.rsvp select.inp { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border: 1px solid #ececec; border-radius: 12px; background: #fff; font: 500 calc(14 * var(--u)) var(--f-ui); color: #374151; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.opt i { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #e5e7eb; color: #4b5563; display: flex; align-items: center; justify-content: center; }
.opt i svg { width: 14px; height: 14px; }
.opt.on { border-color: #111; background: #f9fafb; }
.opt.on i { background: #111; color: #fff; }
.rsvp .go { width: 100%; min-height: 48px; margin-top: calc(18 * var(--u)); border: 0; border-radius: 12px; background: #111; color: #fff; font: 600 calc(14 * var(--u)) var(--f-ui); }
.rsvp .go[disabled] { background: #9ca3af; cursor: not-allowed; }
.rsvp .err { margin-top: 10px; color: #b91c1c; font: 400 13px var(--f-ui); }
.rsvp .err:empty { display: none; }
.rsvp .done { padding: calc(14 * var(--u)) 0; font: 600 calc(17 * var(--u)) / 1.5 var(--f-caps); text-align: center; color: #111; }
.rsvp .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- 5. ĐỊA ĐIỂM ---------- */
.loc { text-align: center; padding: calc(22 * var(--u)) calc(14 * var(--u)) 0; }
.loc .addr { font-family: var(--f-head); font-size: calc(13 * var(--u)); color: rgba(255, 255, 255, .72); margin-top: calc(10 * var(--u)); line-height: 1.5; }
.mapbox { position: relative; margin-top: calc(18 * var(--u)); border-radius: calc(14 * var(--u)); overflow: hidden; background: #1a1a1a; }
.mapbox::before { content: 'Đang tải bản đồ…'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 400 13px var(--f-ui); color: rgba(255, 255, 255, .45); }
.map { position: relative; display: block; width: 100%; height: calc(280 * var(--u)); border: 0; filter: grayscale(.25) contrast(.95); }
.dir { display: inline-flex; align-items: center; gap: 8px; margin-top: calc(18 * var(--u)); color: rgba(255, 255, 255, .8); text-decoration: none; font: 700 calc(14.5 * var(--u)) var(--f-head); padding: 8px 12px; }
.dir svg { width: 16px; height: 16px; }

/* ---------- 6. SỔ LƯU BÚT ---------- */
.gb { margin: calc(46 * var(--u)) calc(22 * var(--u)) 0; padding: calc(24 * var(--u)) calc(18 * var(--u)); background: #fff linear-gradient(180deg, #fff, #f6f3ec); color: #111; border-radius: calc(14 * var(--u)); text-align: center; box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, .5); }
.gb h2 { margin: 0 0 calc(16 * var(--u)); font-family: var(--f-head); font-weight: 700; font-size: calc(20 * var(--u)); letter-spacing: .01em; text-transform: uppercase; }
.gb form { display: grid; gap: 12px; text-align: left; position: relative; }
.gb .fl { position: relative; }
.gb .fl input, .gb .fl textarea { width: 100%; padding: 22px 12px 8px; border: 1.5px solid #111; border-radius: 10px; background: #fff; font: 400 16px var(--f-body); color: #111; outline: none; resize: none; }
.gb .fl textarea { min-height: 84px; }
.gb .fl span { position: absolute; left: 13px; top: 7px; font: 400 11px var(--f-ui); color: #666; pointer-events: none; }
.gb .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gb .wand { width: 38px; height: 38px; border: 0; border-radius: 10px; background: #ecebe8; font-size: 17px; line-height: 1; }
.gb .send { border: 0; background: #111; color: #fff; border-radius: 6px; padding: 12px 22px; font: 400 calc(13 * var(--u)) var(--f-head); letter-spacing: .06em; text-transform: uppercase; }
.gb .send[disabled] { opacity: .55; }
.gb .err { color: #b91c1c; font: 400 13px var(--f-ui); text-align: center; }
.gb .err:empty { display: none; }
.wishes { margin-top: calc(18 * var(--u)); display: grid; gap: 10px; text-align: left; max-height: calc(420 * var(--u)); overflow-y: auto; }
.wishes .none { text-align: center; font: 400 calc(14 * var(--u)) var(--f-head); color: #333; padding: 6px 0; }
.wish { padding: 12px 14px; background: #faf8f3; border: 1px solid #ebe6da; border-radius: 10px; }
.wish b { display: block; font: 700 calc(13.5 * var(--u)) var(--f-head); }
.wish p { margin: 4px 0 0; font: 400 calc(13.5 * var(--u)) / 1.55 var(--f-body); color: #333; white-space: pre-wrap; word-break: break-word; }
.wish small { display: block; margin-top: 6px; font: 400 11px var(--f-ui); color: #9a958a; }

/* ---------- 7. HỘP QUÀ ---------- */
.gift { text-align: center; padding: calc(56 * var(--u)) calc(20 * var(--u)) 0; position: relative; }
.gbox { position: relative; width: calc(300 * var(--u)); height: calc(300 * var(--u)); margin: calc(18 * var(--u)) auto 0; border: 0; background: none; padding: 0; display: block; -webkit-tap-highlight-color: transparent; }
.gbox .main { position: absolute; left: calc(40 * var(--u)); top: calc(34 * var(--u)); width: calc(220 * var(--u)); height: calc(232 * var(--u)); transition: transform .4s; }
.gbox:hover .main { transform: scale(1.04); }
.gbox .lid { transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.gbox.open .lid { transform: translateY(-14px) rotate(-6deg); }
.gbox .mini { position: absolute; width: calc(40 * var(--u)); height: calc(40 * var(--u)); animation: floaty 4.8s ease-in-out infinite; }
.gbox .mini:nth-of-type(2) { animation-delay: -1s; animation-duration: 5.6s; }
.gbox .mini:nth-of-type(3) { animation-delay: -2.2s; }
.gbox .mini:nth-of-type(4) { animation-delay: -3.1s; animation-duration: 6s; }
.gbox .mini:nth-of-type(5) { animation-delay: -.6s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(calc(-12 * var(--u))) rotate(calc(var(--r, 0deg) + 10deg)); } }
.gbox .sp { position: absolute; color: var(--taupe); font: 400 14px var(--f-ui); animation: tw 2.4s ease-in-out infinite; }
@keyframes tw { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
.gtap { font: 500 calc(12 * var(--u)) var(--f-ui); color: rgba(255, 255, 255, .85); margin-top: calc(2 * var(--u)); }
.gthx { font: 500 calc(11.5 * var(--u)) / 1.5 var(--f-ui); margin-top: calc(40 * var(--u)); }

/* ---------- nhạc ---------- */
.fab-music {
  position: fixed; z-index: 40; bottom: calc(20px + env(safe-area-inset-bottom)); right: max(14px, calc(50vw - 215px + 14px));
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--taupe); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 3px; box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
}
.fab-music b { display: block; width: 3px; height: 8px; background: #fff; border-radius: 2px; }
.fab-music.playing b { animation: eq 1s ease-in-out infinite; }
.fab-music.playing b:nth-child(2) { animation-delay: -.3s; }
.fab-music.playing b:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 6px; } 50% { height: 18px; } }

/* ---------- màn mở thiệp ---------- */
.opening {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(130% 80% at 50% 0%, #2c2c2f 0%, #141415 50%, #000 100%);
  transition: opacity .9s ease .6s, visibility 0s linear 1.5s;
}
.opening.go { opacity: 0; visibility: hidden; pointer-events: none; }
.ocard {
  position: relative; width: min(80vw, 310px); aspect-ratio: 310 / 442; max-height: 86vh; background: #fff; border-radius: 7px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7); text-align: center; color: #333; overflow: visible;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 22px;
  transition: transform 1s cubic-bezier(.55, 0, .35, 1), opacity .7s ease .3s;
}
.opening.go .ocard { transform: translateY(-70vh) rotate(-4deg) scale(.92); opacity: 0; }
.ocard .hrt { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3a3a3a, #000); box-shadow: 0 8px 20px rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; margin-bottom: 26px; }
.ocard .hrt svg { width: 28px; height: 28px; fill: #fff; }
.ocard .nm { font-family: var(--f-name); font-weight: 400; font-size: 32px; line-height: 1.18; color: #3d3d3d; }
.ocard .and { font-family: var(--f-amp); font-size: 28px; color: #777; line-height: 1; margin: 2px 0; }
.ocard .orn { display: flex; align-items: center; justify-content: center; gap: 8px; color: #b9a48f; margin: 14px 0 12px; font-size: 14px; }
.ocard .orn::before, .ocard .orn::after { content: ''; width: 42px; height: 1px; background: #c9c2b8; }
.ocard .dt { font-family: var(--f-name); font-weight: 500; font-size: 19px; color: #555; }
.ocard .to { font-family: var(--f-name); font-weight: 500; font-size: 19px; color: #555; margin-top: 22px; }
.ocard .gn { font-family: var(--f-full); font-size: 24px; line-height: 1.25; color: #222; margin-top: 4px; word-break: break-word; }
.ocard .gc { font-family: var(--f-name); font-style: italic; font-size: 17px; color: #777; margin-top: 2px; }
.ocard .btn { margin-top: 24px; min-width: 140px; height: 48px; border: 0; border-radius: 999px; background: linear-gradient(90deg, #111 0%, #1a1a1a 82%, #555 100%); color: #fff; font: 600 16px var(--f-body); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 10px 24px rgba(0, 0, 0, .35), 0 0 0 0 rgba(255, 255, 255, .0); } 50% { box-shadow: 0 10px 24px rgba(0, 0, 0, .35), 0 0 0 10px rgba(255, 255, 255, .12); } }
.ocard .deco.a { left: -12px; top: -12px; width: 96px; height: 130px; }
.ocard .deco.b { right: -12px; bottom: -12px; width: 96px; height: 130px; transform: rotate(180deg); }
.petal { position: absolute; top: -30px; color: #d8cdbd; animation: fall linear infinite; opacity: .85; }
.petal svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes fall {
  0% { transform: translate3d(0, -6vh, 0) rotate(0); }
  50% { transform: translate3d(18px, 55vh, 0) rotate(180deg); }
  100% { transform: translate3d(-12px, 112vh, 0) rotate(360deg); }
}
.burst { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; color: #e4dac9; pointer-events: none; animation: burst 1.6s ease-out forwards; }
.burst svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes burst {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); opacity: 0; }
}

/* ---------- popup quà mừng ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .78); }
.modal.open { display: flex; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; } }
.sheet { position: relative; width: min(100%, 380px); max-height: calc(100vh - 32px); overflow: auto; background: #fff; color: #222; border-radius: 18px; padding: 22px 18px 20px; text-align: center; font-family: var(--f-ui); }
.sheet .x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; background: #f1f1f1; border-radius: 50%; font-size: 20px; line-height: 1; color: #333; }
.sheet h3 { margin: 0; font: 700 calc(20 * var(--u)) var(--f-head); text-transform: uppercase; letter-spacing: .01em; }
.seg { display: flex; gap: 6px; padding: 4px; background: #f0eeea; border-radius: 12px; margin: 16px 0 14px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 9px 6px; font: 600 13.5px var(--f-ui); color: #555; }
.seg button.on { background: #111; color: #fff; }
.acc .who { font: 500 14px var(--f-ui); }
.acc .qr { width: 100%; max-width: 230px; margin: 12px auto; border-radius: 10px; border: 1px solid #eee; }
.acc .bk { font: 400 13px var(--f-ui); color: #666; }
.acc .no { font: 700 20px var(--f-ui); margin: 2px 0; word-break: break-all; letter-spacing: .02em; }
.acc .hd { font: 500 13px var(--f-ui); text-transform: uppercase; color: #444; }
.acc .acts { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.acc .acts a, .acc .acts button { border: 0; background: #111; color: #fff; border-radius: 999px; padding: 10px 18px; font: 600 13px var(--f-ui); text-decoration: none; }
.acc .acts .alt { background: #ececec; color: #111; }

/* ---------- xem tất cả ảnh / lightbox ---------- */
.gridov { position: fixed; inset: 0; z-index: 70; background: #0a0a0a; overflow-y: auto; display: none; padding: calc(12px + env(safe-area-inset-top)) 12px 40px; }
.gridov.open { display: block; animation: fadein .2s ease; }
.gridov .gh { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 10px 4px; background: linear-gradient(#0a0a0a 70%, transparent); }
.gridov .gh b { font: 700 18px var(--f-head); text-transform: uppercase; }
.gridov .gh button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; line-height: 1; }
.gridov .cn { font: 400 24px var(--f-amp); font-weight: 700; margin: 18px 0 8px; text-align: center; }
.gridov .cols { columns: 2; column-gap: 8px; max-width: 520px; margin: 0 auto; }
.gridov .cols img { width: 100%; height: auto; margin-bottom: 8px; background: #1a1a1a; cursor: zoom-in; break-inside: avoid; }
.lb { position: fixed; inset: 0; z-index: 90; background: #000; display: none; touch-action: pan-y; }
.lb.open { display: block; animation: fadein .2s ease; }
.lb img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: calc(100% - 96px); object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .2s; }
.lb .cap { position: absolute; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); text-align: center; font: 400 14px var(--f-ui); color: #ddd; padding: 0 60px; }
.lb .cap b { font: 700 24px var(--f-amp); color: #fff; display: block; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; line-height: 1; }
.lb .close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb .prev { left: 10px; top: 50%; margin-top: -22px; }
.lb .next { right: 10px; top: 50%; margin-top: -22px; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); width: max-content; max-width: calc(100vw - 32px); text-align: center; background: rgba(20, 20, 20, .95); color: #fff; padding: 10px 18px; border-radius: 999px; font: 500 14px var(--f-ui); z-index: 120; opacity: 0; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (prefers-reduced-motion: reduce) {
  [data-anim] { opacity: 1 !important; transform: none !important; transition: none; }
  .env-photo { transform: rotate(5deg) !important; transition: none; }
  .petal, .gbox .mini, .gbox .sp, .cal .d.main svg, .ocard .btn, .fab-music.playing b { animation: none !important; }
  .cf-item { transition: none; }
}
